1package apimanagement
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"context"
22	"encoding/json"
23	"github.com/Azure/go-autorest/autorest"
24	"github.com/Azure/go-autorest/autorest/azure"
25	"github.com/Azure/go-autorest/autorest/date"
26	"github.com/Azure/go-autorest/autorest/to"
27	"github.com/Azure/go-autorest/tracing"
28	"net/http"
29)
30
31// The package's fully qualified name.
32const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/ctrl/2017-03-01/apimanagement"
33
34// APIType enumerates the values for api type.
35type APIType string
36
37const (
38	// HTTP ...
39	HTTP APIType = "http"
40	// Soap ...
41	Soap APIType = "soap"
42)
43
44// PossibleAPITypeValues returns an array of possible values for the APIType const type.
45func PossibleAPITypeValues() []APIType {
46	return []APIType{HTTP, Soap}
47}
48
49// AsyncOperationStatus enumerates the values for async operation status.
50type AsyncOperationStatus string
51
52const (
53	// Failed ...
54	Failed AsyncOperationStatus = "Failed"
55	// InProgress ...
56	InProgress AsyncOperationStatus = "InProgress"
57	// Started ...
58	Started AsyncOperationStatus = "Started"
59	// Succeeded ...
60	Succeeded AsyncOperationStatus = "Succeeded"
61)
62
63// PossibleAsyncOperationStatusValues returns an array of possible values for the AsyncOperationStatus const type.
64func PossibleAsyncOperationStatusValues() []AsyncOperationStatus {
65	return []AsyncOperationStatus{Failed, InProgress, Started, Succeeded}
66}
67
68// AuthorizationMethod enumerates the values for authorization method.
69type AuthorizationMethod string
70
71const (
72	// DELETE ...
73	DELETE AuthorizationMethod = "DELETE"
74	// GET ...
75	GET AuthorizationMethod = "GET"
76	// HEAD ...
77	HEAD AuthorizationMethod = "HEAD"
78	// OPTIONS ...
79	OPTIONS AuthorizationMethod = "OPTIONS"
80	// PATCH ...
81	PATCH AuthorizationMethod = "PATCH"
82	// POST ...
83	POST AuthorizationMethod = "POST"
84	// PUT ...
85	PUT AuthorizationMethod = "PUT"
86	// TRACE ...
87	TRACE AuthorizationMethod = "TRACE"
88)
89
90// PossibleAuthorizationMethodValues returns an array of possible values for the AuthorizationMethod const type.
91func PossibleAuthorizationMethodValues() []AuthorizationMethod {
92	return []AuthorizationMethod{DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, TRACE}
93}
94
95// BackendProtocol enumerates the values for backend protocol.
96type BackendProtocol string
97
98const (
99	// BackendProtocolHTTP The Backend is a RESTful service.
100	BackendProtocolHTTP BackendProtocol = "http"
101	// BackendProtocolSoap The Backend is a SOAP service.
102	BackendProtocolSoap BackendProtocol = "soap"
103)
104
105// PossibleBackendProtocolValues returns an array of possible values for the BackendProtocol const type.
106func PossibleBackendProtocolValues() []BackendProtocol {
107	return []BackendProtocol{BackendProtocolHTTP, BackendProtocolSoap}
108}
109
110// BearerTokenSendingMethod enumerates the values for bearer token sending method.
111type BearerTokenSendingMethod string
112
113const (
114	// AuthorizationHeader ...
115	AuthorizationHeader BearerTokenSendingMethod = "authorizationHeader"
116	// Query ...
117	Query BearerTokenSendingMethod = "query"
118)
119
120// PossibleBearerTokenSendingMethodValues returns an array of possible values for the BearerTokenSendingMethod const type.
121func PossibleBearerTokenSendingMethodValues() []BearerTokenSendingMethod {
122	return []BearerTokenSendingMethod{AuthorizationHeader, Query}
123}
124
125// ClientAuthenticationMethod enumerates the values for client authentication method.
126type ClientAuthenticationMethod string
127
128const (
129	// Basic Basic Client Authentication method.
130	Basic ClientAuthenticationMethod = "Basic"
131	// Body Body based Authentication method.
132	Body ClientAuthenticationMethod = "Body"
133)
134
135// PossibleClientAuthenticationMethodValues returns an array of possible values for the ClientAuthenticationMethod const type.
136func PossibleClientAuthenticationMethodValues() []ClientAuthenticationMethod {
137	return []ClientAuthenticationMethod{Basic, Body}
138}
139
140// ContentFormat enumerates the values for content format.
141type ContentFormat string
142
143const (
144	// SwaggerJSON The contents are inline and Content Type if a OpenApi 2.0 Document.
145	SwaggerJSON ContentFormat = "swagger-json"
146	// SwaggerLinkJSON The Open Api 2.0 document is hosted on a publicly accessible internet address.
147	SwaggerLinkJSON ContentFormat = "swagger-link-json"
148	// WadlLinkJSON The WADL document is hosted on a publicly accessible internet address.
149	WadlLinkJSON ContentFormat = "wadl-link-json"
150	// WadlXML The contents are inline and Content type is a WADL document.
151	WadlXML ContentFormat = "wadl-xml"
152	// Wsdl The contents are inline and the document is a WSDL/Soap document.
153	Wsdl ContentFormat = "wsdl"
154	// WsdlLink The WSDL document is hosted on a publicly accessible internet address.
155	WsdlLink ContentFormat = "wsdl-link"
156)
157
158// PossibleContentFormatValues returns an array of possible values for the ContentFormat const type.
159func PossibleContentFormatValues() []ContentFormat {
160	return []ContentFormat{SwaggerJSON, SwaggerLinkJSON, WadlLinkJSON, WadlXML, Wsdl, WsdlLink}
161}
162
163// GrantType enumerates the values for grant type.
164type GrantType string
165
166const (
167	// AuthorizationCode Authorization Code Grant flow as described
168	// https://tools.ietf.org/html/rfc6749#section-4.1.
169	AuthorizationCode GrantType = "authorizationCode"
170	// ClientCredentials Client Credentials Grant flow as described
171	// https://tools.ietf.org/html/rfc6749#section-4.4.
172	ClientCredentials GrantType = "clientCredentials"
173	// Implicit Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2.
174	Implicit GrantType = "implicit"
175	// ResourceOwnerPassword Resource Owner Password Grant flow as described
176	// https://tools.ietf.org/html/rfc6749#section-4.3.
177	ResourceOwnerPassword GrantType = "resourceOwnerPassword"
178)
179
180// PossibleGrantTypeValues returns an array of possible values for the GrantType const type.
181func PossibleGrantTypeValues() []GrantType {
182	return []GrantType{AuthorizationCode, ClientCredentials, Implicit, ResourceOwnerPassword}
183}
184
185// GroupType enumerates the values for group type.
186type GroupType string
187
188const (
189	// Custom ...
190	Custom GroupType = "custom"
191	// External ...
192	External GroupType = "external"
193	// System ...
194	System GroupType = "system"
195)
196
197// PossibleGroupTypeValues returns an array of possible values for the GroupType const type.
198func PossibleGroupTypeValues() []GroupType {
199	return []GroupType{Custom, External, System}
200}
201
202// IdentityProviderType enumerates the values for identity provider type.
203type IdentityProviderType string
204
205const (
206	// Aad Azure Active Directory as Identity provider.
207	Aad IdentityProviderType = "aad"
208	// AadB2C Azure Active Directory B2C as Identity provider.
209	AadB2C IdentityProviderType = "aadB2C"
210	// Facebook Facebook as Identity provider.
211	Facebook IdentityProviderType = "facebook"
212	// Google Google as Identity provider.
213	Google IdentityProviderType = "google"
214	// Microsoft Microsoft Live as Identity provider.
215	Microsoft IdentityProviderType = "microsoft"
216	// Twitter Twitter as Identity provider.
217	Twitter IdentityProviderType = "twitter"
218)
219
220// PossibleIdentityProviderTypeValues returns an array of possible values for the IdentityProviderType const type.
221func PossibleIdentityProviderTypeValues() []IdentityProviderType {
222	return []IdentityProviderType{Aad, AadB2C, Facebook, Google, Microsoft, Twitter}
223}
224
225// KeyType enumerates the values for key type.
226type KeyType string
227
228const (
229	// Primary ...
230	Primary KeyType = "primary"
231	// Secondary ...
232	Secondary KeyType = "secondary"
233)
234
235// PossibleKeyTypeValues returns an array of possible values for the KeyType const type.
236func PossibleKeyTypeValues() []KeyType {
237	return []KeyType{Primary, Secondary}
238}
239
240// LoggerType enumerates the values for logger type.
241type LoggerType string
242
243const (
244	// AzureEventHub Azure Event Hub as log destination.
245	AzureEventHub LoggerType = "azureEventHub"
246)
247
248// PossibleLoggerTypeValues returns an array of possible values for the LoggerType const type.
249func PossibleLoggerTypeValues() []LoggerType {
250	return []LoggerType{AzureEventHub}
251}
252
253// PolicyScopeContract enumerates the values for policy scope contract.
254type PolicyScopeContract string
255
256const (
257	// All ...
258	All PolicyScopeContract = "All"
259	// API ...
260	API PolicyScopeContract = "Api"
261	// Operation ...
262	Operation PolicyScopeContract = "Operation"
263	// Product ...
264	Product PolicyScopeContract = "Product"
265	// Tenant ...
266	Tenant PolicyScopeContract = "Tenant"
267)
268
269// PossiblePolicyScopeContractValues returns an array of possible values for the PolicyScopeContract const type.
270func PossiblePolicyScopeContractValues() []PolicyScopeContract {
271	return []PolicyScopeContract{All, API, Operation, Product, Tenant}
272}
273
274// ProductState enumerates the values for product state.
275type ProductState string
276
277const (
278	// NotPublished ...
279	NotPublished ProductState = "notPublished"
280	// Published ...
281	Published ProductState = "published"
282)
283
284// PossibleProductStateValues returns an array of possible values for the ProductState const type.
285func PossibleProductStateValues() []ProductState {
286	return []ProductState{NotPublished, Published}
287}
288
289// Protocol enumerates the values for protocol.
290type Protocol string
291
292const (
293	// ProtocolHTTP ...
294	ProtocolHTTP Protocol = "http"
295	// ProtocolHTTPS ...
296	ProtocolHTTPS Protocol = "https"
297)
298
299// PossibleProtocolValues returns an array of possible values for the Protocol const type.
300func PossibleProtocolValues() []Protocol {
301	return []Protocol{ProtocolHTTP, ProtocolHTTPS}
302}
303
304// SubscriptionState enumerates the values for subscription state.
305type SubscriptionState string
306
307const (
308	// Active ...
309	Active SubscriptionState = "active"
310	// Cancelled ...
311	Cancelled SubscriptionState = "cancelled"
312	// Expired ...
313	Expired SubscriptionState = "expired"
314	// Rejected ...
315	Rejected SubscriptionState = "rejected"
316	// Submitted ...
317	Submitted SubscriptionState = "submitted"
318	// Suspended ...
319	Suspended SubscriptionState = "suspended"
320)
321
322// PossibleSubscriptionStateValues returns an array of possible values for the SubscriptionState const type.
323func PossibleSubscriptionStateValues() []SubscriptionState {
324	return []SubscriptionState{Active, Cancelled, Expired, Rejected, Submitted, Suspended}
325}
326
327// TemplateName enumerates the values for template name.
328type TemplateName string
329
330const (
331	// AccountClosedDeveloper ...
332	AccountClosedDeveloper TemplateName = "accountClosedDeveloper"
333	// ApplicationApprovedNotificationMessage ...
334	ApplicationApprovedNotificationMessage TemplateName = "applicationApprovedNotificationMessage"
335	// ConfirmSignUpIdentityDefault ...
336	ConfirmSignUpIdentityDefault TemplateName = "confirmSignUpIdentityDefault"
337	// EmailChangeIdentityDefault ...
338	EmailChangeIdentityDefault TemplateName = "emailChangeIdentityDefault"
339	// InviteUserNotificationMessage ...
340	InviteUserNotificationMessage TemplateName = "inviteUserNotificationMessage"
341	// NewCommentNotificationMessage ...
342	NewCommentNotificationMessage TemplateName = "newCommentNotificationMessage"
343	// NewDeveloperNotificationMessage ...
344	NewDeveloperNotificationMessage TemplateName = "newDeveloperNotificationMessage"
345	// NewIssueNotificationMessage ...
346	NewIssueNotificationMessage TemplateName = "newIssueNotificationMessage"
347	// PasswordResetByAdminNotificationMessage ...
348	PasswordResetByAdminNotificationMessage TemplateName = "passwordResetByAdminNotificationMessage"
349	// PasswordResetIdentityDefault ...
350	PasswordResetIdentityDefault TemplateName = "passwordResetIdentityDefault"
351	// PurchaseDeveloperNotificationMessage ...
352	PurchaseDeveloperNotificationMessage TemplateName = "purchaseDeveloperNotificationMessage"
353	// QuotaLimitApproachingDeveloperNotificationMessage ...
354	QuotaLimitApproachingDeveloperNotificationMessage TemplateName = "quotaLimitApproachingDeveloperNotificationMessage"
355	// RejectDeveloperNotificationMessage ...
356	RejectDeveloperNotificationMessage TemplateName = "rejectDeveloperNotificationMessage"
357	// RequestDeveloperNotificationMessage ...
358	RequestDeveloperNotificationMessage TemplateName = "requestDeveloperNotificationMessage"
359)
360
361// PossibleTemplateNameValues returns an array of possible values for the TemplateName const type.
362func PossibleTemplateNameValues() []TemplateName {
363	return []TemplateName{AccountClosedDeveloper, ApplicationApprovedNotificationMessage, ConfirmSignUpIdentityDefault, EmailChangeIdentityDefault, InviteUserNotificationMessage, NewCommentNotificationMessage, NewDeveloperNotificationMessage, NewIssueNotificationMessage, PasswordResetByAdminNotificationMessage, PasswordResetIdentityDefault, PurchaseDeveloperNotificationMessage, QuotaLimitApproachingDeveloperNotificationMessage, RejectDeveloperNotificationMessage, RequestDeveloperNotificationMessage}
364}
365
366// UserState enumerates the values for user state.
367type UserState string
368
369const (
370	// UserStateActive ...
371	UserStateActive UserState = "active"
372	// UserStateBlocked ...
373	UserStateBlocked UserState = "blocked"
374)
375
376// PossibleUserStateValues returns an array of possible values for the UserState const type.
377func PossibleUserStateValues() []UserState {
378	return []UserState{UserStateActive, UserStateBlocked}
379}
380
381// AccessInformationContract tenant access information contract of the API Management service.
382type AccessInformationContract struct {
383	autorest.Response `json:"-"`
384	// ID - Identifier.
385	ID *string `json:"id,omitempty"`
386	// PrimaryKey - Primary access key.
387	PrimaryKey *string `json:"primaryKey,omitempty"`
388	// SecondaryKey - Secondary access key.
389	SecondaryKey *string `json:"secondaryKey,omitempty"`
390	// Enabled - Tenant access information of the API Management service.
391	Enabled *bool `json:"enabled,omitempty"`
392}
393
394// AccessInformationUpdateParameters tenant access information update parameters of the API Management
395// service.
396type AccessInformationUpdateParameters struct {
397	// Enabled - Tenant access information of the API Management service.
398	Enabled *bool `json:"enabled,omitempty"`
399}
400
401// APICollection paged Api list representation.
402type APICollection struct {
403	autorest.Response `json:"-"`
404	Value             *[]APIContract `json:"value,omitempty"`
405	// Count - Total number of entities
406	Count *int32 `json:"count,omitempty"`
407	// NextLink - Next page link if any.
408	NextLink *string `json:"nextLink,omitempty"`
409}
410
411// APICollectionIterator provides access to a complete listing of APIContract values.
412type APICollectionIterator struct {
413	i    int
414	page APICollectionPage
415}
416
417// NextWithContext advances to the next value.  If there was an error making
418// the request the iterator does not advance and the error is returned.
419func (iter *APICollectionIterator) NextWithContext(ctx context.Context) (err error) {
420	if tracing.IsEnabled() {
421		ctx = tracing.StartSpan(ctx, fqdn+"/APICollectionIterator.NextWithContext")
422		defer func() {
423			sc := -1
424			if iter.Response().Response.Response != nil {
425				sc = iter.Response().Response.Response.StatusCode
426			}
427			tracing.EndSpan(ctx, sc, err)
428		}()
429	}
430	iter.i++
431	if iter.i < len(iter.page.Values()) {
432		return nil
433	}
434	err = iter.page.NextWithContext(ctx)
435	if err != nil {
436		iter.i--
437		return err
438	}
439	iter.i = 0
440	return nil
441}
442
443// Next advances to the next value.  If there was an error making
444// the request the iterator does not advance and the error is returned.
445// Deprecated: Use NextWithContext() instead.
446func (iter *APICollectionIterator) Next() error {
447	return iter.NextWithContext(context.Background())
448}
449
450// NotDone returns true if the enumeration should be started or is not yet complete.
451func (iter APICollectionIterator) NotDone() bool {
452	return iter.page.NotDone() && iter.i < len(iter.page.Values())
453}
454
455// Response returns the raw server response from the last page request.
456func (iter APICollectionIterator) Response() APICollection {
457	return iter.page.Response()
458}
459
460// Value returns the current value or a zero-initialized value if the
461// iterator has advanced beyond the end of the collection.
462func (iter APICollectionIterator) Value() APIContract {
463	if !iter.page.NotDone() {
464		return APIContract{}
465	}
466	return iter.page.Values()[iter.i]
467}
468
469// Creates a new instance of the APICollectionIterator type.
470func NewAPICollectionIterator(page APICollectionPage) APICollectionIterator {
471	return APICollectionIterator{page: page}
472}
473
474// IsEmpty returns true if the ListResult contains no values.
475func (ac APICollection) IsEmpty() bool {
476	return ac.Value == nil || len(*ac.Value) == 0
477}
478
479// aPICollectionPreparer prepares a request to retrieve the next set of results.
480// It returns nil if no more results exist.
481func (ac APICollection) aPICollectionPreparer(ctx context.Context) (*http.Request, error) {
482	if ac.NextLink == nil || len(to.String(ac.NextLink)) < 1 {
483		return nil, nil
484	}
485	return autorest.Prepare((&http.Request{}).WithContext(ctx),
486		autorest.AsJSON(),
487		autorest.AsGet(),
488		autorest.WithBaseURL(to.String(ac.NextLink)))
489}
490
491// APICollectionPage contains a page of APIContract values.
492type APICollectionPage struct {
493	fn func(context.Context, APICollection) (APICollection, error)
494	ac APICollection
495}
496
497// NextWithContext advances to the next page of values.  If there was an error making
498// the request the page does not advance and the error is returned.
499func (page *APICollectionPage) NextWithContext(ctx context.Context) (err error) {
500	if tracing.IsEnabled() {
501		ctx = tracing.StartSpan(ctx, fqdn+"/APICollectionPage.NextWithContext")
502		defer func() {
503			sc := -1
504			if page.Response().Response.Response != nil {
505				sc = page.Response().Response.Response.StatusCode
506			}
507			tracing.EndSpan(ctx, sc, err)
508		}()
509	}
510	next, err := page.fn(ctx, page.ac)
511	if err != nil {
512		return err
513	}
514	page.ac = next
515	return nil
516}
517
518// Next advances to the next page of values.  If there was an error making
519// the request the page does not advance and the error is returned.
520// Deprecated: Use NextWithContext() instead.
521func (page *APICollectionPage) Next() error {
522	return page.NextWithContext(context.Background())
523}
524
525// NotDone returns true if the page enumeration should be started or is not yet complete.
526func (page APICollectionPage) NotDone() bool {
527	return !page.ac.IsEmpty()
528}
529
530// Response returns the raw server response from the last page request.
531func (page APICollectionPage) Response() APICollection {
532	return page.ac
533}
534
535// Values returns the slice of values for the current page or nil if there are no values.
536func (page APICollectionPage) Values() []APIContract {
537	if page.ac.IsEmpty() {
538		return nil
539	}
540	return *page.ac.Value
541}
542
543// Creates a new instance of the APICollectionPage type.
544func NewAPICollectionPage(getNextPage func(context.Context, APICollection) (APICollection, error)) APICollectionPage {
545	return APICollectionPage{fn: getNextPage}
546}
547
548// APIContract api Contract Details
549type APIContract struct {
550	autorest.Response `json:"-"`
551	// ID - Identifier of the Entity
552	ID *string `json:"id,omitempty"`
553	// Name - API name.
554	Name *string `json:"name,omitempty"`
555	// ServiceURL - Absolute URL of the backend service implementing this API.
556	ServiceURL *string `json:"serviceUrl,omitempty"`
557	// Path - Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.
558	Path *string `json:"path,omitempty"`
559	// Protocols - Describes on which protocols the operations in this API can be invoked.
560	Protocols *[]Protocol `json:"protocols,omitempty"`
561	// Description - Description of the API. May include HTML formatting tags.
562	Description *string `json:"description,omitempty"`
563	// AuthenticationSettings - Collection of authentication settings included into this API.
564	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
565	// SubscriptionKeyParameterNames - Protocols over which API is made available.
566	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
567	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
568	APIType APIType `json:"type,omitempty"`
569	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
570	APIRevision *string `json:"apiRevision,omitempty"`
571	// IsCurrent - Indicates if API revision is current api revision.
572	IsCurrent *bool `json:"isCurrent,omitempty"`
573	// IsOnline - Indicates if API revision is accessible via the gateway.
574	IsOnline *bool `json:"isOnline,omitempty"`
575}
576
577// APIContractProperties api Entity Properties
578type APIContractProperties struct {
579	// Name - API name.
580	Name *string `json:"name,omitempty"`
581	// ServiceURL - Absolute URL of the backend service implementing this API.
582	ServiceURL *string `json:"serviceUrl,omitempty"`
583	// Path - Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.
584	Path *string `json:"path,omitempty"`
585	// Protocols - Describes on which protocols the operations in this API can be invoked.
586	Protocols *[]Protocol `json:"protocols,omitempty"`
587	// Description - Description of the API. May include HTML formatting tags.
588	Description *string `json:"description,omitempty"`
589	// AuthenticationSettings - Collection of authentication settings included into this API.
590	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
591	// SubscriptionKeyParameterNames - Protocols over which API is made available.
592	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
593	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
594	APIType APIType `json:"type,omitempty"`
595	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
596	APIRevision *string `json:"apiRevision,omitempty"`
597	// IsCurrent - Indicates if API revision is current api revision.
598	IsCurrent *bool `json:"isCurrent,omitempty"`
599	// IsOnline - Indicates if API revision is accessible via the gateway.
600	IsOnline *bool `json:"isOnline,omitempty"`
601}
602
603// APICreateOrUpdateParameter api Create or Update Properties.
604type APICreateOrUpdateParameter struct {
605	// ID - Identifier of the entity
606	ID *string `json:"id,omitempty"`
607	// ContentValue - Content value when Importing an API.
608	ContentValue *string `json:"contentValue,omitempty"`
609	// ContentFormat - Format of the Content in which the API is getting imported. Possible values include: 'WadlXML', 'WadlLinkJSON', 'SwaggerJSON', 'SwaggerLinkJSON', 'Wsdl', 'WsdlLink'
610	ContentFormat ContentFormat `json:"contentFormat,omitempty"`
611	// WsdlSelector - Criteria to limit import of WSDL to a subset of the document.
612	WsdlSelector *APICreateOrUpdateParameterWsdlSelector `json:"wsdlSelector,omitempty"`
613	// Name - API name.
614	Name *string `json:"name,omitempty"`
615	// ServiceURL - Absolute URL of the backend service implementing this API.
616	ServiceURL *string `json:"serviceUrl,omitempty"`
617	// Path - Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.
618	Path *string `json:"path,omitempty"`
619	// Protocols - Describes on which protocols the operations in this API can be invoked.
620	Protocols *[]Protocol `json:"protocols,omitempty"`
621	// Description - Description of the API. May include HTML formatting tags.
622	Description *string `json:"description,omitempty"`
623	// AuthenticationSettings - Collection of authentication settings included into this API.
624	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
625	// SubscriptionKeyParameterNames - Protocols over which API is made available.
626	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
627	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
628	APIType APIType `json:"type,omitempty"`
629	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
630	APIRevision *string `json:"apiRevision,omitempty"`
631	// IsCurrent - Indicates if API revision is current api revision.
632	IsCurrent *bool `json:"isCurrent,omitempty"`
633	// IsOnline - Indicates if API revision is accessible via the gateway.
634	IsOnline *bool `json:"isOnline,omitempty"`
635}
636
637// APICreateOrUpdateParameterWsdlSelector criteria to limit import of WSDL to a subset of the document.
638type APICreateOrUpdateParameterWsdlSelector struct {
639	// WsdlServiceName - Name of service to import from WSDL
640	WsdlServiceName *string `json:"wsdlServiceName,omitempty"`
641	// WsdlEndpointName - Name of endpoint(port) to import from WSDL
642	WsdlEndpointName *string `json:"wsdlEndpointName,omitempty"`
643}
644
645// APIEntityBaseContract API base contract details.
646type APIEntityBaseContract struct {
647	// Description - Description of the API. May include HTML formatting tags.
648	Description *string `json:"description,omitempty"`
649	// AuthenticationSettings - Collection of authentication settings included into this API.
650	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
651	// SubscriptionKeyParameterNames - Protocols over which API is made available.
652	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
653	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
654	APIType APIType `json:"type,omitempty"`
655	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
656	APIRevision *string `json:"apiRevision,omitempty"`
657	// IsCurrent - Indicates if API revision is current api revision.
658	IsCurrent *bool `json:"isCurrent,omitempty"`
659	// IsOnline - Indicates if API revision is accessible via the gateway.
660	IsOnline *bool `json:"isOnline,omitempty"`
661}
662
663// APIExportResult API Export result Blob Uri.
664type APIExportResult struct {
665	autorest.Response `json:"-"`
666	// Link - Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes.
667	Link *string `json:"link,omitempty"`
668}
669
670// APIUpdateContract API update contract properties.
671type APIUpdateContract struct {
672	// Name - API name.
673	Name *string `json:"name,omitempty"`
674	// ServiceURL - Absolute URL of the backend service implementing this API.
675	ServiceURL *string `json:"serviceUrl,omitempty"`
676	// Path - Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.
677	Path *string `json:"path,omitempty"`
678	// Protocols - Describes on which protocols the operations in this API can be invoked.
679	Protocols *[]Protocol `json:"protocols,omitempty"`
680	// Description - Description of the API. May include HTML formatting tags.
681	Description *string `json:"description,omitempty"`
682	// AuthenticationSettings - Collection of authentication settings included into this API.
683	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
684	// SubscriptionKeyParameterNames - Protocols over which API is made available.
685	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
686	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
687	APIType APIType `json:"type,omitempty"`
688	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
689	APIRevision *string `json:"apiRevision,omitempty"`
690	// IsCurrent - Indicates if API revision is current api revision.
691	IsCurrent *bool `json:"isCurrent,omitempty"`
692	// IsOnline - Indicates if API revision is accessible via the gateway.
693	IsOnline *bool `json:"isOnline,omitempty"`
694}
695
696// AuthenticationSettingsContract API Authentication Settings.
697type AuthenticationSettingsContract struct {
698	// OAuth2 - OAuth2 Authentication settings
699	OAuth2 *OAuth2AuthenticationSettingsContract `json:"oAuth2,omitempty"`
700}
701
702// AuthorizationServerCollection paged OAuth2 Authorization Servers list representation.
703type AuthorizationServerCollection struct {
704	autorest.Response `json:"-"`
705	// Value - Page values.
706	Value *[]AuthorizationServerContract `json:"value,omitempty"`
707	// Count - Total record count number across all pages.
708	Count *int64 `json:"count,omitempty"`
709	// NextLink - Next page link if any.
710	NextLink *string `json:"nextLink,omitempty"`
711}
712
713// AuthorizationServerCollectionIterator provides access to a complete listing of
714// AuthorizationServerContract values.
715type AuthorizationServerCollectionIterator struct {
716	i    int
717	page AuthorizationServerCollectionPage
718}
719
720// NextWithContext advances to the next value.  If there was an error making
721// the request the iterator does not advance and the error is returned.
722func (iter *AuthorizationServerCollectionIterator) NextWithContext(ctx context.Context) (err error) {
723	if tracing.IsEnabled() {
724		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerCollectionIterator.NextWithContext")
725		defer func() {
726			sc := -1
727			if iter.Response().Response.Response != nil {
728				sc = iter.Response().Response.Response.StatusCode
729			}
730			tracing.EndSpan(ctx, sc, err)
731		}()
732	}
733	iter.i++
734	if iter.i < len(iter.page.Values()) {
735		return nil
736	}
737	err = iter.page.NextWithContext(ctx)
738	if err != nil {
739		iter.i--
740		return err
741	}
742	iter.i = 0
743	return nil
744}
745
746// Next advances to the next value.  If there was an error making
747// the request the iterator does not advance and the error is returned.
748// Deprecated: Use NextWithContext() instead.
749func (iter *AuthorizationServerCollectionIterator) Next() error {
750	return iter.NextWithContext(context.Background())
751}
752
753// NotDone returns true if the enumeration should be started or is not yet complete.
754func (iter AuthorizationServerCollectionIterator) NotDone() bool {
755	return iter.page.NotDone() && iter.i < len(iter.page.Values())
756}
757
758// Response returns the raw server response from the last page request.
759func (iter AuthorizationServerCollectionIterator) Response() AuthorizationServerCollection {
760	return iter.page.Response()
761}
762
763// Value returns the current value or a zero-initialized value if the
764// iterator has advanced beyond the end of the collection.
765func (iter AuthorizationServerCollectionIterator) Value() AuthorizationServerContract {
766	if !iter.page.NotDone() {
767		return AuthorizationServerContract{}
768	}
769	return iter.page.Values()[iter.i]
770}
771
772// Creates a new instance of the AuthorizationServerCollectionIterator type.
773func NewAuthorizationServerCollectionIterator(page AuthorizationServerCollectionPage) AuthorizationServerCollectionIterator {
774	return AuthorizationServerCollectionIterator{page: page}
775}
776
777// IsEmpty returns true if the ListResult contains no values.
778func (asc AuthorizationServerCollection) IsEmpty() bool {
779	return asc.Value == nil || len(*asc.Value) == 0
780}
781
782// authorizationServerCollectionPreparer prepares a request to retrieve the next set of results.
783// It returns nil if no more results exist.
784func (asc AuthorizationServerCollection) authorizationServerCollectionPreparer(ctx context.Context) (*http.Request, error) {
785	if asc.NextLink == nil || len(to.String(asc.NextLink)) < 1 {
786		return nil, nil
787	}
788	return autorest.Prepare((&http.Request{}).WithContext(ctx),
789		autorest.AsJSON(),
790		autorest.AsGet(),
791		autorest.WithBaseURL(to.String(asc.NextLink)))
792}
793
794// AuthorizationServerCollectionPage contains a page of AuthorizationServerContract values.
795type AuthorizationServerCollectionPage struct {
796	fn  func(context.Context, AuthorizationServerCollection) (AuthorizationServerCollection, error)
797	asc AuthorizationServerCollection
798}
799
800// NextWithContext advances to the next page of values.  If there was an error making
801// the request the page does not advance and the error is returned.
802func (page *AuthorizationServerCollectionPage) NextWithContext(ctx context.Context) (err error) {
803	if tracing.IsEnabled() {
804		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerCollectionPage.NextWithContext")
805		defer func() {
806			sc := -1
807			if page.Response().Response.Response != nil {
808				sc = page.Response().Response.Response.StatusCode
809			}
810			tracing.EndSpan(ctx, sc, err)
811		}()
812	}
813	next, err := page.fn(ctx, page.asc)
814	if err != nil {
815		return err
816	}
817	page.asc = next
818	return nil
819}
820
821// Next advances to the next page of values.  If there was an error making
822// the request the page does not advance and the error is returned.
823// Deprecated: Use NextWithContext() instead.
824func (page *AuthorizationServerCollectionPage) Next() error {
825	return page.NextWithContext(context.Background())
826}
827
828// NotDone returns true if the page enumeration should be started or is not yet complete.
829func (page AuthorizationServerCollectionPage) NotDone() bool {
830	return !page.asc.IsEmpty()
831}
832
833// Response returns the raw server response from the last page request.
834func (page AuthorizationServerCollectionPage) Response() AuthorizationServerCollection {
835	return page.asc
836}
837
838// Values returns the slice of values for the current page or nil if there are no values.
839func (page AuthorizationServerCollectionPage) Values() []AuthorizationServerContract {
840	if page.asc.IsEmpty() {
841		return nil
842	}
843	return *page.asc.Value
844}
845
846// Creates a new instance of the AuthorizationServerCollectionPage type.
847func NewAuthorizationServerCollectionPage(getNextPage func(context.Context, AuthorizationServerCollection) (AuthorizationServerCollection, error)) AuthorizationServerCollectionPage {
848	return AuthorizationServerCollectionPage{fn: getNextPage}
849}
850
851// AuthorizationServerContract external OAuth authorization server settings.
852type AuthorizationServerContract struct {
853	autorest.Response `json:"-"`
854	// ID - Identifier of the Authorization Server entity.
855	ID *string `json:"id,omitempty"`
856	// Name - User-friendly authorization server name.
857	Name *string `json:"name,omitempty"`
858	// ClientRegistrationEndpoint - Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
859	ClientRegistrationEndpoint *string `json:"clientRegistrationEndpoint,omitempty"`
860	// AuthorizationEndpoint - OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
861	AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty"`
862	// GrantTypes - Form of an authorization grant, which the client uses to request the access token.
863	GrantTypes *[]GrantType `json:"grantTypes,omitempty"`
864	// ClientID - Client or app id registered with this authorization server.
865	ClientID *string `json:"clientId,omitempty"`
866	// Description - Description of the authorization server. Can contain HTML formatting tags.
867	Description *string `json:"description,omitempty"`
868	// AuthorizationMethods - HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
869	AuthorizationMethods *[]AuthorizationMethod `json:"authorizationMethods,omitempty"`
870	// ClientAuthenticationMethod - Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
871	ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"`
872	// TokenBodyParameters - Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
873	TokenBodyParameters *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"`
874	// TokenEndpoint - OAuth token endpoint. Contains absolute URI to entity being referenced.
875	TokenEndpoint *string `json:"tokenEndpoint,omitempty"`
876	// SupportState - If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
877	SupportState *bool `json:"supportState,omitempty"`
878	// DefaultScope - Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
879	DefaultScope *string `json:"defaultScope,omitempty"`
880	// BearerTokenSendingMethods - Specifies the mechanism by which access token is passed to the API.
881	BearerTokenSendingMethods *[]BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"`
882	// ClientSecret - Client or app secret registered with this authorization server.
883	ClientSecret *string `json:"clientSecret,omitempty"`
884	// ResourceOwnerUsername - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
885	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`
886	// ResourceOwnerPassword - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
887	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`
888}
889
890// AuthorizationServerContractBaseProperties external OAuth authorization server Update settings contract.
891type AuthorizationServerContractBaseProperties struct {
892	// Description - Description of the authorization server. Can contain HTML formatting tags.
893	Description *string `json:"description,omitempty"`
894	// AuthorizationMethods - HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
895	AuthorizationMethods *[]AuthorizationMethod `json:"authorizationMethods,omitempty"`
896	// ClientAuthenticationMethod - Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
897	ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"`
898	// TokenBodyParameters - Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
899	TokenBodyParameters *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"`
900	// TokenEndpoint - OAuth token endpoint. Contains absolute URI to entity being referenced.
901	TokenEndpoint *string `json:"tokenEndpoint,omitempty"`
902	// SupportState - If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
903	SupportState *bool `json:"supportState,omitempty"`
904	// DefaultScope - Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
905	DefaultScope *string `json:"defaultScope,omitempty"`
906	// BearerTokenSendingMethods - Specifies the mechanism by which access token is passed to the API.
907	BearerTokenSendingMethods *[]BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"`
908	// ClientSecret - Client or app secret registered with this authorization server.
909	ClientSecret *string `json:"clientSecret,omitempty"`
910	// ResourceOwnerUsername - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
911	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`
912	// ResourceOwnerPassword - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
913	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`
914}
915
916// AuthorizationServerContractProperties external OAuth authorization server settings Properties.
917type AuthorizationServerContractProperties struct {
918	// Name - User-friendly authorization server name.
919	Name *string `json:"name,omitempty"`
920	// ClientRegistrationEndpoint - Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
921	ClientRegistrationEndpoint *string `json:"clientRegistrationEndpoint,omitempty"`
922	// AuthorizationEndpoint - OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
923	AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty"`
924	// GrantTypes - Form of an authorization grant, which the client uses to request the access token.
925	GrantTypes *[]GrantType `json:"grantTypes,omitempty"`
926	// ClientID - Client or app id registered with this authorization server.
927	ClientID *string `json:"clientId,omitempty"`
928	// Description - Description of the authorization server. Can contain HTML formatting tags.
929	Description *string `json:"description,omitempty"`
930	// AuthorizationMethods - HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
931	AuthorizationMethods *[]AuthorizationMethod `json:"authorizationMethods,omitempty"`
932	// ClientAuthenticationMethod - Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
933	ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"`
934	// TokenBodyParameters - Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
935	TokenBodyParameters *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"`
936	// TokenEndpoint - OAuth token endpoint. Contains absolute URI to entity being referenced.
937	TokenEndpoint *string `json:"tokenEndpoint,omitempty"`
938	// SupportState - If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
939	SupportState *bool `json:"supportState,omitempty"`
940	// DefaultScope - Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
941	DefaultScope *string `json:"defaultScope,omitempty"`
942	// BearerTokenSendingMethods - Specifies the mechanism by which access token is passed to the API.
943	BearerTokenSendingMethods *[]BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"`
944	// ClientSecret - Client or app secret registered with this authorization server.
945	ClientSecret *string `json:"clientSecret,omitempty"`
946	// ResourceOwnerUsername - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
947	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`
948	// ResourceOwnerPassword - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
949	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`
950}
951
952// AuthorizationServerUpdateContract external OAuth authorization server Update settings contract.
953type AuthorizationServerUpdateContract struct {
954	// Name - User-friendly authorization server name.
955	Name *string `json:"name,omitempty"`
956	// ClientRegistrationEndpoint - Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
957	ClientRegistrationEndpoint *string `json:"clientRegistrationEndpoint,omitempty"`
958	// AuthorizationEndpoint - OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
959	AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty"`
960	// GrantTypes - Form of an authorization grant, which the client uses to request the access token.
961	GrantTypes *[]GrantType `json:"grantTypes,omitempty"`
962	// ClientID - Client or app id registered with this authorization server.
963	ClientID *string `json:"clientId,omitempty"`
964	// Description - Description of the authorization server. Can contain HTML formatting tags.
965	Description *string `json:"description,omitempty"`
966	// AuthorizationMethods - HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
967	AuthorizationMethods *[]AuthorizationMethod `json:"authorizationMethods,omitempty"`
968	// ClientAuthenticationMethod - Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
969	ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"`
970	// TokenBodyParameters - Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
971	TokenBodyParameters *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"`
972	// TokenEndpoint - OAuth token endpoint. Contains absolute URI to entity being referenced.
973	TokenEndpoint *string `json:"tokenEndpoint,omitempty"`
974	// SupportState - If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
975	SupportState *bool `json:"supportState,omitempty"`
976	// DefaultScope - Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
977	DefaultScope *string `json:"defaultScope,omitempty"`
978	// BearerTokenSendingMethods - Specifies the mechanism by which access token is passed to the API.
979	BearerTokenSendingMethods *[]BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"`
980	// ClientSecret - Client or app secret registered with this authorization server.
981	ClientSecret *string `json:"clientSecret,omitempty"`
982	// ResourceOwnerUsername - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
983	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`
984	// ResourceOwnerPassword - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
985	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`
986}
987
988// BackendAuthorizationHeaderCredentials authorization header information.
989type BackendAuthorizationHeaderCredentials struct {
990	// Scheme - Authentication Scheme name.
991	Scheme *string `json:"scheme,omitempty"`
992	// Parameter - Authentication Parameter value.
993	Parameter *string `json:"parameter,omitempty"`
994}
995
996// BackendBaseParameters backend entity base Parameter set.
997type BackendBaseParameters struct {
998	// Title - Backend Title.
999	Title *string `json:"title,omitempty"`
1000	// Description - Backend Description.
1001	Description *string `json:"description,omitempty"`
1002	// ResourceID - Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or Api Apps.
1003	ResourceID *string `json:"resourceId,omitempty"`
1004	// Properties - Backend Properties contract
1005	Properties *BackendProperties `json:"properties,omitempty"`
1006	// Credentials - Backend Credentials Contract Properties
1007	Credentials *BackendCredentialsContract `json:"credentials,omitempty"`
1008	// Proxy - Backend Proxy Contract Properties
1009	Proxy *BackendProxyContract `json:"proxy,omitempty"`
1010	// TLS - Backend TLS Properties
1011	TLS *BackendTLSProperties `json:"tls,omitempty"`
1012}
1013
1014// BackendCollection paged Backend list representation.
1015type BackendCollection struct {
1016	autorest.Response `json:"-"`
1017	// Value - Backend values.
1018	Value *[]BackendContract `json:"value,omitempty"`
1019	// Count - Total number of entities
1020	Count *int32 `json:"count,omitempty"`
1021	// NextLink - Next page link if any.
1022	NextLink *string `json:"nextLink,omitempty"`
1023}
1024
1025// BackendCollectionIterator provides access to a complete listing of BackendContract values.
1026type BackendCollectionIterator struct {
1027	i    int
1028	page BackendCollectionPage
1029}
1030
1031// NextWithContext advances to the next value.  If there was an error making
1032// the request the iterator does not advance and the error is returned.
1033func (iter *BackendCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1034	if tracing.IsEnabled() {
1035		ctx = tracing.StartSpan(ctx, fqdn+"/BackendCollectionIterator.NextWithContext")
1036		defer func() {
1037			sc := -1
1038			if iter.Response().Response.Response != nil {
1039				sc = iter.Response().Response.Response.StatusCode
1040			}
1041			tracing.EndSpan(ctx, sc, err)
1042		}()
1043	}
1044	iter.i++
1045	if iter.i < len(iter.page.Values()) {
1046		return nil
1047	}
1048	err = iter.page.NextWithContext(ctx)
1049	if err != nil {
1050		iter.i--
1051		return err
1052	}
1053	iter.i = 0
1054	return nil
1055}
1056
1057// Next advances to the next value.  If there was an error making
1058// the request the iterator does not advance and the error is returned.
1059// Deprecated: Use NextWithContext() instead.
1060func (iter *BackendCollectionIterator) Next() error {
1061	return iter.NextWithContext(context.Background())
1062}
1063
1064// NotDone returns true if the enumeration should be started or is not yet complete.
1065func (iter BackendCollectionIterator) NotDone() bool {
1066	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1067}
1068
1069// Response returns the raw server response from the last page request.
1070func (iter BackendCollectionIterator) Response() BackendCollection {
1071	return iter.page.Response()
1072}
1073
1074// Value returns the current value or a zero-initialized value if the
1075// iterator has advanced beyond the end of the collection.
1076func (iter BackendCollectionIterator) Value() BackendContract {
1077	if !iter.page.NotDone() {
1078		return BackendContract{}
1079	}
1080	return iter.page.Values()[iter.i]
1081}
1082
1083// Creates a new instance of the BackendCollectionIterator type.
1084func NewBackendCollectionIterator(page BackendCollectionPage) BackendCollectionIterator {
1085	return BackendCollectionIterator{page: page}
1086}
1087
1088// IsEmpty returns true if the ListResult contains no values.
1089func (bc BackendCollection) IsEmpty() bool {
1090	return bc.Value == nil || len(*bc.Value) == 0
1091}
1092
1093// backendCollectionPreparer prepares a request to retrieve the next set of results.
1094// It returns nil if no more results exist.
1095func (bc BackendCollection) backendCollectionPreparer(ctx context.Context) (*http.Request, error) {
1096	if bc.NextLink == nil || len(to.String(bc.NextLink)) < 1 {
1097		return nil, nil
1098	}
1099	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1100		autorest.AsJSON(),
1101		autorest.AsGet(),
1102		autorest.WithBaseURL(to.String(bc.NextLink)))
1103}
1104
1105// BackendCollectionPage contains a page of BackendContract values.
1106type BackendCollectionPage struct {
1107	fn func(context.Context, BackendCollection) (BackendCollection, error)
1108	bc BackendCollection
1109}
1110
1111// NextWithContext advances to the next page of values.  If there was an error making
1112// the request the page does not advance and the error is returned.
1113func (page *BackendCollectionPage) NextWithContext(ctx context.Context) (err error) {
1114	if tracing.IsEnabled() {
1115		ctx = tracing.StartSpan(ctx, fqdn+"/BackendCollectionPage.NextWithContext")
1116		defer func() {
1117			sc := -1
1118			if page.Response().Response.Response != nil {
1119				sc = page.Response().Response.Response.StatusCode
1120			}
1121			tracing.EndSpan(ctx, sc, err)
1122		}()
1123	}
1124	next, err := page.fn(ctx, page.bc)
1125	if err != nil {
1126		return err
1127	}
1128	page.bc = next
1129	return nil
1130}
1131
1132// Next advances to the next page of values.  If there was an error making
1133// the request the page does not advance and the error is returned.
1134// Deprecated: Use NextWithContext() instead.
1135func (page *BackendCollectionPage) Next() error {
1136	return page.NextWithContext(context.Background())
1137}
1138
1139// NotDone returns true if the page enumeration should be started or is not yet complete.
1140func (page BackendCollectionPage) NotDone() bool {
1141	return !page.bc.IsEmpty()
1142}
1143
1144// Response returns the raw server response from the last page request.
1145func (page BackendCollectionPage) Response() BackendCollection {
1146	return page.bc
1147}
1148
1149// Values returns the slice of values for the current page or nil if there are no values.
1150func (page BackendCollectionPage) Values() []BackendContract {
1151	if page.bc.IsEmpty() {
1152		return nil
1153	}
1154	return *page.bc.Value
1155}
1156
1157// Creates a new instance of the BackendCollectionPage type.
1158func NewBackendCollectionPage(getNextPage func(context.Context, BackendCollection) (BackendCollection, error)) BackendCollectionPage {
1159	return BackendCollectionPage{fn: getNextPage}
1160}
1161
1162// BackendContract backend details.
1163type BackendContract struct {
1164	autorest.Response `json:"-"`
1165	// ID - Identifier of the Backend entity.
1166	ID *string `json:"id,omitempty"`
1167	// URL - Runtime Url of the Backend.
1168	URL *string `json:"url,omitempty"`
1169	// Protocol - Backend communication protocol. Possible values include: 'BackendProtocolHTTP', 'BackendProtocolSoap'
1170	Protocol BackendProtocol `json:"protocol,omitempty"`
1171	// Title - Backend Title.
1172	Title *string `json:"title,omitempty"`
1173	// Description - Backend Description.
1174	Description *string `json:"description,omitempty"`
1175	// ResourceID - Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or Api Apps.
1176	ResourceID *string `json:"resourceId,omitempty"`
1177	// Properties - Backend Properties contract
1178	Properties *BackendProperties `json:"properties,omitempty"`
1179	// Credentials - Backend Credentials Contract Properties
1180	Credentials *BackendCredentialsContract `json:"credentials,omitempty"`
1181	// Proxy - Backend Proxy Contract Properties
1182	Proxy *BackendProxyContract `json:"proxy,omitempty"`
1183	// TLS - Backend TLS Properties
1184	TLS *BackendTLSProperties `json:"tls,omitempty"`
1185}
1186
1187// BackendContractProperties parameters supplied to the Create Backend operation.
1188type BackendContractProperties struct {
1189	// URL - Runtime Url of the Backend.
1190	URL *string `json:"url,omitempty"`
1191	// Protocol - Backend communication protocol. Possible values include: 'BackendProtocolHTTP', 'BackendProtocolSoap'
1192	Protocol BackendProtocol `json:"protocol,omitempty"`
1193	// Title - Backend Title.
1194	Title *string `json:"title,omitempty"`
1195	// Description - Backend Description.
1196	Description *string `json:"description,omitempty"`
1197	// ResourceID - Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or Api Apps.
1198	ResourceID *string `json:"resourceId,omitempty"`
1199	// Properties - Backend Properties contract
1200	Properties *BackendProperties `json:"properties,omitempty"`
1201	// Credentials - Backend Credentials Contract Properties
1202	Credentials *BackendCredentialsContract `json:"credentials,omitempty"`
1203	// Proxy - Backend Proxy Contract Properties
1204	Proxy *BackendProxyContract `json:"proxy,omitempty"`
1205	// TLS - Backend TLS Properties
1206	TLS *BackendTLSProperties `json:"tls,omitempty"`
1207}
1208
1209// BackendCredentialsContract details of the Credentials used to connect to Backend.
1210type BackendCredentialsContract struct {
1211	// Certificate - List of Client Certificate Thumbprint.
1212	Certificate *[]string `json:"certificate,omitempty"`
1213	// Query - Query Parameter description.
1214	Query map[string][]string `json:"query"`
1215	// Header - Header Parameter description.
1216	Header map[string][]string `json:"header"`
1217	// Authorization - Authorization header authentication
1218	Authorization *BackendAuthorizationHeaderCredentials `json:"authorization,omitempty"`
1219}
1220
1221// MarshalJSON is the custom marshaler for BackendCredentialsContract.
1222func (bcc BackendCredentialsContract) MarshalJSON() ([]byte, error) {
1223	objectMap := make(map[string]interface{})
1224	if bcc.Certificate != nil {
1225		objectMap["certificate"] = bcc.Certificate
1226	}
1227	if bcc.Query != nil {
1228		objectMap["query"] = bcc.Query
1229	}
1230	if bcc.Header != nil {
1231		objectMap["header"] = bcc.Header
1232	}
1233	if bcc.Authorization != nil {
1234		objectMap["authorization"] = bcc.Authorization
1235	}
1236	return json.Marshal(objectMap)
1237}
1238
1239// BackendProperties properties specific to the Backend Type.
1240type BackendProperties struct {
1241	// ServiceFabricCluster - Backend Service Fabric Cluster Properties
1242	ServiceFabricCluster *BackendServiceFabricClusterProperties `json:"serviceFabricCluster,omitempty"`
1243}
1244
1245// BackendProxyContract details of the Backend WebProxy Server to use in the Request to Backend.
1246type BackendProxyContract struct {
1247	// URL - WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings.
1248	URL *string `json:"url,omitempty"`
1249	// Username - Username to connect to the WebProxy server
1250	Username *string `json:"username,omitempty"`
1251	// Password - Password to connect to the WebProxy Server
1252	Password *string `json:"password,omitempty"`
1253}
1254
1255// BackendServiceFabricClusterProperties properties of the Service Fabric Type Backend.
1256type BackendServiceFabricClusterProperties struct {
1257	// ClientCertificateThumbprint - The client certificate thumbprint for the management endpoint.
1258	ClientCertificateThumbprint *string `json:"clientCertificateThumbprint,omitempty"`
1259	// MaxPartitionResolutionRetries - Maximum number of retries while attempting resolve the partition.
1260	MaxPartitionResolutionRetries *int32 `json:"maxPartitionResolutionRetries,omitempty"`
1261	// PartitionResolutionRequestTimeout - Maximum time allowed to update partition resolution data. Duration needs to be specified using the format PT[n]H[n]M[n]S as per ISO8601
1262	PartitionResolutionRequestTimeout *string `json:"partitionResolutionRequestTimeout,omitempty"`
1263	// ManagementEndpoints - The cluster management endpoint.
1264	ManagementEndpoints *[]string `json:"managementEndpoints,omitempty"`
1265	// ServerCertificateThumbprints - Thumbprints of certificates cluster management service uses for tls communication
1266	ServerCertificateThumbprints *[]string `json:"serverCertificateThumbprints,omitempty"`
1267	// ServerX509Names - Server X509 Certificate Names Collection
1268	ServerX509Names *[]X509CertificateName `json:"serverX509Names,omitempty"`
1269}
1270
1271// BackendTLSProperties properties controlling TLS Certificate Validation.
1272type BackendTLSProperties struct {
1273	// ValidateCertificateChain - Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host.
1274	ValidateCertificateChain *bool `json:"validateCertificateChain,omitempty"`
1275	// ValidateCertificateName - Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host.
1276	ValidateCertificateName *bool `json:"validateCertificateName,omitempty"`
1277}
1278
1279// BackendUpdateParameters parameters supplied to the Update Backend operation.
1280type BackendUpdateParameters struct {
1281	// URL - Runtime Url of the Backend.
1282	URL *string `json:"url,omitempty"`
1283	// Protocol - Backend communication protocol. Possible values include: 'BackendProtocolHTTP', 'BackendProtocolSoap'
1284	Protocol BackendProtocol `json:"protocol,omitempty"`
1285	// Title - Backend Title.
1286	Title *string `json:"title,omitempty"`
1287	// Description - Backend Description.
1288	Description *string `json:"description,omitempty"`
1289	// ResourceID - Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or Api Apps.
1290	ResourceID *string `json:"resourceId,omitempty"`
1291	// Properties - Backend Properties contract
1292	Properties *BackendProperties `json:"properties,omitempty"`
1293	// Credentials - Backend Credentials Contract Properties
1294	Credentials *BackendCredentialsContract `json:"credentials,omitempty"`
1295	// Proxy - Backend Proxy Contract Properties
1296	Proxy *BackendProxyContract `json:"proxy,omitempty"`
1297	// TLS - Backend TLS Properties
1298	TLS *BackendTLSProperties `json:"tls,omitempty"`
1299}
1300
1301// CertificateCollection paged Certificates list representation.
1302type CertificateCollection struct {
1303	autorest.Response `json:"-"`
1304	// Value - Page values.
1305	Value *[]CertificateContract `json:"value,omitempty"`
1306	// Count - Total number of entities
1307	Count *int32 `json:"count,omitempty"`
1308	// NextLink - Next page link if any.
1309	NextLink *string `json:"nextLink,omitempty"`
1310}
1311
1312// CertificateCollectionIterator provides access to a complete listing of CertificateContract values.
1313type CertificateCollectionIterator struct {
1314	i    int
1315	page CertificateCollectionPage
1316}
1317
1318// NextWithContext advances to the next value.  If there was an error making
1319// the request the iterator does not advance and the error is returned.
1320func (iter *CertificateCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1321	if tracing.IsEnabled() {
1322		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionIterator.NextWithContext")
1323		defer func() {
1324			sc := -1
1325			if iter.Response().Response.Response != nil {
1326				sc = iter.Response().Response.Response.StatusCode
1327			}
1328			tracing.EndSpan(ctx, sc, err)
1329		}()
1330	}
1331	iter.i++
1332	if iter.i < len(iter.page.Values()) {
1333		return nil
1334	}
1335	err = iter.page.NextWithContext(ctx)
1336	if err != nil {
1337		iter.i--
1338		return err
1339	}
1340	iter.i = 0
1341	return nil
1342}
1343
1344// Next advances to the next value.  If there was an error making
1345// the request the iterator does not advance and the error is returned.
1346// Deprecated: Use NextWithContext() instead.
1347func (iter *CertificateCollectionIterator) Next() error {
1348	return iter.NextWithContext(context.Background())
1349}
1350
1351// NotDone returns true if the enumeration should be started or is not yet complete.
1352func (iter CertificateCollectionIterator) NotDone() bool {
1353	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1354}
1355
1356// Response returns the raw server response from the last page request.
1357func (iter CertificateCollectionIterator) Response() CertificateCollection {
1358	return iter.page.Response()
1359}
1360
1361// Value returns the current value or a zero-initialized value if the
1362// iterator has advanced beyond the end of the collection.
1363func (iter CertificateCollectionIterator) Value() CertificateContract {
1364	if !iter.page.NotDone() {
1365		return CertificateContract{}
1366	}
1367	return iter.page.Values()[iter.i]
1368}
1369
1370// Creates a new instance of the CertificateCollectionIterator type.
1371func NewCertificateCollectionIterator(page CertificateCollectionPage) CertificateCollectionIterator {
1372	return CertificateCollectionIterator{page: page}
1373}
1374
1375// IsEmpty returns true if the ListResult contains no values.
1376func (cc CertificateCollection) IsEmpty() bool {
1377	return cc.Value == nil || len(*cc.Value) == 0
1378}
1379
1380// certificateCollectionPreparer prepares a request to retrieve the next set of results.
1381// It returns nil if no more results exist.
1382func (cc CertificateCollection) certificateCollectionPreparer(ctx context.Context) (*http.Request, error) {
1383	if cc.NextLink == nil || len(to.String(cc.NextLink)) < 1 {
1384		return nil, nil
1385	}
1386	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1387		autorest.AsJSON(),
1388		autorest.AsGet(),
1389		autorest.WithBaseURL(to.String(cc.NextLink)))
1390}
1391
1392// CertificateCollectionPage contains a page of CertificateContract values.
1393type CertificateCollectionPage struct {
1394	fn func(context.Context, CertificateCollection) (CertificateCollection, error)
1395	cc CertificateCollection
1396}
1397
1398// NextWithContext advances to the next page of values.  If there was an error making
1399// the request the page does not advance and the error is returned.
1400func (page *CertificateCollectionPage) NextWithContext(ctx context.Context) (err error) {
1401	if tracing.IsEnabled() {
1402		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionPage.NextWithContext")
1403		defer func() {
1404			sc := -1
1405			if page.Response().Response.Response != nil {
1406				sc = page.Response().Response.Response.StatusCode
1407			}
1408			tracing.EndSpan(ctx, sc, err)
1409		}()
1410	}
1411	next, err := page.fn(ctx, page.cc)
1412	if err != nil {
1413		return err
1414	}
1415	page.cc = next
1416	return nil
1417}
1418
1419// Next advances to the next page of values.  If there was an error making
1420// the request the page does not advance and the error is returned.
1421// Deprecated: Use NextWithContext() instead.
1422func (page *CertificateCollectionPage) Next() error {
1423	return page.NextWithContext(context.Background())
1424}
1425
1426// NotDone returns true if the page enumeration should be started or is not yet complete.
1427func (page CertificateCollectionPage) NotDone() bool {
1428	return !page.cc.IsEmpty()
1429}
1430
1431// Response returns the raw server response from the last page request.
1432func (page CertificateCollectionPage) Response() CertificateCollection {
1433	return page.cc
1434}
1435
1436// Values returns the slice of values for the current page or nil if there are no values.
1437func (page CertificateCollectionPage) Values() []CertificateContract {
1438	if page.cc.IsEmpty() {
1439		return nil
1440	}
1441	return *page.cc.Value
1442}
1443
1444// Creates a new instance of the CertificateCollectionPage type.
1445func NewCertificateCollectionPage(getNextPage func(context.Context, CertificateCollection) (CertificateCollection, error)) CertificateCollectionPage {
1446	return CertificateCollectionPage{fn: getNextPage}
1447}
1448
1449// CertificateContract certificate details.
1450type CertificateContract struct {
1451	autorest.Response `json:"-"`
1452	// ID - Identifier of the Certificate entity.
1453	ID *string `json:"id,omitempty"`
1454	// Subject - Subject attribute of the certificate.
1455	Subject *string `json:"subject,omitempty"`
1456	// Thumbprint - Thumbprint of the certificate.
1457	Thumbprint *string `json:"thumbprint,omitempty"`
1458	// ExpirationDate - Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
1459	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
1460}
1461
1462// CertificateContractProperties properties of the Certificate contract.
1463type CertificateContractProperties struct {
1464	// Subject - Subject attribute of the certificate.
1465	Subject *string `json:"subject,omitempty"`
1466	// Thumbprint - Thumbprint of the certificate.
1467	Thumbprint *string `json:"thumbprint,omitempty"`
1468	// ExpirationDate - Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
1469	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
1470}
1471
1472// CertificateCreateOrUpdateParameters parameters supplied to the CreateOrUpdate certificate operation.
1473type CertificateCreateOrUpdateParameters struct {
1474	// Data - Base 64 encoded certificate using the application/x-pkcs12 representation.
1475	Data *string `json:"data,omitempty"`
1476	// Password - Password for the Certificate
1477	Password *string `json:"password,omitempty"`
1478}
1479
1480// DeployConfigurationParameters parameters supplied to the Deploy Configuration operation.
1481type DeployConfigurationParameters struct {
1482	// Branch - The name of the Git branch from which the configuration is to be deployed to the configuration database.
1483	Branch *string `json:"branch,omitempty"`
1484	// Force - The value enforcing deleting subscriptions to products that are deleted in this update.
1485	Force *bool `json:"force,omitempty"`
1486}
1487
1488// EmailTemplateCollection paged email template list representation.
1489type EmailTemplateCollection struct {
1490	autorest.Response `json:"-"`
1491	// Value - Page values.
1492	Value *[]EmailTemplateContract `json:"value,omitempty"`
1493	// Count - Total number of entities
1494	Count *int32 `json:"count,omitempty"`
1495	// NextLink - Next page link if any.
1496	NextLink *string `json:"nextLink,omitempty"`
1497}
1498
1499// EmailTemplateCollectionIterator provides access to a complete listing of EmailTemplateContract values.
1500type EmailTemplateCollectionIterator struct {
1501	i    int
1502	page EmailTemplateCollectionPage
1503}
1504
1505// NextWithContext advances to the next value.  If there was an error making
1506// the request the iterator does not advance and the error is returned.
1507func (iter *EmailTemplateCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1508	if tracing.IsEnabled() {
1509		ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateCollectionIterator.NextWithContext")
1510		defer func() {
1511			sc := -1
1512			if iter.Response().Response.Response != nil {
1513				sc = iter.Response().Response.Response.StatusCode
1514			}
1515			tracing.EndSpan(ctx, sc, err)
1516		}()
1517	}
1518	iter.i++
1519	if iter.i < len(iter.page.Values()) {
1520		return nil
1521	}
1522	err = iter.page.NextWithContext(ctx)
1523	if err != nil {
1524		iter.i--
1525		return err
1526	}
1527	iter.i = 0
1528	return nil
1529}
1530
1531// Next advances to the next value.  If there was an error making
1532// the request the iterator does not advance and the error is returned.
1533// Deprecated: Use NextWithContext() instead.
1534func (iter *EmailTemplateCollectionIterator) Next() error {
1535	return iter.NextWithContext(context.Background())
1536}
1537
1538// NotDone returns true if the enumeration should be started or is not yet complete.
1539func (iter EmailTemplateCollectionIterator) NotDone() bool {
1540	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1541}
1542
1543// Response returns the raw server response from the last page request.
1544func (iter EmailTemplateCollectionIterator) Response() EmailTemplateCollection {
1545	return iter.page.Response()
1546}
1547
1548// Value returns the current value or a zero-initialized value if the
1549// iterator has advanced beyond the end of the collection.
1550func (iter EmailTemplateCollectionIterator) Value() EmailTemplateContract {
1551	if !iter.page.NotDone() {
1552		return EmailTemplateContract{}
1553	}
1554	return iter.page.Values()[iter.i]
1555}
1556
1557// Creates a new instance of the EmailTemplateCollectionIterator type.
1558func NewEmailTemplateCollectionIterator(page EmailTemplateCollectionPage) EmailTemplateCollectionIterator {
1559	return EmailTemplateCollectionIterator{page: page}
1560}
1561
1562// IsEmpty returns true if the ListResult contains no values.
1563func (etc EmailTemplateCollection) IsEmpty() bool {
1564	return etc.Value == nil || len(*etc.Value) == 0
1565}
1566
1567// emailTemplateCollectionPreparer prepares a request to retrieve the next set of results.
1568// It returns nil if no more results exist.
1569func (etc EmailTemplateCollection) emailTemplateCollectionPreparer(ctx context.Context) (*http.Request, error) {
1570	if etc.NextLink == nil || len(to.String(etc.NextLink)) < 1 {
1571		return nil, nil
1572	}
1573	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1574		autorest.AsJSON(),
1575		autorest.AsGet(),
1576		autorest.WithBaseURL(to.String(etc.NextLink)))
1577}
1578
1579// EmailTemplateCollectionPage contains a page of EmailTemplateContract values.
1580type EmailTemplateCollectionPage struct {
1581	fn  func(context.Context, EmailTemplateCollection) (EmailTemplateCollection, error)
1582	etc EmailTemplateCollection
1583}
1584
1585// NextWithContext advances to the next page of values.  If there was an error making
1586// the request the page does not advance and the error is returned.
1587func (page *EmailTemplateCollectionPage) NextWithContext(ctx context.Context) (err error) {
1588	if tracing.IsEnabled() {
1589		ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateCollectionPage.NextWithContext")
1590		defer func() {
1591			sc := -1
1592			if page.Response().Response.Response != nil {
1593				sc = page.Response().Response.Response.StatusCode
1594			}
1595			tracing.EndSpan(ctx, sc, err)
1596		}()
1597	}
1598	next, err := page.fn(ctx, page.etc)
1599	if err != nil {
1600		return err
1601	}
1602	page.etc = next
1603	return nil
1604}
1605
1606// Next advances to the next page of values.  If there was an error making
1607// the request the page does not advance and the error is returned.
1608// Deprecated: Use NextWithContext() instead.
1609func (page *EmailTemplateCollectionPage) Next() error {
1610	return page.NextWithContext(context.Background())
1611}
1612
1613// NotDone returns true if the page enumeration should be started or is not yet complete.
1614func (page EmailTemplateCollectionPage) NotDone() bool {
1615	return !page.etc.IsEmpty()
1616}
1617
1618// Response returns the raw server response from the last page request.
1619func (page EmailTemplateCollectionPage) Response() EmailTemplateCollection {
1620	return page.etc
1621}
1622
1623// Values returns the slice of values for the current page or nil if there are no values.
1624func (page EmailTemplateCollectionPage) Values() []EmailTemplateContract {
1625	if page.etc.IsEmpty() {
1626		return nil
1627	}
1628	return *page.etc.Value
1629}
1630
1631// Creates a new instance of the EmailTemplateCollectionPage type.
1632func NewEmailTemplateCollectionPage(getNextPage func(context.Context, EmailTemplateCollection) (EmailTemplateCollection, error)) EmailTemplateCollectionPage {
1633	return EmailTemplateCollectionPage{fn: getNextPage}
1634}
1635
1636// EmailTemplateContract email Template details.
1637type EmailTemplateContract struct {
1638	autorest.Response `json:"-"`
1639	// ID - Identifier of the Template Contract.
1640	ID *string `json:"id,omitempty"`
1641	// Subject - Subject of the Template.
1642	Subject *string `json:"subject,omitempty"`
1643	// Body - Email Template Body. This should be a valid XDocument
1644	Body *string `json:"body,omitempty"`
1645	// Title - Title of the Template.
1646	Title *string `json:"title,omitempty"`
1647	// Description - Description of the Email Template.
1648	Description *string `json:"description,omitempty"`
1649	// IsDefault - READ-ONLY; Whether the template is the default template provided by Api Management or has been edited.
1650	IsDefault *bool `json:"isDefault,omitempty"`
1651	// Parameters - Email Template Parameter values.
1652	Parameters *[]EmailTemplateParametersContractProperties `json:"parameters,omitempty"`
1653}
1654
1655// EmailTemplateContractProperties email Template Contract properties.
1656type EmailTemplateContractProperties struct {
1657	// Subject - Subject of the Template.
1658	Subject *string `json:"subject,omitempty"`
1659	// Body - Email Template Body. This should be a valid XDocument
1660	Body *string `json:"body,omitempty"`
1661	// Title - Title of the Template.
1662	Title *string `json:"title,omitempty"`
1663	// Description - Description of the Email Template.
1664	Description *string `json:"description,omitempty"`
1665	// IsDefault - READ-ONLY; Whether the template is the default template provided by Api Management or has been edited.
1666	IsDefault *bool `json:"isDefault,omitempty"`
1667	// Parameters - Email Template Parameter values.
1668	Parameters *[]EmailTemplateParametersContractProperties `json:"parameters,omitempty"`
1669}
1670
1671// EmailTemplateParametersContractProperties email Template Parameter contract.
1672type EmailTemplateParametersContractProperties struct {
1673	// Name - Template parameter name.
1674	Name *string `json:"name,omitempty"`
1675	// Title - Template parameter title.
1676	Title *string `json:"title,omitempty"`
1677	// Description - Template parameter description.
1678	Description *string `json:"description,omitempty"`
1679}
1680
1681// EmailTemplateUpdateParameters email Template Update Contract properties.
1682type EmailTemplateUpdateParameters struct {
1683	// Subject - Subject of the Template.
1684	Subject *string `json:"subject,omitempty"`
1685	// Title - Title of the Template.
1686	Title *string `json:"title,omitempty"`
1687	// Description - Description of the Email Template.
1688	Description *string `json:"description,omitempty"`
1689	// Body - Email Template Body. This should be a valid XDocument
1690	Body *string `json:"body,omitempty"`
1691	// Parameters - Email Template Parameter values.
1692	Parameters *[]EmailTemplateParametersContractProperties `json:"parameters,omitempty"`
1693}
1694
1695// ErrorFieldContract error Field contract.
1696type ErrorFieldContract struct {
1697	// Code - Property level error code.
1698	Code *string `json:"code,omitempty"`
1699	// Message - Human-readable representation of property-level error.
1700	Message *string `json:"message,omitempty"`
1701	// Target - Property name.
1702	Target *string `json:"target,omitempty"`
1703}
1704
1705// ErrorResponse error Body contract.
1706type ErrorResponse struct {
1707	// Code - Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
1708	Code *string `json:"code,omitempty"`
1709	// Message - Human-readable representation of the error.
1710	Message *string `json:"message,omitempty"`
1711	// Details - The list of invalid fields send in request, in case of validation error.
1712	Details *[]ErrorFieldContract `json:"details,omitempty"`
1713}
1714
1715// GenerateSsoURLResult generate SSO Url operations response details.
1716type GenerateSsoURLResult struct {
1717	autorest.Response `json:"-"`
1718	// Value - Redirect Url containing the SSO URL value.
1719	Value *string `json:"value,omitempty"`
1720}
1721
1722// GroupCollection paged Group list representation.
1723type GroupCollection struct {
1724	autorest.Response `json:"-"`
1725	// Value - Page values.
1726	Value *[]GroupContract `json:"value,omitempty"`
1727	// Count - Total number of entities
1728	Count *int32 `json:"count,omitempty"`
1729	// NextLink - Next page link if any.
1730	NextLink *string `json:"nextLink,omitempty"`
1731}
1732
1733// GroupCollectionIterator provides access to a complete listing of GroupContract values.
1734type GroupCollectionIterator struct {
1735	i    int
1736	page GroupCollectionPage
1737}
1738
1739// NextWithContext advances to the next value.  If there was an error making
1740// the request the iterator does not advance and the error is returned.
1741func (iter *GroupCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1742	if tracing.IsEnabled() {
1743		ctx = tracing.StartSpan(ctx, fqdn+"/GroupCollectionIterator.NextWithContext")
1744		defer func() {
1745			sc := -1
1746			if iter.Response().Response.Response != nil {
1747				sc = iter.Response().Response.Response.StatusCode
1748			}
1749			tracing.EndSpan(ctx, sc, err)
1750		}()
1751	}
1752	iter.i++
1753	if iter.i < len(iter.page.Values()) {
1754		return nil
1755	}
1756	err = iter.page.NextWithContext(ctx)
1757	if err != nil {
1758		iter.i--
1759		return err
1760	}
1761	iter.i = 0
1762	return nil
1763}
1764
1765// Next advances to the next value.  If there was an error making
1766// the request the iterator does not advance and the error is returned.
1767// Deprecated: Use NextWithContext() instead.
1768func (iter *GroupCollectionIterator) Next() error {
1769	return iter.NextWithContext(context.Background())
1770}
1771
1772// NotDone returns true if the enumeration should be started or is not yet complete.
1773func (iter GroupCollectionIterator) NotDone() bool {
1774	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1775}
1776
1777// Response returns the raw server response from the last page request.
1778func (iter GroupCollectionIterator) Response() GroupCollection {
1779	return iter.page.Response()
1780}
1781
1782// Value returns the current value or a zero-initialized value if the
1783// iterator has advanced beyond the end of the collection.
1784func (iter GroupCollectionIterator) Value() GroupContract {
1785	if !iter.page.NotDone() {
1786		return GroupContract{}
1787	}
1788	return iter.page.Values()[iter.i]
1789}
1790
1791// Creates a new instance of the GroupCollectionIterator type.
1792func NewGroupCollectionIterator(page GroupCollectionPage) GroupCollectionIterator {
1793	return GroupCollectionIterator{page: page}
1794}
1795
1796// IsEmpty returns true if the ListResult contains no values.
1797func (gc GroupCollection) IsEmpty() bool {
1798	return gc.Value == nil || len(*gc.Value) == 0
1799}
1800
1801// groupCollectionPreparer prepares a request to retrieve the next set of results.
1802// It returns nil if no more results exist.
1803func (gc GroupCollection) groupCollectionPreparer(ctx context.Context) (*http.Request, error) {
1804	if gc.NextLink == nil || len(to.String(gc.NextLink)) < 1 {
1805		return nil, nil
1806	}
1807	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1808		autorest.AsJSON(),
1809		autorest.AsGet(),
1810		autorest.WithBaseURL(to.String(gc.NextLink)))
1811}
1812
1813// GroupCollectionPage contains a page of GroupContract values.
1814type GroupCollectionPage struct {
1815	fn func(context.Context, GroupCollection) (GroupCollection, error)
1816	gc GroupCollection
1817}
1818
1819// NextWithContext advances to the next page of values.  If there was an error making
1820// the request the page does not advance and the error is returned.
1821func (page *GroupCollectionPage) NextWithContext(ctx context.Context) (err error) {
1822	if tracing.IsEnabled() {
1823		ctx = tracing.StartSpan(ctx, fqdn+"/GroupCollectionPage.NextWithContext")
1824		defer func() {
1825			sc := -1
1826			if page.Response().Response.Response != nil {
1827				sc = page.Response().Response.Response.StatusCode
1828			}
1829			tracing.EndSpan(ctx, sc, err)
1830		}()
1831	}
1832	next, err := page.fn(ctx, page.gc)
1833	if err != nil {
1834		return err
1835	}
1836	page.gc = next
1837	return nil
1838}
1839
1840// Next advances to the next page of values.  If there was an error making
1841// the request the page does not advance and the error is returned.
1842// Deprecated: Use NextWithContext() instead.
1843func (page *GroupCollectionPage) Next() error {
1844	return page.NextWithContext(context.Background())
1845}
1846
1847// NotDone returns true if the page enumeration should be started or is not yet complete.
1848func (page GroupCollectionPage) NotDone() bool {
1849	return !page.gc.IsEmpty()
1850}
1851
1852// Response returns the raw server response from the last page request.
1853func (page GroupCollectionPage) Response() GroupCollection {
1854	return page.gc
1855}
1856
1857// Values returns the slice of values for the current page or nil if there are no values.
1858func (page GroupCollectionPage) Values() []GroupContract {
1859	if page.gc.IsEmpty() {
1860		return nil
1861	}
1862	return *page.gc.Value
1863}
1864
1865// Creates a new instance of the GroupCollectionPage type.
1866func NewGroupCollectionPage(getNextPage func(context.Context, GroupCollection) (GroupCollection, error)) GroupCollectionPage {
1867	return GroupCollectionPage{fn: getNextPage}
1868}
1869
1870// GroupContract contract details.
1871type GroupContract struct {
1872	autorest.Response `json:"-"`
1873	// ID - Identifier of the Group entity.
1874	ID *string `json:"id,omitempty"`
1875	// Name - Group name.
1876	Name *string `json:"name,omitempty"`
1877	// Description - Group description. Can contain HTML formatting tags.
1878	Description *string `json:"description,omitempty"`
1879	// BuiltIn - READ-ONLY; true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
1880	BuiltIn *bool `json:"builtIn,omitempty"`
1881	// Type - Group type. Possible values include: 'Custom', 'System', 'External'
1882	Type GroupType `json:"type,omitempty"`
1883	// ExternalID - For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory aad://<tenant>.onmicrosoft.com/groups/<group object id>; otherwise the value is null.
1884	ExternalID *string `json:"externalId,omitempty"`
1885}
1886
1887// GroupContractProperties developer group.
1888type GroupContractProperties struct {
1889	// Name - Group name.
1890	Name *string `json:"name,omitempty"`
1891	// Description - Group description. Can contain HTML formatting tags.
1892	Description *string `json:"description,omitempty"`
1893	// BuiltIn - READ-ONLY; true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
1894	BuiltIn *bool `json:"builtIn,omitempty"`
1895	// Type - Group type. Possible values include: 'Custom', 'System', 'External'
1896	Type GroupType `json:"type,omitempty"`
1897	// ExternalID - For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory aad://<tenant>.onmicrosoft.com/groups/<group object id>; otherwise the value is null.
1898	ExternalID *string `json:"externalId,omitempty"`
1899}
1900
1901// GroupCreateParameters parameters supplied to the Create Group operation.
1902type GroupCreateParameters struct {
1903	// Name - Group name.
1904	Name *string `json:"name,omitempty"`
1905	// Description - Group description.
1906	Description *string `json:"description,omitempty"`
1907	// Type - Group type. Possible values include: 'Custom', 'System', 'External'
1908	Type GroupType `json:"type,omitempty"`
1909	// ExternalID - Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory aad://<tenant>.onmicrosoft.com/groups/<group object id>; otherwise the value is null.
1910	ExternalID *string `json:"externalId,omitempty"`
1911}
1912
1913// GroupUpdateParameters parameters supplied to the Update Group operation.
1914type GroupUpdateParameters struct {
1915	// Name - Group name.
1916	Name *string `json:"name,omitempty"`
1917	// Description - Group description.
1918	Description *string `json:"description,omitempty"`
1919	// Type - Group type. Possible values include: 'Custom', 'System', 'External'
1920	Type GroupType `json:"type,omitempty"`
1921	// ExternalID - Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory aad://<tenant>.onmicrosoft.com/groups/<group object id>; otherwise the value is null.
1922	ExternalID *string `json:"externalId,omitempty"`
1923}
1924
1925// IdentityProviderBaseParameters identity Provider Base Parameter Properties.
1926type IdentityProviderBaseParameters struct {
1927	// Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C'
1928	Type IdentityProviderType `json:"type,omitempty"`
1929	// AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login.
1930	AllowedTenants *[]string `json:"allowedTenants,omitempty"`
1931	// SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider.
1932	SignupPolicyName *string `json:"signupPolicyName,omitempty"`
1933	// SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider.
1934	SigninPolicyName *string `json:"signinPolicyName,omitempty"`
1935	// ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
1936	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`
1937	// PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
1938	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`
1939}
1940
1941// IdentityProviderContract identity Provider details.
1942type IdentityProviderContract struct {
1943	autorest.Response `json:"-"`
1944	// ID - Identifier of the identity provider.
1945	ID *string `json:"id,omitempty"`
1946	// 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.
1947	ClientID *string `json:"clientId,omitempty"`
1948	// ClientSecret - Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.
1949	ClientSecret *string `json:"clientSecret,omitempty"`
1950	// Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C'
1951	Type IdentityProviderType `json:"type,omitempty"`
1952	// AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login.
1953	AllowedTenants *[]string `json:"allowedTenants,omitempty"`
1954	// SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider.
1955	SignupPolicyName *string `json:"signupPolicyName,omitempty"`
1956	// SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider.
1957	SigninPolicyName *string `json:"signinPolicyName,omitempty"`
1958	// ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
1959	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`
1960	// PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
1961	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`
1962}
1963
1964// IdentityProviderContractProperties the external Identity Providers like Facebook, Google, Microsoft,
1965// Twitter or Azure Active Directory which can be used to enable access to the API Management service
1966// developer portal for all users.
1967type IdentityProviderContractProperties struct {
1968	// 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.
1969	ClientID *string `json:"clientId,omitempty"`
1970	// ClientSecret - Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.
1971	ClientSecret *string `json:"clientSecret,omitempty"`
1972	// Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C'
1973	Type IdentityProviderType `json:"type,omitempty"`
1974	// AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login.
1975	AllowedTenants *[]string `json:"allowedTenants,omitempty"`
1976	// SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider.
1977	SignupPolicyName *string `json:"signupPolicyName,omitempty"`
1978	// SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider.
1979	SigninPolicyName *string `json:"signinPolicyName,omitempty"`
1980	// ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
1981	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`
1982	// PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
1983	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`
1984}
1985
1986// IdentityProviderList list of all the Identity Providers configured on the service instance.
1987type IdentityProviderList struct {
1988	autorest.Response `json:"-"`
1989	// Value - Identity Provider configuration values.
1990	Value *[]IdentityProviderContract `json:"value,omitempty"`
1991	// Count - Total number of identity providers
1992	Count *int32 `json:"count,omitempty"`
1993}
1994
1995// IdentityProviderUpdateParameters parameters supplied to the Update Identity Provider operation.
1996type IdentityProviderUpdateParameters struct {
1997	// 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.
1998	ClientID *string `json:"clientId,omitempty"`
1999	// ClientSecret - Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.
2000	ClientSecret *string `json:"clientSecret,omitempty"`
2001	// Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C'
2002	Type IdentityProviderType `json:"type,omitempty"`
2003	// AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login.
2004	AllowedTenants *[]string `json:"allowedTenants,omitempty"`
2005	// SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider.
2006	SignupPolicyName *string `json:"signupPolicyName,omitempty"`
2007	// SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider.
2008	SigninPolicyName *string `json:"signinPolicyName,omitempty"`
2009	// ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
2010	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`
2011	// PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
2012	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`
2013}
2014
2015// LoggerCollection paged Logger list representation.
2016type LoggerCollection struct {
2017	autorest.Response `json:"-"`
2018	// Value - Logger values.
2019	Value *[]LoggerContract `json:"value,omitempty"`
2020	// Count - Total record count number across all pages.
2021	Count *int64 `json:"count,omitempty"`
2022	// NextLink - Next page link if any.
2023	NextLink *string `json:"nextLink,omitempty"`
2024}
2025
2026// LoggerCollectionIterator provides access to a complete listing of LoggerContract values.
2027type LoggerCollectionIterator struct {
2028	i    int
2029	page LoggerCollectionPage
2030}
2031
2032// NextWithContext advances to the next value.  If there was an error making
2033// the request the iterator does not advance and the error is returned.
2034func (iter *LoggerCollectionIterator) NextWithContext(ctx context.Context) (err error) {
2035	if tracing.IsEnabled() {
2036		ctx = tracing.StartSpan(ctx, fqdn+"/LoggerCollectionIterator.NextWithContext")
2037		defer func() {
2038			sc := -1
2039			if iter.Response().Response.Response != nil {
2040				sc = iter.Response().Response.Response.StatusCode
2041			}
2042			tracing.EndSpan(ctx, sc, err)
2043		}()
2044	}
2045	iter.i++
2046	if iter.i < len(iter.page.Values()) {
2047		return nil
2048	}
2049	err = iter.page.NextWithContext(ctx)
2050	if err != nil {
2051		iter.i--
2052		return err
2053	}
2054	iter.i = 0
2055	return nil
2056}
2057
2058// Next advances to the next value.  If there was an error making
2059// the request the iterator does not advance and the error is returned.
2060// Deprecated: Use NextWithContext() instead.
2061func (iter *LoggerCollectionIterator) Next() error {
2062	return iter.NextWithContext(context.Background())
2063}
2064
2065// NotDone returns true if the enumeration should be started or is not yet complete.
2066func (iter LoggerCollectionIterator) NotDone() bool {
2067	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2068}
2069
2070// Response returns the raw server response from the last page request.
2071func (iter LoggerCollectionIterator) Response() LoggerCollection {
2072	return iter.page.Response()
2073}
2074
2075// Value returns the current value or a zero-initialized value if the
2076// iterator has advanced beyond the end of the collection.
2077func (iter LoggerCollectionIterator) Value() LoggerContract {
2078	if !iter.page.NotDone() {
2079		return LoggerContract{}
2080	}
2081	return iter.page.Values()[iter.i]
2082}
2083
2084// Creates a new instance of the LoggerCollectionIterator type.
2085func NewLoggerCollectionIterator(page LoggerCollectionPage) LoggerCollectionIterator {
2086	return LoggerCollectionIterator{page: page}
2087}
2088
2089// IsEmpty returns true if the ListResult contains no values.
2090func (lc LoggerCollection) IsEmpty() bool {
2091	return lc.Value == nil || len(*lc.Value) == 0
2092}
2093
2094// loggerCollectionPreparer prepares a request to retrieve the next set of results.
2095// It returns nil if no more results exist.
2096func (lc LoggerCollection) loggerCollectionPreparer(ctx context.Context) (*http.Request, error) {
2097	if lc.NextLink == nil || len(to.String(lc.NextLink)) < 1 {
2098		return nil, nil
2099	}
2100	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2101		autorest.AsJSON(),
2102		autorest.AsGet(),
2103		autorest.WithBaseURL(to.String(lc.NextLink)))
2104}
2105
2106// LoggerCollectionPage contains a page of LoggerContract values.
2107type LoggerCollectionPage struct {
2108	fn func(context.Context, LoggerCollection) (LoggerCollection, error)
2109	lc LoggerCollection
2110}
2111
2112// NextWithContext advances to the next page of values.  If there was an error making
2113// the request the page does not advance and the error is returned.
2114func (page *LoggerCollectionPage) NextWithContext(ctx context.Context) (err error) {
2115	if tracing.IsEnabled() {
2116		ctx = tracing.StartSpan(ctx, fqdn+"/LoggerCollectionPage.NextWithContext")
2117		defer func() {
2118			sc := -1
2119			if page.Response().Response.Response != nil {
2120				sc = page.Response().Response.Response.StatusCode
2121			}
2122			tracing.EndSpan(ctx, sc, err)
2123		}()
2124	}
2125	next, err := page.fn(ctx, page.lc)
2126	if err != nil {
2127		return err
2128	}
2129	page.lc = next
2130	return nil
2131}
2132
2133// Next advances to the next page of values.  If there was an error making
2134// the request the page does not advance and the error is returned.
2135// Deprecated: Use NextWithContext() instead.
2136func (page *LoggerCollectionPage) Next() error {
2137	return page.NextWithContext(context.Background())
2138}
2139
2140// NotDone returns true if the page enumeration should be started or is not yet complete.
2141func (page LoggerCollectionPage) NotDone() bool {
2142	return !page.lc.IsEmpty()
2143}
2144
2145// Response returns the raw server response from the last page request.
2146func (page LoggerCollectionPage) Response() LoggerCollection {
2147	return page.lc
2148}
2149
2150// Values returns the slice of values for the current page or nil if there are no values.
2151func (page LoggerCollectionPage) Values() []LoggerContract {
2152	if page.lc.IsEmpty() {
2153		return nil
2154	}
2155	return *page.lc.Value
2156}
2157
2158// Creates a new instance of the LoggerCollectionPage type.
2159func NewLoggerCollectionPage(getNextPage func(context.Context, LoggerCollection) (LoggerCollection, error)) LoggerCollectionPage {
2160	return LoggerCollectionPage{fn: getNextPage}
2161}
2162
2163// LoggerContract logger details.
2164type LoggerContract struct {
2165	autorest.Response `json:"-"`
2166	// ID - Identifier of the Logger Entity.
2167	ID *string `json:"id,omitempty"`
2168	// LoggerType - Logger type.
2169	LoggerType *string `json:"loggerType,omitempty"`
2170	// Description - Logger description.
2171	Description *string `json:"description,omitempty"`
2172	// Credentials - The name and SendRule connection string of the event hub.
2173	Credentials map[string]*string `json:"credentials"`
2174	// IsBuffered - Whether records are buffered in the logger before publishing. Default is assumed to be true.
2175	IsBuffered *bool `json:"isBuffered,omitempty"`
2176}
2177
2178// MarshalJSON is the custom marshaler for LoggerContract.
2179func (lc LoggerContract) MarshalJSON() ([]byte, error) {
2180	objectMap := make(map[string]interface{})
2181	if lc.ID != nil {
2182		objectMap["id"] = lc.ID
2183	}
2184	if lc.LoggerType != nil {
2185		objectMap["loggerType"] = lc.LoggerType
2186	}
2187	if lc.Description != nil {
2188		objectMap["description"] = lc.Description
2189	}
2190	if lc.Credentials != nil {
2191		objectMap["credentials"] = lc.Credentials
2192	}
2193	if lc.IsBuffered != nil {
2194		objectMap["isBuffered"] = lc.IsBuffered
2195	}
2196	return json.Marshal(objectMap)
2197}
2198
2199// LoggerContractProperties the Logger entity in API Management represents an event sink that you can use
2200// to log API Management events. Currently the Logger entity supports logging API Management events to
2201// Azure Event Hubs.
2202type LoggerContractProperties struct {
2203	// LoggerType - Logger type.
2204	LoggerType *string `json:"loggerType,omitempty"`
2205	// Description - Logger description.
2206	Description *string `json:"description,omitempty"`
2207	// Credentials - The name and SendRule connection string of the event hub.
2208	Credentials map[string]*string `json:"credentials"`
2209	// IsBuffered - Whether records are buffered in the logger before publishing. Default is assumed to be true.
2210	IsBuffered *bool `json:"isBuffered,omitempty"`
2211}
2212
2213// MarshalJSON is the custom marshaler for LoggerContractProperties.
2214func (lcp LoggerContractProperties) MarshalJSON() ([]byte, error) {
2215	objectMap := make(map[string]interface{})
2216	if lcp.LoggerType != nil {
2217		objectMap["loggerType"] = lcp.LoggerType
2218	}
2219	if lcp.Description != nil {
2220		objectMap["description"] = lcp.Description
2221	}
2222	if lcp.Credentials != nil {
2223		objectMap["credentials"] = lcp.Credentials
2224	}
2225	if lcp.IsBuffered != nil {
2226		objectMap["isBuffered"] = lcp.IsBuffered
2227	}
2228	return json.Marshal(objectMap)
2229}
2230
2231// LoggerUpdateContract parameters supplied to the Update Logger operation.
2232type LoggerUpdateContract struct {
2233	// LoggerType - Logger type. Possible values include: 'AzureEventHub'
2234	LoggerType LoggerType `json:"loggerType,omitempty"`
2235	// Description - Logger description.
2236	Description *string `json:"description,omitempty"`
2237	// Credentials - Logger credentials.
2238	Credentials map[string]*string `json:"credentials"`
2239	// IsBuffered - Whether records are buffered in the logger before publishing. Default is assumed to be true.
2240	IsBuffered *bool `json:"isBuffered,omitempty"`
2241}
2242
2243// MarshalJSON is the custom marshaler for LoggerUpdateContract.
2244func (luc LoggerUpdateContract) MarshalJSON() ([]byte, error) {
2245	objectMap := make(map[string]interface{})
2246	if luc.LoggerType != "" {
2247		objectMap["loggerType"] = luc.LoggerType
2248	}
2249	if luc.Description != nil {
2250		objectMap["description"] = luc.Description
2251	}
2252	if luc.Credentials != nil {
2253		objectMap["credentials"] = luc.Credentials
2254	}
2255	if luc.IsBuffered != nil {
2256		objectMap["isBuffered"] = luc.IsBuffered
2257	}
2258	return json.Marshal(objectMap)
2259}
2260
2261// OAuth2AuthenticationSettingsContract API OAuth2 Authentication settings details.
2262type OAuth2AuthenticationSettingsContract struct {
2263	// AuthorizationServerID - OAuth authorization server identifier.
2264	AuthorizationServerID *string `json:"authorizationServerId,omitempty"`
2265	// Scope - operations scope.
2266	Scope *string `json:"scope,omitempty"`
2267}
2268
2269// OpenIDConnectProviderCollection paged OpenIdProviders list representation.
2270type OpenIDConnectProviderCollection struct {
2271	autorest.Response `json:"-"`
2272	// Value - Page values.
2273	Value *[]OpenidConnectProviderContract `json:"value,omitempty"`
2274	// Count - Total number of entities
2275	Count *int32 `json:"count,omitempty"`
2276	// NextLink - Next page link if any.
2277	NextLink *string `json:"nextLink,omitempty"`
2278}
2279
2280// OpenIDConnectProviderCollectionIterator provides access to a complete listing of
2281// OpenidConnectProviderContract values.
2282type OpenIDConnectProviderCollectionIterator struct {
2283	i    int
2284	page OpenIDConnectProviderCollectionPage
2285}
2286
2287// NextWithContext advances to the next value.  If there was an error making
2288// the request the iterator does not advance and the error is returned.
2289func (iter *OpenIDConnectProviderCollectionIterator) NextWithContext(ctx context.Context) (err error) {
2290	if tracing.IsEnabled() {
2291		ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderCollectionIterator.NextWithContext")
2292		defer func() {
2293			sc := -1
2294			if iter.Response().Response.Response != nil {
2295				sc = iter.Response().Response.Response.StatusCode
2296			}
2297			tracing.EndSpan(ctx, sc, err)
2298		}()
2299	}
2300	iter.i++
2301	if iter.i < len(iter.page.Values()) {
2302		return nil
2303	}
2304	err = iter.page.NextWithContext(ctx)
2305	if err != nil {
2306		iter.i--
2307		return err
2308	}
2309	iter.i = 0
2310	return nil
2311}
2312
2313// Next advances to the next value.  If there was an error making
2314// the request the iterator does not advance and the error is returned.
2315// Deprecated: Use NextWithContext() instead.
2316func (iter *OpenIDConnectProviderCollectionIterator) Next() error {
2317	return iter.NextWithContext(context.Background())
2318}
2319
2320// NotDone returns true if the enumeration should be started or is not yet complete.
2321func (iter OpenIDConnectProviderCollectionIterator) NotDone() bool {
2322	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2323}
2324
2325// Response returns the raw server response from the last page request.
2326func (iter OpenIDConnectProviderCollectionIterator) Response() OpenIDConnectProviderCollection {
2327	return iter.page.Response()
2328}
2329
2330// Value returns the current value or a zero-initialized value if the
2331// iterator has advanced beyond the end of the collection.
2332func (iter OpenIDConnectProviderCollectionIterator) Value() OpenidConnectProviderContract {
2333	if !iter.page.NotDone() {
2334		return OpenidConnectProviderContract{}
2335	}
2336	return iter.page.Values()[iter.i]
2337}
2338
2339// Creates a new instance of the OpenIDConnectProviderCollectionIterator type.
2340func NewOpenIDConnectProviderCollectionIterator(page OpenIDConnectProviderCollectionPage) OpenIDConnectProviderCollectionIterator {
2341	return OpenIDConnectProviderCollectionIterator{page: page}
2342}
2343
2344// IsEmpty returns true if the ListResult contains no values.
2345func (oicpc OpenIDConnectProviderCollection) IsEmpty() bool {
2346	return oicpc.Value == nil || len(*oicpc.Value) == 0
2347}
2348
2349// openIDConnectProviderCollectionPreparer prepares a request to retrieve the next set of results.
2350// It returns nil if no more results exist.
2351func (oicpc OpenIDConnectProviderCollection) openIDConnectProviderCollectionPreparer(ctx context.Context) (*http.Request, error) {
2352	if oicpc.NextLink == nil || len(to.String(oicpc.NextLink)) < 1 {
2353		return nil, nil
2354	}
2355	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2356		autorest.AsJSON(),
2357		autorest.AsGet(),
2358		autorest.WithBaseURL(to.String(oicpc.NextLink)))
2359}
2360
2361// OpenIDConnectProviderCollectionPage contains a page of OpenidConnectProviderContract values.
2362type OpenIDConnectProviderCollectionPage struct {
2363	fn    func(context.Context, OpenIDConnectProviderCollection) (OpenIDConnectProviderCollection, error)
2364	oicpc OpenIDConnectProviderCollection
2365}
2366
2367// NextWithContext advances to the next page of values.  If there was an error making
2368// the request the page does not advance and the error is returned.
2369func (page *OpenIDConnectProviderCollectionPage) NextWithContext(ctx context.Context) (err error) {
2370	if tracing.IsEnabled() {
2371		ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderCollectionPage.NextWithContext")
2372		defer func() {
2373			sc := -1
2374			if page.Response().Response.Response != nil {
2375				sc = page.Response().Response.Response.StatusCode
2376			}
2377			tracing.EndSpan(ctx, sc, err)
2378		}()
2379	}
2380	next, err := page.fn(ctx, page.oicpc)
2381	if err != nil {
2382		return err
2383	}
2384	page.oicpc = next
2385	return nil
2386}
2387
2388// Next advances to the next page of values.  If there was an error making
2389// the request the page does not advance and the error is returned.
2390// Deprecated: Use NextWithContext() instead.
2391func (page *OpenIDConnectProviderCollectionPage) Next() error {
2392	return page.NextWithContext(context.Background())
2393}
2394
2395// NotDone returns true if the page enumeration should be started or is not yet complete.
2396func (page OpenIDConnectProviderCollectionPage) NotDone() bool {
2397	return !page.oicpc.IsEmpty()
2398}
2399
2400// Response returns the raw server response from the last page request.
2401func (page OpenIDConnectProviderCollectionPage) Response() OpenIDConnectProviderCollection {
2402	return page.oicpc
2403}
2404
2405// Values returns the slice of values for the current page or nil if there are no values.
2406func (page OpenIDConnectProviderCollectionPage) Values() []OpenidConnectProviderContract {
2407	if page.oicpc.IsEmpty() {
2408		return nil
2409	}
2410	return *page.oicpc.Value
2411}
2412
2413// Creates a new instance of the OpenIDConnectProviderCollectionPage type.
2414func NewOpenIDConnectProviderCollectionPage(getNextPage func(context.Context, OpenIDConnectProviderCollection) (OpenIDConnectProviderCollection, error)) OpenIDConnectProviderCollectionPage {
2415	return OpenIDConnectProviderCollectionPage{fn: getNextPage}
2416}
2417
2418// OpenidConnectProviderContract openId Connect Provider details.
2419type OpenidConnectProviderContract struct {
2420	autorest.Response `json:"-"`
2421	// ID - Identifier of the OpenId Connect Provider.
2422	ID *string `json:"id,omitempty"`
2423	// Name - User-friendly OpenID Connect Provider name.
2424	Name *string `json:"name,omitempty"`
2425	// Description - User-friendly description of OpenID Connect Provider.
2426	Description *string `json:"description,omitempty"`
2427	// MetadataEndpoint - Metadata endpoint URI.
2428	MetadataEndpoint *string `json:"metadataEndpoint,omitempty"`
2429	// ClientID - Client ID of developer console which is the client application.
2430	ClientID *string `json:"clientId,omitempty"`
2431	// ClientSecret - Client Secret of developer console which is the client application.
2432	ClientSecret *string `json:"clientSecret,omitempty"`
2433}
2434
2435// OpenidConnectProviderContractProperties openID Connect Providers Contract.
2436type OpenidConnectProviderContractProperties struct {
2437	// Name - User-friendly OpenID Connect Provider name.
2438	Name *string `json:"name,omitempty"`
2439	// Description - User-friendly description of OpenID Connect Provider.
2440	Description *string `json:"description,omitempty"`
2441	// MetadataEndpoint - Metadata endpoint URI.
2442	MetadataEndpoint *string `json:"metadataEndpoint,omitempty"`
2443	// ClientID - Client ID of developer console which is the client application.
2444	ClientID *string `json:"clientId,omitempty"`
2445	// ClientSecret - Client Secret of developer console which is the client application.
2446	ClientSecret *string `json:"clientSecret,omitempty"`
2447}
2448
2449// OpenidConnectProviderUpdateContract parameters supplied to the Update OpenID Connect Provider operation.
2450type OpenidConnectProviderUpdateContract struct {
2451	// Name - User-friendly OpenID Connect Provider name.
2452	Name *string `json:"name,omitempty"`
2453	// Description - User-friendly description of OpenID Connect Provider.
2454	Description *string `json:"description,omitempty"`
2455	// MetadataEndpoint - Metadata endpoint URI.
2456	MetadataEndpoint *string `json:"metadataEndpoint,omitempty"`
2457	// ClientID - Client ID of developer console which is the client application.
2458	ClientID *string `json:"clientId,omitempty"`
2459	// ClientSecret - Client Secret of developer console which is the client application.
2460	ClientSecret *string `json:"clientSecret,omitempty"`
2461}
2462
2463// OperationCollection paged Operation list representation.
2464type OperationCollection struct {
2465	autorest.Response `json:"-"`
2466	// Value - Page values.
2467	Value *[]OperationContract `json:"value,omitempty"`
2468	// Count - Total number of entities
2469	Count *int32 `json:"count,omitempty"`
2470	// NextLink - Next page link if any.
2471	NextLink *string `json:"nextLink,omitempty"`
2472}
2473
2474// OperationCollectionIterator provides access to a complete listing of OperationContract values.
2475type OperationCollectionIterator struct {
2476	i    int
2477	page OperationCollectionPage
2478}
2479
2480// NextWithContext advances to the next value.  If there was an error making
2481// the request the iterator does not advance and the error is returned.
2482func (iter *OperationCollectionIterator) NextWithContext(ctx context.Context) (err error) {
2483	if tracing.IsEnabled() {
2484		ctx = tracing.StartSpan(ctx, fqdn+"/OperationCollectionIterator.NextWithContext")
2485		defer func() {
2486			sc := -1
2487			if iter.Response().Response.Response != nil {
2488				sc = iter.Response().Response.Response.StatusCode
2489			}
2490			tracing.EndSpan(ctx, sc, err)
2491		}()
2492	}
2493	iter.i++
2494	if iter.i < len(iter.page.Values()) {
2495		return nil
2496	}
2497	err = iter.page.NextWithContext(ctx)
2498	if err != nil {
2499		iter.i--
2500		return err
2501	}
2502	iter.i = 0
2503	return nil
2504}
2505
2506// Next advances to the next value.  If there was an error making
2507// the request the iterator does not advance and the error is returned.
2508// Deprecated: Use NextWithContext() instead.
2509func (iter *OperationCollectionIterator) Next() error {
2510	return iter.NextWithContext(context.Background())
2511}
2512
2513// NotDone returns true if the enumeration should be started or is not yet complete.
2514func (iter OperationCollectionIterator) NotDone() bool {
2515	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2516}
2517
2518// Response returns the raw server response from the last page request.
2519func (iter OperationCollectionIterator) Response() OperationCollection {
2520	return iter.page.Response()
2521}
2522
2523// Value returns the current value or a zero-initialized value if the
2524// iterator has advanced beyond the end of the collection.
2525func (iter OperationCollectionIterator) Value() OperationContract {
2526	if !iter.page.NotDone() {
2527		return OperationContract{}
2528	}
2529	return iter.page.Values()[iter.i]
2530}
2531
2532// Creates a new instance of the OperationCollectionIterator type.
2533func NewOperationCollectionIterator(page OperationCollectionPage) OperationCollectionIterator {
2534	return OperationCollectionIterator{page: page}
2535}
2536
2537// IsEmpty returns true if the ListResult contains no values.
2538func (oc OperationCollection) IsEmpty() bool {
2539	return oc.Value == nil || len(*oc.Value) == 0
2540}
2541
2542// operationCollectionPreparer prepares a request to retrieve the next set of results.
2543// It returns nil if no more results exist.
2544func (oc OperationCollection) operationCollectionPreparer(ctx context.Context) (*http.Request, error) {
2545	if oc.NextLink == nil || len(to.String(oc.NextLink)) < 1 {
2546		return nil, nil
2547	}
2548	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2549		autorest.AsJSON(),
2550		autorest.AsGet(),
2551		autorest.WithBaseURL(to.String(oc.NextLink)))
2552}
2553
2554// OperationCollectionPage contains a page of OperationContract values.
2555type OperationCollectionPage struct {
2556	fn func(context.Context, OperationCollection) (OperationCollection, error)
2557	oc OperationCollection
2558}
2559
2560// NextWithContext advances to the next page of values.  If there was an error making
2561// the request the page does not advance and the error is returned.
2562func (page *OperationCollectionPage) NextWithContext(ctx context.Context) (err error) {
2563	if tracing.IsEnabled() {
2564		ctx = tracing.StartSpan(ctx, fqdn+"/OperationCollectionPage.NextWithContext")
2565		defer func() {
2566			sc := -1
2567			if page.Response().Response.Response != nil {
2568				sc = page.Response().Response.Response.StatusCode
2569			}
2570			tracing.EndSpan(ctx, sc, err)
2571		}()
2572	}
2573	next, err := page.fn(ctx, page.oc)
2574	if err != nil {
2575		return err
2576	}
2577	page.oc = next
2578	return nil
2579}
2580
2581// Next advances to the next page of values.  If there was an error making
2582// the request the page does not advance and the error is returned.
2583// Deprecated: Use NextWithContext() instead.
2584func (page *OperationCollectionPage) Next() error {
2585	return page.NextWithContext(context.Background())
2586}
2587
2588// NotDone returns true if the page enumeration should be started or is not yet complete.
2589func (page OperationCollectionPage) NotDone() bool {
2590	return !page.oc.IsEmpty()
2591}
2592
2593// Response returns the raw server response from the last page request.
2594func (page OperationCollectionPage) Response() OperationCollection {
2595	return page.oc
2596}
2597
2598// Values returns the slice of values for the current page or nil if there are no values.
2599func (page OperationCollectionPage) Values() []OperationContract {
2600	if page.oc.IsEmpty() {
2601		return nil
2602	}
2603	return *page.oc.Value
2604}
2605
2606// Creates a new instance of the OperationCollectionPage type.
2607func NewOperationCollectionPage(getNextPage func(context.Context, OperationCollection) (OperationCollection, error)) OperationCollectionPage {
2608	return OperationCollectionPage{fn: getNextPage}
2609}
2610
2611// OperationContract api Operation details.
2612type OperationContract struct {
2613	autorest.Response `json:"-"`
2614	// ID - Identifier of the Operation.
2615	ID *string `json:"id,omitempty"`
2616	// Name - Operation Name.
2617	Name *string `json:"name,omitempty"`
2618	// Method - A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
2619	Method *string `json:"method,omitempty"`
2620	// URLTemplate - Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
2621	URLTemplate *string `json:"urlTemplate,omitempty"`
2622	// TemplateParameters - Collection of URL template parameters.
2623	TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"`
2624	// Description - Description of the operation. May include HTML formatting tags.
2625	Description *string `json:"description,omitempty"`
2626	// Request - An entity containing request details.
2627	Request *RequestContract `json:"request,omitempty"`
2628	// Responses - Array of Operation responses.
2629	Responses *[]ResponseContract `json:"responses,omitempty"`
2630	// Policies - Operation Policies
2631	Policies *string `json:"policies,omitempty"`
2632}
2633
2634// OperationContractProperties operation Contract Properties
2635type OperationContractProperties struct {
2636	// Name - Operation Name.
2637	Name *string `json:"name,omitempty"`
2638	// Method - A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
2639	Method *string `json:"method,omitempty"`
2640	// URLTemplate - Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
2641	URLTemplate *string `json:"urlTemplate,omitempty"`
2642	// TemplateParameters - Collection of URL template parameters.
2643	TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"`
2644	// Description - Description of the operation. May include HTML formatting tags.
2645	Description *string `json:"description,omitempty"`
2646	// Request - An entity containing request details.
2647	Request *RequestContract `json:"request,omitempty"`
2648	// Responses - Array of Operation responses.
2649	Responses *[]ResponseContract `json:"responses,omitempty"`
2650	// Policies - Operation Policies
2651	Policies *string `json:"policies,omitempty"`
2652}
2653
2654// OperationEntityBaseContract api Operation Entity Base Contract details.
2655type OperationEntityBaseContract struct {
2656	// TemplateParameters - Collection of URL template parameters.
2657	TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"`
2658	// Description - Description of the operation. May include HTML formatting tags.
2659	Description *string `json:"description,omitempty"`
2660	// Request - An entity containing request details.
2661	Request *RequestContract `json:"request,omitempty"`
2662	// Responses - Array of Operation responses.
2663	Responses *[]ResponseContract `json:"responses,omitempty"`
2664	// Policies - Operation Policies
2665	Policies *string `json:"policies,omitempty"`
2666}
2667
2668// OperationResultContract operation Result.
2669type OperationResultContract struct {
2670	autorest.Response `json:"-"`
2671	// ID - Operation result identifier.
2672	ID *string `json:"id,omitempty"`
2673	// Status - Status of an async operation. Possible values include: 'Started', 'InProgress', 'Succeeded', 'Failed'
2674	Status AsyncOperationStatus `json:"status,omitempty"`
2675	// Started - Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
2676	Started *date.Time `json:"started,omitempty"`
2677	// Updated - Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
2678	Updated *date.Time `json:"updated,omitempty"`
2679	// ResultInfo - Optional result info.
2680	ResultInfo *string `json:"resultInfo,omitempty"`
2681	// Error - Error Body Contract
2682	Error *ErrorResponse `json:"error,omitempty"`
2683	// ActionLog - READ-ONLY; This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation.
2684	ActionLog *[]OperationResultLogItemContract `json:"actionLog,omitempty"`
2685}
2686
2687// OperationResultLogItemContract log of the entity being created, updated or deleted.
2688type OperationResultLogItemContract struct {
2689	// ObjectType - The type of entity contract.
2690	ObjectType *string `json:"objectType,omitempty"`
2691	// Action - Action like create/update/delete.
2692	Action *string `json:"action,omitempty"`
2693	// ObjectKey - Identifier of the entity being created/updated/deleted.
2694	ObjectKey *string `json:"objectKey,omitempty"`
2695}
2696
2697// OperationUpdateContract operation Update Contract Properties.
2698type OperationUpdateContract struct {
2699	// Name - Operation Name.
2700	Name *string `json:"name,omitempty"`
2701	// Method - A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
2702	Method *string `json:"method,omitempty"`
2703	// URLTemplate - Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
2704	URLTemplate *string `json:"urlTemplate,omitempty"`
2705	// TemplateParameters - Collection of URL template parameters.
2706	TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"`
2707	// Description - Description of the operation. May include HTML formatting tags.
2708	Description *string `json:"description,omitempty"`
2709	// Request - An entity containing request details.
2710	Request *RequestContract `json:"request,omitempty"`
2711	// Responses - Array of Operation responses.
2712	Responses *[]ResponseContract `json:"responses,omitempty"`
2713	// Policies - Operation Policies
2714	Policies *string `json:"policies,omitempty"`
2715}
2716
2717// ParameterContract operation parameters details.
2718type ParameterContract struct {
2719	// Name - Parameter name.
2720	Name *string `json:"name,omitempty"`
2721	// Description - Parameter description.
2722	Description *string `json:"description,omitempty"`
2723	// Type - Parameter type.
2724	Type *string `json:"type,omitempty"`
2725	// DefaultValue - Default parameter value.
2726	DefaultValue *string `json:"defaultValue,omitempty"`
2727	// Required - whether parameter is required or not.
2728	Required *bool `json:"required,omitempty"`
2729	// Values - Parameter values.
2730	Values *[]string `json:"values,omitempty"`
2731}
2732
2733// PolicyCollection the response of the list policy operation.
2734type PolicyCollection struct {
2735	autorest.Response `json:"-"`
2736	// Value - Policy Contract value.
2737	Value *[]PolicyContract `json:"value,omitempty"`
2738	// Count - Total number of records
2739	Count *int32 `json:"count,omitempty"`
2740	// NextLink - Next page link if any.
2741	NextLink *string `json:"nextLink,omitempty"`
2742}
2743
2744// PolicyContract policy contract Properties.
2745type PolicyContract struct {
2746	autorest.Response `json:"-"`
2747	// ID - Policy identifier.
2748	ID *string `json:"id,omitempty"`
2749	// PolicyContent - Json escaped Xml Encoded contents of the Policy.
2750	PolicyContent *string `json:"policyContent,omitempty"`
2751}
2752
2753// PolicySnippetContract policy snippet.
2754type PolicySnippetContract struct {
2755	// Name - READ-ONLY; Snippet name.
2756	Name *string `json:"name,omitempty"`
2757	// Content - READ-ONLY; Snippet content.
2758	Content *string `json:"content,omitempty"`
2759	// ToolTip - READ-ONLY; Snippet toolTip.
2760	ToolTip *string `json:"toolTip,omitempty"`
2761	// Scope - READ-ONLY; Binary OR value of the Snippet scope.
2762	Scope *int32 `json:"scope,omitempty"`
2763}
2764
2765// PolicySnippetsCollection the response of the list policy snippets operation.
2766type PolicySnippetsCollection struct {
2767	autorest.Response `json:"-"`
2768	// Value - Policy snippet value.
2769	Value *[]PolicySnippetContract `json:"value,omitempty"`
2770}
2771
2772// PortalDelegationSettings delegation settings for a developer portal.
2773type PortalDelegationSettings struct {
2774	autorest.Response `json:"-"`
2775	// URL - A delegation Url.
2776	URL *string `json:"url,omitempty"`
2777	// ValidationKey - A base64-encoded validation key to validate, that a request is coming from Azure API Management.
2778	ValidationKey *string `json:"validationKey,omitempty"`
2779	// Subscriptions - Subscriptions delegation settings.
2780	Subscriptions *SubscriptionsDelegationSettingsProperties `json:"subscriptions,omitempty"`
2781	// UserRegistration - User registration delegation settings.
2782	UserRegistration *RegistrationDelegationSettingsProperties `json:"userRegistration,omitempty"`
2783}
2784
2785// PortalSigninSettings sign-In settings for the Developer Portal.
2786type PortalSigninSettings struct {
2787	autorest.Response `json:"-"`
2788	// Enabled - Redirect Anonymous users to the Sign-In page.
2789	Enabled *bool `json:"enabled,omitempty"`
2790}
2791
2792// PortalSignupSettings sign-up settings contract properties.
2793type PortalSignupSettings struct {
2794	autorest.Response `json:"-"`
2795	// Enabled - Allow users to sign up on a developer portal.
2796	Enabled *bool `json:"enabled,omitempty"`
2797	// TermsOfService - Terms of service contract properties.
2798	TermsOfService *TermsOfServiceProperties `json:"termsOfService,omitempty"`
2799}
2800
2801// ProductCollection paged Products list representation.
2802type ProductCollection struct {
2803	autorest.Response `json:"-"`
2804	// Value - Page values.
2805	Value *[]ProductContract `json:"value,omitempty"`
2806	// Count - Total number of entities
2807	Count *int32 `json:"count,omitempty"`
2808	// NextLink - Next page link if any.
2809	NextLink *string `json:"nextLink,omitempty"`
2810}
2811
2812// ProductCollectionIterator provides access to a complete listing of ProductContract values.
2813type ProductCollectionIterator struct {
2814	i    int
2815	page ProductCollectionPage
2816}
2817
2818// NextWithContext advances to the next value.  If there was an error making
2819// the request the iterator does not advance and the error is returned.
2820func (iter *ProductCollectionIterator) NextWithContext(ctx context.Context) (err error) {
2821	if tracing.IsEnabled() {
2822		ctx = tracing.StartSpan(ctx, fqdn+"/ProductCollectionIterator.NextWithContext")
2823		defer func() {
2824			sc := -1
2825			if iter.Response().Response.Response != nil {
2826				sc = iter.Response().Response.Response.StatusCode
2827			}
2828			tracing.EndSpan(ctx, sc, err)
2829		}()
2830	}
2831	iter.i++
2832	if iter.i < len(iter.page.Values()) {
2833		return nil
2834	}
2835	err = iter.page.NextWithContext(ctx)
2836	if err != nil {
2837		iter.i--
2838		return err
2839	}
2840	iter.i = 0
2841	return nil
2842}
2843
2844// Next advances to the next value.  If there was an error making
2845// the request the iterator does not advance and the error is returned.
2846// Deprecated: Use NextWithContext() instead.
2847func (iter *ProductCollectionIterator) Next() error {
2848	return iter.NextWithContext(context.Background())
2849}
2850
2851// NotDone returns true if the enumeration should be started or is not yet complete.
2852func (iter ProductCollectionIterator) NotDone() bool {
2853	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2854}
2855
2856// Response returns the raw server response from the last page request.
2857func (iter ProductCollectionIterator) Response() ProductCollection {
2858	return iter.page.Response()
2859}
2860
2861// Value returns the current value or a zero-initialized value if the
2862// iterator has advanced beyond the end of the collection.
2863func (iter ProductCollectionIterator) Value() ProductContract {
2864	if !iter.page.NotDone() {
2865		return ProductContract{}
2866	}
2867	return iter.page.Values()[iter.i]
2868}
2869
2870// Creates a new instance of the ProductCollectionIterator type.
2871func NewProductCollectionIterator(page ProductCollectionPage) ProductCollectionIterator {
2872	return ProductCollectionIterator{page: page}
2873}
2874
2875// IsEmpty returns true if the ListResult contains no values.
2876func (pc ProductCollection) IsEmpty() bool {
2877	return pc.Value == nil || len(*pc.Value) == 0
2878}
2879
2880// productCollectionPreparer prepares a request to retrieve the next set of results.
2881// It returns nil if no more results exist.
2882func (pc ProductCollection) productCollectionPreparer(ctx context.Context) (*http.Request, error) {
2883	if pc.NextLink == nil || len(to.String(pc.NextLink)) < 1 {
2884		return nil, nil
2885	}
2886	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2887		autorest.AsJSON(),
2888		autorest.AsGet(),
2889		autorest.WithBaseURL(to.String(pc.NextLink)))
2890}
2891
2892// ProductCollectionPage contains a page of ProductContract values.
2893type ProductCollectionPage struct {
2894	fn func(context.Context, ProductCollection) (ProductCollection, error)
2895	pc ProductCollection
2896}
2897
2898// NextWithContext advances to the next page of values.  If there was an error making
2899// the request the page does not advance and the error is returned.
2900func (page *ProductCollectionPage) NextWithContext(ctx context.Context) (err error) {
2901	if tracing.IsEnabled() {
2902		ctx = tracing.StartSpan(ctx, fqdn+"/ProductCollectionPage.NextWithContext")
2903		defer func() {
2904			sc := -1
2905			if page.Response().Response.Response != nil {
2906				sc = page.Response().Response.Response.StatusCode
2907			}
2908			tracing.EndSpan(ctx, sc, err)
2909		}()
2910	}
2911	next, err := page.fn(ctx, page.pc)
2912	if err != nil {
2913		return err
2914	}
2915	page.pc = next
2916	return nil
2917}
2918
2919// Next advances to the next page of values.  If there was an error making
2920// the request the page does not advance and the error is returned.
2921// Deprecated: Use NextWithContext() instead.
2922func (page *ProductCollectionPage) Next() error {
2923	return page.NextWithContext(context.Background())
2924}
2925
2926// NotDone returns true if the page enumeration should be started or is not yet complete.
2927func (page ProductCollectionPage) NotDone() bool {
2928	return !page.pc.IsEmpty()
2929}
2930
2931// Response returns the raw server response from the last page request.
2932func (page ProductCollectionPage) Response() ProductCollection {
2933	return page.pc
2934}
2935
2936// Values returns the slice of values for the current page or nil if there are no values.
2937func (page ProductCollectionPage) Values() []ProductContract {
2938	if page.pc.IsEmpty() {
2939		return nil
2940	}
2941	return *page.pc.Value
2942}
2943
2944// Creates a new instance of the ProductCollectionPage type.
2945func NewProductCollectionPage(getNextPage func(context.Context, ProductCollection) (ProductCollection, error)) ProductCollectionPage {
2946	return ProductCollectionPage{fn: getNextPage}
2947}
2948
2949// ProductContract product details.
2950type ProductContract struct {
2951	autorest.Response `json:"-"`
2952	// ID - Identifier of the Product entity.
2953	ID *string `json:"id,omitempty"`
2954	// Name - Product name.
2955	Name *string `json:"name,omitempty"`
2956	// Description - Product description. May include HTML formatting tags.
2957	Description *string `json:"description,omitempty"`
2958	// Terms - Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
2959	Terms *string `json:"terms,omitempty"`
2960	// 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.
2961	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
2962	// 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.
2963	ApprovalRequired *bool `json:"approvalRequired,omitempty"`
2964	// 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.
2965	SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"`
2966	// 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'
2967	State ProductState `json:"state,omitempty"`
2968}
2969
2970// ProductContractProperties product profile.
2971type ProductContractProperties struct {
2972	// Name - Product name.
2973	Name *string `json:"name,omitempty"`
2974	// Description - Product description. May include HTML formatting tags.
2975	Description *string `json:"description,omitempty"`
2976	// Terms - Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
2977	Terms *string `json:"terms,omitempty"`
2978	// 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.
2979	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
2980	// 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.
2981	ApprovalRequired *bool `json:"approvalRequired,omitempty"`
2982	// 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.
2983	SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"`
2984	// 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'
2985	State ProductState `json:"state,omitempty"`
2986}
2987
2988// ProductEntityBaseParameters product Entity Base Parameters
2989type ProductEntityBaseParameters struct {
2990	// Description - Product description. May include HTML formatting tags.
2991	Description *string `json:"description,omitempty"`
2992	// Terms - Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
2993	Terms *string `json:"terms,omitempty"`
2994	// 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.
2995	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
2996	// 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.
2997	ApprovalRequired *bool `json:"approvalRequired,omitempty"`
2998	// 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.
2999	SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"`
3000	// 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'
3001	State ProductState `json:"state,omitempty"`
3002}
3003
3004// ProductUpdateParameters parameters supplied to the Update Product operation.
3005type ProductUpdateParameters struct {
3006	// Name - Product name.
3007	Name *string `json:"name,omitempty"`
3008	// Description - Product description. May include HTML formatting tags.
3009	Description *string `json:"description,omitempty"`
3010	// Terms - Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
3011	Terms *string `json:"terms,omitempty"`
3012	// 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.
3013	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
3014	// 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.
3015	ApprovalRequired *bool `json:"approvalRequired,omitempty"`
3016	// 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.
3017	SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"`
3018	// 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'
3019	State ProductState `json:"state,omitempty"`
3020}
3021
3022// PropertyCollection paged Property list representation.
3023type PropertyCollection struct {
3024	autorest.Response `json:"-"`
3025	// Value - Page values.
3026	Value *[]PropertyContract `json:"value,omitempty"`
3027	// Count - Total number of entities
3028	Count *int32 `json:"count,omitempty"`
3029	// NextLink - Next page link if any.
3030	NextLink *string `json:"nextLink,omitempty"`
3031}
3032
3033// PropertyCollectionIterator provides access to a complete listing of PropertyContract values.
3034type PropertyCollectionIterator struct {
3035	i    int
3036	page PropertyCollectionPage
3037}
3038
3039// NextWithContext advances to the next value.  If there was an error making
3040// the request the iterator does not advance and the error is returned.
3041func (iter *PropertyCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3042	if tracing.IsEnabled() {
3043		ctx = tracing.StartSpan(ctx, fqdn+"/PropertyCollectionIterator.NextWithContext")
3044		defer func() {
3045			sc := -1
3046			if iter.Response().Response.Response != nil {
3047				sc = iter.Response().Response.Response.StatusCode
3048			}
3049			tracing.EndSpan(ctx, sc, err)
3050		}()
3051	}
3052	iter.i++
3053	if iter.i < len(iter.page.Values()) {
3054		return nil
3055	}
3056	err = iter.page.NextWithContext(ctx)
3057	if err != nil {
3058		iter.i--
3059		return err
3060	}
3061	iter.i = 0
3062	return nil
3063}
3064
3065// Next advances to the next value.  If there was an error making
3066// the request the iterator does not advance and the error is returned.
3067// Deprecated: Use NextWithContext() instead.
3068func (iter *PropertyCollectionIterator) Next() error {
3069	return iter.NextWithContext(context.Background())
3070}
3071
3072// NotDone returns true if the enumeration should be started or is not yet complete.
3073func (iter PropertyCollectionIterator) NotDone() bool {
3074	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3075}
3076
3077// Response returns the raw server response from the last page request.
3078func (iter PropertyCollectionIterator) Response() PropertyCollection {
3079	return iter.page.Response()
3080}
3081
3082// Value returns the current value or a zero-initialized value if the
3083// iterator has advanced beyond the end of the collection.
3084func (iter PropertyCollectionIterator) Value() PropertyContract {
3085	if !iter.page.NotDone() {
3086		return PropertyContract{}
3087	}
3088	return iter.page.Values()[iter.i]
3089}
3090
3091// Creates a new instance of the PropertyCollectionIterator type.
3092func NewPropertyCollectionIterator(page PropertyCollectionPage) PropertyCollectionIterator {
3093	return PropertyCollectionIterator{page: page}
3094}
3095
3096// IsEmpty returns true if the ListResult contains no values.
3097func (pc PropertyCollection) IsEmpty() bool {
3098	return pc.Value == nil || len(*pc.Value) == 0
3099}
3100
3101// propertyCollectionPreparer prepares a request to retrieve the next set of results.
3102// It returns nil if no more results exist.
3103func (pc PropertyCollection) propertyCollectionPreparer(ctx context.Context) (*http.Request, error) {
3104	if pc.NextLink == nil || len(to.String(pc.NextLink)) < 1 {
3105		return nil, nil
3106	}
3107	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3108		autorest.AsJSON(),
3109		autorest.AsGet(),
3110		autorest.WithBaseURL(to.String(pc.NextLink)))
3111}
3112
3113// PropertyCollectionPage contains a page of PropertyContract values.
3114type PropertyCollectionPage struct {
3115	fn func(context.Context, PropertyCollection) (PropertyCollection, error)
3116	pc PropertyCollection
3117}
3118
3119// NextWithContext advances to the next page of values.  If there was an error making
3120// the request the page does not advance and the error is returned.
3121func (page *PropertyCollectionPage) NextWithContext(ctx context.Context) (err error) {
3122	if tracing.IsEnabled() {
3123		ctx = tracing.StartSpan(ctx, fqdn+"/PropertyCollectionPage.NextWithContext")
3124		defer func() {
3125			sc := -1
3126			if page.Response().Response.Response != nil {
3127				sc = page.Response().Response.Response.StatusCode
3128			}
3129			tracing.EndSpan(ctx, sc, err)
3130		}()
3131	}
3132	next, err := page.fn(ctx, page.pc)
3133	if err != nil {
3134		return err
3135	}
3136	page.pc = next
3137	return nil
3138}
3139
3140// Next advances to the next page of values.  If there was an error making
3141// the request the page does not advance and the error is returned.
3142// Deprecated: Use NextWithContext() instead.
3143func (page *PropertyCollectionPage) Next() error {
3144	return page.NextWithContext(context.Background())
3145}
3146
3147// NotDone returns true if the page enumeration should be started or is not yet complete.
3148func (page PropertyCollectionPage) NotDone() bool {
3149	return !page.pc.IsEmpty()
3150}
3151
3152// Response returns the raw server response from the last page request.
3153func (page PropertyCollectionPage) Response() PropertyCollection {
3154	return page.pc
3155}
3156
3157// Values returns the slice of values for the current page or nil if there are no values.
3158func (page PropertyCollectionPage) Values() []PropertyContract {
3159	if page.pc.IsEmpty() {
3160		return nil
3161	}
3162	return *page.pc.Value
3163}
3164
3165// Creates a new instance of the PropertyCollectionPage type.
3166func NewPropertyCollectionPage(getNextPage func(context.Context, PropertyCollection) (PropertyCollection, error)) PropertyCollectionPage {
3167	return PropertyCollectionPage{fn: getNextPage}
3168}
3169
3170// PropertyContract property details.
3171type PropertyContract struct {
3172	autorest.Response `json:"-"`
3173	// ID - Identifier of the Property.
3174	ID *string `json:"id,omitempty"`
3175	// Name - Unique name of Property. It may contain only letters, digits, period, dash, and underscore characters.
3176	Name *string `json:"name,omitempty"`
3177	// Value - Value of the property. Can contain policy expressions. It may not be empty or consist only of whitespace.
3178	Value *string `json:"value,omitempty"`
3179	// Tags - Optional tags that when provided can be used to filter the property list.
3180	Tags *[]string `json:"tags,omitempty"`
3181	// Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false.
3182	Secret *bool `json:"secret,omitempty"`
3183}
3184
3185// PropertyContractProperties property Contract properties.
3186type PropertyContractProperties struct {
3187	// Name - Unique name of Property. It may contain only letters, digits, period, dash, and underscore characters.
3188	Name *string `json:"name,omitempty"`
3189	// Value - Value of the property. Can contain policy expressions. It may not be empty or consist only of whitespace.
3190	Value *string `json:"value,omitempty"`
3191	// Tags - Optional tags that when provided can be used to filter the property list.
3192	Tags *[]string `json:"tags,omitempty"`
3193	// Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false.
3194	Secret *bool `json:"secret,omitempty"`
3195}
3196
3197// PropertyEntityBaseParameters property Entity Base Parameters set.
3198type PropertyEntityBaseParameters struct {
3199	// Tags - Optional tags that when provided can be used to filter the property list.
3200	Tags *[]string `json:"tags,omitempty"`
3201	// Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false.
3202	Secret *bool `json:"secret,omitempty"`
3203}
3204
3205// PropertyUpdateParameters property Contract properties.
3206type PropertyUpdateParameters struct {
3207	// Name - Unique name of Property. It may contain only letters, digits, period, dash, and underscore characters.
3208	Name *string `json:"name,omitempty"`
3209	// Value - Value of the property. Can contain policy expressions. It may not be empty or consist only of whitespace.
3210	Value *string `json:"value,omitempty"`
3211	// Tags - Optional tags that when provided can be used to filter the property list.
3212	Tags *[]string `json:"tags,omitempty"`
3213	// Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false.
3214	Secret *bool `json:"secret,omitempty"`
3215}
3216
3217// QuotaCounterCollection paged Quota Counter list representation.
3218type QuotaCounterCollection struct {
3219	autorest.Response `json:"-"`
3220	// Value - Quota counter values.
3221	Value *[]QuotaCounterContract `json:"value,omitempty"`
3222	// Count - Total record count number across all pages.
3223	Count *int64 `json:"count,omitempty"`
3224	// NextLink - Next page link if any.
3225	NextLink *string `json:"nextLink,omitempty"`
3226}
3227
3228// QuotaCounterContract quota counter details.
3229type QuotaCounterContract struct {
3230	autorest.Response `json:"-"`
3231	// CounterKey - The Key value of the Counter. Must not be empty.
3232	CounterKey *string `json:"counterKey,omitempty"`
3233	// PeriodKey - Identifier of the Period for which the counter was collected. Must not be empty.
3234	PeriodKey *string `json:"periodKey,omitempty"`
3235	// PeriodStartTime - The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
3236	PeriodStartTime *date.Time `json:"periodStartTime,omitempty"`
3237	// PeriodEndTime - The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
3238	PeriodEndTime *date.Time `json:"periodEndTime,omitempty"`
3239	// Value - Quota Value Properties
3240	Value *QuotaCounterValueContractProperties `json:"Value,omitempty"`
3241}
3242
3243// QuotaCounterValueContract quota counter value details.
3244type QuotaCounterValueContract struct {
3245	// QuotaCounterValueContractProperties - Quota counter Value Properties.
3246	*QuotaCounterValueContractProperties `json:"value,omitempty"`
3247}
3248
3249// MarshalJSON is the custom marshaler for QuotaCounterValueContract.
3250func (qcvc QuotaCounterValueContract) MarshalJSON() ([]byte, error) {
3251	objectMap := make(map[string]interface{})
3252	if qcvc.QuotaCounterValueContractProperties != nil {
3253		objectMap["value"] = qcvc.QuotaCounterValueContractProperties
3254	}
3255	return json.Marshal(objectMap)
3256}
3257
3258// UnmarshalJSON is the custom unmarshaler for QuotaCounterValueContract struct.
3259func (qcvc *QuotaCounterValueContract) UnmarshalJSON(body []byte) error {
3260	var m map[string]*json.RawMessage
3261	err := json.Unmarshal(body, &m)
3262	if err != nil {
3263		return err
3264	}
3265	for k, v := range m {
3266		switch k {
3267		case "value":
3268			if v != nil {
3269				var quotaCounterValueContractProperties QuotaCounterValueContractProperties
3270				err = json.Unmarshal(*v, &quotaCounterValueContractProperties)
3271				if err != nil {
3272					return err
3273				}
3274				qcvc.QuotaCounterValueContractProperties = &quotaCounterValueContractProperties
3275			}
3276		}
3277	}
3278
3279	return nil
3280}
3281
3282// QuotaCounterValueContractProperties quota counter value details.
3283type QuotaCounterValueContractProperties struct {
3284	// CallsCount - Number of times Counter was called.
3285	CallsCount *int32 `json:"callsCount,omitempty"`
3286	// KbTransferred - Data Transferred in KiloBytes.
3287	KbTransferred *float64 `json:"kbTransferred,omitempty"`
3288}
3289
3290// RegionContract region profile.
3291type RegionContract struct {
3292	// Name - READ-ONLY; Region name.
3293	Name *string `json:"name,omitempty"`
3294	// IsMasterRegion - whether Region is the master region.
3295	IsMasterRegion *bool `json:"isMasterRegion,omitempty"`
3296	// IsDeleted - whether Region is deleted.
3297	IsDeleted *bool `json:"isDeleted,omitempty"`
3298}
3299
3300// RegionListResult lists Regions operation response details.
3301type RegionListResult struct {
3302	autorest.Response `json:"-"`
3303	// Value - Lists of Regions.
3304	Value *[]RegionContract `json:"value,omitempty"`
3305	// Count - Total record count number across all pages.
3306	Count *int64 `json:"count,omitempty"`
3307	// NextLink - Next page link if any.
3308	NextLink *string `json:"nextLink,omitempty"`
3309}
3310
3311// RegistrationDelegationSettingsProperties user registration delegation settings properties.
3312type RegistrationDelegationSettingsProperties struct {
3313	// Enabled - Enable or disable delegation for user registration.
3314	Enabled *bool `json:"enabled,omitempty"`
3315}
3316
3317// ReportCollection paged Report records list representation.
3318type ReportCollection struct {
3319	autorest.Response `json:"-"`
3320	// Value - Page values.
3321	Value *[]ReportRecordContract `json:"value,omitempty"`
3322	// Count - Total record count number across all pages.
3323	Count *int64 `json:"count,omitempty"`
3324	// NextLink - Next page link if any.
3325	NextLink *string `json:"nextLink,omitempty"`
3326}
3327
3328// ReportCollectionIterator provides access to a complete listing of ReportRecordContract values.
3329type ReportCollectionIterator struct {
3330	i    int
3331	page ReportCollectionPage
3332}
3333
3334// NextWithContext advances to the next value.  If there was an error making
3335// the request the iterator does not advance and the error is returned.
3336func (iter *ReportCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3337	if tracing.IsEnabled() {
3338		ctx = tracing.StartSpan(ctx, fqdn+"/ReportCollectionIterator.NextWithContext")
3339		defer func() {
3340			sc := -1
3341			if iter.Response().Response.Response != nil {
3342				sc = iter.Response().Response.Response.StatusCode
3343			}
3344			tracing.EndSpan(ctx, sc, err)
3345		}()
3346	}
3347	iter.i++
3348	if iter.i < len(iter.page.Values()) {
3349		return nil
3350	}
3351	err = iter.page.NextWithContext(ctx)
3352	if err != nil {
3353		iter.i--
3354		return err
3355	}
3356	iter.i = 0
3357	return nil
3358}
3359
3360// Next advances to the next value.  If there was an error making
3361// the request the iterator does not advance and the error is returned.
3362// Deprecated: Use NextWithContext() instead.
3363func (iter *ReportCollectionIterator) Next() error {
3364	return iter.NextWithContext(context.Background())
3365}
3366
3367// NotDone returns true if the enumeration should be started or is not yet complete.
3368func (iter ReportCollectionIterator) NotDone() bool {
3369	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3370}
3371
3372// Response returns the raw server response from the last page request.
3373func (iter ReportCollectionIterator) Response() ReportCollection {
3374	return iter.page.Response()
3375}
3376
3377// Value returns the current value or a zero-initialized value if the
3378// iterator has advanced beyond the end of the collection.
3379func (iter ReportCollectionIterator) Value() ReportRecordContract {
3380	if !iter.page.NotDone() {
3381		return ReportRecordContract{}
3382	}
3383	return iter.page.Values()[iter.i]
3384}
3385
3386// Creates a new instance of the ReportCollectionIterator type.
3387func NewReportCollectionIterator(page ReportCollectionPage) ReportCollectionIterator {
3388	return ReportCollectionIterator{page: page}
3389}
3390
3391// IsEmpty returns true if the ListResult contains no values.
3392func (rc ReportCollection) IsEmpty() bool {
3393	return rc.Value == nil || len(*rc.Value) == 0
3394}
3395
3396// reportCollectionPreparer prepares a request to retrieve the next set of results.
3397// It returns nil if no more results exist.
3398func (rc ReportCollection) reportCollectionPreparer(ctx context.Context) (*http.Request, error) {
3399	if rc.NextLink == nil || len(to.String(rc.NextLink)) < 1 {
3400		return nil, nil
3401	}
3402	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3403		autorest.AsJSON(),
3404		autorest.AsGet(),
3405		autorest.WithBaseURL(to.String(rc.NextLink)))
3406}
3407
3408// ReportCollectionPage contains a page of ReportRecordContract values.
3409type ReportCollectionPage struct {
3410	fn func(context.Context, ReportCollection) (ReportCollection, error)
3411	rc ReportCollection
3412}
3413
3414// NextWithContext advances to the next page of values.  If there was an error making
3415// the request the page does not advance and the error is returned.
3416func (page *ReportCollectionPage) NextWithContext(ctx context.Context) (err error) {
3417	if tracing.IsEnabled() {
3418		ctx = tracing.StartSpan(ctx, fqdn+"/ReportCollectionPage.NextWithContext")
3419		defer func() {
3420			sc := -1
3421			if page.Response().Response.Response != nil {
3422				sc = page.Response().Response.Response.StatusCode
3423			}
3424			tracing.EndSpan(ctx, sc, err)
3425		}()
3426	}
3427	next, err := page.fn(ctx, page.rc)
3428	if err != nil {
3429		return err
3430	}
3431	page.rc = next
3432	return nil
3433}
3434
3435// Next advances to the next page of values.  If there was an error making
3436// the request the page does not advance and the error is returned.
3437// Deprecated: Use NextWithContext() instead.
3438func (page *ReportCollectionPage) Next() error {
3439	return page.NextWithContext(context.Background())
3440}
3441
3442// NotDone returns true if the page enumeration should be started or is not yet complete.
3443func (page ReportCollectionPage) NotDone() bool {
3444	return !page.rc.IsEmpty()
3445}
3446
3447// Response returns the raw server response from the last page request.
3448func (page ReportCollectionPage) Response() ReportCollection {
3449	return page.rc
3450}
3451
3452// Values returns the slice of values for the current page or nil if there are no values.
3453func (page ReportCollectionPage) Values() []ReportRecordContract {
3454	if page.rc.IsEmpty() {
3455		return nil
3456	}
3457	return *page.rc.Value
3458}
3459
3460// Creates a new instance of the ReportCollectionPage type.
3461func NewReportCollectionPage(getNextPage func(context.Context, ReportCollection) (ReportCollection, error)) ReportCollectionPage {
3462	return ReportCollectionPage{fn: getNextPage}
3463}
3464
3465// ReportRecordContract report data.
3466type ReportRecordContract struct {
3467	// Name - Name depending on report endpoint specifies product, API, operation or developer name.
3468	Name *string `json:"name,omitempty"`
3469	// Timestamp - Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
3470	Timestamp *date.Time `json:"timestamp,omitempty"`
3471	// Interval - Length of aggregation period.  Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).
3472	Interval *string `json:"interval,omitempty"`
3473	// Country - Country to which this record data is related.
3474	Country *string `json:"country,omitempty"`
3475	// Region - Country region to which this record data is related.
3476	Region *string `json:"region,omitempty"`
3477	// Zip - Zip code to which this record data is related.
3478	Zip *string `json:"zip,omitempty"`
3479	// UserID - READ-ONLY; User identifier path. /users/{userId}
3480	UserID *string `json:"userId,omitempty"`
3481	// ProductID - READ-ONLY; Product identifier path. /products/{productId}
3482	ProductID *string `json:"productId,omitempty"`
3483	// APIID - API identifier path. /apis/{apiId}
3484	APIID *string `json:"apiId,omitempty"`
3485	// OperationID - Operation identifier path. /apis/{apiId}/operations/{operationId}
3486	OperationID *string `json:"operationId,omitempty"`
3487	// APIRegion - API region identifier.
3488	APIRegion *string `json:"apiRegion,omitempty"`
3489	// SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId}
3490	SubscriptionID *string `json:"subscriptionId,omitempty"`
3491	// CallCountSuccess - Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect
3492	CallCountSuccess *int32 `json:"callCountSuccess,omitempty"`
3493	// CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests
3494	CallCountBlocked *int32 `json:"callCountBlocked,omitempty"`
3495	// CallCountFailed - Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600
3496	CallCountFailed *int32 `json:"callCountFailed,omitempty"`
3497	// CallCountOther - Number of other calls.
3498	CallCountOther *int32 `json:"callCountOther,omitempty"`
3499	// CallCountTotal - Total number of calls.
3500	CallCountTotal *int32 `json:"callCountTotal,omitempty"`
3501	// Bandwidth - Bandwidth consumed.
3502	Bandwidth *int64 `json:"bandwidth,omitempty"`
3503	// CacheHitCount - Number of times when content was served from cache policy.
3504	CacheHitCount *int32 `json:"cacheHitCount,omitempty"`
3505	// CacheMissCount - Number of times content was fetched from backend.
3506	CacheMissCount *int32 `json:"cacheMissCount,omitempty"`
3507	// APITimeAvg - Average time it took to process request.
3508	APITimeAvg *float64 `json:"apiTimeAvg,omitempty"`
3509	// APITimeMin - Minimum time it took to process request.
3510	APITimeMin *float64 `json:"apiTimeMin,omitempty"`
3511	// APITimeMax - Maximum time it took to process request.
3512	APITimeMax *float64 `json:"apiTimeMax,omitempty"`
3513	// ServiceTimeAvg - Average time it took to process request on backend.
3514	ServiceTimeAvg *float64 `json:"serviceTimeAvg,omitempty"`
3515	// ServiceTimeMin - Minimum time it took to process request on backend.
3516	ServiceTimeMin *float64 `json:"serviceTimeMin,omitempty"`
3517	// ServiceTimeMax - Maximum time it took to process request on backend.
3518	ServiceTimeMax *float64 `json:"serviceTimeMax,omitempty"`
3519}
3520
3521// RepresentationContract operation request/response representation details.
3522type RepresentationContract struct {
3523	// ContentType - Specifies a registered or custom content type for this representation, e.g. application/xml.
3524	ContentType *string `json:"contentType,omitempty"`
3525	// Sample - An example of the representation.
3526	Sample *string `json:"sample,omitempty"`
3527	// SchemaID - Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
3528	SchemaID *string `json:"schemaId,omitempty"`
3529	// TypeName - Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
3530	TypeName *string `json:"typeName,omitempty"`
3531	// FormParameters - Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
3532	FormParameters *[]ParameterContract `json:"formParameters,omitempty"`
3533}
3534
3535// RequestContract operation request details.
3536type RequestContract struct {
3537	// Description - Operation request description.
3538	Description *string `json:"description,omitempty"`
3539	// QueryParameters - Collection of operation request query parameters.
3540	QueryParameters *[]ParameterContract `json:"queryParameters,omitempty"`
3541	// Headers - Collection of operation request headers.
3542	Headers *[]ParameterContract `json:"headers,omitempty"`
3543	// Representations - Collection of operation request representations.
3544	Representations *[]RepresentationContract `json:"representations,omitempty"`
3545}
3546
3547// RequestReportCollection paged Report records list representation.
3548type RequestReportCollection struct {
3549	autorest.Response `json:"-"`
3550	// Value - Page values.
3551	Value *[]RequestReportRecordContract `json:"value,omitempty"`
3552	// Count - Total record count number across all pages.
3553	Count *int64 `json:"count,omitempty"`
3554}
3555
3556// RequestReportRecordContract request Report data.
3557type RequestReportRecordContract struct {
3558	// APIID - API identifier path. /apis/{apiId}
3559	APIID *string `json:"apiId,omitempty"`
3560	// OperationID - Operation identifier path. /apis/{apiId}/operations/{operationId}
3561	OperationID *string `json:"operationId,omitempty"`
3562	// ProductID - READ-ONLY; Product identifier path. /products/{productId}
3563	ProductID *string `json:"productId,omitempty"`
3564	// UserID - READ-ONLY; User identifier path. /users/{userId}
3565	UserID *string `json:"userId,omitempty"`
3566	// Method - The HTTP method associated with this request..
3567	Method *string `json:"method,omitempty"`
3568	// URL - The full URL associated with this request.
3569	URL *string `json:"url,omitempty"`
3570	// IPAddress - The client IP address associated with this request.
3571	IPAddress *string `json:"ipAddress,omitempty"`
3572	// BackendResponseCode - The HTTP status code received by the gateway as a result of forwarding this request to the backend.
3573	BackendResponseCode *string `json:"backendResponseCode,omitempty"`
3574	// ResponseCode - The HTTP status code returned by the gateway.
3575	ResponseCode *int32 `json:"responseCode,omitempty"`
3576	// ResponseSize - The size of the response returned by the gateway.
3577	ResponseSize *int32 `json:"responseSize,omitempty"`
3578	// Timestamp - The date and time when this request was received by the gateway in ISO 8601 format.
3579	Timestamp *date.Time `json:"timestamp,omitempty"`
3580	// Cache - Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend.
3581	Cache *string `json:"cache,omitempty"`
3582	// APITime - The total time it took to process this request.
3583	APITime *float64 `json:"apiTime,omitempty"`
3584	// ServiceTime - he time it took to forward this request to the backend and get the response back.
3585	ServiceTime *float64 `json:"serviceTime,omitempty"`
3586	// APIRegion - Azure region where the gateway that processed this request is located.
3587	APIRegion *string `json:"apiRegion,omitempty"`
3588	// SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId}
3589	SubscriptionID *string `json:"subscriptionId,omitempty"`
3590	// RequestID - Request Identifier.
3591	RequestID *string `json:"requestId,omitempty"`
3592	// RequestSize - The size of this request..
3593	RequestSize *int32 `json:"requestSize,omitempty"`
3594}
3595
3596// ResponseContract operation response details.
3597type ResponseContract struct {
3598	// StatusCode - Operation response HTTP status code.
3599	StatusCode *int32 `json:"statusCode,omitempty"`
3600	// Description - Operation response description.
3601	Description *string `json:"description,omitempty"`
3602	// Representations - Collection of operation response representations.
3603	Representations *[]RepresentationContract `json:"representations,omitempty"`
3604	// Headers - Collection of operation response headers.
3605	Headers *[]ParameterContract `json:"headers,omitempty"`
3606}
3607
3608// SaveConfigurationParameter parameters supplied to the Save Tenant Configuration operation.
3609type SaveConfigurationParameter struct {
3610	// Branch - The name of the Git branch in which to commit the current configuration snapshot.
3611	Branch *string `json:"branch,omitempty"`
3612	// Force - The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten.
3613	Force *bool `json:"force,omitempty"`
3614}
3615
3616// SchemaCollection the response of the list schema operation.
3617type SchemaCollection struct {
3618	autorest.Response `json:"-"`
3619	// Value - Api Schema Contract value.
3620	Value *[]SchemaContract `json:"value,omitempty"`
3621	// Count - Total number of entities
3622	Count *int32 `json:"count,omitempty"`
3623	// NextLink - Next page link if any.
3624	NextLink *string `json:"nextLink,omitempty"`
3625}
3626
3627// SchemaCollectionIterator provides access to a complete listing of SchemaContract values.
3628type SchemaCollectionIterator struct {
3629	i    int
3630	page SchemaCollectionPage
3631}
3632
3633// NextWithContext advances to the next value.  If there was an error making
3634// the request the iterator does not advance and the error is returned.
3635func (iter *SchemaCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3636	if tracing.IsEnabled() {
3637		ctx = tracing.StartSpan(ctx, fqdn+"/SchemaCollectionIterator.NextWithContext")
3638		defer func() {
3639			sc := -1
3640			if iter.Response().Response.Response != nil {
3641				sc = iter.Response().Response.Response.StatusCode
3642			}
3643			tracing.EndSpan(ctx, sc, err)
3644		}()
3645	}
3646	iter.i++
3647	if iter.i < len(iter.page.Values()) {
3648		return nil
3649	}
3650	err = iter.page.NextWithContext(ctx)
3651	if err != nil {
3652		iter.i--
3653		return err
3654	}
3655	iter.i = 0
3656	return nil
3657}
3658
3659// Next advances to the next value.  If there was an error making
3660// the request the iterator does not advance and the error is returned.
3661// Deprecated: Use NextWithContext() instead.
3662func (iter *SchemaCollectionIterator) Next() error {
3663	return iter.NextWithContext(context.Background())
3664}
3665
3666// NotDone returns true if the enumeration should be started or is not yet complete.
3667func (iter SchemaCollectionIterator) NotDone() bool {
3668	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3669}
3670
3671// Response returns the raw server response from the last page request.
3672func (iter SchemaCollectionIterator) Response() SchemaCollection {
3673	return iter.page.Response()
3674}
3675
3676// Value returns the current value or a zero-initialized value if the
3677// iterator has advanced beyond the end of the collection.
3678func (iter SchemaCollectionIterator) Value() SchemaContract {
3679	if !iter.page.NotDone() {
3680		return SchemaContract{}
3681	}
3682	return iter.page.Values()[iter.i]
3683}
3684
3685// Creates a new instance of the SchemaCollectionIterator type.
3686func NewSchemaCollectionIterator(page SchemaCollectionPage) SchemaCollectionIterator {
3687	return SchemaCollectionIterator{page: page}
3688}
3689
3690// IsEmpty returns true if the ListResult contains no values.
3691func (sc SchemaCollection) IsEmpty() bool {
3692	return sc.Value == nil || len(*sc.Value) == 0
3693}
3694
3695// schemaCollectionPreparer prepares a request to retrieve the next set of results.
3696// It returns nil if no more results exist.
3697func (sc SchemaCollection) schemaCollectionPreparer(ctx context.Context) (*http.Request, error) {
3698	if sc.NextLink == nil || len(to.String(sc.NextLink)) < 1 {
3699		return nil, nil
3700	}
3701	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3702		autorest.AsJSON(),
3703		autorest.AsGet(),
3704		autorest.WithBaseURL(to.String(sc.NextLink)))
3705}
3706
3707// SchemaCollectionPage contains a page of SchemaContract values.
3708type SchemaCollectionPage struct {
3709	fn func(context.Context, SchemaCollection) (SchemaCollection, error)
3710	sc SchemaCollection
3711}
3712
3713// NextWithContext advances to the next page of values.  If there was an error making
3714// the request the page does not advance and the error is returned.
3715func (page *SchemaCollectionPage) NextWithContext(ctx context.Context) (err error) {
3716	if tracing.IsEnabled() {
3717		ctx = tracing.StartSpan(ctx, fqdn+"/SchemaCollectionPage.NextWithContext")
3718		defer func() {
3719			sc := -1
3720			if page.Response().Response.Response != nil {
3721				sc = page.Response().Response.Response.StatusCode
3722			}
3723			tracing.EndSpan(ctx, sc, err)
3724		}()
3725	}
3726	next, err := page.fn(ctx, page.sc)
3727	if err != nil {
3728		return err
3729	}
3730	page.sc = next
3731	return nil
3732}
3733
3734// Next advances to the next page of values.  If there was an error making
3735// the request the page does not advance and the error is returned.
3736// Deprecated: Use NextWithContext() instead.
3737func (page *SchemaCollectionPage) Next() error {
3738	return page.NextWithContext(context.Background())
3739}
3740
3741// NotDone returns true if the page enumeration should be started or is not yet complete.
3742func (page SchemaCollectionPage) NotDone() bool {
3743	return !page.sc.IsEmpty()
3744}
3745
3746// Response returns the raw server response from the last page request.
3747func (page SchemaCollectionPage) Response() SchemaCollection {
3748	return page.sc
3749}
3750
3751// Values returns the slice of values for the current page or nil if there are no values.
3752func (page SchemaCollectionPage) Values() []SchemaContract {
3753	if page.sc.IsEmpty() {
3754		return nil
3755	}
3756	return *page.sc.Value
3757}
3758
3759// Creates a new instance of the SchemaCollectionPage type.
3760func NewSchemaCollectionPage(getNextPage func(context.Context, SchemaCollection) (SchemaCollection, error)) SchemaCollectionPage {
3761	return SchemaCollectionPage{fn: getNextPage}
3762}
3763
3764// SchemaContract schema Contract details.
3765type SchemaContract struct {
3766	autorest.Response `json:"-"`
3767	// ID - Identifier of the Schema.
3768	ID *string `json:"id,omitempty"`
3769	// ContentType - Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
3770	ContentType *string `json:"contentType,omitempty"`
3771	// SchemaDocumentProperties - Properties of the Schema Document.
3772	*SchemaDocumentProperties `json:"document,omitempty"`
3773}
3774
3775// SchemaContractProperties schema contract Properties.
3776type SchemaContractProperties struct {
3777	// ContentType - Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
3778	ContentType *string `json:"contentType,omitempty"`
3779	// SchemaDocumentProperties - Properties of the Schema Document.
3780	*SchemaDocumentProperties `json:"document,omitempty"`
3781}
3782
3783// MarshalJSON is the custom marshaler for SchemaContractProperties.
3784func (scp SchemaContractProperties) MarshalJSON() ([]byte, error) {
3785	objectMap := make(map[string]interface{})
3786	if scp.ContentType != nil {
3787		objectMap["contentType"] = scp.ContentType
3788	}
3789	if scp.SchemaDocumentProperties != nil {
3790		objectMap["document"] = scp.SchemaDocumentProperties
3791	}
3792	return json.Marshal(objectMap)
3793}
3794
3795// UnmarshalJSON is the custom unmarshaler for SchemaContractProperties struct.
3796func (scp *SchemaContractProperties) UnmarshalJSON(body []byte) error {
3797	var m map[string]*json.RawMessage
3798	err := json.Unmarshal(body, &m)
3799	if err != nil {
3800		return err
3801	}
3802	for k, v := range m {
3803		switch k {
3804		case "contentType":
3805			if v != nil {
3806				var contentType string
3807				err = json.Unmarshal(*v, &contentType)
3808				if err != nil {
3809					return err
3810				}
3811				scp.ContentType = &contentType
3812			}
3813		case "document":
3814			if v != nil {
3815				var schemaDocumentProperties SchemaDocumentProperties
3816				err = json.Unmarshal(*v, &schemaDocumentProperties)
3817				if err != nil {
3818					return err
3819				}
3820				scp.SchemaDocumentProperties = &schemaDocumentProperties
3821			}
3822		}
3823	}
3824
3825	return nil
3826}
3827
3828// SchemaDocumentProperties schema Document Properties.
3829type SchemaDocumentProperties struct {
3830	// Value - Json escaped string defining the document representing the Schema.
3831	Value *string `json:"value,omitempty"`
3832}
3833
3834// SubscriptionCollection paged Subscriptions list representation.
3835type SubscriptionCollection struct {
3836	autorest.Response `json:"-"`
3837	// Value - Page values.
3838	Value *[]SubscriptionContract `json:"value,omitempty"`
3839	// Count - Total number of entities
3840	Count *int32 `json:"count,omitempty"`
3841	// NextLink - Next page link if any.
3842	NextLink *string `json:"nextLink,omitempty"`
3843}
3844
3845// SubscriptionCollectionIterator provides access to a complete listing of SubscriptionContract values.
3846type SubscriptionCollectionIterator struct {
3847	i    int
3848	page SubscriptionCollectionPage
3849}
3850
3851// NextWithContext advances to the next value.  If there was an error making
3852// the request the iterator does not advance and the error is returned.
3853func (iter *SubscriptionCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3854	if tracing.IsEnabled() {
3855		ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionCollectionIterator.NextWithContext")
3856		defer func() {
3857			sc := -1
3858			if iter.Response().Response.Response != nil {
3859				sc = iter.Response().Response.Response.StatusCode
3860			}
3861			tracing.EndSpan(ctx, sc, err)
3862		}()
3863	}
3864	iter.i++
3865	if iter.i < len(iter.page.Values()) {
3866		return nil
3867	}
3868	err = iter.page.NextWithContext(ctx)
3869	if err != nil {
3870		iter.i--
3871		return err
3872	}
3873	iter.i = 0
3874	return nil
3875}
3876
3877// Next advances to the next value.  If there was an error making
3878// the request the iterator does not advance and the error is returned.
3879// Deprecated: Use NextWithContext() instead.
3880func (iter *SubscriptionCollectionIterator) Next() error {
3881	return iter.NextWithContext(context.Background())
3882}
3883
3884// NotDone returns true if the enumeration should be started or is not yet complete.
3885func (iter SubscriptionCollectionIterator) NotDone() bool {
3886	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3887}
3888
3889// Response returns the raw server response from the last page request.
3890func (iter SubscriptionCollectionIterator) Response() SubscriptionCollection {
3891	return iter.page.Response()
3892}
3893
3894// Value returns the current value or a zero-initialized value if the
3895// iterator has advanced beyond the end of the collection.
3896func (iter SubscriptionCollectionIterator) Value() SubscriptionContract {
3897	if !iter.page.NotDone() {
3898		return SubscriptionContract{}
3899	}
3900	return iter.page.Values()[iter.i]
3901}
3902
3903// Creates a new instance of the SubscriptionCollectionIterator type.
3904func NewSubscriptionCollectionIterator(page SubscriptionCollectionPage) SubscriptionCollectionIterator {
3905	return SubscriptionCollectionIterator{page: page}
3906}
3907
3908// IsEmpty returns true if the ListResult contains no values.
3909func (sc SubscriptionCollection) IsEmpty() bool {
3910	return sc.Value == nil || len(*sc.Value) == 0
3911}
3912
3913// subscriptionCollectionPreparer prepares a request to retrieve the next set of results.
3914// It returns nil if no more results exist.
3915func (sc SubscriptionCollection) subscriptionCollectionPreparer(ctx context.Context) (*http.Request, error) {
3916	if sc.NextLink == nil || len(to.String(sc.NextLink)) < 1 {
3917		return nil, nil
3918	}
3919	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3920		autorest.AsJSON(),
3921		autorest.AsGet(),
3922		autorest.WithBaseURL(to.String(sc.NextLink)))
3923}
3924
3925// SubscriptionCollectionPage contains a page of SubscriptionContract values.
3926type SubscriptionCollectionPage struct {
3927	fn func(context.Context, SubscriptionCollection) (SubscriptionCollection, error)
3928	sc SubscriptionCollection
3929}
3930
3931// NextWithContext advances to the next page of values.  If there was an error making
3932// the request the page does not advance and the error is returned.
3933func (page *SubscriptionCollectionPage) NextWithContext(ctx context.Context) (err error) {
3934	if tracing.IsEnabled() {
3935		ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionCollectionPage.NextWithContext")
3936		defer func() {
3937			sc := -1
3938			if page.Response().Response.Response != nil {
3939				sc = page.Response().Response.Response.StatusCode
3940			}
3941			tracing.EndSpan(ctx, sc, err)
3942		}()
3943	}
3944	next, err := page.fn(ctx, page.sc)
3945	if err != nil {
3946		return err
3947	}
3948	page.sc = next
3949	return nil
3950}
3951
3952// Next advances to the next page of values.  If there was an error making
3953// the request the page does not advance and the error is returned.
3954// Deprecated: Use NextWithContext() instead.
3955func (page *SubscriptionCollectionPage) Next() error {
3956	return page.NextWithContext(context.Background())
3957}
3958
3959// NotDone returns true if the page enumeration should be started or is not yet complete.
3960func (page SubscriptionCollectionPage) NotDone() bool {
3961	return !page.sc.IsEmpty()
3962}
3963
3964// Response returns the raw server response from the last page request.
3965func (page SubscriptionCollectionPage) Response() SubscriptionCollection {
3966	return page.sc
3967}
3968
3969// Values returns the slice of values for the current page or nil if there are no values.
3970func (page SubscriptionCollectionPage) Values() []SubscriptionContract {
3971	if page.sc.IsEmpty() {
3972		return nil
3973	}
3974	return *page.sc.Value
3975}
3976
3977// Creates a new instance of the SubscriptionCollectionPage type.
3978func NewSubscriptionCollectionPage(getNextPage func(context.Context, SubscriptionCollection) (SubscriptionCollection, error)) SubscriptionCollectionPage {
3979	return SubscriptionCollectionPage{fn: getNextPage}
3980}
3981
3982// SubscriptionContract subscription details.
3983type SubscriptionContract struct {
3984	autorest.Response `json:"-"`
3985	// ID - Identifier of the Subscription.
3986	ID *string `json:"id,omitempty"`
3987	// UserID - The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{uid} where {uid} is a user identifier.
3988	UserID *string `json:"userId,omitempty"`
3989	// ProductID - The product resource identifier of the subscribed product. The value is a valid relative URL in the format of /products/{productId} where {productId} is a product identifier.
3990	ProductID *string `json:"productId,omitempty"`
3991	// Name - The name of the subscription, or null if the subscription has no name.
3992	Name *string `json:"name,omitempty"`
3993	// State - Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. Possible values include: 'Suspended', 'Active', 'Expired', 'Submitted', 'Rejected', 'Cancelled'
3994	State SubscriptionState `json:"state,omitempty"`
3995	// CreatedDate - READ-ONLY; Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
3996	CreatedDate *date.Time `json:"createdDate,omitempty"`
3997	// StartDate - Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
3998	StartDate *date.Time `json:"startDate,omitempty"`
3999	// ExpirationDate - Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4000	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
4001	// EndDate - Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4002	EndDate *date.Time `json:"endDate,omitempty"`
4003	// NotificationDate - Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4004	NotificationDate *date.Time `json:"notificationDate,omitempty"`
4005	// PrimaryKey - Subscription primary key.
4006	PrimaryKey *string `json:"primaryKey,omitempty"`
4007	// SecondaryKey - Subscription secondary key.
4008	SecondaryKey *string `json:"secondaryKey,omitempty"`
4009	// StateComment - Optional subscription comment added by an administrator.
4010	StateComment *string `json:"stateComment,omitempty"`
4011}
4012
4013// SubscriptionContractProperties subscription details.
4014type SubscriptionContractProperties struct {
4015	// UserID - The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{uid} where {uid} is a user identifier.
4016	UserID *string `json:"userId,omitempty"`
4017	// ProductID - The product resource identifier of the subscribed product. The value is a valid relative URL in the format of /products/{productId} where {productId} is a product identifier.
4018	ProductID *string `json:"productId,omitempty"`
4019	// Name - The name of the subscription, or null if the subscription has no name.
4020	Name *string `json:"name,omitempty"`
4021	// State - Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. Possible values include: 'Suspended', 'Active', 'Expired', 'Submitted', 'Rejected', 'Cancelled'
4022	State SubscriptionState `json:"state,omitempty"`
4023	// CreatedDate - READ-ONLY; Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4024	CreatedDate *date.Time `json:"createdDate,omitempty"`
4025	// StartDate - Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4026	StartDate *date.Time `json:"startDate,omitempty"`
4027	// ExpirationDate - Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4028	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
4029	// EndDate - Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4030	EndDate *date.Time `json:"endDate,omitempty"`
4031	// NotificationDate - Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4032	NotificationDate *date.Time `json:"notificationDate,omitempty"`
4033	// PrimaryKey - Subscription primary key.
4034	PrimaryKey *string `json:"primaryKey,omitempty"`
4035	// SecondaryKey - Subscription secondary key.
4036	SecondaryKey *string `json:"secondaryKey,omitempty"`
4037	// StateComment - Optional subscription comment added by an administrator.
4038	StateComment *string `json:"stateComment,omitempty"`
4039}
4040
4041// SubscriptionCreateParameters parameters supplied to the Create subscription operation.
4042type SubscriptionCreateParameters struct {
4043	// UserID - User (user id path) for whom subscription is being created in form /users/{uid}
4044	UserID *string `json:"userId,omitempty"`
4045	// ProductID - Product (product id path) for which subscription is being created in form /products/{productId}
4046	ProductID *string `json:"productId,omitempty"`
4047	// Name - Subscription name.
4048	Name *string `json:"name,omitempty"`
4049	// PrimaryKey - Primary subscription key. If not specified during request key will be generated automatically.
4050	PrimaryKey *string `json:"primaryKey,omitempty"`
4051	// SecondaryKey - Secondary subscription key. If not specified during request key will be generated automatically.
4052	SecondaryKey *string `json:"secondaryKey,omitempty"`
4053	// State - Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. Possible values include: 'Suspended', 'Active', 'Expired', 'Submitted', 'Rejected', 'Cancelled'
4054	State SubscriptionState `json:"state,omitempty"`
4055}
4056
4057// SubscriptionKeyParameterNamesContract subscription key parameter names details.
4058type SubscriptionKeyParameterNamesContract struct {
4059	// Header - Subscription key header name.
4060	Header *string `json:"header,omitempty"`
4061	// Query - Subscription key query string parameter name.
4062	Query *string `json:"query,omitempty"`
4063}
4064
4065// SubscriptionsDelegationSettingsProperties subscriptions delegation settings properties.
4066type SubscriptionsDelegationSettingsProperties struct {
4067	// Enabled - Enable or disable delegation for subscriptions.
4068	Enabled *bool `json:"enabled,omitempty"`
4069}
4070
4071// SubscriptionUpdateParameters parameters supplied to the Update subscription operation.
4072type SubscriptionUpdateParameters struct {
4073	// UserID - User identifier path: /users/{uid}
4074	UserID *string `json:"userId,omitempty"`
4075	// ProductID - Product identifier path: /products/{productId}
4076	ProductID *string `json:"productId,omitempty"`
4077	// ExpirationDate - Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4078	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
4079	// Name - Subscription name.
4080	Name *string `json:"name,omitempty"`
4081	// PrimaryKey - Primary subscription key.
4082	PrimaryKey *string `json:"primaryKey,omitempty"`
4083	// SecondaryKey - Secondary subscription key.
4084	SecondaryKey *string `json:"secondaryKey,omitempty"`
4085	// State - Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. Possible values include: 'Suspended', 'Active', 'Expired', 'Submitted', 'Rejected', 'Cancelled'
4086	State SubscriptionState `json:"state,omitempty"`
4087	// StateComment - Comments describing subscription state change by the administrator.
4088	StateComment *string `json:"stateComment,omitempty"`
4089}
4090
4091// TenantConfigurationDeployFuture an abstraction for monitoring and retrieving the results of a
4092// long-running operation.
4093type TenantConfigurationDeployFuture struct {
4094	azure.Future
4095}
4096
4097// Result returns the result of the asynchronous operation.
4098// If the operation has not completed it will return an error.
4099func (future *TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
4100	var done bool
4101	done, err = future.DoneWithContext(context.Background(), client)
4102	if err != nil {
4103		err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", future.Response(), "Polling failure")
4104		return
4105	}
4106	if !done {
4107		err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture")
4108		return
4109	}
4110	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4111	if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
4112		orc, err = client.DeployResponder(orc.Response.Response)
4113		if err != nil {
4114			err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", orc.Response.Response, "Failure responding to request")
4115		}
4116	}
4117	return
4118}
4119
4120// TenantConfigurationSaveFuture an abstraction for monitoring and retrieving the results of a long-running
4121// operation.
4122type TenantConfigurationSaveFuture struct {
4123	azure.Future
4124}
4125
4126// Result returns the result of the asynchronous operation.
4127// If the operation has not completed it will return an error.
4128func (future *TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
4129	var done bool
4130	done, err = future.DoneWithContext(context.Background(), client)
4131	if err != nil {
4132		err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", future.Response(), "Polling failure")
4133		return
4134	}
4135	if !done {
4136		err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture")
4137		return
4138	}
4139	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4140	if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
4141		orc, err = client.SaveResponder(orc.Response.Response)
4142		if err != nil {
4143			err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", orc.Response.Response, "Failure responding to request")
4144		}
4145	}
4146	return
4147}
4148
4149// TenantConfigurationSyncStateContract tenant Configuration Synchronization State.
4150type TenantConfigurationSyncStateContract struct {
4151	autorest.Response `json:"-"`
4152	// Branch - The name of Git branch.
4153	Branch *string `json:"branch,omitempty"`
4154	// CommitID - The latest commit Id.
4155	CommitID *string `json:"commitId,omitempty"`
4156	// IsExport - value indicating if last sync was save (true) or deploy (false) operation.
4157	IsExport *bool `json:"isExport,omitempty"`
4158	// IsSynced - value indicating if last synchronization was later than the configuration change.
4159	IsSynced *bool `json:"isSynced,omitempty"`
4160	// IsGitEnabled - value indicating whether Git configuration access is enabled.
4161	IsGitEnabled *bool `json:"isGitEnabled,omitempty"`
4162	// SyncDate - The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4163	SyncDate *date.Time `json:"syncDate,omitempty"`
4164	// ConfigurationChangeDate - The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4165	ConfigurationChangeDate *date.Time `json:"configurationChangeDate,omitempty"`
4166}
4167
4168// TenantConfigurationValidateFuture an abstraction for monitoring and retrieving the results of a
4169// long-running operation.
4170type TenantConfigurationValidateFuture struct {
4171	azure.Future
4172}
4173
4174// Result returns the result of the asynchronous operation.
4175// If the operation has not completed it will return an error.
4176func (future *TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
4177	var done bool
4178	done, err = future.DoneWithContext(context.Background(), client)
4179	if err != nil {
4180		err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", future.Response(), "Polling failure")
4181		return
4182	}
4183	if !done {
4184		err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture")
4185		return
4186	}
4187	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4188	if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
4189		orc, err = client.ValidateResponder(orc.Response.Response)
4190		if err != nil {
4191			err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", orc.Response.Response, "Failure responding to request")
4192		}
4193	}
4194	return
4195}
4196
4197// TermsOfServiceProperties terms of service contract properties.
4198type TermsOfServiceProperties struct {
4199	// Text - A terms of service text.
4200	Text *string `json:"text,omitempty"`
4201	// Enabled - Display terms of service during a sign-up process.
4202	Enabled *bool `json:"enabled,omitempty"`
4203	// ConsentRequired - Ask user for consent to the terms of service.
4204	ConsentRequired *bool `json:"consentRequired,omitempty"`
4205}
4206
4207// TokenBodyParameterContract oAuth acquire token request body parameter (www-url-form-encoded).
4208type TokenBodyParameterContract struct {
4209	// Name - body parameter name.
4210	Name *string `json:"name,omitempty"`
4211	// Value - body parameter value.
4212	Value *string `json:"value,omitempty"`
4213}
4214
4215// UserCollection paged Users list representation.
4216type UserCollection struct {
4217	autorest.Response `json:"-"`
4218	// Value - Page values.
4219	Value *[]UserContract `json:"value,omitempty"`
4220	// Count - Total number of entities
4221	Count *int32 `json:"count,omitempty"`
4222	// NextLink - Next page link if any.
4223	NextLink *string `json:"nextLink,omitempty"`
4224}
4225
4226// UserCollectionIterator provides access to a complete listing of UserContract values.
4227type UserCollectionIterator struct {
4228	i    int
4229	page UserCollectionPage
4230}
4231
4232// NextWithContext advances to the next value.  If there was an error making
4233// the request the iterator does not advance and the error is returned.
4234func (iter *UserCollectionIterator) NextWithContext(ctx context.Context) (err error) {
4235	if tracing.IsEnabled() {
4236		ctx = tracing.StartSpan(ctx, fqdn+"/UserCollectionIterator.NextWithContext")
4237		defer func() {
4238			sc := -1
4239			if iter.Response().Response.Response != nil {
4240				sc = iter.Response().Response.Response.StatusCode
4241			}
4242			tracing.EndSpan(ctx, sc, err)
4243		}()
4244	}
4245	iter.i++
4246	if iter.i < len(iter.page.Values()) {
4247		return nil
4248	}
4249	err = iter.page.NextWithContext(ctx)
4250	if err != nil {
4251		iter.i--
4252		return err
4253	}
4254	iter.i = 0
4255	return nil
4256}
4257
4258// Next advances to the next value.  If there was an error making
4259// the request the iterator does not advance and the error is returned.
4260// Deprecated: Use NextWithContext() instead.
4261func (iter *UserCollectionIterator) Next() error {
4262	return iter.NextWithContext(context.Background())
4263}
4264
4265// NotDone returns true if the enumeration should be started or is not yet complete.
4266func (iter UserCollectionIterator) NotDone() bool {
4267	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4268}
4269
4270// Response returns the raw server response from the last page request.
4271func (iter UserCollectionIterator) Response() UserCollection {
4272	return iter.page.Response()
4273}
4274
4275// Value returns the current value or a zero-initialized value if the
4276// iterator has advanced beyond the end of the collection.
4277func (iter UserCollectionIterator) Value() UserContract {
4278	if !iter.page.NotDone() {
4279		return UserContract{}
4280	}
4281	return iter.page.Values()[iter.i]
4282}
4283
4284// Creates a new instance of the UserCollectionIterator type.
4285func NewUserCollectionIterator(page UserCollectionPage) UserCollectionIterator {
4286	return UserCollectionIterator{page: page}
4287}
4288
4289// IsEmpty returns true if the ListResult contains no values.
4290func (uc UserCollection) IsEmpty() bool {
4291	return uc.Value == nil || len(*uc.Value) == 0
4292}
4293
4294// userCollectionPreparer prepares a request to retrieve the next set of results.
4295// It returns nil if no more results exist.
4296func (uc UserCollection) userCollectionPreparer(ctx context.Context) (*http.Request, error) {
4297	if uc.NextLink == nil || len(to.String(uc.NextLink)) < 1 {
4298		return nil, nil
4299	}
4300	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4301		autorest.AsJSON(),
4302		autorest.AsGet(),
4303		autorest.WithBaseURL(to.String(uc.NextLink)))
4304}
4305
4306// UserCollectionPage contains a page of UserContract values.
4307type UserCollectionPage struct {
4308	fn func(context.Context, UserCollection) (UserCollection, error)
4309	uc UserCollection
4310}
4311
4312// NextWithContext advances to the next page of values.  If there was an error making
4313// the request the page does not advance and the error is returned.
4314func (page *UserCollectionPage) NextWithContext(ctx context.Context) (err error) {
4315	if tracing.IsEnabled() {
4316		ctx = tracing.StartSpan(ctx, fqdn+"/UserCollectionPage.NextWithContext")
4317		defer func() {
4318			sc := -1
4319			if page.Response().Response.Response != nil {
4320				sc = page.Response().Response.Response.StatusCode
4321			}
4322			tracing.EndSpan(ctx, sc, err)
4323		}()
4324	}
4325	next, err := page.fn(ctx, page.uc)
4326	if err != nil {
4327		return err
4328	}
4329	page.uc = next
4330	return nil
4331}
4332
4333// Next advances to the next page of values.  If there was an error making
4334// the request the page does not advance and the error is returned.
4335// Deprecated: Use NextWithContext() instead.
4336func (page *UserCollectionPage) Next() error {
4337	return page.NextWithContext(context.Background())
4338}
4339
4340// NotDone returns true if the page enumeration should be started or is not yet complete.
4341func (page UserCollectionPage) NotDone() bool {
4342	return !page.uc.IsEmpty()
4343}
4344
4345// Response returns the raw server response from the last page request.
4346func (page UserCollectionPage) Response() UserCollection {
4347	return page.uc
4348}
4349
4350// Values returns the slice of values for the current page or nil if there are no values.
4351func (page UserCollectionPage) Values() []UserContract {
4352	if page.uc.IsEmpty() {
4353		return nil
4354	}
4355	return *page.uc.Value
4356}
4357
4358// Creates a new instance of the UserCollectionPage type.
4359func NewUserCollectionPage(getNextPage func(context.Context, UserCollection) (UserCollection, error)) UserCollectionPage {
4360	return UserCollectionPage{fn: getNextPage}
4361}
4362
4363// UserContract user details.
4364type UserContract struct {
4365	autorest.Response `json:"-"`
4366	// ID - Identifier of the entity.
4367	ID *string `json:"id,omitempty"`
4368	// FirstName - First name.
4369	FirstName *string `json:"firstName,omitempty"`
4370	// LastName - Last name.
4371	LastName *string `json:"lastName,omitempty"`
4372	// Email - Email address.
4373	Email *string `json:"email,omitempty"`
4374	// RegistrationDate - Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4375	RegistrationDate *date.Time `json:"registrationDate,omitempty"`
4376	// Groups - READ-ONLY; Collection of groups user is part of.
4377	Groups *[]GroupContract `json:"groups,omitempty"`
4378	// State - Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Possible values include: 'UserStateActive', 'UserStateBlocked'
4379	State UserState `json:"state,omitempty"`
4380	// Note - Optional note about a user set by the administrator.
4381	Note *string `json:"note,omitempty"`
4382	// Identities - READ-ONLY; Collection of user identities.
4383	Identities *[]UserIdentityContract `json:"identities,omitempty"`
4384}
4385
4386// UserContractProperties user profile.
4387type UserContractProperties struct {
4388	// FirstName - First name.
4389	FirstName *string `json:"firstName,omitempty"`
4390	// LastName - Last name.
4391	LastName *string `json:"lastName,omitempty"`
4392	// Email - Email address.
4393	Email *string `json:"email,omitempty"`
4394	// RegistrationDate - Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4395	RegistrationDate *date.Time `json:"registrationDate,omitempty"`
4396	// Groups - READ-ONLY; Collection of groups user is part of.
4397	Groups *[]GroupContract `json:"groups,omitempty"`
4398	// State - Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Possible values include: 'UserStateActive', 'UserStateBlocked'
4399	State UserState `json:"state,omitempty"`
4400	// Note - Optional note about a user set by the administrator.
4401	Note *string `json:"note,omitempty"`
4402	// Identities - READ-ONLY; Collection of user identities.
4403	Identities *[]UserIdentityContract `json:"identities,omitempty"`
4404}
4405
4406// UserCreateParameters parameters supplied to the Create User operation.
4407type UserCreateParameters struct {
4408	// Email - Email address. Must not be empty and must be unique within the service instance.
4409	Email *string `json:"email,omitempty"`
4410	// FirstName - First name.
4411	FirstName *string `json:"firstName,omitempty"`
4412	// LastName - Last name.
4413	LastName *string `json:"lastName,omitempty"`
4414	// Password - User Password. If no value is provided, a default password is generated.
4415	Password *string `json:"password,omitempty"`
4416	// State - Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Possible values include: 'UserStateActive', 'UserStateBlocked'
4417	State UserState `json:"state,omitempty"`
4418	// Note - Optional note about a user set by the administrator.
4419	Note *string `json:"note,omitempty"`
4420	// Identities - READ-ONLY; Collection of user identities.
4421	Identities *[]UserIdentityContract `json:"identities,omitempty"`
4422}
4423
4424// UserEntityBaseParameters user Entity Base Parameters set.
4425type UserEntityBaseParameters struct {
4426	// State - Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Possible values include: 'UserStateActive', 'UserStateBlocked'
4427	State UserState `json:"state,omitempty"`
4428	// Note - Optional note about a user set by the administrator.
4429	Note *string `json:"note,omitempty"`
4430	// Identities - READ-ONLY; Collection of user identities.
4431	Identities *[]UserIdentityContract `json:"identities,omitempty"`
4432}
4433
4434// UserIdentityCollection list of Users Identity list representation.
4435type UserIdentityCollection struct {
4436	autorest.Response `json:"-"`
4437	// Value - User Identity values.
4438	Value *[]UserIdentityContract `json:"value,omitempty"`
4439	// Count - Total record count number across all pages.
4440	Count *int64 `json:"count,omitempty"`
4441	// NextLink - Next page link if any.
4442	NextLink *string `json:"nextLink,omitempty"`
4443}
4444
4445// UserIdentityContract user identity details.
4446type UserIdentityContract struct {
4447	// Provider - Identity provider name.
4448	Provider *string `json:"provider,omitempty"`
4449	// ID - Identifier value within provider.
4450	ID *string `json:"id,omitempty"`
4451}
4452
4453// UserTokenParameters parameters supplied to the Get User Token operation.
4454type UserTokenParameters struct {
4455	// KeyType - The Key to be used to generate token for user. Possible values include: 'Primary', 'Secondary'
4456	KeyType KeyType `json:"keyType,omitempty"`
4457	// Expiry - The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
4458	Expiry *date.Time `json:"expiry,omitempty"`
4459}
4460
4461// UserTokenResult get User Token response details.
4462type UserTokenResult struct {
4463	autorest.Response `json:"-"`
4464	// Value - Shared Access Authorization token for the User.
4465	Value *string `json:"value,omitempty"`
4466}
4467
4468// UserUpdateParameters parameters supplied to the Update User operation.
4469type UserUpdateParameters struct {
4470	// Email - Email address. Must not be empty and must be unique within the service instance.
4471	Email *string `json:"email,omitempty"`
4472	// Password - User Password.
4473	Password *string `json:"password,omitempty"`
4474	// FirstName - First name.
4475	FirstName *string `json:"firstName,omitempty"`
4476	// LastName - Last name.
4477	LastName *string `json:"lastName,omitempty"`
4478	// State - Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Possible values include: 'UserStateActive', 'UserStateBlocked'
4479	State UserState `json:"state,omitempty"`
4480	// Note - Optional note about a user set by the administrator.
4481	Note *string `json:"note,omitempty"`
4482	// Identities - READ-ONLY; Collection of user identities.
4483	Identities *[]UserIdentityContract `json:"identities,omitempty"`
4484}
4485
4486// X509CertificateName properties of server X509Names.
4487type X509CertificateName struct {
4488	// Name - Common Name of the Certificate.
4489	Name *string `json:"name,omitempty"`
4490	// IssuerCertificateThumbprint - Thumbprint for the Issuer of the Certificate.
4491	IssuerCertificateThumbprint *string `json:"issuerCertificateThumbprint,omitempty"`
4492}
4493