diff --git a/services/dns/mgmt/2015-05-04-preview/dns/models.go b/services/dns/mgmt/2015-05-04-preview/dns/models.go index b6971ba1a65b..43db0e57fb70 100644 --- a/services/dns/mgmt/2015-05-04-preview/dns/models.go +++ b/services/dns/mgmt/2015-05-04-preview/dns/models.go @@ -48,6 +48,11 @@ const ( TXT RecordType = "TXT" ) +// PossibleRecordTypeValues returns an array of possible values for the RecordType const type. +func PossibleRecordTypeValues() [9]RecordType { + return [9]RecordType{A, AAAA, CNAME, MX, NS, PTR, SOA, SRV, TXT} +} + // AaaaRecord an AAAA record. type AaaaRecord struct { // Ipv6Address - Gets or sets the IPv6 address of this AAAA record in string notation. diff --git a/services/dns/mgmt/2016-04-01/dns/models.go b/services/dns/mgmt/2016-04-01/dns/models.go index ce71cd8a9a03..a9114cbe2799 100644 --- a/services/dns/mgmt/2016-04-01/dns/models.go +++ b/services/dns/mgmt/2016-04-01/dns/models.go @@ -125,6 +125,11 @@ const ( UseProxy HTTPStatusCode = "UseProxy" ) +// PossibleHTTPStatusCodeValues returns an array of possible values for the HTTPStatusCode const type. +func PossibleHTTPStatusCodeValues() [47]HTTPStatusCode { + return [47]HTTPStatusCode{Accepted, Ambiguous, BadGateway, BadRequest, Conflict, Continue, Created, ExpectationFailed, Forbidden, Found, GatewayTimeout, Gone, HTTPVersionNotSupported, InternalServerError, LengthRequired, MethodNotAllowed, Moved, MovedPermanently, MultipleChoices, NoContent, NonAuthoritativeInformation, NotAcceptable, NotFound, NotImplemented, NotModified, OK, PartialContent, PaymentRequired, PreconditionFailed, ProxyAuthenticationRequired, Redirect, RedirectKeepVerb, RedirectMethod, RequestedRangeNotSatisfiable, RequestEntityTooLarge, RequestTimeout, RequestURITooLong, ResetContent, SeeOther, ServiceUnavailable, SwitchingProtocols, TemporaryRedirect, Unauthorized, UnsupportedMediaType, Unused, UpgradeRequired, UseProxy} +} + // OperationStatus enumerates the values for operation status. type OperationStatus string @@ -137,6 +142,11 @@ const ( Succeeded OperationStatus = "Succeeded" ) +// PossibleOperationStatusValues returns an array of possible values for the OperationStatus const type. +func PossibleOperationStatusValues() [3]OperationStatus { + return [3]OperationStatus{Failed, InProgress, Succeeded} +} + // RecordType enumerates the values for record type. type RecordType string @@ -161,6 +171,11 @@ const ( TXT RecordType = "TXT" ) +// PossibleRecordTypeValues returns an array of possible values for the RecordType const type. +func PossibleRecordTypeValues() [9]RecordType { + return [9]RecordType{A, AAAA, CNAME, MX, NS, PTR, SOA, SRV, TXT} +} + // AaaaRecord an AAAA record. type AaaaRecord struct { // Ipv6Address - The IPv6 address of this AAAA record. diff --git a/services/dns/mgmt/2017-09-01/dns/models.go b/services/dns/mgmt/2017-09-01/dns/models.go index e5594bb73942..b08900ce4d9c 100644 --- a/services/dns/mgmt/2017-09-01/dns/models.go +++ b/services/dns/mgmt/2017-09-01/dns/models.go @@ -51,6 +51,11 @@ const ( TXT RecordType = "TXT" ) +// PossibleRecordTypeValues returns an array of possible values for the RecordType const type. +func PossibleRecordTypeValues() [10]RecordType { + return [10]RecordType{A, AAAA, CAA, CNAME, MX, NS, PTR, SOA, SRV, TXT} +} + // AaaaRecord an AAAA record. type AaaaRecord struct { // Ipv6Address - The IPv6 address of this AAAA record. diff --git a/services/dns/mgmt/2017-10-01/dns/models.go b/services/dns/mgmt/2017-10-01/dns/models.go index e5594bb73942..edf4978dc07e 100644 --- a/services/dns/mgmt/2017-10-01/dns/models.go +++ b/services/dns/mgmt/2017-10-01/dns/models.go @@ -51,6 +51,11 @@ const ( TXT RecordType = "TXT" ) +// PossibleRecordTypeValues returns an array of possible values for the RecordType const type. +func PossibleRecordTypeValues() [10]RecordType { + return [10]RecordType{A, AAAA, CAA, CNAME, MX, NS, PTR, SOA, SRV, TXT} +} + // AaaaRecord an AAAA record. type AaaaRecord struct { // Ipv6Address - The IPv6 address of this AAAA record. @@ -735,3 +740,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/2017-10-01/dns/zones.go b/services/dns/mgmt/2017-10-01/dns/zones.go index 9e8d2ce55c62..3cd53111f548 100644 --- a/services/dns/mgmt/2017-10-01/dns/zones.go +++ b/services/dns/mgmt/2017-10-01/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),