From bb9b49a7a35eed345693f5718f63705cff75ee25 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 26 Nov 2020 03:46:21 +0000 Subject: [PATCH] CodeGen from PR 11728 in Azure/azure-rest-api-specs python track2 (#11728) --- .../mgmt/2018-10-01/consumption/models.go | 55 +++++++++++++------ 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/services/consumption/mgmt/2018-10-01/consumption/models.go b/services/consumption/mgmt/2018-10-01/consumption/models.go index c589284340b4..7d275ba7f851 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/models.go +++ b/services/consumption/mgmt/2018-10-01/consumption/models.go @@ -302,7 +302,8 @@ func (bp BudgetProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// BudgetsListResult result of listing budgets. It contains a list of available budgets in the scope provided. +// BudgetsListResult result of listing budgets. It contains a list of available budgets in the scope +// provided. type BudgetsListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of budgets. @@ -454,8 +455,11 @@ func (page BudgetsListResultPage) Values() []Budget { } // Creates a new instance of the BudgetsListResultPage type. -func NewBudgetsListResultPage(getNextPage func(context.Context, BudgetsListResult) (BudgetsListResult, error)) BudgetsListResultPage { - return BudgetsListResultPage{fn: getNextPage} +func NewBudgetsListResultPage(cur BudgetsListResult, getNextPage func(context.Context, BudgetsListResult) (BudgetsListResult, error)) BudgetsListResultPage { + return BudgetsListResultPage{ + fn: getNextPage, + blr: cur, + } } // BudgetTimePeriod the start and end date for a budget. @@ -1174,8 +1178,11 @@ func (page MarketplacesListResultPage) Values() []Marketplace { } // Creates a new instance of the MarketplacesListResultPage type. -func NewMarketplacesListResultPage(getNextPage func(context.Context, MarketplacesListResult) (MarketplacesListResult, error)) MarketplacesListResultPage { - return MarketplacesListResultPage{fn: getNextPage} +func NewMarketplacesListResultPage(cur MarketplacesListResult, getNextPage func(context.Context, MarketplacesListResult) (MarketplacesListResult, error)) MarketplacesListResultPage { + return MarketplacesListResultPage{ + fn: getNextPage, + mlr: cur, + } } // MeterDetails the properties of the meter detail. @@ -1396,8 +1403,11 @@ func (page OperationListResultPage) Values() []Operation { } // Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{fn: getNextPage} +func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{ + fn: getNextPage, + olr: cur, + } } // PriceSheetModel price sheet result. It contains the pricesheet associated with billing period @@ -1788,8 +1798,11 @@ func (page ReservationDetailsListResultPage) Values() []ReservationDetail { } // Creates a new instance of the ReservationDetailsListResultPage type. -func NewReservationDetailsListResultPage(getNextPage func(context.Context, ReservationDetailsListResult) (ReservationDetailsListResult, error)) ReservationDetailsListResultPage { - return ReservationDetailsListResultPage{fn: getNextPage} +func NewReservationDetailsListResultPage(cur ReservationDetailsListResult, getNextPage func(context.Context, ReservationDetailsListResult) (ReservationDetailsListResult, error)) ReservationDetailsListResultPage { + return ReservationDetailsListResultPage{ + fn: getNextPage, + rdlr: cur, + } } // ReservationRecommendation reservation recommendation resource. @@ -2071,8 +2084,11 @@ func (page ReservationRecommendationsListResultPage) Values() []ReservationRecom } // Creates a new instance of the ReservationRecommendationsListResultPage type. -func NewReservationRecommendationsListResultPage(getNextPage func(context.Context, ReservationRecommendationsListResult) (ReservationRecommendationsListResult, error)) ReservationRecommendationsListResultPage { - return ReservationRecommendationsListResultPage{fn: getNextPage} +func NewReservationRecommendationsListResultPage(cur ReservationRecommendationsListResult, getNextPage func(context.Context, ReservationRecommendationsListResult) (ReservationRecommendationsListResult, error)) ReservationRecommendationsListResultPage { + return ReservationRecommendationsListResultPage{ + fn: getNextPage, + rrlr: cur, + } } // ReservationSummariesListResult result of listing reservation summaries. @@ -2084,7 +2100,8 @@ type ReservationSummariesListResult struct { NextLink *string `json:"nextLink,omitempty"` } -// ReservationSummariesListResultIterator provides access to a complete listing of ReservationSummary values. +// ReservationSummariesListResultIterator provides access to a complete listing of ReservationSummary +// values. type ReservationSummariesListResultIterator struct { i int page ReservationSummariesListResultPage @@ -2227,8 +2244,11 @@ func (page ReservationSummariesListResultPage) Values() []ReservationSummary { } // Creates a new instance of the ReservationSummariesListResultPage type. -func NewReservationSummariesListResultPage(getNextPage func(context.Context, ReservationSummariesListResult) (ReservationSummariesListResult, error)) ReservationSummariesListResultPage { - return ReservationSummariesListResultPage{fn: getNextPage} +func NewReservationSummariesListResultPage(cur ReservationSummariesListResult, getNextPage func(context.Context, ReservationSummariesListResult) (ReservationSummariesListResult, error)) ReservationSummariesListResultPage { + return ReservationSummariesListResultPage{ + fn: getNextPage, + rslr: cur, + } } // ReservationSummary reservation summary resource. @@ -2855,6 +2875,9 @@ func (page UsageDetailsListResultPage) Values() []UsageDetail { } // Creates a new instance of the UsageDetailsListResultPage type. -func NewUsageDetailsListResultPage(getNextPage func(context.Context, UsageDetailsListResult) (UsageDetailsListResult, error)) UsageDetailsListResultPage { - return UsageDetailsListResultPage{fn: getNextPage} +func NewUsageDetailsListResultPage(cur UsageDetailsListResult, getNextPage func(context.Context, UsageDetailsListResult) (UsageDetailsListResult, error)) UsageDetailsListResultPage { + return UsageDetailsListResultPage{ + fn: getNextPage, + udlr: cur, + } }