From f3c3a7d34728edf5057d8410ce3cbea0bd4520a3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 16 Nov 2020 02:53:42 +0000 Subject: [PATCH] CodeGen from PR 11678 in Azure/azure-rest-api-specs Amend error response to indicate that we return additional error info. (#11678) --- .../2020-06-01/appconfiguration/models.go | 63 ++++++++++++------- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/services/appconfiguration/mgmt/2020-06-01/appconfiguration/models.go b/services/appconfiguration/mgmt/2020-06-01/appconfiguration/models.go index 9d8cf1abab2b..27a78509ad2f 100644 --- a/services/appconfiguration/mgmt/2020-06-01/appconfiguration/models.go +++ b/services/appconfiguration/mgmt/2020-06-01/appconfiguration/models.go @@ -29,7 +29,7 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/appconfiguration/mgmt/2020-06-01/appconfiguration" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/appconfiguration/mgmt/2020-06-01/appconfiguration" // APIKey an API key used for authenticating with a configuration store endpoint. type APIKey struct { @@ -200,8 +200,11 @@ func (page APIKeyListResultPage) Values() []APIKey { } // Creates a new instance of the APIKeyListResultPage type. -func NewAPIKeyListResultPage(getNextPage func(context.Context, APIKeyListResult) (APIKeyListResult, error)) APIKeyListResultPage { - return APIKeyListResultPage{fn: getNextPage} +func NewAPIKeyListResultPage(cur APIKeyListResult, getNextPage func(context.Context, APIKeyListResult) (APIKeyListResult, error)) APIKeyListResultPage { + return APIKeyListResultPage{ + fn: getNextPage, + aklr: cur, + } } // CheckNameAvailabilityParameters parameters used for checking whether a resource name is available. @@ -212,8 +215,8 @@ type CheckNameAvailabilityParameters struct { Type *string `json:"type,omitempty"` } -// ConfigurationStore the configuration store along with all resource properties. The Configuration Store will -// have all information to begin utilizing it. +// ConfigurationStore the configuration store along with all resource properties. The Configuration Store +// will have all information to begin utilizing it. type ConfigurationStore struct { autorest.Response `json:"-"` // Identity - The managed identity information, if configured. @@ -494,8 +497,11 @@ func (page ConfigurationStoreListResultPage) Values() []ConfigurationStore { } // Creates a new instance of the ConfigurationStoreListResultPage type. -func NewConfigurationStoreListResultPage(getNextPage func(context.Context, ConfigurationStoreListResult) (ConfigurationStoreListResult, error)) ConfigurationStoreListResultPage { - return ConfigurationStoreListResultPage{fn: getNextPage} +func NewConfigurationStoreListResultPage(cur ConfigurationStoreListResult, getNextPage func(context.Context, ConfigurationStoreListResult) (ConfigurationStoreListResult, error)) ConfigurationStoreListResultPage { + return ConfigurationStoreListResultPage{ + fn: getNextPage, + cslr: cur, + } } // ConfigurationStoreProperties the properties of a configuration store. @@ -534,8 +540,8 @@ type ConfigurationStorePropertiesUpdateParameters struct { PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` } -// ConfigurationStoresCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// ConfigurationStoresCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type ConfigurationStoresCreateFuture struct { azure.Future } @@ -563,8 +569,8 @@ func (future *ConfigurationStoresCreateFuture) Result(client ConfigurationStores return } -// ConfigurationStoresDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// ConfigurationStoresDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type ConfigurationStoresDeleteFuture struct { azure.Future } @@ -586,8 +592,8 @@ func (future *ConfigurationStoresDeleteFuture) Result(client ConfigurationStores return } -// ConfigurationStoresUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// ConfigurationStoresUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type ConfigurationStoresUpdateFuture struct { azure.Future } @@ -812,7 +818,8 @@ type OperationDefinitionListResult struct { NextLink *string `json:"nextLink,omitempty"` } -// OperationDefinitionListResultIterator provides access to a complete listing of OperationDefinition values. +// OperationDefinitionListResultIterator provides access to a complete listing of OperationDefinition +// values. type OperationDefinitionListResultIterator struct { i int page OperationDefinitionListResultPage @@ -955,8 +962,11 @@ func (page OperationDefinitionListResultPage) Values() []OperationDefinition { } // Creates a new instance of the OperationDefinitionListResultPage type. -func NewOperationDefinitionListResultPage(getNextPage func(context.Context, OperationDefinitionListResult) (OperationDefinitionListResult, error)) OperationDefinitionListResultPage { - return OperationDefinitionListResultPage{fn: getNextPage} +func NewOperationDefinitionListResultPage(cur OperationDefinitionListResult, getNextPage func(context.Context, OperationDefinitionListResult) (OperationDefinitionListResult, error)) OperationDefinitionListResultPage { + return OperationDefinitionListResultPage{ + fn: getNextPage, + odlr: cur, + } } // PrivateEndpoint private endpoint which a connection belongs to. @@ -1191,8 +1201,11 @@ func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointCo } // Creates a new instance of the PrivateEndpointConnectionListResultPage type. -func NewPrivateEndpointConnectionListResultPage(getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { - return PrivateEndpointConnectionListResultPage{fn: getNextPage} +func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return PrivateEndpointConnectionListResultPage{ + fn: getNextPage, + peclr: cur, + } } // PrivateEndpointConnectionProperties properties of a private endpoint connection. @@ -1289,8 +1302,8 @@ func (pecr *PrivateEndpointConnectionReference) UnmarshalJSON(body []byte) error return nil } -// PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type PrivateEndpointConnectionsCreateOrUpdateFuture struct { azure.Future } @@ -1423,7 +1436,8 @@ type PrivateLinkResourceListResult struct { NextLink *string `json:"nextLink,omitempty"` } -// PrivateLinkResourceListResultIterator provides access to a complete listing of PrivateLinkResource values. +// PrivateLinkResourceListResultIterator provides access to a complete listing of PrivateLinkResource +// values. type PrivateLinkResourceListResultIterator struct { i int page PrivateLinkResourceListResultPage @@ -1566,8 +1580,11 @@ func (page PrivateLinkResourceListResultPage) Values() []PrivateLinkResource { } // Creates a new instance of the PrivateLinkResourceListResultPage type. -func NewPrivateLinkResourceListResultPage(getNextPage func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)) PrivateLinkResourceListResultPage { - return PrivateLinkResourceListResultPage{fn: getNextPage} +func NewPrivateLinkResourceListResultPage(cur PrivateLinkResourceListResult, getNextPage func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)) PrivateLinkResourceListResultPage { + return PrivateLinkResourceListResultPage{ + fn: getNextPage, + plrlr: cur, + } } // PrivateLinkResourceProperties properties of a private link resource.