From 2aa66559795a75354b7c86c08438bc0254ee27db Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 14 Mar 2018 13:32:45 -0700 Subject: [PATCH] Generated from 89cf22d8de4f8659cbe1c7af1655f8f3b3d9621a (#1255) Fix SDK breaking change in 2017-10-01 DNS Swagger ref https://github.com/Azure/azure-rest-api-specs/pull/2612 --- .../dns/mgmt/2018-03-01-preview/dns/models.go | 15 +++++++++++++++ services/dns/mgmt/2018-03-01-preview/dns/zones.go | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/services/dns/mgmt/2018-03-01-preview/dns/models.go b/services/dns/mgmt/2018-03-01-preview/dns/models.go index d76091a827b0..9deb1a267cd1 100644 --- a/services/dns/mgmt/2018-03-01-preview/dns/models.go +++ b/services/dns/mgmt/2018-03-01-preview/dns/models.go @@ -761,3 +761,18 @@ func (future ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response } return } + +// ZoneUpdate describes a request to update a DNS zone. +type ZoneUpdate struct { + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ZoneUpdate. +func (zu ZoneUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if zu.Tags != nil { + objectMap["tags"] = zu.Tags + } + return json.Marshal(objectMap) +} diff --git a/services/dns/mgmt/2018-03-01-preview/dns/zones.go b/services/dns/mgmt/2018-03-01-preview/dns/zones.go index 0a9667cbd703..0a8642be640b 100644 --- a/services/dns/mgmt/2018-03-01-preview/dns/zones.go +++ b/services/dns/mgmt/2018-03-01-preview/dns/zones.go @@ -458,7 +458,7 @@ func (client ZonesClient) ListByResourceGroupComplete(ctx context.Context, resou // dot). parameters is parameters supplied to the Update operation. ifMatch is the etag of the DNS zone. Omit this // value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally // overwritting any concurrent changes. -func (client ZonesClient) Update(ctx context.Context, resourceGroupName string, zoneName string, parameters Zone, ifMatch string) (result Zone, err error) { +func (client ZonesClient) Update(ctx context.Context, resourceGroupName string, zoneName string, parameters ZoneUpdate, ifMatch string) (result Zone, err error) { req, err := client.UpdatePreparer(ctx, resourceGroupName, zoneName, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Update", nil, "Failure preparing request") @@ -481,7 +481,7 @@ func (client ZonesClient) Update(ctx context.Context, resourceGroupName string, } // UpdatePreparer prepares the Update request. -func (client ZonesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, zoneName string, parameters Zone, ifMatch string) (*http.Request, error) { +func (client ZonesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, zoneName string, parameters ZoneUpdate, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID),