diff --git a/services/datashare/mgmt/2019-11-01/datashare/accounts.go b/services/datashare/mgmt/2019-11-01/datashare/accounts.go index 379f0d9c1aad..8d84ef2ff862 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/accounts.go +++ b/services/datashare/mgmt/2019-11-01/datashare/accounts.go @@ -119,7 +119,6 @@ func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCre func (client AccountsClient) CreateResponder(resp *http.Response) (result Account, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -195,7 +194,6 @@ func (client AccountsClient) DeleteSender(req *http.Request) (future AccountsDel func (client AccountsClient) DeleteResponder(resp *http.Response) (result OperationResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -271,7 +269,6 @@ func (client AccountsClient) GetSender(req *http.Request) (*http.Response, error func (client AccountsClient) GetResponder(resp *http.Response) (result Account, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -312,6 +309,9 @@ func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGr if err != nil { err = autorest.NewErrorWithError(err, "datashare.AccountsClient", "ListByResourceGroup", resp, "Failure responding to request") } + if result.al.hasNextLink() && result.al.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -350,7 +350,6 @@ func (client AccountsClient) ListByResourceGroupSender(req *http.Request) (*http func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (result AccountList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -427,6 +426,9 @@ func (client AccountsClient) ListBySubscription(ctx context.Context, skipToken s if err != nil { err = autorest.NewErrorWithError(err, "datashare.AccountsClient", "ListBySubscription", resp, "Failure responding to request") } + if result.al.hasNextLink() && result.al.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -464,7 +466,6 @@ func (client AccountsClient) ListBySubscriptionSender(req *http.Request) (*http. func (client AccountsClient) ListBySubscriptionResponder(resp *http.Response) (result AccountList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -580,7 +581,6 @@ func (client AccountsClient) UpdateSender(req *http.Request) (*http.Response, er func (client AccountsClient) UpdateResponder(resp *http.Response) (result Account, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/datashare/mgmt/2019-11-01/datashare/consumerinvitations.go b/services/datashare/mgmt/2019-11-01/datashare/consumerinvitations.go index c40500a0418e..141fb9f888ab 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/consumerinvitations.go +++ b/services/datashare/mgmt/2019-11-01/datashare/consumerinvitations.go @@ -110,7 +110,6 @@ func (client ConsumerInvitationsClient) GetSender(req *http.Request) (*http.Resp func (client ConsumerInvitationsClient) GetResponder(resp *http.Response) (result ConsumerInvitation, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -150,6 +149,9 @@ func (client ConsumerInvitationsClient) ListInvitations(ctx context.Context, ski if err != nil { err = autorest.NewErrorWithError(err, "datashare.ConsumerInvitationsClient", "ListInvitations", resp, "Failure responding to request") } + if result.cil.hasNextLink() && result.cil.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -183,7 +185,6 @@ func (client ConsumerInvitationsClient) ListInvitationsSender(req *http.Request) func (client ConsumerInvitationsClient) ListInvitationsResponder(resp *http.Response) (result ConsumerInvitationList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -303,7 +304,6 @@ func (client ConsumerInvitationsClient) RejectInvitationSender(req *http.Request func (client ConsumerInvitationsClient) RejectInvitationResponder(resp *http.Response) (result ConsumerInvitation, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/datashare/mgmt/2019-11-01/datashare/consumersourcedatasets.go b/services/datashare/mgmt/2019-11-01/datashare/consumersourcedatasets.go index 4a6e2fcf4975..9d5469d2889b 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/consumersourcedatasets.go +++ b/services/datashare/mgmt/2019-11-01/datashare/consumersourcedatasets.go @@ -77,6 +77,9 @@ func (client ConsumerSourceDataSetsClient) ListByShareSubscription(ctx context.C if err != nil { err = autorest.NewErrorWithError(err, "datashare.ConsumerSourceDataSetsClient", "ListByShareSubscription", resp, "Failure responding to request") } + if result.csdsl.hasNextLink() && result.csdsl.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -117,7 +120,6 @@ func (client ConsumerSourceDataSetsClient) ListByShareSubscriptionSender(req *ht func (client ConsumerSourceDataSetsClient) ListByShareSubscriptionResponder(resp *http.Response) (result ConsumerSourceDataSetList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/datashare/mgmt/2019-11-01/datashare/datasetmappings.go b/services/datashare/mgmt/2019-11-01/datashare/datasetmappings.go index 950ce174ae7b..5d168d2fec1d 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/datasetmappings.go +++ b/services/datashare/mgmt/2019-11-01/datashare/datasetmappings.go @@ -116,7 +116,6 @@ func (client DataSetMappingsClient) CreateSender(req *http.Request) (*http.Respo func (client DataSetMappingsClient) CreateResponder(resp *http.Response) (result DataSetMappingModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -196,7 +195,6 @@ func (client DataSetMappingsClient) DeleteSender(req *http.Request) (*http.Respo func (client DataSetMappingsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -275,7 +273,6 @@ func (client DataSetMappingsClient) GetSender(req *http.Request) (*http.Response func (client DataSetMappingsClient) GetResponder(resp *http.Response) (result DataSetMappingModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -289,7 +286,9 @@ func (client DataSetMappingsClient) GetResponder(resp *http.Response) (result Da // accountName - the name of the share account. // shareSubscriptionName - the name of the share subscription. // skipToken - continuation token -func (client DataSetMappingsClient) ListByShareSubscription(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result DataSetMappingListPage, err error) { +// filter - filters the results using OData syntax. +// orderby - sorts the results using OData syntax. +func (client DataSetMappingsClient) ListByShareSubscription(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string, filter string, orderby string) (result DataSetMappingListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DataSetMappingsClient.ListByShareSubscription") defer func() { @@ -301,7 +300,7 @@ func (client DataSetMappingsClient) ListByShareSubscription(ctx context.Context, }() } result.fn = client.listByShareSubscriptionNextResults - req, err := client.ListByShareSubscriptionPreparer(ctx, resourceGroupName, accountName, shareSubscriptionName, skipToken) + req, err := client.ListByShareSubscriptionPreparer(ctx, resourceGroupName, accountName, shareSubscriptionName, skipToken, filter, orderby) if err != nil { err = autorest.NewErrorWithError(err, "datashare.DataSetMappingsClient", "ListByShareSubscription", nil, "Failure preparing request") return @@ -318,12 +317,15 @@ func (client DataSetMappingsClient) ListByShareSubscription(ctx context.Context, if err != nil { err = autorest.NewErrorWithError(err, "datashare.DataSetMappingsClient", "ListByShareSubscription", resp, "Failure responding to request") } + if result.dsml.hasNextLink() && result.dsml.IsEmpty() { + err = result.NextWithContext(ctx) + } return } // ListByShareSubscriptionPreparer prepares the ListByShareSubscription request. -func (client DataSetMappingsClient) ListByShareSubscriptionPreparer(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (*http.Request, error) { +func (client DataSetMappingsClient) ListByShareSubscriptionPreparer(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string, filter string, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -338,6 +340,12 @@ func (client DataSetMappingsClient) ListByShareSubscriptionPreparer(ctx context. if len(skipToken) > 0 { queryParameters["$skipToken"] = autorest.Encode("query", skipToken) } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -358,7 +366,6 @@ func (client DataSetMappingsClient) ListByShareSubscriptionSender(req *http.Requ func (client DataSetMappingsClient) ListByShareSubscriptionResponder(resp *http.Response) (result DataSetMappingList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -388,7 +395,7 @@ func (client DataSetMappingsClient) listByShareSubscriptionNextResults(ctx conte } // ListByShareSubscriptionComplete enumerates all values, automatically crossing page boundaries as required. -func (client DataSetMappingsClient) ListByShareSubscriptionComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result DataSetMappingListIterator, err error) { +func (client DataSetMappingsClient) ListByShareSubscriptionComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string, filter string, orderby string) (result DataSetMappingListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DataSetMappingsClient.ListByShareSubscription") defer func() { @@ -399,6 +406,6 @@ func (client DataSetMappingsClient) ListByShareSubscriptionComplete(ctx context. tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByShareSubscription(ctx, resourceGroupName, accountName, shareSubscriptionName, skipToken) + result.page, err = client.ListByShareSubscription(ctx, resourceGroupName, accountName, shareSubscriptionName, skipToken, filter, orderby) return } diff --git a/services/datashare/mgmt/2019-11-01/datashare/datasets.go b/services/datashare/mgmt/2019-11-01/datashare/datasets.go index 8bd6ae6a6b99..69c8fc59415e 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/datasets.go +++ b/services/datashare/mgmt/2019-11-01/datashare/datasets.go @@ -116,7 +116,6 @@ func (client DataSetsClient) CreateSender(req *http.Request) (*http.Response, er func (client DataSetsClient) CreateResponder(resp *http.Response) (result DataSetModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -196,7 +195,6 @@ func (client DataSetsClient) DeleteSender(req *http.Request) (future DataSetsDel func (client DataSetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -275,7 +273,6 @@ func (client DataSetsClient) GetSender(req *http.Request) (*http.Response, error func (client DataSetsClient) GetResponder(resp *http.Response) (result DataSetModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -289,7 +286,9 @@ func (client DataSetsClient) GetResponder(resp *http.Response) (result DataSetMo // accountName - the name of the share account. // shareName - the name of the share. // skipToken - continuation token -func (client DataSetsClient) ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result DataSetListPage, err error) { +// filter - filters the results using OData syntax. +// orderby - sorts the results using OData syntax. +func (client DataSetsClient) ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (result DataSetListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DataSetsClient.ListByShare") defer func() { @@ -301,7 +300,7 @@ func (client DataSetsClient) ListByShare(ctx context.Context, resourceGroupName }() } result.fn = client.listByShareNextResults - req, err := client.ListBySharePreparer(ctx, resourceGroupName, accountName, shareName, skipToken) + req, err := client.ListBySharePreparer(ctx, resourceGroupName, accountName, shareName, skipToken, filter, orderby) if err != nil { err = autorest.NewErrorWithError(err, "datashare.DataSetsClient", "ListByShare", nil, "Failure preparing request") return @@ -318,12 +317,15 @@ func (client DataSetsClient) ListByShare(ctx context.Context, resourceGroupName if err != nil { err = autorest.NewErrorWithError(err, "datashare.DataSetsClient", "ListByShare", resp, "Failure responding to request") } + if result.dsl.hasNextLink() && result.dsl.IsEmpty() { + err = result.NextWithContext(ctx) + } return } // ListBySharePreparer prepares the ListByShare request. -func (client DataSetsClient) ListBySharePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (*http.Request, error) { +func (client DataSetsClient) ListBySharePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -338,6 +340,12 @@ func (client DataSetsClient) ListBySharePreparer(ctx context.Context, resourceGr if len(skipToken) > 0 { queryParameters["$skipToken"] = autorest.Encode("query", skipToken) } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -358,7 +366,6 @@ func (client DataSetsClient) ListByShareSender(req *http.Request) (*http.Respons func (client DataSetsClient) ListByShareResponder(resp *http.Response) (result DataSetList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -388,7 +395,7 @@ func (client DataSetsClient) listByShareNextResults(ctx context.Context, lastRes } // ListByShareComplete enumerates all values, automatically crossing page boundaries as required. -func (client DataSetsClient) ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result DataSetListIterator, err error) { +func (client DataSetsClient) ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (result DataSetListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DataSetsClient.ListByShare") defer func() { @@ -399,6 +406,6 @@ func (client DataSetsClient) ListByShareComplete(ctx context.Context, resourceGr tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByShare(ctx, resourceGroupName, accountName, shareName, skipToken) + result.page, err = client.ListByShare(ctx, resourceGroupName, accountName, shareName, skipToken, filter, orderby) return } diff --git a/services/datashare/mgmt/2019-11-01/datashare/datashareapi/interfaces.go b/services/datashare/mgmt/2019-11-01/datashare/datashareapi/interfaces.go index b7d296dec725..3fc041fc3a20 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/datashareapi/interfaces.go +++ b/services/datashare/mgmt/2019-11-01/datashare/datashareapi/interfaces.go @@ -52,8 +52,8 @@ type DataSetsClientAPI interface { Create(ctx context.Context, resourceGroupName string, accountName string, shareName string, dataSetName string, dataSet datashare.BasicDataSet) (result datashare.DataSetModel, err error) Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string, dataSetName string) (result datashare.DataSetsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, dataSetName string) (result datashare.DataSetModel, err error) - ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.DataSetListPage, err error) - ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.DataSetListIterator, err error) + ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (result datashare.DataSetListPage, err error) + ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (result datashare.DataSetListIterator, err error) } var _ DataSetsClientAPI = (*datashare.DataSetsClient)(nil) @@ -63,8 +63,8 @@ type DataSetMappingsClientAPI interface { Create(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, dataSetMappingName string, dataSetMapping datashare.BasicDataSetMapping) (result datashare.DataSetMappingModel, err error) Delete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, dataSetMappingName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, dataSetMappingName string) (result datashare.DataSetMappingModel, err error) - ListByShareSubscription(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.DataSetMappingListPage, err error) - ListByShareSubscriptionComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.DataSetMappingListIterator, err error) + ListByShareSubscription(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string, filter string, orderby string) (result datashare.DataSetMappingListPage, err error) + ListByShareSubscriptionComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string, filter string, orderby string) (result datashare.DataSetMappingListIterator, err error) } var _ DataSetMappingsClientAPI = (*datashare.DataSetMappingsClient)(nil) @@ -74,8 +74,8 @@ type InvitationsClientAPI interface { Create(ctx context.Context, resourceGroupName string, accountName string, shareName string, invitationName string, invitation datashare.Invitation) (result datashare.Invitation, err error) Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string, invitationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, invitationName string) (result datashare.Invitation, err error) - ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.InvitationListPage, err error) - ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.InvitationListIterator, err error) + ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (result datashare.InvitationListPage, err error) + ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (result datashare.InvitationListIterator, err error) } var _ InvitationsClientAPI = (*datashare.InvitationsClient)(nil) @@ -93,12 +93,12 @@ type SharesClientAPI interface { Create(ctx context.Context, resourceGroupName string, accountName string, shareName string, share datashare.Share) (result datashare.Share, err error) Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string) (result datashare.SharesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string) (result datashare.Share, err error) - ListByAccount(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result datashare.ShareListPage, err error) - ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result datashare.ShareListIterator, err error) - ListSynchronizationDetails(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization datashare.ShareSynchronization, skipToken string) (result datashare.SynchronizationDetailsListPage, err error) - ListSynchronizationDetailsComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization datashare.ShareSynchronization, skipToken string) (result datashare.SynchronizationDetailsListIterator, err error) - ListSynchronizations(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.ShareSynchronizationListPage, err error) - ListSynchronizationsComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.ShareSynchronizationListIterator, err error) + ListByAccount(ctx context.Context, resourceGroupName string, accountName string, skipToken string, filter string, orderby string) (result datashare.ShareListPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string, filter string, orderby string) (result datashare.ShareListIterator, err error) + ListSynchronizationDetails(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization datashare.ShareSynchronization, skipToken string, filter string, orderby string) (result datashare.SynchronizationDetailsListPage, err error) + ListSynchronizationDetailsComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization datashare.ShareSynchronization, skipToken string, filter string, orderby string) (result datashare.SynchronizationDetailsListIterator, err error) + ListSynchronizations(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (result datashare.ShareSynchronizationListPage, err error) + ListSynchronizationsComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (result datashare.ShareSynchronizationListIterator, err error) } var _ SharesClientAPI = (*datashare.SharesClient)(nil) @@ -120,14 +120,14 @@ type ShareSubscriptionsClientAPI interface { Create(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscription datashare.ShareSubscription) (result datashare.ShareSubscription, err error) Delete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string) (result datashare.ShareSubscriptionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string) (result datashare.ShareSubscription, err error) - ListByAccount(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result datashare.ShareSubscriptionListPage, err error) - ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result datashare.ShareSubscriptionListIterator, err error) + ListByAccount(ctx context.Context, resourceGroupName string, accountName string, skipToken string, filter string, orderby string) (result datashare.ShareSubscriptionListPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string, filter string, orderby string) (result datashare.ShareSubscriptionListIterator, err error) ListSourceShareSynchronizationSettings(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.SourceShareSynchronizationSettingListPage, err error) ListSourceShareSynchronizationSettingsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.SourceShareSynchronizationSettingListIterator, err error) - ListSynchronizationDetails(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization datashare.ShareSubscriptionSynchronization, skipToken string) (result datashare.SynchronizationDetailsListPage, err error) - ListSynchronizationDetailsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization datashare.ShareSubscriptionSynchronization, skipToken string) (result datashare.SynchronizationDetailsListIterator, err error) - ListSynchronizations(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.ShareSubscriptionSynchronizationListPage, err error) - ListSynchronizationsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.ShareSubscriptionSynchronizationListIterator, err error) + ListSynchronizationDetails(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization datashare.ShareSubscriptionSynchronization, skipToken string, filter string, orderby string) (result datashare.SynchronizationDetailsListPage, err error) + ListSynchronizationDetailsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization datashare.ShareSubscriptionSynchronization, skipToken string, filter string, orderby string) (result datashare.SynchronizationDetailsListIterator, err error) + ListSynchronizations(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string, filter string, orderby string) (result datashare.ShareSubscriptionSynchronizationListPage, err error) + ListSynchronizationsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string, filter string, orderby string) (result datashare.ShareSubscriptionSynchronizationListIterator, err error) SynchronizeMethod(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, synchronize datashare.Synchronize) (result datashare.ShareSubscriptionsSynchronizeMethodFuture, err error) } diff --git a/services/datashare/mgmt/2019-11-01/datashare/enums.go b/services/datashare/mgmt/2019-11-01/datashare/enums.go new file mode 100644 index 000000000000..9fc46c581f15 --- /dev/null +++ b/services/datashare/mgmt/2019-11-01/datashare/enums.go @@ -0,0 +1,356 @@ +package datashare + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// DataSetMappingStatus enumerates the values for data set mapping status. +type DataSetMappingStatus string + +const ( + // Broken ... + Broken DataSetMappingStatus = "Broken" + // Ok ... + Ok DataSetMappingStatus = "Ok" +) + +// PossibleDataSetMappingStatusValues returns an array of possible values for the DataSetMappingStatus const type. +func PossibleDataSetMappingStatusValues() []DataSetMappingStatus { + return []DataSetMappingStatus{Broken, Ok} +} + +// DataSetType enumerates the values for data set type. +type DataSetType string + +const ( + // AdlsGen1File ... + AdlsGen1File DataSetType = "AdlsGen1File" + // AdlsGen1Folder ... + AdlsGen1Folder DataSetType = "AdlsGen1Folder" + // AdlsGen2File ... + AdlsGen2File DataSetType = "AdlsGen2File" + // AdlsGen2FileSystem ... + AdlsGen2FileSystem DataSetType = "AdlsGen2FileSystem" + // AdlsGen2Folder ... + AdlsGen2Folder DataSetType = "AdlsGen2Folder" + // Blob ... + Blob DataSetType = "Blob" + // BlobFolder ... + BlobFolder DataSetType = "BlobFolder" + // Container ... + Container DataSetType = "Container" + // KustoCluster ... + KustoCluster DataSetType = "KustoCluster" + // KustoDatabase ... + KustoDatabase DataSetType = "KustoDatabase" + // SQLDBTable ... + SQLDBTable DataSetType = "SqlDBTable" + // SQLDWTable ... + SQLDWTable DataSetType = "SqlDWTable" +) + +// PossibleDataSetTypeValues returns an array of possible values for the DataSetType const type. +func PossibleDataSetTypeValues() []DataSetType { + return []DataSetType{AdlsGen1File, AdlsGen1Folder, AdlsGen2File, AdlsGen2FileSystem, AdlsGen2Folder, Blob, BlobFolder, Container, KustoCluster, KustoDatabase, SQLDBTable, SQLDWTable} +} + +// InvitationStatus enumerates the values for invitation status. +type InvitationStatus string + +const ( + // Accepted ... + Accepted InvitationStatus = "Accepted" + // Pending ... + Pending InvitationStatus = "Pending" + // Rejected ... + Rejected InvitationStatus = "Rejected" + // Withdrawn ... + Withdrawn InvitationStatus = "Withdrawn" +) + +// PossibleInvitationStatusValues returns an array of possible values for the InvitationStatus const type. +func PossibleInvitationStatusValues() []InvitationStatus { + return []InvitationStatus{Accepted, Pending, Rejected, Withdrawn} +} + +// Kind enumerates the values for kind. +type Kind string + +const ( + // KindAdlsGen1File ... + KindAdlsGen1File Kind = "AdlsGen1File" + // KindAdlsGen1Folder ... + KindAdlsGen1Folder Kind = "AdlsGen1Folder" + // KindAdlsGen2File ... + KindAdlsGen2File Kind = "AdlsGen2File" + // KindAdlsGen2FileSystem ... + KindAdlsGen2FileSystem Kind = "AdlsGen2FileSystem" + // KindAdlsGen2Folder ... + KindAdlsGen2Folder Kind = "AdlsGen2Folder" + // KindBlob ... + KindBlob Kind = "Blob" + // KindBlobFolder ... + KindBlobFolder Kind = "BlobFolder" + // KindContainer ... + KindContainer Kind = "Container" + // KindDataSet ... + KindDataSet Kind = "DataSet" + // KindKustoCluster ... + KindKustoCluster Kind = "KustoCluster" + // KindKustoDatabase ... + KindKustoDatabase Kind = "KustoDatabase" + // KindSQLDBTable ... + KindSQLDBTable Kind = "SqlDBTable" + // KindSQLDWTable ... + KindSQLDWTable Kind = "SqlDWTable" +) + +// PossibleKindValues returns an array of possible values for the Kind const type. +func PossibleKindValues() []Kind { + return []Kind{KindAdlsGen1File, KindAdlsGen1Folder, KindAdlsGen2File, KindAdlsGen2FileSystem, KindAdlsGen2Folder, KindBlob, KindBlobFolder, KindContainer, KindDataSet, KindKustoCluster, KindKustoDatabase, KindSQLDBTable, KindSQLDWTable} +} + +// KindBasicDataSetMapping enumerates the values for kind basic data set mapping. +type KindBasicDataSetMapping string + +const ( + // KindBasicDataSetMappingKindAdlsGen2File ... + KindBasicDataSetMappingKindAdlsGen2File KindBasicDataSetMapping = "AdlsGen2File" + // KindBasicDataSetMappingKindAdlsGen2FileSystem ... + KindBasicDataSetMappingKindAdlsGen2FileSystem KindBasicDataSetMapping = "AdlsGen2FileSystem" + // KindBasicDataSetMappingKindAdlsGen2Folder ... + KindBasicDataSetMappingKindAdlsGen2Folder KindBasicDataSetMapping = "AdlsGen2Folder" + // KindBasicDataSetMappingKindBlob ... + KindBasicDataSetMappingKindBlob KindBasicDataSetMapping = "Blob" + // KindBasicDataSetMappingKindBlobFolder ... + KindBasicDataSetMappingKindBlobFolder KindBasicDataSetMapping = "BlobFolder" + // KindBasicDataSetMappingKindContainer ... + KindBasicDataSetMappingKindContainer KindBasicDataSetMapping = "Container" + // KindBasicDataSetMappingKindDataSetMapping ... + KindBasicDataSetMappingKindDataSetMapping KindBasicDataSetMapping = "DataSetMapping" + // KindBasicDataSetMappingKindKustoCluster ... + KindBasicDataSetMappingKindKustoCluster KindBasicDataSetMapping = "KustoCluster" + // KindBasicDataSetMappingKindKustoDatabase ... + KindBasicDataSetMappingKindKustoDatabase KindBasicDataSetMapping = "KustoDatabase" + // KindBasicDataSetMappingKindSQLDBTable ... + KindBasicDataSetMappingKindSQLDBTable KindBasicDataSetMapping = "SqlDBTable" + // KindBasicDataSetMappingKindSQLDWTable ... + KindBasicDataSetMappingKindSQLDWTable KindBasicDataSetMapping = "SqlDWTable" +) + +// PossibleKindBasicDataSetMappingValues returns an array of possible values for the KindBasicDataSetMapping const type. +func PossibleKindBasicDataSetMappingValues() []KindBasicDataSetMapping { + return []KindBasicDataSetMapping{KindBasicDataSetMappingKindAdlsGen2File, KindBasicDataSetMappingKindAdlsGen2FileSystem, KindBasicDataSetMappingKindAdlsGen2Folder, KindBasicDataSetMappingKindBlob, KindBasicDataSetMappingKindBlobFolder, KindBasicDataSetMappingKindContainer, KindBasicDataSetMappingKindDataSetMapping, KindBasicDataSetMappingKindKustoCluster, KindBasicDataSetMappingKindKustoDatabase, KindBasicDataSetMappingKindSQLDBTable, KindBasicDataSetMappingKindSQLDWTable} +} + +// KindBasicSourceShareSynchronizationSetting enumerates the values for kind basic source share synchronization +// setting. +type KindBasicSourceShareSynchronizationSetting string + +const ( + // KindScheduleBased ... + KindScheduleBased KindBasicSourceShareSynchronizationSetting = "ScheduleBased" + // KindSourceShareSynchronizationSetting ... + KindSourceShareSynchronizationSetting KindBasicSourceShareSynchronizationSetting = "SourceShareSynchronizationSetting" +) + +// PossibleKindBasicSourceShareSynchronizationSettingValues returns an array of possible values for the KindBasicSourceShareSynchronizationSetting const type. +func PossibleKindBasicSourceShareSynchronizationSettingValues() []KindBasicSourceShareSynchronizationSetting { + return []KindBasicSourceShareSynchronizationSetting{KindScheduleBased, KindSourceShareSynchronizationSetting} +} + +// KindBasicSynchronizationSetting enumerates the values for kind basic synchronization setting. +type KindBasicSynchronizationSetting string + +const ( + // KindBasicSynchronizationSettingKindScheduleBased ... + KindBasicSynchronizationSettingKindScheduleBased KindBasicSynchronizationSetting = "ScheduleBased" + // KindBasicSynchronizationSettingKindSynchronizationSetting ... + KindBasicSynchronizationSettingKindSynchronizationSetting KindBasicSynchronizationSetting = "SynchronizationSetting" +) + +// PossibleKindBasicSynchronizationSettingValues returns an array of possible values for the KindBasicSynchronizationSetting const type. +func PossibleKindBasicSynchronizationSettingValues() []KindBasicSynchronizationSetting { + return []KindBasicSynchronizationSetting{KindBasicSynchronizationSettingKindScheduleBased, KindBasicSynchronizationSettingKindSynchronizationSetting} +} + +// KindBasicTrigger enumerates the values for kind basic trigger. +type KindBasicTrigger string + +const ( + // KindBasicTriggerKindScheduleBased ... + KindBasicTriggerKindScheduleBased KindBasicTrigger = "ScheduleBased" + // KindBasicTriggerKindTrigger ... + KindBasicTriggerKindTrigger KindBasicTrigger = "Trigger" +) + +// PossibleKindBasicTriggerValues returns an array of possible values for the KindBasicTrigger const type. +func PossibleKindBasicTriggerValues() []KindBasicTrigger { + return []KindBasicTrigger{KindBasicTriggerKindScheduleBased, KindBasicTriggerKindTrigger} +} + +// OutputType enumerates the values for output type. +type OutputType string + +const ( + // Csv ... + Csv OutputType = "Csv" + // Parquet ... + Parquet OutputType = "Parquet" +) + +// PossibleOutputTypeValues returns an array of possible values for the OutputType const type. +func PossibleOutputTypeValues() []OutputType { + return []OutputType{Csv, Parquet} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // Creating ... + Creating ProvisioningState = "Creating" + // Deleting ... + Deleting ProvisioningState = "Deleting" + // Failed ... + Failed ProvisioningState = "Failed" + // Moving ... + Moving ProvisioningState = "Moving" + // Succeeded ... + Succeeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{Creating, Deleting, Failed, Moving, Succeeded} +} + +// RecurrenceInterval enumerates the values for recurrence interval. +type RecurrenceInterval string + +const ( + // Day ... + Day RecurrenceInterval = "Day" + // Hour ... + Hour RecurrenceInterval = "Hour" +) + +// PossibleRecurrenceIntervalValues returns an array of possible values for the RecurrenceInterval const type. +func PossibleRecurrenceIntervalValues() []RecurrenceInterval { + return []RecurrenceInterval{Day, Hour} +} + +// ShareKind enumerates the values for share kind. +type ShareKind string + +const ( + // CopyBased ... + CopyBased ShareKind = "CopyBased" + // InPlace ... + InPlace ShareKind = "InPlace" +) + +// PossibleShareKindValues returns an array of possible values for the ShareKind const type. +func PossibleShareKindValues() []ShareKind { + return []ShareKind{CopyBased, InPlace} +} + +// ShareSubscriptionStatus enumerates the values for share subscription status. +type ShareSubscriptionStatus string + +const ( + // Active ... + Active ShareSubscriptionStatus = "Active" + // Revoked ... + Revoked ShareSubscriptionStatus = "Revoked" + // Revoking ... + Revoking ShareSubscriptionStatus = "Revoking" + // SourceDeleted ... + SourceDeleted ShareSubscriptionStatus = "SourceDeleted" +) + +// PossibleShareSubscriptionStatusValues returns an array of possible values for the ShareSubscriptionStatus const type. +func PossibleShareSubscriptionStatusValues() []ShareSubscriptionStatus { + return []ShareSubscriptionStatus{Active, Revoked, Revoking, SourceDeleted} +} + +// Status enumerates the values for status. +type Status string + +const ( + // StatusAccepted ... + StatusAccepted Status = "Accepted" + // StatusCanceled ... + StatusCanceled Status = "Canceled" + // StatusFailed ... + StatusFailed Status = "Failed" + // StatusInProgress ... + StatusInProgress Status = "InProgress" + // StatusSucceeded ... + StatusSucceeded Status = "Succeeded" + // StatusTransientFailure ... + StatusTransientFailure Status = "TransientFailure" +) + +// PossibleStatusValues returns an array of possible values for the Status const type. +func PossibleStatusValues() []Status { + return []Status{StatusAccepted, StatusCanceled, StatusFailed, StatusInProgress, StatusSucceeded, StatusTransientFailure} +} + +// SynchronizationMode enumerates the values for synchronization mode. +type SynchronizationMode string + +const ( + // FullSync ... + FullSync SynchronizationMode = "FullSync" + // Incremental ... + Incremental SynchronizationMode = "Incremental" +) + +// PossibleSynchronizationModeValues returns an array of possible values for the SynchronizationMode const type. +func PossibleSynchronizationModeValues() []SynchronizationMode { + return []SynchronizationMode{FullSync, Incremental} +} + +// TriggerStatus enumerates the values for trigger status. +type TriggerStatus string + +const ( + // TriggerStatusActive ... + TriggerStatusActive TriggerStatus = "Active" + // TriggerStatusInactive ... + TriggerStatusInactive TriggerStatus = "Inactive" + // TriggerStatusSourceSynchronizationSettingDeleted ... + TriggerStatusSourceSynchronizationSettingDeleted TriggerStatus = "SourceSynchronizationSettingDeleted" +) + +// PossibleTriggerStatusValues returns an array of possible values for the TriggerStatus const type. +func PossibleTriggerStatusValues() []TriggerStatus { + return []TriggerStatus{TriggerStatusActive, TriggerStatusInactive, TriggerStatusSourceSynchronizationSettingDeleted} +} + +// Type enumerates the values for type. +type Type string + +const ( + // SystemAssigned ... + SystemAssigned Type = "SystemAssigned" +) + +// PossibleTypeValues returns an array of possible values for the Type const type. +func PossibleTypeValues() []Type { + return []Type{SystemAssigned} +} diff --git a/services/datashare/mgmt/2019-11-01/datashare/invitations.go b/services/datashare/mgmt/2019-11-01/datashare/invitations.go index 1482860b3e97..b7be37b7ac4b 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/invitations.go +++ b/services/datashare/mgmt/2019-11-01/datashare/invitations.go @@ -116,7 +116,6 @@ func (client InvitationsClient) CreateSender(req *http.Request) (*http.Response, func (client InvitationsClient) CreateResponder(resp *http.Response) (result Invitation, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -196,7 +195,6 @@ func (client InvitationsClient) DeleteSender(req *http.Request) (*http.Response, func (client InvitationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -275,7 +273,6 @@ func (client InvitationsClient) GetSender(req *http.Request) (*http.Response, er func (client InvitationsClient) GetResponder(resp *http.Response) (result Invitation, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -289,7 +286,9 @@ func (client InvitationsClient) GetResponder(resp *http.Response) (result Invita // accountName - the name of the share account. // shareName - the name of the share. // skipToken - the continuation token -func (client InvitationsClient) ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result InvitationListPage, err error) { +// filter - filters the results using OData syntax. +// orderby - sorts the results using OData syntax. +func (client InvitationsClient) ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (result InvitationListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/InvitationsClient.ListByShare") defer func() { @@ -301,7 +300,7 @@ func (client InvitationsClient) ListByShare(ctx context.Context, resourceGroupNa }() } result.fn = client.listByShareNextResults - req, err := client.ListBySharePreparer(ctx, resourceGroupName, accountName, shareName, skipToken) + req, err := client.ListBySharePreparer(ctx, resourceGroupName, accountName, shareName, skipToken, filter, orderby) if err != nil { err = autorest.NewErrorWithError(err, "datashare.InvitationsClient", "ListByShare", nil, "Failure preparing request") return @@ -318,12 +317,15 @@ func (client InvitationsClient) ListByShare(ctx context.Context, resourceGroupNa if err != nil { err = autorest.NewErrorWithError(err, "datashare.InvitationsClient", "ListByShare", resp, "Failure responding to request") } + if result.il.hasNextLink() && result.il.IsEmpty() { + err = result.NextWithContext(ctx) + } return } // ListBySharePreparer prepares the ListByShare request. -func (client InvitationsClient) ListBySharePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (*http.Request, error) { +func (client InvitationsClient) ListBySharePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -338,6 +340,12 @@ func (client InvitationsClient) ListBySharePreparer(ctx context.Context, resourc if len(skipToken) > 0 { queryParameters["$skipToken"] = autorest.Encode("query", skipToken) } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -358,7 +366,6 @@ func (client InvitationsClient) ListByShareSender(req *http.Request) (*http.Resp func (client InvitationsClient) ListByShareResponder(resp *http.Response) (result InvitationList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -388,7 +395,7 @@ func (client InvitationsClient) listByShareNextResults(ctx context.Context, last } // ListByShareComplete enumerates all values, automatically crossing page boundaries as required. -func (client InvitationsClient) ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result InvitationListIterator, err error) { +func (client InvitationsClient) ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (result InvitationListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/InvitationsClient.ListByShare") defer func() { @@ -399,6 +406,6 @@ func (client InvitationsClient) ListByShareComplete(ctx context.Context, resourc tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByShare(ctx, resourceGroupName, accountName, shareName, skipToken) + result.page, err = client.ListByShare(ctx, resourceGroupName, accountName, shareName, skipToken, filter, orderby) return } diff --git a/services/datashare/mgmt/2019-11-01/datashare/models.go b/services/datashare/mgmt/2019-11-01/datashare/models.go index 635c9959b48d..073f171816a4 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/models.go +++ b/services/datashare/mgmt/2019-11-01/datashare/models.go @@ -31,344 +31,6 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/datashare/mgmt/2019-11-01/datashare" -// DataSetMappingStatus enumerates the values for data set mapping status. -type DataSetMappingStatus string - -const ( - // Broken ... - Broken DataSetMappingStatus = "Broken" - // Ok ... - Ok DataSetMappingStatus = "Ok" -) - -// PossibleDataSetMappingStatusValues returns an array of possible values for the DataSetMappingStatus const type. -func PossibleDataSetMappingStatusValues() []DataSetMappingStatus { - return []DataSetMappingStatus{Broken, Ok} -} - -// DataSetType enumerates the values for data set type. -type DataSetType string - -const ( - // AdlsGen1File ... - AdlsGen1File DataSetType = "AdlsGen1File" - // AdlsGen1Folder ... - AdlsGen1Folder DataSetType = "AdlsGen1Folder" - // AdlsGen2File ... - AdlsGen2File DataSetType = "AdlsGen2File" - // AdlsGen2FileSystem ... - AdlsGen2FileSystem DataSetType = "AdlsGen2FileSystem" - // AdlsGen2Folder ... - AdlsGen2Folder DataSetType = "AdlsGen2Folder" - // Blob ... - Blob DataSetType = "Blob" - // BlobFolder ... - BlobFolder DataSetType = "BlobFolder" - // Container ... - Container DataSetType = "Container" - // KustoCluster ... - KustoCluster DataSetType = "KustoCluster" - // KustoDatabase ... - KustoDatabase DataSetType = "KustoDatabase" - // SQLDBTable ... - SQLDBTable DataSetType = "SqlDBTable" - // SQLDWTable ... - SQLDWTable DataSetType = "SqlDWTable" -) - -// PossibleDataSetTypeValues returns an array of possible values for the DataSetType const type. -func PossibleDataSetTypeValues() []DataSetType { - return []DataSetType{AdlsGen1File, AdlsGen1Folder, AdlsGen2File, AdlsGen2FileSystem, AdlsGen2Folder, Blob, BlobFolder, Container, KustoCluster, KustoDatabase, SQLDBTable, SQLDWTable} -} - -// InvitationStatus enumerates the values for invitation status. -type InvitationStatus string - -const ( - // Accepted ... - Accepted InvitationStatus = "Accepted" - // Pending ... - Pending InvitationStatus = "Pending" - // Rejected ... - Rejected InvitationStatus = "Rejected" - // Withdrawn ... - Withdrawn InvitationStatus = "Withdrawn" -) - -// PossibleInvitationStatusValues returns an array of possible values for the InvitationStatus const type. -func PossibleInvitationStatusValues() []InvitationStatus { - return []InvitationStatus{Accepted, Pending, Rejected, Withdrawn} -} - -// Kind enumerates the values for kind. -type Kind string - -const ( - // KindAdlsGen1File ... - KindAdlsGen1File Kind = "AdlsGen1File" - // KindAdlsGen1Folder ... - KindAdlsGen1Folder Kind = "AdlsGen1Folder" - // KindAdlsGen2File ... - KindAdlsGen2File Kind = "AdlsGen2File" - // KindAdlsGen2FileSystem ... - KindAdlsGen2FileSystem Kind = "AdlsGen2FileSystem" - // KindAdlsGen2Folder ... - KindAdlsGen2Folder Kind = "AdlsGen2Folder" - // KindBlob ... - KindBlob Kind = "Blob" - // KindBlobFolder ... - KindBlobFolder Kind = "BlobFolder" - // KindContainer ... - KindContainer Kind = "Container" - // KindDataSet ... - KindDataSet Kind = "DataSet" - // KindKustoCluster ... - KindKustoCluster Kind = "KustoCluster" - // KindKustoDatabase ... - KindKustoDatabase Kind = "KustoDatabase" - // KindSQLDBTable ... - KindSQLDBTable Kind = "SqlDBTable" - // KindSQLDWTable ... - KindSQLDWTable Kind = "SqlDWTable" -) - -// PossibleKindValues returns an array of possible values for the Kind const type. -func PossibleKindValues() []Kind { - return []Kind{KindAdlsGen1File, KindAdlsGen1Folder, KindAdlsGen2File, KindAdlsGen2FileSystem, KindAdlsGen2Folder, KindBlob, KindBlobFolder, KindContainer, KindDataSet, KindKustoCluster, KindKustoDatabase, KindSQLDBTable, KindSQLDWTable} -} - -// KindBasicDataSetMapping enumerates the values for kind basic data set mapping. -type KindBasicDataSetMapping string - -const ( - // KindBasicDataSetMappingKindAdlsGen2File ... - KindBasicDataSetMappingKindAdlsGen2File KindBasicDataSetMapping = "AdlsGen2File" - // KindBasicDataSetMappingKindAdlsGen2FileSystem ... - KindBasicDataSetMappingKindAdlsGen2FileSystem KindBasicDataSetMapping = "AdlsGen2FileSystem" - // KindBasicDataSetMappingKindAdlsGen2Folder ... - KindBasicDataSetMappingKindAdlsGen2Folder KindBasicDataSetMapping = "AdlsGen2Folder" - // KindBasicDataSetMappingKindBlob ... - KindBasicDataSetMappingKindBlob KindBasicDataSetMapping = "Blob" - // KindBasicDataSetMappingKindBlobFolder ... - KindBasicDataSetMappingKindBlobFolder KindBasicDataSetMapping = "BlobFolder" - // KindBasicDataSetMappingKindContainer ... - KindBasicDataSetMappingKindContainer KindBasicDataSetMapping = "Container" - // KindBasicDataSetMappingKindDataSetMapping ... - KindBasicDataSetMappingKindDataSetMapping KindBasicDataSetMapping = "DataSetMapping" - // KindBasicDataSetMappingKindKustoCluster ... - KindBasicDataSetMappingKindKustoCluster KindBasicDataSetMapping = "KustoCluster" - // KindBasicDataSetMappingKindKustoDatabase ... - KindBasicDataSetMappingKindKustoDatabase KindBasicDataSetMapping = "KustoDatabase" - // KindBasicDataSetMappingKindSQLDBTable ... - KindBasicDataSetMappingKindSQLDBTable KindBasicDataSetMapping = "SqlDBTable" - // KindBasicDataSetMappingKindSQLDWTable ... - KindBasicDataSetMappingKindSQLDWTable KindBasicDataSetMapping = "SqlDWTable" -) - -// PossibleKindBasicDataSetMappingValues returns an array of possible values for the KindBasicDataSetMapping const type. -func PossibleKindBasicDataSetMappingValues() []KindBasicDataSetMapping { - return []KindBasicDataSetMapping{KindBasicDataSetMappingKindAdlsGen2File, KindBasicDataSetMappingKindAdlsGen2FileSystem, KindBasicDataSetMappingKindAdlsGen2Folder, KindBasicDataSetMappingKindBlob, KindBasicDataSetMappingKindBlobFolder, KindBasicDataSetMappingKindContainer, KindBasicDataSetMappingKindDataSetMapping, KindBasicDataSetMappingKindKustoCluster, KindBasicDataSetMappingKindKustoDatabase, KindBasicDataSetMappingKindSQLDBTable, KindBasicDataSetMappingKindSQLDWTable} -} - -// KindBasicSourceShareSynchronizationSetting enumerates the values for kind basic source share synchronization -// setting. -type KindBasicSourceShareSynchronizationSetting string - -const ( - // KindScheduleBased ... - KindScheduleBased KindBasicSourceShareSynchronizationSetting = "ScheduleBased" - // KindSourceShareSynchronizationSetting ... - KindSourceShareSynchronizationSetting KindBasicSourceShareSynchronizationSetting = "SourceShareSynchronizationSetting" -) - -// PossibleKindBasicSourceShareSynchronizationSettingValues returns an array of possible values for the KindBasicSourceShareSynchronizationSetting const type. -func PossibleKindBasicSourceShareSynchronizationSettingValues() []KindBasicSourceShareSynchronizationSetting { - return []KindBasicSourceShareSynchronizationSetting{KindScheduleBased, KindSourceShareSynchronizationSetting} -} - -// KindBasicSynchronizationSetting enumerates the values for kind basic synchronization setting. -type KindBasicSynchronizationSetting string - -const ( - // KindBasicSynchronizationSettingKindScheduleBased ... - KindBasicSynchronizationSettingKindScheduleBased KindBasicSynchronizationSetting = "ScheduleBased" - // KindBasicSynchronizationSettingKindSynchronizationSetting ... - KindBasicSynchronizationSettingKindSynchronizationSetting KindBasicSynchronizationSetting = "SynchronizationSetting" -) - -// PossibleKindBasicSynchronizationSettingValues returns an array of possible values for the KindBasicSynchronizationSetting const type. -func PossibleKindBasicSynchronizationSettingValues() []KindBasicSynchronizationSetting { - return []KindBasicSynchronizationSetting{KindBasicSynchronizationSettingKindScheduleBased, KindBasicSynchronizationSettingKindSynchronizationSetting} -} - -// KindBasicTrigger enumerates the values for kind basic trigger. -type KindBasicTrigger string - -const ( - // KindBasicTriggerKindScheduleBased ... - KindBasicTriggerKindScheduleBased KindBasicTrigger = "ScheduleBased" - // KindBasicTriggerKindTrigger ... - KindBasicTriggerKindTrigger KindBasicTrigger = "Trigger" -) - -// PossibleKindBasicTriggerValues returns an array of possible values for the KindBasicTrigger const type. -func PossibleKindBasicTriggerValues() []KindBasicTrigger { - return []KindBasicTrigger{KindBasicTriggerKindScheduleBased, KindBasicTriggerKindTrigger} -} - -// OutputType enumerates the values for output type. -type OutputType string - -const ( - // Csv ... - Csv OutputType = "Csv" - // Parquet ... - Parquet OutputType = "Parquet" -) - -// PossibleOutputTypeValues returns an array of possible values for the OutputType const type. -func PossibleOutputTypeValues() []OutputType { - return []OutputType{Csv, Parquet} -} - -// ProvisioningState enumerates the values for provisioning state. -type ProvisioningState string - -const ( - // Creating ... - Creating ProvisioningState = "Creating" - // Deleting ... - Deleting ProvisioningState = "Deleting" - // Failed ... - Failed ProvisioningState = "Failed" - // Moving ... - Moving ProvisioningState = "Moving" - // Succeeded ... - Succeeded ProvisioningState = "Succeeded" -) - -// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{Creating, Deleting, Failed, Moving, Succeeded} -} - -// RecurrenceInterval enumerates the values for recurrence interval. -type RecurrenceInterval string - -const ( - // Day ... - Day RecurrenceInterval = "Day" - // Hour ... - Hour RecurrenceInterval = "Hour" -) - -// PossibleRecurrenceIntervalValues returns an array of possible values for the RecurrenceInterval const type. -func PossibleRecurrenceIntervalValues() []RecurrenceInterval { - return []RecurrenceInterval{Day, Hour} -} - -// ShareKind enumerates the values for share kind. -type ShareKind string - -const ( - // CopyBased ... - CopyBased ShareKind = "CopyBased" - // InPlace ... - InPlace ShareKind = "InPlace" -) - -// PossibleShareKindValues returns an array of possible values for the ShareKind const type. -func PossibleShareKindValues() []ShareKind { - return []ShareKind{CopyBased, InPlace} -} - -// ShareSubscriptionStatus enumerates the values for share subscription status. -type ShareSubscriptionStatus string - -const ( - // Active ... - Active ShareSubscriptionStatus = "Active" - // Revoked ... - Revoked ShareSubscriptionStatus = "Revoked" - // Revoking ... - Revoking ShareSubscriptionStatus = "Revoking" - // SourceDeleted ... - SourceDeleted ShareSubscriptionStatus = "SourceDeleted" -) - -// PossibleShareSubscriptionStatusValues returns an array of possible values for the ShareSubscriptionStatus const type. -func PossibleShareSubscriptionStatusValues() []ShareSubscriptionStatus { - return []ShareSubscriptionStatus{Active, Revoked, Revoking, SourceDeleted} -} - -// Status enumerates the values for status. -type Status string - -const ( - // StatusAccepted ... - StatusAccepted Status = "Accepted" - // StatusCanceled ... - StatusCanceled Status = "Canceled" - // StatusFailed ... - StatusFailed Status = "Failed" - // StatusInProgress ... - StatusInProgress Status = "InProgress" - // StatusSucceeded ... - StatusSucceeded Status = "Succeeded" - // StatusTransientFailure ... - StatusTransientFailure Status = "TransientFailure" -) - -// PossibleStatusValues returns an array of possible values for the Status const type. -func PossibleStatusValues() []Status { - return []Status{StatusAccepted, StatusCanceled, StatusFailed, StatusInProgress, StatusSucceeded, StatusTransientFailure} -} - -// SynchronizationMode enumerates the values for synchronization mode. -type SynchronizationMode string - -const ( - // FullSync ... - FullSync SynchronizationMode = "FullSync" - // Incremental ... - Incremental SynchronizationMode = "Incremental" -) - -// PossibleSynchronizationModeValues returns an array of possible values for the SynchronizationMode const type. -func PossibleSynchronizationModeValues() []SynchronizationMode { - return []SynchronizationMode{FullSync, Incremental} -} - -// TriggerStatus enumerates the values for trigger status. -type TriggerStatus string - -const ( - // TriggerStatusActive ... - TriggerStatusActive TriggerStatus = "Active" - // TriggerStatusInactive ... - TriggerStatusInactive TriggerStatus = "Inactive" - // TriggerStatusSourceSynchronizationSettingDeleted ... - TriggerStatusSourceSynchronizationSettingDeleted TriggerStatus = "SourceSynchronizationSettingDeleted" -) - -// PossibleTriggerStatusValues returns an array of possible values for the TriggerStatus const type. -func PossibleTriggerStatusValues() []TriggerStatus { - return []TriggerStatus{TriggerStatusActive, TriggerStatusInactive, TriggerStatusSourceSynchronizationSettingDeleted} -} - -// Type enumerates the values for type. -type Type string - -const ( - // SystemAssigned ... - SystemAssigned Type = "SystemAssigned" -) - -// PossibleTypeValues returns an array of possible values for the Type const type. -func PossibleTypeValues() []Type { - return []Type{SystemAssigned} -} - // Account an account data transfer object. type Account struct { autorest.Response `json:"-"` @@ -561,10 +223,15 @@ func (al AccountList) IsEmpty() bool { return al.Value == nil || len(*al.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (al AccountList) hasNextLink() bool { + return al.NextLink != nil && len(*al.NextLink) != 0 +} + // accountListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (al AccountList) accountListPreparer(ctx context.Context) (*http.Request, error) { - if al.NextLink == nil || len(to.String(al.NextLink)) < 1 { + if !al.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -592,11 +259,16 @@ func (page *AccountListPage) NextWithContext(ctx context.Context) (err error) { tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.al) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.al) + if err != nil { + return err + } + page.al = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.al = next return nil } @@ -642,8 +314,13 @@ type AccountProperties struct { UserName *string `json:"userName,omitempty"` } -// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// MarshalJSON is the custom marshaler for AccountProperties. +func (ap AccountProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// AccountsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type AccountsCreateFuture struct { azure.Future } @@ -671,8 +348,7 @@ func (future *AccountsCreateFuture) Result(client AccountsClient) (a Account, er return } -// AccountsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// AccountsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. type AccountsDeleteFuture struct { azure.Future } @@ -888,6 +564,27 @@ type ADLSGen1FileProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for ADLSGen1FileProperties. +func (ag1fp ADLSGen1FileProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ag1fp.AccountName != nil { + objectMap["accountName"] = ag1fp.AccountName + } + if ag1fp.FileName != nil { + objectMap["fileName"] = ag1fp.FileName + } + if ag1fp.FolderPath != nil { + objectMap["folderPath"] = ag1fp.FolderPath + } + if ag1fp.ResourceGroup != nil { + objectMap["resourceGroup"] = ag1fp.ResourceGroup + } + if ag1fp.SubscriptionID != nil { + objectMap["subscriptionId"] = ag1fp.SubscriptionID + } + return json.Marshal(objectMap) +} + // ADLSGen1FolderDataSet an ADLS Gen 1 folder data set. type ADLSGen1FolderDataSet struct { // ADLSGen1FolderProperties - ADLS Gen 1 folder data set properties. @@ -1059,6 +756,24 @@ type ADLSGen1FolderProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for ADLSGen1FolderProperties. +func (ag1fp ADLSGen1FolderProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ag1fp.AccountName != nil { + objectMap["accountName"] = ag1fp.AccountName + } + if ag1fp.FolderPath != nil { + objectMap["folderPath"] = ag1fp.FolderPath + } + if ag1fp.ResourceGroup != nil { + objectMap["resourceGroup"] = ag1fp.ResourceGroup + } + if ag1fp.SubscriptionID != nil { + objectMap["subscriptionId"] = ag1fp.SubscriptionID + } + return json.Marshal(objectMap) +} + // ADLSGen2FileDataSet an ADLS Gen 2 file data set. type ADLSGen2FileDataSet struct { // ADLSGen2FileProperties - ADLS Gen 2 file data set properties. @@ -1385,6 +1100,33 @@ type ADLSGen2FileDataSetMappingProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for ADLSGen2FileDataSetMappingProperties. +func (ag2fdsmp ADLSGen2FileDataSetMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ag2fdsmp.DataSetID != nil { + objectMap["dataSetId"] = ag2fdsmp.DataSetID + } + if ag2fdsmp.FilePath != nil { + objectMap["filePath"] = ag2fdsmp.FilePath + } + if ag2fdsmp.FileSystem != nil { + objectMap["fileSystem"] = ag2fdsmp.FileSystem + } + if ag2fdsmp.OutputType != "" { + objectMap["outputType"] = ag2fdsmp.OutputType + } + if ag2fdsmp.ResourceGroup != nil { + objectMap["resourceGroup"] = ag2fdsmp.ResourceGroup + } + if ag2fdsmp.StorageAccountName != nil { + objectMap["storageAccountName"] = ag2fdsmp.StorageAccountName + } + if ag2fdsmp.SubscriptionID != nil { + objectMap["subscriptionId"] = ag2fdsmp.SubscriptionID + } + return json.Marshal(objectMap) +} + // ADLSGen2FileProperties properties of the ADLS Gen2 file data set. type ADLSGen2FileProperties struct { // DataSetID - READ-ONLY; Unique id for identifying a data set resource @@ -1401,6 +1143,27 @@ type ADLSGen2FileProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for ADLSGen2FileProperties. +func (ag2fp ADLSGen2FileProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ag2fp.FilePath != nil { + objectMap["filePath"] = ag2fp.FilePath + } + if ag2fp.FileSystem != nil { + objectMap["fileSystem"] = ag2fp.FileSystem + } + if ag2fp.ResourceGroup != nil { + objectMap["resourceGroup"] = ag2fp.ResourceGroup + } + if ag2fp.StorageAccountName != nil { + objectMap["storageAccountName"] = ag2fp.StorageAccountName + } + if ag2fp.SubscriptionID != nil { + objectMap["subscriptionId"] = ag2fp.SubscriptionID + } + return json.Marshal(objectMap) +} + // ADLSGen2FileSystemDataSet an ADLS Gen 2 file system data set. type ADLSGen2FileSystemDataSet struct { // ADLSGen2FileSystemProperties - ADLS Gen 2 file system data set properties. @@ -1723,6 +1486,27 @@ type ADLSGen2FileSystemDataSetMappingProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for ADLSGen2FileSystemDataSetMappingProperties. +func (ag2fsdsmp ADLSGen2FileSystemDataSetMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ag2fsdsmp.DataSetID != nil { + objectMap["dataSetId"] = ag2fsdsmp.DataSetID + } + if ag2fsdsmp.FileSystem != nil { + objectMap["fileSystem"] = ag2fsdsmp.FileSystem + } + if ag2fsdsmp.ResourceGroup != nil { + objectMap["resourceGroup"] = ag2fsdsmp.ResourceGroup + } + if ag2fsdsmp.StorageAccountName != nil { + objectMap["storageAccountName"] = ag2fsdsmp.StorageAccountName + } + if ag2fsdsmp.SubscriptionID != nil { + objectMap["subscriptionId"] = ag2fsdsmp.SubscriptionID + } + return json.Marshal(objectMap) +} + // ADLSGen2FileSystemProperties properties of the ADLS Gen2 file system data set. type ADLSGen2FileSystemProperties struct { // DataSetID - READ-ONLY; Unique id for identifying a data set resource @@ -1737,6 +1521,24 @@ type ADLSGen2FileSystemProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for ADLSGen2FileSystemProperties. +func (ag2fsp ADLSGen2FileSystemProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ag2fsp.FileSystem != nil { + objectMap["fileSystem"] = ag2fsp.FileSystem + } + if ag2fsp.ResourceGroup != nil { + objectMap["resourceGroup"] = ag2fsp.ResourceGroup + } + if ag2fsp.StorageAccountName != nil { + objectMap["storageAccountName"] = ag2fsp.StorageAccountName + } + if ag2fsp.SubscriptionID != nil { + objectMap["subscriptionId"] = ag2fsp.SubscriptionID + } + return json.Marshal(objectMap) +} + // ADLSGen2FolderDataSet an ADLS Gen 2 folder data set. type ADLSGen2FolderDataSet struct { // ADLSGen2FolderProperties - ADLS Gen 2 folder data set properties. @@ -2061,6 +1863,30 @@ type ADLSGen2FolderDataSetMappingProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for ADLSGen2FolderDataSetMappingProperties. +func (ag2fdsmp ADLSGen2FolderDataSetMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ag2fdsmp.DataSetID != nil { + objectMap["dataSetId"] = ag2fdsmp.DataSetID + } + if ag2fdsmp.FileSystem != nil { + objectMap["fileSystem"] = ag2fdsmp.FileSystem + } + if ag2fdsmp.FolderPath != nil { + objectMap["folderPath"] = ag2fdsmp.FolderPath + } + if ag2fdsmp.ResourceGroup != nil { + objectMap["resourceGroup"] = ag2fdsmp.ResourceGroup + } + if ag2fdsmp.StorageAccountName != nil { + objectMap["storageAccountName"] = ag2fdsmp.StorageAccountName + } + if ag2fdsmp.SubscriptionID != nil { + objectMap["subscriptionId"] = ag2fdsmp.SubscriptionID + } + return json.Marshal(objectMap) +} + // ADLSGen2FolderProperties properties of the ADLS Gen2 folder data set. type ADLSGen2FolderProperties struct { // DataSetID - READ-ONLY; Unique id for identifying a data set resource @@ -2077,6 +1903,27 @@ type ADLSGen2FolderProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for ADLSGen2FolderProperties. +func (ag2fp ADLSGen2FolderProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ag2fp.FileSystem != nil { + objectMap["fileSystem"] = ag2fp.FileSystem + } + if ag2fp.FolderPath != nil { + objectMap["folderPath"] = ag2fp.FolderPath + } + if ag2fp.ResourceGroup != nil { + objectMap["resourceGroup"] = ag2fp.ResourceGroup + } + if ag2fp.StorageAccountName != nil { + objectMap["storageAccountName"] = ag2fp.StorageAccountName + } + if ag2fp.SubscriptionID != nil { + objectMap["subscriptionId"] = ag2fp.SubscriptionID + } + return json.Marshal(objectMap) +} + // BlobContainerDataSet an Azure storage blob container data set. type BlobContainerDataSet struct { // BlobContainerProperties - Blob container data set properties. @@ -2399,6 +2246,27 @@ type BlobContainerMappingProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for BlobContainerMappingProperties. +func (bcmp BlobContainerMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bcmp.ContainerName != nil { + objectMap["containerName"] = bcmp.ContainerName + } + if bcmp.DataSetID != nil { + objectMap["dataSetId"] = bcmp.DataSetID + } + if bcmp.ResourceGroup != nil { + objectMap["resourceGroup"] = bcmp.ResourceGroup + } + if bcmp.StorageAccountName != nil { + objectMap["storageAccountName"] = bcmp.StorageAccountName + } + if bcmp.SubscriptionID != nil { + objectMap["subscriptionId"] = bcmp.SubscriptionID + } + return json.Marshal(objectMap) +} + // BlobContainerProperties properties of the BLOB container data set. type BlobContainerProperties struct { // ContainerName - BLOB Container name. @@ -2413,6 +2281,24 @@ type BlobContainerProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for BlobContainerProperties. +func (bcp BlobContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bcp.ContainerName != nil { + objectMap["containerName"] = bcp.ContainerName + } + if bcp.ResourceGroup != nil { + objectMap["resourceGroup"] = bcp.ResourceGroup + } + if bcp.StorageAccountName != nil { + objectMap["storageAccountName"] = bcp.StorageAccountName + } + if bcp.SubscriptionID != nil { + objectMap["subscriptionId"] = bcp.SubscriptionID + } + return json.Marshal(objectMap) +} + // BlobDataSet an Azure storage blob data set. type BlobDataSet struct { // BlobProperties - Blob data set properties. @@ -3041,6 +2927,30 @@ type BlobFolderMappingProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for BlobFolderMappingProperties. +func (bfmp BlobFolderMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bfmp.ContainerName != nil { + objectMap["containerName"] = bfmp.ContainerName + } + if bfmp.DataSetID != nil { + objectMap["dataSetId"] = bfmp.DataSetID + } + if bfmp.Prefix != nil { + objectMap["prefix"] = bfmp.Prefix + } + if bfmp.ResourceGroup != nil { + objectMap["resourceGroup"] = bfmp.ResourceGroup + } + if bfmp.StorageAccountName != nil { + objectMap["storageAccountName"] = bfmp.StorageAccountName + } + if bfmp.SubscriptionID != nil { + objectMap["subscriptionId"] = bfmp.SubscriptionID + } + return json.Marshal(objectMap) +} + // BlobFolderProperties properties of the blob folder data set. type BlobFolderProperties struct { // ContainerName - Container that has the file path. @@ -3057,6 +2967,27 @@ type BlobFolderProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for BlobFolderProperties. +func (bfp BlobFolderProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bfp.ContainerName != nil { + objectMap["containerName"] = bfp.ContainerName + } + if bfp.Prefix != nil { + objectMap["prefix"] = bfp.Prefix + } + if bfp.ResourceGroup != nil { + objectMap["resourceGroup"] = bfp.ResourceGroup + } + if bfp.StorageAccountName != nil { + objectMap["storageAccountName"] = bfp.StorageAccountName + } + if bfp.SubscriptionID != nil { + objectMap["subscriptionId"] = bfp.SubscriptionID + } + return json.Marshal(objectMap) +} + // BlobMappingProperties azure storage Blob data set mapping property bag. type BlobMappingProperties struct { // ContainerName - Container that has the file path. @@ -3079,6 +3010,33 @@ type BlobMappingProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for BlobMappingProperties. +func (bmp BlobMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bmp.ContainerName != nil { + objectMap["containerName"] = bmp.ContainerName + } + if bmp.DataSetID != nil { + objectMap["dataSetId"] = bmp.DataSetID + } + if bmp.FilePath != nil { + objectMap["filePath"] = bmp.FilePath + } + if bmp.OutputType != "" { + objectMap["outputType"] = bmp.OutputType + } + if bmp.ResourceGroup != nil { + objectMap["resourceGroup"] = bmp.ResourceGroup + } + if bmp.StorageAccountName != nil { + objectMap["storageAccountName"] = bmp.StorageAccountName + } + if bmp.SubscriptionID != nil { + objectMap["subscriptionId"] = bmp.SubscriptionID + } + return json.Marshal(objectMap) +} + // BlobProperties properties of the blob data set. type BlobProperties struct { // ContainerName - Container that has the file path. @@ -3095,6 +3053,27 @@ type BlobProperties struct { SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for BlobProperties. +func (bp BlobProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bp.ContainerName != nil { + objectMap["containerName"] = bp.ContainerName + } + if bp.FilePath != nil { + objectMap["filePath"] = bp.FilePath + } + if bp.ResourceGroup != nil { + objectMap["resourceGroup"] = bp.ResourceGroup + } + if bp.StorageAccountName != nil { + objectMap["storageAccountName"] = bp.StorageAccountName + } + if bp.SubscriptionID != nil { + objectMap["subscriptionId"] = bp.SubscriptionID + } + return json.Marshal(objectMap) +} + // ConsumerInvitation a consumer Invitation data transfer object. type ConsumerInvitation struct { autorest.Response `json:"-"` @@ -3245,10 +3224,15 @@ func (cil ConsumerInvitationList) IsEmpty() bool { return cil.Value == nil || len(*cil.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (cil ConsumerInvitationList) hasNextLink() bool { + return cil.NextLink != nil && len(*cil.NextLink) != 0 +} + // consumerInvitationListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (cil ConsumerInvitationList) consumerInvitationListPreparer(ctx context.Context) (*http.Request, error) { - if cil.NextLink == nil || len(to.String(cil.NextLink)) < 1 { + if !cil.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -3276,11 +3260,16 @@ func (page *ConsumerInvitationListPage) NextWithContext(ctx context.Context) (er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.cil) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.cil) + if err != nil { + return err + } + page.cil = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.cil = next return nil } @@ -3346,6 +3335,15 @@ type ConsumerInvitationProperties struct { UserName *string `json:"userName,omitempty"` } +// MarshalJSON is the custom marshaler for ConsumerInvitationProperties. +func (cip ConsumerInvitationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cip.InvitationID != nil { + objectMap["invitationId"] = cip.InvitationID + } + return json.Marshal(objectMap) +} + // ConsumerSourceDataSet a consumer side dataSet data transfer object. type ConsumerSourceDataSet struct { // ConsumerSourceDataSetProperties - source dataSet properties @@ -3495,10 +3493,15 @@ func (csdsl ConsumerSourceDataSetList) IsEmpty() bool { return csdsl.Value == nil || len(*csdsl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (csdsl ConsumerSourceDataSetList) hasNextLink() bool { + return csdsl.NextLink != nil && len(*csdsl.NextLink) != 0 +} + // consumerSourceDataSetListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (csdsl ConsumerSourceDataSetList) consumerSourceDataSetListPreparer(ctx context.Context) (*http.Request, error) { - if csdsl.NextLink == nil || len(to.String(csdsl.NextLink)) < 1 { + if !csdsl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -3526,11 +3529,16 @@ func (page *ConsumerSourceDataSetListPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.csdsl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.csdsl) + if err != nil { + return err + } + page.csdsl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.csdsl = next return nil } @@ -3578,6 +3586,12 @@ type ConsumerSourceDataSetProperties struct { DataSetType DataSetType `json:"dataSetType,omitempty"` } +// MarshalJSON is the custom marshaler for ConsumerSourceDataSetProperties. +func (csdsp ConsumerSourceDataSetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // BasicDataSet a DataSet data transfer object. type BasicDataSet interface { AsBlobDataSet() (*BlobDataSet, bool) @@ -3878,10 +3892,15 @@ func (dsl DataSetList) IsEmpty() bool { return dsl.Value == nil || len(*dsl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (dsl DataSetList) hasNextLink() bool { + return dsl.NextLink != nil && len(*dsl.NextLink) != 0 +} + // dataSetListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (dsl DataSetList) dataSetListPreparer(ctx context.Context) (*http.Request, error) { - if dsl.NextLink == nil || len(to.String(dsl.NextLink)) < 1 { + if !dsl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -3909,11 +3928,16 @@ func (page *DataSetListPage) NextWithContext(ctx context.Context) (err error) { tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.dsl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.dsl) + if err != nil { + return err + } + page.dsl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.dsl = next return nil } @@ -4227,10 +4251,15 @@ func (dsml DataSetMappingList) IsEmpty() bool { return dsml.Value == nil || len(*dsml.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (dsml DataSetMappingList) hasNextLink() bool { + return dsml.NextLink != nil && len(*dsml.NextLink) != 0 +} + // dataSetMappingListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (dsml DataSetMappingList) dataSetMappingListPreparer(ctx context.Context) (*http.Request, error) { - if dsml.NextLink == nil || len(to.String(dsml.NextLink)) < 1 { + if !dsml.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -4258,11 +4287,16 @@ func (page *DataSetMappingListPage) NextWithContext(ctx context.Context) (err er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.dsml) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.dsml) + if err != nil { + return err + } + page.dsml = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.dsml = next return nil } @@ -4330,8 +4364,7 @@ func (dsm *DataSetModel) UnmarshalJSON(body []byte) error { return nil } -// DataSetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// DataSetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. type DataSetsDeleteFuture struct { azure.Future } @@ -4415,6 +4448,15 @@ type Identity struct { Type Type `json:"type,omitempty"` } +// MarshalJSON is the custom marshaler for Identity. +func (i Identity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if i.Type != "" { + objectMap["type"] = i.Type + } + return json.Marshal(objectMap) +} + // Invitation a Invitation data transfer object. type Invitation struct { autorest.Response `json:"-"` @@ -4565,10 +4607,15 @@ func (il InvitationList) IsEmpty() bool { return il.Value == nil || len(*il.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (il InvitationList) hasNextLink() bool { + return il.NextLink != nil && len(*il.NextLink) != 0 +} + // invitationListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (il InvitationList) invitationListPreparer(ctx context.Context) (*http.Request, error) { - if il.NextLink == nil || len(to.String(il.NextLink)) < 1 { + if !il.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -4596,11 +4643,16 @@ func (page *InvitationListPage) NextWithContext(ctx context.Context) (err error) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.il) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.il) + if err != nil { + return err + } + page.il = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.il = next return nil } @@ -4658,6 +4710,21 @@ type InvitationProperties struct { UserName *string `json:"userName,omitempty"` } +// MarshalJSON is the custom marshaler for InvitationProperties. +func (IP InvitationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if IP.TargetActiveDirectoryID != nil { + objectMap["targetActiveDirectoryId"] = IP.TargetActiveDirectoryID + } + if IP.TargetEmail != nil { + objectMap["targetEmail"] = IP.TargetEmail + } + if IP.TargetObjectID != nil { + objectMap["targetObjectId"] = IP.TargetObjectID + } + return json.Marshal(objectMap) +} + // KustoClusterDataSet a kusto cluster data set. type KustoClusterDataSet struct { // KustoClusterDataSetProperties - Kusto cluster data set properties. @@ -4976,6 +5043,18 @@ type KustoClusterDataSetMappingProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for KustoClusterDataSetMappingProperties. +func (kcdsmp KustoClusterDataSetMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if kcdsmp.DataSetID != nil { + objectMap["dataSetId"] = kcdsmp.DataSetID + } + if kcdsmp.KustoClusterResourceID != nil { + objectMap["kustoClusterResourceId"] = kcdsmp.KustoClusterResourceID + } + return json.Marshal(objectMap) +} + // KustoClusterDataSetProperties properties of the kusto cluster data set. type KustoClusterDataSetProperties struct { // DataSetID - READ-ONLY; Unique id for identifying a data set resource @@ -4988,6 +5067,15 @@ type KustoClusterDataSetProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for KustoClusterDataSetProperties. +func (kcdsp KustoClusterDataSetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if kcdsp.KustoClusterResourceID != nil { + objectMap["kustoClusterResourceId"] = kcdsp.KustoClusterResourceID + } + return json.Marshal(objectMap) +} + // KustoDatabaseDataSet a kusto database data set. type KustoDatabaseDataSet struct { // KustoDatabaseDataSetProperties - Kusto database data set properties. @@ -5306,6 +5394,18 @@ type KustoDatabaseDataSetMappingProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for KustoDatabaseDataSetMappingProperties. +func (kddsmp KustoDatabaseDataSetMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if kddsmp.DataSetID != nil { + objectMap["dataSetId"] = kddsmp.DataSetID + } + if kddsmp.KustoClusterResourceID != nil { + objectMap["kustoClusterResourceId"] = kddsmp.KustoClusterResourceID + } + return json.Marshal(objectMap) +} + // KustoDatabaseDataSetProperties properties of the kusto database data set. type KustoDatabaseDataSetProperties struct { // DataSetID - READ-ONLY; Unique id for identifying a data set resource @@ -5318,6 +5418,15 @@ type KustoDatabaseDataSetProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for KustoDatabaseDataSetProperties. +func (kddsp KustoDatabaseDataSetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if kddsp.KustoDatabaseResourceID != nil { + objectMap["kustoDatabaseResourceId"] = kddsp.KustoDatabaseResourceID + } + return json.Marshal(objectMap) +} + // OperationList list response for get operations. type OperationList struct { autorest.Response `json:"-"` @@ -5395,10 +5504,15 @@ func (ol OperationList) IsEmpty() bool { return ol.Value == nil || len(*ol.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ol OperationList) hasNextLink() bool { + return ol.NextLink != nil && len(*ol.NextLink) != 0 +} + // operationListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ol OperationList) operationListPreparer(ctx context.Context) (*http.Request, error) { - if ol.NextLink == nil || len(to.String(ol.NextLink)) < 1 { + if !ol.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -5426,11 +5540,16 @@ func (page *OperationListPage) NextWithContext(ctx context.Context) (err error) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ol) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ol) + if err != nil { + return err + } + page.ol = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ol = next return nil } @@ -5771,10 +5890,15 @@ func (pssl ProviderShareSubscriptionList) IsEmpty() bool { return pssl.Value == nil || len(*pssl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (pssl ProviderShareSubscriptionList) hasNextLink() bool { + return pssl.NextLink != nil && len(*pssl.NextLink) != 0 +} + // providerShareSubscriptionListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (pssl ProviderShareSubscriptionList) providerShareSubscriptionListPreparer(ctx context.Context) (*http.Request, error) { - if pssl.NextLink == nil || len(to.String(pssl.NextLink)) < 1 { + if !pssl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -5802,11 +5926,16 @@ func (page *ProviderShareSubscriptionListPage) NextWithContext(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.pssl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.pssl) + if err != nil { + return err + } + page.pssl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.pssl = next return nil } @@ -5862,6 +5991,12 @@ type ProviderShareSubscriptionProperties struct { ShareSubscriptionStatus ShareSubscriptionStatus `json:"shareSubscriptionStatus,omitempty"` } +// MarshalJSON is the custom marshaler for ProviderShareSubscriptionProperties. +func (pssp ProviderShareSubscriptionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ProviderShareSubscriptionsRevokeFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type ProviderShareSubscriptionsRevokeFuture struct { @@ -5901,6 +6036,12 @@ type ProxyDto struct { Type *string `json:"type,omitempty"` } +// MarshalJSON is the custom marshaler for ProxyDto. +func (pd ProxyDto) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ScheduledSourceShareSynchronizationSettingProperties a Scheduled source synchronization setting data // transfer object. type ScheduledSourceShareSynchronizationSettingProperties struct { @@ -6095,6 +6236,18 @@ type ScheduledSynchronizationSettingProperties struct { UserName *string `json:"userName,omitempty"` } +// MarshalJSON is the custom marshaler for ScheduledSynchronizationSettingProperties. +func (sssp ScheduledSynchronizationSettingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sssp.RecurrenceInterval != "" { + objectMap["recurrenceInterval"] = sssp.RecurrenceInterval + } + if sssp.SynchronizationTime != nil { + objectMap["synchronizationTime"] = sssp.SynchronizationTime + } + return json.Marshal(objectMap) +} + // ScheduledTrigger a type of trigger based on schedule type ScheduledTrigger struct { // ScheduledTriggerProperties - Properties of scheduled synchronization @@ -6215,6 +6368,21 @@ type ScheduledTriggerProperties struct { UserName *string `json:"userName,omitempty"` } +// MarshalJSON is the custom marshaler for ScheduledTriggerProperties. +func (stp ScheduledTriggerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if stp.RecurrenceInterval != "" { + objectMap["recurrenceInterval"] = stp.RecurrenceInterval + } + if stp.SynchronizationMode != "" { + objectMap["synchronizationMode"] = stp.SynchronizationMode + } + if stp.SynchronizationTime != nil { + objectMap["synchronizationTime"] = stp.SynchronizationTime + } + return json.Marshal(objectMap) +} + // Share a share data transfer object. type Share struct { autorest.Response `json:"-"` @@ -6365,10 +6533,15 @@ func (sl ShareList) IsEmpty() bool { return sl.Value == nil || len(*sl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (sl ShareList) hasNextLink() bool { + return sl.NextLink != nil && len(*sl.NextLink) != 0 +} + // shareListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (sl ShareList) shareListPreparer(ctx context.Context) (*http.Request, error) { - if sl.NextLink == nil || len(to.String(sl.NextLink)) < 1 { + if !sl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -6396,11 +6569,16 @@ func (page *ShareListPage) NextWithContext(ctx context.Context) (err error) { tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.sl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.sl) + if err != nil { + return err + } + page.sl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.sl = next return nil } @@ -6452,6 +6630,21 @@ type ShareProperties struct { UserName *string `json:"userName,omitempty"` } +// MarshalJSON is the custom marshaler for ShareProperties. +func (sp ShareProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sp.Description != nil { + objectMap["description"] = sp.Description + } + if sp.ShareKind != "" { + objectMap["shareKind"] = sp.ShareKind + } + if sp.Terms != nil { + objectMap["terms"] = sp.Terms + } + return json.Marshal(objectMap) +} + // SharesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. type SharesDeleteFuture struct { azure.Future @@ -6630,10 +6823,15 @@ func (ssl ShareSubscriptionList) IsEmpty() bool { return ssl.Value == nil || len(*ssl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ssl ShareSubscriptionList) hasNextLink() bool { + return ssl.NextLink != nil && len(*ssl.NextLink) != 0 +} + // shareSubscriptionListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ssl ShareSubscriptionList) shareSubscriptionListPreparer(ctx context.Context) (*http.Request, error) { - if ssl.NextLink == nil || len(to.String(ssl.NextLink)) < 1 { + if !ssl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -6661,11 +6859,16 @@ func (page *ShareSubscriptionListPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ssl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ssl) + if err != nil { + return err + } + page.ssl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ssl = next return nil } @@ -6731,8 +6934,20 @@ type ShareSubscriptionProperties struct { UserName *string `json:"userName,omitempty"` } -// ShareSubscriptionsCancelSynchronizationFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. +// MarshalJSON is the custom marshaler for ShareSubscriptionProperties. +func (ssp ShareSubscriptionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ssp.InvitationID != nil { + objectMap["invitationId"] = ssp.InvitationID + } + if ssp.SourceShareLocation != nil { + objectMap["sourceShareLocation"] = ssp.SourceShareLocation + } + return json.Marshal(objectMap) +} + +// ShareSubscriptionsCancelSynchronizationFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type ShareSubscriptionsCancelSynchronizationFuture struct { azure.Future } @@ -6760,8 +6975,8 @@ func (future *ShareSubscriptionsCancelSynchronizationFuture) Result(client Share return } -// ShareSubscriptionsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// ShareSubscriptionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ShareSubscriptionsDeleteFuture struct { azure.Future } @@ -6837,6 +7052,15 @@ type ShareSubscriptionSynchronization struct { SynchronizationMode SynchronizationMode `json:"synchronizationMode,omitempty"` } +// MarshalJSON is the custom marshaler for ShareSubscriptionSynchronization. +func (sss ShareSubscriptionSynchronization) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sss.SynchronizationID != nil { + objectMap["synchronizationId"] = sss.SynchronizationID + } + return json.Marshal(objectMap) +} + // ShareSubscriptionSynchronizationList a consumer side list of share subscription synchronizations type ShareSubscriptionSynchronizationList struct { autorest.Response `json:"-"` @@ -6915,10 +7139,15 @@ func (sssl ShareSubscriptionSynchronizationList) IsEmpty() bool { return sssl.Value == nil || len(*sssl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (sssl ShareSubscriptionSynchronizationList) hasNextLink() bool { + return sssl.NextLink != nil && len(*sssl.NextLink) != 0 +} + // shareSubscriptionSynchronizationListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (sssl ShareSubscriptionSynchronizationList) shareSubscriptionSynchronizationListPreparer(ctx context.Context) (*http.Request, error) { - if sssl.NextLink == nil || len(to.String(sssl.NextLink)) < 1 { + if !sssl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -6946,11 +7175,16 @@ func (page *ShareSubscriptionSynchronizationListPage) NextWithContext(ctx contex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.sssl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.sssl) + if err != nil { + return err + } + page.sssl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.sssl = next return nil } @@ -7008,6 +7242,39 @@ type ShareSynchronization struct { SynchronizationMode SynchronizationMode `json:"synchronizationMode,omitempty"` } +// MarshalJSON is the custom marshaler for ShareSynchronization. +func (ss ShareSynchronization) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ss.ConsumerEmail != nil { + objectMap["consumerEmail"] = ss.ConsumerEmail + } + if ss.ConsumerName != nil { + objectMap["consumerName"] = ss.ConsumerName + } + if ss.ConsumerTenantName != nil { + objectMap["consumerTenantName"] = ss.ConsumerTenantName + } + if ss.DurationMs != nil { + objectMap["durationMs"] = ss.DurationMs + } + if ss.EndTime != nil { + objectMap["endTime"] = ss.EndTime + } + if ss.Message != nil { + objectMap["message"] = ss.Message + } + if ss.StartTime != nil { + objectMap["startTime"] = ss.StartTime + } + if ss.Status != nil { + objectMap["status"] = ss.Status + } + if ss.SynchronizationID != nil { + objectMap["synchronizationId"] = ss.SynchronizationID + } + return json.Marshal(objectMap) +} + // ShareSynchronizationList list response for get ShareSynchronization. type ShareSynchronizationList struct { autorest.Response `json:"-"` @@ -7085,10 +7352,15 @@ func (ssl ShareSynchronizationList) IsEmpty() bool { return ssl.Value == nil || len(*ssl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ssl ShareSynchronizationList) hasNextLink() bool { + return ssl.NextLink != nil && len(*ssl.NextLink) != 0 +} + // shareSynchronizationListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ssl ShareSynchronizationList) shareSynchronizationListPreparer(ctx context.Context) (*http.Request, error) { - if ssl.NextLink == nil || len(to.String(ssl.NextLink)) < 1 { + if !ssl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -7116,11 +7388,16 @@ func (page *ShareSynchronizationListPage) NextWithContext(ctx context.Context) ( tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ssl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ssl) + if err != nil { + return err + } + page.ssl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ssl = next return nil } @@ -7338,10 +7615,15 @@ func (ssssl SourceShareSynchronizationSettingList) IsEmpty() bool { return ssssl.Value == nil || len(*ssssl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ssssl SourceShareSynchronizationSettingList) hasNextLink() bool { + return ssssl.NextLink != nil && len(*ssssl.NextLink) != 0 +} + // sourceShareSynchronizationSettingListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ssssl SourceShareSynchronizationSettingList) sourceShareSynchronizationSettingListPreparer(ctx context.Context) (*http.Request, error) { - if ssssl.NextLink == nil || len(to.String(ssssl.NextLink)) < 1 { + if !ssssl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -7350,8 +7632,7 @@ func (ssssl SourceShareSynchronizationSettingList) sourceShareSynchronizationSet autorest.WithBaseURL(to.String(ssssl.NextLink))) } -// SourceShareSynchronizationSettingListPage contains a page of BasicSourceShareSynchronizationSetting -// values. +// SourceShareSynchronizationSettingListPage contains a page of BasicSourceShareSynchronizationSetting values. type SourceShareSynchronizationSettingListPage struct { fn func(context.Context, SourceShareSynchronizationSettingList) (SourceShareSynchronizationSettingList, error) ssssl SourceShareSynchronizationSettingList @@ -7370,11 +7651,16 @@ func (page *SourceShareSynchronizationSettingListPage) NextWithContext(ctx conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ssssl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ssssl) + if err != nil { + return err + } + page.ssssl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ssssl = next return nil } @@ -7730,6 +8016,27 @@ type SQLDBTableDataSetMappingProperties struct { TableName *string `json:"tableName,omitempty"` } +// MarshalJSON is the custom marshaler for SQLDBTableDataSetMappingProperties. +func (sdtdsmp SQLDBTableDataSetMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sdtdsmp.DatabaseName != nil { + objectMap["databaseName"] = sdtdsmp.DatabaseName + } + if sdtdsmp.DataSetID != nil { + objectMap["dataSetId"] = sdtdsmp.DataSetID + } + if sdtdsmp.SchemaName != nil { + objectMap["schemaName"] = sdtdsmp.SchemaName + } + if sdtdsmp.SQLServerResourceID != nil { + objectMap["sqlServerResourceId"] = sdtdsmp.SQLServerResourceID + } + if sdtdsmp.TableName != nil { + objectMap["tableName"] = sdtdsmp.TableName + } + return json.Marshal(objectMap) +} + // SQLDBTableProperties properties of the SQL DB table data set. type SQLDBTableProperties struct { // DatabaseName - Database name of the source data set @@ -7744,6 +8051,24 @@ type SQLDBTableProperties struct { TableName *string `json:"tableName,omitempty"` } +// MarshalJSON is the custom marshaler for SQLDBTableProperties. +func (sdtp SQLDBTableProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sdtp.DatabaseName != nil { + objectMap["databaseName"] = sdtp.DatabaseName + } + if sdtp.SchemaName != nil { + objectMap["schemaName"] = sdtp.SchemaName + } + if sdtp.SQLServerResourceID != nil { + objectMap["sqlServerResourceId"] = sdtp.SQLServerResourceID + } + if sdtp.TableName != nil { + objectMap["tableName"] = sdtp.TableName + } + return json.Marshal(objectMap) +} + // SQLDWTableDataSet a SQL DW table data set. type SQLDWTableDataSet struct { // SQLDWTableProperties - SQL DW table data set properties. @@ -8066,6 +8391,27 @@ type SQLDWTableDataSetMappingProperties struct { TableName *string `json:"tableName,omitempty"` } +// MarshalJSON is the custom marshaler for SQLDWTableDataSetMappingProperties. +func (sdtdsmp SQLDWTableDataSetMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sdtdsmp.DataSetID != nil { + objectMap["dataSetId"] = sdtdsmp.DataSetID + } + if sdtdsmp.DataWarehouseName != nil { + objectMap["dataWarehouseName"] = sdtdsmp.DataWarehouseName + } + if sdtdsmp.SchemaName != nil { + objectMap["schemaName"] = sdtdsmp.SchemaName + } + if sdtdsmp.SQLServerResourceID != nil { + objectMap["sqlServerResourceId"] = sdtdsmp.SQLServerResourceID + } + if sdtdsmp.TableName != nil { + objectMap["tableName"] = sdtdsmp.TableName + } + return json.Marshal(objectMap) +} + // SQLDWTableProperties properties of the SQL DW table data set. type SQLDWTableProperties struct { // DataSetID - READ-ONLY; Unique id for identifying a data set resource @@ -8080,6 +8426,24 @@ type SQLDWTableProperties struct { TableName *string `json:"tableName,omitempty"` } +// MarshalJSON is the custom marshaler for SQLDWTableProperties. +func (sdtp SQLDWTableProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sdtp.DataWarehouseName != nil { + objectMap["dataWarehouseName"] = sdtp.DataWarehouseName + } + if sdtp.SchemaName != nil { + objectMap["schemaName"] = sdtp.SchemaName + } + if sdtp.SQLServerResourceID != nil { + objectMap["sqlServerResourceId"] = sdtp.SQLServerResourceID + } + if sdtp.TableName != nil { + objectMap["tableName"] = sdtp.TableName + } + return json.Marshal(objectMap) +} + // SynchronizationDetails synchronization details at data set level type SynchronizationDetails struct { // DataSetID - READ-ONLY; Id of data set @@ -8114,6 +8478,12 @@ type SynchronizationDetails struct { VCore *int64 `json:"vCore,omitempty"` } +// MarshalJSON is the custom marshaler for SynchronizationDetails. +func (sd SynchronizationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // SynchronizationDetailsList details of synchronization type SynchronizationDetailsList struct { autorest.Response `json:"-"` @@ -8123,8 +8493,7 @@ type SynchronizationDetailsList struct { Value *[]SynchronizationDetails `json:"value,omitempty"` } -// SynchronizationDetailsListIterator provides access to a complete listing of SynchronizationDetails -// values. +// SynchronizationDetailsListIterator provides access to a complete listing of SynchronizationDetails values. type SynchronizationDetailsListIterator struct { i int page SynchronizationDetailsListPage @@ -8192,10 +8561,15 @@ func (sdl SynchronizationDetailsList) IsEmpty() bool { return sdl.Value == nil || len(*sdl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (sdl SynchronizationDetailsList) hasNextLink() bool { + return sdl.NextLink != nil && len(*sdl.NextLink) != 0 +} + // synchronizationDetailsListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (sdl SynchronizationDetailsList) synchronizationDetailsListPreparer(ctx context.Context) (*http.Request, error) { - if sdl.NextLink == nil || len(to.String(sdl.NextLink)) < 1 { + if !sdl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -8223,11 +8597,16 @@ func (page *SynchronizationDetailsListPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.sdl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.sdl) + if err != nil { + return err + } + page.sdl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.sdl = next return nil } @@ -8383,8 +8762,7 @@ func (ssl *SynchronizationSettingList) UnmarshalJSON(body []byte) error { return nil } -// SynchronizationSettingListIterator provides access to a complete listing of SynchronizationSetting -// values. +// SynchronizationSettingListIterator provides access to a complete listing of SynchronizationSetting values. type SynchronizationSettingListIterator struct { i int page SynchronizationSettingListPage @@ -8452,10 +8830,15 @@ func (ssl SynchronizationSettingList) IsEmpty() bool { return ssl.Value == nil || len(*ssl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (ssl SynchronizationSettingList) hasNextLink() bool { + return ssl.NextLink != nil && len(*ssl.NextLink) != 0 +} + // synchronizationSettingListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (ssl SynchronizationSettingList) synchronizationSettingListPreparer(ctx context.Context) (*http.Request, error) { - if ssl.NextLink == nil || len(to.String(ssl.NextLink)) < 1 { + if !ssl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -8483,11 +8866,16 @@ func (page *SynchronizationSettingListPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ssl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.ssl) + if err != nil { + return err + } + page.ssl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.ssl = next return nil } @@ -8763,10 +9151,15 @@ func (tl TriggerList) IsEmpty() bool { return tl.Value == nil || len(*tl.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (tl TriggerList) hasNextLink() bool { + return tl.NextLink != nil && len(*tl.NextLink) != 0 +} + // triggerListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (tl TriggerList) triggerListPreparer(ctx context.Context) (*http.Request, error) { - if tl.NextLink == nil || len(to.String(tl.NextLink)) < 1 { + if !tl.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -8794,11 +9187,16 @@ func (page *TriggerListPage) NextWithContext(ctx context.Context) (err error) { tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.tl) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.tl) + if err != nil { + return err + } + page.tl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.tl = next return nil } @@ -8849,8 +9247,7 @@ func (tm *TriggerModel) UnmarshalJSON(body []byte) error { return nil } -// TriggersCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// TriggersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type TriggersCreateFuture struct { azure.Future } @@ -8878,8 +9275,7 @@ func (future *TriggersCreateFuture) Result(client TriggersClient) (tm TriggerMod return } -// TriggersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// TriggersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. type TriggersDeleteFuture struct { azure.Future } diff --git a/services/datashare/mgmt/2019-11-01/datashare/operations.go b/services/datashare/mgmt/2019-11-01/datashare/operations.go index 5c6f040f8b77..cb8afe02adce 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/operations.go +++ b/services/datashare/mgmt/2019-11-01/datashare/operations.go @@ -71,6 +71,9 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListPa if err != nil { err = autorest.NewErrorWithError(err, "datashare.OperationsClient", "List", resp, "Failure responding to request") } + if result.ol.hasNextLink() && result.ol.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -101,7 +104,6 @@ func (client OperationsClient) ListSender(req *http.Request) (*http.Response, er func (client OperationsClient) ListResponder(resp *http.Response) (result OperationList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/datashare/mgmt/2019-11-01/datashare/providersharesubscriptions.go b/services/datashare/mgmt/2019-11-01/datashare/providersharesubscriptions.go index 49babfc08edf..36913bb6e971 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/providersharesubscriptions.go +++ b/services/datashare/mgmt/2019-11-01/datashare/providersharesubscriptions.go @@ -114,7 +114,6 @@ func (client ProviderShareSubscriptionsClient) GetByShareSender(req *http.Reques func (client ProviderShareSubscriptionsClient) GetByShareResponder(resp *http.Response) (result ProviderShareSubscription, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -157,6 +156,9 @@ func (client ProviderShareSubscriptionsClient) ListByShare(ctx context.Context, if err != nil { err = autorest.NewErrorWithError(err, "datashare.ProviderShareSubscriptionsClient", "ListByShare", resp, "Failure responding to request") } + if result.pssl.hasNextLink() && result.pssl.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -197,7 +199,6 @@ func (client ProviderShareSubscriptionsClient) ListByShareSender(req *http.Reque func (client ProviderShareSubscriptionsClient) ListByShareResponder(resp *http.Response) (result ProviderShareSubscriptionList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -314,7 +315,6 @@ func (client ProviderShareSubscriptionsClient) ReinstateSender(req *http.Request func (client ProviderShareSubscriptionsClient) ReinstateResponder(resp *http.Response) (result ProviderShareSubscription, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -394,7 +394,6 @@ func (client ProviderShareSubscriptionsClient) RevokeSender(req *http.Request) ( func (client ProviderShareSubscriptionsClient) RevokeResponder(resp *http.Response) (result ProviderShareSubscription, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/datashare/mgmt/2019-11-01/datashare/shares.go b/services/datashare/mgmt/2019-11-01/datashare/shares.go index cba977a74913..1d7d4b14c972 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/shares.go +++ b/services/datashare/mgmt/2019-11-01/datashare/shares.go @@ -114,7 +114,6 @@ func (client SharesClient) CreateSender(req *http.Request) (*http.Response, erro func (client SharesClient) CreateResponder(resp *http.Response) (result Share, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -192,7 +191,6 @@ func (client SharesClient) DeleteSender(req *http.Request) (future SharesDeleteF func (client SharesClient) DeleteResponder(resp *http.Response) (result OperationResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -270,7 +268,6 @@ func (client SharesClient) GetSender(req *http.Request) (*http.Response, error) func (client SharesClient) GetResponder(resp *http.Response) (result Share, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -283,7 +280,9 @@ func (client SharesClient) GetResponder(resp *http.Response) (result Share, err // resourceGroupName - the resource group name. // accountName - the name of the share account. // skipToken - continuation Token -func (client SharesClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result ShareListPage, err error) { +// filter - filters the results using OData syntax. +// orderby - sorts the results using OData syntax. +func (client SharesClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string, skipToken string, filter string, orderby string) (result ShareListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SharesClient.ListByAccount") defer func() { @@ -295,7 +294,7 @@ func (client SharesClient) ListByAccount(ctx context.Context, resourceGroupName }() } result.fn = client.listByAccountNextResults - req, err := client.ListByAccountPreparer(ctx, resourceGroupName, accountName, skipToken) + req, err := client.ListByAccountPreparer(ctx, resourceGroupName, accountName, skipToken, filter, orderby) if err != nil { err = autorest.NewErrorWithError(err, "datashare.SharesClient", "ListByAccount", nil, "Failure preparing request") return @@ -312,12 +311,15 @@ func (client SharesClient) ListByAccount(ctx context.Context, resourceGroupName if err != nil { err = autorest.NewErrorWithError(err, "datashare.SharesClient", "ListByAccount", resp, "Failure responding to request") } + if result.sl.hasNextLink() && result.sl.IsEmpty() { + err = result.NextWithContext(ctx) + } return } // ListByAccountPreparer prepares the ListByAccount request. -func (client SharesClient) ListByAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (*http.Request, error) { +func (client SharesClient) ListByAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, skipToken string, filter string, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -331,6 +333,12 @@ func (client SharesClient) ListByAccountPreparer(ctx context.Context, resourceGr if len(skipToken) > 0 { queryParameters["$skipToken"] = autorest.Encode("query", skipToken) } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -351,7 +359,6 @@ func (client SharesClient) ListByAccountSender(req *http.Request) (*http.Respons func (client SharesClient) ListByAccountResponder(resp *http.Response) (result ShareList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -381,7 +388,7 @@ func (client SharesClient) listByAccountNextResults(ctx context.Context, lastRes } // ListByAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client SharesClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result ShareListIterator, err error) { +func (client SharesClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string, filter string, orderby string) (result ShareListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SharesClient.ListByAccount") defer func() { @@ -392,7 +399,7 @@ func (client SharesClient) ListByAccountComplete(ctx context.Context, resourceGr tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByAccount(ctx, resourceGroupName, accountName, skipToken) + result.page, err = client.ListByAccount(ctx, resourceGroupName, accountName, skipToken, filter, orderby) return } @@ -403,7 +410,9 @@ func (client SharesClient) ListByAccountComplete(ctx context.Context, resourceGr // shareName - the name of the share. // shareSynchronization - share Synchronization payload. // skipToken - continuation token -func (client SharesClient) ListSynchronizationDetails(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization ShareSynchronization, skipToken string) (result SynchronizationDetailsListPage, err error) { +// filter - filters the results using OData syntax. +// orderby - sorts the results using OData syntax. +func (client SharesClient) ListSynchronizationDetails(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization ShareSynchronization, skipToken string, filter string, orderby string) (result SynchronizationDetailsListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SharesClient.ListSynchronizationDetails") defer func() { @@ -415,7 +424,7 @@ func (client SharesClient) ListSynchronizationDetails(ctx context.Context, resou }() } result.fn = client.listSynchronizationDetailsNextResults - req, err := client.ListSynchronizationDetailsPreparer(ctx, resourceGroupName, accountName, shareName, shareSynchronization, skipToken) + req, err := client.ListSynchronizationDetailsPreparer(ctx, resourceGroupName, accountName, shareName, shareSynchronization, skipToken, filter, orderby) if err != nil { err = autorest.NewErrorWithError(err, "datashare.SharesClient", "ListSynchronizationDetails", nil, "Failure preparing request") return @@ -432,12 +441,15 @@ func (client SharesClient) ListSynchronizationDetails(ctx context.Context, resou if err != nil { err = autorest.NewErrorWithError(err, "datashare.SharesClient", "ListSynchronizationDetails", resp, "Failure responding to request") } + if result.sdl.hasNextLink() && result.sdl.IsEmpty() { + err = result.NextWithContext(ctx) + } return } // ListSynchronizationDetailsPreparer prepares the ListSynchronizationDetails request. -func (client SharesClient) ListSynchronizationDetailsPreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization ShareSynchronization, skipToken string) (*http.Request, error) { +func (client SharesClient) ListSynchronizationDetailsPreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization ShareSynchronization, skipToken string, filter string, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -452,6 +464,12 @@ func (client SharesClient) ListSynchronizationDetailsPreparer(ctx context.Contex if len(skipToken) > 0 { queryParameters["$skipToken"] = autorest.Encode("query", skipToken) } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } shareSynchronization.SynchronizationMode = "" preparer := autorest.CreatePreparer( @@ -475,7 +493,6 @@ func (client SharesClient) ListSynchronizationDetailsSender(req *http.Request) ( func (client SharesClient) ListSynchronizationDetailsResponder(resp *http.Response) (result SynchronizationDetailsList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -505,7 +522,7 @@ func (client SharesClient) listSynchronizationDetailsNextResults(ctx context.Con } // ListSynchronizationDetailsComplete enumerates all values, automatically crossing page boundaries as required. -func (client SharesClient) ListSynchronizationDetailsComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization ShareSynchronization, skipToken string) (result SynchronizationDetailsListIterator, err error) { +func (client SharesClient) ListSynchronizationDetailsComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization ShareSynchronization, skipToken string, filter string, orderby string) (result SynchronizationDetailsListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SharesClient.ListSynchronizationDetails") defer func() { @@ -516,7 +533,7 @@ func (client SharesClient) ListSynchronizationDetailsComplete(ctx context.Contex tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListSynchronizationDetails(ctx, resourceGroupName, accountName, shareName, shareSynchronization, skipToken) + result.page, err = client.ListSynchronizationDetails(ctx, resourceGroupName, accountName, shareName, shareSynchronization, skipToken, filter, orderby) return } @@ -526,7 +543,9 @@ func (client SharesClient) ListSynchronizationDetailsComplete(ctx context.Contex // accountName - the name of the share account. // shareName - the name of the share. // skipToken - continuation token -func (client SharesClient) ListSynchronizations(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result ShareSynchronizationListPage, err error) { +// filter - filters the results using OData syntax. +// orderby - sorts the results using OData syntax. +func (client SharesClient) ListSynchronizations(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (result ShareSynchronizationListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SharesClient.ListSynchronizations") defer func() { @@ -538,7 +557,7 @@ func (client SharesClient) ListSynchronizations(ctx context.Context, resourceGro }() } result.fn = client.listSynchronizationsNextResults - req, err := client.ListSynchronizationsPreparer(ctx, resourceGroupName, accountName, shareName, skipToken) + req, err := client.ListSynchronizationsPreparer(ctx, resourceGroupName, accountName, shareName, skipToken, filter, orderby) if err != nil { err = autorest.NewErrorWithError(err, "datashare.SharesClient", "ListSynchronizations", nil, "Failure preparing request") return @@ -555,12 +574,15 @@ func (client SharesClient) ListSynchronizations(ctx context.Context, resourceGro if err != nil { err = autorest.NewErrorWithError(err, "datashare.SharesClient", "ListSynchronizations", resp, "Failure responding to request") } + if result.ssl.hasNextLink() && result.ssl.IsEmpty() { + err = result.NextWithContext(ctx) + } return } // ListSynchronizationsPreparer prepares the ListSynchronizations request. -func (client SharesClient) ListSynchronizationsPreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (*http.Request, error) { +func (client SharesClient) ListSynchronizationsPreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -575,6 +597,12 @@ func (client SharesClient) ListSynchronizationsPreparer(ctx context.Context, res if len(skipToken) > 0 { queryParameters["$skipToken"] = autorest.Encode("query", skipToken) } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } preparer := autorest.CreatePreparer( autorest.AsPost(), @@ -595,7 +623,6 @@ func (client SharesClient) ListSynchronizationsSender(req *http.Request) (*http. func (client SharesClient) ListSynchronizationsResponder(resp *http.Response) (result ShareSynchronizationList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -625,7 +652,7 @@ func (client SharesClient) listSynchronizationsNextResults(ctx context.Context, } // ListSynchronizationsComplete enumerates all values, automatically crossing page boundaries as required. -func (client SharesClient) ListSynchronizationsComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result ShareSynchronizationListIterator, err error) { +func (client SharesClient) ListSynchronizationsComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string, filter string, orderby string) (result ShareSynchronizationListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SharesClient.ListSynchronizations") defer func() { @@ -636,6 +663,6 @@ func (client SharesClient) ListSynchronizationsComplete(ctx context.Context, res tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListSynchronizations(ctx, resourceGroupName, accountName, shareName, skipToken) + result.page, err = client.ListSynchronizations(ctx, resourceGroupName, accountName, shareName, skipToken, filter, orderby) return } diff --git a/services/datashare/mgmt/2019-11-01/datashare/sharesubscriptions.go b/services/datashare/mgmt/2019-11-01/datashare/sharesubscriptions.go index 9ad7e7b42e63..c4047dd5e999 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/sharesubscriptions.go +++ b/services/datashare/mgmt/2019-11-01/datashare/sharesubscriptions.go @@ -128,7 +128,6 @@ func (client ShareSubscriptionsClient) CancelSynchronizationSender(req *http.Req func (client ShareSubscriptionsClient) CancelSynchronizationResponder(resp *http.Response) (result ShareSubscriptionSynchronization, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -218,7 +217,6 @@ func (client ShareSubscriptionsClient) CreateSender(req *http.Request) (*http.Re func (client ShareSubscriptionsClient) CreateResponder(resp *http.Response) (result ShareSubscription, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -296,7 +294,6 @@ func (client ShareSubscriptionsClient) DeleteSender(req *http.Request) (future S func (client ShareSubscriptionsClient) DeleteResponder(resp *http.Response) (result OperationResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -374,7 +371,6 @@ func (client ShareSubscriptionsClient) GetSender(req *http.Request) (*http.Respo func (client ShareSubscriptionsClient) GetResponder(resp *http.Response) (result ShareSubscription, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -387,7 +383,9 @@ func (client ShareSubscriptionsClient) GetResponder(resp *http.Response) (result // resourceGroupName - the resource group name. // accountName - the name of the share account. // skipToken - continuation Token -func (client ShareSubscriptionsClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result ShareSubscriptionListPage, err error) { +// filter - filters the results using OData syntax. +// orderby - sorts the results using OData syntax. +func (client ShareSubscriptionsClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string, skipToken string, filter string, orderby string) (result ShareSubscriptionListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ShareSubscriptionsClient.ListByAccount") defer func() { @@ -399,7 +397,7 @@ func (client ShareSubscriptionsClient) ListByAccount(ctx context.Context, resour }() } result.fn = client.listByAccountNextResults - req, err := client.ListByAccountPreparer(ctx, resourceGroupName, accountName, skipToken) + req, err := client.ListByAccountPreparer(ctx, resourceGroupName, accountName, skipToken, filter, orderby) if err != nil { err = autorest.NewErrorWithError(err, "datashare.ShareSubscriptionsClient", "ListByAccount", nil, "Failure preparing request") return @@ -416,12 +414,15 @@ func (client ShareSubscriptionsClient) ListByAccount(ctx context.Context, resour if err != nil { err = autorest.NewErrorWithError(err, "datashare.ShareSubscriptionsClient", "ListByAccount", resp, "Failure responding to request") } + if result.ssl.hasNextLink() && result.ssl.IsEmpty() { + err = result.NextWithContext(ctx) + } return } // ListByAccountPreparer prepares the ListByAccount request. -func (client ShareSubscriptionsClient) ListByAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (*http.Request, error) { +func (client ShareSubscriptionsClient) ListByAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, skipToken string, filter string, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -435,6 +436,12 @@ func (client ShareSubscriptionsClient) ListByAccountPreparer(ctx context.Context if len(skipToken) > 0 { queryParameters["$skipToken"] = autorest.Encode("query", skipToken) } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -455,7 +462,6 @@ func (client ShareSubscriptionsClient) ListByAccountSender(req *http.Request) (* func (client ShareSubscriptionsClient) ListByAccountResponder(resp *http.Response) (result ShareSubscriptionList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -485,7 +491,7 @@ func (client ShareSubscriptionsClient) listByAccountNextResults(ctx context.Cont } // ListByAccountComplete enumerates all values, automatically crossing page boundaries as required. -func (client ShareSubscriptionsClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result ShareSubscriptionListIterator, err error) { +func (client ShareSubscriptionsClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string, filter string, orderby string) (result ShareSubscriptionListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ShareSubscriptionsClient.ListByAccount") defer func() { @@ -496,7 +502,7 @@ func (client ShareSubscriptionsClient) ListByAccountComplete(ctx context.Context tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByAccount(ctx, resourceGroupName, accountName, skipToken) + result.page, err = client.ListByAccount(ctx, resourceGroupName, accountName, skipToken, filter, orderby) return } @@ -535,6 +541,9 @@ func (client ShareSubscriptionsClient) ListSourceShareSynchronizationSettings(ct if err != nil { err = autorest.NewErrorWithError(err, "datashare.ShareSubscriptionsClient", "ListSourceShareSynchronizationSettings", resp, "Failure responding to request") } + if result.ssssl.hasNextLink() && result.ssssl.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -575,7 +584,6 @@ func (client ShareSubscriptionsClient) ListSourceShareSynchronizationSettingsSen func (client ShareSubscriptionsClient) ListSourceShareSynchronizationSettingsResponder(resp *http.Response) (result SourceShareSynchronizationSettingList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -627,7 +635,9 @@ func (client ShareSubscriptionsClient) ListSourceShareSynchronizationSettingsCom // shareSubscriptionName - the name of the share subscription. // shareSubscriptionSynchronization - share Subscription Synchronization payload. // skipToken - continuation token -func (client ShareSubscriptionsClient) ListSynchronizationDetails(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization ShareSubscriptionSynchronization, skipToken string) (result SynchronizationDetailsListPage, err error) { +// filter - filters the results using OData syntax. +// orderby - sorts the results using OData syntax. +func (client ShareSubscriptionsClient) ListSynchronizationDetails(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization ShareSubscriptionSynchronization, skipToken string, filter string, orderby string) (result SynchronizationDetailsListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ShareSubscriptionsClient.ListSynchronizationDetails") defer func() { @@ -645,7 +655,7 @@ func (client ShareSubscriptionsClient) ListSynchronizationDetails(ctx context.Co } result.fn = client.listSynchronizationDetailsNextResults - req, err := client.ListSynchronizationDetailsPreparer(ctx, resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, skipToken) + req, err := client.ListSynchronizationDetailsPreparer(ctx, resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, skipToken, filter, orderby) if err != nil { err = autorest.NewErrorWithError(err, "datashare.ShareSubscriptionsClient", "ListSynchronizationDetails", nil, "Failure preparing request") return @@ -662,12 +672,15 @@ func (client ShareSubscriptionsClient) ListSynchronizationDetails(ctx context.Co if err != nil { err = autorest.NewErrorWithError(err, "datashare.ShareSubscriptionsClient", "ListSynchronizationDetails", resp, "Failure responding to request") } + if result.sdl.hasNextLink() && result.sdl.IsEmpty() { + err = result.NextWithContext(ctx) + } return } // ListSynchronizationDetailsPreparer prepares the ListSynchronizationDetails request. -func (client ShareSubscriptionsClient) ListSynchronizationDetailsPreparer(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization ShareSubscriptionSynchronization, skipToken string) (*http.Request, error) { +func (client ShareSubscriptionsClient) ListSynchronizationDetailsPreparer(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization ShareSubscriptionSynchronization, skipToken string, filter string, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -682,6 +695,12 @@ func (client ShareSubscriptionsClient) ListSynchronizationDetailsPreparer(ctx co if len(skipToken) > 0 { queryParameters["$skipToken"] = autorest.Encode("query", skipToken) } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } shareSubscriptionSynchronization.DurationMs = nil shareSubscriptionSynchronization.EndTime = nil @@ -710,7 +729,6 @@ func (client ShareSubscriptionsClient) ListSynchronizationDetailsSender(req *htt func (client ShareSubscriptionsClient) ListSynchronizationDetailsResponder(resp *http.Response) (result SynchronizationDetailsList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -740,7 +758,7 @@ func (client ShareSubscriptionsClient) listSynchronizationDetailsNextResults(ctx } // ListSynchronizationDetailsComplete enumerates all values, automatically crossing page boundaries as required. -func (client ShareSubscriptionsClient) ListSynchronizationDetailsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization ShareSubscriptionSynchronization, skipToken string) (result SynchronizationDetailsListIterator, err error) { +func (client ShareSubscriptionsClient) ListSynchronizationDetailsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization ShareSubscriptionSynchronization, skipToken string, filter string, orderby string) (result SynchronizationDetailsListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ShareSubscriptionsClient.ListSynchronizationDetails") defer func() { @@ -751,7 +769,7 @@ func (client ShareSubscriptionsClient) ListSynchronizationDetailsComplete(ctx co tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListSynchronizationDetails(ctx, resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, skipToken) + result.page, err = client.ListSynchronizationDetails(ctx, resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, skipToken, filter, orderby) return } @@ -761,7 +779,9 @@ func (client ShareSubscriptionsClient) ListSynchronizationDetailsComplete(ctx co // accountName - the name of the share account. // shareSubscriptionName - the name of the share subscription. // skipToken - continuation token -func (client ShareSubscriptionsClient) ListSynchronizations(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result ShareSubscriptionSynchronizationListPage, err error) { +// filter - filters the results using OData syntax. +// orderby - sorts the results using OData syntax. +func (client ShareSubscriptionsClient) ListSynchronizations(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string, filter string, orderby string) (result ShareSubscriptionSynchronizationListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ShareSubscriptionsClient.ListSynchronizations") defer func() { @@ -773,7 +793,7 @@ func (client ShareSubscriptionsClient) ListSynchronizations(ctx context.Context, }() } result.fn = client.listSynchronizationsNextResults - req, err := client.ListSynchronizationsPreparer(ctx, resourceGroupName, accountName, shareSubscriptionName, skipToken) + req, err := client.ListSynchronizationsPreparer(ctx, resourceGroupName, accountName, shareSubscriptionName, skipToken, filter, orderby) if err != nil { err = autorest.NewErrorWithError(err, "datashare.ShareSubscriptionsClient", "ListSynchronizations", nil, "Failure preparing request") return @@ -790,12 +810,15 @@ func (client ShareSubscriptionsClient) ListSynchronizations(ctx context.Context, if err != nil { err = autorest.NewErrorWithError(err, "datashare.ShareSubscriptionsClient", "ListSynchronizations", resp, "Failure responding to request") } + if result.sssl.hasNextLink() && result.sssl.IsEmpty() { + err = result.NextWithContext(ctx) + } return } // ListSynchronizationsPreparer prepares the ListSynchronizations request. -func (client ShareSubscriptionsClient) ListSynchronizationsPreparer(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (*http.Request, error) { +func (client ShareSubscriptionsClient) ListSynchronizationsPreparer(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string, filter string, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -810,6 +833,12 @@ func (client ShareSubscriptionsClient) ListSynchronizationsPreparer(ctx context. if len(skipToken) > 0 { queryParameters["$skipToken"] = autorest.Encode("query", skipToken) } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } preparer := autorest.CreatePreparer( autorest.AsPost(), @@ -830,7 +859,6 @@ func (client ShareSubscriptionsClient) ListSynchronizationsSender(req *http.Requ func (client ShareSubscriptionsClient) ListSynchronizationsResponder(resp *http.Response) (result ShareSubscriptionSynchronizationList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -860,7 +888,7 @@ func (client ShareSubscriptionsClient) listSynchronizationsNextResults(ctx conte } // ListSynchronizationsComplete enumerates all values, automatically crossing page boundaries as required. -func (client ShareSubscriptionsClient) ListSynchronizationsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result ShareSubscriptionSynchronizationListIterator, err error) { +func (client ShareSubscriptionsClient) ListSynchronizationsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string, filter string, orderby string) (result ShareSubscriptionSynchronizationListIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ShareSubscriptionsClient.ListSynchronizations") defer func() { @@ -871,7 +899,7 @@ func (client ShareSubscriptionsClient) ListSynchronizationsComplete(ctx context. tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListSynchronizations(ctx, resourceGroupName, accountName, shareSubscriptionName, skipToken) + result.page, err = client.ListSynchronizations(ctx, resourceGroupName, accountName, shareSubscriptionName, skipToken, filter, orderby) return } @@ -948,7 +976,6 @@ func (client ShareSubscriptionsClient) SynchronizeMethodSender(req *http.Request func (client ShareSubscriptionsClient) SynchronizeMethodResponder(resp *http.Response) (result ShareSubscriptionSynchronization, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/datashare/mgmt/2019-11-01/datashare/synchronizationsettings.go b/services/datashare/mgmt/2019-11-01/datashare/synchronizationsettings.go index 0223d3e28ef3..dc4248322b7a 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/synchronizationsettings.go +++ b/services/datashare/mgmt/2019-11-01/datashare/synchronizationsettings.go @@ -117,7 +117,6 @@ func (client SynchronizationSettingsClient) CreateSender(req *http.Request) (*ht func (client SynchronizationSettingsClient) CreateResponder(resp *http.Response) (result SynchronizationSettingModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -197,7 +196,6 @@ func (client SynchronizationSettingsClient) DeleteSender(req *http.Request) (fut func (client SynchronizationSettingsClient) DeleteResponder(resp *http.Response) (result OperationResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -277,7 +275,6 @@ func (client SynchronizationSettingsClient) GetSender(req *http.Request) (*http. func (client SynchronizationSettingsClient) GetResponder(resp *http.Response) (result SynchronizationSettingModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -320,6 +317,9 @@ func (client SynchronizationSettingsClient) ListByShare(ctx context.Context, res if err != nil { err = autorest.NewErrorWithError(err, "datashare.SynchronizationSettingsClient", "ListByShare", resp, "Failure responding to request") } + if result.ssl.hasNextLink() && result.ssl.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -360,7 +360,6 @@ func (client SynchronizationSettingsClient) ListByShareSender(req *http.Request) func (client SynchronizationSettingsClient) ListByShareResponder(resp *http.Response) (result SynchronizationSettingList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/datashare/mgmt/2019-11-01/datashare/triggers.go b/services/datashare/mgmt/2019-11-01/datashare/triggers.go index 49324c58b8b0..da86a2828aa0 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/triggers.go +++ b/services/datashare/mgmt/2019-11-01/datashare/triggers.go @@ -116,7 +116,6 @@ func (client TriggersClient) CreateSender(req *http.Request) (future TriggersCre func (client TriggersClient) CreateResponder(resp *http.Response) (result TriggerModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -196,7 +195,6 @@ func (client TriggersClient) DeleteSender(req *http.Request) (future TriggersDel func (client TriggersClient) DeleteResponder(resp *http.Response) (result OperationResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -276,7 +274,6 @@ func (client TriggersClient) GetSender(req *http.Request) (*http.Response, error func (client TriggersClient) GetResponder(resp *http.Response) (result TriggerModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -319,6 +316,9 @@ func (client TriggersClient) ListByShareSubscription(ctx context.Context, resour if err != nil { err = autorest.NewErrorWithError(err, "datashare.TriggersClient", "ListByShareSubscription", resp, "Failure responding to request") } + if result.tl.hasNextLink() && result.tl.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -359,7 +359,6 @@ func (client TriggersClient) ListByShareSubscriptionSender(req *http.Request) (* func (client TriggersClient) ListByShareSubscriptionResponder(resp *http.Response) (result TriggerList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/datashare/mgmt/2019-11-01/datashare/version.go b/services/datashare/mgmt/2019-11-01/datashare/version.go index 5a612e2b6209..96c9e9f231ae 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/version.go +++ b/services/datashare/mgmt/2019-11-01/datashare/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " datashare/2019-11-01" + return "Azure-SDK-For-Go/" + Version() + " datashare/2019-11-01" } // Version returns the semantic version (see http://semver.org) of the client.