From 2b31b66ede17e8548e79672b76a6907b0843ab6b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 1 Dec 2020 06:07:49 +0000 Subject: [PATCH] CodeGen from PR 11807 in Azure/azure-rest-api-specs update examples (#11807) --- .../apimanagement/apidiagnostic.go | 4 +- .../apimanagement/diagnostic.go | 4 +- .../apimanagement/models.go | 344 ++++++++++++------ 3 files changed, 234 insertions(+), 118 deletions(-) diff --git a/services/preview/apimanagement/mgmt/2019-12-01-preview/apimanagement/apidiagnostic.go b/services/preview/apimanagement/mgmt/2019-12-01-preview/apimanagement/apidiagnostic.go index dfb88c4af00b..b28f84813d0e 100644 --- a/services/preview/apimanagement/mgmt/2019-12-01-preview/apimanagement/apidiagnostic.go +++ b/services/preview/apimanagement/mgmt/2019-12-01-preview/apimanagement/apidiagnostic.go @@ -78,8 +78,8 @@ func (client APIDiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGr Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.LoggerID", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.DiagnosticContractProperties.Sampling", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMaximum, Rule: float64(100), Chain: nil}, + {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: float64(0), Chain: nil}, }}, }}, {Target: "parameters.DiagnosticContractProperties.Frontend", Name: validation.Null, Rule: false, diff --git a/services/preview/apimanagement/mgmt/2019-12-01-preview/apimanagement/diagnostic.go b/services/preview/apimanagement/mgmt/2019-12-01-preview/apimanagement/diagnostic.go index b5c3edd479d5..5250394fb3e1 100644 --- a/services/preview/apimanagement/mgmt/2019-12-01-preview/apimanagement/diagnostic.go +++ b/services/preview/apimanagement/mgmt/2019-12-01-preview/apimanagement/diagnostic.go @@ -74,8 +74,8 @@ func (client DiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGroup Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.LoggerID", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.DiagnosticContractProperties.Sampling", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMaximum, Rule: float64(100), Chain: nil}, + {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: float64(0), Chain: nil}, }}, }}, {Target: "parameters.DiagnosticContractProperties.Frontend", Name: validation.Null, Rule: false, diff --git a/services/preview/apimanagement/mgmt/2019-12-01-preview/apimanagement/models.go b/services/preview/apimanagement/mgmt/2019-12-01-preview/apimanagement/models.go index 5ffad83a801b..b85690413a01 100644 --- a/services/preview/apimanagement/mgmt/2019-12-01-preview/apimanagement/models.go +++ b/services/preview/apimanagement/mgmt/2019-12-01-preview/apimanagement/models.go @@ -45,8 +45,8 @@ type AccessInformationContract struct { Enabled *bool `json:"enabled,omitempty"` } -// AccessInformationUpdateParameterProperties tenant access information update parameters of the API Management -// service +// AccessInformationUpdateParameterProperties tenant access information update parameters of the API +// Management service type AccessInformationUpdateParameterProperties struct { // Enabled - Determines whether direct access is enabled. Enabled *bool `json:"enabled,omitempty"` @@ -279,8 +279,11 @@ func (page APICollectionPage) Values() []APIContract { } // Creates a new instance of the APICollectionPage type. -func NewAPICollectionPage(getNextPage func(context.Context, APICollection) (APICollection, error)) APICollectionPage { - return APICollectionPage{fn: getNextPage} +func NewAPICollectionPage(cur APICollection, getNextPage func(context.Context, APICollection) (APICollection, error)) APICollectionPage { + return APICollectionPage{ + fn: getNextPage, + ac: cur, + } } // APIContract api details. @@ -992,8 +995,11 @@ func (page APIReleaseCollectionPage) Values() []APIReleaseContract { } // Creates a new instance of the APIReleaseCollectionPage type. -func NewAPIReleaseCollectionPage(getNextPage func(context.Context, APIReleaseCollection) (APIReleaseCollection, error)) APIReleaseCollectionPage { - return APIReleaseCollectionPage{fn: getNextPage} +func NewAPIReleaseCollectionPage(cur APIReleaseCollection, getNextPage func(context.Context, APIReleaseCollection) (APIReleaseCollection, error)) APIReleaseCollectionPage { + return APIReleaseCollectionPage{ + fn: getNextPage, + arc: cur, + } } // APIReleaseContract apiRelease details. @@ -1245,8 +1251,11 @@ func (page APIRevisionCollectionPage) Values() []APIRevisionContract { } // Creates a new instance of the APIRevisionCollectionPage type. -func NewAPIRevisionCollectionPage(getNextPage func(context.Context, APIRevisionCollection) (APIRevisionCollection, error)) APIRevisionCollectionPage { - return APIRevisionCollectionPage{fn: getNextPage} +func NewAPIRevisionCollectionPage(cur APIRevisionCollection, getNextPage func(context.Context, APIRevisionCollection) (APIRevisionCollection, error)) APIRevisionCollectionPage { + return APIRevisionCollectionPage{ + fn: getNextPage, + arc: cur, + } } // APIRevisionContract summary of revision metadata. @@ -1269,7 +1278,8 @@ type APIRevisionContract struct { IsCurrent *bool `json:"isCurrent,omitempty"` } -// APIRevisionInfoContract object used to create an API Revision or Version based on an existing API Revision +// APIRevisionInfoContract object used to create an API Revision or Version based on an existing API +// Revision type APIRevisionInfoContract struct { // SourceAPIID - Resource identifier of API to be used to create the revision from. SourceAPIID *string `json:"sourceApiId,omitempty"` @@ -1599,8 +1609,11 @@ func (page APIVersionSetCollectionPage) Values() []APIVersionSetContract { } // Creates a new instance of the APIVersionSetCollectionPage type. -func NewAPIVersionSetCollectionPage(getNextPage func(context.Context, APIVersionSetCollection) (APIVersionSetCollection, error)) APIVersionSetCollectionPage { - return APIVersionSetCollectionPage{fn: getNextPage} +func NewAPIVersionSetCollectionPage(cur APIVersionSetCollection, getNextPage func(context.Context, APIVersionSetCollection) (APIVersionSetCollection, error)) APIVersionSetCollectionPage { + return APIVersionSetCollectionPage{ + fn: getNextPage, + avsc: cur, + } } // APIVersionSetContract api Version Set Contract details. @@ -1676,8 +1689,8 @@ func (avsc *APIVersionSetContract) UnmarshalJSON(body []byte) error { return nil } -// APIVersionSetContractDetails an API Version Set contains the common configuration for a set of API Versions -// relating +// APIVersionSetContractDetails an API Version Set contains the common configuration for a set of API +// Versions relating type APIVersionSetContractDetails struct { // ID - Identifier for existing API Version Set. Omit this value to create a new Version Set. ID *string `json:"id,omitempty"` @@ -1867,8 +1880,8 @@ type AuthorizationServerCollection struct { NextLink *string `json:"nextLink,omitempty"` } -// AuthorizationServerCollectionIterator provides access to a complete listing of AuthorizationServerContract -// values. +// AuthorizationServerCollectionIterator provides access to a complete listing of +// AuthorizationServerContract values. type AuthorizationServerCollectionIterator struct { i int page AuthorizationServerCollectionPage @@ -2011,8 +2024,11 @@ func (page AuthorizationServerCollectionPage) Values() []AuthorizationServerCont } // Creates a new instance of the AuthorizationServerCollectionPage type. -func NewAuthorizationServerCollectionPage(getNextPage func(context.Context, AuthorizationServerCollection) (AuthorizationServerCollection, error)) AuthorizationServerCollectionPage { - return AuthorizationServerCollectionPage{fn: getNextPage} +func NewAuthorizationServerCollectionPage(cur AuthorizationServerCollection, getNextPage func(context.Context, AuthorizationServerCollection) (AuthorizationServerCollection, error)) AuthorizationServerCollectionPage { + return AuthorizationServerCollectionPage{ + fn: getNextPage, + asc: cur, + } } // AuthorizationServerContract external OAuth authorization server settings. @@ -2220,7 +2236,8 @@ func (asuc *AuthorizationServerUpdateContract) UnmarshalJSON(body []byte) error return nil } -// AuthorizationServerUpdateContractProperties external OAuth authorization server Update settings contract. +// AuthorizationServerUpdateContractProperties external OAuth authorization server Update settings +// contract. type AuthorizationServerUpdateContractProperties struct { // DisplayName - User-friendly authorization server name. DisplayName *string `json:"displayName,omitempty"` @@ -2434,8 +2451,11 @@ func (page BackendCollectionPage) Values() []BackendContract { } // Creates a new instance of the BackendCollectionPage type. -func NewBackendCollectionPage(getNextPage func(context.Context, BackendCollection) (BackendCollection, error)) BackendCollectionPage { - return BackendCollectionPage{fn: getNextPage} +func NewBackendCollectionPage(cur BackendCollection, getNextPage func(context.Context, BackendCollection) (BackendCollection, error)) BackendCollectionPage { + return BackendCollectionPage{ + fn: getNextPage, + bc: cur, + } } // BackendContract backend details. @@ -2898,8 +2918,11 @@ func (page CacheCollectionPage) Values() []CacheContract { } // Creates a new instance of the CacheCollectionPage type. -func NewCacheCollectionPage(getNextPage func(context.Context, CacheCollection) (CacheCollection, error)) CacheCollectionPage { - return CacheCollectionPage{fn: getNextPage} +func NewCacheCollectionPage(cur CacheCollection, getNextPage func(context.Context, CacheCollection) (CacheCollection, error)) CacheCollectionPage { + return CacheCollectionPage{ + fn: getNextPage, + cc: cur, + } } // CacheContract cache details. @@ -3186,8 +3209,11 @@ func (page CertificateCollectionPage) Values() []CertificateContract { } // Creates a new instance of the CertificateCollectionPage type. -func NewCertificateCollectionPage(getNextPage func(context.Context, CertificateCollection) (CertificateCollection, error)) CertificateCollectionPage { - return CertificateCollectionPage{fn: getNextPage} +func NewCertificateCollectionPage(cur CertificateCollection, getNextPage func(context.Context, CertificateCollection) (CertificateCollection, error)) CertificateCollectionPage { + return CertificateCollectionPage{ + fn: getNextPage, + cc: cur, + } } // CertificateConfiguration certificate configuration which consist of non-trusted intermediates and root @@ -3563,8 +3589,11 @@ func (page DiagnosticCollectionPage) Values() []DiagnosticContract { } // Creates a new instance of the DiagnosticCollectionPage type. -func NewDiagnosticCollectionPage(getNextPage func(context.Context, DiagnosticCollection) (DiagnosticCollection, error)) DiagnosticCollectionPage { - return DiagnosticCollectionPage{fn: getNextPage} +func NewDiagnosticCollectionPage(cur DiagnosticCollection, getNextPage func(context.Context, DiagnosticCollection) (DiagnosticCollection, error)) DiagnosticCollectionPage { + return DiagnosticCollectionPage{ + fn: getNextPage, + dc: cur, + } } // DiagnosticContract diagnostic details. @@ -3812,8 +3841,11 @@ func (page EmailTemplateCollectionPage) Values() []EmailTemplateContract { } // Creates a new instance of the EmailTemplateCollectionPage type. -func NewEmailTemplateCollectionPage(getNextPage func(context.Context, EmailTemplateCollection) (EmailTemplateCollection, error)) EmailTemplateCollectionPage { - return EmailTemplateCollectionPage{fn: getNextPage} +func NewEmailTemplateCollectionPage(cur EmailTemplateCollection, getNextPage func(context.Context, EmailTemplateCollection) (EmailTemplateCollection, error)) EmailTemplateCollectionPage { + return EmailTemplateCollectionPage{ + fn: getNextPage, + etc: cur, + } } // EmailTemplateContract email Template details. @@ -4200,8 +4232,11 @@ func (page GatewayCollectionPage) Values() []GatewayContract { } // Creates a new instance of the GatewayCollectionPage type. -func NewGatewayCollectionPage(getNextPage func(context.Context, GatewayCollection) (GatewayCollection, error)) GatewayCollectionPage { - return GatewayCollectionPage{fn: getNextPage} +func NewGatewayCollectionPage(cur GatewayCollection, getNextPage func(context.Context, GatewayCollection) (GatewayCollection, error)) GatewayCollectionPage { + return GatewayCollectionPage{ + fn: getNextPage, + gc: cur, + } } // GatewayContract gateway details. @@ -4380,7 +4415,8 @@ func (ghcc GatewayHostnameConfigurationCollection) gatewayHostnameConfigurationC autorest.WithBaseURL(to.String(ghcc.NextLink))) } -// GatewayHostnameConfigurationCollectionPage contains a page of GatewayHostnameConfigurationContract values. +// GatewayHostnameConfigurationCollectionPage contains a page of GatewayHostnameConfigurationContract +// values. type GatewayHostnameConfigurationCollectionPage struct { fn func(context.Context, GatewayHostnameConfigurationCollection) (GatewayHostnameConfigurationCollection, error) ghcc GatewayHostnameConfigurationCollection @@ -4438,8 +4474,11 @@ func (page GatewayHostnameConfigurationCollectionPage) Values() []GatewayHostnam } // Creates a new instance of the GatewayHostnameConfigurationCollectionPage type. -func NewGatewayHostnameConfigurationCollectionPage(getNextPage func(context.Context, GatewayHostnameConfigurationCollection) (GatewayHostnameConfigurationCollection, error)) GatewayHostnameConfigurationCollectionPage { - return GatewayHostnameConfigurationCollectionPage{fn: getNextPage} +func NewGatewayHostnameConfigurationCollectionPage(cur GatewayHostnameConfigurationCollection, getNextPage func(context.Context, GatewayHostnameConfigurationCollection) (GatewayHostnameConfigurationCollection, error)) GatewayHostnameConfigurationCollectionPage { + return GatewayHostnameConfigurationCollectionPage{ + fn: getNextPage, + ghcc: cur, + } } // GatewayHostnameConfigurationContract gateway hostname configuration details. @@ -4714,8 +4753,11 @@ func (page GroupCollectionPage) Values() []GroupContract { } // Creates a new instance of the GroupCollectionPage type. -func NewGroupCollectionPage(getNextPage func(context.Context, GroupCollection) (GroupCollection, error)) GroupCollectionPage { - return GroupCollectionPage{fn: getNextPage} +func NewGroupCollectionPage(cur GroupCollection, getNextPage func(context.Context, GroupCollection) (GroupCollection, error)) GroupCollectionPage { + return GroupCollectionPage{ + fn: getNextPage, + gc: cur, + } } // GroupContract contract details. @@ -5046,9 +5088,9 @@ func (ipc *IdentityProviderContract) UnmarshalJSON(body []byte) error { return nil } -// IdentityProviderContractProperties the external Identity Providers like Facebook, Google, Microsoft, Twitter -// or Azure Active Directory which can be used to enable access to the API Management service developer portal -// for all users. +// IdentityProviderContractProperties the external Identity Providers like Facebook, Google, Microsoft, +// Twitter or Azure Active Directory which can be used to enable access to the API Management service +// developer portal for all users. type IdentityProviderContractProperties struct { // ClientID - Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. ClientID *string `json:"clientId,omitempty"` @@ -5144,9 +5186,9 @@ func (ipcc *IdentityProviderCreateContract) UnmarshalJSON(body []byte) error { return nil } -// IdentityProviderCreateContractProperties the external Identity Providers like Facebook, Google, Microsoft, -// Twitter or Azure Active Directory which can be used to enable access to the API Management service developer -// portal for all users. +// IdentityProviderCreateContractProperties the external Identity Providers like Facebook, Google, +// Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management +// service developer portal for all users. type IdentityProviderCreateContractProperties struct { // ClientID - Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. ClientID *string `json:"clientId,omitempty"` @@ -5322,8 +5364,11 @@ func (page IdentityProviderListPage) Values() []IdentityProviderContract { } // Creates a new instance of the IdentityProviderListPage type. -func NewIdentityProviderListPage(getNextPage func(context.Context, IdentityProviderList) (IdentityProviderList, error)) IdentityProviderListPage { - return IdentityProviderListPage{fn: getNextPage} +func NewIdentityProviderListPage(cur IdentityProviderList, getNextPage func(context.Context, IdentityProviderList) (IdentityProviderList, error)) IdentityProviderListPage { + return IdentityProviderListPage{ + fn: getNextPage, + ipl: cur, + } } // IdentityProviderUpdateParameters parameters supplied to update Identity Provider @@ -5398,7 +5443,8 @@ type IssueAttachmentCollection struct { NextLink *string `json:"nextLink,omitempty"` } -// IssueAttachmentCollectionIterator provides access to a complete listing of IssueAttachmentContract values. +// IssueAttachmentCollectionIterator provides access to a complete listing of IssueAttachmentContract +// values. type IssueAttachmentCollectionIterator struct { i int page IssueAttachmentCollectionPage @@ -5541,8 +5587,11 @@ func (page IssueAttachmentCollectionPage) Values() []IssueAttachmentContract { } // Creates a new instance of the IssueAttachmentCollectionPage type. -func NewIssueAttachmentCollectionPage(getNextPage func(context.Context, IssueAttachmentCollection) (IssueAttachmentCollection, error)) IssueAttachmentCollectionPage { - return IssueAttachmentCollectionPage{fn: getNextPage} +func NewIssueAttachmentCollectionPage(cur IssueAttachmentCollection, getNextPage func(context.Context, IssueAttachmentCollection) (IssueAttachmentCollection, error)) IssueAttachmentCollectionPage { + return IssueAttachmentCollectionPage{ + fn: getNextPage, + iac: cur, + } } // IssueAttachmentContract issue Attachment Contract details. @@ -5780,8 +5829,11 @@ func (page IssueCollectionPage) Values() []IssueContract { } // Creates a new instance of the IssueCollectionPage type. -func NewIssueCollectionPage(getNextPage func(context.Context, IssueCollection) (IssueCollection, error)) IssueCollectionPage { - return IssueCollectionPage{fn: getNextPage} +func NewIssueCollectionPage(cur IssueCollection, getNextPage func(context.Context, IssueCollection) (IssueCollection, error)) IssueCollectionPage { + return IssueCollectionPage{ + fn: getNextPage, + ic: cur, + } } // IssueCommentCollection paged Issue Comment list representation. @@ -5936,8 +5988,11 @@ func (page IssueCommentCollectionPage) Values() []IssueCommentContract { } // Creates a new instance of the IssueCommentCollectionPage type. -func NewIssueCommentCollectionPage(getNextPage func(context.Context, IssueCommentCollection) (IssueCommentCollection, error)) IssueCommentCollectionPage { - return IssueCommentCollectionPage{fn: getNextPage} +func NewIssueCommentCollectionPage(cur IssueCommentCollection, getNextPage func(context.Context, IssueCommentCollection) (IssueCommentCollection, error)) IssueCommentCollectionPage { + return IssueCommentCollectionPage{ + fn: getNextPage, + icc: cur, + } } // IssueCommentContract issue Comment Contract details. @@ -6337,8 +6392,11 @@ func (page LoggerCollectionPage) Values() []LoggerContract { } // Creates a new instance of the LoggerCollectionPage type. -func NewLoggerCollectionPage(getNextPage func(context.Context, LoggerCollection) (LoggerCollection, error)) LoggerCollectionPage { - return LoggerCollectionPage{fn: getNextPage} +func NewLoggerCollectionPage(cur LoggerCollection, getNextPage func(context.Context, LoggerCollection) (LoggerCollection, error)) LoggerCollectionPage { + return LoggerCollectionPage{ + fn: getNextPage, + lc: cur, + } } // LoggerContract logger details. @@ -6414,9 +6472,9 @@ func (lc *LoggerContract) UnmarshalJSON(body []byte) error { return nil } -// LoggerContractProperties the Logger entity in API Management represents an event sink that you can use to -// log API Management events. Currently the Logger entity supports logging API Management events to Azure Event -// Hubs. +// LoggerContractProperties the Logger entity in API Management represents an event sink that you can use +// to log API Management events. Currently the Logger entity supports logging API Management events to +// Azure Event Hubs. type LoggerContractProperties struct { // LoggerType - Logger type. Possible values include: 'AzureEventHub', 'ApplicationInsights' LoggerType LoggerType `json:"loggerType,omitempty"` @@ -6673,8 +6731,11 @@ func (page NamedValueCollectionPage) Values() []NamedValueContract { } // Creates a new instance of the NamedValueCollectionPage type. -func NewNamedValueCollectionPage(getNextPage func(context.Context, NamedValueCollection) (NamedValueCollection, error)) NamedValueCollectionPage { - return NamedValueCollectionPage{fn: getNextPage} +func NewNamedValueCollectionPage(cur NamedValueCollection, getNextPage func(context.Context, NamedValueCollection) (NamedValueCollection, error)) NamedValueCollectionPage { + return NamedValueCollectionPage{ + fn: getNextPage, + nvc: cur, + } } // NamedValueContract namedValue details. @@ -6846,8 +6907,8 @@ type NamedValueCreateContractProperties struct { Secret *bool `json:"secret,omitempty"` } -// NamedValueCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// NamedValueCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type NamedValueCreateOrUpdateFuture struct { azure.Future } @@ -6883,7 +6944,8 @@ type NamedValueEntityBaseParameters struct { Secret *bool `json:"secret,omitempty"` } -// NamedValueUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// NamedValueUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type NamedValueUpdateFuture struct { azure.Future } @@ -7131,8 +7193,11 @@ func (page NotificationCollectionPage) Values() []NotificationContract { } // Creates a new instance of the NotificationCollectionPage type. -func NewNotificationCollectionPage(getNextPage func(context.Context, NotificationCollection) (NotificationCollection, error)) NotificationCollectionPage { - return NotificationCollectionPage{fn: getNextPage} +func NewNotificationCollectionPage(cur NotificationCollection, getNextPage func(context.Context, NotificationCollection) (NotificationCollection, error)) NotificationCollectionPage { + return NotificationCollectionPage{ + fn: getNextPage, + nc: cur, + } } // NotificationContract notification details. @@ -7387,8 +7452,11 @@ func (page OpenIDConnectProviderCollectionPage) Values() []OpenidConnectProvider } // Creates a new instance of the OpenIDConnectProviderCollectionPage type. -func NewOpenIDConnectProviderCollectionPage(getNextPage func(context.Context, OpenIDConnectProviderCollection) (OpenIDConnectProviderCollection, error)) OpenIDConnectProviderCollectionPage { - return OpenIDConnectProviderCollectionPage{fn: getNextPage} +func NewOpenIDConnectProviderCollectionPage(cur OpenIDConnectProviderCollection, getNextPage func(context.Context, OpenIDConnectProviderCollection) (OpenIDConnectProviderCollection, error)) OpenIDConnectProviderCollectionPage { + return OpenIDConnectProviderCollectionPage{ + fn: getNextPage, + oicpc: cur, + } } // OpenidConnectProviderContract openId Connect Provider details. @@ -7696,8 +7764,11 @@ func (page OperationCollectionPage) Values() []OperationContract { } // Creates a new instance of the OperationCollectionPage type. -func NewOperationCollectionPage(getNextPage func(context.Context, OperationCollection) (OperationCollection, error)) OperationCollectionPage { - return OperationCollectionPage{fn: getNextPage} +func NewOperationCollectionPage(cur OperationCollection, getNextPage func(context.Context, OperationCollection) (OperationCollection, error)) OperationCollectionPage { + return OperationCollectionPage{ + fn: getNextPage, + oc: cur, + } } // OperationContract api Operation details. @@ -7819,8 +7890,8 @@ type OperationEntityBaseContract struct { Policies *string `json:"policies,omitempty"` } -// OperationListResult result of the request to list REST API operations. It contains a list of operations and -// a URL nextLink to get the next set of results. +// OperationListResult result of the request to list REST API operations. It contains a list of operations +// and a URL nextLink to get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` // Value - List of operations supported by the resource provider. @@ -7972,8 +8043,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, + } } // OperationResultContract operation Result. @@ -8724,8 +8798,11 @@ func (page ProductCollectionPage) Values() []ProductContract { } // Creates a new instance of the ProductCollectionPage type. -func NewProductCollectionPage(getNextPage func(context.Context, ProductCollection) (ProductCollection, error)) ProductCollectionPage { - return ProductCollectionPage{fn: getNextPage} +func NewProductCollectionPage(cur ProductCollection, getNextPage func(context.Context, ProductCollection) (ProductCollection, error)) ProductCollectionPage { + return ProductCollectionPage{ + fn: getNextPage, + pc: cur, + } } // ProductContract product details. @@ -8811,9 +8888,9 @@ type ProductContractProperties struct { Terms *string `json:"terms,omitempty"` // SubscriptionRequired - Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` - // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true. ApprovalRequired *bool `json:"approvalRequired,omitempty"` - // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true. SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"` // State - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Possible values include: 'NotPublished', 'Published' State ProductState `json:"state,omitempty"` @@ -8827,9 +8904,9 @@ type ProductEntityBaseParameters struct { Terms *string `json:"terms,omitempty"` // SubscriptionRequired - Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` - // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true. ApprovalRequired *bool `json:"approvalRequired,omitempty"` - // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true. SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"` // State - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Possible values include: 'NotPublished', 'Published' State ProductState `json:"state,omitempty"` @@ -8847,9 +8924,9 @@ type ProductTagResourceContractProperties struct { Terms *string `json:"terms,omitempty"` // SubscriptionRequired - Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` - // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true. ApprovalRequired *bool `json:"approvalRequired,omitempty"` - // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true. SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"` // State - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Possible values include: 'NotPublished', 'Published' State ProductState `json:"state,omitempty"` @@ -8904,9 +8981,9 @@ type ProductUpdateProperties struct { Terms *string `json:"terms,omitempty"` // SubscriptionRequired - Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` - // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true. ApprovalRequired *bool `json:"approvalRequired,omitempty"` - // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true. SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"` // State - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Possible values include: 'NotPublished', 'Published' State ProductState `json:"state,omitempty"` @@ -9352,8 +9429,11 @@ func (page RegionListResultPage) Values() []RegionContract { } // Creates a new instance of the RegionListResultPage type. -func NewRegionListResultPage(getNextPage func(context.Context, RegionListResult) (RegionListResult, error)) RegionListResultPage { - return RegionListResultPage{fn: getNextPage} +func NewRegionListResultPage(cur RegionListResult, getNextPage func(context.Context, RegionListResult) (RegionListResult, error)) RegionListResultPage { + return RegionListResultPage{ + fn: getNextPage, + rlr: cur, + } } // RegistrationDelegationSettingsProperties user registration delegation settings properties. @@ -9516,8 +9596,11 @@ func (page ReportCollectionPage) Values() []ReportRecordContract { } // Creates a new instance of the ReportCollectionPage type. -func NewReportCollectionPage(getNextPage func(context.Context, ReportCollection) (ReportCollection, error)) ReportCollectionPage { - return ReportCollectionPage{fn: getNextPage} +func NewReportCollectionPage(cur ReportCollection, getNextPage func(context.Context, ReportCollection) (ReportCollection, error)) ReportCollectionPage { + return ReportCollectionPage{ + fn: getNextPage, + rc: cur, + } } // ReportRecordContract report data. @@ -9985,8 +10068,11 @@ func (page ResourceSkuResultsPage) Values() []ResourceSkuResult { } // Creates a new instance of the ResourceSkuResultsPage type. -func NewResourceSkuResultsPage(getNextPage func(context.Context, ResourceSkuResults) (ResourceSkuResults, error)) ResourceSkuResultsPage { - return ResourceSkuResultsPage{fn: getNextPage} +func NewResourceSkuResultsPage(cur ResourceSkuResults, getNextPage func(context.Context, ResourceSkuResults) (ResourceSkuResults, error)) ResourceSkuResultsPage { + return ResourceSkuResultsPage{ + fn: getNextPage, + rsr: cur, + } } // ResponseContract operation response details. @@ -10208,8 +10294,11 @@ func (page SchemaCollectionPage) Values() []SchemaContract { } // Creates a new instance of the SchemaCollectionPage type. -func NewSchemaCollectionPage(getNextPage func(context.Context, SchemaCollection) (SchemaCollection, error)) SchemaCollectionPage { - return SchemaCollectionPage{fn: getNextPage} +func NewSchemaCollectionPage(cur SchemaCollection, getNextPage func(context.Context, SchemaCollection) (SchemaCollection, error)) SchemaCollectionPage { + return SchemaCollectionPage{ + fn: getNextPage, + sc: cur, + } } // SchemaContract schema Contract details. @@ -10346,14 +10435,15 @@ type SchemaDocumentProperties struct { Definitions interface{} `json:"definitions,omitempty"` } -// ServiceApplyNetworkConfigurationParameters parameter supplied to the Apply Network configuration operation. +// ServiceApplyNetworkConfigurationParameters parameter supplied to the Apply Network configuration +// operation. type ServiceApplyNetworkConfigurationParameters struct { // Location - Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. Location *string `json:"location,omitempty"` } -// ServiceApplyNetworkConfigurationUpdatesFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// ServiceApplyNetworkConfigurationUpdatesFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type ServiceApplyNetworkConfigurationUpdatesFuture struct { azure.Future } @@ -10381,7 +10471,8 @@ func (future *ServiceApplyNetworkConfigurationUpdatesFuture) Result(client Servi return } -// ServiceBackupFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ServiceBackupFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ServiceBackupFuture struct { azure.Future } @@ -10539,7 +10630,8 @@ func (future *ServiceCreateOrUpdateFuture) Result(client ServiceClient) (sr Serv return } -// ServiceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ServiceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ServiceDeleteFuture struct { azure.Future } @@ -10753,8 +10845,11 @@ func (page ServiceListResultPage) Values() []ServiceResource { } // Creates a new instance of the ServiceListResultPage type. -func NewServiceListResultPage(getNextPage func(context.Context, ServiceListResult) (ServiceListResult, error)) ServiceListResultPage { - return ServiceListResultPage{fn: getNextPage} +func NewServiceListResultPage(cur ServiceListResult, getNextPage func(context.Context, ServiceListResult) (ServiceListResult, error)) ServiceListResultPage { + return ServiceListResultPage{ + fn: getNextPage, + slr: cur, + } } // ServiceNameAvailabilityResult response of the CheckNameAvailability operation. @@ -11009,7 +11104,8 @@ func (sr *ServiceResource) UnmarshalJSON(body []byte) error { return nil } -// ServiceRestoreFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ServiceRestoreFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ServiceRestoreFuture struct { azure.Future } @@ -11045,7 +11141,8 @@ type ServiceSkuProperties struct { Capacity *int32 `json:"capacity,omitempty"` } -// ServiceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ServiceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ServiceUpdateFuture struct { azure.Future } @@ -11442,8 +11539,11 @@ func (page SubscriptionCollectionPage) Values() []SubscriptionContract { } // Creates a new instance of the SubscriptionCollectionPage type. -func NewSubscriptionCollectionPage(getNextPage func(context.Context, SubscriptionCollection) (SubscriptionCollection, error)) SubscriptionCollectionPage { - return SubscriptionCollectionPage{fn: getNextPage} +func NewSubscriptionCollectionPage(cur SubscriptionCollection, getNextPage func(context.Context, SubscriptionCollection) (SubscriptionCollection, error)) SubscriptionCollectionPage { + return SubscriptionCollectionPage{ + fn: getNextPage, + sc: cur, + } } // SubscriptionContract subscription details. @@ -11884,8 +11984,11 @@ func (page TagCollectionPage) Values() []TagContract { } // Creates a new instance of the TagCollectionPage type. -func NewTagCollectionPage(getNextPage func(context.Context, TagCollection) (TagCollection, error)) TagCollectionPage { - return TagCollectionPage{fn: getNextPage} +func NewTagCollectionPage(cur TagCollection, getNextPage func(context.Context, TagCollection) (TagCollection, error)) TagCollectionPage { + return TagCollectionPage{ + fn: getNextPage, + tc: cur, + } } // TagContract tag Contract details. @@ -12168,8 +12271,11 @@ func (page TagDescriptionCollectionPage) Values() []TagDescriptionContract { } // Creates a new instance of the TagDescriptionCollectionPage type. -func NewTagDescriptionCollectionPage(getNextPage func(context.Context, TagDescriptionCollection) (TagDescriptionCollection, error)) TagDescriptionCollectionPage { - return TagDescriptionCollectionPage{fn: getNextPage} +func NewTagDescriptionCollectionPage(cur TagDescriptionCollection, getNextPage func(context.Context, TagDescriptionCollection) (TagDescriptionCollection, error)) TagDescriptionCollectionPage { + return TagDescriptionCollectionPage{ + fn: getNextPage, + tdc: cur, + } } // TagDescriptionContract contract details. @@ -12450,8 +12556,11 @@ func (page TagResourceCollectionPage) Values() []TagResourceContract { } // Creates a new instance of the TagResourceCollectionPage type. -func NewTagResourceCollectionPage(getNextPage func(context.Context, TagResourceCollection) (TagResourceCollection, error)) TagResourceCollectionPage { - return TagResourceCollectionPage{fn: getNextPage} +func NewTagResourceCollectionPage(cur TagResourceCollection, getNextPage func(context.Context, TagResourceCollection) (TagResourceCollection, error)) TagResourceCollectionPage { + return TagResourceCollectionPage{ + fn: getNextPage, + trc: cur, + } } // TagResourceContract tagResource contract properties. @@ -12474,8 +12583,8 @@ type TagTagResourceContractProperties struct { Name *string `json:"name,omitempty"` } -// TenantConfigurationDeployFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// TenantConfigurationDeployFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type TenantConfigurationDeployFuture struct { azure.Future } @@ -12551,8 +12660,8 @@ type TenantConfigurationSyncStateContract struct { ConfigurationChangeDate *date.Time `json:"configurationChangeDate,omitempty"` } -// TenantConfigurationValidateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// TenantConfigurationValidateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type TenantConfigurationValidateFuture struct { azure.Future } @@ -12750,8 +12859,11 @@ func (page UserCollectionPage) Values() []UserContract { } // Creates a new instance of the UserCollectionPage type. -func NewUserCollectionPage(getNextPage func(context.Context, UserCollection) (UserCollection, error)) UserCollectionPage { - return UserCollectionPage{fn: getNextPage} +func NewUserCollectionPage(cur UserCollection, getNextPage func(context.Context, UserCollection) (UserCollection, error)) UserCollectionPage { + return UserCollectionPage{ + fn: getNextPage, + uc: cur, + } } // UserContract user details. @@ -13099,8 +13211,11 @@ func (page UserIdentityCollectionPage) Values() []UserIdentityContract { } // Creates a new instance of the UserIdentityCollectionPage type. -func NewUserIdentityCollectionPage(getNextPage func(context.Context, UserIdentityCollection) (UserIdentityCollection, error)) UserIdentityCollectionPage { - return UserIdentityCollectionPage{fn: getNextPage} +func NewUserIdentityCollectionPage(cur UserIdentityCollection, getNextPage func(context.Context, UserIdentityCollection) (UserIdentityCollection, error)) UserIdentityCollectionPage { + return UserIdentityCollectionPage{ + fn: getNextPage, + uic: cur, + } } // UserIdentityContract user identity details. @@ -13230,7 +13345,8 @@ type UserUpdateParametersProperties struct { Identities *[]UserIdentityContract `json:"identities,omitempty"` } -// VirtualNetworkConfiguration configuration of a virtual network to which API Management service is deployed. +// VirtualNetworkConfiguration configuration of a virtual network to which API Management service is +// deployed. type VirtualNetworkConfiguration struct { // Vnetid - READ-ONLY; The virtual network ID. This is typically a GUID. Expect a null GUID by default. Vnetid *string `json:"vnetid,omitempty"`