diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/CHANGELOG.md b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/CHANGELOG.md index 52911e4cc5e4..9fe7dd5022f8 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/CHANGELOG.md +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/CHANGELOG.md @@ -1,2 +1,36 @@ -# Change History +# Unreleased +## Additive Changes + +### New Funcs + +1. *NetworkRuleSetListResultIterator.Next() error +1. *NetworkRuleSetListResultIterator.NextWithContext(context.Context) error +1. *NetworkRuleSetListResultPage.Next() error +1. *NetworkRuleSetListResultPage.NextWithContext(context.Context) error +1. NamespacesClient.ListNetworkRuleSets(context.Context, string, string) (NetworkRuleSetListResultPage, error) +1. NamespacesClient.ListNetworkRuleSetsComplete(context.Context, string, string) (NetworkRuleSetListResultIterator, error) +1. NamespacesClient.ListNetworkRuleSetsPreparer(context.Context, string, string) (*http.Request, error) +1. NamespacesClient.ListNetworkRuleSetsResponder(*http.Response) (NetworkRuleSetListResult, error) +1. NamespacesClient.ListNetworkRuleSetsSender(*http.Request) (*http.Response, error) +1. NetworkRuleSetListResult.IsEmpty() bool +1. NetworkRuleSetListResultIterator.NotDone() bool +1. NetworkRuleSetListResultIterator.Response() NetworkRuleSetListResult +1. NetworkRuleSetListResultIterator.Value() NetworkRuleSet +1. NetworkRuleSetListResultPage.NotDone() bool +1. NetworkRuleSetListResultPage.Response() NetworkRuleSetListResult +1. NetworkRuleSetListResultPage.Values() []NetworkRuleSet +1. NewNetworkRuleSetListResultIterator(NetworkRuleSetListResultPage) NetworkRuleSetListResultIterator +1. NewNetworkRuleSetListResultPage(NetworkRuleSetListResult, func(context.Context, NetworkRuleSetListResult) (NetworkRuleSetListResult, error)) NetworkRuleSetListResultPage + +### Struct Changes + +#### New Structs + +1. NetworkRuleSetListResult +1. NetworkRuleSetListResultIterator +1. NetworkRuleSetListResultPage + +#### New Struct Fields + +1. SBNamespaceProperties.Status diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/_meta.json b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/_meta.json index 653b1fec8e88..215bf0565388 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/_meta.json +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "864b8157631be783af587a96cd0f079612b21ea7", "readme": "/_/azure-rest-api-specs/specification/servicebus/resource-manager/readme.md", "tag": "package-2018-01-preview", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/client.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/client.go index 5e02f1a71a0b..44757124c866 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/client.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/client.go @@ -1,4 +1,4 @@ -// Package servicebus implements the Azure ARM Servicebus service API version . +// Package servicebus implements the Azure ARM Servicebus service API version 2018-01-01-preview. // // package servicebus diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/eventhubs.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/eventhubs.go index 06f658a014a5..c3db6e1c69fd 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/eventhubs.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/eventhubs.go @@ -91,7 +91,7 @@ func (client EventHubsClient) ListByNamespacePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/migrationconfigs.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/migrationconfigs.go index 162408119af4..008540209f6c 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/migrationconfigs.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/migrationconfigs.go @@ -90,7 +90,7 @@ func (client MigrationConfigsClient) CompleteMigrationPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -176,7 +176,7 @@ func (client MigrationConfigsClient) CreateAndStartMigrationPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -275,7 +275,7 @@ func (client MigrationConfigsClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -361,7 +361,7 @@ func (client MigrationConfigsClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -452,7 +452,7 @@ func (client MigrationConfigsClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -576,7 +576,7 @@ func (client MigrationConfigsClient) RevertPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/models.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/models.go index 430f3d2fb2df..b70c13cea612 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/models.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/models.go @@ -1542,7 +1542,7 @@ func (future *NamespacesDeleteFuture) result(client NamespacesClient) (ar autore return } -// NetworkRuleSet description of topic resource. +// NetworkRuleSet description of NetworkRuleSet resource. type NetworkRuleSet struct { autorest.Response `json:"-"` // NetworkRuleSetProperties - NetworkRuleSet properties @@ -1615,6 +1615,165 @@ func (nrs *NetworkRuleSet) UnmarshalJSON(body []byte) error { return nil } +// NetworkRuleSetListResult the response of the List NetworkRuleSet operation. +type NetworkRuleSetListResult struct { + autorest.Response `json:"-"` + // Value - Result of the List NetworkRuleSet operation. + Value *[]NetworkRuleSet `json:"value,omitempty"` + // NextLink - Link to the next set of results. Not empty if Value contains incomplete list of NetworkRuleSet. + NextLink *string `json:"nextLink,omitempty"` +} + +// NetworkRuleSetListResultIterator provides access to a complete listing of NetworkRuleSet values. +type NetworkRuleSetListResultIterator struct { + i int + page NetworkRuleSetListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *NetworkRuleSetListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkRuleSetListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *NetworkRuleSetListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter NetworkRuleSetListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter NetworkRuleSetListResultIterator) Response() NetworkRuleSetListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter NetworkRuleSetListResultIterator) Value() NetworkRuleSet { + if !iter.page.NotDone() { + return NetworkRuleSet{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the NetworkRuleSetListResultIterator type. +func NewNetworkRuleSetListResultIterator(page NetworkRuleSetListResultPage) NetworkRuleSetListResultIterator { + return NetworkRuleSetListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (nrslr NetworkRuleSetListResult) IsEmpty() bool { + return nrslr.Value == nil || len(*nrslr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (nrslr NetworkRuleSetListResult) hasNextLink() bool { + return nrslr.NextLink != nil && len(*nrslr.NextLink) != 0 +} + +// networkRuleSetListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (nrslr NetworkRuleSetListResult) networkRuleSetListResultPreparer(ctx context.Context) (*http.Request, error) { + if !nrslr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(nrslr.NextLink))) +} + +// NetworkRuleSetListResultPage contains a page of NetworkRuleSet values. +type NetworkRuleSetListResultPage struct { + fn func(context.Context, NetworkRuleSetListResult) (NetworkRuleSetListResult, error) + nrslr NetworkRuleSetListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *NetworkRuleSetListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkRuleSetListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.nrslr) + if err != nil { + return err + } + page.nrslr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *NetworkRuleSetListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page NetworkRuleSetListResultPage) NotDone() bool { + return !page.nrslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page NetworkRuleSetListResultPage) Response() NetworkRuleSetListResult { + return page.nrslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page NetworkRuleSetListResultPage) Values() []NetworkRuleSet { + if page.nrslr.IsEmpty() { + return nil + } + return *page.nrslr.Value +} + +// Creates a new instance of the NetworkRuleSetListResultPage type. +func NewNetworkRuleSetListResultPage(cur NetworkRuleSetListResult, getNextPage func(context.Context, NetworkRuleSetListResult) (NetworkRuleSetListResult, error)) NetworkRuleSetListResultPage { + return NetworkRuleSetListResultPage{ + fn: getNextPage, + nrslr: cur, + } +} + // NetworkRuleSetProperties networkRuleSet properties type NetworkRuleSetProperties struct { // DefaultAction - Default Action for Network Rule Set. Possible values include: 'Allow', 'Deny' @@ -1625,7 +1784,7 @@ type NetworkRuleSetProperties struct { IPRules *[]NWRuleSetIPRules `json:"ipRules,omitempty"` } -// NWRuleSetIPRules the response from the List namespace operation. +// NWRuleSetIPRules description of NetWorkRuleSet - IpRules resource. type NWRuleSetIPRules struct { // IPMask - IP Mask IPMask *string `json:"ipMask,omitempty"` @@ -1633,11 +1792,11 @@ type NWRuleSetIPRules struct { Action NetworkRuleIPAction `json:"action,omitempty"` } -// NWRuleSetVirtualNetworkRules the response from the List namespace operation. +// NWRuleSetVirtualNetworkRules description of VirtualNetworkRules - NetworkRules resource. type NWRuleSetVirtualNetworkRules struct { // Subnet - Subnet properties Subnet *Subnet `json:"subnet,omitempty"` - // IgnoreMissingVnetServiceEndpoint - Value that indicates whether to ignore missing Vnet Service Endpoint + // IgnoreMissingVnetServiceEndpoint - Value that indicates whether to ignore missing VNet Service Endpoint IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` } @@ -3270,6 +3429,8 @@ type SBNamespaceMigrate struct { type SBNamespaceProperties struct { // ProvisioningState - READ-ONLY; Provisioning state of the namespace. ProvisioningState *string `json:"provisioningState,omitempty"` + // Status - READ-ONLY; Status of the namespace. + Status *string `json:"status,omitempty"` // CreatedAt - READ-ONLY; The time the namespace was created CreatedAt *date.Time `json:"createdAt,omitempty"` // UpdatedAt - READ-ONLY; The time the namespace was updated. diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/namespaces.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/namespaces.go index b04a28ba51be..4d20438c3ef9 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/namespaces.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/namespaces.go @@ -79,7 +79,7 @@ func (client NamespacesClient) CheckNameAvailabilityMethodPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -266,7 +266,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -392,11 +392,11 @@ func (client NamespacesClient) CreateOrUpdateIPFilterRuleResponder(resp *http.Re return } -// CreateOrUpdateNetworkRuleSet gets NetworkRuleSet for a Namespace. +// CreateOrUpdateNetworkRuleSet create or update NetworkRuleSet for a Namespace. // Parameters: // resourceGroupName - name of the Resource group within the Azure subscription. // namespaceName - the namespace name -// parameters - the Namespace NetworkRuleSet. +// parameters - the Namespace IpFilterRule. func (client NamespacesClient) CreateOrUpdateNetworkRuleSet(ctx context.Context, resourceGroupName string, namespaceName string, parameters NetworkRuleSet) (result NetworkRuleSet, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.CreateOrUpdateNetworkRuleSet") @@ -457,7 +457,7 @@ func (client NamespacesClient) CreateOrUpdateNetworkRuleSetPreparer(ctx context. autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkrulesets/default", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -722,7 +722,7 @@ func (client NamespacesClient) DeleteAuthorizationRulePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1076,7 +1076,7 @@ func (client NamespacesClient) GetAuthorizationRulePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1260,7 +1260,7 @@ func (client NamespacesClient) GetNetworkRuleSetPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkrulesets/default", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1546,7 +1546,7 @@ func (client NamespacesClient) ListAuthorizationRulesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1925,7 +1925,7 @@ func (client NamespacesClient) ListKeysPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1956,6 +1956,134 @@ func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result Ac return } +// ListNetworkRuleSets gets list of NetworkRuleSet for a Namespace. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// namespaceName - the namespace name +func (client NamespacesClient) ListNetworkRuleSets(ctx context.Context, resourceGroupName string, namespaceName string) (result NetworkRuleSetListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.ListNetworkRuleSets") + defer func() { + sc := -1 + if result.nrslr.Response.Response != nil { + sc = result.nrslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicebus.NamespacesClient", "ListNetworkRuleSets", err.Error()) + } + + result.fn = client.listNetworkRuleSetsNextResults + req, err := client.ListNetworkRuleSetsPreparer(ctx, resourceGroupName, namespaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "ListNetworkRuleSets", nil, "Failure preparing request") + return + } + + resp, err := client.ListNetworkRuleSetsSender(req) + if err != nil { + result.nrslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "ListNetworkRuleSets", resp, "Failure sending request") + return + } + + result.nrslr, err = client.ListNetworkRuleSetsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "ListNetworkRuleSets", resp, "Failure responding to request") + return + } + if result.nrslr.hasNextLink() && result.nrslr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListNetworkRuleSetsPreparer prepares the ListNetworkRuleSets request. +func (client NamespacesClient) ListNetworkRuleSetsPreparer(ctx context.Context, resourceGroupName string, namespaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-01-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListNetworkRuleSetsSender sends the ListNetworkRuleSets request. The method will close the +// http.Response Body if it receives an error. +func (client NamespacesClient) ListNetworkRuleSetsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListNetworkRuleSetsResponder handles the response to the ListNetworkRuleSets request. The method always +// closes the http.Response Body. +func (client NamespacesClient) ListNetworkRuleSetsResponder(resp *http.Response) (result NetworkRuleSetListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNetworkRuleSetsNextResults retrieves the next set of results, if any. +func (client NamespacesClient) listNetworkRuleSetsNextResults(ctx context.Context, lastResults NetworkRuleSetListResult) (result NetworkRuleSetListResult, err error) { + req, err := lastResults.networkRuleSetListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "listNetworkRuleSetsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListNetworkRuleSetsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "listNetworkRuleSetsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListNetworkRuleSetsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "listNetworkRuleSetsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListNetworkRuleSetsComplete enumerates all values, automatically crossing page boundaries as required. +func (client NamespacesClient) ListNetworkRuleSetsComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result NetworkRuleSetListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.ListNetworkRuleSets") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListNetworkRuleSets(ctx, resourceGroupName, namespaceName) + return +} + // ListVirtualNetworkRules gets a list of VirtualNetwork rules for a Namespace. // Parameters: // resourceGroupName - name of the Resource group within the Azure subscription. @@ -2140,7 +2268,7 @@ func (client NamespacesClient) MigratePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2233,7 +2361,7 @@ func (client NamespacesClient) RegenerateKeysPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/premiummessagingregions.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/premiummessagingregions.go index 58cbd411b71f..a4621e801745 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/premiummessagingregions.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/premiummessagingregions.go @@ -76,7 +76,7 @@ func (client PremiumMessagingRegionsClient) ListPreparer(ctx context.Context) (* "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/queues.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/queues.go index bc9cd5ad744b..65f0df1225f1 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/queues.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/queues.go @@ -91,7 +91,7 @@ func (client QueuesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -192,7 +192,7 @@ func (client QueuesClient) CreateOrUpdateAuthorizationRulePreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -284,7 +284,7 @@ func (client QueuesClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -378,7 +378,7 @@ func (client QueuesClient) DeleteAuthorizationRulePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -467,7 +467,7 @@ func (client QueuesClient) GetPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -562,7 +562,7 @@ func (client QueuesClient) GetAuthorizationRulePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -657,7 +657,7 @@ func (client QueuesClient) ListAuthorizationRulesPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -799,7 +799,7 @@ func (client QueuesClient) ListByNamespacePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -937,7 +937,7 @@ func (client QueuesClient) ListKeysPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1033,7 +1033,7 @@ func (client QueuesClient) RegenerateKeysPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/regions.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/regions.go index 4d4444371728..29b7f558e053 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/regions.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/regions.go @@ -86,7 +86,7 @@ func (client RegionsClient) ListBySkuPreparer(ctx context.Context, sku string) ( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/rules.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/rules.go index 30e0060b2159..eaebc766ff42 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/rules.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/rules.go @@ -110,7 +110,7 @@ func (client RulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -212,7 +212,7 @@ func (client RulesClient) DeletePreparer(ctx context.Context, resourceGroupName "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -311,7 +311,7 @@ func (client RulesClient) GetPreparer(ctx context.Context, resourceGroupName str "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -425,7 +425,7 @@ func (client RulesClient) ListBySubscriptionsPreparer(ctx context.Context, resou "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/servicebusapi/interfaces.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/servicebusapi/interfaces.go index cf814e4e2072..f67f71de7443 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/servicebusapi/interfaces.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/servicebusapi/interfaces.go @@ -38,6 +38,8 @@ type NamespacesClientAPI interface { ListIPFilterRules(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.IPFilterRuleListResultPage, err error) ListIPFilterRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.IPFilterRuleListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result servicebus.AccessKeys, err error) + ListNetworkRuleSets(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.NetworkRuleSetListResultPage, err error) + ListNetworkRuleSetsComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.NetworkRuleSetListResultIterator, err error) ListVirtualNetworkRules(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.VirtualNetworkRuleListResultPage, err error) ListVirtualNetworkRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.VirtualNetworkRuleListResultIterator, err error) Migrate(ctx context.Context, resourceGroupName string, namespaceName string, parameters servicebus.SBNamespaceMigrate) (result autorest.Response, err error) @@ -65,14 +67,6 @@ type PrivateLinkResourcesClientAPI interface { var _ PrivateLinkResourcesClientAPI = (*servicebus.PrivateLinkResourcesClient)(nil) -// OperationsClientAPI contains the set of methods on the OperationsClient type. -type OperationsClientAPI interface { - List(ctx context.Context) (result servicebus.OperationListResultPage, err error) - ListComplete(ctx context.Context) (result servicebus.OperationListResultIterator, err error) -} - -var _ OperationsClientAPI = (*servicebus.OperationsClient)(nil) - // DisasterRecoveryConfigsClientAPI contains the set of methods on the DisasterRecoveryConfigsClient type. type DisasterRecoveryConfigsClientAPI interface { BreakPairing(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result autorest.Response, err error) @@ -185,3 +179,11 @@ type RulesClientAPI interface { } var _ RulesClientAPI = (*servicebus.RulesClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result servicebus.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result servicebus.OperationListResultIterator, err error) +} + +var _ OperationsClientAPI = (*servicebus.OperationsClient)(nil) diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/subscriptions.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/subscriptions.go index fbefc179fadc..d970cafbe761 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/subscriptions.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/subscriptions.go @@ -96,7 +96,7 @@ func (client SubscriptionsClient) CreateOrUpdatePreparer(ctx context.Context, re "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -193,7 +193,7 @@ func (client SubscriptionsClient) DeletePreparer(ctx context.Context, resourceGr "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -287,7 +287,7 @@ func (client SubscriptionsClient) GetPreparer(ctx context.Context, resourceGroup "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -396,7 +396,7 @@ func (client SubscriptionsClient) ListByTopicPreparer(ctx context.Context, resou "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/topics.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/topics.go index 2f115e27419d..24c3ced188d7 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/topics.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/topics.go @@ -91,7 +91,7 @@ func (client TopicsClient) CreateOrUpdatePreparer(ctx context.Context, resourceG "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -192,7 +192,7 @@ func (client TopicsClient) CreateOrUpdateAuthorizationRulePreparer(ctx context.C "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -284,7 +284,7 @@ func (client TopicsClient) DeletePreparer(ctx context.Context, resourceGroupName "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -378,7 +378,7 @@ func (client TopicsClient) DeleteAuthorizationRulePreparer(ctx context.Context, "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -467,7 +467,7 @@ func (client TopicsClient) GetPreparer(ctx context.Context, resourceGroupName st "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -562,7 +562,7 @@ func (client TopicsClient) GetAuthorizationRulePreparer(ctx context.Context, res "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -657,7 +657,7 @@ func (client TopicsClient) ListAuthorizationRulesPreparer(ctx context.Context, r "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -799,7 +799,7 @@ func (client TopicsClient) ListByNamespacePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -937,7 +937,7 @@ func (client TopicsClient) ListKeysPreparer(ctx context.Context, resourceGroupNa "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1033,7 +1033,7 @@ func (client TopicsClient) RegenerateKeysPreparer(ctx context.Context, resourceG "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2018-01-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/CHANGELOG.md b/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/CHANGELOG.md +++ b/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/_meta.json b/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/_meta.json index 48dcf3c45aac..09a20be832a9 100644 --- a/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/_meta.json +++ b/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/_meta.json @@ -1,5 +1,5 @@ { - "commit": "af463c3f9502d353b8a009685177f13335adb8cd", + "commit": "864b8157631be783af587a96cd0f079612b21ea7", "readme": "/_/azure-rest-api-specs/specification/servicebus/resource-manager/readme.md", "tag": "package-2021-06-preview", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/servicebus/mgmt/2015-08-01/servicebus/CHANGELOG.md b/services/servicebus/mgmt/2015-08-01/servicebus/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/servicebus/mgmt/2015-08-01/servicebus/CHANGELOG.md +++ b/services/servicebus/mgmt/2015-08-01/servicebus/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/servicebus/mgmt/2015-08-01/servicebus/_meta.json b/services/servicebus/mgmt/2015-08-01/servicebus/_meta.json index 69ea7d7f9e52..48b4e0ce6401 100644 --- a/services/servicebus/mgmt/2015-08-01/servicebus/_meta.json +++ b/services/servicebus/mgmt/2015-08-01/servicebus/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "864b8157631be783af587a96cd0f079612b21ea7", "readme": "/_/azure-rest-api-specs/specification/servicebus/resource-manager/readme.md", "tag": "package-2015-08", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/CHANGELOG.md b/services/servicebus/mgmt/2017-04-01/servicebus/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/CHANGELOG.md +++ b/services/servicebus/mgmt/2017-04-01/servicebus/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/_meta.json b/services/servicebus/mgmt/2017-04-01/servicebus/_meta.json index 634576d91383..e5cb58b49974 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/_meta.json +++ b/services/servicebus/mgmt/2017-04-01/servicebus/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "864b8157631be783af587a96cd0f079612b21ea7", "readme": "/_/azure-rest-api-specs/specification/servicebus/resource-manager/readme.md", "tag": "package-2017-04", "use": "@microsoft.azure/autorest.go@2.1.187",