From 6db6e6b775638afec1537830574a3f00ff6c9383 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 9 Dec 2020 03:26:46 +0000 Subject: [PATCH] CodeGen from PR 11761 in Azure/azure-rest-api-specs add botservice track2 config (#11761) --- .../mgmt/2018-07-12/botservice/CHANGELOG.md | 11 ++++ .../mgmt/2018-07-12/botservice/models.go | 59 ++++++++++++------- 2 files changed, 48 insertions(+), 22 deletions(-) create mode 100644 services/preview/botservice/mgmt/2018-07-12/botservice/CHANGELOG.md diff --git a/services/preview/botservice/mgmt/2018-07-12/botservice/CHANGELOG.md b/services/preview/botservice/mgmt/2018-07-12/botservice/CHANGELOG.md new file mode 100644 index 000000000000..0068fa50cd0d --- /dev/null +++ b/services/preview/botservice/mgmt/2018-07-12/botservice/CHANGELOG.md @@ -0,0 +1,11 @@ +Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82 + +Code generator @microsoft.azure/autorest.go@~2.1.161 + +## Breaking Changes + +- Function `NewChannelResponseListPage` parameter(s) have been changed from `(func(context.Context, ChannelResponseList) (ChannelResponseList, error))` to `(ChannelResponseList, func(context.Context, ChannelResponseList) (ChannelResponseList, error))` +- Function `NewBotResponseListPage` parameter(s) have been changed from `(func(context.Context, BotResponseList) (BotResponseList, error))` to `(BotResponseList, func(context.Context, BotResponseList) (BotResponseList, error))` +- Function `NewConnectionSettingResponseListPage` parameter(s) have been changed from `(func(context.Context, ConnectionSettingResponseList) (ConnectionSettingResponseList, error))` to `(ConnectionSettingResponseList, func(context.Context, ConnectionSettingResponseList) (ConnectionSettingResponseList, error))` +- Function `NewEnterpriseChannelResponseListPage` parameter(s) have been changed from `(func(context.Context, EnterpriseChannelResponseList) (EnterpriseChannelResponseList, error))` to `(EnterpriseChannelResponseList, func(context.Context, EnterpriseChannelResponseList) (EnterpriseChannelResponseList, error))` +- Function `NewOperationEntityListResultPage` parameter(s) have been changed from `(func(context.Context, OperationEntityListResult) (OperationEntityListResult, error))` to `(OperationEntityListResult, func(context.Context, OperationEntityListResult) (OperationEntityListResult, error))` diff --git a/services/preview/botservice/mgmt/2018-07-12/botservice/models.go b/services/preview/botservice/mgmt/2018-07-12/botservice/models.go index 725d1e7f8da1..8bac75b4ae05 100644 --- a/services/preview/botservice/mgmt/2018-07-12/botservice/models.go +++ b/services/preview/botservice/mgmt/2018-07-12/botservice/models.go @@ -444,8 +444,11 @@ func (page BotResponseListPage) Values() []Bot { } // Creates a new instance of the BotResponseListPage type. -func NewBotResponseListPage(getNextPage func(context.Context, BotResponseList) (BotResponseList, error)) BotResponseListPage { - return BotResponseListPage{fn: getNextPage} +func NewBotResponseListPage(cur BotResponseList, getNextPage func(context.Context, BotResponseList) (BotResponseList, error)) BotResponseListPage { + return BotResponseListPage{ + fn: getNextPage, + brl: cur, + } } // BasicChannel channel definition @@ -773,8 +776,11 @@ func (page ChannelResponseListPage) Values() []BotChannel { } // Creates a new instance of the ChannelResponseListPage type. -func NewChannelResponseListPage(getNextPage func(context.Context, ChannelResponseList) (ChannelResponseList, error)) ChannelResponseListPage { - return ChannelResponseListPage{fn: getNextPage} +func NewChannelResponseListPage(cur ChannelResponseList, getNextPage func(context.Context, ChannelResponseList) (ChannelResponseList, error)) ChannelResponseListPage { + return ChannelResponseListPage{ + fn: getNextPage, + crl: cur, + } } // CheckNameAvailabilityRequestBody the request body for a request to Bot Service Management to check @@ -849,8 +855,8 @@ func (cs ConnectionSetting) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// ConnectionSettingParameter extra Parameter in a Connection Setting Properties to indicate service provider -// specific properties +// ConnectionSettingParameter extra Parameter in a Connection Setting Properties to indicate service +// provider specific properties type ConnectionSettingParameter struct { // Key - Key for the Connection Setting Parameter. Key *string `json:"key,omitempty"` @@ -1061,8 +1067,11 @@ func (page ConnectionSettingResponseListPage) Values() []ConnectionSetting { } // Creates a new instance of the ConnectionSettingResponseListPage type. -func NewConnectionSettingResponseListPage(getNextPage func(context.Context, ConnectionSettingResponseList) (ConnectionSettingResponseList, error)) ConnectionSettingResponseListPage { - return ConnectionSettingResponseListPage{fn: getNextPage} +func NewConnectionSettingResponseListPage(cur ConnectionSettingResponseList, getNextPage func(context.Context, ConnectionSettingResponseList) (ConnectionSettingResponseList, error)) ConnectionSettingResponseListPage { + return ConnectionSettingResponseListPage{ + fn: getNextPage, + csrl: cur, + } } // DirectLineChannel direct Line channel definition @@ -1336,15 +1345,15 @@ func (ec EnterpriseChannel) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// EnterpriseChannelCheckNameAvailabilityRequest a request to Bot Service Management to check availability of -// an Enterprise Channel name. +// EnterpriseChannelCheckNameAvailabilityRequest a request to Bot Service Management to check availability +// of an Enterprise Channel name. type EnterpriseChannelCheckNameAvailabilityRequest struct { // Name - The name of the Enterprise Channel for which availability needs to be checked. Name *string `json:"name,omitempty"` } -// EnterpriseChannelCheckNameAvailabilityResponse a request to Bot Service Management to check availability of -// an Enterprise Channel name. +// EnterpriseChannelCheckNameAvailabilityResponse a request to Bot Service Management to check availability +// of an Enterprise Channel name. type EnterpriseChannelCheckNameAvailabilityResponse struct { autorest.Response `json:"-"` // Valid - Indicates if the Enterprise Channel name is valid. @@ -1554,12 +1563,15 @@ func (page EnterpriseChannelResponseListPage) Values() []EnterpriseChannel { } // Creates a new instance of the EnterpriseChannelResponseListPage type. -func NewEnterpriseChannelResponseListPage(getNextPage func(context.Context, EnterpriseChannelResponseList) (EnterpriseChannelResponseList, error)) EnterpriseChannelResponseListPage { - return EnterpriseChannelResponseListPage{fn: getNextPage} +func NewEnterpriseChannelResponseListPage(cur EnterpriseChannelResponseList, getNextPage func(context.Context, EnterpriseChannelResponseList) (EnterpriseChannelResponseList, error)) EnterpriseChannelResponseListPage { + return EnterpriseChannelResponseListPage{ + fn: getNextPage, + ecrl: cur, + } } -// EnterpriseChannelsCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// EnterpriseChannelsCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type EnterpriseChannelsCreateFuture struct { azure.Future } @@ -1587,8 +1599,8 @@ func (future *EnterpriseChannelsCreateFuture) Result(client EnterpriseChannelsCl return } -// EnterpriseChannelsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// EnterpriseChannelsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type EnterpriseChannelsDeleteFuture struct { azure.Future } @@ -1610,8 +1622,8 @@ func (future *EnterpriseChannelsDeleteFuture) Result(client EnterpriseChannelsCl return } -// EnterpriseChannelsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// EnterpriseChannelsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type EnterpriseChannelsUpdateFuture struct { azure.Future } @@ -2136,8 +2148,11 @@ func (page OperationEntityListResultPage) Values() []OperationEntity { } // Creates a new instance of the OperationEntityListResultPage type. -func NewOperationEntityListResultPage(getNextPage func(context.Context, OperationEntityListResult) (OperationEntityListResult, error)) OperationEntityListResultPage { - return OperationEntityListResultPage{fn: getNextPage} +func NewOperationEntityListResultPage(cur OperationEntityListResult, getNextPage func(context.Context, OperationEntityListResult) (OperationEntityListResult, error)) OperationEntityListResultPage { + return OperationEntityListResultPage{ + fn: getNextPage, + oelr: cur, + } } // Resource azure resource