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	"github.com/satori/go.uuid"
29	"net/http"
30)
31
32// The package's fully qualified name.
33const fqdn = "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-12-01/apimanagement"
34
35// AlwaysLog enumerates the values for always log.
36type AlwaysLog string
37
38const (
39	// AllErrors Always log all erroneous request regardless of sampling settings.
40	AllErrors AlwaysLog = "allErrors"
41)
42
43// PossibleAlwaysLogValues returns an array of possible values for the AlwaysLog const type.
44func PossibleAlwaysLogValues() []AlwaysLog {
45	return []AlwaysLog{AllErrors}
46}
47
48// ApimIdentityType enumerates the values for apim identity type.
49type ApimIdentityType string
50
51const (
52	// None ...
53	None ApimIdentityType = "None"
54	// SystemAssigned ...
55	SystemAssigned ApimIdentityType = "SystemAssigned"
56	// SystemAssignedUserAssigned ...
57	SystemAssignedUserAssigned ApimIdentityType = "SystemAssigned, UserAssigned"
58	// UserAssigned ...
59	UserAssigned ApimIdentityType = "UserAssigned"
60)
61
62// PossibleApimIdentityTypeValues returns an array of possible values for the ApimIdentityType const type.
63func PossibleApimIdentityTypeValues() []ApimIdentityType {
64	return []ApimIdentityType{None, SystemAssigned, SystemAssignedUserAssigned, UserAssigned}
65}
66
67// APIType enumerates the values for api type.
68type APIType string
69
70const (
71	// HTTP ...
72	HTTP APIType = "http"
73	// Soap ...
74	Soap APIType = "soap"
75)
76
77// PossibleAPITypeValues returns an array of possible values for the APIType const type.
78func PossibleAPITypeValues() []APIType {
79	return []APIType{HTTP, Soap}
80}
81
82// AppType enumerates the values for app type.
83type AppType string
84
85const (
86	// DeveloperPortal User create request was sent by new developer portal.
87	DeveloperPortal AppType = "developerPortal"
88)
89
90// PossibleAppTypeValues returns an array of possible values for the AppType const type.
91func PossibleAppTypeValues() []AppType {
92	return []AppType{DeveloperPortal}
93}
94
95// AsyncOperationStatus enumerates the values for async operation status.
96type AsyncOperationStatus string
97
98const (
99	// Failed ...
100	Failed AsyncOperationStatus = "Failed"
101	// InProgress ...
102	InProgress AsyncOperationStatus = "InProgress"
103	// Started ...
104	Started AsyncOperationStatus = "Started"
105	// Succeeded ...
106	Succeeded AsyncOperationStatus = "Succeeded"
107)
108
109// PossibleAsyncOperationStatusValues returns an array of possible values for the AsyncOperationStatus const type.
110func PossibleAsyncOperationStatusValues() []AsyncOperationStatus {
111	return []AsyncOperationStatus{Failed, InProgress, Started, Succeeded}
112}
113
114// AuthorizationMethod enumerates the values for authorization method.
115type AuthorizationMethod string
116
117const (
118	// DELETE ...
119	DELETE AuthorizationMethod = "DELETE"
120	// GET ...
121	GET AuthorizationMethod = "GET"
122	// HEAD ...
123	HEAD AuthorizationMethod = "HEAD"
124	// OPTIONS ...
125	OPTIONS AuthorizationMethod = "OPTIONS"
126	// PATCH ...
127	PATCH AuthorizationMethod = "PATCH"
128	// POST ...
129	POST AuthorizationMethod = "POST"
130	// PUT ...
131	PUT AuthorizationMethod = "PUT"
132	// TRACE ...
133	TRACE AuthorizationMethod = "TRACE"
134)
135
136// PossibleAuthorizationMethodValues returns an array of possible values for the AuthorizationMethod const type.
137func PossibleAuthorizationMethodValues() []AuthorizationMethod {
138	return []AuthorizationMethod{DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, TRACE}
139}
140
141// BackendProtocol enumerates the values for backend protocol.
142type BackendProtocol string
143
144const (
145	// BackendProtocolHTTP The Backend is a RESTful service.
146	BackendProtocolHTTP BackendProtocol = "http"
147	// BackendProtocolSoap The Backend is a SOAP service.
148	BackendProtocolSoap BackendProtocol = "soap"
149)
150
151// PossibleBackendProtocolValues returns an array of possible values for the BackendProtocol const type.
152func PossibleBackendProtocolValues() []BackendProtocol {
153	return []BackendProtocol{BackendProtocolHTTP, BackendProtocolSoap}
154}
155
156// BearerTokenSendingMethod enumerates the values for bearer token sending method.
157type BearerTokenSendingMethod string
158
159const (
160	// AuthorizationHeader ...
161	AuthorizationHeader BearerTokenSendingMethod = "authorizationHeader"
162	// Query ...
163	Query BearerTokenSendingMethod = "query"
164)
165
166// PossibleBearerTokenSendingMethodValues returns an array of possible values for the BearerTokenSendingMethod const type.
167func PossibleBearerTokenSendingMethodValues() []BearerTokenSendingMethod {
168	return []BearerTokenSendingMethod{AuthorizationHeader, Query}
169}
170
171// BearerTokenSendingMethods enumerates the values for bearer token sending methods.
172type BearerTokenSendingMethods string
173
174const (
175	// BearerTokenSendingMethodsAuthorizationHeader Access token will be transmitted in the Authorization
176	// header using Bearer schema
177	BearerTokenSendingMethodsAuthorizationHeader BearerTokenSendingMethods = "authorizationHeader"
178	// BearerTokenSendingMethodsQuery Access token will be transmitted as query parameters.
179	BearerTokenSendingMethodsQuery BearerTokenSendingMethods = "query"
180)
181
182// PossibleBearerTokenSendingMethodsValues returns an array of possible values for the BearerTokenSendingMethods const type.
183func PossibleBearerTokenSendingMethodsValues() []BearerTokenSendingMethods {
184	return []BearerTokenSendingMethods{BearerTokenSendingMethodsAuthorizationHeader, BearerTokenSendingMethodsQuery}
185}
186
187// ClientAuthenticationMethod enumerates the values for client authentication method.
188type ClientAuthenticationMethod string
189
190const (
191	// Basic Basic Client Authentication method.
192	Basic ClientAuthenticationMethod = "Basic"
193	// Body Body based Authentication method.
194	Body ClientAuthenticationMethod = "Body"
195)
196
197// PossibleClientAuthenticationMethodValues returns an array of possible values for the ClientAuthenticationMethod const type.
198func PossibleClientAuthenticationMethodValues() []ClientAuthenticationMethod {
199	return []ClientAuthenticationMethod{Basic, Body}
200}
201
202// Confirmation enumerates the values for confirmation.
203type Confirmation string
204
205const (
206	// Invite Send an e-mail inviting the user to sign-up and complete registration.
207	Invite Confirmation = "invite"
208	// Signup Send an e-mail to the user confirming they have successfully signed up.
209	Signup Confirmation = "signup"
210)
211
212// PossibleConfirmationValues returns an array of possible values for the Confirmation const type.
213func PossibleConfirmationValues() []Confirmation {
214	return []Confirmation{Invite, Signup}
215}
216
217// ConnectivityStatusType enumerates the values for connectivity status type.
218type ConnectivityStatusType string
219
220const (
221	// Failure ...
222	Failure ConnectivityStatusType = "failure"
223	// Initializing ...
224	Initializing ConnectivityStatusType = "initializing"
225	// Success ...
226	Success ConnectivityStatusType = "success"
227)
228
229// PossibleConnectivityStatusTypeValues returns an array of possible values for the ConnectivityStatusType const type.
230func PossibleConnectivityStatusTypeValues() []ConnectivityStatusType {
231	return []ConnectivityStatusType{Failure, Initializing, Success}
232}
233
234// ContentFormat enumerates the values for content format.
235type ContentFormat string
236
237const (
238	// Openapi The contents are inline and Content Type is a OpenApi 3.0 Document in YAML format.
239	Openapi ContentFormat = "openapi"
240	// Openapijson The contents are inline and Content Type is a OpenApi 3.0 Document in JSON format.
241	Openapijson ContentFormat = "openapi+json"
242	// OpenapijsonLink The Open Api 3.0 Json document is hosted on a publicly accessible internet address.
243	OpenapijsonLink ContentFormat = "openapi+json-link"
244	// OpenapiLink The Open Api 3.0 document is hosted on a publicly accessible internet address.
245	OpenapiLink ContentFormat = "openapi-link"
246	// SwaggerJSON The contents are inline and Content Type is a OpenApi 2.0 Document.
247	SwaggerJSON ContentFormat = "swagger-json"
248	// SwaggerLinkJSON The Open Api 2.0 document is hosted on a publicly accessible internet address.
249	SwaggerLinkJSON ContentFormat = "swagger-link-json"
250	// WadlLinkJSON The WADL document is hosted on a publicly accessible internet address.
251	WadlLinkJSON ContentFormat = "wadl-link-json"
252	// WadlXML The contents are inline and Content type is a WADL document.
253	WadlXML ContentFormat = "wadl-xml"
254	// Wsdl The contents are inline and the document is a WSDL/Soap document.
255	Wsdl ContentFormat = "wsdl"
256	// WsdlLink The WSDL document is hosted on a publicly accessible internet address.
257	WsdlLink ContentFormat = "wsdl-link"
258)
259
260// PossibleContentFormatValues returns an array of possible values for the ContentFormat const type.
261func PossibleContentFormatValues() []ContentFormat {
262	return []ContentFormat{Openapi, Openapijson, OpenapijsonLink, OpenapiLink, SwaggerJSON, SwaggerLinkJSON, WadlLinkJSON, WadlXML, Wsdl, WsdlLink}
263}
264
265// ExportFormat enumerates the values for export format.
266type ExportFormat string
267
268const (
269	// ExportFormatOpenapi Export the Api Definition in OpenApi Specification 3.0 to Storage Blob.
270	ExportFormatOpenapi ExportFormat = "openapi-link"
271	// ExportFormatOpenapiJSON Export the Api Definition in OpenApi Specification 3.0 as JSON document to
272	// Storage Blob.
273	ExportFormatOpenapiJSON ExportFormat = "openapi+json-link"
274	// ExportFormatSwagger Export the Api Definition in OpenApi Specification 2.0 format to the Storage Blob.
275	ExportFormatSwagger ExportFormat = "swagger-link"
276	// ExportFormatWadl Export the Api Definition in WADL Schema to Storage Blob.
277	ExportFormatWadl ExportFormat = "wadl-link"
278	// ExportFormatWsdl Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for
279	// APIs of Type `soap`
280	ExportFormatWsdl ExportFormat = "wsdl-link"
281)
282
283// PossibleExportFormatValues returns an array of possible values for the ExportFormat const type.
284func PossibleExportFormatValues() []ExportFormat {
285	return []ExportFormat{ExportFormatOpenapi, ExportFormatOpenapiJSON, ExportFormatSwagger, ExportFormatWadl, ExportFormatWsdl}
286}
287
288// ExportResultFormat enumerates the values for export result format.
289type ExportResultFormat string
290
291const (
292	// ExportResultFormatOpenAPI Export the Api Definition in OpenApi Specification 3.0 to Storage Blob.
293	ExportResultFormatOpenAPI ExportResultFormat = "openapi-link"
294	// ExportResultFormatSwagger The Api Definition is exported in OpenApi Specification 2.0 format to the
295	// Storage Blob.
296	ExportResultFormatSwagger ExportResultFormat = "swagger-link-json"
297	// ExportResultFormatWadl Export the Api Definition in WADL Schema to Storage Blob.
298	ExportResultFormatWadl ExportResultFormat = "wadl-link-json"
299	// ExportResultFormatWsdl The Api Definition is exported in WSDL Schema to Storage Blob. This is only
300	// supported for APIs of Type `soap`
301	ExportResultFormatWsdl ExportResultFormat = "wsdl-link+xml"
302)
303
304// PossibleExportResultFormatValues returns an array of possible values for the ExportResultFormat const type.
305func PossibleExportResultFormatValues() []ExportResultFormat {
306	return []ExportResultFormat{ExportResultFormatOpenAPI, ExportResultFormatSwagger, ExportResultFormatWadl, ExportResultFormatWsdl}
307}
308
309// GrantType enumerates the values for grant type.
310type GrantType string
311
312const (
313	// AuthorizationCode Authorization Code Grant flow as described
314	// https://tools.ietf.org/html/rfc6749#section-4.1.
315	AuthorizationCode GrantType = "authorizationCode"
316	// ClientCredentials Client Credentials Grant flow as described
317	// https://tools.ietf.org/html/rfc6749#section-4.4.
318	ClientCredentials GrantType = "clientCredentials"
319	// Implicit Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2.
320	Implicit GrantType = "implicit"
321	// ResourceOwnerPassword Resource Owner Password Grant flow as described
322	// https://tools.ietf.org/html/rfc6749#section-4.3.
323	ResourceOwnerPassword GrantType = "resourceOwnerPassword"
324)
325
326// PossibleGrantTypeValues returns an array of possible values for the GrantType const type.
327func PossibleGrantTypeValues() []GrantType {
328	return []GrantType{AuthorizationCode, ClientCredentials, Implicit, ResourceOwnerPassword}
329}
330
331// GroupType enumerates the values for group type.
332type GroupType string
333
334const (
335	// Custom ...
336	Custom GroupType = "custom"
337	// External ...
338	External GroupType = "external"
339	// System ...
340	System GroupType = "system"
341)
342
343// PossibleGroupTypeValues returns an array of possible values for the GroupType const type.
344func PossibleGroupTypeValues() []GroupType {
345	return []GroupType{Custom, External, System}
346}
347
348// HostnameType enumerates the values for hostname type.
349type HostnameType string
350
351const (
352	// HostnameTypeDeveloperPortal ...
353	HostnameTypeDeveloperPortal HostnameType = "DeveloperPortal"
354	// HostnameTypeManagement ...
355	HostnameTypeManagement HostnameType = "Management"
356	// HostnameTypePortal ...
357	HostnameTypePortal HostnameType = "Portal"
358	// HostnameTypeProxy ...
359	HostnameTypeProxy HostnameType = "Proxy"
360	// HostnameTypeScm ...
361	HostnameTypeScm HostnameType = "Scm"
362)
363
364// PossibleHostnameTypeValues returns an array of possible values for the HostnameType const type.
365func PossibleHostnameTypeValues() []HostnameType {
366	return []HostnameType{HostnameTypeDeveloperPortal, HostnameTypeManagement, HostnameTypePortal, HostnameTypeProxy, HostnameTypeScm}
367}
368
369// HTTPCorrelationProtocol enumerates the values for http correlation protocol.
370type HTTPCorrelationProtocol string
371
372const (
373	// HTTPCorrelationProtocolLegacy Inject Request-Id and Request-Context headers with request correlation
374	// data. See
375	// https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md.
376	HTTPCorrelationProtocolLegacy HTTPCorrelationProtocol = "Legacy"
377	// HTTPCorrelationProtocolNone Do not read and inject correlation headers.
378	HTTPCorrelationProtocolNone HTTPCorrelationProtocol = "None"
379	// HTTPCorrelationProtocolW3C Inject Trace Context headers. See https://w3c.github.io/trace-context.
380	HTTPCorrelationProtocolW3C HTTPCorrelationProtocol = "W3C"
381)
382
383// PossibleHTTPCorrelationProtocolValues returns an array of possible values for the HTTPCorrelationProtocol const type.
384func PossibleHTTPCorrelationProtocolValues() []HTTPCorrelationProtocol {
385	return []HTTPCorrelationProtocol{HTTPCorrelationProtocolLegacy, HTTPCorrelationProtocolNone, HTTPCorrelationProtocolW3C}
386}
387
388// IdentityProviderType enumerates the values for identity provider type.
389type IdentityProviderType string
390
391const (
392	// Aad Azure Active Directory as Identity provider.
393	Aad IdentityProviderType = "aad"
394	// AadB2C Azure Active Directory B2C as Identity provider.
395	AadB2C IdentityProviderType = "aadB2C"
396	// Facebook Facebook as Identity provider.
397	Facebook IdentityProviderType = "facebook"
398	// Google Google as Identity provider.
399	Google IdentityProviderType = "google"
400	// Microsoft Microsoft Live as Identity provider.
401	Microsoft IdentityProviderType = "microsoft"
402	// Twitter Twitter as Identity provider.
403	Twitter IdentityProviderType = "twitter"
404)
405
406// PossibleIdentityProviderTypeValues returns an array of possible values for the IdentityProviderType const type.
407func PossibleIdentityProviderTypeValues() []IdentityProviderType {
408	return []IdentityProviderType{Aad, AadB2C, Facebook, Google, Microsoft, Twitter}
409}
410
411// KeyType enumerates the values for key type.
412type KeyType string
413
414const (
415	// Primary ...
416	Primary KeyType = "primary"
417	// Secondary ...
418	Secondary KeyType = "secondary"
419)
420
421// PossibleKeyTypeValues returns an array of possible values for the KeyType const type.
422func PossibleKeyTypeValues() []KeyType {
423	return []KeyType{Primary, Secondary}
424}
425
426// LoggerType enumerates the values for logger type.
427type LoggerType string
428
429const (
430	// ApplicationInsights Azure Application Insights as log destination.
431	ApplicationInsights LoggerType = "applicationInsights"
432	// AzureEventHub Azure Event Hub as log destination.
433	AzureEventHub LoggerType = "azureEventHub"
434)
435
436// PossibleLoggerTypeValues returns an array of possible values for the LoggerType const type.
437func PossibleLoggerTypeValues() []LoggerType {
438	return []LoggerType{ApplicationInsights, AzureEventHub}
439}
440
441// NameAvailabilityReason enumerates the values for name availability reason.
442type NameAvailabilityReason string
443
444const (
445	// AlreadyExists ...
446	AlreadyExists NameAvailabilityReason = "AlreadyExists"
447	// Invalid ...
448	Invalid NameAvailabilityReason = "Invalid"
449	// Valid ...
450	Valid NameAvailabilityReason = "Valid"
451)
452
453// PossibleNameAvailabilityReasonValues returns an array of possible values for the NameAvailabilityReason const type.
454func PossibleNameAvailabilityReasonValues() []NameAvailabilityReason {
455	return []NameAvailabilityReason{AlreadyExists, Invalid, Valid}
456}
457
458// NotificationName enumerates the values for notification name.
459type NotificationName string
460
461const (
462	// AccountClosedPublisher The following email recipients and users will receive email notifications when
463	// developer closes his account.
464	AccountClosedPublisher NotificationName = "AccountClosedPublisher"
465	// BCC The following recipients will receive blind carbon copies of all emails sent to developers.
466	BCC NotificationName = "BCC"
467	// NewApplicationNotificationMessage The following email recipients and users will receive email
468	// notifications when new applications are submitted to the application gallery.
469	NewApplicationNotificationMessage NotificationName = "NewApplicationNotificationMessage"
470	// NewIssuePublisherNotificationMessage The following email recipients and users will receive email
471	// notifications when a new issue or comment is submitted on the developer portal.
472	NewIssuePublisherNotificationMessage NotificationName = "NewIssuePublisherNotificationMessage"
473	// PurchasePublisherNotificationMessage The following email recipients and users will receive email
474	// notifications about new API product subscriptions.
475	PurchasePublisherNotificationMessage NotificationName = "PurchasePublisherNotificationMessage"
476	// QuotaLimitApproachingPublisherNotificationMessage The following email recipients and users will receive
477	// email notifications when subscription usage gets close to usage quota.
478	QuotaLimitApproachingPublisherNotificationMessage NotificationName = "QuotaLimitApproachingPublisherNotificationMessage"
479	// RequestPublisherNotificationMessage The following email recipients and users will receive email
480	// notifications about subscription requests for API products requiring approval.
481	RequestPublisherNotificationMessage NotificationName = "RequestPublisherNotificationMessage"
482)
483
484// PossibleNotificationNameValues returns an array of possible values for the NotificationName const type.
485func PossibleNotificationNameValues() []NotificationName {
486	return []NotificationName{AccountClosedPublisher, BCC, NewApplicationNotificationMessage, NewIssuePublisherNotificationMessage, PurchasePublisherNotificationMessage, QuotaLimitApproachingPublisherNotificationMessage, RequestPublisherNotificationMessage}
487}
488
489// PolicyContentFormat enumerates the values for policy content format.
490type PolicyContentFormat string
491
492const (
493	// Rawxml The contents are inline and Content type is a non XML encoded policy document.
494	Rawxml PolicyContentFormat = "rawxml"
495	// RawxmlLink The policy document is not Xml encoded and is hosted on a http endpoint accessible from the
496	// API Management service.
497	RawxmlLink PolicyContentFormat = "rawxml-link"
498	// XML The contents are inline and Content type is an XML document.
499	XML PolicyContentFormat = "xml"
500	// XMLLink The policy XML document is hosted on a http endpoint accessible from the API Management service.
501	XMLLink PolicyContentFormat = "xml-link"
502)
503
504// PossiblePolicyContentFormatValues returns an array of possible values for the PolicyContentFormat const type.
505func PossiblePolicyContentFormatValues() []PolicyContentFormat {
506	return []PolicyContentFormat{Rawxml, RawxmlLink, XML, XMLLink}
507}
508
509// PolicyExportFormat enumerates the values for policy export format.
510type PolicyExportFormat string
511
512const (
513	// PolicyExportFormatRawxml The contents are inline and Content type is a non XML encoded policy document.
514	PolicyExportFormatRawxml PolicyExportFormat = "rawxml"
515	// PolicyExportFormatXML The contents are inline and Content type is an XML document.
516	PolicyExportFormatXML PolicyExportFormat = "xml"
517)
518
519// PossiblePolicyExportFormatValues returns an array of possible values for the PolicyExportFormat const type.
520func PossiblePolicyExportFormatValues() []PolicyExportFormat {
521	return []PolicyExportFormat{PolicyExportFormatRawxml, PolicyExportFormatXML}
522}
523
524// PolicyScopeContract enumerates the values for policy scope contract.
525type PolicyScopeContract string
526
527const (
528	// PolicyScopeContractAll ...
529	PolicyScopeContractAll PolicyScopeContract = "All"
530	// PolicyScopeContractAPI ...
531	PolicyScopeContractAPI PolicyScopeContract = "Api"
532	// PolicyScopeContractOperation ...
533	PolicyScopeContractOperation PolicyScopeContract = "Operation"
534	// PolicyScopeContractProduct ...
535	PolicyScopeContractProduct PolicyScopeContract = "Product"
536	// PolicyScopeContractTenant ...
537	PolicyScopeContractTenant PolicyScopeContract = "Tenant"
538)
539
540// PossiblePolicyScopeContractValues returns an array of possible values for the PolicyScopeContract const type.
541func PossiblePolicyScopeContractValues() []PolicyScopeContract {
542	return []PolicyScopeContract{PolicyScopeContractAll, PolicyScopeContractAPI, PolicyScopeContractOperation, PolicyScopeContractProduct, PolicyScopeContractTenant}
543}
544
545// ProductState enumerates the values for product state.
546type ProductState string
547
548const (
549	// NotPublished ...
550	NotPublished ProductState = "notPublished"
551	// Published ...
552	Published ProductState = "published"
553)
554
555// PossibleProductStateValues returns an array of possible values for the ProductState const type.
556func PossibleProductStateValues() []ProductState {
557	return []ProductState{NotPublished, Published}
558}
559
560// Protocol enumerates the values for protocol.
561type Protocol string
562
563const (
564	// ProtocolHTTP ...
565	ProtocolHTTP Protocol = "http"
566	// ProtocolHTTPS ...
567	ProtocolHTTPS Protocol = "https"
568)
569
570// PossibleProtocolValues returns an array of possible values for the Protocol const type.
571func PossibleProtocolValues() []Protocol {
572	return []Protocol{ProtocolHTTP, ProtocolHTTPS}
573}
574
575// ProvisioningState enumerates the values for provisioning state.
576type ProvisioningState string
577
578const (
579	// Created ...
580	Created ProvisioningState = "created"
581)
582
583// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
584func PossibleProvisioningStateValues() []ProvisioningState {
585	return []ProvisioningState{Created}
586}
587
588// ResourceSkuCapacityScaleType enumerates the values for resource sku capacity scale type.
589type ResourceSkuCapacityScaleType string
590
591const (
592	// ResourceSkuCapacityScaleTypeAutomatic Supported scale type automatic.
593	ResourceSkuCapacityScaleTypeAutomatic ResourceSkuCapacityScaleType = "automatic"
594	// ResourceSkuCapacityScaleTypeManual Supported scale type manual.
595	ResourceSkuCapacityScaleTypeManual ResourceSkuCapacityScaleType = "manual"
596	// ResourceSkuCapacityScaleTypeNone Scaling not supported.
597	ResourceSkuCapacityScaleTypeNone ResourceSkuCapacityScaleType = "none"
598)
599
600// PossibleResourceSkuCapacityScaleTypeValues returns an array of possible values for the ResourceSkuCapacityScaleType const type.
601func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType {
602	return []ResourceSkuCapacityScaleType{ResourceSkuCapacityScaleTypeAutomatic, ResourceSkuCapacityScaleTypeManual, ResourceSkuCapacityScaleTypeNone}
603}
604
605// SamplingType enumerates the values for sampling type.
606type SamplingType string
607
608const (
609	// Fixed Fixed-rate sampling.
610	Fixed SamplingType = "fixed"
611)
612
613// PossibleSamplingTypeValues returns an array of possible values for the SamplingType const type.
614func PossibleSamplingTypeValues() []SamplingType {
615	return []SamplingType{Fixed}
616}
617
618// SkuType enumerates the values for sku type.
619type SkuType string
620
621const (
622	// SkuTypeBasic Basic SKU of Api Management.
623	SkuTypeBasic SkuType = "Basic"
624	// SkuTypeConsumption Consumption SKU of Api Management.
625	SkuTypeConsumption SkuType = "Consumption"
626	// SkuTypeDeveloper Developer SKU of Api Management.
627	SkuTypeDeveloper SkuType = "Developer"
628	// SkuTypePremium Premium SKU of Api Management.
629	SkuTypePremium SkuType = "Premium"
630	// SkuTypeStandard Standard SKU of Api Management.
631	SkuTypeStandard SkuType = "Standard"
632)
633
634// PossibleSkuTypeValues returns an array of possible values for the SkuType const type.
635func PossibleSkuTypeValues() []SkuType {
636	return []SkuType{SkuTypeBasic, SkuTypeConsumption, SkuTypeDeveloper, SkuTypePremium, SkuTypeStandard}
637}
638
639// SoapAPIType enumerates the values for soap api type.
640type SoapAPIType string
641
642const (
643	// SoapPassThrough Imports the Soap API having a SOAP front end.
644	SoapPassThrough SoapAPIType = "soap"
645	// SoapToRest Imports a SOAP API having a RESTful front end.
646	SoapToRest SoapAPIType = "http"
647)
648
649// PossibleSoapAPITypeValues returns an array of possible values for the SoapAPIType const type.
650func PossibleSoapAPITypeValues() []SoapAPIType {
651	return []SoapAPIType{SoapPassThrough, SoapToRest}
652}
653
654// State enumerates the values for state.
655type State string
656
657const (
658	// Closed The issue was closed.
659	Closed State = "closed"
660	// Open The issue is opened.
661	Open State = "open"
662	// Proposed The issue is proposed.
663	Proposed State = "proposed"
664	// Removed The issue was removed.
665	Removed State = "removed"
666	// Resolved The issue is now resolved.
667	Resolved State = "resolved"
668)
669
670// PossibleStateValues returns an array of possible values for the State const type.
671func PossibleStateValues() []State {
672	return []State{Closed, Open, Proposed, Removed, Resolved}
673}
674
675// StoreName enumerates the values for store name.
676type StoreName string
677
678const (
679	// CertificateAuthority ...
680	CertificateAuthority StoreName = "CertificateAuthority"
681	// Root ...
682	Root StoreName = "Root"
683)
684
685// PossibleStoreNameValues returns an array of possible values for the StoreName const type.
686func PossibleStoreNameValues() []StoreName {
687	return []StoreName{CertificateAuthority, Root}
688}
689
690// SubscriptionState enumerates the values for subscription state.
691type SubscriptionState string
692
693const (
694	// Active ...
695	Active SubscriptionState = "active"
696	// Cancelled ...
697	Cancelled SubscriptionState = "cancelled"
698	// Expired ...
699	Expired SubscriptionState = "expired"
700	// Rejected ...
701	Rejected SubscriptionState = "rejected"
702	// Submitted ...
703	Submitted SubscriptionState = "submitted"
704	// Suspended ...
705	Suspended SubscriptionState = "suspended"
706)
707
708// PossibleSubscriptionStateValues returns an array of possible values for the SubscriptionState const type.
709func PossibleSubscriptionStateValues() []SubscriptionState {
710	return []SubscriptionState{Active, Cancelled, Expired, Rejected, Submitted, Suspended}
711}
712
713// TemplateName enumerates the values for template name.
714type TemplateName string
715
716const (
717	// AccountClosedDeveloper ...
718	AccountClosedDeveloper TemplateName = "accountClosedDeveloper"
719	// ApplicationApprovedNotificationMessage ...
720	ApplicationApprovedNotificationMessage TemplateName = "applicationApprovedNotificationMessage"
721	// ConfirmSignUpIdentityDefault ...
722	ConfirmSignUpIdentityDefault TemplateName = "confirmSignUpIdentityDefault"
723	// EmailChangeIdentityDefault ...
724	EmailChangeIdentityDefault TemplateName = "emailChangeIdentityDefault"
725	// InviteUserNotificationMessage ...
726	InviteUserNotificationMessage TemplateName = "inviteUserNotificationMessage"
727	// NewCommentNotificationMessage ...
728	NewCommentNotificationMessage TemplateName = "newCommentNotificationMessage"
729	// NewDeveloperNotificationMessage ...
730	NewDeveloperNotificationMessage TemplateName = "newDeveloperNotificationMessage"
731	// NewIssueNotificationMessage ...
732	NewIssueNotificationMessage TemplateName = "newIssueNotificationMessage"
733	// PasswordResetByAdminNotificationMessage ...
734	PasswordResetByAdminNotificationMessage TemplateName = "passwordResetByAdminNotificationMessage"
735	// PasswordResetIdentityDefault ...
736	PasswordResetIdentityDefault TemplateName = "passwordResetIdentityDefault"
737	// PurchaseDeveloperNotificationMessage ...
738	PurchaseDeveloperNotificationMessage TemplateName = "purchaseDeveloperNotificationMessage"
739	// QuotaLimitApproachingDeveloperNotificationMessage ...
740	QuotaLimitApproachingDeveloperNotificationMessage TemplateName = "quotaLimitApproachingDeveloperNotificationMessage"
741	// RejectDeveloperNotificationMessage ...
742	RejectDeveloperNotificationMessage TemplateName = "rejectDeveloperNotificationMessage"
743	// RequestDeveloperNotificationMessage ...
744	RequestDeveloperNotificationMessage TemplateName = "requestDeveloperNotificationMessage"
745)
746
747// PossibleTemplateNameValues returns an array of possible values for the TemplateName const type.
748func PossibleTemplateNameValues() []TemplateName {
749	return []TemplateName{AccountClosedDeveloper, ApplicationApprovedNotificationMessage, ConfirmSignUpIdentityDefault, EmailChangeIdentityDefault, InviteUserNotificationMessage, NewCommentNotificationMessage, NewDeveloperNotificationMessage, NewIssueNotificationMessage, PasswordResetByAdminNotificationMessage, PasswordResetIdentityDefault, PurchaseDeveloperNotificationMessage, QuotaLimitApproachingDeveloperNotificationMessage, RejectDeveloperNotificationMessage, RequestDeveloperNotificationMessage}
750}
751
752// UserState enumerates the values for user state.
753type UserState string
754
755const (
756	// UserStateActive User state is active.
757	UserStateActive UserState = "active"
758	// UserStateBlocked User is blocked. Blocked users cannot authenticate at developer portal or call API.
759	UserStateBlocked UserState = "blocked"
760	// UserStateDeleted User account is closed. All identities and related entities are removed.
761	UserStateDeleted UserState = "deleted"
762	// UserStatePending User account is pending. Requires identity confirmation before it can be made active.
763	UserStatePending UserState = "pending"
764)
765
766// PossibleUserStateValues returns an array of possible values for the UserState const type.
767func PossibleUserStateValues() []UserState {
768	return []UserState{UserStateActive, UserStateBlocked, UserStateDeleted, UserStatePending}
769}
770
771// Verbosity enumerates the values for verbosity.
772type Verbosity string
773
774const (
775	// Error Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic
776	// instance.
777	Error Verbosity = "error"
778	// Information Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached
779	// to this diagnostic instance.
780	Information Verbosity = "information"
781	// Verbose All the traces emitted by trace policies will be sent to the logger attached to this diagnostic
782	// instance.
783	Verbose Verbosity = "verbose"
784)
785
786// PossibleVerbosityValues returns an array of possible values for the Verbosity const type.
787func PossibleVerbosityValues() []Verbosity {
788	return []Verbosity{Error, Information, Verbose}
789}
790
791// VersioningScheme enumerates the values for versioning scheme.
792type VersioningScheme string
793
794const (
795	// VersioningSchemeHeader The API Version is passed in a HTTP header.
796	VersioningSchemeHeader VersioningScheme = "Header"
797	// VersioningSchemeQuery The API Version is passed in a query parameter.
798	VersioningSchemeQuery VersioningScheme = "Query"
799	// VersioningSchemeSegment The API Version is passed in a path segment.
800	VersioningSchemeSegment VersioningScheme = "Segment"
801)
802
803// PossibleVersioningSchemeValues returns an array of possible values for the VersioningScheme const type.
804func PossibleVersioningSchemeValues() []VersioningScheme {
805	return []VersioningScheme{VersioningSchemeHeader, VersioningSchemeQuery, VersioningSchemeSegment}
806}
807
808// VersioningScheme1 enumerates the values for versioning scheme 1.
809type VersioningScheme1 string
810
811const (
812	// VersioningScheme1Header ...
813	VersioningScheme1Header VersioningScheme1 = "Header"
814	// VersioningScheme1Query ...
815	VersioningScheme1Query VersioningScheme1 = "Query"
816	// VersioningScheme1Segment ...
817	VersioningScheme1Segment VersioningScheme1 = "Segment"
818)
819
820// PossibleVersioningScheme1Values returns an array of possible values for the VersioningScheme1 const type.
821func PossibleVersioningScheme1Values() []VersioningScheme1 {
822	return []VersioningScheme1{VersioningScheme1Header, VersioningScheme1Query, VersioningScheme1Segment}
823}
824
825// VirtualNetworkType enumerates the values for virtual network type.
826type VirtualNetworkType string
827
828const (
829	// VirtualNetworkTypeExternal The service is part of Virtual Network and it is accessible from Internet.
830	VirtualNetworkTypeExternal VirtualNetworkType = "External"
831	// VirtualNetworkTypeInternal The service is part of Virtual Network and it is only accessible from within
832	// the virtual network.
833	VirtualNetworkTypeInternal VirtualNetworkType = "Internal"
834	// VirtualNetworkTypeNone The service is not part of any Virtual Network.
835	VirtualNetworkTypeNone VirtualNetworkType = "None"
836)
837
838// PossibleVirtualNetworkTypeValues returns an array of possible values for the VirtualNetworkType const type.
839func PossibleVirtualNetworkTypeValues() []VirtualNetworkType {
840	return []VirtualNetworkType{VirtualNetworkTypeExternal, VirtualNetworkTypeInternal, VirtualNetworkTypeNone}
841}
842
843// AccessInformationContract tenant access information contract of the API Management service.
844type AccessInformationContract struct {
845	autorest.Response `json:"-"`
846	// ID - Identifier.
847	ID *string `json:"id,omitempty"`
848	// PrimaryKey - Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
849	PrimaryKey *string `json:"primaryKey,omitempty"`
850	// SecondaryKey - Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
851	SecondaryKey *string `json:"secondaryKey,omitempty"`
852	// Enabled - Determines whether direct access is enabled.
853	Enabled *bool `json:"enabled,omitempty"`
854}
855
856// AccessInformationUpdateParameterProperties tenant access information update parameters of the API
857// Management service
858type AccessInformationUpdateParameterProperties struct {
859	// Enabled - Determines whether direct access is enabled.
860	Enabled *bool `json:"enabled,omitempty"`
861}
862
863// AccessInformationUpdateParameters tenant access information update parameters.
864type AccessInformationUpdateParameters struct {
865	// AccessInformationUpdateParameterProperties - Tenant access information update parameter properties.
866	*AccessInformationUpdateParameterProperties `json:"properties,omitempty"`
867}
868
869// MarshalJSON is the custom marshaler for AccessInformationUpdateParameters.
870func (aiup AccessInformationUpdateParameters) MarshalJSON() ([]byte, error) {
871	objectMap := make(map[string]interface{})
872	if aiup.AccessInformationUpdateParameterProperties != nil {
873		objectMap["properties"] = aiup.AccessInformationUpdateParameterProperties
874	}
875	return json.Marshal(objectMap)
876}
877
878// UnmarshalJSON is the custom unmarshaler for AccessInformationUpdateParameters struct.
879func (aiup *AccessInformationUpdateParameters) UnmarshalJSON(body []byte) error {
880	var m map[string]*json.RawMessage
881	err := json.Unmarshal(body, &m)
882	if err != nil {
883		return err
884	}
885	for k, v := range m {
886		switch k {
887		case "properties":
888			if v != nil {
889				var accessInformationUpdateParameterProperties AccessInformationUpdateParameterProperties
890				err = json.Unmarshal(*v, &accessInformationUpdateParameterProperties)
891				if err != nil {
892					return err
893				}
894				aiup.AccessInformationUpdateParameterProperties = &accessInformationUpdateParameterProperties
895			}
896		}
897	}
898
899	return nil
900}
901
902// AdditionalLocation description of an additional API Management resource location.
903type AdditionalLocation struct {
904	// Location - The location name of the additional region among Azure Data center regions.
905	Location *string `json:"location,omitempty"`
906	// Sku - SKU properties of the API Management service.
907	Sku *ServiceSkuProperties `json:"sku,omitempty"`
908	// PublicIPAddresses - READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard and Premium SKU.
909	PublicIPAddresses *[]string `json:"publicIPAddresses,omitempty"`
910	// PrivateIPAddresses - READ-ONLY; Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard and Premium SKU.
911	PrivateIPAddresses *[]string `json:"privateIPAddresses,omitempty"`
912	// VirtualNetworkConfiguration - Virtual network configuration for the location.
913	VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"`
914	// GatewayRegionalURL - READ-ONLY; Gateway URL of the API Management service in the Region.
915	GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty"`
916	// DisableGateway - Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location.
917	DisableGateway *bool `json:"disableGateway,omitempty"`
918}
919
920// APICollection paged Api list representation.
921type APICollection struct {
922	autorest.Response `json:"-"`
923	// Value - READ-ONLY; Page values.
924	Value *[]APIContract `json:"value,omitempty"`
925	// NextLink - READ-ONLY; Next page link if any.
926	NextLink *string `json:"nextLink,omitempty"`
927}
928
929// APICollectionIterator provides access to a complete listing of APIContract values.
930type APICollectionIterator struct {
931	i    int
932	page APICollectionPage
933}
934
935// NextWithContext advances to the next value.  If there was an error making
936// the request the iterator does not advance and the error is returned.
937func (iter *APICollectionIterator) NextWithContext(ctx context.Context) (err error) {
938	if tracing.IsEnabled() {
939		ctx = tracing.StartSpan(ctx, fqdn+"/APICollectionIterator.NextWithContext")
940		defer func() {
941			sc := -1
942			if iter.Response().Response.Response != nil {
943				sc = iter.Response().Response.Response.StatusCode
944			}
945			tracing.EndSpan(ctx, sc, err)
946		}()
947	}
948	iter.i++
949	if iter.i < len(iter.page.Values()) {
950		return nil
951	}
952	err = iter.page.NextWithContext(ctx)
953	if err != nil {
954		iter.i--
955		return err
956	}
957	iter.i = 0
958	return nil
959}
960
961// Next advances to the next value.  If there was an error making
962// the request the iterator does not advance and the error is returned.
963// Deprecated: Use NextWithContext() instead.
964func (iter *APICollectionIterator) Next() error {
965	return iter.NextWithContext(context.Background())
966}
967
968// NotDone returns true if the enumeration should be started or is not yet complete.
969func (iter APICollectionIterator) NotDone() bool {
970	return iter.page.NotDone() && iter.i < len(iter.page.Values())
971}
972
973// Response returns the raw server response from the last page request.
974func (iter APICollectionIterator) Response() APICollection {
975	return iter.page.Response()
976}
977
978// Value returns the current value or a zero-initialized value if the
979// iterator has advanced beyond the end of the collection.
980func (iter APICollectionIterator) Value() APIContract {
981	if !iter.page.NotDone() {
982		return APIContract{}
983	}
984	return iter.page.Values()[iter.i]
985}
986
987// Creates a new instance of the APICollectionIterator type.
988func NewAPICollectionIterator(page APICollectionPage) APICollectionIterator {
989	return APICollectionIterator{page: page}
990}
991
992// IsEmpty returns true if the ListResult contains no values.
993func (ac APICollection) IsEmpty() bool {
994	return ac.Value == nil || len(*ac.Value) == 0
995}
996
997// aPICollectionPreparer prepares a request to retrieve the next set of results.
998// It returns nil if no more results exist.
999func (ac APICollection) aPICollectionPreparer(ctx context.Context) (*http.Request, error) {
1000	if ac.NextLink == nil || len(to.String(ac.NextLink)) < 1 {
1001		return nil, nil
1002	}
1003	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1004		autorest.AsJSON(),
1005		autorest.AsGet(),
1006		autorest.WithBaseURL(to.String(ac.NextLink)))
1007}
1008
1009// APICollectionPage contains a page of APIContract values.
1010type APICollectionPage struct {
1011	fn func(context.Context, APICollection) (APICollection, error)
1012	ac APICollection
1013}
1014
1015// NextWithContext advances to the next page of values.  If there was an error making
1016// the request the page does not advance and the error is returned.
1017func (page *APICollectionPage) NextWithContext(ctx context.Context) (err error) {
1018	if tracing.IsEnabled() {
1019		ctx = tracing.StartSpan(ctx, fqdn+"/APICollectionPage.NextWithContext")
1020		defer func() {
1021			sc := -1
1022			if page.Response().Response.Response != nil {
1023				sc = page.Response().Response.Response.StatusCode
1024			}
1025			tracing.EndSpan(ctx, sc, err)
1026		}()
1027	}
1028	next, err := page.fn(ctx, page.ac)
1029	if err != nil {
1030		return err
1031	}
1032	page.ac = next
1033	return nil
1034}
1035
1036// Next advances to the next page of values.  If there was an error making
1037// the request the page does not advance and the error is returned.
1038// Deprecated: Use NextWithContext() instead.
1039func (page *APICollectionPage) Next() error {
1040	return page.NextWithContext(context.Background())
1041}
1042
1043// NotDone returns true if the page enumeration should be started or is not yet complete.
1044func (page APICollectionPage) NotDone() bool {
1045	return !page.ac.IsEmpty()
1046}
1047
1048// Response returns the raw server response from the last page request.
1049func (page APICollectionPage) Response() APICollection {
1050	return page.ac
1051}
1052
1053// Values returns the slice of values for the current page or nil if there are no values.
1054func (page APICollectionPage) Values() []APIContract {
1055	if page.ac.IsEmpty() {
1056		return nil
1057	}
1058	return *page.ac.Value
1059}
1060
1061// Creates a new instance of the APICollectionPage type.
1062func NewAPICollectionPage(getNextPage func(context.Context, APICollection) (APICollection, error)) APICollectionPage {
1063	return APICollectionPage{fn: getNextPage}
1064}
1065
1066// APIContract api details.
1067type APIContract struct {
1068	autorest.Response `json:"-"`
1069	// APIContractProperties - Api entity contract properties.
1070	*APIContractProperties `json:"properties,omitempty"`
1071	// ID - READ-ONLY; Resource ID.
1072	ID *string `json:"id,omitempty"`
1073	// Name - READ-ONLY; Resource name.
1074	Name *string `json:"name,omitempty"`
1075	// Type - READ-ONLY; Resource type for API Management resource.
1076	Type *string `json:"type,omitempty"`
1077}
1078
1079// MarshalJSON is the custom marshaler for APIContract.
1080func (ac APIContract) MarshalJSON() ([]byte, error) {
1081	objectMap := make(map[string]interface{})
1082	if ac.APIContractProperties != nil {
1083		objectMap["properties"] = ac.APIContractProperties
1084	}
1085	return json.Marshal(objectMap)
1086}
1087
1088// UnmarshalJSON is the custom unmarshaler for APIContract struct.
1089func (ac *APIContract) UnmarshalJSON(body []byte) error {
1090	var m map[string]*json.RawMessage
1091	err := json.Unmarshal(body, &m)
1092	if err != nil {
1093		return err
1094	}
1095	for k, v := range m {
1096		switch k {
1097		case "properties":
1098			if v != nil {
1099				var APIContractProperties APIContractProperties
1100				err = json.Unmarshal(*v, &APIContractProperties)
1101				if err != nil {
1102					return err
1103				}
1104				ac.APIContractProperties = &APIContractProperties
1105			}
1106		case "id":
1107			if v != nil {
1108				var ID string
1109				err = json.Unmarshal(*v, &ID)
1110				if err != nil {
1111					return err
1112				}
1113				ac.ID = &ID
1114			}
1115		case "name":
1116			if v != nil {
1117				var name string
1118				err = json.Unmarshal(*v, &name)
1119				if err != nil {
1120					return err
1121				}
1122				ac.Name = &name
1123			}
1124		case "type":
1125			if v != nil {
1126				var typeVar string
1127				err = json.Unmarshal(*v, &typeVar)
1128				if err != nil {
1129					return err
1130				}
1131				ac.Type = &typeVar
1132			}
1133		}
1134	}
1135
1136	return nil
1137}
1138
1139// APIContractProperties api Entity Properties
1140type APIContractProperties struct {
1141	// SourceAPIID - API identifier of the source API.
1142	SourceAPIID *string `json:"sourceApiId,omitempty"`
1143	// DisplayName - API name. Must be 1 to 300 characters long.
1144	DisplayName *string `json:"displayName,omitempty"`
1145	// ServiceURL - Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
1146	ServiceURL *string `json:"serviceUrl,omitempty"`
1147	// 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.
1148	Path *string `json:"path,omitempty"`
1149	// Protocols - Describes on which protocols the operations in this API can be invoked.
1150	Protocols *[]Protocol `json:"protocols,omitempty"`
1151	// APIVersionSet - Version set details
1152	APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"`
1153	// Description - Description of the API. May include HTML formatting tags.
1154	Description *string `json:"description,omitempty"`
1155	// AuthenticationSettings - Collection of authentication settings included into this API.
1156	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
1157	// SubscriptionKeyParameterNames - Protocols over which API is made available.
1158	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
1159	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
1160	APIType APIType `json:"type,omitempty"`
1161	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
1162	APIRevision *string `json:"apiRevision,omitempty"`
1163	// APIVersion - Indicates the Version identifier of the API if the API is versioned
1164	APIVersion *string `json:"apiVersion,omitempty"`
1165	// IsCurrent - Indicates if API revision is current api revision.
1166	IsCurrent *bool `json:"isCurrent,omitempty"`
1167	// IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway.
1168	IsOnline *bool `json:"isOnline,omitempty"`
1169	// APIRevisionDescription - Description of the Api Revision.
1170	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`
1171	// APIVersionDescription - Description of the Api Version.
1172	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
1173	// APIVersionSetID - A resource identifier for the related ApiVersionSet.
1174	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
1175	// SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
1176	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
1177}
1178
1179// APIContractUpdateProperties API update contract properties.
1180type APIContractUpdateProperties struct {
1181	// DisplayName - API name.
1182	DisplayName *string `json:"displayName,omitempty"`
1183	// ServiceURL - Absolute URL of the backend service implementing this API.
1184	ServiceURL *string `json:"serviceUrl,omitempty"`
1185	// 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.
1186	Path *string `json:"path,omitempty"`
1187	// Protocols - Describes on which protocols the operations in this API can be invoked.
1188	Protocols *[]Protocol `json:"protocols,omitempty"`
1189	// Description - Description of the API. May include HTML formatting tags.
1190	Description *string `json:"description,omitempty"`
1191	// AuthenticationSettings - Collection of authentication settings included into this API.
1192	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
1193	// SubscriptionKeyParameterNames - Protocols over which API is made available.
1194	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
1195	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
1196	APIType APIType `json:"type,omitempty"`
1197	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
1198	APIRevision *string `json:"apiRevision,omitempty"`
1199	// APIVersion - Indicates the Version identifier of the API if the API is versioned
1200	APIVersion *string `json:"apiVersion,omitempty"`
1201	// IsCurrent - Indicates if API revision is current api revision.
1202	IsCurrent *bool `json:"isCurrent,omitempty"`
1203	// IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway.
1204	IsOnline *bool `json:"isOnline,omitempty"`
1205	// APIRevisionDescription - Description of the Api Revision.
1206	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`
1207	// APIVersionDescription - Description of the Api Version.
1208	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
1209	// APIVersionSetID - A resource identifier for the related ApiVersionSet.
1210	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
1211	// SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
1212	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
1213}
1214
1215// APICreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1216// operation.
1217type APICreateOrUpdateFuture struct {
1218	azure.Future
1219}
1220
1221// Result returns the result of the asynchronous operation.
1222// If the operation has not completed it will return an error.
1223func (future *APICreateOrUpdateFuture) Result(client APIClient) (ac APIContract, err error) {
1224	var done bool
1225	done, err = future.DoneWithContext(context.Background(), client)
1226	if err != nil {
1227		err = autorest.NewErrorWithError(err, "apimanagement.APICreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1228		return
1229	}
1230	if !done {
1231		err = azure.NewAsyncOpIncompleteError("apimanagement.APICreateOrUpdateFuture")
1232		return
1233	}
1234	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1235	if ac.Response.Response, err = future.GetResult(sender); err == nil && ac.Response.Response.StatusCode != http.StatusNoContent {
1236		ac, err = client.CreateOrUpdateResponder(ac.Response.Response)
1237		if err != nil {
1238			err = autorest.NewErrorWithError(err, "apimanagement.APICreateOrUpdateFuture", "Result", ac.Response.Response, "Failure responding to request")
1239		}
1240	}
1241	return
1242}
1243
1244// APICreateOrUpdateParameter API Create or Update Parameters.
1245type APICreateOrUpdateParameter struct {
1246	// APICreateOrUpdateProperties - Api entity create of update properties.
1247	*APICreateOrUpdateProperties `json:"properties,omitempty"`
1248}
1249
1250// MarshalJSON is the custom marshaler for APICreateOrUpdateParameter.
1251func (acoup APICreateOrUpdateParameter) MarshalJSON() ([]byte, error) {
1252	objectMap := make(map[string]interface{})
1253	if acoup.APICreateOrUpdateProperties != nil {
1254		objectMap["properties"] = acoup.APICreateOrUpdateProperties
1255	}
1256	return json.Marshal(objectMap)
1257}
1258
1259// UnmarshalJSON is the custom unmarshaler for APICreateOrUpdateParameter struct.
1260func (acoup *APICreateOrUpdateParameter) UnmarshalJSON(body []byte) error {
1261	var m map[string]*json.RawMessage
1262	err := json.Unmarshal(body, &m)
1263	if err != nil {
1264		return err
1265	}
1266	for k, v := range m {
1267		switch k {
1268		case "properties":
1269			if v != nil {
1270				var APICreateOrUpdateProperties APICreateOrUpdateProperties
1271				err = json.Unmarshal(*v, &APICreateOrUpdateProperties)
1272				if err != nil {
1273					return err
1274				}
1275				acoup.APICreateOrUpdateProperties = &APICreateOrUpdateProperties
1276			}
1277		}
1278	}
1279
1280	return nil
1281}
1282
1283// APICreateOrUpdateProperties api Create or Update Properties.
1284type APICreateOrUpdateProperties struct {
1285	// Value - Content value when Importing an API.
1286	Value *string `json:"value,omitempty"`
1287	// Format - Format of the Content in which the API is getting imported. Possible values include: 'WadlXML', 'WadlLinkJSON', 'SwaggerJSON', 'SwaggerLinkJSON', 'Wsdl', 'WsdlLink', 'Openapi', 'Openapijson', 'OpenapiLink', 'OpenapijsonLink'
1288	Format ContentFormat `json:"format,omitempty"`
1289	// WsdlSelector - Criteria to limit import of WSDL to a subset of the document.
1290	WsdlSelector *APICreateOrUpdatePropertiesWsdlSelector `json:"wsdlSelector,omitempty"`
1291	// SoapAPIType - Type of Api to create.
1292	//  * `http` creates a SOAP to REST API
1293	//  * `soap` creates a SOAP pass-through API. Possible values include: 'SoapToRest', 'SoapPassThrough'
1294	SoapAPIType SoapAPIType `json:"apiType,omitempty"`
1295	// SourceAPIID - API identifier of the source API.
1296	SourceAPIID *string `json:"sourceApiId,omitempty"`
1297	// DisplayName - API name. Must be 1 to 300 characters long.
1298	DisplayName *string `json:"displayName,omitempty"`
1299	// ServiceURL - Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
1300	ServiceURL *string `json:"serviceUrl,omitempty"`
1301	// 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.
1302	Path *string `json:"path,omitempty"`
1303	// Protocols - Describes on which protocols the operations in this API can be invoked.
1304	Protocols *[]Protocol `json:"protocols,omitempty"`
1305	// APIVersionSet - Version set details
1306	APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"`
1307	// Description - Description of the API. May include HTML formatting tags.
1308	Description *string `json:"description,omitempty"`
1309	// AuthenticationSettings - Collection of authentication settings included into this API.
1310	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
1311	// SubscriptionKeyParameterNames - Protocols over which API is made available.
1312	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
1313	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
1314	APIType APIType `json:"type,omitempty"`
1315	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
1316	APIRevision *string `json:"apiRevision,omitempty"`
1317	// APIVersion - Indicates the Version identifier of the API if the API is versioned
1318	APIVersion *string `json:"apiVersion,omitempty"`
1319	// IsCurrent - Indicates if API revision is current api revision.
1320	IsCurrent *bool `json:"isCurrent,omitempty"`
1321	// IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway.
1322	IsOnline *bool `json:"isOnline,omitempty"`
1323	// APIRevisionDescription - Description of the Api Revision.
1324	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`
1325	// APIVersionDescription - Description of the Api Version.
1326	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
1327	// APIVersionSetID - A resource identifier for the related ApiVersionSet.
1328	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
1329	// SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
1330	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
1331}
1332
1333// APICreateOrUpdatePropertiesWsdlSelector criteria to limit import of WSDL to a subset of the document.
1334type APICreateOrUpdatePropertiesWsdlSelector struct {
1335	// WsdlServiceName - Name of service to import from WSDL
1336	WsdlServiceName *string `json:"wsdlServiceName,omitempty"`
1337	// WsdlEndpointName - Name of endpoint(port) to import from WSDL
1338	WsdlEndpointName *string `json:"wsdlEndpointName,omitempty"`
1339}
1340
1341// APIEntityBaseContract API base contract details.
1342type APIEntityBaseContract struct {
1343	// Description - Description of the API. May include HTML formatting tags.
1344	Description *string `json:"description,omitempty"`
1345	// AuthenticationSettings - Collection of authentication settings included into this API.
1346	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
1347	// SubscriptionKeyParameterNames - Protocols over which API is made available.
1348	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
1349	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
1350	APIType APIType `json:"type,omitempty"`
1351	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
1352	APIRevision *string `json:"apiRevision,omitempty"`
1353	// APIVersion - Indicates the Version identifier of the API if the API is versioned
1354	APIVersion *string `json:"apiVersion,omitempty"`
1355	// IsCurrent - Indicates if API revision is current api revision.
1356	IsCurrent *bool `json:"isCurrent,omitempty"`
1357	// IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway.
1358	IsOnline *bool `json:"isOnline,omitempty"`
1359	// APIRevisionDescription - Description of the Api Revision.
1360	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`
1361	// APIVersionDescription - Description of the Api Version.
1362	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
1363	// APIVersionSetID - A resource identifier for the related ApiVersionSet.
1364	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
1365	// SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
1366	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
1367}
1368
1369// APIExportResult API Export result.
1370type APIExportResult struct {
1371	autorest.Response `json:"-"`
1372	// ID - ResourceId of the API which was exported.
1373	ID *string `json:"id,omitempty"`
1374	// ExportResultFormat - Format in which the Api Details are exported to the Storage Blob with Sas Key valid for 5 minutes. Possible values include: 'ExportResultFormatSwagger', 'ExportResultFormatWsdl', 'ExportResultFormatWadl', 'ExportResultFormatOpenAPI'
1375	ExportResultFormat ExportResultFormat `json:"format,omitempty"`
1376	// Value - The object defining the schema of the exported Api Detail
1377	Value *APIExportResultValue `json:"value,omitempty"`
1378}
1379
1380// APIExportResultValue the object defining the schema of the exported Api Detail
1381type APIExportResultValue struct {
1382	// Link - Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes.
1383	Link *string `json:"link,omitempty"`
1384}
1385
1386// ApimResource the Resource definition.
1387type ApimResource struct {
1388	// ID - READ-ONLY; Resource ID.
1389	ID *string `json:"id,omitempty"`
1390	// Name - READ-ONLY; Resource name.
1391	Name *string `json:"name,omitempty"`
1392	// Type - READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement.
1393	Type *string `json:"type,omitempty"`
1394	// Tags - Resource tags.
1395	Tags map[string]*string `json:"tags"`
1396}
1397
1398// MarshalJSON is the custom marshaler for ApimResource.
1399func (ar ApimResource) MarshalJSON() ([]byte, error) {
1400	objectMap := make(map[string]interface{})
1401	if ar.Tags != nil {
1402		objectMap["tags"] = ar.Tags
1403	}
1404	return json.Marshal(objectMap)
1405}
1406
1407// APIReleaseCollection paged ApiRelease list representation.
1408type APIReleaseCollection struct {
1409	autorest.Response `json:"-"`
1410	// Value - READ-ONLY; Page values.
1411	Value *[]APIReleaseContract `json:"value,omitempty"`
1412	// NextLink - READ-ONLY; Next page link if any.
1413	NextLink *string `json:"nextLink,omitempty"`
1414}
1415
1416// APIReleaseCollectionIterator provides access to a complete listing of APIReleaseContract values.
1417type APIReleaseCollectionIterator struct {
1418	i    int
1419	page APIReleaseCollectionPage
1420}
1421
1422// NextWithContext advances to the next value.  If there was an error making
1423// the request the iterator does not advance and the error is returned.
1424func (iter *APIReleaseCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1425	if tracing.IsEnabled() {
1426		ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseCollectionIterator.NextWithContext")
1427		defer func() {
1428			sc := -1
1429			if iter.Response().Response.Response != nil {
1430				sc = iter.Response().Response.Response.StatusCode
1431			}
1432			tracing.EndSpan(ctx, sc, err)
1433		}()
1434	}
1435	iter.i++
1436	if iter.i < len(iter.page.Values()) {
1437		return nil
1438	}
1439	err = iter.page.NextWithContext(ctx)
1440	if err != nil {
1441		iter.i--
1442		return err
1443	}
1444	iter.i = 0
1445	return nil
1446}
1447
1448// Next advances to the next value.  If there was an error making
1449// the request the iterator does not advance and the error is returned.
1450// Deprecated: Use NextWithContext() instead.
1451func (iter *APIReleaseCollectionIterator) Next() error {
1452	return iter.NextWithContext(context.Background())
1453}
1454
1455// NotDone returns true if the enumeration should be started or is not yet complete.
1456func (iter APIReleaseCollectionIterator) NotDone() bool {
1457	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1458}
1459
1460// Response returns the raw server response from the last page request.
1461func (iter APIReleaseCollectionIterator) Response() APIReleaseCollection {
1462	return iter.page.Response()
1463}
1464
1465// Value returns the current value or a zero-initialized value if the
1466// iterator has advanced beyond the end of the collection.
1467func (iter APIReleaseCollectionIterator) Value() APIReleaseContract {
1468	if !iter.page.NotDone() {
1469		return APIReleaseContract{}
1470	}
1471	return iter.page.Values()[iter.i]
1472}
1473
1474// Creates a new instance of the APIReleaseCollectionIterator type.
1475func NewAPIReleaseCollectionIterator(page APIReleaseCollectionPage) APIReleaseCollectionIterator {
1476	return APIReleaseCollectionIterator{page: page}
1477}
1478
1479// IsEmpty returns true if the ListResult contains no values.
1480func (arc APIReleaseCollection) IsEmpty() bool {
1481	return arc.Value == nil || len(*arc.Value) == 0
1482}
1483
1484// aPIReleaseCollectionPreparer prepares a request to retrieve the next set of results.
1485// It returns nil if no more results exist.
1486func (arc APIReleaseCollection) aPIReleaseCollectionPreparer(ctx context.Context) (*http.Request, error) {
1487	if arc.NextLink == nil || len(to.String(arc.NextLink)) < 1 {
1488		return nil, nil
1489	}
1490	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1491		autorest.AsJSON(),
1492		autorest.AsGet(),
1493		autorest.WithBaseURL(to.String(arc.NextLink)))
1494}
1495
1496// APIReleaseCollectionPage contains a page of APIReleaseContract values.
1497type APIReleaseCollectionPage struct {
1498	fn  func(context.Context, APIReleaseCollection) (APIReleaseCollection, error)
1499	arc APIReleaseCollection
1500}
1501
1502// NextWithContext advances to the next page of values.  If there was an error making
1503// the request the page does not advance and the error is returned.
1504func (page *APIReleaseCollectionPage) NextWithContext(ctx context.Context) (err error) {
1505	if tracing.IsEnabled() {
1506		ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseCollectionPage.NextWithContext")
1507		defer func() {
1508			sc := -1
1509			if page.Response().Response.Response != nil {
1510				sc = page.Response().Response.Response.StatusCode
1511			}
1512			tracing.EndSpan(ctx, sc, err)
1513		}()
1514	}
1515	next, err := page.fn(ctx, page.arc)
1516	if err != nil {
1517		return err
1518	}
1519	page.arc = next
1520	return nil
1521}
1522
1523// Next advances to the next page of values.  If there was an error making
1524// the request the page does not advance and the error is returned.
1525// Deprecated: Use NextWithContext() instead.
1526func (page *APIReleaseCollectionPage) Next() error {
1527	return page.NextWithContext(context.Background())
1528}
1529
1530// NotDone returns true if the page enumeration should be started or is not yet complete.
1531func (page APIReleaseCollectionPage) NotDone() bool {
1532	return !page.arc.IsEmpty()
1533}
1534
1535// Response returns the raw server response from the last page request.
1536func (page APIReleaseCollectionPage) Response() APIReleaseCollection {
1537	return page.arc
1538}
1539
1540// Values returns the slice of values for the current page or nil if there are no values.
1541func (page APIReleaseCollectionPage) Values() []APIReleaseContract {
1542	if page.arc.IsEmpty() {
1543		return nil
1544	}
1545	return *page.arc.Value
1546}
1547
1548// Creates a new instance of the APIReleaseCollectionPage type.
1549func NewAPIReleaseCollectionPage(getNextPage func(context.Context, APIReleaseCollection) (APIReleaseCollection, error)) APIReleaseCollectionPage {
1550	return APIReleaseCollectionPage{fn: getNextPage}
1551}
1552
1553// APIReleaseContract apiRelease details.
1554type APIReleaseContract struct {
1555	autorest.Response `json:"-"`
1556	// APIReleaseContractProperties - ApiRelease entity contract properties.
1557	*APIReleaseContractProperties `json:"properties,omitempty"`
1558	// ID - READ-ONLY; Resource ID.
1559	ID *string `json:"id,omitempty"`
1560	// Name - READ-ONLY; Resource name.
1561	Name *string `json:"name,omitempty"`
1562	// Type - READ-ONLY; Resource type for API Management resource.
1563	Type *string `json:"type,omitempty"`
1564}
1565
1566// MarshalJSON is the custom marshaler for APIReleaseContract.
1567func (arc APIReleaseContract) MarshalJSON() ([]byte, error) {
1568	objectMap := make(map[string]interface{})
1569	if arc.APIReleaseContractProperties != nil {
1570		objectMap["properties"] = arc.APIReleaseContractProperties
1571	}
1572	return json.Marshal(objectMap)
1573}
1574
1575// UnmarshalJSON is the custom unmarshaler for APIReleaseContract struct.
1576func (arc *APIReleaseContract) UnmarshalJSON(body []byte) error {
1577	var m map[string]*json.RawMessage
1578	err := json.Unmarshal(body, &m)
1579	if err != nil {
1580		return err
1581	}
1582	for k, v := range m {
1583		switch k {
1584		case "properties":
1585			if v != nil {
1586				var APIReleaseContractProperties APIReleaseContractProperties
1587				err = json.Unmarshal(*v, &APIReleaseContractProperties)
1588				if err != nil {
1589					return err
1590				}
1591				arc.APIReleaseContractProperties = &APIReleaseContractProperties
1592			}
1593		case "id":
1594			if v != nil {
1595				var ID string
1596				err = json.Unmarshal(*v, &ID)
1597				if err != nil {
1598					return err
1599				}
1600				arc.ID = &ID
1601			}
1602		case "name":
1603			if v != nil {
1604				var name string
1605				err = json.Unmarshal(*v, &name)
1606				if err != nil {
1607					return err
1608				}
1609				arc.Name = &name
1610			}
1611		case "type":
1612			if v != nil {
1613				var typeVar string
1614				err = json.Unmarshal(*v, &typeVar)
1615				if err != nil {
1616					return err
1617				}
1618				arc.Type = &typeVar
1619			}
1620		}
1621	}
1622
1623	return nil
1624}
1625
1626// APIReleaseContractProperties API Release details
1627type APIReleaseContractProperties struct {
1628	// APIID - Identifier of the API the release belongs to.
1629	APIID *string `json:"apiId,omitempty"`
1630	// CreatedDateTime - READ-ONLY; The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
1631	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
1632	// UpdatedDateTime - READ-ONLY; The time the API release was updated.
1633	UpdatedDateTime *date.Time `json:"updatedDateTime,omitempty"`
1634	// Notes - Release Notes
1635	Notes *string `json:"notes,omitempty"`
1636}
1637
1638// APIRevisionCollection paged Api Revision list representation.
1639type APIRevisionCollection struct {
1640	autorest.Response `json:"-"`
1641	// Value - READ-ONLY; Page values.
1642	Value *[]APIRevisionContract `json:"value,omitempty"`
1643	// NextLink - READ-ONLY; Next page link if any.
1644	NextLink *string `json:"nextLink,omitempty"`
1645}
1646
1647// APIRevisionCollectionIterator provides access to a complete listing of APIRevisionContract values.
1648type APIRevisionCollectionIterator struct {
1649	i    int
1650	page APIRevisionCollectionPage
1651}
1652
1653// NextWithContext advances to the next value.  If there was an error making
1654// the request the iterator does not advance and the error is returned.
1655func (iter *APIRevisionCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1656	if tracing.IsEnabled() {
1657		ctx = tracing.StartSpan(ctx, fqdn+"/APIRevisionCollectionIterator.NextWithContext")
1658		defer func() {
1659			sc := -1
1660			if iter.Response().Response.Response != nil {
1661				sc = iter.Response().Response.Response.StatusCode
1662			}
1663			tracing.EndSpan(ctx, sc, err)
1664		}()
1665	}
1666	iter.i++
1667	if iter.i < len(iter.page.Values()) {
1668		return nil
1669	}
1670	err = iter.page.NextWithContext(ctx)
1671	if err != nil {
1672		iter.i--
1673		return err
1674	}
1675	iter.i = 0
1676	return nil
1677}
1678
1679// Next advances to the next value.  If there was an error making
1680// the request the iterator does not advance and the error is returned.
1681// Deprecated: Use NextWithContext() instead.
1682func (iter *APIRevisionCollectionIterator) Next() error {
1683	return iter.NextWithContext(context.Background())
1684}
1685
1686// NotDone returns true if the enumeration should be started or is not yet complete.
1687func (iter APIRevisionCollectionIterator) NotDone() bool {
1688	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1689}
1690
1691// Response returns the raw server response from the last page request.
1692func (iter APIRevisionCollectionIterator) Response() APIRevisionCollection {
1693	return iter.page.Response()
1694}
1695
1696// Value returns the current value or a zero-initialized value if the
1697// iterator has advanced beyond the end of the collection.
1698func (iter APIRevisionCollectionIterator) Value() APIRevisionContract {
1699	if !iter.page.NotDone() {
1700		return APIRevisionContract{}
1701	}
1702	return iter.page.Values()[iter.i]
1703}
1704
1705// Creates a new instance of the APIRevisionCollectionIterator type.
1706func NewAPIRevisionCollectionIterator(page APIRevisionCollectionPage) APIRevisionCollectionIterator {
1707	return APIRevisionCollectionIterator{page: page}
1708}
1709
1710// IsEmpty returns true if the ListResult contains no values.
1711func (arc APIRevisionCollection) IsEmpty() bool {
1712	return arc.Value == nil || len(*arc.Value) == 0
1713}
1714
1715// aPIRevisionCollectionPreparer prepares a request to retrieve the next set of results.
1716// It returns nil if no more results exist.
1717func (arc APIRevisionCollection) aPIRevisionCollectionPreparer(ctx context.Context) (*http.Request, error) {
1718	if arc.NextLink == nil || len(to.String(arc.NextLink)) < 1 {
1719		return nil, nil
1720	}
1721	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1722		autorest.AsJSON(),
1723		autorest.AsGet(),
1724		autorest.WithBaseURL(to.String(arc.NextLink)))
1725}
1726
1727// APIRevisionCollectionPage contains a page of APIRevisionContract values.
1728type APIRevisionCollectionPage struct {
1729	fn  func(context.Context, APIRevisionCollection) (APIRevisionCollection, error)
1730	arc APIRevisionCollection
1731}
1732
1733// NextWithContext advances to the next page of values.  If there was an error making
1734// the request the page does not advance and the error is returned.
1735func (page *APIRevisionCollectionPage) NextWithContext(ctx context.Context) (err error) {
1736	if tracing.IsEnabled() {
1737		ctx = tracing.StartSpan(ctx, fqdn+"/APIRevisionCollectionPage.NextWithContext")
1738		defer func() {
1739			sc := -1
1740			if page.Response().Response.Response != nil {
1741				sc = page.Response().Response.Response.StatusCode
1742			}
1743			tracing.EndSpan(ctx, sc, err)
1744		}()
1745	}
1746	next, err := page.fn(ctx, page.arc)
1747	if err != nil {
1748		return err
1749	}
1750	page.arc = next
1751	return nil
1752}
1753
1754// Next advances to the next page of values.  If there was an error making
1755// the request the page does not advance and the error is returned.
1756// Deprecated: Use NextWithContext() instead.
1757func (page *APIRevisionCollectionPage) Next() error {
1758	return page.NextWithContext(context.Background())
1759}
1760
1761// NotDone returns true if the page enumeration should be started or is not yet complete.
1762func (page APIRevisionCollectionPage) NotDone() bool {
1763	return !page.arc.IsEmpty()
1764}
1765
1766// Response returns the raw server response from the last page request.
1767func (page APIRevisionCollectionPage) Response() APIRevisionCollection {
1768	return page.arc
1769}
1770
1771// Values returns the slice of values for the current page or nil if there are no values.
1772func (page APIRevisionCollectionPage) Values() []APIRevisionContract {
1773	if page.arc.IsEmpty() {
1774		return nil
1775	}
1776	return *page.arc.Value
1777}
1778
1779// Creates a new instance of the APIRevisionCollectionPage type.
1780func NewAPIRevisionCollectionPage(getNextPage func(context.Context, APIRevisionCollection) (APIRevisionCollection, error)) APIRevisionCollectionPage {
1781	return APIRevisionCollectionPage{fn: getNextPage}
1782}
1783
1784// APIRevisionContract summary of revision metadata.
1785type APIRevisionContract struct {
1786	// APIID - READ-ONLY; Identifier of the API Revision.
1787	APIID *string `json:"apiId,omitempty"`
1788	// APIRevision - READ-ONLY; Revision number of API.
1789	APIRevision *string `json:"apiRevision,omitempty"`
1790	// CreatedDateTime - READ-ONLY; The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
1791	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
1792	// UpdatedDateTime - READ-ONLY; The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
1793	UpdatedDateTime *date.Time `json:"updatedDateTime,omitempty"`
1794	// Description - READ-ONLY; Description of the API Revision.
1795	Description *string `json:"description,omitempty"`
1796	// PrivateURL - READ-ONLY; Gateway URL for accessing the non-current API Revision.
1797	PrivateURL *string `json:"privateUrl,omitempty"`
1798	// IsOnline - READ-ONLY; Indicates if API revision is the current api revision.
1799	IsOnline *bool `json:"isOnline,omitempty"`
1800	// IsCurrent - READ-ONLY; Indicates if API revision is accessible via the gateway.
1801	IsCurrent *bool `json:"isCurrent,omitempty"`
1802}
1803
1804// APIRevisionInfoContract object used to create an API Revision or Version based on an existing API
1805// Revision
1806type APIRevisionInfoContract struct {
1807	// SourceAPIID - Resource identifier of API to be used to create the revision from.
1808	SourceAPIID *string `json:"sourceApiId,omitempty"`
1809	// APIVersionName - Version identifier for the new API Version.
1810	APIVersionName *string `json:"apiVersionName,omitempty"`
1811	// APIRevisionDescription - Description of new API Revision.
1812	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`
1813	// APIVersionSet - Version set details
1814	APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"`
1815}
1816
1817// APISchemaCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1818// operation.
1819type APISchemaCreateOrUpdateFuture struct {
1820	azure.Future
1821}
1822
1823// Result returns the result of the asynchronous operation.
1824// If the operation has not completed it will return an error.
1825func (future *APISchemaCreateOrUpdateFuture) Result(client APISchemaClient) (sc SchemaContract, err error) {
1826	var done bool
1827	done, err = future.DoneWithContext(context.Background(), client)
1828	if err != nil {
1829		err = autorest.NewErrorWithError(err, "apimanagement.APISchemaCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1830		return
1831	}
1832	if !done {
1833		err = azure.NewAsyncOpIncompleteError("apimanagement.APISchemaCreateOrUpdateFuture")
1834		return
1835	}
1836	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1837	if sc.Response.Response, err = future.GetResult(sender); err == nil && sc.Response.Response.StatusCode != http.StatusNoContent {
1838		sc, err = client.CreateOrUpdateResponder(sc.Response.Response)
1839		if err != nil {
1840			err = autorest.NewErrorWithError(err, "apimanagement.APISchemaCreateOrUpdateFuture", "Result", sc.Response.Response, "Failure responding to request")
1841		}
1842	}
1843	return
1844}
1845
1846// APITagResourceContractProperties API contract properties for the Tag Resources.
1847type APITagResourceContractProperties struct {
1848	// ID - API identifier in the form /apis/{apiId}.
1849	ID *string `json:"id,omitempty"`
1850	// Name - API name.
1851	Name *string `json:"name,omitempty"`
1852	// ServiceURL - Absolute URL of the backend service implementing this API.
1853	ServiceURL *string `json:"serviceUrl,omitempty"`
1854	// 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.
1855	Path *string `json:"path,omitempty"`
1856	// Protocols - Describes on which protocols the operations in this API can be invoked.
1857	Protocols *[]Protocol `json:"protocols,omitempty"`
1858	// Description - Description of the API. May include HTML formatting tags.
1859	Description *string `json:"description,omitempty"`
1860	// AuthenticationSettings - Collection of authentication settings included into this API.
1861	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
1862	// SubscriptionKeyParameterNames - Protocols over which API is made available.
1863	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
1864	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
1865	APIType APIType `json:"type,omitempty"`
1866	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
1867	APIRevision *string `json:"apiRevision,omitempty"`
1868	// APIVersion - Indicates the Version identifier of the API if the API is versioned
1869	APIVersion *string `json:"apiVersion,omitempty"`
1870	// IsCurrent - Indicates if API revision is current api revision.
1871	IsCurrent *bool `json:"isCurrent,omitempty"`
1872	// IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway.
1873	IsOnline *bool `json:"isOnline,omitempty"`
1874	// APIRevisionDescription - Description of the Api Revision.
1875	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`
1876	// APIVersionDescription - Description of the Api Version.
1877	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
1878	// APIVersionSetID - A resource identifier for the related ApiVersionSet.
1879	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
1880	// SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
1881	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
1882}
1883
1884// APIUpdateContract API update contract details.
1885type APIUpdateContract struct {
1886	// APIContractUpdateProperties - Properties of the API entity that can be updated.
1887	*APIContractUpdateProperties `json:"properties,omitempty"`
1888}
1889
1890// MarshalJSON is the custom marshaler for APIUpdateContract.
1891func (auc APIUpdateContract) MarshalJSON() ([]byte, error) {
1892	objectMap := make(map[string]interface{})
1893	if auc.APIContractUpdateProperties != nil {
1894		objectMap["properties"] = auc.APIContractUpdateProperties
1895	}
1896	return json.Marshal(objectMap)
1897}
1898
1899// UnmarshalJSON is the custom unmarshaler for APIUpdateContract struct.
1900func (auc *APIUpdateContract) UnmarshalJSON(body []byte) error {
1901	var m map[string]*json.RawMessage
1902	err := json.Unmarshal(body, &m)
1903	if err != nil {
1904		return err
1905	}
1906	for k, v := range m {
1907		switch k {
1908		case "properties":
1909			if v != nil {
1910				var APIContractUpdateProperties APIContractUpdateProperties
1911				err = json.Unmarshal(*v, &APIContractUpdateProperties)
1912				if err != nil {
1913					return err
1914				}
1915				auc.APIContractUpdateProperties = &APIContractUpdateProperties
1916			}
1917		}
1918	}
1919
1920	return nil
1921}
1922
1923// APIVersionConstraint control Plane Apis version constraint for the API Management service.
1924type APIVersionConstraint struct {
1925	// MinAPIVersion - Limit control plane API calls to API Management service with version equal to or newer than this value.
1926	MinAPIVersion *string `json:"minApiVersion,omitempty"`
1927}
1928
1929// APIVersionSetCollection paged Api Version Set list representation.
1930type APIVersionSetCollection struct {
1931	autorest.Response `json:"-"`
1932	// Value - Page values.
1933	Value *[]APIVersionSetContract `json:"value,omitempty"`
1934	// NextLink - Next page link if any.
1935	NextLink *string `json:"nextLink,omitempty"`
1936}
1937
1938// APIVersionSetCollectionIterator provides access to a complete listing of APIVersionSetContract values.
1939type APIVersionSetCollectionIterator struct {
1940	i    int
1941	page APIVersionSetCollectionPage
1942}
1943
1944// NextWithContext advances to the next value.  If there was an error making
1945// the request the iterator does not advance and the error is returned.
1946func (iter *APIVersionSetCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1947	if tracing.IsEnabled() {
1948		ctx = tracing.StartSpan(ctx, fqdn+"/APIVersionSetCollectionIterator.NextWithContext")
1949		defer func() {
1950			sc := -1
1951			if iter.Response().Response.Response != nil {
1952				sc = iter.Response().Response.Response.StatusCode
1953			}
1954			tracing.EndSpan(ctx, sc, err)
1955		}()
1956	}
1957	iter.i++
1958	if iter.i < len(iter.page.Values()) {
1959		return nil
1960	}
1961	err = iter.page.NextWithContext(ctx)
1962	if err != nil {
1963		iter.i--
1964		return err
1965	}
1966	iter.i = 0
1967	return nil
1968}
1969
1970// Next advances to the next value.  If there was an error making
1971// the request the iterator does not advance and the error is returned.
1972// Deprecated: Use NextWithContext() instead.
1973func (iter *APIVersionSetCollectionIterator) Next() error {
1974	return iter.NextWithContext(context.Background())
1975}
1976
1977// NotDone returns true if the enumeration should be started or is not yet complete.
1978func (iter APIVersionSetCollectionIterator) NotDone() bool {
1979	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1980}
1981
1982// Response returns the raw server response from the last page request.
1983func (iter APIVersionSetCollectionIterator) Response() APIVersionSetCollection {
1984	return iter.page.Response()
1985}
1986
1987// Value returns the current value or a zero-initialized value if the
1988// iterator has advanced beyond the end of the collection.
1989func (iter APIVersionSetCollectionIterator) Value() APIVersionSetContract {
1990	if !iter.page.NotDone() {
1991		return APIVersionSetContract{}
1992	}
1993	return iter.page.Values()[iter.i]
1994}
1995
1996// Creates a new instance of the APIVersionSetCollectionIterator type.
1997func NewAPIVersionSetCollectionIterator(page APIVersionSetCollectionPage) APIVersionSetCollectionIterator {
1998	return APIVersionSetCollectionIterator{page: page}
1999}
2000
2001// IsEmpty returns true if the ListResult contains no values.
2002func (avsc APIVersionSetCollection) IsEmpty() bool {
2003	return avsc.Value == nil || len(*avsc.Value) == 0
2004}
2005
2006// aPIVersionSetCollectionPreparer prepares a request to retrieve the next set of results.
2007// It returns nil if no more results exist.
2008func (avsc APIVersionSetCollection) aPIVersionSetCollectionPreparer(ctx context.Context) (*http.Request, error) {
2009	if avsc.NextLink == nil || len(to.String(avsc.NextLink)) < 1 {
2010		return nil, nil
2011	}
2012	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2013		autorest.AsJSON(),
2014		autorest.AsGet(),
2015		autorest.WithBaseURL(to.String(avsc.NextLink)))
2016}
2017
2018// APIVersionSetCollectionPage contains a page of APIVersionSetContract values.
2019type APIVersionSetCollectionPage struct {
2020	fn   func(context.Context, APIVersionSetCollection) (APIVersionSetCollection, error)
2021	avsc APIVersionSetCollection
2022}
2023
2024// NextWithContext advances to the next page of values.  If there was an error making
2025// the request the page does not advance and the error is returned.
2026func (page *APIVersionSetCollectionPage) NextWithContext(ctx context.Context) (err error) {
2027	if tracing.IsEnabled() {
2028		ctx = tracing.StartSpan(ctx, fqdn+"/APIVersionSetCollectionPage.NextWithContext")
2029		defer func() {
2030			sc := -1
2031			if page.Response().Response.Response != nil {
2032				sc = page.Response().Response.Response.StatusCode
2033			}
2034			tracing.EndSpan(ctx, sc, err)
2035		}()
2036	}
2037	next, err := page.fn(ctx, page.avsc)
2038	if err != nil {
2039		return err
2040	}
2041	page.avsc = next
2042	return nil
2043}
2044
2045// Next advances to the next page of values.  If there was an error making
2046// the request the page does not advance and the error is returned.
2047// Deprecated: Use NextWithContext() instead.
2048func (page *APIVersionSetCollectionPage) Next() error {
2049	return page.NextWithContext(context.Background())
2050}
2051
2052// NotDone returns true if the page enumeration should be started or is not yet complete.
2053func (page APIVersionSetCollectionPage) NotDone() bool {
2054	return !page.avsc.IsEmpty()
2055}
2056
2057// Response returns the raw server response from the last page request.
2058func (page APIVersionSetCollectionPage) Response() APIVersionSetCollection {
2059	return page.avsc
2060}
2061
2062// Values returns the slice of values for the current page or nil if there are no values.
2063func (page APIVersionSetCollectionPage) Values() []APIVersionSetContract {
2064	if page.avsc.IsEmpty() {
2065		return nil
2066	}
2067	return *page.avsc.Value
2068}
2069
2070// Creates a new instance of the APIVersionSetCollectionPage type.
2071func NewAPIVersionSetCollectionPage(getNextPage func(context.Context, APIVersionSetCollection) (APIVersionSetCollection, error)) APIVersionSetCollectionPage {
2072	return APIVersionSetCollectionPage{fn: getNextPage}
2073}
2074
2075// APIVersionSetContract api Version Set Contract details.
2076type APIVersionSetContract struct {
2077	autorest.Response `json:"-"`
2078	// APIVersionSetContractProperties - Api VersionSet contract properties.
2079	*APIVersionSetContractProperties `json:"properties,omitempty"`
2080	// ID - READ-ONLY; Resource ID.
2081	ID *string `json:"id,omitempty"`
2082	// Name - READ-ONLY; Resource name.
2083	Name *string `json:"name,omitempty"`
2084	// Type - READ-ONLY; Resource type for API Management resource.
2085	Type *string `json:"type,omitempty"`
2086}
2087
2088// MarshalJSON is the custom marshaler for APIVersionSetContract.
2089func (avsc APIVersionSetContract) MarshalJSON() ([]byte, error) {
2090	objectMap := make(map[string]interface{})
2091	if avsc.APIVersionSetContractProperties != nil {
2092		objectMap["properties"] = avsc.APIVersionSetContractProperties
2093	}
2094	return json.Marshal(objectMap)
2095}
2096
2097// UnmarshalJSON is the custom unmarshaler for APIVersionSetContract struct.
2098func (avsc *APIVersionSetContract) UnmarshalJSON(body []byte) error {
2099	var m map[string]*json.RawMessage
2100	err := json.Unmarshal(body, &m)
2101	if err != nil {
2102		return err
2103	}
2104	for k, v := range m {
2105		switch k {
2106		case "properties":
2107			if v != nil {
2108				var APIVersionSetContractProperties APIVersionSetContractProperties
2109				err = json.Unmarshal(*v, &APIVersionSetContractProperties)
2110				if err != nil {
2111					return err
2112				}
2113				avsc.APIVersionSetContractProperties = &APIVersionSetContractProperties
2114			}
2115		case "id":
2116			if v != nil {
2117				var ID string
2118				err = json.Unmarshal(*v, &ID)
2119				if err != nil {
2120					return err
2121				}
2122				avsc.ID = &ID
2123			}
2124		case "name":
2125			if v != nil {
2126				var name string
2127				err = json.Unmarshal(*v, &name)
2128				if err != nil {
2129					return err
2130				}
2131				avsc.Name = &name
2132			}
2133		case "type":
2134			if v != nil {
2135				var typeVar string
2136				err = json.Unmarshal(*v, &typeVar)
2137				if err != nil {
2138					return err
2139				}
2140				avsc.Type = &typeVar
2141			}
2142		}
2143	}
2144
2145	return nil
2146}
2147
2148// APIVersionSetContractDetails an API Version Set contains the common configuration for a set of API
2149// Versions relating
2150type APIVersionSetContractDetails struct {
2151	// ID - Identifier for existing API Version Set. Omit this value to create a new Version Set.
2152	ID *string `json:"id,omitempty"`
2153	// Name - The display Name of the API Version Set.
2154	Name *string `json:"name,omitempty"`
2155	// Description - Description of API Version Set.
2156	Description *string `json:"description,omitempty"`
2157	// VersioningScheme - An value that determines where the API Version identifer will be located in a HTTP request. Possible values include: 'VersioningScheme1Segment', 'VersioningScheme1Query', 'VersioningScheme1Header'
2158	VersioningScheme VersioningScheme1 `json:"versioningScheme,omitempty"`
2159	// VersionQueryName - Name of query parameter that indicates the API Version if versioningScheme is set to `query`.
2160	VersionQueryName *string `json:"versionQueryName,omitempty"`
2161	// VersionHeaderName - Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.
2162	VersionHeaderName *string `json:"versionHeaderName,omitempty"`
2163}
2164
2165// APIVersionSetContractProperties properties of an API Version Set.
2166type APIVersionSetContractProperties struct {
2167	// DisplayName - Name of API Version Set
2168	DisplayName *string `json:"displayName,omitempty"`
2169	// VersioningScheme - An value that determines where the API Version identifer will be located in a HTTP request. Possible values include: 'VersioningSchemeSegment', 'VersioningSchemeQuery', 'VersioningSchemeHeader'
2170	VersioningScheme VersioningScheme `json:"versioningScheme,omitempty"`
2171	// Description - Description of API Version Set.
2172	Description *string `json:"description,omitempty"`
2173	// VersionQueryName - Name of query parameter that indicates the API Version if versioningScheme is set to `query`.
2174	VersionQueryName *string `json:"versionQueryName,omitempty"`
2175	// VersionHeaderName - Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.
2176	VersionHeaderName *string `json:"versionHeaderName,omitempty"`
2177}
2178
2179// APIVersionSetEntityBase api Version set base parameters
2180type APIVersionSetEntityBase struct {
2181	// Description - Description of API Version Set.
2182	Description *string `json:"description,omitempty"`
2183	// VersionQueryName - Name of query parameter that indicates the API Version if versioningScheme is set to `query`.
2184	VersionQueryName *string `json:"versionQueryName,omitempty"`
2185	// VersionHeaderName - Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.
2186	VersionHeaderName *string `json:"versionHeaderName,omitempty"`
2187}
2188
2189// APIVersionSetUpdateParameters parameters to update or create an Api Version Set Contract.
2190type APIVersionSetUpdateParameters struct {
2191	// APIVersionSetUpdateParametersProperties - Parameters to update or create an Api Version Set Contract.
2192	*APIVersionSetUpdateParametersProperties `json:"properties,omitempty"`
2193}
2194
2195// MarshalJSON is the custom marshaler for APIVersionSetUpdateParameters.
2196func (avsup APIVersionSetUpdateParameters) MarshalJSON() ([]byte, error) {
2197	objectMap := make(map[string]interface{})
2198	if avsup.APIVersionSetUpdateParametersProperties != nil {
2199		objectMap["properties"] = avsup.APIVersionSetUpdateParametersProperties
2200	}
2201	return json.Marshal(objectMap)
2202}
2203
2204// UnmarshalJSON is the custom unmarshaler for APIVersionSetUpdateParameters struct.
2205func (avsup *APIVersionSetUpdateParameters) UnmarshalJSON(body []byte) error {
2206	var m map[string]*json.RawMessage
2207	err := json.Unmarshal(body, &m)
2208	if err != nil {
2209		return err
2210	}
2211	for k, v := range m {
2212		switch k {
2213		case "properties":
2214			if v != nil {
2215				var APIVersionSetUpdateParametersProperties APIVersionSetUpdateParametersProperties
2216				err = json.Unmarshal(*v, &APIVersionSetUpdateParametersProperties)
2217				if err != nil {
2218					return err
2219				}
2220				avsup.APIVersionSetUpdateParametersProperties = &APIVersionSetUpdateParametersProperties
2221			}
2222		}
2223	}
2224
2225	return nil
2226}
2227
2228// APIVersionSetUpdateParametersProperties properties used to create or update an API Version Set.
2229type APIVersionSetUpdateParametersProperties struct {
2230	// DisplayName - Name of API Version Set
2231	DisplayName *string `json:"displayName,omitempty"`
2232	// VersioningScheme - An value that determines where the API Version identifer will be located in a HTTP request. Possible values include: 'VersioningSchemeSegment', 'VersioningSchemeQuery', 'VersioningSchemeHeader'
2233	VersioningScheme VersioningScheme `json:"versioningScheme,omitempty"`
2234	// Description - Description of API Version Set.
2235	Description *string `json:"description,omitempty"`
2236	// VersionQueryName - Name of query parameter that indicates the API Version if versioningScheme is set to `query`.
2237	VersionQueryName *string `json:"versionQueryName,omitempty"`
2238	// VersionHeaderName - Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.
2239	VersionHeaderName *string `json:"versionHeaderName,omitempty"`
2240}
2241
2242// AssociationContract association entity details.
2243type AssociationContract struct {
2244	// AssociationContractProperties - Association entity contract properties.
2245	*AssociationContractProperties `json:"properties,omitempty"`
2246	// ID - READ-ONLY; Resource ID.
2247	ID *string `json:"id,omitempty"`
2248	// Name - READ-ONLY; Resource name.
2249	Name *string `json:"name,omitempty"`
2250	// Type - READ-ONLY; Resource type for API Management resource.
2251	Type *string `json:"type,omitempty"`
2252}
2253
2254// MarshalJSON is the custom marshaler for AssociationContract.
2255func (ac AssociationContract) MarshalJSON() ([]byte, error) {
2256	objectMap := make(map[string]interface{})
2257	if ac.AssociationContractProperties != nil {
2258		objectMap["properties"] = ac.AssociationContractProperties
2259	}
2260	return json.Marshal(objectMap)
2261}
2262
2263// UnmarshalJSON is the custom unmarshaler for AssociationContract struct.
2264func (ac *AssociationContract) UnmarshalJSON(body []byte) error {
2265	var m map[string]*json.RawMessage
2266	err := json.Unmarshal(body, &m)
2267	if err != nil {
2268		return err
2269	}
2270	for k, v := range m {
2271		switch k {
2272		case "properties":
2273			if v != nil {
2274				var associationContractProperties AssociationContractProperties
2275				err = json.Unmarshal(*v, &associationContractProperties)
2276				if err != nil {
2277					return err
2278				}
2279				ac.AssociationContractProperties = &associationContractProperties
2280			}
2281		case "id":
2282			if v != nil {
2283				var ID string
2284				err = json.Unmarshal(*v, &ID)
2285				if err != nil {
2286					return err
2287				}
2288				ac.ID = &ID
2289			}
2290		case "name":
2291			if v != nil {
2292				var name string
2293				err = json.Unmarshal(*v, &name)
2294				if err != nil {
2295					return err
2296				}
2297				ac.Name = &name
2298			}
2299		case "type":
2300			if v != nil {
2301				var typeVar string
2302				err = json.Unmarshal(*v, &typeVar)
2303				if err != nil {
2304					return err
2305				}
2306				ac.Type = &typeVar
2307			}
2308		}
2309	}
2310
2311	return nil
2312}
2313
2314// AssociationContractProperties association entity contract properties.
2315type AssociationContractProperties struct {
2316	// ProvisioningState - Provisioning state. Possible values include: 'Created'
2317	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2318}
2319
2320// AuthenticationSettingsContract API Authentication Settings.
2321type AuthenticationSettingsContract struct {
2322	// OAuth2 - OAuth2 Authentication settings
2323	OAuth2 *OAuth2AuthenticationSettingsContract `json:"oAuth2,omitempty"`
2324	// Openid - OpenID Connect Authentication Settings
2325	Openid *OpenIDAuthenticationSettingsContract `json:"openid,omitempty"`
2326}
2327
2328// AuthorizationServerCollection paged OAuth2 Authorization Servers list representation.
2329type AuthorizationServerCollection struct {
2330	autorest.Response `json:"-"`
2331	// Value - Page values.
2332	Value *[]AuthorizationServerContract `json:"value,omitempty"`
2333	// Count - Total record count number across all pages.
2334	Count *int64 `json:"count,omitempty"`
2335	// NextLink - Next page link if any.
2336	NextLink *string `json:"nextLink,omitempty"`
2337}
2338
2339// AuthorizationServerCollectionIterator provides access to a complete listing of
2340// AuthorizationServerContract values.
2341type AuthorizationServerCollectionIterator struct {
2342	i    int
2343	page AuthorizationServerCollectionPage
2344}
2345
2346// NextWithContext advances to the next value.  If there was an error making
2347// the request the iterator does not advance and the error is returned.
2348func (iter *AuthorizationServerCollectionIterator) NextWithContext(ctx context.Context) (err error) {
2349	if tracing.IsEnabled() {
2350		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerCollectionIterator.NextWithContext")
2351		defer func() {
2352			sc := -1
2353			if iter.Response().Response.Response != nil {
2354				sc = iter.Response().Response.Response.StatusCode
2355			}
2356			tracing.EndSpan(ctx, sc, err)
2357		}()
2358	}
2359	iter.i++
2360	if iter.i < len(iter.page.Values()) {
2361		return nil
2362	}
2363	err = iter.page.NextWithContext(ctx)
2364	if err != nil {
2365		iter.i--
2366		return err
2367	}
2368	iter.i = 0
2369	return nil
2370}
2371
2372// Next advances to the next value.  If there was an error making
2373// the request the iterator does not advance and the error is returned.
2374// Deprecated: Use NextWithContext() instead.
2375func (iter *AuthorizationServerCollectionIterator) Next() error {
2376	return iter.NextWithContext(context.Background())
2377}
2378
2379// NotDone returns true if the enumeration should be started or is not yet complete.
2380func (iter AuthorizationServerCollectionIterator) NotDone() bool {
2381	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2382}
2383
2384// Response returns the raw server response from the last page request.
2385func (iter AuthorizationServerCollectionIterator) Response() AuthorizationServerCollection {
2386	return iter.page.Response()
2387}
2388
2389// Value returns the current value or a zero-initialized value if the
2390// iterator has advanced beyond the end of the collection.
2391func (iter AuthorizationServerCollectionIterator) Value() AuthorizationServerContract {
2392	if !iter.page.NotDone() {
2393		return AuthorizationServerContract{}
2394	}
2395	return iter.page.Values()[iter.i]
2396}
2397
2398// Creates a new instance of the AuthorizationServerCollectionIterator type.
2399func NewAuthorizationServerCollectionIterator(page AuthorizationServerCollectionPage) AuthorizationServerCollectionIterator {
2400	return AuthorizationServerCollectionIterator{page: page}
2401}
2402
2403// IsEmpty returns true if the ListResult contains no values.
2404func (asc AuthorizationServerCollection) IsEmpty() bool {
2405	return asc.Value == nil || len(*asc.Value) == 0
2406}
2407
2408// authorizationServerCollectionPreparer prepares a request to retrieve the next set of results.
2409// It returns nil if no more results exist.
2410func (asc AuthorizationServerCollection) authorizationServerCollectionPreparer(ctx context.Context) (*http.Request, error) {
2411	if asc.NextLink == nil || len(to.String(asc.NextLink)) < 1 {
2412		return nil, nil
2413	}
2414	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2415		autorest.AsJSON(),
2416		autorest.AsGet(),
2417		autorest.WithBaseURL(to.String(asc.NextLink)))
2418}
2419
2420// AuthorizationServerCollectionPage contains a page of AuthorizationServerContract values.
2421type AuthorizationServerCollectionPage struct {
2422	fn  func(context.Context, AuthorizationServerCollection) (AuthorizationServerCollection, error)
2423	asc AuthorizationServerCollection
2424}
2425
2426// NextWithContext advances to the next page of values.  If there was an error making
2427// the request the page does not advance and the error is returned.
2428func (page *AuthorizationServerCollectionPage) NextWithContext(ctx context.Context) (err error) {
2429	if tracing.IsEnabled() {
2430		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerCollectionPage.NextWithContext")
2431		defer func() {
2432			sc := -1
2433			if page.Response().Response.Response != nil {
2434				sc = page.Response().Response.Response.StatusCode
2435			}
2436			tracing.EndSpan(ctx, sc, err)
2437		}()
2438	}
2439	next, err := page.fn(ctx, page.asc)
2440	if err != nil {
2441		return err
2442	}
2443	page.asc = next
2444	return nil
2445}
2446
2447// Next advances to the next page of values.  If there was an error making
2448// the request the page does not advance and the error is returned.
2449// Deprecated: Use NextWithContext() instead.
2450func (page *AuthorizationServerCollectionPage) Next() error {
2451	return page.NextWithContext(context.Background())
2452}
2453
2454// NotDone returns true if the page enumeration should be started or is not yet complete.
2455func (page AuthorizationServerCollectionPage) NotDone() bool {
2456	return !page.asc.IsEmpty()
2457}
2458
2459// Response returns the raw server response from the last page request.
2460func (page AuthorizationServerCollectionPage) Response() AuthorizationServerCollection {
2461	return page.asc
2462}
2463
2464// Values returns the slice of values for the current page or nil if there are no values.
2465func (page AuthorizationServerCollectionPage) Values() []AuthorizationServerContract {
2466	if page.asc.IsEmpty() {
2467		return nil
2468	}
2469	return *page.asc.Value
2470}
2471
2472// Creates a new instance of the AuthorizationServerCollectionPage type.
2473func NewAuthorizationServerCollectionPage(getNextPage func(context.Context, AuthorizationServerCollection) (AuthorizationServerCollection, error)) AuthorizationServerCollectionPage {
2474	return AuthorizationServerCollectionPage{fn: getNextPage}
2475}
2476
2477// AuthorizationServerContract external OAuth authorization server settings.
2478type AuthorizationServerContract struct {
2479	autorest.Response `json:"-"`
2480	// AuthorizationServerContractProperties - Properties of the External OAuth authorization server Contract.
2481	*AuthorizationServerContractProperties `json:"properties,omitempty"`
2482	// ID - READ-ONLY; Resource ID.
2483	ID *string `json:"id,omitempty"`
2484	// Name - READ-ONLY; Resource name.
2485	Name *string `json:"name,omitempty"`
2486	// Type - READ-ONLY; Resource type for API Management resource.
2487	Type *string `json:"type,omitempty"`
2488}
2489
2490// MarshalJSON is the custom marshaler for AuthorizationServerContract.
2491func (asc AuthorizationServerContract) MarshalJSON() ([]byte, error) {
2492	objectMap := make(map[string]interface{})
2493	if asc.AuthorizationServerContractProperties != nil {
2494		objectMap["properties"] = asc.AuthorizationServerContractProperties
2495	}
2496	return json.Marshal(objectMap)
2497}
2498
2499// UnmarshalJSON is the custom unmarshaler for AuthorizationServerContract struct.
2500func (asc *AuthorizationServerContract) UnmarshalJSON(body []byte) error {
2501	var m map[string]*json.RawMessage
2502	err := json.Unmarshal(body, &m)
2503	if err != nil {
2504		return err
2505	}
2506	for k, v := range m {
2507		switch k {
2508		case "properties":
2509			if v != nil {
2510				var authorizationServerContractProperties AuthorizationServerContractProperties
2511				err = json.Unmarshal(*v, &authorizationServerContractProperties)
2512				if err != nil {
2513					return err
2514				}
2515				asc.AuthorizationServerContractProperties = &authorizationServerContractProperties
2516			}
2517		case "id":
2518			if v != nil {
2519				var ID string
2520				err = json.Unmarshal(*v, &ID)
2521				if err != nil {
2522					return err
2523				}
2524				asc.ID = &ID
2525			}
2526		case "name":
2527			if v != nil {
2528				var name string
2529				err = json.Unmarshal(*v, &name)
2530				if err != nil {
2531					return err
2532				}
2533				asc.Name = &name
2534			}
2535		case "type":
2536			if v != nil {
2537				var typeVar string
2538				err = json.Unmarshal(*v, &typeVar)
2539				if err != nil {
2540					return err
2541				}
2542				asc.Type = &typeVar
2543			}
2544		}
2545	}
2546
2547	return nil
2548}
2549
2550// AuthorizationServerContractBaseProperties external OAuth authorization server Update settings contract.
2551type AuthorizationServerContractBaseProperties struct {
2552	// Description - Description of the authorization server. Can contain HTML formatting tags.
2553	Description *string `json:"description,omitempty"`
2554	// AuthorizationMethods - HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
2555	AuthorizationMethods *[]AuthorizationMethod `json:"authorizationMethods,omitempty"`
2556	// 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.
2557	ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"`
2558	// 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"}.
2559	TokenBodyParameters *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"`
2560	// TokenEndpoint - OAuth token endpoint. Contains absolute URI to entity being referenced.
2561	TokenEndpoint *string `json:"tokenEndpoint,omitempty"`
2562	// 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.
2563	SupportState *bool `json:"supportState,omitempty"`
2564	// 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.
2565	DefaultScope *string `json:"defaultScope,omitempty"`
2566	// BearerTokenSendingMethods - Specifies the mechanism by which access token is passed to the API.
2567	BearerTokenSendingMethods *[]BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"`
2568	// ResourceOwnerUsername - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
2569	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`
2570	// ResourceOwnerPassword - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
2571	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`
2572}
2573
2574// AuthorizationServerContractProperties external OAuth authorization server settings Properties.
2575type AuthorizationServerContractProperties struct {
2576	// DisplayName - User-friendly authorization server name.
2577	DisplayName *string `json:"displayName,omitempty"`
2578	// ClientRegistrationEndpoint - Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
2579	ClientRegistrationEndpoint *string `json:"clientRegistrationEndpoint,omitempty"`
2580	// AuthorizationEndpoint - OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
2581	AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty"`
2582	// GrantTypes - Form of an authorization grant, which the client uses to request the access token.
2583	GrantTypes *[]GrantType `json:"grantTypes,omitempty"`
2584	// ClientID - Client or app id registered with this authorization server.
2585	ClientID *string `json:"clientId,omitempty"`
2586	// ClientSecret - Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
2587	ClientSecret *string `json:"clientSecret,omitempty"`
2588	// Description - Description of the authorization server. Can contain HTML formatting tags.
2589	Description *string `json:"description,omitempty"`
2590	// AuthorizationMethods - HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
2591	AuthorizationMethods *[]AuthorizationMethod `json:"authorizationMethods,omitempty"`
2592	// 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.
2593	ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"`
2594	// 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"}.
2595	TokenBodyParameters *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"`
2596	// TokenEndpoint - OAuth token endpoint. Contains absolute URI to entity being referenced.
2597	TokenEndpoint *string `json:"tokenEndpoint,omitempty"`
2598	// 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.
2599	SupportState *bool `json:"supportState,omitempty"`
2600	// 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.
2601	DefaultScope *string `json:"defaultScope,omitempty"`
2602	// BearerTokenSendingMethods - Specifies the mechanism by which access token is passed to the API.
2603	BearerTokenSendingMethods *[]BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"`
2604	// ResourceOwnerUsername - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
2605	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`
2606	// ResourceOwnerPassword - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
2607	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`
2608}
2609
2610// AuthorizationServerUpdateContract external OAuth authorization server settings.
2611type AuthorizationServerUpdateContract struct {
2612	// AuthorizationServerUpdateContractProperties - Properties of the External OAuth authorization server update Contract.
2613	*AuthorizationServerUpdateContractProperties `json:"properties,omitempty"`
2614	// ID - READ-ONLY; Resource ID.
2615	ID *string `json:"id,omitempty"`
2616	// Name - READ-ONLY; Resource name.
2617	Name *string `json:"name,omitempty"`
2618	// Type - READ-ONLY; Resource type for API Management resource.
2619	Type *string `json:"type,omitempty"`
2620}
2621
2622// MarshalJSON is the custom marshaler for AuthorizationServerUpdateContract.
2623func (asuc AuthorizationServerUpdateContract) MarshalJSON() ([]byte, error) {
2624	objectMap := make(map[string]interface{})
2625	if asuc.AuthorizationServerUpdateContractProperties != nil {
2626		objectMap["properties"] = asuc.AuthorizationServerUpdateContractProperties
2627	}
2628	return json.Marshal(objectMap)
2629}
2630
2631// UnmarshalJSON is the custom unmarshaler for AuthorizationServerUpdateContract struct.
2632func (asuc *AuthorizationServerUpdateContract) UnmarshalJSON(body []byte) error {
2633	var m map[string]*json.RawMessage
2634	err := json.Unmarshal(body, &m)
2635	if err != nil {
2636		return err
2637	}
2638	for k, v := range m {
2639		switch k {
2640		case "properties":
2641			if v != nil {
2642				var authorizationServerUpdateContractProperties AuthorizationServerUpdateContractProperties
2643				err = json.Unmarshal(*v, &authorizationServerUpdateContractProperties)
2644				if err != nil {
2645					return err
2646				}
2647				asuc.AuthorizationServerUpdateContractProperties = &authorizationServerUpdateContractProperties
2648			}
2649		case "id":
2650			if v != nil {
2651				var ID string
2652				err = json.Unmarshal(*v, &ID)
2653				if err != nil {
2654					return err
2655				}
2656				asuc.ID = &ID
2657			}
2658		case "name":
2659			if v != nil {
2660				var name string
2661				err = json.Unmarshal(*v, &name)
2662				if err != nil {
2663					return err
2664				}
2665				asuc.Name = &name
2666			}
2667		case "type":
2668			if v != nil {
2669				var typeVar string
2670				err = json.Unmarshal(*v, &typeVar)
2671				if err != nil {
2672					return err
2673				}
2674				asuc.Type = &typeVar
2675			}
2676		}
2677	}
2678
2679	return nil
2680}
2681
2682// AuthorizationServerUpdateContractProperties external OAuth authorization server Update settings
2683// contract.
2684type AuthorizationServerUpdateContractProperties struct {
2685	// DisplayName - User-friendly authorization server name.
2686	DisplayName *string `json:"displayName,omitempty"`
2687	// ClientRegistrationEndpoint - Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
2688	ClientRegistrationEndpoint *string `json:"clientRegistrationEndpoint,omitempty"`
2689	// AuthorizationEndpoint - OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
2690	AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty"`
2691	// GrantTypes - Form of an authorization grant, which the client uses to request the access token.
2692	GrantTypes *[]GrantType `json:"grantTypes,omitempty"`
2693	// ClientID - Client or app id registered with this authorization server.
2694	ClientID *string `json:"clientId,omitempty"`
2695	// ClientSecret - Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
2696	ClientSecret *string `json:"clientSecret,omitempty"`
2697	// Description - Description of the authorization server. Can contain HTML formatting tags.
2698	Description *string `json:"description,omitempty"`
2699	// AuthorizationMethods - HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
2700	AuthorizationMethods *[]AuthorizationMethod `json:"authorizationMethods,omitempty"`
2701	// 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.
2702	ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"`
2703	// 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"}.
2704	TokenBodyParameters *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"`
2705	// TokenEndpoint - OAuth token endpoint. Contains absolute URI to entity being referenced.
2706	TokenEndpoint *string `json:"tokenEndpoint,omitempty"`
2707	// 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.
2708	SupportState *bool `json:"supportState,omitempty"`
2709	// 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.
2710	DefaultScope *string `json:"defaultScope,omitempty"`
2711	// BearerTokenSendingMethods - Specifies the mechanism by which access token is passed to the API.
2712	BearerTokenSendingMethods *[]BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"`
2713	// ResourceOwnerUsername - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
2714	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`
2715	// ResourceOwnerPassword - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
2716	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`
2717}
2718
2719// BackendAuthorizationHeaderCredentials authorization header information.
2720type BackendAuthorizationHeaderCredentials struct {
2721	// Scheme - Authentication Scheme name.
2722	Scheme *string `json:"scheme,omitempty"`
2723	// Parameter - Authentication Parameter value.
2724	Parameter *string `json:"parameter,omitempty"`
2725}
2726
2727// BackendBaseParameters backend entity base Parameter set.
2728type BackendBaseParameters struct {
2729	// Title - Backend Title.
2730	Title *string `json:"title,omitempty"`
2731	// Description - Backend Description.
2732	Description *string `json:"description,omitempty"`
2733	// 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.
2734	ResourceID *string `json:"resourceId,omitempty"`
2735	// Properties - Backend Properties contract
2736	Properties *BackendProperties `json:"properties,omitempty"`
2737	// Credentials - Backend Credentials Contract Properties
2738	Credentials *BackendCredentialsContract `json:"credentials,omitempty"`
2739	// Proxy - Backend Proxy Contract Properties
2740	Proxy *BackendProxyContract `json:"proxy,omitempty"`
2741	// TLS - Backend TLS Properties
2742	TLS *BackendTLSProperties `json:"tls,omitempty"`
2743}
2744
2745// BackendCollection paged Backend list representation.
2746type BackendCollection struct {
2747	autorest.Response `json:"-"`
2748	// Value - Backend values.
2749	Value *[]BackendContract `json:"value,omitempty"`
2750	// NextLink - Next page link if any.
2751	NextLink *string `json:"nextLink,omitempty"`
2752}
2753
2754// BackendCollectionIterator provides access to a complete listing of BackendContract values.
2755type BackendCollectionIterator struct {
2756	i    int
2757	page BackendCollectionPage
2758}
2759
2760// NextWithContext advances to the next value.  If there was an error making
2761// the request the iterator does not advance and the error is returned.
2762func (iter *BackendCollectionIterator) NextWithContext(ctx context.Context) (err error) {
2763	if tracing.IsEnabled() {
2764		ctx = tracing.StartSpan(ctx, fqdn+"/BackendCollectionIterator.NextWithContext")
2765		defer func() {
2766			sc := -1
2767			if iter.Response().Response.Response != nil {
2768				sc = iter.Response().Response.Response.StatusCode
2769			}
2770			tracing.EndSpan(ctx, sc, err)
2771		}()
2772	}
2773	iter.i++
2774	if iter.i < len(iter.page.Values()) {
2775		return nil
2776	}
2777	err = iter.page.NextWithContext(ctx)
2778	if err != nil {
2779		iter.i--
2780		return err
2781	}
2782	iter.i = 0
2783	return nil
2784}
2785
2786// Next advances to the next value.  If there was an error making
2787// the request the iterator does not advance and the error is returned.
2788// Deprecated: Use NextWithContext() instead.
2789func (iter *BackendCollectionIterator) Next() error {
2790	return iter.NextWithContext(context.Background())
2791}
2792
2793// NotDone returns true if the enumeration should be started or is not yet complete.
2794func (iter BackendCollectionIterator) NotDone() bool {
2795	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2796}
2797
2798// Response returns the raw server response from the last page request.
2799func (iter BackendCollectionIterator) Response() BackendCollection {
2800	return iter.page.Response()
2801}
2802
2803// Value returns the current value or a zero-initialized value if the
2804// iterator has advanced beyond the end of the collection.
2805func (iter BackendCollectionIterator) Value() BackendContract {
2806	if !iter.page.NotDone() {
2807		return BackendContract{}
2808	}
2809	return iter.page.Values()[iter.i]
2810}
2811
2812// Creates a new instance of the BackendCollectionIterator type.
2813func NewBackendCollectionIterator(page BackendCollectionPage) BackendCollectionIterator {
2814	return BackendCollectionIterator{page: page}
2815}
2816
2817// IsEmpty returns true if the ListResult contains no values.
2818func (bc BackendCollection) IsEmpty() bool {
2819	return bc.Value == nil || len(*bc.Value) == 0
2820}
2821
2822// backendCollectionPreparer prepares a request to retrieve the next set of results.
2823// It returns nil if no more results exist.
2824func (bc BackendCollection) backendCollectionPreparer(ctx context.Context) (*http.Request, error) {
2825	if bc.NextLink == nil || len(to.String(bc.NextLink)) < 1 {
2826		return nil, nil
2827	}
2828	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2829		autorest.AsJSON(),
2830		autorest.AsGet(),
2831		autorest.WithBaseURL(to.String(bc.NextLink)))
2832}
2833
2834// BackendCollectionPage contains a page of BackendContract values.
2835type BackendCollectionPage struct {
2836	fn func(context.Context, BackendCollection) (BackendCollection, error)
2837	bc BackendCollection
2838}
2839
2840// NextWithContext advances to the next page of values.  If there was an error making
2841// the request the page does not advance and the error is returned.
2842func (page *BackendCollectionPage) NextWithContext(ctx context.Context) (err error) {
2843	if tracing.IsEnabled() {
2844		ctx = tracing.StartSpan(ctx, fqdn+"/BackendCollectionPage.NextWithContext")
2845		defer func() {
2846			sc := -1
2847			if page.Response().Response.Response != nil {
2848				sc = page.Response().Response.Response.StatusCode
2849			}
2850			tracing.EndSpan(ctx, sc, err)
2851		}()
2852	}
2853	next, err := page.fn(ctx, page.bc)
2854	if err != nil {
2855		return err
2856	}
2857	page.bc = next
2858	return nil
2859}
2860
2861// Next advances to the next page of values.  If there was an error making
2862// the request the page does not advance and the error is returned.
2863// Deprecated: Use NextWithContext() instead.
2864func (page *BackendCollectionPage) Next() error {
2865	return page.NextWithContext(context.Background())
2866}
2867
2868// NotDone returns true if the page enumeration should be started or is not yet complete.
2869func (page BackendCollectionPage) NotDone() bool {
2870	return !page.bc.IsEmpty()
2871}
2872
2873// Response returns the raw server response from the last page request.
2874func (page BackendCollectionPage) Response() BackendCollection {
2875	return page.bc
2876}
2877
2878// Values returns the slice of values for the current page or nil if there are no values.
2879func (page BackendCollectionPage) Values() []BackendContract {
2880	if page.bc.IsEmpty() {
2881		return nil
2882	}
2883	return *page.bc.Value
2884}
2885
2886// Creates a new instance of the BackendCollectionPage type.
2887func NewBackendCollectionPage(getNextPage func(context.Context, BackendCollection) (BackendCollection, error)) BackendCollectionPage {
2888	return BackendCollectionPage{fn: getNextPage}
2889}
2890
2891// BackendContract backend details.
2892type BackendContract struct {
2893	autorest.Response `json:"-"`
2894	// BackendContractProperties - Backend entity contract properties.
2895	*BackendContractProperties `json:"properties,omitempty"`
2896	// ID - READ-ONLY; Resource ID.
2897	ID *string `json:"id,omitempty"`
2898	// Name - READ-ONLY; Resource name.
2899	Name *string `json:"name,omitempty"`
2900	// Type - READ-ONLY; Resource type for API Management resource.
2901	Type *string `json:"type,omitempty"`
2902}
2903
2904// MarshalJSON is the custom marshaler for BackendContract.
2905func (bc BackendContract) MarshalJSON() ([]byte, error) {
2906	objectMap := make(map[string]interface{})
2907	if bc.BackendContractProperties != nil {
2908		objectMap["properties"] = bc.BackendContractProperties
2909	}
2910	return json.Marshal(objectMap)
2911}
2912
2913// UnmarshalJSON is the custom unmarshaler for BackendContract struct.
2914func (bc *BackendContract) UnmarshalJSON(body []byte) error {
2915	var m map[string]*json.RawMessage
2916	err := json.Unmarshal(body, &m)
2917	if err != nil {
2918		return err
2919	}
2920	for k, v := range m {
2921		switch k {
2922		case "properties":
2923			if v != nil {
2924				var backendContractProperties BackendContractProperties
2925				err = json.Unmarshal(*v, &backendContractProperties)
2926				if err != nil {
2927					return err
2928				}
2929				bc.BackendContractProperties = &backendContractProperties
2930			}
2931		case "id":
2932			if v != nil {
2933				var ID string
2934				err = json.Unmarshal(*v, &ID)
2935				if err != nil {
2936					return err
2937				}
2938				bc.ID = &ID
2939			}
2940		case "name":
2941			if v != nil {
2942				var name string
2943				err = json.Unmarshal(*v, &name)
2944				if err != nil {
2945					return err
2946				}
2947				bc.Name = &name
2948			}
2949		case "type":
2950			if v != nil {
2951				var typeVar string
2952				err = json.Unmarshal(*v, &typeVar)
2953				if err != nil {
2954					return err
2955				}
2956				bc.Type = &typeVar
2957			}
2958		}
2959	}
2960
2961	return nil
2962}
2963
2964// BackendContractProperties parameters supplied to the Create Backend operation.
2965type BackendContractProperties struct {
2966	// URL - Runtime Url of the Backend.
2967	URL *string `json:"url,omitempty"`
2968	// Protocol - Backend communication protocol. Possible values include: 'BackendProtocolHTTP', 'BackendProtocolSoap'
2969	Protocol BackendProtocol `json:"protocol,omitempty"`
2970	// Title - Backend Title.
2971	Title *string `json:"title,omitempty"`
2972	// Description - Backend Description.
2973	Description *string `json:"description,omitempty"`
2974	// 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.
2975	ResourceID *string `json:"resourceId,omitempty"`
2976	// Properties - Backend Properties contract
2977	Properties *BackendProperties `json:"properties,omitempty"`
2978	// Credentials - Backend Credentials Contract Properties
2979	Credentials *BackendCredentialsContract `json:"credentials,omitempty"`
2980	// Proxy - Backend Proxy Contract Properties
2981	Proxy *BackendProxyContract `json:"proxy,omitempty"`
2982	// TLS - Backend TLS Properties
2983	TLS *BackendTLSProperties `json:"tls,omitempty"`
2984}
2985
2986// BackendCredentialsContract details of the Credentials used to connect to Backend.
2987type BackendCredentialsContract struct {
2988	// Certificate - List of Client Certificate Thumbprint.
2989	Certificate *[]string `json:"certificate,omitempty"`
2990	// Query - Query Parameter description.
2991	Query map[string][]string `json:"query"`
2992	// Header - Header Parameter description.
2993	Header map[string][]string `json:"header"`
2994	// Authorization - Authorization header authentication
2995	Authorization *BackendAuthorizationHeaderCredentials `json:"authorization,omitempty"`
2996}
2997
2998// MarshalJSON is the custom marshaler for BackendCredentialsContract.
2999func (bcc BackendCredentialsContract) MarshalJSON() ([]byte, error) {
3000	objectMap := make(map[string]interface{})
3001	if bcc.Certificate != nil {
3002		objectMap["certificate"] = bcc.Certificate
3003	}
3004	if bcc.Query != nil {
3005		objectMap["query"] = bcc.Query
3006	}
3007	if bcc.Header != nil {
3008		objectMap["header"] = bcc.Header
3009	}
3010	if bcc.Authorization != nil {
3011		objectMap["authorization"] = bcc.Authorization
3012	}
3013	return json.Marshal(objectMap)
3014}
3015
3016// BackendProperties properties specific to the Backend Type.
3017type BackendProperties struct {
3018	// ServiceFabricCluster - Backend Service Fabric Cluster Properties
3019	ServiceFabricCluster *BackendServiceFabricClusterProperties `json:"serviceFabricCluster,omitempty"`
3020}
3021
3022// BackendProxyContract details of the Backend WebProxy Server to use in the Request to Backend.
3023type BackendProxyContract struct {
3024	// URL - WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings.
3025	URL *string `json:"url,omitempty"`
3026	// Username - Username to connect to the WebProxy server
3027	Username *string `json:"username,omitempty"`
3028	// Password - Password to connect to the WebProxy Server
3029	Password *string `json:"password,omitempty"`
3030}
3031
3032// BackendReconnectContract reconnect request parameters.
3033type BackendReconnectContract struct {
3034	// BackendReconnectProperties - Reconnect request properties.
3035	*BackendReconnectProperties `json:"properties,omitempty"`
3036	// ID - READ-ONLY; Resource ID.
3037	ID *string `json:"id,omitempty"`
3038	// Name - READ-ONLY; Resource name.
3039	Name *string `json:"name,omitempty"`
3040	// Type - READ-ONLY; Resource type for API Management resource.
3041	Type *string `json:"type,omitempty"`
3042}
3043
3044// MarshalJSON is the custom marshaler for BackendReconnectContract.
3045func (brc BackendReconnectContract) MarshalJSON() ([]byte, error) {
3046	objectMap := make(map[string]interface{})
3047	if brc.BackendReconnectProperties != nil {
3048		objectMap["properties"] = brc.BackendReconnectProperties
3049	}
3050	return json.Marshal(objectMap)
3051}
3052
3053// UnmarshalJSON is the custom unmarshaler for BackendReconnectContract struct.
3054func (brc *BackendReconnectContract) UnmarshalJSON(body []byte) error {
3055	var m map[string]*json.RawMessage
3056	err := json.Unmarshal(body, &m)
3057	if err != nil {
3058		return err
3059	}
3060	for k, v := range m {
3061		switch k {
3062		case "properties":
3063			if v != nil {
3064				var backendReconnectProperties BackendReconnectProperties
3065				err = json.Unmarshal(*v, &backendReconnectProperties)
3066				if err != nil {
3067					return err
3068				}
3069				brc.BackendReconnectProperties = &backendReconnectProperties
3070			}
3071		case "id":
3072			if v != nil {
3073				var ID string
3074				err = json.Unmarshal(*v, &ID)
3075				if err != nil {
3076					return err
3077				}
3078				brc.ID = &ID
3079			}
3080		case "name":
3081			if v != nil {
3082				var name string
3083				err = json.Unmarshal(*v, &name)
3084				if err != nil {
3085					return err
3086				}
3087				brc.Name = &name
3088			}
3089		case "type":
3090			if v != nil {
3091				var typeVar string
3092				err = json.Unmarshal(*v, &typeVar)
3093				if err != nil {
3094					return err
3095				}
3096				brc.Type = &typeVar
3097			}
3098		}
3099	}
3100
3101	return nil
3102}
3103
3104// BackendReconnectProperties properties to control reconnect requests.
3105type BackendReconnectProperties struct {
3106	// After - Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M.
3107	After *string `json:"after,omitempty"`
3108}
3109
3110// BackendServiceFabricClusterProperties properties of the Service Fabric Type Backend.
3111type BackendServiceFabricClusterProperties struct {
3112	// ClientCertificatethumbprint - The client certificate thumbprint for the management endpoint.
3113	ClientCertificatethumbprint *string `json:"clientCertificatethumbprint,omitempty"`
3114	// MaxPartitionResolutionRetries - Maximum number of retries while attempting resolve the partition.
3115	MaxPartitionResolutionRetries *int32 `json:"maxPartitionResolutionRetries,omitempty"`
3116	// ManagementEndpoints - The cluster management endpoint.
3117	ManagementEndpoints *[]string `json:"managementEndpoints,omitempty"`
3118	// ServerCertificateThumbprints - Thumbprints of certificates cluster management service uses for tls communication
3119	ServerCertificateThumbprints *[]string `json:"serverCertificateThumbprints,omitempty"`
3120	// ServerX509Names - Server X509 Certificate Names Collection
3121	ServerX509Names *[]X509CertificateName `json:"serverX509Names,omitempty"`
3122}
3123
3124// BackendTLSProperties properties controlling TLS Certificate Validation.
3125type BackendTLSProperties struct {
3126	// ValidateCertificateChain - Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host.
3127	ValidateCertificateChain *bool `json:"validateCertificateChain,omitempty"`
3128	// ValidateCertificateName - Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host.
3129	ValidateCertificateName *bool `json:"validateCertificateName,omitempty"`
3130}
3131
3132// BackendUpdateParameterProperties parameters supplied to the Update Backend operation.
3133type BackendUpdateParameterProperties struct {
3134	// URL - Runtime Url of the Backend.
3135	URL *string `json:"url,omitempty"`
3136	// Protocol - Backend communication protocol. Possible values include: 'BackendProtocolHTTP', 'BackendProtocolSoap'
3137	Protocol BackendProtocol `json:"protocol,omitempty"`
3138	// Title - Backend Title.
3139	Title *string `json:"title,omitempty"`
3140	// Description - Backend Description.
3141	Description *string `json:"description,omitempty"`
3142	// 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.
3143	ResourceID *string `json:"resourceId,omitempty"`
3144	// Properties - Backend Properties contract
3145	Properties *BackendProperties `json:"properties,omitempty"`
3146	// Credentials - Backend Credentials Contract Properties
3147	Credentials *BackendCredentialsContract `json:"credentials,omitempty"`
3148	// Proxy - Backend Proxy Contract Properties
3149	Proxy *BackendProxyContract `json:"proxy,omitempty"`
3150	// TLS - Backend TLS Properties
3151	TLS *BackendTLSProperties `json:"tls,omitempty"`
3152}
3153
3154// BackendUpdateParameters backend update parameters.
3155type BackendUpdateParameters struct {
3156	// BackendUpdateParameterProperties - Backend entity update contract properties.
3157	*BackendUpdateParameterProperties `json:"properties,omitempty"`
3158}
3159
3160// MarshalJSON is the custom marshaler for BackendUpdateParameters.
3161func (bup BackendUpdateParameters) MarshalJSON() ([]byte, error) {
3162	objectMap := make(map[string]interface{})
3163	if bup.BackendUpdateParameterProperties != nil {
3164		objectMap["properties"] = bup.BackendUpdateParameterProperties
3165	}
3166	return json.Marshal(objectMap)
3167}
3168
3169// UnmarshalJSON is the custom unmarshaler for BackendUpdateParameters struct.
3170func (bup *BackendUpdateParameters) UnmarshalJSON(body []byte) error {
3171	var m map[string]*json.RawMessage
3172	err := json.Unmarshal(body, &m)
3173	if err != nil {
3174		return err
3175	}
3176	for k, v := range m {
3177		switch k {
3178		case "properties":
3179			if v != nil {
3180				var backendUpdateParameterProperties BackendUpdateParameterProperties
3181				err = json.Unmarshal(*v, &backendUpdateParameterProperties)
3182				if err != nil {
3183					return err
3184				}
3185				bup.BackendUpdateParameterProperties = &backendUpdateParameterProperties
3186			}
3187		}
3188	}
3189
3190	return nil
3191}
3192
3193// BodyDiagnosticSettings body logging settings.
3194type BodyDiagnosticSettings struct {
3195	// Bytes - Number of request body bytes to log.
3196	Bytes *int32 `json:"bytes,omitempty"`
3197}
3198
3199// CacheCollection paged Caches list representation.
3200type CacheCollection struct {
3201	autorest.Response `json:"-"`
3202	// Value - Page values.
3203	Value *[]CacheContract `json:"value,omitempty"`
3204	// NextLink - Next page link if any.
3205	NextLink *string `json:"nextLink,omitempty"`
3206}
3207
3208// CacheCollectionIterator provides access to a complete listing of CacheContract values.
3209type CacheCollectionIterator struct {
3210	i    int
3211	page CacheCollectionPage
3212}
3213
3214// NextWithContext advances to the next value.  If there was an error making
3215// the request the iterator does not advance and the error is returned.
3216func (iter *CacheCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3217	if tracing.IsEnabled() {
3218		ctx = tracing.StartSpan(ctx, fqdn+"/CacheCollectionIterator.NextWithContext")
3219		defer func() {
3220			sc := -1
3221			if iter.Response().Response.Response != nil {
3222				sc = iter.Response().Response.Response.StatusCode
3223			}
3224			tracing.EndSpan(ctx, sc, err)
3225		}()
3226	}
3227	iter.i++
3228	if iter.i < len(iter.page.Values()) {
3229		return nil
3230	}
3231	err = iter.page.NextWithContext(ctx)
3232	if err != nil {
3233		iter.i--
3234		return err
3235	}
3236	iter.i = 0
3237	return nil
3238}
3239
3240// Next advances to the next value.  If there was an error making
3241// the request the iterator does not advance and the error is returned.
3242// Deprecated: Use NextWithContext() instead.
3243func (iter *CacheCollectionIterator) Next() error {
3244	return iter.NextWithContext(context.Background())
3245}
3246
3247// NotDone returns true if the enumeration should be started or is not yet complete.
3248func (iter CacheCollectionIterator) NotDone() bool {
3249	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3250}
3251
3252// Response returns the raw server response from the last page request.
3253func (iter CacheCollectionIterator) Response() CacheCollection {
3254	return iter.page.Response()
3255}
3256
3257// Value returns the current value or a zero-initialized value if the
3258// iterator has advanced beyond the end of the collection.
3259func (iter CacheCollectionIterator) Value() CacheContract {
3260	if !iter.page.NotDone() {
3261		return CacheContract{}
3262	}
3263	return iter.page.Values()[iter.i]
3264}
3265
3266// Creates a new instance of the CacheCollectionIterator type.
3267func NewCacheCollectionIterator(page CacheCollectionPage) CacheCollectionIterator {
3268	return CacheCollectionIterator{page: page}
3269}
3270
3271// IsEmpty returns true if the ListResult contains no values.
3272func (cc CacheCollection) IsEmpty() bool {
3273	return cc.Value == nil || len(*cc.Value) == 0
3274}
3275
3276// cacheCollectionPreparer prepares a request to retrieve the next set of results.
3277// It returns nil if no more results exist.
3278func (cc CacheCollection) cacheCollectionPreparer(ctx context.Context) (*http.Request, error) {
3279	if cc.NextLink == nil || len(to.String(cc.NextLink)) < 1 {
3280		return nil, nil
3281	}
3282	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3283		autorest.AsJSON(),
3284		autorest.AsGet(),
3285		autorest.WithBaseURL(to.String(cc.NextLink)))
3286}
3287
3288// CacheCollectionPage contains a page of CacheContract values.
3289type CacheCollectionPage struct {
3290	fn func(context.Context, CacheCollection) (CacheCollection, error)
3291	cc CacheCollection
3292}
3293
3294// NextWithContext advances to the next page of values.  If there was an error making
3295// the request the page does not advance and the error is returned.
3296func (page *CacheCollectionPage) NextWithContext(ctx context.Context) (err error) {
3297	if tracing.IsEnabled() {
3298		ctx = tracing.StartSpan(ctx, fqdn+"/CacheCollectionPage.NextWithContext")
3299		defer func() {
3300			sc := -1
3301			if page.Response().Response.Response != nil {
3302				sc = page.Response().Response.Response.StatusCode
3303			}
3304			tracing.EndSpan(ctx, sc, err)
3305		}()
3306	}
3307	next, err := page.fn(ctx, page.cc)
3308	if err != nil {
3309		return err
3310	}
3311	page.cc = next
3312	return nil
3313}
3314
3315// Next advances to the next page of values.  If there was an error making
3316// the request the page does not advance and the error is returned.
3317// Deprecated: Use NextWithContext() instead.
3318func (page *CacheCollectionPage) Next() error {
3319	return page.NextWithContext(context.Background())
3320}
3321
3322// NotDone returns true if the page enumeration should be started or is not yet complete.
3323func (page CacheCollectionPage) NotDone() bool {
3324	return !page.cc.IsEmpty()
3325}
3326
3327// Response returns the raw server response from the last page request.
3328func (page CacheCollectionPage) Response() CacheCollection {
3329	return page.cc
3330}
3331
3332// Values returns the slice of values for the current page or nil if there are no values.
3333func (page CacheCollectionPage) Values() []CacheContract {
3334	if page.cc.IsEmpty() {
3335		return nil
3336	}
3337	return *page.cc.Value
3338}
3339
3340// Creates a new instance of the CacheCollectionPage type.
3341func NewCacheCollectionPage(getNextPage func(context.Context, CacheCollection) (CacheCollection, error)) CacheCollectionPage {
3342	return CacheCollectionPage{fn: getNextPage}
3343}
3344
3345// CacheContract cache details.
3346type CacheContract struct {
3347	autorest.Response `json:"-"`
3348	// CacheContractProperties - Cache properties details.
3349	*CacheContractProperties `json:"properties,omitempty"`
3350	// ID - READ-ONLY; Resource ID.
3351	ID *string `json:"id,omitempty"`
3352	// Name - READ-ONLY; Resource name.
3353	Name *string `json:"name,omitempty"`
3354	// Type - READ-ONLY; Resource type for API Management resource.
3355	Type *string `json:"type,omitempty"`
3356}
3357
3358// MarshalJSON is the custom marshaler for CacheContract.
3359func (cc CacheContract) MarshalJSON() ([]byte, error) {
3360	objectMap := make(map[string]interface{})
3361	if cc.CacheContractProperties != nil {
3362		objectMap["properties"] = cc.CacheContractProperties
3363	}
3364	return json.Marshal(objectMap)
3365}
3366
3367// UnmarshalJSON is the custom unmarshaler for CacheContract struct.
3368func (cc *CacheContract) UnmarshalJSON(body []byte) error {
3369	var m map[string]*json.RawMessage
3370	err := json.Unmarshal(body, &m)
3371	if err != nil {
3372		return err
3373	}
3374	for k, v := range m {
3375		switch k {
3376		case "properties":
3377			if v != nil {
3378				var cacheContractProperties CacheContractProperties
3379				err = json.Unmarshal(*v, &cacheContractProperties)
3380				if err != nil {
3381					return err
3382				}
3383				cc.CacheContractProperties = &cacheContractProperties
3384			}
3385		case "id":
3386			if v != nil {
3387				var ID string
3388				err = json.Unmarshal(*v, &ID)
3389				if err != nil {
3390					return err
3391				}
3392				cc.ID = &ID
3393			}
3394		case "name":
3395			if v != nil {
3396				var name string
3397				err = json.Unmarshal(*v, &name)
3398				if err != nil {
3399					return err
3400				}
3401				cc.Name = &name
3402			}
3403		case "type":
3404			if v != nil {
3405				var typeVar string
3406				err = json.Unmarshal(*v, &typeVar)
3407				if err != nil {
3408					return err
3409				}
3410				cc.Type = &typeVar
3411			}
3412		}
3413	}
3414
3415	return nil
3416}
3417
3418// CacheContractProperties properties of the Cache contract.
3419type CacheContractProperties struct {
3420	// Description - Cache description
3421	Description *string `json:"description,omitempty"`
3422	// ConnectionString - Runtime connection string to cache
3423	ConnectionString *string `json:"connectionString,omitempty"`
3424	// ResourceID - Original uri of entity in external system cache points to
3425	ResourceID *string `json:"resourceId,omitempty"`
3426}
3427
3428// CacheUpdateParameters cache update details.
3429type CacheUpdateParameters struct {
3430	// CacheUpdateProperties - Cache update properties details.
3431	*CacheUpdateProperties `json:"properties,omitempty"`
3432}
3433
3434// MarshalJSON is the custom marshaler for CacheUpdateParameters.
3435func (cup CacheUpdateParameters) MarshalJSON() ([]byte, error) {
3436	objectMap := make(map[string]interface{})
3437	if cup.CacheUpdateProperties != nil {
3438		objectMap["properties"] = cup.CacheUpdateProperties
3439	}
3440	return json.Marshal(objectMap)
3441}
3442
3443// UnmarshalJSON is the custom unmarshaler for CacheUpdateParameters struct.
3444func (cup *CacheUpdateParameters) UnmarshalJSON(body []byte) error {
3445	var m map[string]*json.RawMessage
3446	err := json.Unmarshal(body, &m)
3447	if err != nil {
3448		return err
3449	}
3450	for k, v := range m {
3451		switch k {
3452		case "properties":
3453			if v != nil {
3454				var cacheUpdateProperties CacheUpdateProperties
3455				err = json.Unmarshal(*v, &cacheUpdateProperties)
3456				if err != nil {
3457					return err
3458				}
3459				cup.CacheUpdateProperties = &cacheUpdateProperties
3460			}
3461		}
3462	}
3463
3464	return nil
3465}
3466
3467// CacheUpdateProperties parameters supplied to the Update Cache operation.
3468type CacheUpdateProperties struct {
3469	// Description - Cache description
3470	Description *string `json:"description,omitempty"`
3471	// ConnectionString - Runtime connection string to cache
3472	ConnectionString *string `json:"connectionString,omitempty"`
3473	// ResourceID - Original uri of entity in external system cache points to
3474	ResourceID *string `json:"resourceId,omitempty"`
3475}
3476
3477// CertificateCollection paged Certificates list representation.
3478type CertificateCollection struct {
3479	autorest.Response `json:"-"`
3480	// Value - Page values.
3481	Value *[]CertificateContract `json:"value,omitempty"`
3482	// NextLink - Next page link if any.
3483	NextLink *string `json:"nextLink,omitempty"`
3484}
3485
3486// CertificateCollectionIterator provides access to a complete listing of CertificateContract values.
3487type CertificateCollectionIterator struct {
3488	i    int
3489	page CertificateCollectionPage
3490}
3491
3492// NextWithContext advances to the next value.  If there was an error making
3493// the request the iterator does not advance and the error is returned.
3494func (iter *CertificateCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3495	if tracing.IsEnabled() {
3496		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionIterator.NextWithContext")
3497		defer func() {
3498			sc := -1
3499			if iter.Response().Response.Response != nil {
3500				sc = iter.Response().Response.Response.StatusCode
3501			}
3502			tracing.EndSpan(ctx, sc, err)
3503		}()
3504	}
3505	iter.i++
3506	if iter.i < len(iter.page.Values()) {
3507		return nil
3508	}
3509	err = iter.page.NextWithContext(ctx)
3510	if err != nil {
3511		iter.i--
3512		return err
3513	}
3514	iter.i = 0
3515	return nil
3516}
3517
3518// Next advances to the next value.  If there was an error making
3519// the request the iterator does not advance and the error is returned.
3520// Deprecated: Use NextWithContext() instead.
3521func (iter *CertificateCollectionIterator) Next() error {
3522	return iter.NextWithContext(context.Background())
3523}
3524
3525// NotDone returns true if the enumeration should be started or is not yet complete.
3526func (iter CertificateCollectionIterator) NotDone() bool {
3527	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3528}
3529
3530// Response returns the raw server response from the last page request.
3531func (iter CertificateCollectionIterator) Response() CertificateCollection {
3532	return iter.page.Response()
3533}
3534
3535// Value returns the current value or a zero-initialized value if the
3536// iterator has advanced beyond the end of the collection.
3537func (iter CertificateCollectionIterator) Value() CertificateContract {
3538	if !iter.page.NotDone() {
3539		return CertificateContract{}
3540	}
3541	return iter.page.Values()[iter.i]
3542}
3543
3544// Creates a new instance of the CertificateCollectionIterator type.
3545func NewCertificateCollectionIterator(page CertificateCollectionPage) CertificateCollectionIterator {
3546	return CertificateCollectionIterator{page: page}
3547}
3548
3549// IsEmpty returns true if the ListResult contains no values.
3550func (cc CertificateCollection) IsEmpty() bool {
3551	return cc.Value == nil || len(*cc.Value) == 0
3552}
3553
3554// certificateCollectionPreparer prepares a request to retrieve the next set of results.
3555// It returns nil if no more results exist.
3556func (cc CertificateCollection) certificateCollectionPreparer(ctx context.Context) (*http.Request, error) {
3557	if cc.NextLink == nil || len(to.String(cc.NextLink)) < 1 {
3558		return nil, nil
3559	}
3560	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3561		autorest.AsJSON(),
3562		autorest.AsGet(),
3563		autorest.WithBaseURL(to.String(cc.NextLink)))
3564}
3565
3566// CertificateCollectionPage contains a page of CertificateContract values.
3567type CertificateCollectionPage struct {
3568	fn func(context.Context, CertificateCollection) (CertificateCollection, error)
3569	cc CertificateCollection
3570}
3571
3572// NextWithContext advances to the next page of values.  If there was an error making
3573// the request the page does not advance and the error is returned.
3574func (page *CertificateCollectionPage) NextWithContext(ctx context.Context) (err error) {
3575	if tracing.IsEnabled() {
3576		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionPage.NextWithContext")
3577		defer func() {
3578			sc := -1
3579			if page.Response().Response.Response != nil {
3580				sc = page.Response().Response.Response.StatusCode
3581			}
3582			tracing.EndSpan(ctx, sc, err)
3583		}()
3584	}
3585	next, err := page.fn(ctx, page.cc)
3586	if err != nil {
3587		return err
3588	}
3589	page.cc = next
3590	return nil
3591}
3592
3593// Next advances to the next page of values.  If there was an error making
3594// the request the page does not advance and the error is returned.
3595// Deprecated: Use NextWithContext() instead.
3596func (page *CertificateCollectionPage) Next() error {
3597	return page.NextWithContext(context.Background())
3598}
3599
3600// NotDone returns true if the page enumeration should be started or is not yet complete.
3601func (page CertificateCollectionPage) NotDone() bool {
3602	return !page.cc.IsEmpty()
3603}
3604
3605// Response returns the raw server response from the last page request.
3606func (page CertificateCollectionPage) Response() CertificateCollection {
3607	return page.cc
3608}
3609
3610// Values returns the slice of values for the current page or nil if there are no values.
3611func (page CertificateCollectionPage) Values() []CertificateContract {
3612	if page.cc.IsEmpty() {
3613		return nil
3614	}
3615	return *page.cc.Value
3616}
3617
3618// Creates a new instance of the CertificateCollectionPage type.
3619func NewCertificateCollectionPage(getNextPage func(context.Context, CertificateCollection) (CertificateCollection, error)) CertificateCollectionPage {
3620	return CertificateCollectionPage{fn: getNextPage}
3621}
3622
3623// CertificateConfiguration certificate configuration which consist of non-trusted intermediates and root
3624// certificates.
3625type CertificateConfiguration struct {
3626	// EncodedCertificate - Base64 Encoded certificate.
3627	EncodedCertificate *string `json:"encodedCertificate,omitempty"`
3628	// CertificatePassword - Certificate Password.
3629	CertificatePassword *string `json:"certificatePassword,omitempty"`
3630	// StoreName - The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. Possible values include: 'CertificateAuthority', 'Root'
3631	StoreName StoreName `json:"storeName,omitempty"`
3632	// Certificate - Certificate information.
3633	Certificate *CertificateInformation `json:"certificate,omitempty"`
3634}
3635
3636// CertificateContract certificate details.
3637type CertificateContract struct {
3638	autorest.Response `json:"-"`
3639	// CertificateContractProperties - Certificate properties details.
3640	*CertificateContractProperties `json:"properties,omitempty"`
3641	// ID - READ-ONLY; Resource ID.
3642	ID *string `json:"id,omitempty"`
3643	// Name - READ-ONLY; Resource name.
3644	Name *string `json:"name,omitempty"`
3645	// Type - READ-ONLY; Resource type for API Management resource.
3646	Type *string `json:"type,omitempty"`
3647}
3648
3649// MarshalJSON is the custom marshaler for CertificateContract.
3650func (cc CertificateContract) MarshalJSON() ([]byte, error) {
3651	objectMap := make(map[string]interface{})
3652	if cc.CertificateContractProperties != nil {
3653		objectMap["properties"] = cc.CertificateContractProperties
3654	}
3655	return json.Marshal(objectMap)
3656}
3657
3658// UnmarshalJSON is the custom unmarshaler for CertificateContract struct.
3659func (cc *CertificateContract) UnmarshalJSON(body []byte) error {
3660	var m map[string]*json.RawMessage
3661	err := json.Unmarshal(body, &m)
3662	if err != nil {
3663		return err
3664	}
3665	for k, v := range m {
3666		switch k {
3667		case "properties":
3668			if v != nil {
3669				var certificateContractProperties CertificateContractProperties
3670				err = json.Unmarshal(*v, &certificateContractProperties)
3671				if err != nil {
3672					return err
3673				}
3674				cc.CertificateContractProperties = &certificateContractProperties
3675			}
3676		case "id":
3677			if v != nil {
3678				var ID string
3679				err = json.Unmarshal(*v, &ID)
3680				if err != nil {
3681					return err
3682				}
3683				cc.ID = &ID
3684			}
3685		case "name":
3686			if v != nil {
3687				var name string
3688				err = json.Unmarshal(*v, &name)
3689				if err != nil {
3690					return err
3691				}
3692				cc.Name = &name
3693			}
3694		case "type":
3695			if v != nil {
3696				var typeVar string
3697				err = json.Unmarshal(*v, &typeVar)
3698				if err != nil {
3699					return err
3700				}
3701				cc.Type = &typeVar
3702			}
3703		}
3704	}
3705
3706	return nil
3707}
3708
3709// CertificateContractProperties properties of the Certificate contract.
3710type CertificateContractProperties struct {
3711	// Subject - Subject attribute of the certificate.
3712	Subject *string `json:"subject,omitempty"`
3713	// Thumbprint - Thumbprint of the certificate.
3714	Thumbprint *string `json:"thumbprint,omitempty"`
3715	// 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.
3716	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
3717}
3718
3719// CertificateCreateOrUpdateParameters certificate create or update details.
3720type CertificateCreateOrUpdateParameters struct {
3721	// CertificateCreateOrUpdateProperties - Certificate create or update properties details.
3722	*CertificateCreateOrUpdateProperties `json:"properties,omitempty"`
3723}
3724
3725// MarshalJSON is the custom marshaler for CertificateCreateOrUpdateParameters.
3726func (ccoup CertificateCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
3727	objectMap := make(map[string]interface{})
3728	if ccoup.CertificateCreateOrUpdateProperties != nil {
3729		objectMap["properties"] = ccoup.CertificateCreateOrUpdateProperties
3730	}
3731	return json.Marshal(objectMap)
3732}
3733
3734// UnmarshalJSON is the custom unmarshaler for CertificateCreateOrUpdateParameters struct.
3735func (ccoup *CertificateCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
3736	var m map[string]*json.RawMessage
3737	err := json.Unmarshal(body, &m)
3738	if err != nil {
3739		return err
3740	}
3741	for k, v := range m {
3742		switch k {
3743		case "properties":
3744			if v != nil {
3745				var certificateCreateOrUpdateProperties CertificateCreateOrUpdateProperties
3746				err = json.Unmarshal(*v, &certificateCreateOrUpdateProperties)
3747				if err != nil {
3748					return err
3749				}
3750				ccoup.CertificateCreateOrUpdateProperties = &certificateCreateOrUpdateProperties
3751			}
3752		}
3753	}
3754
3755	return nil
3756}
3757
3758// CertificateCreateOrUpdateProperties parameters supplied to the CreateOrUpdate certificate operation.
3759type CertificateCreateOrUpdateProperties struct {
3760	// Data - Base 64 encoded certificate using the application/x-pkcs12 representation.
3761	Data *string `json:"data,omitempty"`
3762	// Password - Password for the Certificate
3763	Password *string `json:"password,omitempty"`
3764}
3765
3766// CertificateInformation SSL certificate information.
3767type CertificateInformation struct {
3768	// Expiry - Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
3769	Expiry *date.Time `json:"expiry,omitempty"`
3770	// Thumbprint - Thumbprint of the certificate.
3771	Thumbprint *string `json:"thumbprint,omitempty"`
3772	// Subject - Subject of the certificate.
3773	Subject *string `json:"subject,omitempty"`
3774}
3775
3776// ClientSecretContract client or app secret used in IdentityProviders, Aad, OpenID or OAuth.
3777type ClientSecretContract struct {
3778	autorest.Response `json:"-"`
3779	// ClientSecret - Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.
3780	ClientSecret *string `json:"clientSecret,omitempty"`
3781}
3782
3783// ConnectivityStatusContract details about connectivity to a resource.
3784type ConnectivityStatusContract struct {
3785	// Name - The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon.
3786	Name *string `json:"name,omitempty"`
3787	// Status - Resource Connectivity Status Type identifier. Possible values include: 'Initializing', 'Success', 'Failure'
3788	Status ConnectivityStatusType `json:"status,omitempty"`
3789	// Error - Error details of the connectivity to the resource.
3790	Error *string `json:"error,omitempty"`
3791	// LastUpdated - The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
3792	LastUpdated *date.Time `json:"lastUpdated,omitempty"`
3793	// LastStatusChange - The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
3794	LastStatusChange *date.Time `json:"lastStatusChange,omitempty"`
3795}
3796
3797// DeployConfigurationParameterProperties parameters supplied to the Deploy Configuration operation.
3798type DeployConfigurationParameterProperties struct {
3799	// Branch - The name of the Git branch from which the configuration is to be deployed to the configuration database.
3800	Branch *string `json:"branch,omitempty"`
3801	// Force - The value enforcing deleting subscriptions to products that are deleted in this update.
3802	Force *bool `json:"force,omitempty"`
3803}
3804
3805// DeployConfigurationParameters deploy Tenant Configuration Contract.
3806type DeployConfigurationParameters struct {
3807	// DeployConfigurationParameterProperties - Deploy Configuration Parameter contract properties.
3808	*DeployConfigurationParameterProperties `json:"properties,omitempty"`
3809}
3810
3811// MarshalJSON is the custom marshaler for DeployConfigurationParameters.
3812func (dcp DeployConfigurationParameters) MarshalJSON() ([]byte, error) {
3813	objectMap := make(map[string]interface{})
3814	if dcp.DeployConfigurationParameterProperties != nil {
3815		objectMap["properties"] = dcp.DeployConfigurationParameterProperties
3816	}
3817	return json.Marshal(objectMap)
3818}
3819
3820// UnmarshalJSON is the custom unmarshaler for DeployConfigurationParameters struct.
3821func (dcp *DeployConfigurationParameters) UnmarshalJSON(body []byte) error {
3822	var m map[string]*json.RawMessage
3823	err := json.Unmarshal(body, &m)
3824	if err != nil {
3825		return err
3826	}
3827	for k, v := range m {
3828		switch k {
3829		case "properties":
3830			if v != nil {
3831				var deployConfigurationParameterProperties DeployConfigurationParameterProperties
3832				err = json.Unmarshal(*v, &deployConfigurationParameterProperties)
3833				if err != nil {
3834					return err
3835				}
3836				dcp.DeployConfigurationParameterProperties = &deployConfigurationParameterProperties
3837			}
3838		}
3839	}
3840
3841	return nil
3842}
3843
3844// DiagnosticCollection paged Diagnostic list representation.
3845type DiagnosticCollection struct {
3846	autorest.Response `json:"-"`
3847	// Value - Page values.
3848	Value *[]DiagnosticContract `json:"value,omitempty"`
3849	// NextLink - Next page link if any.
3850	NextLink *string `json:"nextLink,omitempty"`
3851}
3852
3853// DiagnosticCollectionIterator provides access to a complete listing of DiagnosticContract values.
3854type DiagnosticCollectionIterator struct {
3855	i    int
3856	page DiagnosticCollectionPage
3857}
3858
3859// NextWithContext advances to the next value.  If there was an error making
3860// the request the iterator does not advance and the error is returned.
3861func (iter *DiagnosticCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3862	if tracing.IsEnabled() {
3863		ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticCollectionIterator.NextWithContext")
3864		defer func() {
3865			sc := -1
3866			if iter.Response().Response.Response != nil {
3867				sc = iter.Response().Response.Response.StatusCode
3868			}
3869			tracing.EndSpan(ctx, sc, err)
3870		}()
3871	}
3872	iter.i++
3873	if iter.i < len(iter.page.Values()) {
3874		return nil
3875	}
3876	err = iter.page.NextWithContext(ctx)
3877	if err != nil {
3878		iter.i--
3879		return err
3880	}
3881	iter.i = 0
3882	return nil
3883}
3884
3885// Next advances to the next value.  If there was an error making
3886// the request the iterator does not advance and the error is returned.
3887// Deprecated: Use NextWithContext() instead.
3888func (iter *DiagnosticCollectionIterator) Next() error {
3889	return iter.NextWithContext(context.Background())
3890}
3891
3892// NotDone returns true if the enumeration should be started or is not yet complete.
3893func (iter DiagnosticCollectionIterator) NotDone() bool {
3894	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3895}
3896
3897// Response returns the raw server response from the last page request.
3898func (iter DiagnosticCollectionIterator) Response() DiagnosticCollection {
3899	return iter.page.Response()
3900}
3901
3902// Value returns the current value or a zero-initialized value if the
3903// iterator has advanced beyond the end of the collection.
3904func (iter DiagnosticCollectionIterator) Value() DiagnosticContract {
3905	if !iter.page.NotDone() {
3906		return DiagnosticContract{}
3907	}
3908	return iter.page.Values()[iter.i]
3909}
3910
3911// Creates a new instance of the DiagnosticCollectionIterator type.
3912func NewDiagnosticCollectionIterator(page DiagnosticCollectionPage) DiagnosticCollectionIterator {
3913	return DiagnosticCollectionIterator{page: page}
3914}
3915
3916// IsEmpty returns true if the ListResult contains no values.
3917func (dc DiagnosticCollection) IsEmpty() bool {
3918	return dc.Value == nil || len(*dc.Value) == 0
3919}
3920
3921// diagnosticCollectionPreparer prepares a request to retrieve the next set of results.
3922// It returns nil if no more results exist.
3923func (dc DiagnosticCollection) diagnosticCollectionPreparer(ctx context.Context) (*http.Request, error) {
3924	if dc.NextLink == nil || len(to.String(dc.NextLink)) < 1 {
3925		return nil, nil
3926	}
3927	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3928		autorest.AsJSON(),
3929		autorest.AsGet(),
3930		autorest.WithBaseURL(to.String(dc.NextLink)))
3931}
3932
3933// DiagnosticCollectionPage contains a page of DiagnosticContract values.
3934type DiagnosticCollectionPage struct {
3935	fn func(context.Context, DiagnosticCollection) (DiagnosticCollection, error)
3936	dc DiagnosticCollection
3937}
3938
3939// NextWithContext advances to the next page of values.  If there was an error making
3940// the request the page does not advance and the error is returned.
3941func (page *DiagnosticCollectionPage) NextWithContext(ctx context.Context) (err error) {
3942	if tracing.IsEnabled() {
3943		ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticCollectionPage.NextWithContext")
3944		defer func() {
3945			sc := -1
3946			if page.Response().Response.Response != nil {
3947				sc = page.Response().Response.Response.StatusCode
3948			}
3949			tracing.EndSpan(ctx, sc, err)
3950		}()
3951	}
3952	next, err := page.fn(ctx, page.dc)
3953	if err != nil {
3954		return err
3955	}
3956	page.dc = next
3957	return nil
3958}
3959
3960// Next advances to the next page of values.  If there was an error making
3961// the request the page does not advance and the error is returned.
3962// Deprecated: Use NextWithContext() instead.
3963func (page *DiagnosticCollectionPage) Next() error {
3964	return page.NextWithContext(context.Background())
3965}
3966
3967// NotDone returns true if the page enumeration should be started or is not yet complete.
3968func (page DiagnosticCollectionPage) NotDone() bool {
3969	return !page.dc.IsEmpty()
3970}
3971
3972// Response returns the raw server response from the last page request.
3973func (page DiagnosticCollectionPage) Response() DiagnosticCollection {
3974	return page.dc
3975}
3976
3977// Values returns the slice of values for the current page or nil if there are no values.
3978func (page DiagnosticCollectionPage) Values() []DiagnosticContract {
3979	if page.dc.IsEmpty() {
3980		return nil
3981	}
3982	return *page.dc.Value
3983}
3984
3985// Creates a new instance of the DiagnosticCollectionPage type.
3986func NewDiagnosticCollectionPage(getNextPage func(context.Context, DiagnosticCollection) (DiagnosticCollection, error)) DiagnosticCollectionPage {
3987	return DiagnosticCollectionPage{fn: getNextPage}
3988}
3989
3990// DiagnosticContract diagnostic details.
3991type DiagnosticContract struct {
3992	autorest.Response `json:"-"`
3993	// DiagnosticContractProperties - Diagnostic entity contract properties.
3994	*DiagnosticContractProperties `json:"properties,omitempty"`
3995	// ID - READ-ONLY; Resource ID.
3996	ID *string `json:"id,omitempty"`
3997	// Name - READ-ONLY; Resource name.
3998	Name *string `json:"name,omitempty"`
3999	// Type - READ-ONLY; Resource type for API Management resource.
4000	Type *string `json:"type,omitempty"`
4001}
4002
4003// MarshalJSON is the custom marshaler for DiagnosticContract.
4004func (dc DiagnosticContract) MarshalJSON() ([]byte, error) {
4005	objectMap := make(map[string]interface{})
4006	if dc.DiagnosticContractProperties != nil {
4007		objectMap["properties"] = dc.DiagnosticContractProperties
4008	}
4009	return json.Marshal(objectMap)
4010}
4011
4012// UnmarshalJSON is the custom unmarshaler for DiagnosticContract struct.
4013func (dc *DiagnosticContract) UnmarshalJSON(body []byte) error {
4014	var m map[string]*json.RawMessage
4015	err := json.Unmarshal(body, &m)
4016	if err != nil {
4017		return err
4018	}
4019	for k, v := range m {
4020		switch k {
4021		case "properties":
4022			if v != nil {
4023				var diagnosticContractProperties DiagnosticContractProperties
4024				err = json.Unmarshal(*v, &diagnosticContractProperties)
4025				if err != nil {
4026					return err
4027				}
4028				dc.DiagnosticContractProperties = &diagnosticContractProperties
4029			}
4030		case "id":
4031			if v != nil {
4032				var ID string
4033				err = json.Unmarshal(*v, &ID)
4034				if err != nil {
4035					return err
4036				}
4037				dc.ID = &ID
4038			}
4039		case "name":
4040			if v != nil {
4041				var name string
4042				err = json.Unmarshal(*v, &name)
4043				if err != nil {
4044					return err
4045				}
4046				dc.Name = &name
4047			}
4048		case "type":
4049			if v != nil {
4050				var typeVar string
4051				err = json.Unmarshal(*v, &typeVar)
4052				if err != nil {
4053					return err
4054				}
4055				dc.Type = &typeVar
4056			}
4057		}
4058	}
4059
4060	return nil
4061}
4062
4063// DiagnosticContractProperties diagnostic Entity Properties
4064type DiagnosticContractProperties struct {
4065	// AlwaysLog - Specifies for what type of messages sampling settings should not apply. Possible values include: 'AllErrors'
4066	AlwaysLog AlwaysLog `json:"alwaysLog,omitempty"`
4067	// LoggerID - Resource Id of a target logger.
4068	LoggerID *string `json:"loggerId,omitempty"`
4069	// Sampling - Sampling settings for Diagnostic.
4070	Sampling *SamplingSettings `json:"sampling,omitempty"`
4071	// Frontend - Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
4072	Frontend *PipelineDiagnosticSettings `json:"frontend,omitempty"`
4073	// Backend - Diagnostic settings for incoming/outgoing HTTP messages to the Backend
4074	Backend *PipelineDiagnosticSettings `json:"backend,omitempty"`
4075	// LogClientIP - Log the ClientIP. Default is false.
4076	LogClientIP *bool `json:"logClientIp,omitempty"`
4077	// HTTPCorrelationProtocol - Sets correlation protocol to use for Application Insights diagnostics. Possible values include: 'HTTPCorrelationProtocolNone', 'HTTPCorrelationProtocolLegacy', 'HTTPCorrelationProtocolW3C'
4078	HTTPCorrelationProtocol HTTPCorrelationProtocol `json:"httpCorrelationProtocol,omitempty"`
4079	// Verbosity - The verbosity level applied to traces emitted by trace policies. Possible values include: 'Verbose', 'Information', 'Error'
4080	Verbosity Verbosity `json:"verbosity,omitempty"`
4081}
4082
4083// EmailTemplateCollection paged email template list representation.
4084type EmailTemplateCollection struct {
4085	autorest.Response `json:"-"`
4086	// Value - Page values.
4087	Value *[]EmailTemplateContract `json:"value,omitempty"`
4088	// NextLink - Next page link if any.
4089	NextLink *string `json:"nextLink,omitempty"`
4090}
4091
4092// EmailTemplateCollectionIterator provides access to a complete listing of EmailTemplateContract values.
4093type EmailTemplateCollectionIterator struct {
4094	i    int
4095	page EmailTemplateCollectionPage
4096}
4097
4098// NextWithContext advances to the next value.  If there was an error making
4099// the request the iterator does not advance and the error is returned.
4100func (iter *EmailTemplateCollectionIterator) NextWithContext(ctx context.Context) (err error) {
4101	if tracing.IsEnabled() {
4102		ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateCollectionIterator.NextWithContext")
4103		defer func() {
4104			sc := -1
4105			if iter.Response().Response.Response != nil {
4106				sc = iter.Response().Response.Response.StatusCode
4107			}
4108			tracing.EndSpan(ctx, sc, err)
4109		}()
4110	}
4111	iter.i++
4112	if iter.i < len(iter.page.Values()) {
4113		return nil
4114	}
4115	err = iter.page.NextWithContext(ctx)
4116	if err != nil {
4117		iter.i--
4118		return err
4119	}
4120	iter.i = 0
4121	return nil
4122}
4123
4124// Next advances to the next value.  If there was an error making
4125// the request the iterator does not advance and the error is returned.
4126// Deprecated: Use NextWithContext() instead.
4127func (iter *EmailTemplateCollectionIterator) Next() error {
4128	return iter.NextWithContext(context.Background())
4129}
4130
4131// NotDone returns true if the enumeration should be started or is not yet complete.
4132func (iter EmailTemplateCollectionIterator) NotDone() bool {
4133	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4134}
4135
4136// Response returns the raw server response from the last page request.
4137func (iter EmailTemplateCollectionIterator) Response() EmailTemplateCollection {
4138	return iter.page.Response()
4139}
4140
4141// Value returns the current value or a zero-initialized value if the
4142// iterator has advanced beyond the end of the collection.
4143func (iter EmailTemplateCollectionIterator) Value() EmailTemplateContract {
4144	if !iter.page.NotDone() {
4145		return EmailTemplateContract{}
4146	}
4147	return iter.page.Values()[iter.i]
4148}
4149
4150// Creates a new instance of the EmailTemplateCollectionIterator type.
4151func NewEmailTemplateCollectionIterator(page EmailTemplateCollectionPage) EmailTemplateCollectionIterator {
4152	return EmailTemplateCollectionIterator{page: page}
4153}
4154
4155// IsEmpty returns true if the ListResult contains no values.
4156func (etc EmailTemplateCollection) IsEmpty() bool {
4157	return etc.Value == nil || len(*etc.Value) == 0
4158}
4159
4160// emailTemplateCollectionPreparer prepares a request to retrieve the next set of results.
4161// It returns nil if no more results exist.
4162func (etc EmailTemplateCollection) emailTemplateCollectionPreparer(ctx context.Context) (*http.Request, error) {
4163	if etc.NextLink == nil || len(to.String(etc.NextLink)) < 1 {
4164		return nil, nil
4165	}
4166	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4167		autorest.AsJSON(),
4168		autorest.AsGet(),
4169		autorest.WithBaseURL(to.String(etc.NextLink)))
4170}
4171
4172// EmailTemplateCollectionPage contains a page of EmailTemplateContract values.
4173type EmailTemplateCollectionPage struct {
4174	fn  func(context.Context, EmailTemplateCollection) (EmailTemplateCollection, error)
4175	etc EmailTemplateCollection
4176}
4177
4178// NextWithContext advances to the next page of values.  If there was an error making
4179// the request the page does not advance and the error is returned.
4180func (page *EmailTemplateCollectionPage) NextWithContext(ctx context.Context) (err error) {
4181	if tracing.IsEnabled() {
4182		ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateCollectionPage.NextWithContext")
4183		defer func() {
4184			sc := -1
4185			if page.Response().Response.Response != nil {
4186				sc = page.Response().Response.Response.StatusCode
4187			}
4188			tracing.EndSpan(ctx, sc, err)
4189		}()
4190	}
4191	next, err := page.fn(ctx, page.etc)
4192	if err != nil {
4193		return err
4194	}
4195	page.etc = next
4196	return nil
4197}
4198
4199// Next advances to the next page of values.  If there was an error making
4200// the request the page does not advance and the error is returned.
4201// Deprecated: Use NextWithContext() instead.
4202func (page *EmailTemplateCollectionPage) Next() error {
4203	return page.NextWithContext(context.Background())
4204}
4205
4206// NotDone returns true if the page enumeration should be started or is not yet complete.
4207func (page EmailTemplateCollectionPage) NotDone() bool {
4208	return !page.etc.IsEmpty()
4209}
4210
4211// Response returns the raw server response from the last page request.
4212func (page EmailTemplateCollectionPage) Response() EmailTemplateCollection {
4213	return page.etc
4214}
4215
4216// Values returns the slice of values for the current page or nil if there are no values.
4217func (page EmailTemplateCollectionPage) Values() []EmailTemplateContract {
4218	if page.etc.IsEmpty() {
4219		return nil
4220	}
4221	return *page.etc.Value
4222}
4223
4224// Creates a new instance of the EmailTemplateCollectionPage type.
4225func NewEmailTemplateCollectionPage(getNextPage func(context.Context, EmailTemplateCollection) (EmailTemplateCollection, error)) EmailTemplateCollectionPage {
4226	return EmailTemplateCollectionPage{fn: getNextPage}
4227}
4228
4229// EmailTemplateContract email Template details.
4230type EmailTemplateContract struct {
4231	autorest.Response `json:"-"`
4232	// EmailTemplateContractProperties - Email Template entity contract properties.
4233	*EmailTemplateContractProperties `json:"properties,omitempty"`
4234	// ID - READ-ONLY; Resource ID.
4235	ID *string `json:"id,omitempty"`
4236	// Name - READ-ONLY; Resource name.
4237	Name *string `json:"name,omitempty"`
4238	// Type - READ-ONLY; Resource type for API Management resource.
4239	Type *string `json:"type,omitempty"`
4240}
4241
4242// MarshalJSON is the custom marshaler for EmailTemplateContract.
4243func (etc EmailTemplateContract) MarshalJSON() ([]byte, error) {
4244	objectMap := make(map[string]interface{})
4245	if etc.EmailTemplateContractProperties != nil {
4246		objectMap["properties"] = etc.EmailTemplateContractProperties
4247	}
4248	return json.Marshal(objectMap)
4249}
4250
4251// UnmarshalJSON is the custom unmarshaler for EmailTemplateContract struct.
4252func (etc *EmailTemplateContract) UnmarshalJSON(body []byte) error {
4253	var m map[string]*json.RawMessage
4254	err := json.Unmarshal(body, &m)
4255	if err != nil {
4256		return err
4257	}
4258	for k, v := range m {
4259		switch k {
4260		case "properties":
4261			if v != nil {
4262				var emailTemplateContractProperties EmailTemplateContractProperties
4263				err = json.Unmarshal(*v, &emailTemplateContractProperties)
4264				if err != nil {
4265					return err
4266				}
4267				etc.EmailTemplateContractProperties = &emailTemplateContractProperties
4268			}
4269		case "id":
4270			if v != nil {
4271				var ID string
4272				err = json.Unmarshal(*v, &ID)
4273				if err != nil {
4274					return err
4275				}
4276				etc.ID = &ID
4277			}
4278		case "name":
4279			if v != nil {
4280				var name string
4281				err = json.Unmarshal(*v, &name)
4282				if err != nil {
4283					return err
4284				}
4285				etc.Name = &name
4286			}
4287		case "type":
4288			if v != nil {
4289				var typeVar string
4290				err = json.Unmarshal(*v, &typeVar)
4291				if err != nil {
4292					return err
4293				}
4294				etc.Type = &typeVar
4295			}
4296		}
4297	}
4298
4299	return nil
4300}
4301
4302// EmailTemplateContractProperties email Template Contract properties.
4303type EmailTemplateContractProperties struct {
4304	// Subject - Subject of the Template.
4305	Subject *string `json:"subject,omitempty"`
4306	// Body - Email Template Body. This should be a valid XDocument
4307	Body *string `json:"body,omitempty"`
4308	// Title - Title of the Template.
4309	Title *string `json:"title,omitempty"`
4310	// Description - Description of the Email Template.
4311	Description *string `json:"description,omitempty"`
4312	// IsDefault - READ-ONLY; Whether the template is the default template provided by Api Management or has been edited.
4313	IsDefault *bool `json:"isDefault,omitempty"`
4314	// Parameters - Email Template Parameter values.
4315	Parameters *[]EmailTemplateParametersContractProperties `json:"parameters,omitempty"`
4316}
4317
4318// EmailTemplateParametersContractProperties email Template Parameter contract.
4319type EmailTemplateParametersContractProperties struct {
4320	// Name - Template parameter name.
4321	Name *string `json:"name,omitempty"`
4322	// Title - Template parameter title.
4323	Title *string `json:"title,omitempty"`
4324	// Description - Template parameter description.
4325	Description *string `json:"description,omitempty"`
4326}
4327
4328// EmailTemplateUpdateParameterProperties email Template Update Contract properties.
4329type EmailTemplateUpdateParameterProperties struct {
4330	// Subject - Subject of the Template.
4331	Subject *string `json:"subject,omitempty"`
4332	// Title - Title of the Template.
4333	Title *string `json:"title,omitempty"`
4334	// Description - Description of the Email Template.
4335	Description *string `json:"description,omitempty"`
4336	// Body - Email Template Body. This should be a valid XDocument
4337	Body *string `json:"body,omitempty"`
4338	// Parameters - Email Template Parameter values.
4339	Parameters *[]EmailTemplateParametersContractProperties `json:"parameters,omitempty"`
4340}
4341
4342// EmailTemplateUpdateParameters email Template update Parameters.
4343type EmailTemplateUpdateParameters struct {
4344	// EmailTemplateUpdateParameterProperties - Email Template Update contract properties.
4345	*EmailTemplateUpdateParameterProperties `json:"properties,omitempty"`
4346}
4347
4348// MarshalJSON is the custom marshaler for EmailTemplateUpdateParameters.
4349func (etup EmailTemplateUpdateParameters) MarshalJSON() ([]byte, error) {
4350	objectMap := make(map[string]interface{})
4351	if etup.EmailTemplateUpdateParameterProperties != nil {
4352		objectMap["properties"] = etup.EmailTemplateUpdateParameterProperties
4353	}
4354	return json.Marshal(objectMap)
4355}
4356
4357// UnmarshalJSON is the custom unmarshaler for EmailTemplateUpdateParameters struct.
4358func (etup *EmailTemplateUpdateParameters) UnmarshalJSON(body []byte) error {
4359	var m map[string]*json.RawMessage
4360	err := json.Unmarshal(body, &m)
4361	if err != nil {
4362		return err
4363	}
4364	for k, v := range m {
4365		switch k {
4366		case "properties":
4367			if v != nil {
4368				var emailTemplateUpdateParameterProperties EmailTemplateUpdateParameterProperties
4369				err = json.Unmarshal(*v, &emailTemplateUpdateParameterProperties)
4370				if err != nil {
4371					return err
4372				}
4373				etup.EmailTemplateUpdateParameterProperties = &emailTemplateUpdateParameterProperties
4374			}
4375		}
4376	}
4377
4378	return nil
4379}
4380
4381// ErrorFieldContract error Field contract.
4382type ErrorFieldContract struct {
4383	// Code - Property level error code.
4384	Code *string `json:"code,omitempty"`
4385	// Message - Human-readable representation of property-level error.
4386	Message *string `json:"message,omitempty"`
4387	// Target - Property name.
4388	Target *string `json:"target,omitempty"`
4389}
4390
4391// ErrorResponse error Response.
4392type ErrorResponse struct {
4393	// ErrorResponseBody - Properties of the Error Response.
4394	*ErrorResponseBody `json:"error,omitempty"`
4395}
4396
4397// MarshalJSON is the custom marshaler for ErrorResponse.
4398func (er ErrorResponse) MarshalJSON() ([]byte, error) {
4399	objectMap := make(map[string]interface{})
4400	if er.ErrorResponseBody != nil {
4401		objectMap["error"] = er.ErrorResponseBody
4402	}
4403	return json.Marshal(objectMap)
4404}
4405
4406// UnmarshalJSON is the custom unmarshaler for ErrorResponse struct.
4407func (er *ErrorResponse) UnmarshalJSON(body []byte) error {
4408	var m map[string]*json.RawMessage
4409	err := json.Unmarshal(body, &m)
4410	if err != nil {
4411		return err
4412	}
4413	for k, v := range m {
4414		switch k {
4415		case "error":
4416			if v != nil {
4417				var errorResponseBody ErrorResponseBody
4418				err = json.Unmarshal(*v, &errorResponseBody)
4419				if err != nil {
4420					return err
4421				}
4422				er.ErrorResponseBody = &errorResponseBody
4423			}
4424		}
4425	}
4426
4427	return nil
4428}
4429
4430// ErrorResponseBody error Body contract.
4431type ErrorResponseBody struct {
4432	// Code - Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
4433	Code *string `json:"code,omitempty"`
4434	// Message - Human-readable representation of the error.
4435	Message *string `json:"message,omitempty"`
4436	// Details - The list of invalid fields send in request, in case of validation error.
4437	Details *[]ErrorFieldContract `json:"details,omitempty"`
4438}
4439
4440// GatewayCollection paged Gateway list representation.
4441type GatewayCollection struct {
4442	autorest.Response `json:"-"`
4443	// Value - READ-ONLY; Page values.
4444	Value *[]GatewayContract `json:"value,omitempty"`
4445	// NextLink - READ-ONLY; Next page link if any.
4446	NextLink *string `json:"nextLink,omitempty"`
4447}
4448
4449// GatewayCollectionIterator provides access to a complete listing of GatewayContract values.
4450type GatewayCollectionIterator struct {
4451	i    int
4452	page GatewayCollectionPage
4453}
4454
4455// NextWithContext advances to the next value.  If there was an error making
4456// the request the iterator does not advance and the error is returned.
4457func (iter *GatewayCollectionIterator) NextWithContext(ctx context.Context) (err error) {
4458	if tracing.IsEnabled() {
4459		ctx = tracing.StartSpan(ctx, fqdn+"/GatewayCollectionIterator.NextWithContext")
4460		defer func() {
4461			sc := -1
4462			if iter.Response().Response.Response != nil {
4463				sc = iter.Response().Response.Response.StatusCode
4464			}
4465			tracing.EndSpan(ctx, sc, err)
4466		}()
4467	}
4468	iter.i++
4469	if iter.i < len(iter.page.Values()) {
4470		return nil
4471	}
4472	err = iter.page.NextWithContext(ctx)
4473	if err != nil {
4474		iter.i--
4475		return err
4476	}
4477	iter.i = 0
4478	return nil
4479}
4480
4481// Next advances to the next value.  If there was an error making
4482// the request the iterator does not advance and the error is returned.
4483// Deprecated: Use NextWithContext() instead.
4484func (iter *GatewayCollectionIterator) Next() error {
4485	return iter.NextWithContext(context.Background())
4486}
4487
4488// NotDone returns true if the enumeration should be started or is not yet complete.
4489func (iter GatewayCollectionIterator) NotDone() bool {
4490	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4491}
4492
4493// Response returns the raw server response from the last page request.
4494func (iter GatewayCollectionIterator) Response() GatewayCollection {
4495	return iter.page.Response()
4496}
4497
4498// Value returns the current value or a zero-initialized value if the
4499// iterator has advanced beyond the end of the collection.
4500func (iter GatewayCollectionIterator) Value() GatewayContract {
4501	if !iter.page.NotDone() {
4502		return GatewayContract{}
4503	}
4504	return iter.page.Values()[iter.i]
4505}
4506
4507// Creates a new instance of the GatewayCollectionIterator type.
4508func NewGatewayCollectionIterator(page GatewayCollectionPage) GatewayCollectionIterator {
4509	return GatewayCollectionIterator{page: page}
4510}
4511
4512// IsEmpty returns true if the ListResult contains no values.
4513func (gc GatewayCollection) IsEmpty() bool {
4514	return gc.Value == nil || len(*gc.Value) == 0
4515}
4516
4517// gatewayCollectionPreparer prepares a request to retrieve the next set of results.
4518// It returns nil if no more results exist.
4519func (gc GatewayCollection) gatewayCollectionPreparer(ctx context.Context) (*http.Request, error) {
4520	if gc.NextLink == nil || len(to.String(gc.NextLink)) < 1 {
4521		return nil, nil
4522	}
4523	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4524		autorest.AsJSON(),
4525		autorest.AsGet(),
4526		autorest.WithBaseURL(to.String(gc.NextLink)))
4527}
4528
4529// GatewayCollectionPage contains a page of GatewayContract values.
4530type GatewayCollectionPage struct {
4531	fn func(context.Context, GatewayCollection) (GatewayCollection, error)
4532	gc GatewayCollection
4533}
4534
4535// NextWithContext advances to the next page of values.  If there was an error making
4536// the request the page does not advance and the error is returned.
4537func (page *GatewayCollectionPage) NextWithContext(ctx context.Context) (err error) {
4538	if tracing.IsEnabled() {
4539		ctx = tracing.StartSpan(ctx, fqdn+"/GatewayCollectionPage.NextWithContext")
4540		defer func() {
4541			sc := -1
4542			if page.Response().Response.Response != nil {
4543				sc = page.Response().Response.Response.StatusCode
4544			}
4545			tracing.EndSpan(ctx, sc, err)
4546		}()
4547	}
4548	next, err := page.fn(ctx, page.gc)
4549	if err != nil {
4550		return err
4551	}
4552	page.gc = next
4553	return nil
4554}
4555
4556// Next advances to the next page of values.  If there was an error making
4557// the request the page does not advance and the error is returned.
4558// Deprecated: Use NextWithContext() instead.
4559func (page *GatewayCollectionPage) Next() error {
4560	return page.NextWithContext(context.Background())
4561}
4562
4563// NotDone returns true if the page enumeration should be started or is not yet complete.
4564func (page GatewayCollectionPage) NotDone() bool {
4565	return !page.gc.IsEmpty()
4566}
4567
4568// Response returns the raw server response from the last page request.
4569func (page GatewayCollectionPage) Response() GatewayCollection {
4570	return page.gc
4571}
4572
4573// Values returns the slice of values for the current page or nil if there are no values.
4574func (page GatewayCollectionPage) Values() []GatewayContract {
4575	if page.gc.IsEmpty() {
4576		return nil
4577	}
4578	return *page.gc.Value
4579}
4580
4581// Creates a new instance of the GatewayCollectionPage type.
4582func NewGatewayCollectionPage(getNextPage func(context.Context, GatewayCollection) (GatewayCollection, error)) GatewayCollectionPage {
4583	return GatewayCollectionPage{fn: getNextPage}
4584}
4585
4586// GatewayContract gateway details.
4587type GatewayContract struct {
4588	autorest.Response `json:"-"`
4589	// GatewayContractProperties - Gateway details.
4590	*GatewayContractProperties `json:"properties,omitempty"`
4591	// ID - READ-ONLY; Resource ID.
4592	ID *string `json:"id,omitempty"`
4593	// Name - READ-ONLY; Resource name.
4594	Name *string `json:"name,omitempty"`
4595	// Type - READ-ONLY; Resource type for API Management resource.
4596	Type *string `json:"type,omitempty"`
4597}
4598
4599// MarshalJSON is the custom marshaler for GatewayContract.
4600func (gc GatewayContract) MarshalJSON() ([]byte, error) {
4601	objectMap := make(map[string]interface{})
4602	if gc.GatewayContractProperties != nil {
4603		objectMap["properties"] = gc.GatewayContractProperties
4604	}
4605	return json.Marshal(objectMap)
4606}
4607
4608// UnmarshalJSON is the custom unmarshaler for GatewayContract struct.
4609func (gc *GatewayContract) UnmarshalJSON(body []byte) error {
4610	var m map[string]*json.RawMessage
4611	err := json.Unmarshal(body, &m)
4612	if err != nil {
4613		return err
4614	}
4615	for k, v := range m {
4616		switch k {
4617		case "properties":
4618			if v != nil {
4619				var gatewayContractProperties GatewayContractProperties
4620				err = json.Unmarshal(*v, &gatewayContractProperties)
4621				if err != nil {
4622					return err
4623				}
4624				gc.GatewayContractProperties = &gatewayContractProperties
4625			}
4626		case "id":
4627			if v != nil {
4628				var ID string
4629				err = json.Unmarshal(*v, &ID)
4630				if err != nil {
4631					return err
4632				}
4633				gc.ID = &ID
4634			}
4635		case "name":
4636			if v != nil {
4637				var name string
4638				err = json.Unmarshal(*v, &name)
4639				if err != nil {
4640					return err
4641				}
4642				gc.Name = &name
4643			}
4644		case "type":
4645			if v != nil {
4646				var typeVar string
4647				err = json.Unmarshal(*v, &typeVar)
4648				if err != nil {
4649					return err
4650				}
4651				gc.Type = &typeVar
4652			}
4653		}
4654	}
4655
4656	return nil
4657}
4658
4659// GatewayContractProperties properties of the Gateway contract.
4660type GatewayContractProperties struct {
4661	// LocationData - Gateway location.
4662	LocationData *ResourceLocationDataContract `json:"locationData,omitempty"`
4663	// Description - Gateway description
4664	Description *string `json:"description,omitempty"`
4665}
4666
4667// GatewayHostnameConfigurationCollection paged Gateway hostname configuration list representation.
4668type GatewayHostnameConfigurationCollection struct {
4669	autorest.Response `json:"-"`
4670	// Value - READ-ONLY; Page values.
4671	Value *[]GatewayHostnameConfigurationContract `json:"value,omitempty"`
4672	// NextLink - READ-ONLY; Next page link if any.
4673	NextLink *string `json:"nextLink,omitempty"`
4674}
4675
4676// GatewayHostnameConfigurationCollectionIterator provides access to a complete listing of
4677// GatewayHostnameConfigurationContract values.
4678type GatewayHostnameConfigurationCollectionIterator struct {
4679	i    int
4680	page GatewayHostnameConfigurationCollectionPage
4681}
4682
4683// NextWithContext advances to the next value.  If there was an error making
4684// the request the iterator does not advance and the error is returned.
4685func (iter *GatewayHostnameConfigurationCollectionIterator) NextWithContext(ctx context.Context) (err error) {
4686	if tracing.IsEnabled() {
4687		ctx = tracing.StartSpan(ctx, fqdn+"/GatewayHostnameConfigurationCollectionIterator.NextWithContext")
4688		defer func() {
4689			sc := -1
4690			if iter.Response().Response.Response != nil {
4691				sc = iter.Response().Response.Response.StatusCode
4692			}
4693			tracing.EndSpan(ctx, sc, err)
4694		}()
4695	}
4696	iter.i++
4697	if iter.i < len(iter.page.Values()) {
4698		return nil
4699	}
4700	err = iter.page.NextWithContext(ctx)
4701	if err != nil {
4702		iter.i--
4703		return err
4704	}
4705	iter.i = 0
4706	return nil
4707}
4708
4709// Next advances to the next value.  If there was an error making
4710// the request the iterator does not advance and the error is returned.
4711// Deprecated: Use NextWithContext() instead.
4712func (iter *GatewayHostnameConfigurationCollectionIterator) Next() error {
4713	return iter.NextWithContext(context.Background())
4714}
4715
4716// NotDone returns true if the enumeration should be started or is not yet complete.
4717func (iter GatewayHostnameConfigurationCollectionIterator) NotDone() bool {
4718	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4719}
4720
4721// Response returns the raw server response from the last page request.
4722func (iter GatewayHostnameConfigurationCollectionIterator) Response() GatewayHostnameConfigurationCollection {
4723	return iter.page.Response()
4724}
4725
4726// Value returns the current value or a zero-initialized value if the
4727// iterator has advanced beyond the end of the collection.
4728func (iter GatewayHostnameConfigurationCollectionIterator) Value() GatewayHostnameConfigurationContract {
4729	if !iter.page.NotDone() {
4730		return GatewayHostnameConfigurationContract{}
4731	}
4732	return iter.page.Values()[iter.i]
4733}
4734
4735// Creates a new instance of the GatewayHostnameConfigurationCollectionIterator type.
4736func NewGatewayHostnameConfigurationCollectionIterator(page GatewayHostnameConfigurationCollectionPage) GatewayHostnameConfigurationCollectionIterator {
4737	return GatewayHostnameConfigurationCollectionIterator{page: page}
4738}
4739
4740// IsEmpty returns true if the ListResult contains no values.
4741func (ghcc GatewayHostnameConfigurationCollection) IsEmpty() bool {
4742	return ghcc.Value == nil || len(*ghcc.Value) == 0
4743}
4744
4745// gatewayHostnameConfigurationCollectionPreparer prepares a request to retrieve the next set of results.
4746// It returns nil if no more results exist.
4747func (ghcc GatewayHostnameConfigurationCollection) gatewayHostnameConfigurationCollectionPreparer(ctx context.Context) (*http.Request, error) {
4748	if ghcc.NextLink == nil || len(to.String(ghcc.NextLink)) < 1 {
4749		return nil, nil
4750	}
4751	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4752		autorest.AsJSON(),
4753		autorest.AsGet(),
4754		autorest.WithBaseURL(to.String(ghcc.NextLink)))
4755}
4756
4757// GatewayHostnameConfigurationCollectionPage contains a page of GatewayHostnameConfigurationContract
4758// values.
4759type GatewayHostnameConfigurationCollectionPage struct {
4760	fn   func(context.Context, GatewayHostnameConfigurationCollection) (GatewayHostnameConfigurationCollection, error)
4761	ghcc GatewayHostnameConfigurationCollection
4762}
4763
4764// NextWithContext advances to the next page of values.  If there was an error making
4765// the request the page does not advance and the error is returned.
4766func (page *GatewayHostnameConfigurationCollectionPage) NextWithContext(ctx context.Context) (err error) {
4767	if tracing.IsEnabled() {
4768		ctx = tracing.StartSpan(ctx, fqdn+"/GatewayHostnameConfigurationCollectionPage.NextWithContext")
4769		defer func() {
4770			sc := -1
4771			if page.Response().Response.Response != nil {
4772				sc = page.Response().Response.Response.StatusCode
4773			}
4774			tracing.EndSpan(ctx, sc, err)
4775		}()
4776	}
4777	next, err := page.fn(ctx, page.ghcc)
4778	if err != nil {
4779		return err
4780	}
4781	page.ghcc = next
4782	return nil
4783}
4784
4785// Next advances to the next page of values.  If there was an error making
4786// the request the page does not advance and the error is returned.
4787// Deprecated: Use NextWithContext() instead.
4788func (page *GatewayHostnameConfigurationCollectionPage) Next() error {
4789	return page.NextWithContext(context.Background())
4790}
4791
4792// NotDone returns true if the page enumeration should be started or is not yet complete.
4793func (page GatewayHostnameConfigurationCollectionPage) NotDone() bool {
4794	return !page.ghcc.IsEmpty()
4795}
4796
4797// Response returns the raw server response from the last page request.
4798func (page GatewayHostnameConfigurationCollectionPage) Response() GatewayHostnameConfigurationCollection {
4799	return page.ghcc
4800}
4801
4802// Values returns the slice of values for the current page or nil if there are no values.
4803func (page GatewayHostnameConfigurationCollectionPage) Values() []GatewayHostnameConfigurationContract {
4804	if page.ghcc.IsEmpty() {
4805		return nil
4806	}
4807	return *page.ghcc.Value
4808}
4809
4810// Creates a new instance of the GatewayHostnameConfigurationCollectionPage type.
4811func NewGatewayHostnameConfigurationCollectionPage(getNextPage func(context.Context, GatewayHostnameConfigurationCollection) (GatewayHostnameConfigurationCollection, error)) GatewayHostnameConfigurationCollectionPage {
4812	return GatewayHostnameConfigurationCollectionPage{fn: getNextPage}
4813}
4814
4815// GatewayHostnameConfigurationContract gateway hostname configuration details.
4816type GatewayHostnameConfigurationContract struct {
4817	autorest.Response `json:"-"`
4818	// GatewayHostnameConfigurationContractProperties - Gateway hostname configuration details.
4819	*GatewayHostnameConfigurationContractProperties `json:"properties,omitempty"`
4820	// ID - READ-ONLY; Resource ID.
4821	ID *string `json:"id,omitempty"`
4822	// Name - READ-ONLY; Resource name.
4823	Name *string `json:"name,omitempty"`
4824	// Type - READ-ONLY; Resource type for API Management resource.
4825	Type *string `json:"type,omitempty"`
4826}
4827
4828// MarshalJSON is the custom marshaler for GatewayHostnameConfigurationContract.
4829func (ghcc GatewayHostnameConfigurationContract) MarshalJSON() ([]byte, error) {
4830	objectMap := make(map[string]interface{})
4831	if ghcc.GatewayHostnameConfigurationContractProperties != nil {
4832		objectMap["properties"] = ghcc.GatewayHostnameConfigurationContractProperties
4833	}
4834	return json.Marshal(objectMap)
4835}
4836
4837// UnmarshalJSON is the custom unmarshaler for GatewayHostnameConfigurationContract struct.
4838func (ghcc *GatewayHostnameConfigurationContract) UnmarshalJSON(body []byte) error {
4839	var m map[string]*json.RawMessage
4840	err := json.Unmarshal(body, &m)
4841	if err != nil {
4842		return err
4843	}
4844	for k, v := range m {
4845		switch k {
4846		case "properties":
4847			if v != nil {
4848				var gatewayHostnameConfigurationContractProperties GatewayHostnameConfigurationContractProperties
4849				err = json.Unmarshal(*v, &gatewayHostnameConfigurationContractProperties)
4850				if err != nil {
4851					return err
4852				}
4853				ghcc.GatewayHostnameConfigurationContractProperties = &gatewayHostnameConfigurationContractProperties
4854			}
4855		case "id":
4856			if v != nil {
4857				var ID string
4858				err = json.Unmarshal(*v, &ID)
4859				if err != nil {
4860					return err
4861				}
4862				ghcc.ID = &ID
4863			}
4864		case "name":
4865			if v != nil {
4866				var name string
4867				err = json.Unmarshal(*v, &name)
4868				if err != nil {
4869					return err
4870				}
4871				ghcc.Name = &name
4872			}
4873		case "type":
4874			if v != nil {
4875				var typeVar string
4876				err = json.Unmarshal(*v, &typeVar)
4877				if err != nil {
4878					return err
4879				}
4880				ghcc.Type = &typeVar
4881			}
4882		}
4883	}
4884
4885	return nil
4886}
4887
4888// GatewayHostnameConfigurationContractProperties gateway hostname configuration details.
4889type GatewayHostnameConfigurationContractProperties struct {
4890	// Hostname - Hostname value. Supports valid domain name, partial or full wildcard
4891	Hostname *string `json:"hostname,omitempty"`
4892	// CertificateID - Identifier of Certificate entity that will be used for TLS connection establishment
4893	CertificateID *string `json:"certificateId,omitempty"`
4894	// NegotiateClientCertificate - Determines whether gateway requests client certificate
4895	NegotiateClientCertificate *bool `json:"negotiateClientCertificate,omitempty"`
4896}
4897
4898// GatewayKeyRegenerationRequestContract gateway key regeneration request contract properties.
4899type GatewayKeyRegenerationRequestContract struct {
4900	// KeyType - The Key being regenerated. Possible values include: 'Primary', 'Secondary'
4901	KeyType KeyType `json:"keyType,omitempty"`
4902}
4903
4904// GatewayKeysContract gateway authentication keys.
4905type GatewayKeysContract struct {
4906	autorest.Response `json:"-"`
4907	// Primary - Primary gateway key.
4908	Primary *string `json:"primary,omitempty"`
4909	// Secondary - Secondary gateway key.
4910	Secondary *string `json:"secondary,omitempty"`
4911}
4912
4913// GatewayTokenContract gateway access token.
4914type GatewayTokenContract struct {
4915	autorest.Response `json:"-"`
4916	// Value - Shared Access Authentication token value for the Gateway.
4917	Value *string `json:"value,omitempty"`
4918}
4919
4920// GatewayTokenRequestContract gateway token request contract properties.
4921type GatewayTokenRequestContract struct {
4922	// KeyType - The Key to be used to generate gateway token. Possible values include: 'Primary', 'Secondary'
4923	KeyType KeyType `json:"keyType,omitempty"`
4924	// 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.
4925	Expiry *date.Time `json:"expiry,omitempty"`
4926}
4927
4928// GenerateSsoURLResult generate SSO Url operations response details.
4929type GenerateSsoURLResult struct {
4930	autorest.Response `json:"-"`
4931	// Value - Redirect Url containing the SSO URL value.
4932	Value *string `json:"value,omitempty"`
4933}
4934
4935// GroupCollection paged Group list representation.
4936type GroupCollection struct {
4937	autorest.Response `json:"-"`
4938	// Value - Page values.
4939	Value *[]GroupContract `json:"value,omitempty"`
4940	// NextLink - Next page link if any.
4941	NextLink *string `json:"nextLink,omitempty"`
4942}
4943
4944// GroupCollectionIterator provides access to a complete listing of GroupContract values.
4945type GroupCollectionIterator struct {
4946	i    int
4947	page GroupCollectionPage
4948}
4949
4950// NextWithContext advances to the next value.  If there was an error making
4951// the request the iterator does not advance and the error is returned.
4952func (iter *GroupCollectionIterator) NextWithContext(ctx context.Context) (err error) {
4953	if tracing.IsEnabled() {
4954		ctx = tracing.StartSpan(ctx, fqdn+"/GroupCollectionIterator.NextWithContext")
4955		defer func() {
4956			sc := -1
4957			if iter.Response().Response.Response != nil {
4958				sc = iter.Response().Response.Response.StatusCode
4959			}
4960			tracing.EndSpan(ctx, sc, err)
4961		}()
4962	}
4963	iter.i++
4964	if iter.i < len(iter.page.Values()) {
4965		return nil
4966	}
4967	err = iter.page.NextWithContext(ctx)
4968	if err != nil {
4969		iter.i--
4970		return err
4971	}
4972	iter.i = 0
4973	return nil
4974}
4975
4976// Next advances to the next value.  If there was an error making
4977// the request the iterator does not advance and the error is returned.
4978// Deprecated: Use NextWithContext() instead.
4979func (iter *GroupCollectionIterator) Next() error {
4980	return iter.NextWithContext(context.Background())
4981}
4982
4983// NotDone returns true if the enumeration should be started or is not yet complete.
4984func (iter GroupCollectionIterator) NotDone() bool {
4985	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4986}
4987
4988// Response returns the raw server response from the last page request.
4989func (iter GroupCollectionIterator) Response() GroupCollection {
4990	return iter.page.Response()
4991}
4992
4993// Value returns the current value or a zero-initialized value if the
4994// iterator has advanced beyond the end of the collection.
4995func (iter GroupCollectionIterator) Value() GroupContract {
4996	if !iter.page.NotDone() {
4997		return GroupContract{}
4998	}
4999	return iter.page.Values()[iter.i]
5000}
5001
5002// Creates a new instance of the GroupCollectionIterator type.
5003func NewGroupCollectionIterator(page GroupCollectionPage) GroupCollectionIterator {
5004	return GroupCollectionIterator{page: page}
5005}
5006
5007// IsEmpty returns true if the ListResult contains no values.
5008func (gc GroupCollection) IsEmpty() bool {
5009	return gc.Value == nil || len(*gc.Value) == 0
5010}
5011
5012// groupCollectionPreparer prepares a request to retrieve the next set of results.
5013// It returns nil if no more results exist.
5014func (gc GroupCollection) groupCollectionPreparer(ctx context.Context) (*http.Request, error) {
5015	if gc.NextLink == nil || len(to.String(gc.NextLink)) < 1 {
5016		return nil, nil
5017	}
5018	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5019		autorest.AsJSON(),
5020		autorest.AsGet(),
5021		autorest.WithBaseURL(to.String(gc.NextLink)))
5022}
5023
5024// GroupCollectionPage contains a page of GroupContract values.
5025type GroupCollectionPage struct {
5026	fn func(context.Context, GroupCollection) (GroupCollection, error)
5027	gc GroupCollection
5028}
5029
5030// NextWithContext advances to the next page of values.  If there was an error making
5031// the request the page does not advance and the error is returned.
5032func (page *GroupCollectionPage) NextWithContext(ctx context.Context) (err error) {
5033	if tracing.IsEnabled() {
5034		ctx = tracing.StartSpan(ctx, fqdn+"/GroupCollectionPage.NextWithContext")
5035		defer func() {
5036			sc := -1
5037			if page.Response().Response.Response != nil {
5038				sc = page.Response().Response.Response.StatusCode
5039			}
5040			tracing.EndSpan(ctx, sc, err)
5041		}()
5042	}
5043	next, err := page.fn(ctx, page.gc)
5044	if err != nil {
5045		return err
5046	}
5047	page.gc = next
5048	return nil
5049}
5050
5051// Next advances to the next page of values.  If there was an error making
5052// the request the page does not advance and the error is returned.
5053// Deprecated: Use NextWithContext() instead.
5054func (page *GroupCollectionPage) Next() error {
5055	return page.NextWithContext(context.Background())
5056}
5057
5058// NotDone returns true if the page enumeration should be started or is not yet complete.
5059func (page GroupCollectionPage) NotDone() bool {
5060	return !page.gc.IsEmpty()
5061}
5062
5063// Response returns the raw server response from the last page request.
5064func (page GroupCollectionPage) Response() GroupCollection {
5065	return page.gc
5066}
5067
5068// Values returns the slice of values for the current page or nil if there are no values.
5069func (page GroupCollectionPage) Values() []GroupContract {
5070	if page.gc.IsEmpty() {
5071		return nil
5072	}
5073	return *page.gc.Value
5074}
5075
5076// Creates a new instance of the GroupCollectionPage type.
5077func NewGroupCollectionPage(getNextPage func(context.Context, GroupCollection) (GroupCollection, error)) GroupCollectionPage {
5078	return GroupCollectionPage{fn: getNextPage}
5079}
5080
5081// GroupContract contract details.
5082type GroupContract struct {
5083	autorest.Response `json:"-"`
5084	// GroupContractProperties - Group entity contract properties.
5085	*GroupContractProperties `json:"properties,omitempty"`
5086	// ID - READ-ONLY; Resource ID.
5087	ID *string `json:"id,omitempty"`
5088	// Name - READ-ONLY; Resource name.
5089	Name *string `json:"name,omitempty"`
5090	// Type - READ-ONLY; Resource type for API Management resource.
5091	Type *string `json:"type,omitempty"`
5092}
5093
5094// MarshalJSON is the custom marshaler for GroupContract.
5095func (gc GroupContract) MarshalJSON() ([]byte, error) {
5096	objectMap := make(map[string]interface{})
5097	if gc.GroupContractProperties != nil {
5098		objectMap["properties"] = gc.GroupContractProperties
5099	}
5100	return json.Marshal(objectMap)
5101}
5102
5103// UnmarshalJSON is the custom unmarshaler for GroupContract struct.
5104func (gc *GroupContract) UnmarshalJSON(body []byte) error {
5105	var m map[string]*json.RawMessage
5106	err := json.Unmarshal(body, &m)
5107	if err != nil {
5108		return err
5109	}
5110	for k, v := range m {
5111		switch k {
5112		case "properties":
5113			if v != nil {
5114				var groupContractProperties GroupContractProperties
5115				err = json.Unmarshal(*v, &groupContractProperties)
5116				if err != nil {
5117					return err
5118				}
5119				gc.GroupContractProperties = &groupContractProperties
5120			}
5121		case "id":
5122			if v != nil {
5123				var ID string
5124				err = json.Unmarshal(*v, &ID)
5125				if err != nil {
5126					return err
5127				}
5128				gc.ID = &ID
5129			}
5130		case "name":
5131			if v != nil {
5132				var name string
5133				err = json.Unmarshal(*v, &name)
5134				if err != nil {
5135					return err
5136				}
5137				gc.Name = &name
5138			}
5139		case "type":
5140			if v != nil {
5141				var typeVar string
5142				err = json.Unmarshal(*v, &typeVar)
5143				if err != nil {
5144					return err
5145				}
5146				gc.Type = &typeVar
5147			}
5148		}
5149	}
5150
5151	return nil
5152}
5153
5154// GroupContractProperties group contract Properties.
5155type GroupContractProperties struct {
5156	// DisplayName - Group name.
5157	DisplayName *string `json:"displayName,omitempty"`
5158	// Description - Group description. Can contain HTML formatting tags.
5159	Description *string `json:"description,omitempty"`
5160	// BuiltIn - READ-ONLY; true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
5161	BuiltIn *bool `json:"builtIn,omitempty"`
5162	// Type - Group type. Possible values include: 'Custom', 'System', 'External'
5163	Type GroupType `json:"type,omitempty"`
5164	// 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.
5165	ExternalID *string `json:"externalId,omitempty"`
5166}
5167
5168// GroupCreateParameters parameters supplied to the Create Group operation.
5169type GroupCreateParameters struct {
5170	// GroupCreateParametersProperties - Properties supplied to Create Group operation.
5171	*GroupCreateParametersProperties `json:"properties,omitempty"`
5172}
5173
5174// MarshalJSON is the custom marshaler for GroupCreateParameters.
5175func (gcp GroupCreateParameters) MarshalJSON() ([]byte, error) {
5176	objectMap := make(map[string]interface{})
5177	if gcp.GroupCreateParametersProperties != nil {
5178		objectMap["properties"] = gcp.GroupCreateParametersProperties
5179	}
5180	return json.Marshal(objectMap)
5181}
5182
5183// UnmarshalJSON is the custom unmarshaler for GroupCreateParameters struct.
5184func (gcp *GroupCreateParameters) UnmarshalJSON(body []byte) error {
5185	var m map[string]*json.RawMessage
5186	err := json.Unmarshal(body, &m)
5187	if err != nil {
5188		return err
5189	}
5190	for k, v := range m {
5191		switch k {
5192		case "properties":
5193			if v != nil {
5194				var groupCreateParametersProperties GroupCreateParametersProperties
5195				err = json.Unmarshal(*v, &groupCreateParametersProperties)
5196				if err != nil {
5197					return err
5198				}
5199				gcp.GroupCreateParametersProperties = &groupCreateParametersProperties
5200			}
5201		}
5202	}
5203
5204	return nil
5205}
5206
5207// GroupCreateParametersProperties parameters supplied to the Create Group operation.
5208type GroupCreateParametersProperties struct {
5209	// DisplayName - Group name.
5210	DisplayName *string `json:"displayName,omitempty"`
5211	// Description - Group description.
5212	Description *string `json:"description,omitempty"`
5213	// Type - Group type. Possible values include: 'Custom', 'System', 'External'
5214	Type GroupType `json:"type,omitempty"`
5215	// 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.
5216	ExternalID *string `json:"externalId,omitempty"`
5217}
5218
5219// GroupUpdateParameters parameters supplied to the Update Group operation.
5220type GroupUpdateParameters struct {
5221	// GroupUpdateParametersProperties - Group entity update contract properties.
5222	*GroupUpdateParametersProperties `json:"properties,omitempty"`
5223}
5224
5225// MarshalJSON is the custom marshaler for GroupUpdateParameters.
5226func (gup GroupUpdateParameters) MarshalJSON() ([]byte, error) {
5227	objectMap := make(map[string]interface{})
5228	if gup.GroupUpdateParametersProperties != nil {
5229		objectMap["properties"] = gup.GroupUpdateParametersProperties
5230	}
5231	return json.Marshal(objectMap)
5232}
5233
5234// UnmarshalJSON is the custom unmarshaler for GroupUpdateParameters struct.
5235func (gup *GroupUpdateParameters) UnmarshalJSON(body []byte) error {
5236	var m map[string]*json.RawMessage
5237	err := json.Unmarshal(body, &m)
5238	if err != nil {
5239		return err
5240	}
5241	for k, v := range m {
5242		switch k {
5243		case "properties":
5244			if v != nil {
5245				var groupUpdateParametersProperties GroupUpdateParametersProperties
5246				err = json.Unmarshal(*v, &groupUpdateParametersProperties)
5247				if err != nil {
5248					return err
5249				}
5250				gup.GroupUpdateParametersProperties = &groupUpdateParametersProperties
5251			}
5252		}
5253	}
5254
5255	return nil
5256}
5257
5258// GroupUpdateParametersProperties parameters supplied to the Update Group operation.
5259type GroupUpdateParametersProperties struct {
5260	// DisplayName - Group name.
5261	DisplayName *string `json:"displayName,omitempty"`
5262	// Description - Group description.
5263	Description *string `json:"description,omitempty"`
5264	// Type - Group type. Possible values include: 'Custom', 'System', 'External'
5265	Type GroupType `json:"type,omitempty"`
5266	// 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.
5267	ExternalID *string `json:"externalId,omitempty"`
5268}
5269
5270// HostnameConfiguration custom hostname configuration.
5271type HostnameConfiguration struct {
5272	// Type - Hostname type. Possible values include: 'HostnameTypeProxy', 'HostnameTypePortal', 'HostnameTypeManagement', 'HostnameTypeScm', 'HostnameTypeDeveloperPortal'
5273	Type HostnameType `json:"type,omitempty"`
5274	// HostName - Hostname to configure on the Api Management service.
5275	HostName *string `json:"hostName,omitempty"`
5276	// KeyVaultID - Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with MSI. The secret should be of type *application/x-pkcs12*
5277	KeyVaultID *string `json:"keyVaultId,omitempty"`
5278	// EncodedCertificate - Base64 Encoded certificate.
5279	EncodedCertificate *string `json:"encodedCertificate,omitempty"`
5280	// CertificatePassword - Certificate Password.
5281	CertificatePassword *string `json:"certificatePassword,omitempty"`
5282	// DefaultSslBinding - Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to Proxy Hostname Type.
5283	DefaultSslBinding *bool `json:"defaultSslBinding,omitempty"`
5284	// NegotiateClientCertificate - Specify true to always negotiate client certificate on the hostname. Default Value is false.
5285	NegotiateClientCertificate *bool `json:"negotiateClientCertificate,omitempty"`
5286	// Certificate - Certificate information.
5287	Certificate *CertificateInformation `json:"certificate,omitempty"`
5288}
5289
5290// HTTPMessageDiagnostic http message diagnostic settings.
5291type HTTPMessageDiagnostic struct {
5292	// Headers - Array of HTTP Headers to log.
5293	Headers *[]string `json:"headers,omitempty"`
5294	// Body - Body logging settings.
5295	Body *BodyDiagnosticSettings `json:"body,omitempty"`
5296}
5297
5298// IdentityProviderBaseParameters identity Provider Base Parameter Properties.
5299type IdentityProviderBaseParameters struct {
5300	// Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C'
5301	Type IdentityProviderType `json:"type,omitempty"`
5302	// SigninTenant - The TenantId to use instead of Common when logging into Active Directory
5303	SigninTenant *string `json:"signinTenant,omitempty"`
5304	// AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login.
5305	AllowedTenants *[]string `json:"allowedTenants,omitempty"`
5306	// Authority - OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
5307	Authority *string `json:"authority,omitempty"`
5308	// SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider.
5309	SignupPolicyName *string `json:"signupPolicyName,omitempty"`
5310	// SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider.
5311	SigninPolicyName *string `json:"signinPolicyName,omitempty"`
5312	// ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
5313	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`
5314	// PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
5315	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`
5316}
5317
5318// IdentityProviderContract identity Provider details.
5319type IdentityProviderContract struct {
5320	autorest.Response `json:"-"`
5321	// IdentityProviderContractProperties - Identity Provider contract properties.
5322	*IdentityProviderContractProperties `json:"properties,omitempty"`
5323	// ID - READ-ONLY; Resource ID.
5324	ID *string `json:"id,omitempty"`
5325	// Name - READ-ONLY; Resource name.
5326	Name *string `json:"name,omitempty"`
5327	// Type - READ-ONLY; Resource type for API Management resource.
5328	Type *string `json:"type,omitempty"`
5329}
5330
5331// MarshalJSON is the custom marshaler for IdentityProviderContract.
5332func (ipc IdentityProviderContract) MarshalJSON() ([]byte, error) {
5333	objectMap := make(map[string]interface{})
5334	if ipc.IdentityProviderContractProperties != nil {
5335		objectMap["properties"] = ipc.IdentityProviderContractProperties
5336	}
5337	return json.Marshal(objectMap)
5338}
5339
5340// UnmarshalJSON is the custom unmarshaler for IdentityProviderContract struct.
5341func (ipc *IdentityProviderContract) UnmarshalJSON(body []byte) error {
5342	var m map[string]*json.RawMessage
5343	err := json.Unmarshal(body, &m)
5344	if err != nil {
5345		return err
5346	}
5347	for k, v := range m {
5348		switch k {
5349		case "properties":
5350			if v != nil {
5351				var identityProviderContractProperties IdentityProviderContractProperties
5352				err = json.Unmarshal(*v, &identityProviderContractProperties)
5353				if err != nil {
5354					return err
5355				}
5356				ipc.IdentityProviderContractProperties = &identityProviderContractProperties
5357			}
5358		case "id":
5359			if v != nil {
5360				var ID string
5361				err = json.Unmarshal(*v, &ID)
5362				if err != nil {
5363					return err
5364				}
5365				ipc.ID = &ID
5366			}
5367		case "name":
5368			if v != nil {
5369				var name string
5370				err = json.Unmarshal(*v, &name)
5371				if err != nil {
5372					return err
5373				}
5374				ipc.Name = &name
5375			}
5376		case "type":
5377			if v != nil {
5378				var typeVar string
5379				err = json.Unmarshal(*v, &typeVar)
5380				if err != nil {
5381					return err
5382				}
5383				ipc.Type = &typeVar
5384			}
5385		}
5386	}
5387
5388	return nil
5389}
5390
5391// IdentityProviderContractProperties the external Identity Providers like Facebook, Google, Microsoft,
5392// Twitter or Azure Active Directory which can be used to enable access to the API Management service
5393// developer portal for all users.
5394type IdentityProviderContractProperties struct {
5395	// 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.
5396	ClientID *string `json:"clientId,omitempty"`
5397	// 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. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
5398	ClientSecret *string `json:"clientSecret,omitempty"`
5399	// Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C'
5400	Type IdentityProviderType `json:"type,omitempty"`
5401	// SigninTenant - The TenantId to use instead of Common when logging into Active Directory
5402	SigninTenant *string `json:"signinTenant,omitempty"`
5403	// AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login.
5404	AllowedTenants *[]string `json:"allowedTenants,omitempty"`
5405	// Authority - OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
5406	Authority *string `json:"authority,omitempty"`
5407	// SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider.
5408	SignupPolicyName *string `json:"signupPolicyName,omitempty"`
5409	// SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider.
5410	SigninPolicyName *string `json:"signinPolicyName,omitempty"`
5411	// ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
5412	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`
5413	// PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
5414	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`
5415}
5416
5417// IdentityProviderCreateContract identity Provider details.
5418type IdentityProviderCreateContract struct {
5419	// IdentityProviderCreateContractProperties - Identity Provider contract properties.
5420	*IdentityProviderCreateContractProperties `json:"properties,omitempty"`
5421	// ID - READ-ONLY; Resource ID.
5422	ID *string `json:"id,omitempty"`
5423	// Name - READ-ONLY; Resource name.
5424	Name *string `json:"name,omitempty"`
5425	// Type - READ-ONLY; Resource type for API Management resource.
5426	Type *string `json:"type,omitempty"`
5427}
5428
5429// MarshalJSON is the custom marshaler for IdentityProviderCreateContract.
5430func (ipcc IdentityProviderCreateContract) MarshalJSON() ([]byte, error) {
5431	objectMap := make(map[string]interface{})
5432	if ipcc.IdentityProviderCreateContractProperties != nil {
5433		objectMap["properties"] = ipcc.IdentityProviderCreateContractProperties
5434	}
5435	return json.Marshal(objectMap)
5436}
5437
5438// UnmarshalJSON is the custom unmarshaler for IdentityProviderCreateContract struct.
5439func (ipcc *IdentityProviderCreateContract) UnmarshalJSON(body []byte) error {
5440	var m map[string]*json.RawMessage
5441	err := json.Unmarshal(body, &m)
5442	if err != nil {
5443		return err
5444	}
5445	for k, v := range m {
5446		switch k {
5447		case "properties":
5448			if v != nil {
5449				var identityProviderCreateContractProperties IdentityProviderCreateContractProperties
5450				err = json.Unmarshal(*v, &identityProviderCreateContractProperties)
5451				if err != nil {
5452					return err
5453				}
5454				ipcc.IdentityProviderCreateContractProperties = &identityProviderCreateContractProperties
5455			}
5456		case "id":
5457			if v != nil {
5458				var ID string
5459				err = json.Unmarshal(*v, &ID)
5460				if err != nil {
5461					return err
5462				}
5463				ipcc.ID = &ID
5464			}
5465		case "name":
5466			if v != nil {
5467				var name string
5468				err = json.Unmarshal(*v, &name)
5469				if err != nil {
5470					return err
5471				}
5472				ipcc.Name = &name
5473			}
5474		case "type":
5475			if v != nil {
5476				var typeVar string
5477				err = json.Unmarshal(*v, &typeVar)
5478				if err != nil {
5479					return err
5480				}
5481				ipcc.Type = &typeVar
5482			}
5483		}
5484	}
5485
5486	return nil
5487}
5488
5489// IdentityProviderCreateContractProperties the external Identity Providers like Facebook, Google,
5490// Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management
5491// service developer portal for all users.
5492type IdentityProviderCreateContractProperties struct {
5493	// 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.
5494	ClientID *string `json:"clientId,omitempty"`
5495	// 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. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
5496	ClientSecret *string `json:"clientSecret,omitempty"`
5497	// Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C'
5498	Type IdentityProviderType `json:"type,omitempty"`
5499	// SigninTenant - The TenantId to use instead of Common when logging into Active Directory
5500	SigninTenant *string `json:"signinTenant,omitempty"`
5501	// AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login.
5502	AllowedTenants *[]string `json:"allowedTenants,omitempty"`
5503	// Authority - OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
5504	Authority *string `json:"authority,omitempty"`
5505	// SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider.
5506	SignupPolicyName *string `json:"signupPolicyName,omitempty"`
5507	// SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider.
5508	SigninPolicyName *string `json:"signinPolicyName,omitempty"`
5509	// ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
5510	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`
5511	// PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
5512	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`
5513}
5514
5515// IdentityProviderList list of all the Identity Providers configured on the service instance.
5516type IdentityProviderList struct {
5517	autorest.Response `json:"-"`
5518	// Value - Identity Provider configuration values.
5519	Value *[]IdentityProviderContract `json:"value,omitempty"`
5520	// NextLink - Next page link if any.
5521	NextLink *string `json:"nextLink,omitempty"`
5522}
5523
5524// IdentityProviderListIterator provides access to a complete listing of IdentityProviderContract values.
5525type IdentityProviderListIterator struct {
5526	i    int
5527	page IdentityProviderListPage
5528}
5529
5530// NextWithContext advances to the next value.  If there was an error making
5531// the request the iterator does not advance and the error is returned.
5532func (iter *IdentityProviderListIterator) NextWithContext(ctx context.Context) (err error) {
5533	if tracing.IsEnabled() {
5534		ctx = tracing.StartSpan(ctx, fqdn+"/IdentityProviderListIterator.NextWithContext")
5535		defer func() {
5536			sc := -1
5537			if iter.Response().Response.Response != nil {
5538				sc = iter.Response().Response.Response.StatusCode
5539			}
5540			tracing.EndSpan(ctx, sc, err)
5541		}()
5542	}
5543	iter.i++
5544	if iter.i < len(iter.page.Values()) {
5545		return nil
5546	}
5547	err = iter.page.NextWithContext(ctx)
5548	if err != nil {
5549		iter.i--
5550		return err
5551	}
5552	iter.i = 0
5553	return nil
5554}
5555
5556// Next advances to the next value.  If there was an error making
5557// the request the iterator does not advance and the error is returned.
5558// Deprecated: Use NextWithContext() instead.
5559func (iter *IdentityProviderListIterator) Next() error {
5560	return iter.NextWithContext(context.Background())
5561}
5562
5563// NotDone returns true if the enumeration should be started or is not yet complete.
5564func (iter IdentityProviderListIterator) NotDone() bool {
5565	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5566}
5567
5568// Response returns the raw server response from the last page request.
5569func (iter IdentityProviderListIterator) Response() IdentityProviderList {
5570	return iter.page.Response()
5571}
5572
5573// Value returns the current value or a zero-initialized value if the
5574// iterator has advanced beyond the end of the collection.
5575func (iter IdentityProviderListIterator) Value() IdentityProviderContract {
5576	if !iter.page.NotDone() {
5577		return IdentityProviderContract{}
5578	}
5579	return iter.page.Values()[iter.i]
5580}
5581
5582// Creates a new instance of the IdentityProviderListIterator type.
5583func NewIdentityProviderListIterator(page IdentityProviderListPage) IdentityProviderListIterator {
5584	return IdentityProviderListIterator{page: page}
5585}
5586
5587// IsEmpty returns true if the ListResult contains no values.
5588func (ipl IdentityProviderList) IsEmpty() bool {
5589	return ipl.Value == nil || len(*ipl.Value) == 0
5590}
5591
5592// identityProviderListPreparer prepares a request to retrieve the next set of results.
5593// It returns nil if no more results exist.
5594func (ipl IdentityProviderList) identityProviderListPreparer(ctx context.Context) (*http.Request, error) {
5595	if ipl.NextLink == nil || len(to.String(ipl.NextLink)) < 1 {
5596		return nil, nil
5597	}
5598	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5599		autorest.AsJSON(),
5600		autorest.AsGet(),
5601		autorest.WithBaseURL(to.String(ipl.NextLink)))
5602}
5603
5604// IdentityProviderListPage contains a page of IdentityProviderContract values.
5605type IdentityProviderListPage struct {
5606	fn  func(context.Context, IdentityProviderList) (IdentityProviderList, error)
5607	ipl IdentityProviderList
5608}
5609
5610// NextWithContext advances to the next page of values.  If there was an error making
5611// the request the page does not advance and the error is returned.
5612func (page *IdentityProviderListPage) NextWithContext(ctx context.Context) (err error) {
5613	if tracing.IsEnabled() {
5614		ctx = tracing.StartSpan(ctx, fqdn+"/IdentityProviderListPage.NextWithContext")
5615		defer func() {
5616			sc := -1
5617			if page.Response().Response.Response != nil {
5618				sc = page.Response().Response.Response.StatusCode
5619			}
5620			tracing.EndSpan(ctx, sc, err)
5621		}()
5622	}
5623	next, err := page.fn(ctx, page.ipl)
5624	if err != nil {
5625		return err
5626	}
5627	page.ipl = next
5628	return nil
5629}
5630
5631// Next advances to the next page of values.  If there was an error making
5632// the request the page does not advance and the error is returned.
5633// Deprecated: Use NextWithContext() instead.
5634func (page *IdentityProviderListPage) Next() error {
5635	return page.NextWithContext(context.Background())
5636}
5637
5638// NotDone returns true if the page enumeration should be started or is not yet complete.
5639func (page IdentityProviderListPage) NotDone() bool {
5640	return !page.ipl.IsEmpty()
5641}
5642
5643// Response returns the raw server response from the last page request.
5644func (page IdentityProviderListPage) Response() IdentityProviderList {
5645	return page.ipl
5646}
5647
5648// Values returns the slice of values for the current page or nil if there are no values.
5649func (page IdentityProviderListPage) Values() []IdentityProviderContract {
5650	if page.ipl.IsEmpty() {
5651		return nil
5652	}
5653	return *page.ipl.Value
5654}
5655
5656// Creates a new instance of the IdentityProviderListPage type.
5657func NewIdentityProviderListPage(getNextPage func(context.Context, IdentityProviderList) (IdentityProviderList, error)) IdentityProviderListPage {
5658	return IdentityProviderListPage{fn: getNextPage}
5659}
5660
5661// IdentityProviderUpdateParameters parameters supplied to update Identity Provider
5662type IdentityProviderUpdateParameters struct {
5663	// IdentityProviderUpdateProperties - Identity Provider update properties.
5664	*IdentityProviderUpdateProperties `json:"properties,omitempty"`
5665}
5666
5667// MarshalJSON is the custom marshaler for IdentityProviderUpdateParameters.
5668func (ipup IdentityProviderUpdateParameters) MarshalJSON() ([]byte, error) {
5669	objectMap := make(map[string]interface{})
5670	if ipup.IdentityProviderUpdateProperties != nil {
5671		objectMap["properties"] = ipup.IdentityProviderUpdateProperties
5672	}
5673	return json.Marshal(objectMap)
5674}
5675
5676// UnmarshalJSON is the custom unmarshaler for IdentityProviderUpdateParameters struct.
5677func (ipup *IdentityProviderUpdateParameters) UnmarshalJSON(body []byte) error {
5678	var m map[string]*json.RawMessage
5679	err := json.Unmarshal(body, &m)
5680	if err != nil {
5681		return err
5682	}
5683	for k, v := range m {
5684		switch k {
5685		case "properties":
5686			if v != nil {
5687				var identityProviderUpdateProperties IdentityProviderUpdateProperties
5688				err = json.Unmarshal(*v, &identityProviderUpdateProperties)
5689				if err != nil {
5690					return err
5691				}
5692				ipup.IdentityProviderUpdateProperties = &identityProviderUpdateProperties
5693			}
5694		}
5695	}
5696
5697	return nil
5698}
5699
5700// IdentityProviderUpdateProperties parameters supplied to the Update Identity Provider operation.
5701type IdentityProviderUpdateProperties struct {
5702	// 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.
5703	ClientID *string `json:"clientId,omitempty"`
5704	// 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.
5705	ClientSecret *string `json:"clientSecret,omitempty"`
5706	// Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C'
5707	Type IdentityProviderType `json:"type,omitempty"`
5708	// SigninTenant - The TenantId to use instead of Common when logging into Active Directory
5709	SigninTenant *string `json:"signinTenant,omitempty"`
5710	// AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login.
5711	AllowedTenants *[]string `json:"allowedTenants,omitempty"`
5712	// Authority - OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
5713	Authority *string `json:"authority,omitempty"`
5714	// SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider.
5715	SignupPolicyName *string `json:"signupPolicyName,omitempty"`
5716	// SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider.
5717	SigninPolicyName *string `json:"signinPolicyName,omitempty"`
5718	// ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
5719	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`
5720	// PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
5721	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`
5722}
5723
5724// IssueAttachmentCollection paged Issue Attachment list representation.
5725type IssueAttachmentCollection struct {
5726	autorest.Response `json:"-"`
5727	// Value - READ-ONLY; Issue Attachment values.
5728	Value *[]IssueAttachmentContract `json:"value,omitempty"`
5729	// NextLink - READ-ONLY; Next page link if any.
5730	NextLink *string `json:"nextLink,omitempty"`
5731}
5732
5733// IssueAttachmentCollectionIterator provides access to a complete listing of IssueAttachmentContract
5734// values.
5735type IssueAttachmentCollectionIterator struct {
5736	i    int
5737	page IssueAttachmentCollectionPage
5738}
5739
5740// NextWithContext advances to the next value.  If there was an error making
5741// the request the iterator does not advance and the error is returned.
5742func (iter *IssueAttachmentCollectionIterator) NextWithContext(ctx context.Context) (err error) {
5743	if tracing.IsEnabled() {
5744		ctx = tracing.StartSpan(ctx, fqdn+"/IssueAttachmentCollectionIterator.NextWithContext")
5745		defer func() {
5746			sc := -1
5747			if iter.Response().Response.Response != nil {
5748				sc = iter.Response().Response.Response.StatusCode
5749			}
5750			tracing.EndSpan(ctx, sc, err)
5751		}()
5752	}
5753	iter.i++
5754	if iter.i < len(iter.page.Values()) {
5755		return nil
5756	}
5757	err = iter.page.NextWithContext(ctx)
5758	if err != nil {
5759		iter.i--
5760		return err
5761	}
5762	iter.i = 0
5763	return nil
5764}
5765
5766// Next advances to the next value.  If there was an error making
5767// the request the iterator does not advance and the error is returned.
5768// Deprecated: Use NextWithContext() instead.
5769func (iter *IssueAttachmentCollectionIterator) Next() error {
5770	return iter.NextWithContext(context.Background())
5771}
5772
5773// NotDone returns true if the enumeration should be started or is not yet complete.
5774func (iter IssueAttachmentCollectionIterator) NotDone() bool {
5775	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5776}
5777
5778// Response returns the raw server response from the last page request.
5779func (iter IssueAttachmentCollectionIterator) Response() IssueAttachmentCollection {
5780	return iter.page.Response()
5781}
5782
5783// Value returns the current value or a zero-initialized value if the
5784// iterator has advanced beyond the end of the collection.
5785func (iter IssueAttachmentCollectionIterator) Value() IssueAttachmentContract {
5786	if !iter.page.NotDone() {
5787		return IssueAttachmentContract{}
5788	}
5789	return iter.page.Values()[iter.i]
5790}
5791
5792// Creates a new instance of the IssueAttachmentCollectionIterator type.
5793func NewIssueAttachmentCollectionIterator(page IssueAttachmentCollectionPage) IssueAttachmentCollectionIterator {
5794	return IssueAttachmentCollectionIterator{page: page}
5795}
5796
5797// IsEmpty returns true if the ListResult contains no values.
5798func (iac IssueAttachmentCollection) IsEmpty() bool {
5799	return iac.Value == nil || len(*iac.Value) == 0
5800}
5801
5802// issueAttachmentCollectionPreparer prepares a request to retrieve the next set of results.
5803// It returns nil if no more results exist.
5804func (iac IssueAttachmentCollection) issueAttachmentCollectionPreparer(ctx context.Context) (*http.Request, error) {
5805	if iac.NextLink == nil || len(to.String(iac.NextLink)) < 1 {
5806		return nil, nil
5807	}
5808	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5809		autorest.AsJSON(),
5810		autorest.AsGet(),
5811		autorest.WithBaseURL(to.String(iac.NextLink)))
5812}
5813
5814// IssueAttachmentCollectionPage contains a page of IssueAttachmentContract values.
5815type IssueAttachmentCollectionPage struct {
5816	fn  func(context.Context, IssueAttachmentCollection) (IssueAttachmentCollection, error)
5817	iac IssueAttachmentCollection
5818}
5819
5820// NextWithContext advances to the next page of values.  If there was an error making
5821// the request the page does not advance and the error is returned.
5822func (page *IssueAttachmentCollectionPage) NextWithContext(ctx context.Context) (err error) {
5823	if tracing.IsEnabled() {
5824		ctx = tracing.StartSpan(ctx, fqdn+"/IssueAttachmentCollectionPage.NextWithContext")
5825		defer func() {
5826			sc := -1
5827			if page.Response().Response.Response != nil {
5828				sc = page.Response().Response.Response.StatusCode
5829			}
5830			tracing.EndSpan(ctx, sc, err)
5831		}()
5832	}
5833	next, err := page.fn(ctx, page.iac)
5834	if err != nil {
5835		return err
5836	}
5837	page.iac = next
5838	return nil
5839}
5840
5841// Next advances to the next page of values.  If there was an error making
5842// the request the page does not advance and the error is returned.
5843// Deprecated: Use NextWithContext() instead.
5844func (page *IssueAttachmentCollectionPage) Next() error {
5845	return page.NextWithContext(context.Background())
5846}
5847
5848// NotDone returns true if the page enumeration should be started or is not yet complete.
5849func (page IssueAttachmentCollectionPage) NotDone() bool {
5850	return !page.iac.IsEmpty()
5851}
5852
5853// Response returns the raw server response from the last page request.
5854func (page IssueAttachmentCollectionPage) Response() IssueAttachmentCollection {
5855	return page.iac
5856}
5857
5858// Values returns the slice of values for the current page or nil if there are no values.
5859func (page IssueAttachmentCollectionPage) Values() []IssueAttachmentContract {
5860	if page.iac.IsEmpty() {
5861		return nil
5862	}
5863	return *page.iac.Value
5864}
5865
5866// Creates a new instance of the IssueAttachmentCollectionPage type.
5867func NewIssueAttachmentCollectionPage(getNextPage func(context.Context, IssueAttachmentCollection) (IssueAttachmentCollection, error)) IssueAttachmentCollectionPage {
5868	return IssueAttachmentCollectionPage{fn: getNextPage}
5869}
5870
5871// IssueAttachmentContract issue Attachment Contract details.
5872type IssueAttachmentContract struct {
5873	autorest.Response `json:"-"`
5874	// IssueAttachmentContractProperties - Properties of the Issue Attachment.
5875	*IssueAttachmentContractProperties `json:"properties,omitempty"`
5876	// ID - READ-ONLY; Resource ID.
5877	ID *string `json:"id,omitempty"`
5878	// Name - READ-ONLY; Resource name.
5879	Name *string `json:"name,omitempty"`
5880	// Type - READ-ONLY; Resource type for API Management resource.
5881	Type *string `json:"type,omitempty"`
5882}
5883
5884// MarshalJSON is the custom marshaler for IssueAttachmentContract.
5885func (iac IssueAttachmentContract) MarshalJSON() ([]byte, error) {
5886	objectMap := make(map[string]interface{})
5887	if iac.IssueAttachmentContractProperties != nil {
5888		objectMap["properties"] = iac.IssueAttachmentContractProperties
5889	}
5890	return json.Marshal(objectMap)
5891}
5892
5893// UnmarshalJSON is the custom unmarshaler for IssueAttachmentContract struct.
5894func (iac *IssueAttachmentContract) UnmarshalJSON(body []byte) error {
5895	var m map[string]*json.RawMessage
5896	err := json.Unmarshal(body, &m)
5897	if err != nil {
5898		return err
5899	}
5900	for k, v := range m {
5901		switch k {
5902		case "properties":
5903			if v != nil {
5904				var issueAttachmentContractProperties IssueAttachmentContractProperties
5905				err = json.Unmarshal(*v, &issueAttachmentContractProperties)
5906				if err != nil {
5907					return err
5908				}
5909				iac.IssueAttachmentContractProperties = &issueAttachmentContractProperties
5910			}
5911		case "id":
5912			if v != nil {
5913				var ID string
5914				err = json.Unmarshal(*v, &ID)
5915				if err != nil {
5916					return err
5917				}
5918				iac.ID = &ID
5919			}
5920		case "name":
5921			if v != nil {
5922				var name string
5923				err = json.Unmarshal(*v, &name)
5924				if err != nil {
5925					return err
5926				}
5927				iac.Name = &name
5928			}
5929		case "type":
5930			if v != nil {
5931				var typeVar string
5932				err = json.Unmarshal(*v, &typeVar)
5933				if err != nil {
5934					return err
5935				}
5936				iac.Type = &typeVar
5937			}
5938		}
5939	}
5940
5941	return nil
5942}
5943
5944// IssueAttachmentContractProperties issue Attachment contract Properties.
5945type IssueAttachmentContractProperties struct {
5946	// Title - Filename by which the binary data will be saved.
5947	Title *string `json:"title,omitempty"`
5948	// ContentFormat - Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property.
5949	ContentFormat *string `json:"contentFormat,omitempty"`
5950	// Content - An HTTP link or Base64-encoded binary data.
5951	Content *string `json:"content,omitempty"`
5952}
5953
5954// IssueCollection paged Issue list representation.
5955type IssueCollection struct {
5956	autorest.Response `json:"-"`
5957	// Value - READ-ONLY; Issue values.
5958	Value *[]IssueContract `json:"value,omitempty"`
5959	// NextLink - READ-ONLY; Next page link if any.
5960	NextLink *string `json:"nextLink,omitempty"`
5961}
5962
5963// IssueCollectionIterator provides access to a complete listing of IssueContract values.
5964type IssueCollectionIterator struct {
5965	i    int
5966	page IssueCollectionPage
5967}
5968
5969// NextWithContext advances to the next value.  If there was an error making
5970// the request the iterator does not advance and the error is returned.
5971func (iter *IssueCollectionIterator) NextWithContext(ctx context.Context) (err error) {
5972	if tracing.IsEnabled() {
5973		ctx = tracing.StartSpan(ctx, fqdn+"/IssueCollectionIterator.NextWithContext")
5974		defer func() {
5975			sc := -1
5976			if iter.Response().Response.Response != nil {
5977				sc = iter.Response().Response.Response.StatusCode
5978			}
5979			tracing.EndSpan(ctx, sc, err)
5980		}()
5981	}
5982	iter.i++
5983	if iter.i < len(iter.page.Values()) {
5984		return nil
5985	}
5986	err = iter.page.NextWithContext(ctx)
5987	if err != nil {
5988		iter.i--
5989		return err
5990	}
5991	iter.i = 0
5992	return nil
5993}
5994
5995// Next advances to the next value.  If there was an error making
5996// the request the iterator does not advance and the error is returned.
5997// Deprecated: Use NextWithContext() instead.
5998func (iter *IssueCollectionIterator) Next() error {
5999	return iter.NextWithContext(context.Background())
6000}
6001
6002// NotDone returns true if the enumeration should be started or is not yet complete.
6003func (iter IssueCollectionIterator) NotDone() bool {
6004	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6005}
6006
6007// Response returns the raw server response from the last page request.
6008func (iter IssueCollectionIterator) Response() IssueCollection {
6009	return iter.page.Response()
6010}
6011
6012// Value returns the current value or a zero-initialized value if the
6013// iterator has advanced beyond the end of the collection.
6014func (iter IssueCollectionIterator) Value() IssueContract {
6015	if !iter.page.NotDone() {
6016		return IssueContract{}
6017	}
6018	return iter.page.Values()[iter.i]
6019}
6020
6021// Creates a new instance of the IssueCollectionIterator type.
6022func NewIssueCollectionIterator(page IssueCollectionPage) IssueCollectionIterator {
6023	return IssueCollectionIterator{page: page}
6024}
6025
6026// IsEmpty returns true if the ListResult contains no values.
6027func (ic IssueCollection) IsEmpty() bool {
6028	return ic.Value == nil || len(*ic.Value) == 0
6029}
6030
6031// issueCollectionPreparer prepares a request to retrieve the next set of results.
6032// It returns nil if no more results exist.
6033func (ic IssueCollection) issueCollectionPreparer(ctx context.Context) (*http.Request, error) {
6034	if ic.NextLink == nil || len(to.String(ic.NextLink)) < 1 {
6035		return nil, nil
6036	}
6037	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6038		autorest.AsJSON(),
6039		autorest.AsGet(),
6040		autorest.WithBaseURL(to.String(ic.NextLink)))
6041}
6042
6043// IssueCollectionPage contains a page of IssueContract values.
6044type IssueCollectionPage struct {
6045	fn func(context.Context, IssueCollection) (IssueCollection, error)
6046	ic IssueCollection
6047}
6048
6049// NextWithContext advances to the next page of values.  If there was an error making
6050// the request the page does not advance and the error is returned.
6051func (page *IssueCollectionPage) NextWithContext(ctx context.Context) (err error) {
6052	if tracing.IsEnabled() {
6053		ctx = tracing.StartSpan(ctx, fqdn+"/IssueCollectionPage.NextWithContext")
6054		defer func() {
6055			sc := -1
6056			if page.Response().Response.Response != nil {
6057				sc = page.Response().Response.Response.StatusCode
6058			}
6059			tracing.EndSpan(ctx, sc, err)
6060		}()
6061	}
6062	next, err := page.fn(ctx, page.ic)
6063	if err != nil {
6064		return err
6065	}
6066	page.ic = next
6067	return nil
6068}
6069
6070// Next advances to the next page of values.  If there was an error making
6071// the request the page does not advance and the error is returned.
6072// Deprecated: Use NextWithContext() instead.
6073func (page *IssueCollectionPage) Next() error {
6074	return page.NextWithContext(context.Background())
6075}
6076
6077// NotDone returns true if the page enumeration should be started or is not yet complete.
6078func (page IssueCollectionPage) NotDone() bool {
6079	return !page.ic.IsEmpty()
6080}
6081
6082// Response returns the raw server response from the last page request.
6083func (page IssueCollectionPage) Response() IssueCollection {
6084	return page.ic
6085}
6086
6087// Values returns the slice of values for the current page or nil if there are no values.
6088func (page IssueCollectionPage) Values() []IssueContract {
6089	if page.ic.IsEmpty() {
6090		return nil
6091	}
6092	return *page.ic.Value
6093}
6094
6095// Creates a new instance of the IssueCollectionPage type.
6096func NewIssueCollectionPage(getNextPage func(context.Context, IssueCollection) (IssueCollection, error)) IssueCollectionPage {
6097	return IssueCollectionPage{fn: getNextPage}
6098}
6099
6100// IssueCommentCollection paged Issue Comment list representation.
6101type IssueCommentCollection struct {
6102	autorest.Response `json:"-"`
6103	// Value - READ-ONLY; Issue Comment values.
6104	Value *[]IssueCommentContract `json:"value,omitempty"`
6105	// NextLink - READ-ONLY; Next page link if any.
6106	NextLink *string `json:"nextLink,omitempty"`
6107}
6108
6109// IssueCommentCollectionIterator provides access to a complete listing of IssueCommentContract values.
6110type IssueCommentCollectionIterator struct {
6111	i    int
6112	page IssueCommentCollectionPage
6113}
6114
6115// NextWithContext advances to the next value.  If there was an error making
6116// the request the iterator does not advance and the error is returned.
6117func (iter *IssueCommentCollectionIterator) NextWithContext(ctx context.Context) (err error) {
6118	if tracing.IsEnabled() {
6119		ctx = tracing.StartSpan(ctx, fqdn+"/IssueCommentCollectionIterator.NextWithContext")
6120		defer func() {
6121			sc := -1
6122			if iter.Response().Response.Response != nil {
6123				sc = iter.Response().Response.Response.StatusCode
6124			}
6125			tracing.EndSpan(ctx, sc, err)
6126		}()
6127	}
6128	iter.i++
6129	if iter.i < len(iter.page.Values()) {
6130		return nil
6131	}
6132	err = iter.page.NextWithContext(ctx)
6133	if err != nil {
6134		iter.i--
6135		return err
6136	}
6137	iter.i = 0
6138	return nil
6139}
6140
6141// Next advances to the next value.  If there was an error making
6142// the request the iterator does not advance and the error is returned.
6143// Deprecated: Use NextWithContext() instead.
6144func (iter *IssueCommentCollectionIterator) Next() error {
6145	return iter.NextWithContext(context.Background())
6146}
6147
6148// NotDone returns true if the enumeration should be started or is not yet complete.
6149func (iter IssueCommentCollectionIterator) NotDone() bool {
6150	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6151}
6152
6153// Response returns the raw server response from the last page request.
6154func (iter IssueCommentCollectionIterator) Response() IssueCommentCollection {
6155	return iter.page.Response()
6156}
6157
6158// Value returns the current value or a zero-initialized value if the
6159// iterator has advanced beyond the end of the collection.
6160func (iter IssueCommentCollectionIterator) Value() IssueCommentContract {
6161	if !iter.page.NotDone() {
6162		return IssueCommentContract{}
6163	}
6164	return iter.page.Values()[iter.i]
6165}
6166
6167// Creates a new instance of the IssueCommentCollectionIterator type.
6168func NewIssueCommentCollectionIterator(page IssueCommentCollectionPage) IssueCommentCollectionIterator {
6169	return IssueCommentCollectionIterator{page: page}
6170}
6171
6172// IsEmpty returns true if the ListResult contains no values.
6173func (icc IssueCommentCollection) IsEmpty() bool {
6174	return icc.Value == nil || len(*icc.Value) == 0
6175}
6176
6177// issueCommentCollectionPreparer prepares a request to retrieve the next set of results.
6178// It returns nil if no more results exist.
6179func (icc IssueCommentCollection) issueCommentCollectionPreparer(ctx context.Context) (*http.Request, error) {
6180	if icc.NextLink == nil || len(to.String(icc.NextLink)) < 1 {
6181		return nil, nil
6182	}
6183	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6184		autorest.AsJSON(),
6185		autorest.AsGet(),
6186		autorest.WithBaseURL(to.String(icc.NextLink)))
6187}
6188
6189// IssueCommentCollectionPage contains a page of IssueCommentContract values.
6190type IssueCommentCollectionPage struct {
6191	fn  func(context.Context, IssueCommentCollection) (IssueCommentCollection, error)
6192	icc IssueCommentCollection
6193}
6194
6195// NextWithContext advances to the next page of values.  If there was an error making
6196// the request the page does not advance and the error is returned.
6197func (page *IssueCommentCollectionPage) NextWithContext(ctx context.Context) (err error) {
6198	if tracing.IsEnabled() {
6199		ctx = tracing.StartSpan(ctx, fqdn+"/IssueCommentCollectionPage.NextWithContext")
6200		defer func() {
6201			sc := -1
6202			if page.Response().Response.Response != nil {
6203				sc = page.Response().Response.Response.StatusCode
6204			}
6205			tracing.EndSpan(ctx, sc, err)
6206		}()
6207	}
6208	next, err := page.fn(ctx, page.icc)
6209	if err != nil {
6210		return err
6211	}
6212	page.icc = next
6213	return nil
6214}
6215
6216// Next advances to the next page of values.  If there was an error making
6217// the request the page does not advance and the error is returned.
6218// Deprecated: Use NextWithContext() instead.
6219func (page *IssueCommentCollectionPage) Next() error {
6220	return page.NextWithContext(context.Background())
6221}
6222
6223// NotDone returns true if the page enumeration should be started or is not yet complete.
6224func (page IssueCommentCollectionPage) NotDone() bool {
6225	return !page.icc.IsEmpty()
6226}
6227
6228// Response returns the raw server response from the last page request.
6229func (page IssueCommentCollectionPage) Response() IssueCommentCollection {
6230	return page.icc
6231}
6232
6233// Values returns the slice of values for the current page or nil if there are no values.
6234func (page IssueCommentCollectionPage) Values() []IssueCommentContract {
6235	if page.icc.IsEmpty() {
6236		return nil
6237	}
6238	return *page.icc.Value
6239}
6240
6241// Creates a new instance of the IssueCommentCollectionPage type.
6242func NewIssueCommentCollectionPage(getNextPage func(context.Context, IssueCommentCollection) (IssueCommentCollection, error)) IssueCommentCollectionPage {
6243	return IssueCommentCollectionPage{fn: getNextPage}
6244}
6245
6246// IssueCommentContract issue Comment Contract details.
6247type IssueCommentContract struct {
6248	autorest.Response `json:"-"`
6249	// IssueCommentContractProperties - Properties of the Issue Comment.
6250	*IssueCommentContractProperties `json:"properties,omitempty"`
6251	// ID - READ-ONLY; Resource ID.
6252	ID *string `json:"id,omitempty"`
6253	// Name - READ-ONLY; Resource name.
6254	Name *string `json:"name,omitempty"`
6255	// Type - READ-ONLY; Resource type for API Management resource.
6256	Type *string `json:"type,omitempty"`
6257}
6258
6259// MarshalJSON is the custom marshaler for IssueCommentContract.
6260func (icc IssueCommentContract) MarshalJSON() ([]byte, error) {
6261	objectMap := make(map[string]interface{})
6262	if icc.IssueCommentContractProperties != nil {
6263		objectMap["properties"] = icc.IssueCommentContractProperties
6264	}
6265	return json.Marshal(objectMap)
6266}
6267
6268// UnmarshalJSON is the custom unmarshaler for IssueCommentContract struct.
6269func (icc *IssueCommentContract) UnmarshalJSON(body []byte) error {
6270	var m map[string]*json.RawMessage
6271	err := json.Unmarshal(body, &m)
6272	if err != nil {
6273		return err
6274	}
6275	for k, v := range m {
6276		switch k {
6277		case "properties":
6278			if v != nil {
6279				var issueCommentContractProperties IssueCommentContractProperties
6280				err = json.Unmarshal(*v, &issueCommentContractProperties)
6281				if err != nil {
6282					return err
6283				}
6284				icc.IssueCommentContractProperties = &issueCommentContractProperties
6285			}
6286		case "id":
6287			if v != nil {
6288				var ID string
6289				err = json.Unmarshal(*v, &ID)
6290				if err != nil {
6291					return err
6292				}
6293				icc.ID = &ID
6294			}
6295		case "name":
6296			if v != nil {
6297				var name string
6298				err = json.Unmarshal(*v, &name)
6299				if err != nil {
6300					return err
6301				}
6302				icc.Name = &name
6303			}
6304		case "type":
6305			if v != nil {
6306				var typeVar string
6307				err = json.Unmarshal(*v, &typeVar)
6308				if err != nil {
6309					return err
6310				}
6311				icc.Type = &typeVar
6312			}
6313		}
6314	}
6315
6316	return nil
6317}
6318
6319// IssueCommentContractProperties issue Comment contract Properties.
6320type IssueCommentContractProperties struct {
6321	// Text - Comment text.
6322	Text *string `json:"text,omitempty"`
6323	// CreatedDate - Date and time when the comment was created.
6324	CreatedDate *date.Time `json:"createdDate,omitempty"`
6325	// UserID - A resource identifier for the user who left the comment.
6326	UserID *string `json:"userId,omitempty"`
6327}
6328
6329// IssueContract issue Contract details.
6330type IssueContract struct {
6331	autorest.Response `json:"-"`
6332	// IssueContractProperties - Properties of the Issue.
6333	*IssueContractProperties `json:"properties,omitempty"`
6334	// ID - READ-ONLY; Resource ID.
6335	ID *string `json:"id,omitempty"`
6336	// Name - READ-ONLY; Resource name.
6337	Name *string `json:"name,omitempty"`
6338	// Type - READ-ONLY; Resource type for API Management resource.
6339	Type *string `json:"type,omitempty"`
6340}
6341
6342// MarshalJSON is the custom marshaler for IssueContract.
6343func (ic IssueContract) MarshalJSON() ([]byte, error) {
6344	objectMap := make(map[string]interface{})
6345	if ic.IssueContractProperties != nil {
6346		objectMap["properties"] = ic.IssueContractProperties
6347	}
6348	return json.Marshal(objectMap)
6349}
6350
6351// UnmarshalJSON is the custom unmarshaler for IssueContract struct.
6352func (ic *IssueContract) UnmarshalJSON(body []byte) error {
6353	var m map[string]*json.RawMessage
6354	err := json.Unmarshal(body, &m)
6355	if err != nil {
6356		return err
6357	}
6358	for k, v := range m {
6359		switch k {
6360		case "properties":
6361			if v != nil {
6362				var issueContractProperties IssueContractProperties
6363				err = json.Unmarshal(*v, &issueContractProperties)
6364				if err != nil {
6365					return err
6366				}
6367				ic.IssueContractProperties = &issueContractProperties
6368			}
6369		case "id":
6370			if v != nil {
6371				var ID string
6372				err = json.Unmarshal(*v, &ID)
6373				if err != nil {
6374					return err
6375				}
6376				ic.ID = &ID
6377			}
6378		case "name":
6379			if v != nil {
6380				var name string
6381				err = json.Unmarshal(*v, &name)
6382				if err != nil {
6383					return err
6384				}
6385				ic.Name = &name
6386			}
6387		case "type":
6388			if v != nil {
6389				var typeVar string
6390				err = json.Unmarshal(*v, &typeVar)
6391				if err != nil {
6392					return err
6393				}
6394				ic.Type = &typeVar
6395			}
6396		}
6397	}
6398
6399	return nil
6400}
6401
6402// IssueContractBaseProperties issue contract Base Properties.
6403type IssueContractBaseProperties struct {
6404	// CreatedDate - Date and time when the issue was created.
6405	CreatedDate *date.Time `json:"createdDate,omitempty"`
6406	// State - Status of the issue. Possible values include: 'Proposed', 'Open', 'Removed', 'Resolved', 'Closed'
6407	State State `json:"state,omitempty"`
6408	// APIID - A resource identifier for the API the issue was created for.
6409	APIID *string `json:"apiId,omitempty"`
6410}
6411
6412// IssueContractProperties issue contract Properties.
6413type IssueContractProperties struct {
6414	// Title - The issue title.
6415	Title *string `json:"title,omitempty"`
6416	// Description - Text describing the issue.
6417	Description *string `json:"description,omitempty"`
6418	// UserID - A resource identifier for the user created the issue.
6419	UserID *string `json:"userId,omitempty"`
6420	// CreatedDate - Date and time when the issue was created.
6421	CreatedDate *date.Time `json:"createdDate,omitempty"`
6422	// State - Status of the issue. Possible values include: 'Proposed', 'Open', 'Removed', 'Resolved', 'Closed'
6423	State State `json:"state,omitempty"`
6424	// APIID - A resource identifier for the API the issue was created for.
6425	APIID *string `json:"apiId,omitempty"`
6426}
6427
6428// IssueUpdateContract issue update Parameters.
6429type IssueUpdateContract struct {
6430	// IssueUpdateContractProperties - Issue entity Update contract properties.
6431	*IssueUpdateContractProperties `json:"properties,omitempty"`
6432}
6433
6434// MarshalJSON is the custom marshaler for IssueUpdateContract.
6435func (iuc IssueUpdateContract) MarshalJSON() ([]byte, error) {
6436	objectMap := make(map[string]interface{})
6437	if iuc.IssueUpdateContractProperties != nil {
6438		objectMap["properties"] = iuc.IssueUpdateContractProperties
6439	}
6440	return json.Marshal(objectMap)
6441}
6442
6443// UnmarshalJSON is the custom unmarshaler for IssueUpdateContract struct.
6444func (iuc *IssueUpdateContract) UnmarshalJSON(body []byte) error {
6445	var m map[string]*json.RawMessage
6446	err := json.Unmarshal(body, &m)
6447	if err != nil {
6448		return err
6449	}
6450	for k, v := range m {
6451		switch k {
6452		case "properties":
6453			if v != nil {
6454				var issueUpdateContractProperties IssueUpdateContractProperties
6455				err = json.Unmarshal(*v, &issueUpdateContractProperties)
6456				if err != nil {
6457					return err
6458				}
6459				iuc.IssueUpdateContractProperties = &issueUpdateContractProperties
6460			}
6461		}
6462	}
6463
6464	return nil
6465}
6466
6467// IssueUpdateContractProperties issue contract Update Properties.
6468type IssueUpdateContractProperties struct {
6469	// Title - The issue title.
6470	Title *string `json:"title,omitempty"`
6471	// Description - Text describing the issue.
6472	Description *string `json:"description,omitempty"`
6473	// UserID - A resource identifier for the user created the issue.
6474	UserID *string `json:"userId,omitempty"`
6475	// CreatedDate - Date and time when the issue was created.
6476	CreatedDate *date.Time `json:"createdDate,omitempty"`
6477	// State - Status of the issue. Possible values include: 'Proposed', 'Open', 'Removed', 'Resolved', 'Closed'
6478	State State `json:"state,omitempty"`
6479	// APIID - A resource identifier for the API the issue was created for.
6480	APIID *string `json:"apiId,omitempty"`
6481}
6482
6483// ListNetworkStatusContractByLocation ...
6484type ListNetworkStatusContractByLocation struct {
6485	autorest.Response `json:"-"`
6486	Value             *[]NetworkStatusContractByLocation `json:"value,omitempty"`
6487}
6488
6489// LoggerCollection paged Logger list representation.
6490type LoggerCollection struct {
6491	autorest.Response `json:"-"`
6492	// Value - Logger values.
6493	Value *[]LoggerContract `json:"value,omitempty"`
6494	// Count - Total record count number across all pages.
6495	Count *int64 `json:"count,omitempty"`
6496	// NextLink - Next page link if any.
6497	NextLink *string `json:"nextLink,omitempty"`
6498}
6499
6500// LoggerCollectionIterator provides access to a complete listing of LoggerContract values.
6501type LoggerCollectionIterator struct {
6502	i    int
6503	page LoggerCollectionPage
6504}
6505
6506// NextWithContext advances to the next value.  If there was an error making
6507// the request the iterator does not advance and the error is returned.
6508func (iter *LoggerCollectionIterator) NextWithContext(ctx context.Context) (err error) {
6509	if tracing.IsEnabled() {
6510		ctx = tracing.StartSpan(ctx, fqdn+"/LoggerCollectionIterator.NextWithContext")
6511		defer func() {
6512			sc := -1
6513			if iter.Response().Response.Response != nil {
6514				sc = iter.Response().Response.Response.StatusCode
6515			}
6516			tracing.EndSpan(ctx, sc, err)
6517		}()
6518	}
6519	iter.i++
6520	if iter.i < len(iter.page.Values()) {
6521		return nil
6522	}
6523	err = iter.page.NextWithContext(ctx)
6524	if err != nil {
6525		iter.i--
6526		return err
6527	}
6528	iter.i = 0
6529	return nil
6530}
6531
6532// Next advances to the next value.  If there was an error making
6533// the request the iterator does not advance and the error is returned.
6534// Deprecated: Use NextWithContext() instead.
6535func (iter *LoggerCollectionIterator) Next() error {
6536	return iter.NextWithContext(context.Background())
6537}
6538
6539// NotDone returns true if the enumeration should be started or is not yet complete.
6540func (iter LoggerCollectionIterator) NotDone() bool {
6541	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6542}
6543
6544// Response returns the raw server response from the last page request.
6545func (iter LoggerCollectionIterator) Response() LoggerCollection {
6546	return iter.page.Response()
6547}
6548
6549// Value returns the current value or a zero-initialized value if the
6550// iterator has advanced beyond the end of the collection.
6551func (iter LoggerCollectionIterator) Value() LoggerContract {
6552	if !iter.page.NotDone() {
6553		return LoggerContract{}
6554	}
6555	return iter.page.Values()[iter.i]
6556}
6557
6558// Creates a new instance of the LoggerCollectionIterator type.
6559func NewLoggerCollectionIterator(page LoggerCollectionPage) LoggerCollectionIterator {
6560	return LoggerCollectionIterator{page: page}
6561}
6562
6563// IsEmpty returns true if the ListResult contains no values.
6564func (lc LoggerCollection) IsEmpty() bool {
6565	return lc.Value == nil || len(*lc.Value) == 0
6566}
6567
6568// loggerCollectionPreparer prepares a request to retrieve the next set of results.
6569// It returns nil if no more results exist.
6570func (lc LoggerCollection) loggerCollectionPreparer(ctx context.Context) (*http.Request, error) {
6571	if lc.NextLink == nil || len(to.String(lc.NextLink)) < 1 {
6572		return nil, nil
6573	}
6574	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6575		autorest.AsJSON(),
6576		autorest.AsGet(),
6577		autorest.WithBaseURL(to.String(lc.NextLink)))
6578}
6579
6580// LoggerCollectionPage contains a page of LoggerContract values.
6581type LoggerCollectionPage struct {
6582	fn func(context.Context, LoggerCollection) (LoggerCollection, error)
6583	lc LoggerCollection
6584}
6585
6586// NextWithContext advances to the next page of values.  If there was an error making
6587// the request the page does not advance and the error is returned.
6588func (page *LoggerCollectionPage) NextWithContext(ctx context.Context) (err error) {
6589	if tracing.IsEnabled() {
6590		ctx = tracing.StartSpan(ctx, fqdn+"/LoggerCollectionPage.NextWithContext")
6591		defer func() {
6592			sc := -1
6593			if page.Response().Response.Response != nil {
6594				sc = page.Response().Response.Response.StatusCode
6595			}
6596			tracing.EndSpan(ctx, sc, err)
6597		}()
6598	}
6599	next, err := page.fn(ctx, page.lc)
6600	if err != nil {
6601		return err
6602	}
6603	page.lc = next
6604	return nil
6605}
6606
6607// Next advances to the next page of values.  If there was an error making
6608// the request the page does not advance and the error is returned.
6609// Deprecated: Use NextWithContext() instead.
6610func (page *LoggerCollectionPage) Next() error {
6611	return page.NextWithContext(context.Background())
6612}
6613
6614// NotDone returns true if the page enumeration should be started or is not yet complete.
6615func (page LoggerCollectionPage) NotDone() bool {
6616	return !page.lc.IsEmpty()
6617}
6618
6619// Response returns the raw server response from the last page request.
6620func (page LoggerCollectionPage) Response() LoggerCollection {
6621	return page.lc
6622}
6623
6624// Values returns the slice of values for the current page or nil if there are no values.
6625func (page LoggerCollectionPage) Values() []LoggerContract {
6626	if page.lc.IsEmpty() {
6627		return nil
6628	}
6629	return *page.lc.Value
6630}
6631
6632// Creates a new instance of the LoggerCollectionPage type.
6633func NewLoggerCollectionPage(getNextPage func(context.Context, LoggerCollection) (LoggerCollection, error)) LoggerCollectionPage {
6634	return LoggerCollectionPage{fn: getNextPage}
6635}
6636
6637// LoggerContract logger details.
6638type LoggerContract struct {
6639	autorest.Response `json:"-"`
6640	// LoggerContractProperties - Logger entity contract properties.
6641	*LoggerContractProperties `json:"properties,omitempty"`
6642	// ID - READ-ONLY; Resource ID.
6643	ID *string `json:"id,omitempty"`
6644	// Name - READ-ONLY; Resource name.
6645	Name *string `json:"name,omitempty"`
6646	// Type - READ-ONLY; Resource type for API Management resource.
6647	Type *string `json:"type,omitempty"`
6648}
6649
6650// MarshalJSON is the custom marshaler for LoggerContract.
6651func (lc LoggerContract) MarshalJSON() ([]byte, error) {
6652	objectMap := make(map[string]interface{})
6653	if lc.LoggerContractProperties != nil {
6654		objectMap["properties"] = lc.LoggerContractProperties
6655	}
6656	return json.Marshal(objectMap)
6657}
6658
6659// UnmarshalJSON is the custom unmarshaler for LoggerContract struct.
6660func (lc *LoggerContract) UnmarshalJSON(body []byte) error {
6661	var m map[string]*json.RawMessage
6662	err := json.Unmarshal(body, &m)
6663	if err != nil {
6664		return err
6665	}
6666	for k, v := range m {
6667		switch k {
6668		case "properties":
6669			if v != nil {
6670				var loggerContractProperties LoggerContractProperties
6671				err = json.Unmarshal(*v, &loggerContractProperties)
6672				if err != nil {
6673					return err
6674				}
6675				lc.LoggerContractProperties = &loggerContractProperties
6676			}
6677		case "id":
6678			if v != nil {
6679				var ID string
6680				err = json.Unmarshal(*v, &ID)
6681				if err != nil {
6682					return err
6683				}
6684				lc.ID = &ID
6685			}
6686		case "name":
6687			if v != nil {
6688				var name string
6689				err = json.Unmarshal(*v, &name)
6690				if err != nil {
6691					return err
6692				}
6693				lc.Name = &name
6694			}
6695		case "type":
6696			if v != nil {
6697				var typeVar string
6698				err = json.Unmarshal(*v, &typeVar)
6699				if err != nil {
6700					return err
6701				}
6702				lc.Type = &typeVar
6703			}
6704		}
6705	}
6706
6707	return nil
6708}
6709
6710// LoggerContractProperties the Logger entity in API Management represents an event sink that you can use
6711// to log API Management events. Currently the Logger entity supports logging API Management events to
6712// Azure Event Hubs.
6713type LoggerContractProperties struct {
6714	// LoggerType - Logger type. Possible values include: 'AzureEventHub', 'ApplicationInsights'
6715	LoggerType LoggerType `json:"loggerType,omitempty"`
6716	// Description - Logger description.
6717	Description *string `json:"description,omitempty"`
6718	// Credentials - The name and SendRule connection string of the event hub for azureEventHub logger.
6719	// Instrumentation key for applicationInsights logger.
6720	Credentials map[string]*string `json:"credentials"`
6721	// IsBuffered - Whether records are buffered in the logger before publishing. Default is assumed to be true.
6722	IsBuffered *bool `json:"isBuffered,omitempty"`
6723	// ResourceID - Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
6724	ResourceID *string `json:"resourceId,omitempty"`
6725}
6726
6727// MarshalJSON is the custom marshaler for LoggerContractProperties.
6728func (lcp LoggerContractProperties) MarshalJSON() ([]byte, error) {
6729	objectMap := make(map[string]interface{})
6730	if lcp.LoggerType != "" {
6731		objectMap["loggerType"] = lcp.LoggerType
6732	}
6733	if lcp.Description != nil {
6734		objectMap["description"] = lcp.Description
6735	}
6736	if lcp.Credentials != nil {
6737		objectMap["credentials"] = lcp.Credentials
6738	}
6739	if lcp.IsBuffered != nil {
6740		objectMap["isBuffered"] = lcp.IsBuffered
6741	}
6742	if lcp.ResourceID != nil {
6743		objectMap["resourceId"] = lcp.ResourceID
6744	}
6745	return json.Marshal(objectMap)
6746}
6747
6748// LoggerUpdateContract logger update contract.
6749type LoggerUpdateContract struct {
6750	// LoggerUpdateParameters - Logger entity update contract properties.
6751	*LoggerUpdateParameters `json:"properties,omitempty"`
6752}
6753
6754// MarshalJSON is the custom marshaler for LoggerUpdateContract.
6755func (luc LoggerUpdateContract) MarshalJSON() ([]byte, error) {
6756	objectMap := make(map[string]interface{})
6757	if luc.LoggerUpdateParameters != nil {
6758		objectMap["properties"] = luc.LoggerUpdateParameters
6759	}
6760	return json.Marshal(objectMap)
6761}
6762
6763// UnmarshalJSON is the custom unmarshaler for LoggerUpdateContract struct.
6764func (luc *LoggerUpdateContract) UnmarshalJSON(body []byte) error {
6765	var m map[string]*json.RawMessage
6766	err := json.Unmarshal(body, &m)
6767	if err != nil {
6768		return err
6769	}
6770	for k, v := range m {
6771		switch k {
6772		case "properties":
6773			if v != nil {
6774				var loggerUpdateParameters LoggerUpdateParameters
6775				err = json.Unmarshal(*v, &loggerUpdateParameters)
6776				if err != nil {
6777					return err
6778				}
6779				luc.LoggerUpdateParameters = &loggerUpdateParameters
6780			}
6781		}
6782	}
6783
6784	return nil
6785}
6786
6787// LoggerUpdateParameters parameters supplied to the Update Logger operation.
6788type LoggerUpdateParameters struct {
6789	// LoggerType - Logger type. Possible values include: 'AzureEventHub', 'ApplicationInsights'
6790	LoggerType LoggerType `json:"loggerType,omitempty"`
6791	// Description - Logger description.
6792	Description *string `json:"description,omitempty"`
6793	// Credentials - Logger credentials.
6794	Credentials map[string]*string `json:"credentials"`
6795	// IsBuffered - Whether records are buffered in the logger before publishing. Default is assumed to be true.
6796	IsBuffered *bool `json:"isBuffered,omitempty"`
6797}
6798
6799// MarshalJSON is the custom marshaler for LoggerUpdateParameters.
6800func (lup LoggerUpdateParameters) MarshalJSON() ([]byte, error) {
6801	objectMap := make(map[string]interface{})
6802	if lup.LoggerType != "" {
6803		objectMap["loggerType"] = lup.LoggerType
6804	}
6805	if lup.Description != nil {
6806		objectMap["description"] = lup.Description
6807	}
6808	if lup.Credentials != nil {
6809		objectMap["credentials"] = lup.Credentials
6810	}
6811	if lup.IsBuffered != nil {
6812		objectMap["isBuffered"] = lup.IsBuffered
6813	}
6814	return json.Marshal(objectMap)
6815}
6816
6817// NamedValueCollection paged NamedValue list representation.
6818type NamedValueCollection struct {
6819	autorest.Response `json:"-"`
6820	// Value - Page values.
6821	Value *[]NamedValueContract `json:"value,omitempty"`
6822	// NextLink - Next page link if any.
6823	NextLink *string `json:"nextLink,omitempty"`
6824}
6825
6826// NamedValueCollectionIterator provides access to a complete listing of NamedValueContract values.
6827type NamedValueCollectionIterator struct {
6828	i    int
6829	page NamedValueCollectionPage
6830}
6831
6832// NextWithContext advances to the next value.  If there was an error making
6833// the request the iterator does not advance and the error is returned.
6834func (iter *NamedValueCollectionIterator) NextWithContext(ctx context.Context) (err error) {
6835	if tracing.IsEnabled() {
6836		ctx = tracing.StartSpan(ctx, fqdn+"/NamedValueCollectionIterator.NextWithContext")
6837		defer func() {
6838			sc := -1
6839			if iter.Response().Response.Response != nil {
6840				sc = iter.Response().Response.Response.StatusCode
6841			}
6842			tracing.EndSpan(ctx, sc, err)
6843		}()
6844	}
6845	iter.i++
6846	if iter.i < len(iter.page.Values()) {
6847		return nil
6848	}
6849	err = iter.page.NextWithContext(ctx)
6850	if err != nil {
6851		iter.i--
6852		return err
6853	}
6854	iter.i = 0
6855	return nil
6856}
6857
6858// Next advances to the next value.  If there was an error making
6859// the request the iterator does not advance and the error is returned.
6860// Deprecated: Use NextWithContext() instead.
6861func (iter *NamedValueCollectionIterator) Next() error {
6862	return iter.NextWithContext(context.Background())
6863}
6864
6865// NotDone returns true if the enumeration should be started or is not yet complete.
6866func (iter NamedValueCollectionIterator) NotDone() bool {
6867	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6868}
6869
6870// Response returns the raw server response from the last page request.
6871func (iter NamedValueCollectionIterator) Response() NamedValueCollection {
6872	return iter.page.Response()
6873}
6874
6875// Value returns the current value or a zero-initialized value if the
6876// iterator has advanced beyond the end of the collection.
6877func (iter NamedValueCollectionIterator) Value() NamedValueContract {
6878	if !iter.page.NotDone() {
6879		return NamedValueContract{}
6880	}
6881	return iter.page.Values()[iter.i]
6882}
6883
6884// Creates a new instance of the NamedValueCollectionIterator type.
6885func NewNamedValueCollectionIterator(page NamedValueCollectionPage) NamedValueCollectionIterator {
6886	return NamedValueCollectionIterator{page: page}
6887}
6888
6889// IsEmpty returns true if the ListResult contains no values.
6890func (nvc NamedValueCollection) IsEmpty() bool {
6891	return nvc.Value == nil || len(*nvc.Value) == 0
6892}
6893
6894// namedValueCollectionPreparer prepares a request to retrieve the next set of results.
6895// It returns nil if no more results exist.
6896func (nvc NamedValueCollection) namedValueCollectionPreparer(ctx context.Context) (*http.Request, error) {
6897	if nvc.NextLink == nil || len(to.String(nvc.NextLink)) < 1 {
6898		return nil, nil
6899	}
6900	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6901		autorest.AsJSON(),
6902		autorest.AsGet(),
6903		autorest.WithBaseURL(to.String(nvc.NextLink)))
6904}
6905
6906// NamedValueCollectionPage contains a page of NamedValueContract values.
6907type NamedValueCollectionPage struct {
6908	fn  func(context.Context, NamedValueCollection) (NamedValueCollection, error)
6909	nvc NamedValueCollection
6910}
6911
6912// NextWithContext advances to the next page of values.  If there was an error making
6913// the request the page does not advance and the error is returned.
6914func (page *NamedValueCollectionPage) NextWithContext(ctx context.Context) (err error) {
6915	if tracing.IsEnabled() {
6916		ctx = tracing.StartSpan(ctx, fqdn+"/NamedValueCollectionPage.NextWithContext")
6917		defer func() {
6918			sc := -1
6919			if page.Response().Response.Response != nil {
6920				sc = page.Response().Response.Response.StatusCode
6921			}
6922			tracing.EndSpan(ctx, sc, err)
6923		}()
6924	}
6925	next, err := page.fn(ctx, page.nvc)
6926	if err != nil {
6927		return err
6928	}
6929	page.nvc = next
6930	return nil
6931}
6932
6933// Next advances to the next page of values.  If there was an error making
6934// the request the page does not advance and the error is returned.
6935// Deprecated: Use NextWithContext() instead.
6936func (page *NamedValueCollectionPage) Next() error {
6937	return page.NextWithContext(context.Background())
6938}
6939
6940// NotDone returns true if the page enumeration should be started or is not yet complete.
6941func (page NamedValueCollectionPage) NotDone() bool {
6942	return !page.nvc.IsEmpty()
6943}
6944
6945// Response returns the raw server response from the last page request.
6946func (page NamedValueCollectionPage) Response() NamedValueCollection {
6947	return page.nvc
6948}
6949
6950// Values returns the slice of values for the current page or nil if there are no values.
6951func (page NamedValueCollectionPage) Values() []NamedValueContract {
6952	if page.nvc.IsEmpty() {
6953		return nil
6954	}
6955	return *page.nvc.Value
6956}
6957
6958// Creates a new instance of the NamedValueCollectionPage type.
6959func NewNamedValueCollectionPage(getNextPage func(context.Context, NamedValueCollection) (NamedValueCollection, error)) NamedValueCollectionPage {
6960	return NamedValueCollectionPage{fn: getNextPage}
6961}
6962
6963// NamedValueContract namedValue details.
6964type NamedValueContract struct {
6965	autorest.Response `json:"-"`
6966	// NamedValueContractProperties - NamedValue entity contract properties.
6967	*NamedValueContractProperties `json:"properties,omitempty"`
6968	// ID - READ-ONLY; Resource ID.
6969	ID *string `json:"id,omitempty"`
6970	// Name - READ-ONLY; Resource name.
6971	Name *string `json:"name,omitempty"`
6972	// Type - READ-ONLY; Resource type for API Management resource.
6973	Type *string `json:"type,omitempty"`
6974}
6975
6976// MarshalJSON is the custom marshaler for NamedValueContract.
6977func (nvc NamedValueContract) MarshalJSON() ([]byte, error) {
6978	objectMap := make(map[string]interface{})
6979	if nvc.NamedValueContractProperties != nil {
6980		objectMap["properties"] = nvc.NamedValueContractProperties
6981	}
6982	return json.Marshal(objectMap)
6983}
6984
6985// UnmarshalJSON is the custom unmarshaler for NamedValueContract struct.
6986func (nvc *NamedValueContract) UnmarshalJSON(body []byte) error {
6987	var m map[string]*json.RawMessage
6988	err := json.Unmarshal(body, &m)
6989	if err != nil {
6990		return err
6991	}
6992	for k, v := range m {
6993		switch k {
6994		case "properties":
6995			if v != nil {
6996				var namedValueContractProperties NamedValueContractProperties
6997				err = json.Unmarshal(*v, &namedValueContractProperties)
6998				if err != nil {
6999					return err
7000				}
7001				nvc.NamedValueContractProperties = &namedValueContractProperties
7002			}
7003		case "id":
7004			if v != nil {
7005				var ID string
7006				err = json.Unmarshal(*v, &ID)
7007				if err != nil {
7008					return err
7009				}
7010				nvc.ID = &ID
7011			}
7012		case "name":
7013			if v != nil {
7014				var name string
7015				err = json.Unmarshal(*v, &name)
7016				if err != nil {
7017					return err
7018				}
7019				nvc.Name = &name
7020			}
7021		case "type":
7022			if v != nil {
7023				var typeVar string
7024				err = json.Unmarshal(*v, &typeVar)
7025				if err != nil {
7026					return err
7027				}
7028				nvc.Type = &typeVar
7029			}
7030		}
7031	}
7032
7033	return nil
7034}
7035
7036// NamedValueContractProperties namedValue Contract properties.
7037type NamedValueContractProperties struct {
7038	// DisplayName - Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.
7039	DisplayName *string `json:"displayName,omitempty"`
7040	// Value - Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
7041	Value *string `json:"value,omitempty"`
7042	// Tags - Optional tags that when provided can be used to filter the NamedValue list.
7043	Tags *[]string `json:"tags,omitempty"`
7044	// Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false.
7045	Secret *bool `json:"secret,omitempty"`
7046}
7047
7048// NamedValueCreateContract namedValue details.
7049type NamedValueCreateContract struct {
7050	// NamedValueCreateContractProperties - NamedValue entity contract properties for PUT operation.
7051	*NamedValueCreateContractProperties `json:"properties,omitempty"`
7052	// ID - READ-ONLY; Resource ID.
7053	ID *string `json:"id,omitempty"`
7054	// Name - READ-ONLY; Resource name.
7055	Name *string `json:"name,omitempty"`
7056	// Type - READ-ONLY; Resource type for API Management resource.
7057	Type *string `json:"type,omitempty"`
7058}
7059
7060// MarshalJSON is the custom marshaler for NamedValueCreateContract.
7061func (nvcc NamedValueCreateContract) MarshalJSON() ([]byte, error) {
7062	objectMap := make(map[string]interface{})
7063	if nvcc.NamedValueCreateContractProperties != nil {
7064		objectMap["properties"] = nvcc.NamedValueCreateContractProperties
7065	}
7066	return json.Marshal(objectMap)
7067}
7068
7069// UnmarshalJSON is the custom unmarshaler for NamedValueCreateContract struct.
7070func (nvcc *NamedValueCreateContract) UnmarshalJSON(body []byte) error {
7071	var m map[string]*json.RawMessage
7072	err := json.Unmarshal(body, &m)
7073	if err != nil {
7074		return err
7075	}
7076	for k, v := range m {
7077		switch k {
7078		case "properties":
7079			if v != nil {
7080				var namedValueCreateContractProperties NamedValueCreateContractProperties
7081				err = json.Unmarshal(*v, &namedValueCreateContractProperties)
7082				if err != nil {
7083					return err
7084				}
7085				nvcc.NamedValueCreateContractProperties = &namedValueCreateContractProperties
7086			}
7087		case "id":
7088			if v != nil {
7089				var ID string
7090				err = json.Unmarshal(*v, &ID)
7091				if err != nil {
7092					return err
7093				}
7094				nvcc.ID = &ID
7095			}
7096		case "name":
7097			if v != nil {
7098				var name string
7099				err = json.Unmarshal(*v, &name)
7100				if err != nil {
7101					return err
7102				}
7103				nvcc.Name = &name
7104			}
7105		case "type":
7106			if v != nil {
7107				var typeVar string
7108				err = json.Unmarshal(*v, &typeVar)
7109				if err != nil {
7110					return err
7111				}
7112				nvcc.Type = &typeVar
7113			}
7114		}
7115	}
7116
7117	return nil
7118}
7119
7120// NamedValueCreateContractProperties namedValue Contract properties.
7121type NamedValueCreateContractProperties struct {
7122	// DisplayName - Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.
7123	DisplayName *string `json:"displayName,omitempty"`
7124	// Value - Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
7125	Value *string `json:"value,omitempty"`
7126	// Tags - Optional tags that when provided can be used to filter the NamedValue list.
7127	Tags *[]string `json:"tags,omitempty"`
7128	// Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false.
7129	Secret *bool `json:"secret,omitempty"`
7130}
7131
7132// NamedValueCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7133// long-running operation.
7134type NamedValueCreateOrUpdateFuture struct {
7135	azure.Future
7136}
7137
7138// Result returns the result of the asynchronous operation.
7139// If the operation has not completed it will return an error.
7140func (future *NamedValueCreateOrUpdateFuture) Result(client NamedValueClient) (nvc NamedValueContract, err error) {
7141	var done bool
7142	done, err = future.DoneWithContext(context.Background(), client)
7143	if err != nil {
7144		err = autorest.NewErrorWithError(err, "apimanagement.NamedValueCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7145		return
7146	}
7147	if !done {
7148		err = azure.NewAsyncOpIncompleteError("apimanagement.NamedValueCreateOrUpdateFuture")
7149		return
7150	}
7151	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7152	if nvc.Response.Response, err = future.GetResult(sender); err == nil && nvc.Response.Response.StatusCode != http.StatusNoContent {
7153		nvc, err = client.CreateOrUpdateResponder(nvc.Response.Response)
7154		if err != nil {
7155			err = autorest.NewErrorWithError(err, "apimanagement.NamedValueCreateOrUpdateFuture", "Result", nvc.Response.Response, "Failure responding to request")
7156		}
7157	}
7158	return
7159}
7160
7161// NamedValueEntityBaseParameters namedValue Entity Base Parameters set.
7162type NamedValueEntityBaseParameters struct {
7163	// Tags - Optional tags that when provided can be used to filter the NamedValue list.
7164	Tags *[]string `json:"tags,omitempty"`
7165	// Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false.
7166	Secret *bool `json:"secret,omitempty"`
7167}
7168
7169// NamedValueUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
7170// operation.
7171type NamedValueUpdateFuture struct {
7172	azure.Future
7173}
7174
7175// Result returns the result of the asynchronous operation.
7176// If the operation has not completed it will return an error.
7177func (future *NamedValueUpdateFuture) Result(client NamedValueClient) (nvc NamedValueContract, err error) {
7178	var done bool
7179	done, err = future.DoneWithContext(context.Background(), client)
7180	if err != nil {
7181		err = autorest.NewErrorWithError(err, "apimanagement.NamedValueUpdateFuture", "Result", future.Response(), "Polling failure")
7182		return
7183	}
7184	if !done {
7185		err = azure.NewAsyncOpIncompleteError("apimanagement.NamedValueUpdateFuture")
7186		return
7187	}
7188	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7189	if nvc.Response.Response, err = future.GetResult(sender); err == nil && nvc.Response.Response.StatusCode != http.StatusNoContent {
7190		nvc, err = client.UpdateResponder(nvc.Response.Response)
7191		if err != nil {
7192			err = autorest.NewErrorWithError(err, "apimanagement.NamedValueUpdateFuture", "Result", nvc.Response.Response, "Failure responding to request")
7193		}
7194	}
7195	return
7196}
7197
7198// NamedValueUpdateParameterProperties namedValue Contract properties.
7199type NamedValueUpdateParameterProperties struct {
7200	// DisplayName - Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.
7201	DisplayName *string `json:"displayName,omitempty"`
7202	// Value - Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace.
7203	Value *string `json:"value,omitempty"`
7204	// Tags - Optional tags that when provided can be used to filter the NamedValue list.
7205	Tags *[]string `json:"tags,omitempty"`
7206	// Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false.
7207	Secret *bool `json:"secret,omitempty"`
7208}
7209
7210// NamedValueUpdateParameters namedValue update Parameters.
7211type NamedValueUpdateParameters struct {
7212	// NamedValueUpdateParameterProperties - NamedValue entity Update contract properties.
7213	*NamedValueUpdateParameterProperties `json:"properties,omitempty"`
7214}
7215
7216// MarshalJSON is the custom marshaler for NamedValueUpdateParameters.
7217func (nvup NamedValueUpdateParameters) MarshalJSON() ([]byte, error) {
7218	objectMap := make(map[string]interface{})
7219	if nvup.NamedValueUpdateParameterProperties != nil {
7220		objectMap["properties"] = nvup.NamedValueUpdateParameterProperties
7221	}
7222	return json.Marshal(objectMap)
7223}
7224
7225// UnmarshalJSON is the custom unmarshaler for NamedValueUpdateParameters struct.
7226func (nvup *NamedValueUpdateParameters) UnmarshalJSON(body []byte) error {
7227	var m map[string]*json.RawMessage
7228	err := json.Unmarshal(body, &m)
7229	if err != nil {
7230		return err
7231	}
7232	for k, v := range m {
7233		switch k {
7234		case "properties":
7235			if v != nil {
7236				var namedValueUpdateParameterProperties NamedValueUpdateParameterProperties
7237				err = json.Unmarshal(*v, &namedValueUpdateParameterProperties)
7238				if err != nil {
7239					return err
7240				}
7241				nvup.NamedValueUpdateParameterProperties = &namedValueUpdateParameterProperties
7242			}
7243		}
7244	}
7245
7246	return nil
7247}
7248
7249// NetworkStatusContract network Status details.
7250type NetworkStatusContract struct {
7251	autorest.Response `json:"-"`
7252	// DNSServers - Gets the list of DNS servers IPV4 addresses.
7253	DNSServers *[]string `json:"dnsServers,omitempty"`
7254	// ConnectivityStatus - Gets the list of Connectivity Status to the Resources on which the service depends upon.
7255	ConnectivityStatus *[]ConnectivityStatusContract `json:"connectivityStatus,omitempty"`
7256}
7257
7258// NetworkStatusContractByLocation network Status in the Location
7259type NetworkStatusContractByLocation struct {
7260	// Location - Location of service
7261	Location *string `json:"location,omitempty"`
7262	// NetworkStatus - Network status in Location
7263	NetworkStatus *NetworkStatusContract `json:"networkStatus,omitempty"`
7264}
7265
7266// NotificationCollection paged Notification list representation.
7267type NotificationCollection struct {
7268	autorest.Response `json:"-"`
7269	// Value - Page values.
7270	Value *[]NotificationContract `json:"value,omitempty"`
7271	// NextLink - Next page link if any.
7272	NextLink *string `json:"nextLink,omitempty"`
7273}
7274
7275// NotificationCollectionIterator provides access to a complete listing of NotificationContract values.
7276type NotificationCollectionIterator struct {
7277	i    int
7278	page NotificationCollectionPage
7279}
7280
7281// NextWithContext advances to the next value.  If there was an error making
7282// the request the iterator does not advance and the error is returned.
7283func (iter *NotificationCollectionIterator) NextWithContext(ctx context.Context) (err error) {
7284	if tracing.IsEnabled() {
7285		ctx = tracing.StartSpan(ctx, fqdn+"/NotificationCollectionIterator.NextWithContext")
7286		defer func() {
7287			sc := -1
7288			if iter.Response().Response.Response != nil {
7289				sc = iter.Response().Response.Response.StatusCode
7290			}
7291			tracing.EndSpan(ctx, sc, err)
7292		}()
7293	}
7294	iter.i++
7295	if iter.i < len(iter.page.Values()) {
7296		return nil
7297	}
7298	err = iter.page.NextWithContext(ctx)
7299	if err != nil {
7300		iter.i--
7301		return err
7302	}
7303	iter.i = 0
7304	return nil
7305}
7306
7307// Next advances to the next value.  If there was an error making
7308// the request the iterator does not advance and the error is returned.
7309// Deprecated: Use NextWithContext() instead.
7310func (iter *NotificationCollectionIterator) Next() error {
7311	return iter.NextWithContext(context.Background())
7312}
7313
7314// NotDone returns true if the enumeration should be started or is not yet complete.
7315func (iter NotificationCollectionIterator) NotDone() bool {
7316	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7317}
7318
7319// Response returns the raw server response from the last page request.
7320func (iter NotificationCollectionIterator) Response() NotificationCollection {
7321	return iter.page.Response()
7322}
7323
7324// Value returns the current value or a zero-initialized value if the
7325// iterator has advanced beyond the end of the collection.
7326func (iter NotificationCollectionIterator) Value() NotificationContract {
7327	if !iter.page.NotDone() {
7328		return NotificationContract{}
7329	}
7330	return iter.page.Values()[iter.i]
7331}
7332
7333// Creates a new instance of the NotificationCollectionIterator type.
7334func NewNotificationCollectionIterator(page NotificationCollectionPage) NotificationCollectionIterator {
7335	return NotificationCollectionIterator{page: page}
7336}
7337
7338// IsEmpty returns true if the ListResult contains no values.
7339func (nc NotificationCollection) IsEmpty() bool {
7340	return nc.Value == nil || len(*nc.Value) == 0
7341}
7342
7343// notificationCollectionPreparer prepares a request to retrieve the next set of results.
7344// It returns nil if no more results exist.
7345func (nc NotificationCollection) notificationCollectionPreparer(ctx context.Context) (*http.Request, error) {
7346	if nc.NextLink == nil || len(to.String(nc.NextLink)) < 1 {
7347		return nil, nil
7348	}
7349	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7350		autorest.AsJSON(),
7351		autorest.AsGet(),
7352		autorest.WithBaseURL(to.String(nc.NextLink)))
7353}
7354
7355// NotificationCollectionPage contains a page of NotificationContract values.
7356type NotificationCollectionPage struct {
7357	fn func(context.Context, NotificationCollection) (NotificationCollection, error)
7358	nc NotificationCollection
7359}
7360
7361// NextWithContext advances to the next page of values.  If there was an error making
7362// the request the page does not advance and the error is returned.
7363func (page *NotificationCollectionPage) NextWithContext(ctx context.Context) (err error) {
7364	if tracing.IsEnabled() {
7365		ctx = tracing.StartSpan(ctx, fqdn+"/NotificationCollectionPage.NextWithContext")
7366		defer func() {
7367			sc := -1
7368			if page.Response().Response.Response != nil {
7369				sc = page.Response().Response.Response.StatusCode
7370			}
7371			tracing.EndSpan(ctx, sc, err)
7372		}()
7373	}
7374	next, err := page.fn(ctx, page.nc)
7375	if err != nil {
7376		return err
7377	}
7378	page.nc = next
7379	return nil
7380}
7381
7382// Next advances to the next page of values.  If there was an error making
7383// the request the page does not advance and the error is returned.
7384// Deprecated: Use NextWithContext() instead.
7385func (page *NotificationCollectionPage) Next() error {
7386	return page.NextWithContext(context.Background())
7387}
7388
7389// NotDone returns true if the page enumeration should be started or is not yet complete.
7390func (page NotificationCollectionPage) NotDone() bool {
7391	return !page.nc.IsEmpty()
7392}
7393
7394// Response returns the raw server response from the last page request.
7395func (page NotificationCollectionPage) Response() NotificationCollection {
7396	return page.nc
7397}
7398
7399// Values returns the slice of values for the current page or nil if there are no values.
7400func (page NotificationCollectionPage) Values() []NotificationContract {
7401	if page.nc.IsEmpty() {
7402		return nil
7403	}
7404	return *page.nc.Value
7405}
7406
7407// Creates a new instance of the NotificationCollectionPage type.
7408func NewNotificationCollectionPage(getNextPage func(context.Context, NotificationCollection) (NotificationCollection, error)) NotificationCollectionPage {
7409	return NotificationCollectionPage{fn: getNextPage}
7410}
7411
7412// NotificationContract notification details.
7413type NotificationContract struct {
7414	autorest.Response `json:"-"`
7415	// NotificationContractProperties - Notification entity contract properties.
7416	*NotificationContractProperties `json:"properties,omitempty"`
7417	// ID - READ-ONLY; Resource ID.
7418	ID *string `json:"id,omitempty"`
7419	// Name - READ-ONLY; Resource name.
7420	Name *string `json:"name,omitempty"`
7421	// Type - READ-ONLY; Resource type for API Management resource.
7422	Type *string `json:"type,omitempty"`
7423}
7424
7425// MarshalJSON is the custom marshaler for NotificationContract.
7426func (nc NotificationContract) MarshalJSON() ([]byte, error) {
7427	objectMap := make(map[string]interface{})
7428	if nc.NotificationContractProperties != nil {
7429		objectMap["properties"] = nc.NotificationContractProperties
7430	}
7431	return json.Marshal(objectMap)
7432}
7433
7434// UnmarshalJSON is the custom unmarshaler for NotificationContract struct.
7435func (nc *NotificationContract) UnmarshalJSON(body []byte) error {
7436	var m map[string]*json.RawMessage
7437	err := json.Unmarshal(body, &m)
7438	if err != nil {
7439		return err
7440	}
7441	for k, v := range m {
7442		switch k {
7443		case "properties":
7444			if v != nil {
7445				var notificationContractProperties NotificationContractProperties
7446				err = json.Unmarshal(*v, &notificationContractProperties)
7447				if err != nil {
7448					return err
7449				}
7450				nc.NotificationContractProperties = &notificationContractProperties
7451			}
7452		case "id":
7453			if v != nil {
7454				var ID string
7455				err = json.Unmarshal(*v, &ID)
7456				if err != nil {
7457					return err
7458				}
7459				nc.ID = &ID
7460			}
7461		case "name":
7462			if v != nil {
7463				var name string
7464				err = json.Unmarshal(*v, &name)
7465				if err != nil {
7466					return err
7467				}
7468				nc.Name = &name
7469			}
7470		case "type":
7471			if v != nil {
7472				var typeVar string
7473				err = json.Unmarshal(*v, &typeVar)
7474				if err != nil {
7475					return err
7476				}
7477				nc.Type = &typeVar
7478			}
7479		}
7480	}
7481
7482	return nil
7483}
7484
7485// NotificationContractProperties notification Contract properties.
7486type NotificationContractProperties struct {
7487	// Title - Title of the Notification.
7488	Title *string `json:"title,omitempty"`
7489	// Description - Description of the Notification.
7490	Description *string `json:"description,omitempty"`
7491	// Recipients - Recipient Parameter values.
7492	Recipients *RecipientsContractProperties `json:"recipients,omitempty"`
7493}
7494
7495// OAuth2AuthenticationSettingsContract API OAuth2 Authentication settings details.
7496type OAuth2AuthenticationSettingsContract struct {
7497	// AuthorizationServerID - OAuth authorization server identifier.
7498	AuthorizationServerID *string `json:"authorizationServerId,omitempty"`
7499	// Scope - operations scope.
7500	Scope *string `json:"scope,omitempty"`
7501}
7502
7503// OpenIDAuthenticationSettingsContract API OAuth2 Authentication settings details.
7504type OpenIDAuthenticationSettingsContract struct {
7505	// OpenidProviderID - OAuth authorization server identifier.
7506	OpenidProviderID *string `json:"openidProviderId,omitempty"`
7507	// BearerTokenSendingMethods - How to send token to the server.
7508	BearerTokenSendingMethods *[]BearerTokenSendingMethods `json:"bearerTokenSendingMethods,omitempty"`
7509}
7510
7511// OpenIDConnectProviderCollection paged OpenIdProviders list representation.
7512type OpenIDConnectProviderCollection struct {
7513	autorest.Response `json:"-"`
7514	// Value - Page values.
7515	Value *[]OpenidConnectProviderContract `json:"value,omitempty"`
7516	// NextLink - Next page link if any.
7517	NextLink *string `json:"nextLink,omitempty"`
7518}
7519
7520// OpenIDConnectProviderCollectionIterator provides access to a complete listing of
7521// OpenidConnectProviderContract values.
7522type OpenIDConnectProviderCollectionIterator struct {
7523	i    int
7524	page OpenIDConnectProviderCollectionPage
7525}
7526
7527// NextWithContext advances to the next value.  If there was an error making
7528// the request the iterator does not advance and the error is returned.
7529func (iter *OpenIDConnectProviderCollectionIterator) NextWithContext(ctx context.Context) (err error) {
7530	if tracing.IsEnabled() {
7531		ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderCollectionIterator.NextWithContext")
7532		defer func() {
7533			sc := -1
7534			if iter.Response().Response.Response != nil {
7535				sc = iter.Response().Response.Response.StatusCode
7536			}
7537			tracing.EndSpan(ctx, sc, err)
7538		}()
7539	}
7540	iter.i++
7541	if iter.i < len(iter.page.Values()) {
7542		return nil
7543	}
7544	err = iter.page.NextWithContext(ctx)
7545	if err != nil {
7546		iter.i--
7547		return err
7548	}
7549	iter.i = 0
7550	return nil
7551}
7552
7553// Next advances to the next value.  If there was an error making
7554// the request the iterator does not advance and the error is returned.
7555// Deprecated: Use NextWithContext() instead.
7556func (iter *OpenIDConnectProviderCollectionIterator) Next() error {
7557	return iter.NextWithContext(context.Background())
7558}
7559
7560// NotDone returns true if the enumeration should be started or is not yet complete.
7561func (iter OpenIDConnectProviderCollectionIterator) NotDone() bool {
7562	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7563}
7564
7565// Response returns the raw server response from the last page request.
7566func (iter OpenIDConnectProviderCollectionIterator) Response() OpenIDConnectProviderCollection {
7567	return iter.page.Response()
7568}
7569
7570// Value returns the current value or a zero-initialized value if the
7571// iterator has advanced beyond the end of the collection.
7572func (iter OpenIDConnectProviderCollectionIterator) Value() OpenidConnectProviderContract {
7573	if !iter.page.NotDone() {
7574		return OpenidConnectProviderContract{}
7575	}
7576	return iter.page.Values()[iter.i]
7577}
7578
7579// Creates a new instance of the OpenIDConnectProviderCollectionIterator type.
7580func NewOpenIDConnectProviderCollectionIterator(page OpenIDConnectProviderCollectionPage) OpenIDConnectProviderCollectionIterator {
7581	return OpenIDConnectProviderCollectionIterator{page: page}
7582}
7583
7584// IsEmpty returns true if the ListResult contains no values.
7585func (oicpc OpenIDConnectProviderCollection) IsEmpty() bool {
7586	return oicpc.Value == nil || len(*oicpc.Value) == 0
7587}
7588
7589// openIDConnectProviderCollectionPreparer prepares a request to retrieve the next set of results.
7590// It returns nil if no more results exist.
7591func (oicpc OpenIDConnectProviderCollection) openIDConnectProviderCollectionPreparer(ctx context.Context) (*http.Request, error) {
7592	if oicpc.NextLink == nil || len(to.String(oicpc.NextLink)) < 1 {
7593		return nil, nil
7594	}
7595	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7596		autorest.AsJSON(),
7597		autorest.AsGet(),
7598		autorest.WithBaseURL(to.String(oicpc.NextLink)))
7599}
7600
7601// OpenIDConnectProviderCollectionPage contains a page of OpenidConnectProviderContract values.
7602type OpenIDConnectProviderCollectionPage struct {
7603	fn    func(context.Context, OpenIDConnectProviderCollection) (OpenIDConnectProviderCollection, error)
7604	oicpc OpenIDConnectProviderCollection
7605}
7606
7607// NextWithContext advances to the next page of values.  If there was an error making
7608// the request the page does not advance and the error is returned.
7609func (page *OpenIDConnectProviderCollectionPage) NextWithContext(ctx context.Context) (err error) {
7610	if tracing.IsEnabled() {
7611		ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderCollectionPage.NextWithContext")
7612		defer func() {
7613			sc := -1
7614			if page.Response().Response.Response != nil {
7615				sc = page.Response().Response.Response.StatusCode
7616			}
7617			tracing.EndSpan(ctx, sc, err)
7618		}()
7619	}
7620	next, err := page.fn(ctx, page.oicpc)
7621	if err != nil {
7622		return err
7623	}
7624	page.oicpc = next
7625	return nil
7626}
7627
7628// Next advances to the next page of values.  If there was an error making
7629// the request the page does not advance and the error is returned.
7630// Deprecated: Use NextWithContext() instead.
7631func (page *OpenIDConnectProviderCollectionPage) Next() error {
7632	return page.NextWithContext(context.Background())
7633}
7634
7635// NotDone returns true if the page enumeration should be started or is not yet complete.
7636func (page OpenIDConnectProviderCollectionPage) NotDone() bool {
7637	return !page.oicpc.IsEmpty()
7638}
7639
7640// Response returns the raw server response from the last page request.
7641func (page OpenIDConnectProviderCollectionPage) Response() OpenIDConnectProviderCollection {
7642	return page.oicpc
7643}
7644
7645// Values returns the slice of values for the current page or nil if there are no values.
7646func (page OpenIDConnectProviderCollectionPage) Values() []OpenidConnectProviderContract {
7647	if page.oicpc.IsEmpty() {
7648		return nil
7649	}
7650	return *page.oicpc.Value
7651}
7652
7653// Creates a new instance of the OpenIDConnectProviderCollectionPage type.
7654func NewOpenIDConnectProviderCollectionPage(getNextPage func(context.Context, OpenIDConnectProviderCollection) (OpenIDConnectProviderCollection, error)) OpenIDConnectProviderCollectionPage {
7655	return OpenIDConnectProviderCollectionPage{fn: getNextPage}
7656}
7657
7658// OpenidConnectProviderContract openId Connect Provider details.
7659type OpenidConnectProviderContract struct {
7660	autorest.Response `json:"-"`
7661	// OpenidConnectProviderContractProperties - OpenId Connect Provider contract properties.
7662	*OpenidConnectProviderContractProperties `json:"properties,omitempty"`
7663	// ID - READ-ONLY; Resource ID.
7664	ID *string `json:"id,omitempty"`
7665	// Name - READ-ONLY; Resource name.
7666	Name *string `json:"name,omitempty"`
7667	// Type - READ-ONLY; Resource type for API Management resource.
7668	Type *string `json:"type,omitempty"`
7669}
7670
7671// MarshalJSON is the custom marshaler for OpenidConnectProviderContract.
7672func (ocpc OpenidConnectProviderContract) MarshalJSON() ([]byte, error) {
7673	objectMap := make(map[string]interface{})
7674	if ocpc.OpenidConnectProviderContractProperties != nil {
7675		objectMap["properties"] = ocpc.OpenidConnectProviderContractProperties
7676	}
7677	return json.Marshal(objectMap)
7678}
7679
7680// UnmarshalJSON is the custom unmarshaler for OpenidConnectProviderContract struct.
7681func (ocpc *OpenidConnectProviderContract) UnmarshalJSON(body []byte) error {
7682	var m map[string]*json.RawMessage
7683	err := json.Unmarshal(body, &m)
7684	if err != nil {
7685		return err
7686	}
7687	for k, v := range m {
7688		switch k {
7689		case "properties":
7690			if v != nil {
7691				var openidConnectProviderContractProperties OpenidConnectProviderContractProperties
7692				err = json.Unmarshal(*v, &openidConnectProviderContractProperties)
7693				if err != nil {
7694					return err
7695				}
7696				ocpc.OpenidConnectProviderContractProperties = &openidConnectProviderContractProperties
7697			}
7698		case "id":
7699			if v != nil {
7700				var ID string
7701				err = json.Unmarshal(*v, &ID)
7702				if err != nil {
7703					return err
7704				}
7705				ocpc.ID = &ID
7706			}
7707		case "name":
7708			if v != nil {
7709				var name string
7710				err = json.Unmarshal(*v, &name)
7711				if err != nil {
7712					return err
7713				}
7714				ocpc.Name = &name
7715			}
7716		case "type":
7717			if v != nil {
7718				var typeVar string
7719				err = json.Unmarshal(*v, &typeVar)
7720				if err != nil {
7721					return err
7722				}
7723				ocpc.Type = &typeVar
7724			}
7725		}
7726	}
7727
7728	return nil
7729}
7730
7731// OpenidConnectProviderContractProperties openID Connect Providers Contract.
7732type OpenidConnectProviderContractProperties struct {
7733	// DisplayName - User-friendly OpenID Connect Provider name.
7734	DisplayName *string `json:"displayName,omitempty"`
7735	// Description - User-friendly description of OpenID Connect Provider.
7736	Description *string `json:"description,omitempty"`
7737	// MetadataEndpoint - Metadata endpoint URI.
7738	MetadataEndpoint *string `json:"metadataEndpoint,omitempty"`
7739	// ClientID - Client ID of developer console which is the client application.
7740	ClientID *string `json:"clientId,omitempty"`
7741	// ClientSecret - Client Secret of developer console which is the client application.
7742	ClientSecret *string `json:"clientSecret,omitempty"`
7743}
7744
7745// OpenidConnectProviderUpdateContract parameters supplied to the Update OpenID Connect Provider operation.
7746type OpenidConnectProviderUpdateContract struct {
7747	// OpenidConnectProviderUpdateContractProperties - OpenId Connect Provider Update contract properties.
7748	*OpenidConnectProviderUpdateContractProperties `json:"properties,omitempty"`
7749}
7750
7751// MarshalJSON is the custom marshaler for OpenidConnectProviderUpdateContract.
7752func (ocpuc OpenidConnectProviderUpdateContract) MarshalJSON() ([]byte, error) {
7753	objectMap := make(map[string]interface{})
7754	if ocpuc.OpenidConnectProviderUpdateContractProperties != nil {
7755		objectMap["properties"] = ocpuc.OpenidConnectProviderUpdateContractProperties
7756	}
7757	return json.Marshal(objectMap)
7758}
7759
7760// UnmarshalJSON is the custom unmarshaler for OpenidConnectProviderUpdateContract struct.
7761func (ocpuc *OpenidConnectProviderUpdateContract) UnmarshalJSON(body []byte) error {
7762	var m map[string]*json.RawMessage
7763	err := json.Unmarshal(body, &m)
7764	if err != nil {
7765		return err
7766	}
7767	for k, v := range m {
7768		switch k {
7769		case "properties":
7770			if v != nil {
7771				var openidConnectProviderUpdateContractProperties OpenidConnectProviderUpdateContractProperties
7772				err = json.Unmarshal(*v, &openidConnectProviderUpdateContractProperties)
7773				if err != nil {
7774					return err
7775				}
7776				ocpuc.OpenidConnectProviderUpdateContractProperties = &openidConnectProviderUpdateContractProperties
7777			}
7778		}
7779	}
7780
7781	return nil
7782}
7783
7784// OpenidConnectProviderUpdateContractProperties parameters supplied to the Update OpenID Connect Provider
7785// operation.
7786type OpenidConnectProviderUpdateContractProperties struct {
7787	// DisplayName - User-friendly OpenID Connect Provider name.
7788	DisplayName *string `json:"displayName,omitempty"`
7789	// Description - User-friendly description of OpenID Connect Provider.
7790	Description *string `json:"description,omitempty"`
7791	// MetadataEndpoint - Metadata endpoint URI.
7792	MetadataEndpoint *string `json:"metadataEndpoint,omitempty"`
7793	// ClientID - Client ID of developer console which is the client application.
7794	ClientID *string `json:"clientId,omitempty"`
7795	// ClientSecret - Client Secret of developer console which is the client application.
7796	ClientSecret *string `json:"clientSecret,omitempty"`
7797}
7798
7799// Operation REST API operation
7800type Operation struct {
7801	// Name - Operation name: {provider}/{resource}/{operation}
7802	Name *string `json:"name,omitempty"`
7803	// Display - The object that describes the operation.
7804	Display *OperationDisplay `json:"display,omitempty"`
7805	// Origin - The operation origin.
7806	Origin *string `json:"origin,omitempty"`
7807	// Properties - The operation properties.
7808	Properties interface{} `json:"properties,omitempty"`
7809}
7810
7811// OperationCollection paged Operation list representation.
7812type OperationCollection struct {
7813	autorest.Response `json:"-"`
7814	// Value - READ-ONLY; Page values.
7815	Value *[]OperationContract `json:"value,omitempty"`
7816	// NextLink - READ-ONLY; Next page link if any.
7817	NextLink *string `json:"nextLink,omitempty"`
7818}
7819
7820// OperationCollectionIterator provides access to a complete listing of OperationContract values.
7821type OperationCollectionIterator struct {
7822	i    int
7823	page OperationCollectionPage
7824}
7825
7826// NextWithContext advances to the next value.  If there was an error making
7827// the request the iterator does not advance and the error is returned.
7828func (iter *OperationCollectionIterator) NextWithContext(ctx context.Context) (err error) {
7829	if tracing.IsEnabled() {
7830		ctx = tracing.StartSpan(ctx, fqdn+"/OperationCollectionIterator.NextWithContext")
7831		defer func() {
7832			sc := -1
7833			if iter.Response().Response.Response != nil {
7834				sc = iter.Response().Response.Response.StatusCode
7835			}
7836			tracing.EndSpan(ctx, sc, err)
7837		}()
7838	}
7839	iter.i++
7840	if iter.i < len(iter.page.Values()) {
7841		return nil
7842	}
7843	err = iter.page.NextWithContext(ctx)
7844	if err != nil {
7845		iter.i--
7846		return err
7847	}
7848	iter.i = 0
7849	return nil
7850}
7851
7852// Next advances to the next value.  If there was an error making
7853// the request the iterator does not advance and the error is returned.
7854// Deprecated: Use NextWithContext() instead.
7855func (iter *OperationCollectionIterator) Next() error {
7856	return iter.NextWithContext(context.Background())
7857}
7858
7859// NotDone returns true if the enumeration should be started or is not yet complete.
7860func (iter OperationCollectionIterator) NotDone() bool {
7861	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7862}
7863
7864// Response returns the raw server response from the last page request.
7865func (iter OperationCollectionIterator) Response() OperationCollection {
7866	return iter.page.Response()
7867}
7868
7869// Value returns the current value or a zero-initialized value if the
7870// iterator has advanced beyond the end of the collection.
7871func (iter OperationCollectionIterator) Value() OperationContract {
7872	if !iter.page.NotDone() {
7873		return OperationContract{}
7874	}
7875	return iter.page.Values()[iter.i]
7876}
7877
7878// Creates a new instance of the OperationCollectionIterator type.
7879func NewOperationCollectionIterator(page OperationCollectionPage) OperationCollectionIterator {
7880	return OperationCollectionIterator{page: page}
7881}
7882
7883// IsEmpty returns true if the ListResult contains no values.
7884func (oc OperationCollection) IsEmpty() bool {
7885	return oc.Value == nil || len(*oc.Value) == 0
7886}
7887
7888// operationCollectionPreparer prepares a request to retrieve the next set of results.
7889// It returns nil if no more results exist.
7890func (oc OperationCollection) operationCollectionPreparer(ctx context.Context) (*http.Request, error) {
7891	if oc.NextLink == nil || len(to.String(oc.NextLink)) < 1 {
7892		return nil, nil
7893	}
7894	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7895		autorest.AsJSON(),
7896		autorest.AsGet(),
7897		autorest.WithBaseURL(to.String(oc.NextLink)))
7898}
7899
7900// OperationCollectionPage contains a page of OperationContract values.
7901type OperationCollectionPage struct {
7902	fn func(context.Context, OperationCollection) (OperationCollection, error)
7903	oc OperationCollection
7904}
7905
7906// NextWithContext advances to the next page of values.  If there was an error making
7907// the request the page does not advance and the error is returned.
7908func (page *OperationCollectionPage) NextWithContext(ctx context.Context) (err error) {
7909	if tracing.IsEnabled() {
7910		ctx = tracing.StartSpan(ctx, fqdn+"/OperationCollectionPage.NextWithContext")
7911		defer func() {
7912			sc := -1
7913			if page.Response().Response.Response != nil {
7914				sc = page.Response().Response.Response.StatusCode
7915			}
7916			tracing.EndSpan(ctx, sc, err)
7917		}()
7918	}
7919	next, err := page.fn(ctx, page.oc)
7920	if err != nil {
7921		return err
7922	}
7923	page.oc = next
7924	return nil
7925}
7926
7927// Next advances to the next page of values.  If there was an error making
7928// the request the page does not advance and the error is returned.
7929// Deprecated: Use NextWithContext() instead.
7930func (page *OperationCollectionPage) Next() error {
7931	return page.NextWithContext(context.Background())
7932}
7933
7934// NotDone returns true if the page enumeration should be started or is not yet complete.
7935func (page OperationCollectionPage) NotDone() bool {
7936	return !page.oc.IsEmpty()
7937}
7938
7939// Response returns the raw server response from the last page request.
7940func (page OperationCollectionPage) Response() OperationCollection {
7941	return page.oc
7942}
7943
7944// Values returns the slice of values for the current page or nil if there are no values.
7945func (page OperationCollectionPage) Values() []OperationContract {
7946	if page.oc.IsEmpty() {
7947		return nil
7948	}
7949	return *page.oc.Value
7950}
7951
7952// Creates a new instance of the OperationCollectionPage type.
7953func NewOperationCollectionPage(getNextPage func(context.Context, OperationCollection) (OperationCollection, error)) OperationCollectionPage {
7954	return OperationCollectionPage{fn: getNextPage}
7955}
7956
7957// OperationContract api Operation details.
7958type OperationContract struct {
7959	autorest.Response `json:"-"`
7960	// OperationContractProperties - Properties of the Operation Contract.
7961	*OperationContractProperties `json:"properties,omitempty"`
7962	// ID - READ-ONLY; Resource ID.
7963	ID *string `json:"id,omitempty"`
7964	// Name - READ-ONLY; Resource name.
7965	Name *string `json:"name,omitempty"`
7966	// Type - READ-ONLY; Resource type for API Management resource.
7967	Type *string `json:"type,omitempty"`
7968}
7969
7970// MarshalJSON is the custom marshaler for OperationContract.
7971func (oc OperationContract) MarshalJSON() ([]byte, error) {
7972	objectMap := make(map[string]interface{})
7973	if oc.OperationContractProperties != nil {
7974		objectMap["properties"] = oc.OperationContractProperties
7975	}
7976	return json.Marshal(objectMap)
7977}
7978
7979// UnmarshalJSON is the custom unmarshaler for OperationContract struct.
7980func (oc *OperationContract) UnmarshalJSON(body []byte) error {
7981	var m map[string]*json.RawMessage
7982	err := json.Unmarshal(body, &m)
7983	if err != nil {
7984		return err
7985	}
7986	for k, v := range m {
7987		switch k {
7988		case "properties":
7989			if v != nil {
7990				var operationContractProperties OperationContractProperties
7991				err = json.Unmarshal(*v, &operationContractProperties)
7992				if err != nil {
7993					return err
7994				}
7995				oc.OperationContractProperties = &operationContractProperties
7996			}
7997		case "id":
7998			if v != nil {
7999				var ID string
8000				err = json.Unmarshal(*v, &ID)
8001				if err != nil {
8002					return err
8003				}
8004				oc.ID = &ID
8005			}
8006		case "name":
8007			if v != nil {
8008				var name string
8009				err = json.Unmarshal(*v, &name)
8010				if err != nil {
8011					return err
8012				}
8013				oc.Name = &name
8014			}
8015		case "type":
8016			if v != nil {
8017				var typeVar string
8018				err = json.Unmarshal(*v, &typeVar)
8019				if err != nil {
8020					return err
8021				}
8022				oc.Type = &typeVar
8023			}
8024		}
8025	}
8026
8027	return nil
8028}
8029
8030// OperationContractProperties operation Contract Properties
8031type OperationContractProperties struct {
8032	// DisplayName - Operation Name.
8033	DisplayName *string `json:"displayName,omitempty"`
8034	// Method - A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
8035	Method *string `json:"method,omitempty"`
8036	// URLTemplate - Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
8037	URLTemplate *string `json:"urlTemplate,omitempty"`
8038	// TemplateParameters - Collection of URL template parameters.
8039	TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"`
8040	// Description - Description of the operation. May include HTML formatting tags.
8041	Description *string `json:"description,omitempty"`
8042	// Request - An entity containing request details.
8043	Request *RequestContract `json:"request,omitempty"`
8044	// Responses - Array of Operation responses.
8045	Responses *[]ResponseContract `json:"responses,omitempty"`
8046	// Policies - Operation Policies
8047	Policies *string `json:"policies,omitempty"`
8048}
8049
8050// OperationDisplay the object that describes the operation.
8051type OperationDisplay struct {
8052	// Provider - Friendly name of the resource provider
8053	Provider *string `json:"provider,omitempty"`
8054	// Operation - Operation type: read, write, delete, listKeys/action, etc.
8055	Operation *string `json:"operation,omitempty"`
8056	// Resource - Resource type on which the operation is performed.
8057	Resource *string `json:"resource,omitempty"`
8058	// Description - Friendly name of the operation
8059	Description *string `json:"description,omitempty"`
8060}
8061
8062// OperationEntityBaseContract api Operation Entity Base Contract details.
8063type OperationEntityBaseContract struct {
8064	// TemplateParameters - Collection of URL template parameters.
8065	TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"`
8066	// Description - Description of the operation. May include HTML formatting tags.
8067	Description *string `json:"description,omitempty"`
8068	// Request - An entity containing request details.
8069	Request *RequestContract `json:"request,omitempty"`
8070	// Responses - Array of Operation responses.
8071	Responses *[]ResponseContract `json:"responses,omitempty"`
8072	// Policies - Operation Policies
8073	Policies *string `json:"policies,omitempty"`
8074}
8075
8076// OperationListResult result of the request to list REST API operations. It contains a list of operations
8077// and a URL nextLink to get the next set of results.
8078type OperationListResult struct {
8079	autorest.Response `json:"-"`
8080	// Value - List of operations supported by the resource provider.
8081	Value *[]Operation `json:"value,omitempty"`
8082	// NextLink - URL to get the next set of operation list results if there are any.
8083	NextLink *string `json:"nextLink,omitempty"`
8084}
8085
8086// OperationListResultIterator provides access to a complete listing of Operation values.
8087type OperationListResultIterator struct {
8088	i    int
8089	page OperationListResultPage
8090}
8091
8092// NextWithContext advances to the next value.  If there was an error making
8093// the request the iterator does not advance and the error is returned.
8094func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
8095	if tracing.IsEnabled() {
8096		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
8097		defer func() {
8098			sc := -1
8099			if iter.Response().Response.Response != nil {
8100				sc = iter.Response().Response.Response.StatusCode
8101			}
8102			tracing.EndSpan(ctx, sc, err)
8103		}()
8104	}
8105	iter.i++
8106	if iter.i < len(iter.page.Values()) {
8107		return nil
8108	}
8109	err = iter.page.NextWithContext(ctx)
8110	if err != nil {
8111		iter.i--
8112		return err
8113	}
8114	iter.i = 0
8115	return nil
8116}
8117
8118// Next advances to the next value.  If there was an error making
8119// the request the iterator does not advance and the error is returned.
8120// Deprecated: Use NextWithContext() instead.
8121func (iter *OperationListResultIterator) Next() error {
8122	return iter.NextWithContext(context.Background())
8123}
8124
8125// NotDone returns true if the enumeration should be started or is not yet complete.
8126func (iter OperationListResultIterator) NotDone() bool {
8127	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8128}
8129
8130// Response returns the raw server response from the last page request.
8131func (iter OperationListResultIterator) Response() OperationListResult {
8132	return iter.page.Response()
8133}
8134
8135// Value returns the current value or a zero-initialized value if the
8136// iterator has advanced beyond the end of the collection.
8137func (iter OperationListResultIterator) Value() Operation {
8138	if !iter.page.NotDone() {
8139		return Operation{}
8140	}
8141	return iter.page.Values()[iter.i]
8142}
8143
8144// Creates a new instance of the OperationListResultIterator type.
8145func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
8146	return OperationListResultIterator{page: page}
8147}
8148
8149// IsEmpty returns true if the ListResult contains no values.
8150func (olr OperationListResult) IsEmpty() bool {
8151	return olr.Value == nil || len(*olr.Value) == 0
8152}
8153
8154// operationListResultPreparer prepares a request to retrieve the next set of results.
8155// It returns nil if no more results exist.
8156func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
8157	if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
8158		return nil, nil
8159	}
8160	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8161		autorest.AsJSON(),
8162		autorest.AsGet(),
8163		autorest.WithBaseURL(to.String(olr.NextLink)))
8164}
8165
8166// OperationListResultPage contains a page of Operation values.
8167type OperationListResultPage struct {
8168	fn  func(context.Context, OperationListResult) (OperationListResult, error)
8169	olr OperationListResult
8170}
8171
8172// NextWithContext advances to the next page of values.  If there was an error making
8173// the request the page does not advance and the error is returned.
8174func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
8175	if tracing.IsEnabled() {
8176		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
8177		defer func() {
8178			sc := -1
8179			if page.Response().Response.Response != nil {
8180				sc = page.Response().Response.Response.StatusCode
8181			}
8182			tracing.EndSpan(ctx, sc, err)
8183		}()
8184	}
8185	next, err := page.fn(ctx, page.olr)
8186	if err != nil {
8187		return err
8188	}
8189	page.olr = next
8190	return nil
8191}
8192
8193// Next advances to the next page of values.  If there was an error making
8194// the request the page does not advance and the error is returned.
8195// Deprecated: Use NextWithContext() instead.
8196func (page *OperationListResultPage) Next() error {
8197	return page.NextWithContext(context.Background())
8198}
8199
8200// NotDone returns true if the page enumeration should be started or is not yet complete.
8201func (page OperationListResultPage) NotDone() bool {
8202	return !page.olr.IsEmpty()
8203}
8204
8205// Response returns the raw server response from the last page request.
8206func (page OperationListResultPage) Response() OperationListResult {
8207	return page.olr
8208}
8209
8210// Values returns the slice of values for the current page or nil if there are no values.
8211func (page OperationListResultPage) Values() []Operation {
8212	if page.olr.IsEmpty() {
8213		return nil
8214	}
8215	return *page.olr.Value
8216}
8217
8218// Creates a new instance of the OperationListResultPage type.
8219func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
8220	return OperationListResultPage{fn: getNextPage}
8221}
8222
8223// OperationResultContract operation Result.
8224type OperationResultContract struct {
8225	autorest.Response `json:"-"`
8226	// ID - Operation result identifier.
8227	ID *string `json:"id,omitempty"`
8228	// Status - Status of an async operation. Possible values include: 'Started', 'InProgress', 'Succeeded', 'Failed'
8229	Status AsyncOperationStatus `json:"status,omitempty"`
8230	// 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.
8231	Started *date.Time `json:"started,omitempty"`
8232	// 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.
8233	Updated *date.Time `json:"updated,omitempty"`
8234	// ResultInfo - Optional result info.
8235	ResultInfo *string `json:"resultInfo,omitempty"`
8236	// Error - Error Body Contract
8237	Error *ErrorResponseBody `json:"error,omitempty"`
8238	// 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.
8239	ActionLog *[]OperationResultLogItemContract `json:"actionLog,omitempty"`
8240}
8241
8242// OperationResultLogItemContract log of the entity being created, updated or deleted.
8243type OperationResultLogItemContract struct {
8244	// ObjectType - The type of entity contract.
8245	ObjectType *string `json:"objectType,omitempty"`
8246	// Action - Action like create/update/delete.
8247	Action *string `json:"action,omitempty"`
8248	// ObjectKey - Identifier of the entity being created/updated/deleted.
8249	ObjectKey *string `json:"objectKey,omitempty"`
8250}
8251
8252// OperationTagResourceContractProperties operation Entity contract Properties.
8253type OperationTagResourceContractProperties struct {
8254	// ID - Identifier of the operation in form /operations/{operationId}.
8255	ID *string `json:"id,omitempty"`
8256	// Name - READ-ONLY; Operation name.
8257	Name *string `json:"name,omitempty"`
8258	// APIName - READ-ONLY; Api Name.
8259	APIName *string `json:"apiName,omitempty"`
8260	// APIRevision - READ-ONLY; Api Revision.
8261	APIRevision *string `json:"apiRevision,omitempty"`
8262	// APIVersion - READ-ONLY; Api Version.
8263	APIVersion *string `json:"apiVersion,omitempty"`
8264	// Description - READ-ONLY; Operation Description.
8265	Description *string `json:"description,omitempty"`
8266	// Method - READ-ONLY; A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
8267	Method *string `json:"method,omitempty"`
8268	// URLTemplate - READ-ONLY; Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
8269	URLTemplate *string `json:"urlTemplate,omitempty"`
8270}
8271
8272// OperationUpdateContract api Operation Update Contract details.
8273type OperationUpdateContract struct {
8274	// OperationUpdateContractProperties - Properties of the API Operation entity that can be updated.
8275	*OperationUpdateContractProperties `json:"properties,omitempty"`
8276}
8277
8278// MarshalJSON is the custom marshaler for OperationUpdateContract.
8279func (ouc OperationUpdateContract) MarshalJSON() ([]byte, error) {
8280	objectMap := make(map[string]interface{})
8281	if ouc.OperationUpdateContractProperties != nil {
8282		objectMap["properties"] = ouc.OperationUpdateContractProperties
8283	}
8284	return json.Marshal(objectMap)
8285}
8286
8287// UnmarshalJSON is the custom unmarshaler for OperationUpdateContract struct.
8288func (ouc *OperationUpdateContract) UnmarshalJSON(body []byte) error {
8289	var m map[string]*json.RawMessage
8290	err := json.Unmarshal(body, &m)
8291	if err != nil {
8292		return err
8293	}
8294	for k, v := range m {
8295		switch k {
8296		case "properties":
8297			if v != nil {
8298				var operationUpdateContractProperties OperationUpdateContractProperties
8299				err = json.Unmarshal(*v, &operationUpdateContractProperties)
8300				if err != nil {
8301					return err
8302				}
8303				ouc.OperationUpdateContractProperties = &operationUpdateContractProperties
8304			}
8305		}
8306	}
8307
8308	return nil
8309}
8310
8311// OperationUpdateContractProperties operation Update Contract Properties.
8312type OperationUpdateContractProperties struct {
8313	// DisplayName - Operation Name.
8314	DisplayName *string `json:"displayName,omitempty"`
8315	// Method - A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
8316	Method *string `json:"method,omitempty"`
8317	// URLTemplate - Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
8318	URLTemplate *string `json:"urlTemplate,omitempty"`
8319	// TemplateParameters - Collection of URL template parameters.
8320	TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"`
8321	// Description - Description of the operation. May include HTML formatting tags.
8322	Description *string `json:"description,omitempty"`
8323	// Request - An entity containing request details.
8324	Request *RequestContract `json:"request,omitempty"`
8325	// Responses - Array of Operation responses.
8326	Responses *[]ResponseContract `json:"responses,omitempty"`
8327	// Policies - Operation Policies
8328	Policies *string `json:"policies,omitempty"`
8329}
8330
8331// ParameterContract operation parameters details.
8332type ParameterContract struct {
8333	// Name - Parameter name.
8334	Name *string `json:"name,omitempty"`
8335	// Description - Parameter description.
8336	Description *string `json:"description,omitempty"`
8337	// Type - Parameter type.
8338	Type *string `json:"type,omitempty"`
8339	// DefaultValue - Default parameter value.
8340	DefaultValue *string `json:"defaultValue,omitempty"`
8341	// Required - Specifies whether parameter is required or not.
8342	Required *bool `json:"required,omitempty"`
8343	// Values - Parameter values.
8344	Values *[]string `json:"values,omitempty"`
8345}
8346
8347// PipelineDiagnosticSettings diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
8348type PipelineDiagnosticSettings struct {
8349	// Request - Diagnostic settings for request.
8350	Request *HTTPMessageDiagnostic `json:"request,omitempty"`
8351	// Response - Diagnostic settings for response.
8352	Response *HTTPMessageDiagnostic `json:"response,omitempty"`
8353}
8354
8355// PolicyCollection the response of the list policy operation.
8356type PolicyCollection struct {
8357	autorest.Response `json:"-"`
8358	// Value - Policy Contract value.
8359	Value *[]PolicyContract `json:"value,omitempty"`
8360	// NextLink - Next page link if any.
8361	NextLink *string `json:"nextLink,omitempty"`
8362}
8363
8364// PolicyContract policy Contract details.
8365type PolicyContract struct {
8366	autorest.Response `json:"-"`
8367	// PolicyContractProperties - Properties of the Policy.
8368	*PolicyContractProperties `json:"properties,omitempty"`
8369	// ID - READ-ONLY; Resource ID.
8370	ID *string `json:"id,omitempty"`
8371	// Name - READ-ONLY; Resource name.
8372	Name *string `json:"name,omitempty"`
8373	// Type - READ-ONLY; Resource type for API Management resource.
8374	Type *string `json:"type,omitempty"`
8375}
8376
8377// MarshalJSON is the custom marshaler for PolicyContract.
8378func (pc PolicyContract) MarshalJSON() ([]byte, error) {
8379	objectMap := make(map[string]interface{})
8380	if pc.PolicyContractProperties != nil {
8381		objectMap["properties"] = pc.PolicyContractProperties
8382	}
8383	return json.Marshal(objectMap)
8384}
8385
8386// UnmarshalJSON is the custom unmarshaler for PolicyContract struct.
8387func (pc *PolicyContract) UnmarshalJSON(body []byte) error {
8388	var m map[string]*json.RawMessage
8389	err := json.Unmarshal(body, &m)
8390	if err != nil {
8391		return err
8392	}
8393	for k, v := range m {
8394		switch k {
8395		case "properties":
8396			if v != nil {
8397				var policyContractProperties PolicyContractProperties
8398				err = json.Unmarshal(*v, &policyContractProperties)
8399				if err != nil {
8400					return err
8401				}
8402				pc.PolicyContractProperties = &policyContractProperties
8403			}
8404		case "id":
8405			if v != nil {
8406				var ID string
8407				err = json.Unmarshal(*v, &ID)
8408				if err != nil {
8409					return err
8410				}
8411				pc.ID = &ID
8412			}
8413		case "name":
8414			if v != nil {
8415				var name string
8416				err = json.Unmarshal(*v, &name)
8417				if err != nil {
8418					return err
8419				}
8420				pc.Name = &name
8421			}
8422		case "type":
8423			if v != nil {
8424				var typeVar string
8425				err = json.Unmarshal(*v, &typeVar)
8426				if err != nil {
8427					return err
8428				}
8429				pc.Type = &typeVar
8430			}
8431		}
8432	}
8433
8434	return nil
8435}
8436
8437// PolicyContractProperties policy contract Properties.
8438type PolicyContractProperties struct {
8439	// Value - Contents of the Policy as defined by the format.
8440	Value *string `json:"value,omitempty"`
8441	// Format - Format of the policyContent. Possible values include: 'XML', 'XMLLink', 'Rawxml', 'RawxmlLink'
8442	Format PolicyContentFormat `json:"format,omitempty"`
8443}
8444
8445// PolicyDescriptionCollection descriptions of APIM policies.
8446type PolicyDescriptionCollection struct {
8447	autorest.Response `json:"-"`
8448	// Value - Descriptions of APIM policies.
8449	Value *[]PolicyDescriptionContract `json:"value,omitempty"`
8450	// Count - Total record count number.
8451	Count *int64 `json:"count,omitempty"`
8452}
8453
8454// PolicyDescriptionContract policy description details.
8455type PolicyDescriptionContract struct {
8456	// PolicyDescriptionContractProperties - Policy description contract properties.
8457	*PolicyDescriptionContractProperties `json:"properties,omitempty"`
8458	// ID - READ-ONLY; Resource ID.
8459	ID *string `json:"id,omitempty"`
8460	// Name - READ-ONLY; Resource name.
8461	Name *string `json:"name,omitempty"`
8462	// Type - READ-ONLY; Resource type for API Management resource.
8463	Type *string `json:"type,omitempty"`
8464}
8465
8466// MarshalJSON is the custom marshaler for PolicyDescriptionContract.
8467func (pdc PolicyDescriptionContract) MarshalJSON() ([]byte, error) {
8468	objectMap := make(map[string]interface{})
8469	if pdc.PolicyDescriptionContractProperties != nil {
8470		objectMap["properties"] = pdc.PolicyDescriptionContractProperties
8471	}
8472	return json.Marshal(objectMap)
8473}
8474
8475// UnmarshalJSON is the custom unmarshaler for PolicyDescriptionContract struct.
8476func (pdc *PolicyDescriptionContract) UnmarshalJSON(body []byte) error {
8477	var m map[string]*json.RawMessage
8478	err := json.Unmarshal(body, &m)
8479	if err != nil {
8480		return err
8481	}
8482	for k, v := range m {
8483		switch k {
8484		case "properties":
8485			if v != nil {
8486				var policyDescriptionContractProperties PolicyDescriptionContractProperties
8487				err = json.Unmarshal(*v, &policyDescriptionContractProperties)
8488				if err != nil {
8489					return err
8490				}
8491				pdc.PolicyDescriptionContractProperties = &policyDescriptionContractProperties
8492			}
8493		case "id":
8494			if v != nil {
8495				var ID string
8496				err = json.Unmarshal(*v, &ID)
8497				if err != nil {
8498					return err
8499				}
8500				pdc.ID = &ID
8501			}
8502		case "name":
8503			if v != nil {
8504				var name string
8505				err = json.Unmarshal(*v, &name)
8506				if err != nil {
8507					return err
8508				}
8509				pdc.Name = &name
8510			}
8511		case "type":
8512			if v != nil {
8513				var typeVar string
8514				err = json.Unmarshal(*v, &typeVar)
8515				if err != nil {
8516					return err
8517				}
8518				pdc.Type = &typeVar
8519			}
8520		}
8521	}
8522
8523	return nil
8524}
8525
8526// PolicyDescriptionContractProperties policy description properties.
8527type PolicyDescriptionContractProperties struct {
8528	// Description - READ-ONLY; Policy description.
8529	Description *string `json:"description,omitempty"`
8530	// Scope - READ-ONLY; Binary OR value of the Snippet scope.
8531	Scope *int32 `json:"scope,omitempty"`
8532}
8533
8534// PortalDelegationSettings delegation settings for a developer portal.
8535type PortalDelegationSettings struct {
8536	autorest.Response `json:"-"`
8537	// PortalDelegationSettingsProperties - Delegation settings contract properties.
8538	*PortalDelegationSettingsProperties `json:"properties,omitempty"`
8539	// ID - READ-ONLY; Resource ID.
8540	ID *string `json:"id,omitempty"`
8541	// Name - READ-ONLY; Resource name.
8542	Name *string `json:"name,omitempty"`
8543	// Type - READ-ONLY; Resource type for API Management resource.
8544	Type *string `json:"type,omitempty"`
8545}
8546
8547// MarshalJSON is the custom marshaler for PortalDelegationSettings.
8548func (pds PortalDelegationSettings) MarshalJSON() ([]byte, error) {
8549	objectMap := make(map[string]interface{})
8550	if pds.PortalDelegationSettingsProperties != nil {
8551		objectMap["properties"] = pds.PortalDelegationSettingsProperties
8552	}
8553	return json.Marshal(objectMap)
8554}
8555
8556// UnmarshalJSON is the custom unmarshaler for PortalDelegationSettings struct.
8557func (pds *PortalDelegationSettings) UnmarshalJSON(body []byte) error {
8558	var m map[string]*json.RawMessage
8559	err := json.Unmarshal(body, &m)
8560	if err != nil {
8561		return err
8562	}
8563	for k, v := range m {
8564		switch k {
8565		case "properties":
8566			if v != nil {
8567				var portalDelegationSettingsProperties PortalDelegationSettingsProperties
8568				err = json.Unmarshal(*v, &portalDelegationSettingsProperties)
8569				if err != nil {
8570					return err
8571				}
8572				pds.PortalDelegationSettingsProperties = &portalDelegationSettingsProperties
8573			}
8574		case "id":
8575			if v != nil {
8576				var ID string
8577				err = json.Unmarshal(*v, &ID)
8578				if err != nil {
8579					return err
8580				}
8581				pds.ID = &ID
8582			}
8583		case "name":
8584			if v != nil {
8585				var name string
8586				err = json.Unmarshal(*v, &name)
8587				if err != nil {
8588					return err
8589				}
8590				pds.Name = &name
8591			}
8592		case "type":
8593			if v != nil {
8594				var typeVar string
8595				err = json.Unmarshal(*v, &typeVar)
8596				if err != nil {
8597					return err
8598				}
8599				pds.Type = &typeVar
8600			}
8601		}
8602	}
8603
8604	return nil
8605}
8606
8607// PortalDelegationSettingsProperties delegation settings contract properties.
8608type PortalDelegationSettingsProperties struct {
8609	// URL - A delegation Url.
8610	URL *string `json:"url,omitempty"`
8611	// ValidationKey - A base64-encoded validation key to validate, that a request is coming from Azure API Management.
8612	ValidationKey *string `json:"validationKey,omitempty"`
8613	// Subscriptions - Subscriptions delegation settings.
8614	Subscriptions *SubscriptionsDelegationSettingsProperties `json:"subscriptions,omitempty"`
8615	// UserRegistration - User registration delegation settings.
8616	UserRegistration *RegistrationDelegationSettingsProperties `json:"userRegistration,omitempty"`
8617}
8618
8619// PortalSettingValidationKeyContract client or app secret used in IdentityProviders, Aad, OpenID or OAuth.
8620type PortalSettingValidationKeyContract struct {
8621	autorest.Response `json:"-"`
8622	// ValidationKey - This is secret value of the validation key in portal settings.
8623	ValidationKey *string `json:"validationKey,omitempty"`
8624}
8625
8626// PortalSigninSettingProperties sign-in settings contract properties.
8627type PortalSigninSettingProperties struct {
8628	// Enabled - Redirect Anonymous users to the Sign-In page.
8629	Enabled *bool `json:"enabled,omitempty"`
8630}
8631
8632// PortalSigninSettings sign-In settings for the Developer Portal.
8633type PortalSigninSettings struct {
8634	autorest.Response `json:"-"`
8635	// PortalSigninSettingProperties - Sign-in settings contract properties.
8636	*PortalSigninSettingProperties `json:"properties,omitempty"`
8637	// ID - READ-ONLY; Resource ID.
8638	ID *string `json:"id,omitempty"`
8639	// Name - READ-ONLY; Resource name.
8640	Name *string `json:"name,omitempty"`
8641	// Type - READ-ONLY; Resource type for API Management resource.
8642	Type *string `json:"type,omitempty"`
8643}
8644
8645// MarshalJSON is the custom marshaler for PortalSigninSettings.
8646func (pss PortalSigninSettings) MarshalJSON() ([]byte, error) {
8647	objectMap := make(map[string]interface{})
8648	if pss.PortalSigninSettingProperties != nil {
8649		objectMap["properties"] = pss.PortalSigninSettingProperties
8650	}
8651	return json.Marshal(objectMap)
8652}
8653
8654// UnmarshalJSON is the custom unmarshaler for PortalSigninSettings struct.
8655func (pss *PortalSigninSettings) UnmarshalJSON(body []byte) error {
8656	var m map[string]*json.RawMessage
8657	err := json.Unmarshal(body, &m)
8658	if err != nil {
8659		return err
8660	}
8661	for k, v := range m {
8662		switch k {
8663		case "properties":
8664			if v != nil {
8665				var portalSigninSettingProperties PortalSigninSettingProperties
8666				err = json.Unmarshal(*v, &portalSigninSettingProperties)
8667				if err != nil {
8668					return err
8669				}
8670				pss.PortalSigninSettingProperties = &portalSigninSettingProperties
8671			}
8672		case "id":
8673			if v != nil {
8674				var ID string
8675				err = json.Unmarshal(*v, &ID)
8676				if err != nil {
8677					return err
8678				}
8679				pss.ID = &ID
8680			}
8681		case "name":
8682			if v != nil {
8683				var name string
8684				err = json.Unmarshal(*v, &name)
8685				if err != nil {
8686					return err
8687				}
8688				pss.Name = &name
8689			}
8690		case "type":
8691			if v != nil {
8692				var typeVar string
8693				err = json.Unmarshal(*v, &typeVar)
8694				if err != nil {
8695					return err
8696				}
8697				pss.Type = &typeVar
8698			}
8699		}
8700	}
8701
8702	return nil
8703}
8704
8705// PortalSignupSettings sign-Up settings for a developer portal.
8706type PortalSignupSettings struct {
8707	autorest.Response `json:"-"`
8708	// PortalSignupSettingsProperties - Sign-up settings contract properties.
8709	*PortalSignupSettingsProperties `json:"properties,omitempty"`
8710	// ID - READ-ONLY; Resource ID.
8711	ID *string `json:"id,omitempty"`
8712	// Name - READ-ONLY; Resource name.
8713	Name *string `json:"name,omitempty"`
8714	// Type - READ-ONLY; Resource type for API Management resource.
8715	Type *string `json:"type,omitempty"`
8716}
8717
8718// MarshalJSON is the custom marshaler for PortalSignupSettings.
8719func (pss PortalSignupSettings) MarshalJSON() ([]byte, error) {
8720	objectMap := make(map[string]interface{})
8721	if pss.PortalSignupSettingsProperties != nil {
8722		objectMap["properties"] = pss.PortalSignupSettingsProperties
8723	}
8724	return json.Marshal(objectMap)
8725}
8726
8727// UnmarshalJSON is the custom unmarshaler for PortalSignupSettings struct.
8728func (pss *PortalSignupSettings) UnmarshalJSON(body []byte) error {
8729	var m map[string]*json.RawMessage
8730	err := json.Unmarshal(body, &m)
8731	if err != nil {
8732		return err
8733	}
8734	for k, v := range m {
8735		switch k {
8736		case "properties":
8737			if v != nil {
8738				var portalSignupSettingsProperties PortalSignupSettingsProperties
8739				err = json.Unmarshal(*v, &portalSignupSettingsProperties)
8740				if err != nil {
8741					return err
8742				}
8743				pss.PortalSignupSettingsProperties = &portalSignupSettingsProperties
8744			}
8745		case "id":
8746			if v != nil {
8747				var ID string
8748				err = json.Unmarshal(*v, &ID)
8749				if err != nil {
8750					return err
8751				}
8752				pss.ID = &ID
8753			}
8754		case "name":
8755			if v != nil {
8756				var name string
8757				err = json.Unmarshal(*v, &name)
8758				if err != nil {
8759					return err
8760				}
8761				pss.Name = &name
8762			}
8763		case "type":
8764			if v != nil {
8765				var typeVar string
8766				err = json.Unmarshal(*v, &typeVar)
8767				if err != nil {
8768					return err
8769				}
8770				pss.Type = &typeVar
8771			}
8772		}
8773	}
8774
8775	return nil
8776}
8777
8778// PortalSignupSettingsProperties sign-up settings contract properties.
8779type PortalSignupSettingsProperties struct {
8780	// Enabled - Allow users to sign up on a developer portal.
8781	Enabled *bool `json:"enabled,omitempty"`
8782	// TermsOfService - Terms of service contract properties.
8783	TermsOfService *TermsOfServiceProperties `json:"termsOfService,omitempty"`
8784}
8785
8786// ProductCollection paged Products list representation.
8787type ProductCollection struct {
8788	autorest.Response `json:"-"`
8789	// Value - Page values.
8790	Value *[]ProductContract `json:"value,omitempty"`
8791	// NextLink - Next page link if any.
8792	NextLink *string `json:"nextLink,omitempty"`
8793}
8794
8795// ProductCollectionIterator provides access to a complete listing of ProductContract values.
8796type ProductCollectionIterator struct {
8797	i    int
8798	page ProductCollectionPage
8799}
8800
8801// NextWithContext advances to the next value.  If there was an error making
8802// the request the iterator does not advance and the error is returned.
8803func (iter *ProductCollectionIterator) NextWithContext(ctx context.Context) (err error) {
8804	if tracing.IsEnabled() {
8805		ctx = tracing.StartSpan(ctx, fqdn+"/ProductCollectionIterator.NextWithContext")
8806		defer func() {
8807			sc := -1
8808			if iter.Response().Response.Response != nil {
8809				sc = iter.Response().Response.Response.StatusCode
8810			}
8811			tracing.EndSpan(ctx, sc, err)
8812		}()
8813	}
8814	iter.i++
8815	if iter.i < len(iter.page.Values()) {
8816		return nil
8817	}
8818	err = iter.page.NextWithContext(ctx)
8819	if err != nil {
8820		iter.i--
8821		return err
8822	}
8823	iter.i = 0
8824	return nil
8825}
8826
8827// Next advances to the next value.  If there was an error making
8828// the request the iterator does not advance and the error is returned.
8829// Deprecated: Use NextWithContext() instead.
8830func (iter *ProductCollectionIterator) Next() error {
8831	return iter.NextWithContext(context.Background())
8832}
8833
8834// NotDone returns true if the enumeration should be started or is not yet complete.
8835func (iter ProductCollectionIterator) NotDone() bool {
8836	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8837}
8838
8839// Response returns the raw server response from the last page request.
8840func (iter ProductCollectionIterator) Response() ProductCollection {
8841	return iter.page.Response()
8842}
8843
8844// Value returns the current value or a zero-initialized value if the
8845// iterator has advanced beyond the end of the collection.
8846func (iter ProductCollectionIterator) Value() ProductContract {
8847	if !iter.page.NotDone() {
8848		return ProductContract{}
8849	}
8850	return iter.page.Values()[iter.i]
8851}
8852
8853// Creates a new instance of the ProductCollectionIterator type.
8854func NewProductCollectionIterator(page ProductCollectionPage) ProductCollectionIterator {
8855	return ProductCollectionIterator{page: page}
8856}
8857
8858// IsEmpty returns true if the ListResult contains no values.
8859func (pc ProductCollection) IsEmpty() bool {
8860	return pc.Value == nil || len(*pc.Value) == 0
8861}
8862
8863// productCollectionPreparer prepares a request to retrieve the next set of results.
8864// It returns nil if no more results exist.
8865func (pc ProductCollection) productCollectionPreparer(ctx context.Context) (*http.Request, error) {
8866	if pc.NextLink == nil || len(to.String(pc.NextLink)) < 1 {
8867		return nil, nil
8868	}
8869	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8870		autorest.AsJSON(),
8871		autorest.AsGet(),
8872		autorest.WithBaseURL(to.String(pc.NextLink)))
8873}
8874
8875// ProductCollectionPage contains a page of ProductContract values.
8876type ProductCollectionPage struct {
8877	fn func(context.Context, ProductCollection) (ProductCollection, error)
8878	pc ProductCollection
8879}
8880
8881// NextWithContext advances to the next page of values.  If there was an error making
8882// the request the page does not advance and the error is returned.
8883func (page *ProductCollectionPage) NextWithContext(ctx context.Context) (err error) {
8884	if tracing.IsEnabled() {
8885		ctx = tracing.StartSpan(ctx, fqdn+"/ProductCollectionPage.NextWithContext")
8886		defer func() {
8887			sc := -1
8888			if page.Response().Response.Response != nil {
8889				sc = page.Response().Response.Response.StatusCode
8890			}
8891			tracing.EndSpan(ctx, sc, err)
8892		}()
8893	}
8894	next, err := page.fn(ctx, page.pc)
8895	if err != nil {
8896		return err
8897	}
8898	page.pc = next
8899	return nil
8900}
8901
8902// Next advances to the next page of values.  If there was an error making
8903// the request the page does not advance and the error is returned.
8904// Deprecated: Use NextWithContext() instead.
8905func (page *ProductCollectionPage) Next() error {
8906	return page.NextWithContext(context.Background())
8907}
8908
8909// NotDone returns true if the page enumeration should be started or is not yet complete.
8910func (page ProductCollectionPage) NotDone() bool {
8911	return !page.pc.IsEmpty()
8912}
8913
8914// Response returns the raw server response from the last page request.
8915func (page ProductCollectionPage) Response() ProductCollection {
8916	return page.pc
8917}
8918
8919// Values returns the slice of values for the current page or nil if there are no values.
8920func (page ProductCollectionPage) Values() []ProductContract {
8921	if page.pc.IsEmpty() {
8922		return nil
8923	}
8924	return *page.pc.Value
8925}
8926
8927// Creates a new instance of the ProductCollectionPage type.
8928func NewProductCollectionPage(getNextPage func(context.Context, ProductCollection) (ProductCollection, error)) ProductCollectionPage {
8929	return ProductCollectionPage{fn: getNextPage}
8930}
8931
8932// ProductContract product details.
8933type ProductContract struct {
8934	autorest.Response `json:"-"`
8935	// ProductContractProperties - Product entity contract properties.
8936	*ProductContractProperties `json:"properties,omitempty"`
8937	// ID - READ-ONLY; Resource ID.
8938	ID *string `json:"id,omitempty"`
8939	// Name - READ-ONLY; Resource name.
8940	Name *string `json:"name,omitempty"`
8941	// Type - READ-ONLY; Resource type for API Management resource.
8942	Type *string `json:"type,omitempty"`
8943}
8944
8945// MarshalJSON is the custom marshaler for ProductContract.
8946func (pc ProductContract) MarshalJSON() ([]byte, error) {
8947	objectMap := make(map[string]interface{})
8948	if pc.ProductContractProperties != nil {
8949		objectMap["properties"] = pc.ProductContractProperties
8950	}
8951	return json.Marshal(objectMap)
8952}
8953
8954// UnmarshalJSON is the custom unmarshaler for ProductContract struct.
8955func (pc *ProductContract) UnmarshalJSON(body []byte) error {
8956	var m map[string]*json.RawMessage
8957	err := json.Unmarshal(body, &m)
8958	if err != nil {
8959		return err
8960	}
8961	for k, v := range m {
8962		switch k {
8963		case "properties":
8964			if v != nil {
8965				var productContractProperties ProductContractProperties
8966				err = json.Unmarshal(*v, &productContractProperties)
8967				if err != nil {
8968					return err
8969				}
8970				pc.ProductContractProperties = &productContractProperties
8971			}
8972		case "id":
8973			if v != nil {
8974				var ID string
8975				err = json.Unmarshal(*v, &ID)
8976				if err != nil {
8977					return err
8978				}
8979				pc.ID = &ID
8980			}
8981		case "name":
8982			if v != nil {
8983				var name string
8984				err = json.Unmarshal(*v, &name)
8985				if err != nil {
8986					return err
8987				}
8988				pc.Name = &name
8989			}
8990		case "type":
8991			if v != nil {
8992				var typeVar string
8993				err = json.Unmarshal(*v, &typeVar)
8994				if err != nil {
8995					return err
8996				}
8997				pc.Type = &typeVar
8998			}
8999		}
9000	}
9001
9002	return nil
9003}
9004
9005// ProductContractProperties product profile.
9006type ProductContractProperties struct {
9007	// DisplayName - Product name.
9008	DisplayName *string `json:"displayName,omitempty"`
9009	// Description - Product description. May include HTML formatting tags.
9010	Description *string `json:"description,omitempty"`
9011	// 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.
9012	Terms *string `json:"terms,omitempty"`
9013	// 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.
9014	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
9015	// 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.
9016	ApprovalRequired *bool `json:"approvalRequired,omitempty"`
9017	// 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.
9018	SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"`
9019	// 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'
9020	State ProductState `json:"state,omitempty"`
9021}
9022
9023// ProductEntityBaseParameters product Entity Base Parameters
9024type ProductEntityBaseParameters struct {
9025	// Description - Product description. May include HTML formatting tags.
9026	Description *string `json:"description,omitempty"`
9027	// 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.
9028	Terms *string `json:"terms,omitempty"`
9029	// 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.
9030	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
9031	// 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.
9032	ApprovalRequired *bool `json:"approvalRequired,omitempty"`
9033	// 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.
9034	SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"`
9035	// 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'
9036	State ProductState `json:"state,omitempty"`
9037}
9038
9039// ProductTagResourceContractProperties product profile.
9040type ProductTagResourceContractProperties struct {
9041	// ID - Identifier of the product in the form of /products/{productId}
9042	ID *string `json:"id,omitempty"`
9043	// Name - Product name.
9044	Name *string `json:"name,omitempty"`
9045	// Description - Product description. May include HTML formatting tags.
9046	Description *string `json:"description,omitempty"`
9047	// 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.
9048	Terms *string `json:"terms,omitempty"`
9049	// 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.
9050	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
9051	// 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.
9052	ApprovalRequired *bool `json:"approvalRequired,omitempty"`
9053	// 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.
9054	SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"`
9055	// 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'
9056	State ProductState `json:"state,omitempty"`
9057}
9058
9059// ProductUpdateParameters product Update parameters.
9060type ProductUpdateParameters struct {
9061	// ProductUpdateProperties - Product entity Update contract properties.
9062	*ProductUpdateProperties `json:"properties,omitempty"`
9063}
9064
9065// MarshalJSON is the custom marshaler for ProductUpdateParameters.
9066func (pup ProductUpdateParameters) MarshalJSON() ([]byte, error) {
9067	objectMap := make(map[string]interface{})
9068	if pup.ProductUpdateProperties != nil {
9069		objectMap["properties"] = pup.ProductUpdateProperties
9070	}
9071	return json.Marshal(objectMap)
9072}
9073
9074// UnmarshalJSON is the custom unmarshaler for ProductUpdateParameters struct.
9075func (pup *ProductUpdateParameters) UnmarshalJSON(body []byte) error {
9076	var m map[string]*json.RawMessage
9077	err := json.Unmarshal(body, &m)
9078	if err != nil {
9079		return err
9080	}
9081	for k, v := range m {
9082		switch k {
9083		case "properties":
9084			if v != nil {
9085				var productUpdateProperties ProductUpdateProperties
9086				err = json.Unmarshal(*v, &productUpdateProperties)
9087				if err != nil {
9088					return err
9089				}
9090				pup.ProductUpdateProperties = &productUpdateProperties
9091			}
9092		}
9093	}
9094
9095	return nil
9096}
9097
9098// ProductUpdateProperties parameters supplied to the Update Product operation.
9099type ProductUpdateProperties struct {
9100	// DisplayName - Product name.
9101	DisplayName *string `json:"displayName,omitempty"`
9102	// Description - Product description. May include HTML formatting tags.
9103	Description *string `json:"description,omitempty"`
9104	// 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.
9105	Terms *string `json:"terms,omitempty"`
9106	// 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.
9107	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
9108	// 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.
9109	ApprovalRequired *bool `json:"approvalRequired,omitempty"`
9110	// 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.
9111	SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"`
9112	// 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'
9113	State ProductState `json:"state,omitempty"`
9114}
9115
9116// PropertyValueContract client or app secret used in IdentityProviders, Aad, OpenID or OAuth.
9117type PropertyValueContract struct {
9118	autorest.Response `json:"-"`
9119	// Value - This is secret value of the NamedValue entity.
9120	Value *string `json:"value,omitempty"`
9121}
9122
9123// QuotaCounterCollection paged Quota Counter list representation.
9124type QuotaCounterCollection struct {
9125	autorest.Response `json:"-"`
9126	// Value - Quota counter values.
9127	Value *[]QuotaCounterContract `json:"value,omitempty"`
9128	// Count - Total record count number across all pages.
9129	Count *int64 `json:"count,omitempty"`
9130	// NextLink - Next page link if any.
9131	NextLink *string `json:"nextLink,omitempty"`
9132}
9133
9134// QuotaCounterContract quota counter details.
9135type QuotaCounterContract struct {
9136	autorest.Response `json:"-"`
9137	// CounterKey - The Key value of the Counter. Must not be empty.
9138	CounterKey *string `json:"counterKey,omitempty"`
9139	// PeriodKey - Identifier of the Period for which the counter was collected. Must not be empty.
9140	PeriodKey *string `json:"periodKey,omitempty"`
9141	// 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.
9142	PeriodStartTime *date.Time `json:"periodStartTime,omitempty"`
9143	// 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.
9144	PeriodEndTime *date.Time `json:"periodEndTime,omitempty"`
9145	// Value - Quota Value Properties
9146	Value *QuotaCounterValueContractProperties `json:"value,omitempty"`
9147}
9148
9149// QuotaCounterValueContract quota counter value details.
9150type QuotaCounterValueContract struct {
9151	// QuotaCounterValueContractProperties - Quota counter Value Properties.
9152	*QuotaCounterValueContractProperties `json:"value,omitempty"`
9153}
9154
9155// MarshalJSON is the custom marshaler for QuotaCounterValueContract.
9156func (qcvc QuotaCounterValueContract) MarshalJSON() ([]byte, error) {
9157	objectMap := make(map[string]interface{})
9158	if qcvc.QuotaCounterValueContractProperties != nil {
9159		objectMap["value"] = qcvc.QuotaCounterValueContractProperties
9160	}
9161	return json.Marshal(objectMap)
9162}
9163
9164// UnmarshalJSON is the custom unmarshaler for QuotaCounterValueContract struct.
9165func (qcvc *QuotaCounterValueContract) UnmarshalJSON(body []byte) error {
9166	var m map[string]*json.RawMessage
9167	err := json.Unmarshal(body, &m)
9168	if err != nil {
9169		return err
9170	}
9171	for k, v := range m {
9172		switch k {
9173		case "value":
9174			if v != nil {
9175				var quotaCounterValueContractProperties QuotaCounterValueContractProperties
9176				err = json.Unmarshal(*v, &quotaCounterValueContractProperties)
9177				if err != nil {
9178					return err
9179				}
9180				qcvc.QuotaCounterValueContractProperties = &quotaCounterValueContractProperties
9181			}
9182		}
9183	}
9184
9185	return nil
9186}
9187
9188// QuotaCounterValueContractProperties quota counter value details.
9189type QuotaCounterValueContractProperties struct {
9190	// CallsCount - Number of times Counter was called.
9191	CallsCount *int32 `json:"callsCount,omitempty"`
9192	// KbTransferred - Data Transferred in KiloBytes.
9193	KbTransferred *float64 `json:"kbTransferred,omitempty"`
9194}
9195
9196// RecipientEmailCollection paged Recipient User list representation.
9197type RecipientEmailCollection struct {
9198	autorest.Response `json:"-"`
9199	// Value - Page values.
9200	Value *[]RecipientEmailContract `json:"value,omitempty"`
9201	// NextLink - Next page link if any.
9202	NextLink *string `json:"nextLink,omitempty"`
9203}
9204
9205// RecipientEmailContract recipient Email details.
9206type RecipientEmailContract struct {
9207	autorest.Response `json:"-"`
9208	// RecipientEmailContractProperties - Recipient Email contract properties.
9209	*RecipientEmailContractProperties `json:"properties,omitempty"`
9210	// ID - READ-ONLY; Resource ID.
9211	ID *string `json:"id,omitempty"`
9212	// Name - READ-ONLY; Resource name.
9213	Name *string `json:"name,omitempty"`
9214	// Type - READ-ONLY; Resource type for API Management resource.
9215	Type *string `json:"type,omitempty"`
9216}
9217
9218// MarshalJSON is the custom marshaler for RecipientEmailContract.
9219func (rec RecipientEmailContract) MarshalJSON() ([]byte, error) {
9220	objectMap := make(map[string]interface{})
9221	if rec.RecipientEmailContractProperties != nil {
9222		objectMap["properties"] = rec.RecipientEmailContractProperties
9223	}
9224	return json.Marshal(objectMap)
9225}
9226
9227// UnmarshalJSON is the custom unmarshaler for RecipientEmailContract struct.
9228func (rec *RecipientEmailContract) UnmarshalJSON(body []byte) error {
9229	var m map[string]*json.RawMessage
9230	err := json.Unmarshal(body, &m)
9231	if err != nil {
9232		return err
9233	}
9234	for k, v := range m {
9235		switch k {
9236		case "properties":
9237			if v != nil {
9238				var recipientEmailContractProperties RecipientEmailContractProperties
9239				err = json.Unmarshal(*v, &recipientEmailContractProperties)
9240				if err != nil {
9241					return err
9242				}
9243				rec.RecipientEmailContractProperties = &recipientEmailContractProperties
9244			}
9245		case "id":
9246			if v != nil {
9247				var ID string
9248				err = json.Unmarshal(*v, &ID)
9249				if err != nil {
9250					return err
9251				}
9252				rec.ID = &ID
9253			}
9254		case "name":
9255			if v != nil {
9256				var name string
9257				err = json.Unmarshal(*v, &name)
9258				if err != nil {
9259					return err
9260				}
9261				rec.Name = &name
9262			}
9263		case "type":
9264			if v != nil {
9265				var typeVar string
9266				err = json.Unmarshal(*v, &typeVar)
9267				if err != nil {
9268					return err
9269				}
9270				rec.Type = &typeVar
9271			}
9272		}
9273	}
9274
9275	return nil
9276}
9277
9278// RecipientEmailContractProperties recipient Email Contract Properties.
9279type RecipientEmailContractProperties struct {
9280	// Email - User Email subscribed to notification.
9281	Email *string `json:"email,omitempty"`
9282}
9283
9284// RecipientsContractProperties notification Parameter contract.
9285type RecipientsContractProperties struct {
9286	// Emails - List of Emails subscribed for the notification.
9287	Emails *[]string `json:"emails,omitempty"`
9288	// Users - List of Users subscribed for the notification.
9289	Users *[]string `json:"users,omitempty"`
9290}
9291
9292// RecipientUserCollection paged Recipient User list representation.
9293type RecipientUserCollection struct {
9294	autorest.Response `json:"-"`
9295	// Value - Page values.
9296	Value *[]RecipientUserContract `json:"value,omitempty"`
9297	// NextLink - Next page link if any.
9298	NextLink *string `json:"nextLink,omitempty"`
9299}
9300
9301// RecipientUserContract recipient User details.
9302type RecipientUserContract struct {
9303	autorest.Response `json:"-"`
9304	// RecipientUsersContractProperties - Recipient User entity contract properties.
9305	*RecipientUsersContractProperties `json:"properties,omitempty"`
9306	// ID - READ-ONLY; Resource ID.
9307	ID *string `json:"id,omitempty"`
9308	// Name - READ-ONLY; Resource name.
9309	Name *string `json:"name,omitempty"`
9310	// Type - READ-ONLY; Resource type for API Management resource.
9311	Type *string `json:"type,omitempty"`
9312}
9313
9314// MarshalJSON is the custom marshaler for RecipientUserContract.
9315func (ruc RecipientUserContract) MarshalJSON() ([]byte, error) {
9316	objectMap := make(map[string]interface{})
9317	if ruc.RecipientUsersContractProperties != nil {
9318		objectMap["properties"] = ruc.RecipientUsersContractProperties
9319	}
9320	return json.Marshal(objectMap)
9321}
9322
9323// UnmarshalJSON is the custom unmarshaler for RecipientUserContract struct.
9324func (ruc *RecipientUserContract) UnmarshalJSON(body []byte) error {
9325	var m map[string]*json.RawMessage
9326	err := json.Unmarshal(body, &m)
9327	if err != nil {
9328		return err
9329	}
9330	for k, v := range m {
9331		switch k {
9332		case "properties":
9333			if v != nil {
9334				var recipientUsersContractProperties RecipientUsersContractProperties
9335				err = json.Unmarshal(*v, &recipientUsersContractProperties)
9336				if err != nil {
9337					return err
9338				}
9339				ruc.RecipientUsersContractProperties = &recipientUsersContractProperties
9340			}
9341		case "id":
9342			if v != nil {
9343				var ID string
9344				err = json.Unmarshal(*v, &ID)
9345				if err != nil {
9346					return err
9347				}
9348				ruc.ID = &ID
9349			}
9350		case "name":
9351			if v != nil {
9352				var name string
9353				err = json.Unmarshal(*v, &name)
9354				if err != nil {
9355					return err
9356				}
9357				ruc.Name = &name
9358			}
9359		case "type":
9360			if v != nil {
9361				var typeVar string
9362				err = json.Unmarshal(*v, &typeVar)
9363				if err != nil {
9364					return err
9365				}
9366				ruc.Type = &typeVar
9367			}
9368		}
9369	}
9370
9371	return nil
9372}
9373
9374// RecipientUsersContractProperties recipient User Contract Properties.
9375type RecipientUsersContractProperties struct {
9376	// UserID - API Management UserId subscribed to notification.
9377	UserID *string `json:"userId,omitempty"`
9378}
9379
9380// RegionContract region profile.
9381type RegionContract struct {
9382	// Name - READ-ONLY; Region name.
9383	Name *string `json:"name,omitempty"`
9384	// IsMasterRegion - whether Region is the master region.
9385	IsMasterRegion *bool `json:"isMasterRegion,omitempty"`
9386	// IsDeleted - whether Region is deleted.
9387	IsDeleted *bool `json:"isDeleted,omitempty"`
9388}
9389
9390// RegionListResult lists Regions operation response details.
9391type RegionListResult struct {
9392	autorest.Response `json:"-"`
9393	// Value - Lists of Regions.
9394	Value *[]RegionContract `json:"value,omitempty"`
9395	// Count - Total record count number across all pages.
9396	Count *int64 `json:"count,omitempty"`
9397	// NextLink - Next page link if any.
9398	NextLink *string `json:"nextLink,omitempty"`
9399}
9400
9401// RegionListResultIterator provides access to a complete listing of RegionContract values.
9402type RegionListResultIterator struct {
9403	i    int
9404	page RegionListResultPage
9405}
9406
9407// NextWithContext advances to the next value.  If there was an error making
9408// the request the iterator does not advance and the error is returned.
9409func (iter *RegionListResultIterator) NextWithContext(ctx context.Context) (err error) {
9410	if tracing.IsEnabled() {
9411		ctx = tracing.StartSpan(ctx, fqdn+"/RegionListResultIterator.NextWithContext")
9412		defer func() {
9413			sc := -1
9414			if iter.Response().Response.Response != nil {
9415				sc = iter.Response().Response.Response.StatusCode
9416			}
9417			tracing.EndSpan(ctx, sc, err)
9418		}()
9419	}
9420	iter.i++
9421	if iter.i < len(iter.page.Values()) {
9422		return nil
9423	}
9424	err = iter.page.NextWithContext(ctx)
9425	if err != nil {
9426		iter.i--
9427		return err
9428	}
9429	iter.i = 0
9430	return nil
9431}
9432
9433// Next advances to the next value.  If there was an error making
9434// the request the iterator does not advance and the error is returned.
9435// Deprecated: Use NextWithContext() instead.
9436func (iter *RegionListResultIterator) Next() error {
9437	return iter.NextWithContext(context.Background())
9438}
9439
9440// NotDone returns true if the enumeration should be started or is not yet complete.
9441func (iter RegionListResultIterator) NotDone() bool {
9442	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9443}
9444
9445// Response returns the raw server response from the last page request.
9446func (iter RegionListResultIterator) Response() RegionListResult {
9447	return iter.page.Response()
9448}
9449
9450// Value returns the current value or a zero-initialized value if the
9451// iterator has advanced beyond the end of the collection.
9452func (iter RegionListResultIterator) Value() RegionContract {
9453	if !iter.page.NotDone() {
9454		return RegionContract{}
9455	}
9456	return iter.page.Values()[iter.i]
9457}
9458
9459// Creates a new instance of the RegionListResultIterator type.
9460func NewRegionListResultIterator(page RegionListResultPage) RegionListResultIterator {
9461	return RegionListResultIterator{page: page}
9462}
9463
9464// IsEmpty returns true if the ListResult contains no values.
9465func (rlr RegionListResult) IsEmpty() bool {
9466	return rlr.Value == nil || len(*rlr.Value) == 0
9467}
9468
9469// regionListResultPreparer prepares a request to retrieve the next set of results.
9470// It returns nil if no more results exist.
9471func (rlr RegionListResult) regionListResultPreparer(ctx context.Context) (*http.Request, error) {
9472	if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 {
9473		return nil, nil
9474	}
9475	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9476		autorest.AsJSON(),
9477		autorest.AsGet(),
9478		autorest.WithBaseURL(to.String(rlr.NextLink)))
9479}
9480
9481// RegionListResultPage contains a page of RegionContract values.
9482type RegionListResultPage struct {
9483	fn  func(context.Context, RegionListResult) (RegionListResult, error)
9484	rlr RegionListResult
9485}
9486
9487// NextWithContext advances to the next page of values.  If there was an error making
9488// the request the page does not advance and the error is returned.
9489func (page *RegionListResultPage) NextWithContext(ctx context.Context) (err error) {
9490	if tracing.IsEnabled() {
9491		ctx = tracing.StartSpan(ctx, fqdn+"/RegionListResultPage.NextWithContext")
9492		defer func() {
9493			sc := -1
9494			if page.Response().Response.Response != nil {
9495				sc = page.Response().Response.Response.StatusCode
9496			}
9497			tracing.EndSpan(ctx, sc, err)
9498		}()
9499	}
9500	next, err := page.fn(ctx, page.rlr)
9501	if err != nil {
9502		return err
9503	}
9504	page.rlr = next
9505	return nil
9506}
9507
9508// Next advances to the next page of values.  If there was an error making
9509// the request the page does not advance and the error is returned.
9510// Deprecated: Use NextWithContext() instead.
9511func (page *RegionListResultPage) Next() error {
9512	return page.NextWithContext(context.Background())
9513}
9514
9515// NotDone returns true if the page enumeration should be started or is not yet complete.
9516func (page RegionListResultPage) NotDone() bool {
9517	return !page.rlr.IsEmpty()
9518}
9519
9520// Response returns the raw server response from the last page request.
9521func (page RegionListResultPage) Response() RegionListResult {
9522	return page.rlr
9523}
9524
9525// Values returns the slice of values for the current page or nil if there are no values.
9526func (page RegionListResultPage) Values() []RegionContract {
9527	if page.rlr.IsEmpty() {
9528		return nil
9529	}
9530	return *page.rlr.Value
9531}
9532
9533// Creates a new instance of the RegionListResultPage type.
9534func NewRegionListResultPage(getNextPage func(context.Context, RegionListResult) (RegionListResult, error)) RegionListResultPage {
9535	return RegionListResultPage{fn: getNextPage}
9536}
9537
9538// RegistrationDelegationSettingsProperties user registration delegation settings properties.
9539type RegistrationDelegationSettingsProperties struct {
9540	// Enabled - Enable or disable delegation for user registration.
9541	Enabled *bool `json:"enabled,omitempty"`
9542}
9543
9544// ReportCollection paged Report records list representation.
9545type ReportCollection struct {
9546	autorest.Response `json:"-"`
9547	// Value - Page values.
9548	Value *[]ReportRecordContract `json:"value,omitempty"`
9549	// Count - Total record count number across all pages.
9550	Count *int64 `json:"count,omitempty"`
9551	// NextLink - Next page link if any.
9552	NextLink *string `json:"nextLink,omitempty"`
9553}
9554
9555// ReportCollectionIterator provides access to a complete listing of ReportRecordContract values.
9556type ReportCollectionIterator struct {
9557	i    int
9558	page ReportCollectionPage
9559}
9560
9561// NextWithContext advances to the next value.  If there was an error making
9562// the request the iterator does not advance and the error is returned.
9563func (iter *ReportCollectionIterator) NextWithContext(ctx context.Context) (err error) {
9564	if tracing.IsEnabled() {
9565		ctx = tracing.StartSpan(ctx, fqdn+"/ReportCollectionIterator.NextWithContext")
9566		defer func() {
9567			sc := -1
9568			if iter.Response().Response.Response != nil {
9569				sc = iter.Response().Response.Response.StatusCode
9570			}
9571			tracing.EndSpan(ctx, sc, err)
9572		}()
9573	}
9574	iter.i++
9575	if iter.i < len(iter.page.Values()) {
9576		return nil
9577	}
9578	err = iter.page.NextWithContext(ctx)
9579	if err != nil {
9580		iter.i--
9581		return err
9582	}
9583	iter.i = 0
9584	return nil
9585}
9586
9587// Next advances to the next value.  If there was an error making
9588// the request the iterator does not advance and the error is returned.
9589// Deprecated: Use NextWithContext() instead.
9590func (iter *ReportCollectionIterator) Next() error {
9591	return iter.NextWithContext(context.Background())
9592}
9593
9594// NotDone returns true if the enumeration should be started or is not yet complete.
9595func (iter ReportCollectionIterator) NotDone() bool {
9596	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9597}
9598
9599// Response returns the raw server response from the last page request.
9600func (iter ReportCollectionIterator) Response() ReportCollection {
9601	return iter.page.Response()
9602}
9603
9604// Value returns the current value or a zero-initialized value if the
9605// iterator has advanced beyond the end of the collection.
9606func (iter ReportCollectionIterator) Value() ReportRecordContract {
9607	if !iter.page.NotDone() {
9608		return ReportRecordContract{}
9609	}
9610	return iter.page.Values()[iter.i]
9611}
9612
9613// Creates a new instance of the ReportCollectionIterator type.
9614func NewReportCollectionIterator(page ReportCollectionPage) ReportCollectionIterator {
9615	return ReportCollectionIterator{page: page}
9616}
9617
9618// IsEmpty returns true if the ListResult contains no values.
9619func (rc ReportCollection) IsEmpty() bool {
9620	return rc.Value == nil || len(*rc.Value) == 0
9621}
9622
9623// reportCollectionPreparer prepares a request to retrieve the next set of results.
9624// It returns nil if no more results exist.
9625func (rc ReportCollection) reportCollectionPreparer(ctx context.Context) (*http.Request, error) {
9626	if rc.NextLink == nil || len(to.String(rc.NextLink)) < 1 {
9627		return nil, nil
9628	}
9629	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9630		autorest.AsJSON(),
9631		autorest.AsGet(),
9632		autorest.WithBaseURL(to.String(rc.NextLink)))
9633}
9634
9635// ReportCollectionPage contains a page of ReportRecordContract values.
9636type ReportCollectionPage struct {
9637	fn func(context.Context, ReportCollection) (ReportCollection, error)
9638	rc ReportCollection
9639}
9640
9641// NextWithContext advances to the next page of values.  If there was an error making
9642// the request the page does not advance and the error is returned.
9643func (page *ReportCollectionPage) NextWithContext(ctx context.Context) (err error) {
9644	if tracing.IsEnabled() {
9645		ctx = tracing.StartSpan(ctx, fqdn+"/ReportCollectionPage.NextWithContext")
9646		defer func() {
9647			sc := -1
9648			if page.Response().Response.Response != nil {
9649				sc = page.Response().Response.Response.StatusCode
9650			}
9651			tracing.EndSpan(ctx, sc, err)
9652		}()
9653	}
9654	next, err := page.fn(ctx, page.rc)
9655	if err != nil {
9656		return err
9657	}
9658	page.rc = next
9659	return nil
9660}
9661
9662// Next advances to the next page of values.  If there was an error making
9663// the request the page does not advance and the error is returned.
9664// Deprecated: Use NextWithContext() instead.
9665func (page *ReportCollectionPage) Next() error {
9666	return page.NextWithContext(context.Background())
9667}
9668
9669// NotDone returns true if the page enumeration should be started or is not yet complete.
9670func (page ReportCollectionPage) NotDone() bool {
9671	return !page.rc.IsEmpty()
9672}
9673
9674// Response returns the raw server response from the last page request.
9675func (page ReportCollectionPage) Response() ReportCollection {
9676	return page.rc
9677}
9678
9679// Values returns the slice of values for the current page or nil if there are no values.
9680func (page ReportCollectionPage) Values() []ReportRecordContract {
9681	if page.rc.IsEmpty() {
9682		return nil
9683	}
9684	return *page.rc.Value
9685}
9686
9687// Creates a new instance of the ReportCollectionPage type.
9688func NewReportCollectionPage(getNextPage func(context.Context, ReportCollection) (ReportCollection, error)) ReportCollectionPage {
9689	return ReportCollectionPage{fn: getNextPage}
9690}
9691
9692// ReportRecordContract report data.
9693type ReportRecordContract struct {
9694	// Name - Name depending on report endpoint specifies product, API, operation or developer name.
9695	Name *string `json:"name,omitempty"`
9696	// Timestamp - Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
9697	Timestamp *date.Time `json:"timestamp,omitempty"`
9698	// 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).
9699	Interval *string `json:"interval,omitempty"`
9700	// Country - Country to which this record data is related.
9701	Country *string `json:"country,omitempty"`
9702	// Region - Country region to which this record data is related.
9703	Region *string `json:"region,omitempty"`
9704	// Zip - Zip code to which this record data is related.
9705	Zip *string `json:"zip,omitempty"`
9706	// UserID - READ-ONLY; User identifier path. /users/{userId}
9707	UserID *string `json:"userId,omitempty"`
9708	// ProductID - READ-ONLY; Product identifier path. /products/{productId}
9709	ProductID *string `json:"productId,omitempty"`
9710	// APIID - API identifier path. /apis/{apiId}
9711	APIID *string `json:"apiId,omitempty"`
9712	// OperationID - Operation identifier path. /apis/{apiId}/operations/{operationId}
9713	OperationID *string `json:"operationId,omitempty"`
9714	// APIRegion - API region identifier.
9715	APIRegion *string `json:"apiRegion,omitempty"`
9716	// SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId}
9717	SubscriptionID *string `json:"subscriptionId,omitempty"`
9718	// CallCountSuccess - Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect
9719	CallCountSuccess *int32 `json:"callCountSuccess,omitempty"`
9720	// CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests
9721	CallCountBlocked *int32 `json:"callCountBlocked,omitempty"`
9722	// 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
9723	CallCountFailed *int32 `json:"callCountFailed,omitempty"`
9724	// CallCountOther - Number of other calls.
9725	CallCountOther *int32 `json:"callCountOther,omitempty"`
9726	// CallCountTotal - Total number of calls.
9727	CallCountTotal *int32 `json:"callCountTotal,omitempty"`
9728	// Bandwidth - Bandwidth consumed.
9729	Bandwidth *int64 `json:"bandwidth,omitempty"`
9730	// CacheHitCount - Number of times when content was served from cache policy.
9731	CacheHitCount *int32 `json:"cacheHitCount,omitempty"`
9732	// CacheMissCount - Number of times content was fetched from backend.
9733	CacheMissCount *int32 `json:"cacheMissCount,omitempty"`
9734	// APITimeAvg - Average time it took to process request.
9735	APITimeAvg *float64 `json:"apiTimeAvg,omitempty"`
9736	// APITimeMin - Minimum time it took to process request.
9737	APITimeMin *float64 `json:"apiTimeMin,omitempty"`
9738	// APITimeMax - Maximum time it took to process request.
9739	APITimeMax *float64 `json:"apiTimeMax,omitempty"`
9740	// ServiceTimeAvg - Average time it took to process request on backend.
9741	ServiceTimeAvg *float64 `json:"serviceTimeAvg,omitempty"`
9742	// ServiceTimeMin - Minimum time it took to process request on backend.
9743	ServiceTimeMin *float64 `json:"serviceTimeMin,omitempty"`
9744	// ServiceTimeMax - Maximum time it took to process request on backend.
9745	ServiceTimeMax *float64 `json:"serviceTimeMax,omitempty"`
9746}
9747
9748// RepresentationContract operation request/response representation details.
9749type RepresentationContract struct {
9750	// ContentType - Specifies a registered or custom content type for this representation, e.g. application/xml.
9751	ContentType *string `json:"contentType,omitempty"`
9752	// Sample - An example of the representation.
9753	Sample *string `json:"sample,omitempty"`
9754	// SchemaID - Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
9755	SchemaID *string `json:"schemaId,omitempty"`
9756	// TypeName - Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
9757	TypeName *string `json:"typeName,omitempty"`
9758	// FormParameters - Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
9759	FormParameters *[]ParameterContract `json:"formParameters,omitempty"`
9760}
9761
9762// RequestContract operation request details.
9763type RequestContract struct {
9764	// Description - Operation request description.
9765	Description *string `json:"description,omitempty"`
9766	// QueryParameters - Collection of operation request query parameters.
9767	QueryParameters *[]ParameterContract `json:"queryParameters,omitempty"`
9768	// Headers - Collection of operation request headers.
9769	Headers *[]ParameterContract `json:"headers,omitempty"`
9770	// Representations - Collection of operation request representations.
9771	Representations *[]RepresentationContract `json:"representations,omitempty"`
9772}
9773
9774// RequestReportCollection paged Report records list representation.
9775type RequestReportCollection struct {
9776	autorest.Response `json:"-"`
9777	// Value - Page values.
9778	Value *[]RequestReportRecordContract `json:"value,omitempty"`
9779	// Count - Total record count number across all pages.
9780	Count *int64 `json:"count,omitempty"`
9781}
9782
9783// RequestReportRecordContract request Report data.
9784type RequestReportRecordContract struct {
9785	// APIID - API identifier path. /apis/{apiId}
9786	APIID *string `json:"apiId,omitempty"`
9787	// OperationID - Operation identifier path. /apis/{apiId}/operations/{operationId}
9788	OperationID *string `json:"operationId,omitempty"`
9789	// ProductID - READ-ONLY; Product identifier path. /products/{productId}
9790	ProductID *string `json:"productId,omitempty"`
9791	// UserID - READ-ONLY; User identifier path. /users/{userId}
9792	UserID *string `json:"userId,omitempty"`
9793	// Method - The HTTP method associated with this request..
9794	Method *string `json:"method,omitempty"`
9795	// URL - The full URL associated with this request.
9796	URL *string `json:"url,omitempty"`
9797	// IPAddress - The client IP address associated with this request.
9798	IPAddress *string `json:"ipAddress,omitempty"`
9799	// BackendResponseCode - The HTTP status code received by the gateway as a result of forwarding this request to the backend.
9800	BackendResponseCode *string `json:"backendResponseCode,omitempty"`
9801	// ResponseCode - The HTTP status code returned by the gateway.
9802	ResponseCode *int32 `json:"responseCode,omitempty"`
9803	// ResponseSize - The size of the response returned by the gateway.
9804	ResponseSize *int32 `json:"responseSize,omitempty"`
9805	// Timestamp - The date and time when this request was received by the gateway in ISO 8601 format.
9806	Timestamp *date.Time `json:"timestamp,omitempty"`
9807	// 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.
9808	Cache *string `json:"cache,omitempty"`
9809	// APITime - The total time it took to process this request.
9810	APITime *float64 `json:"apiTime,omitempty"`
9811	// ServiceTime - he time it took to forward this request to the backend and get the response back.
9812	ServiceTime *float64 `json:"serviceTime,omitempty"`
9813	// APIRegion - Azure region where the gateway that processed this request is located.
9814	APIRegion *string `json:"apiRegion,omitempty"`
9815	// SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId}
9816	SubscriptionID *string `json:"subscriptionId,omitempty"`
9817	// RequestID - Request Identifier.
9818	RequestID *string `json:"requestId,omitempty"`
9819	// RequestSize - The size of this request..
9820	RequestSize *int32 `json:"requestSize,omitempty"`
9821}
9822
9823// Resource the Resource definition.
9824type Resource struct {
9825	// ID - READ-ONLY; Resource ID.
9826	ID *string `json:"id,omitempty"`
9827	// Name - READ-ONLY; Resource name.
9828	Name *string `json:"name,omitempty"`
9829	// Type - READ-ONLY; Resource type for API Management resource.
9830	Type *string `json:"type,omitempty"`
9831}
9832
9833// ResourceLocationDataContract resource location data properties.
9834type ResourceLocationDataContract struct {
9835	// Name - A canonical name for the geographic or physical location.
9836	Name *string `json:"name,omitempty"`
9837	// City - The city or locality where the resource is located.
9838	City *string `json:"city,omitempty"`
9839	// District - The district, state, or province where the resource is located.
9840	District *string `json:"district,omitempty"`
9841	// CountryOrRegion - The country or region where the resource is located.
9842	CountryOrRegion *string `json:"countryOrRegion,omitempty"`
9843}
9844
9845// ResourceSku describes an available API Management SKU.
9846type ResourceSku struct {
9847	// Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic', 'SkuTypeConsumption'
9848	Name SkuType `json:"name,omitempty"`
9849}
9850
9851// ResourceSkuCapacity describes scaling information of a SKU.
9852type ResourceSkuCapacity struct {
9853	// Minimum - READ-ONLY; The minimum capacity.
9854	Minimum *int32 `json:"minimum,omitempty"`
9855	// Maximum - READ-ONLY; The maximum capacity that can be set.
9856	Maximum *int32 `json:"maximum,omitempty"`
9857	// Default - READ-ONLY; The default capacity.
9858	Default *int32 `json:"default,omitempty"`
9859	// ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone'
9860	ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"`
9861}
9862
9863// ResourceSkuResult describes an available API Management service SKU.
9864type ResourceSkuResult struct {
9865	// ResourceType - READ-ONLY; The type of resource the SKU applies to.
9866	ResourceType *string `json:"resourceType,omitempty"`
9867	// Sku - READ-ONLY; Specifies API Management SKU.
9868	Sku *ResourceSku `json:"sku,omitempty"`
9869	// Capacity - READ-ONLY; Specifies the number of API Management units.
9870	Capacity *ResourceSkuCapacity `json:"capacity,omitempty"`
9871}
9872
9873// ResourceSkuResults the API Management service SKUs operation response.
9874type ResourceSkuResults struct {
9875	autorest.Response `json:"-"`
9876	// Value - The list of skus available for the service.
9877	Value *[]ResourceSkuResult `json:"value,omitempty"`
9878	// NextLink - The uri to fetch the next page of API Management service Skus.
9879	NextLink *string `json:"nextLink,omitempty"`
9880}
9881
9882// ResourceSkuResultsIterator provides access to a complete listing of ResourceSkuResult values.
9883type ResourceSkuResultsIterator struct {
9884	i    int
9885	page ResourceSkuResultsPage
9886}
9887
9888// NextWithContext advances to the next value.  If there was an error making
9889// the request the iterator does not advance and the error is returned.
9890func (iter *ResourceSkuResultsIterator) NextWithContext(ctx context.Context) (err error) {
9891	if tracing.IsEnabled() {
9892		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuResultsIterator.NextWithContext")
9893		defer func() {
9894			sc := -1
9895			if iter.Response().Response.Response != nil {
9896				sc = iter.Response().Response.Response.StatusCode
9897			}
9898			tracing.EndSpan(ctx, sc, err)
9899		}()
9900	}
9901	iter.i++
9902	if iter.i < len(iter.page.Values()) {
9903		return nil
9904	}
9905	err = iter.page.NextWithContext(ctx)
9906	if err != nil {
9907		iter.i--
9908		return err
9909	}
9910	iter.i = 0
9911	return nil
9912}
9913
9914// Next advances to the next value.  If there was an error making
9915// the request the iterator does not advance and the error is returned.
9916// Deprecated: Use NextWithContext() instead.
9917func (iter *ResourceSkuResultsIterator) Next() error {
9918	return iter.NextWithContext(context.Background())
9919}
9920
9921// NotDone returns true if the enumeration should be started or is not yet complete.
9922func (iter ResourceSkuResultsIterator) NotDone() bool {
9923	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9924}
9925
9926// Response returns the raw server response from the last page request.
9927func (iter ResourceSkuResultsIterator) Response() ResourceSkuResults {
9928	return iter.page.Response()
9929}
9930
9931// Value returns the current value or a zero-initialized value if the
9932// iterator has advanced beyond the end of the collection.
9933func (iter ResourceSkuResultsIterator) Value() ResourceSkuResult {
9934	if !iter.page.NotDone() {
9935		return ResourceSkuResult{}
9936	}
9937	return iter.page.Values()[iter.i]
9938}
9939
9940// Creates a new instance of the ResourceSkuResultsIterator type.
9941func NewResourceSkuResultsIterator(page ResourceSkuResultsPage) ResourceSkuResultsIterator {
9942	return ResourceSkuResultsIterator{page: page}
9943}
9944
9945// IsEmpty returns true if the ListResult contains no values.
9946func (rsr ResourceSkuResults) IsEmpty() bool {
9947	return rsr.Value == nil || len(*rsr.Value) == 0
9948}
9949
9950// resourceSkuResultsPreparer prepares a request to retrieve the next set of results.
9951// It returns nil if no more results exist.
9952func (rsr ResourceSkuResults) resourceSkuResultsPreparer(ctx context.Context) (*http.Request, error) {
9953	if rsr.NextLink == nil || len(to.String(rsr.NextLink)) < 1 {
9954		return nil, nil
9955	}
9956	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9957		autorest.AsJSON(),
9958		autorest.AsGet(),
9959		autorest.WithBaseURL(to.String(rsr.NextLink)))
9960}
9961
9962// ResourceSkuResultsPage contains a page of ResourceSkuResult values.
9963type ResourceSkuResultsPage struct {
9964	fn  func(context.Context, ResourceSkuResults) (ResourceSkuResults, error)
9965	rsr ResourceSkuResults
9966}
9967
9968// NextWithContext advances to the next page of values.  If there was an error making
9969// the request the page does not advance and the error is returned.
9970func (page *ResourceSkuResultsPage) NextWithContext(ctx context.Context) (err error) {
9971	if tracing.IsEnabled() {
9972		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuResultsPage.NextWithContext")
9973		defer func() {
9974			sc := -1
9975			if page.Response().Response.Response != nil {
9976				sc = page.Response().Response.Response.StatusCode
9977			}
9978			tracing.EndSpan(ctx, sc, err)
9979		}()
9980	}
9981	next, err := page.fn(ctx, page.rsr)
9982	if err != nil {
9983		return err
9984	}
9985	page.rsr = next
9986	return nil
9987}
9988
9989// Next advances to the next page of values.  If there was an error making
9990// the request the page does not advance and the error is returned.
9991// Deprecated: Use NextWithContext() instead.
9992func (page *ResourceSkuResultsPage) Next() error {
9993	return page.NextWithContext(context.Background())
9994}
9995
9996// NotDone returns true if the page enumeration should be started or is not yet complete.
9997func (page ResourceSkuResultsPage) NotDone() bool {
9998	return !page.rsr.IsEmpty()
9999}
10000
10001// Response returns the raw server response from the last page request.
10002func (page ResourceSkuResultsPage) Response() ResourceSkuResults {
10003	return page.rsr
10004}
10005
10006// Values returns the slice of values for the current page or nil if there are no values.
10007func (page ResourceSkuResultsPage) Values() []ResourceSkuResult {
10008	if page.rsr.IsEmpty() {
10009		return nil
10010	}
10011	return *page.rsr.Value
10012}
10013
10014// Creates a new instance of the ResourceSkuResultsPage type.
10015func NewResourceSkuResultsPage(getNextPage func(context.Context, ResourceSkuResults) (ResourceSkuResults, error)) ResourceSkuResultsPage {
10016	return ResourceSkuResultsPage{fn: getNextPage}
10017}
10018
10019// ResponseContract operation response details.
10020type ResponseContract struct {
10021	// StatusCode - Operation response HTTP status code.
10022	StatusCode *int32 `json:"statusCode,omitempty"`
10023	// Description - Operation response description.
10024	Description *string `json:"description,omitempty"`
10025	// Representations - Collection of operation response representations.
10026	Representations *[]RepresentationContract `json:"representations,omitempty"`
10027	// Headers - Collection of operation response headers.
10028	Headers *[]ParameterContract `json:"headers,omitempty"`
10029}
10030
10031// SamplingSettings sampling settings for Diagnostic.
10032type SamplingSettings struct {
10033	// SamplingType - Sampling type. Possible values include: 'Fixed'
10034	SamplingType SamplingType `json:"samplingType,omitempty"`
10035	// Percentage - Rate of sampling for fixed-rate sampling.
10036	Percentage *float64 `json:"percentage,omitempty"`
10037}
10038
10039// SaveConfigurationParameter save Tenant Configuration Contract details.
10040type SaveConfigurationParameter struct {
10041	// SaveConfigurationParameterProperties - Properties of the Save Configuration Parameters.
10042	*SaveConfigurationParameterProperties `json:"properties,omitempty"`
10043}
10044
10045// MarshalJSON is the custom marshaler for SaveConfigurationParameter.
10046func (scp SaveConfigurationParameter) MarshalJSON() ([]byte, error) {
10047	objectMap := make(map[string]interface{})
10048	if scp.SaveConfigurationParameterProperties != nil {
10049		objectMap["properties"] = scp.SaveConfigurationParameterProperties
10050	}
10051	return json.Marshal(objectMap)
10052}
10053
10054// UnmarshalJSON is the custom unmarshaler for SaveConfigurationParameter struct.
10055func (scp *SaveConfigurationParameter) UnmarshalJSON(body []byte) error {
10056	var m map[string]*json.RawMessage
10057	err := json.Unmarshal(body, &m)
10058	if err != nil {
10059		return err
10060	}
10061	for k, v := range m {
10062		switch k {
10063		case "properties":
10064			if v != nil {
10065				var saveConfigurationParameterProperties SaveConfigurationParameterProperties
10066				err = json.Unmarshal(*v, &saveConfigurationParameterProperties)
10067				if err != nil {
10068					return err
10069				}
10070				scp.SaveConfigurationParameterProperties = &saveConfigurationParameterProperties
10071			}
10072		}
10073	}
10074
10075	return nil
10076}
10077
10078// SaveConfigurationParameterProperties parameters supplied to the Save Tenant Configuration operation.
10079type SaveConfigurationParameterProperties struct {
10080	// Branch - The name of the Git branch in which to commit the current configuration snapshot.
10081	Branch *string `json:"branch,omitempty"`
10082	// 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.
10083	Force *bool `json:"force,omitempty"`
10084}
10085
10086// SchemaCollection the response of the list schema operation.
10087type SchemaCollection struct {
10088	autorest.Response `json:"-"`
10089	// Value - READ-ONLY; Api Schema Contract value.
10090	Value *[]SchemaContract `json:"value,omitempty"`
10091	// NextLink - READ-ONLY; Next page link if any.
10092	NextLink *string `json:"nextLink,omitempty"`
10093}
10094
10095// SchemaCollectionIterator provides access to a complete listing of SchemaContract values.
10096type SchemaCollectionIterator struct {
10097	i    int
10098	page SchemaCollectionPage
10099}
10100
10101// NextWithContext advances to the next value.  If there was an error making
10102// the request the iterator does not advance and the error is returned.
10103func (iter *SchemaCollectionIterator) NextWithContext(ctx context.Context) (err error) {
10104	if tracing.IsEnabled() {
10105		ctx = tracing.StartSpan(ctx, fqdn+"/SchemaCollectionIterator.NextWithContext")
10106		defer func() {
10107			sc := -1
10108			if iter.Response().Response.Response != nil {
10109				sc = iter.Response().Response.Response.StatusCode
10110			}
10111			tracing.EndSpan(ctx, sc, err)
10112		}()
10113	}
10114	iter.i++
10115	if iter.i < len(iter.page.Values()) {
10116		return nil
10117	}
10118	err = iter.page.NextWithContext(ctx)
10119	if err != nil {
10120		iter.i--
10121		return err
10122	}
10123	iter.i = 0
10124	return nil
10125}
10126
10127// Next advances to the next value.  If there was an error making
10128// the request the iterator does not advance and the error is returned.
10129// Deprecated: Use NextWithContext() instead.
10130func (iter *SchemaCollectionIterator) Next() error {
10131	return iter.NextWithContext(context.Background())
10132}
10133
10134// NotDone returns true if the enumeration should be started or is not yet complete.
10135func (iter SchemaCollectionIterator) NotDone() bool {
10136	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10137}
10138
10139// Response returns the raw server response from the last page request.
10140func (iter SchemaCollectionIterator) Response() SchemaCollection {
10141	return iter.page.Response()
10142}
10143
10144// Value returns the current value or a zero-initialized value if the
10145// iterator has advanced beyond the end of the collection.
10146func (iter SchemaCollectionIterator) Value() SchemaContract {
10147	if !iter.page.NotDone() {
10148		return SchemaContract{}
10149	}
10150	return iter.page.Values()[iter.i]
10151}
10152
10153// Creates a new instance of the SchemaCollectionIterator type.
10154func NewSchemaCollectionIterator(page SchemaCollectionPage) SchemaCollectionIterator {
10155	return SchemaCollectionIterator{page: page}
10156}
10157
10158// IsEmpty returns true if the ListResult contains no values.
10159func (sc SchemaCollection) IsEmpty() bool {
10160	return sc.Value == nil || len(*sc.Value) == 0
10161}
10162
10163// schemaCollectionPreparer prepares a request to retrieve the next set of results.
10164// It returns nil if no more results exist.
10165func (sc SchemaCollection) schemaCollectionPreparer(ctx context.Context) (*http.Request, error) {
10166	if sc.NextLink == nil || len(to.String(sc.NextLink)) < 1 {
10167		return nil, nil
10168	}
10169	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10170		autorest.AsJSON(),
10171		autorest.AsGet(),
10172		autorest.WithBaseURL(to.String(sc.NextLink)))
10173}
10174
10175// SchemaCollectionPage contains a page of SchemaContract values.
10176type SchemaCollectionPage struct {
10177	fn func(context.Context, SchemaCollection) (SchemaCollection, error)
10178	sc SchemaCollection
10179}
10180
10181// NextWithContext advances to the next page of values.  If there was an error making
10182// the request the page does not advance and the error is returned.
10183func (page *SchemaCollectionPage) NextWithContext(ctx context.Context) (err error) {
10184	if tracing.IsEnabled() {
10185		ctx = tracing.StartSpan(ctx, fqdn+"/SchemaCollectionPage.NextWithContext")
10186		defer func() {
10187			sc := -1
10188			if page.Response().Response.Response != nil {
10189				sc = page.Response().Response.Response.StatusCode
10190			}
10191			tracing.EndSpan(ctx, sc, err)
10192		}()
10193	}
10194	next, err := page.fn(ctx, page.sc)
10195	if err != nil {
10196		return err
10197	}
10198	page.sc = next
10199	return nil
10200}
10201
10202// Next advances to the next page of values.  If there was an error making
10203// the request the page does not advance and the error is returned.
10204// Deprecated: Use NextWithContext() instead.
10205func (page *SchemaCollectionPage) Next() error {
10206	return page.NextWithContext(context.Background())
10207}
10208
10209// NotDone returns true if the page enumeration should be started or is not yet complete.
10210func (page SchemaCollectionPage) NotDone() bool {
10211	return !page.sc.IsEmpty()
10212}
10213
10214// Response returns the raw server response from the last page request.
10215func (page SchemaCollectionPage) Response() SchemaCollection {
10216	return page.sc
10217}
10218
10219// Values returns the slice of values for the current page or nil if there are no values.
10220func (page SchemaCollectionPage) Values() []SchemaContract {
10221	if page.sc.IsEmpty() {
10222		return nil
10223	}
10224	return *page.sc.Value
10225}
10226
10227// Creates a new instance of the SchemaCollectionPage type.
10228func NewSchemaCollectionPage(getNextPage func(context.Context, SchemaCollection) (SchemaCollection, error)) SchemaCollectionPage {
10229	return SchemaCollectionPage{fn: getNextPage}
10230}
10231
10232// SchemaContract schema Contract details.
10233type SchemaContract struct {
10234	autorest.Response `json:"-"`
10235	// SchemaContractProperties - Properties of the Schema.
10236	*SchemaContractProperties `json:"properties,omitempty"`
10237	// ID - READ-ONLY; Resource ID.
10238	ID *string `json:"id,omitempty"`
10239	// Name - READ-ONLY; Resource name.
10240	Name *string `json:"name,omitempty"`
10241	// Type - READ-ONLY; Resource type for API Management resource.
10242	Type *string `json:"type,omitempty"`
10243}
10244
10245// MarshalJSON is the custom marshaler for SchemaContract.
10246func (sc SchemaContract) MarshalJSON() ([]byte, error) {
10247	objectMap := make(map[string]interface{})
10248	if sc.SchemaContractProperties != nil {
10249		objectMap["properties"] = sc.SchemaContractProperties
10250	}
10251	return json.Marshal(objectMap)
10252}
10253
10254// UnmarshalJSON is the custom unmarshaler for SchemaContract struct.
10255func (sc *SchemaContract) UnmarshalJSON(body []byte) error {
10256	var m map[string]*json.RawMessage
10257	err := json.Unmarshal(body, &m)
10258	if err != nil {
10259		return err
10260	}
10261	for k, v := range m {
10262		switch k {
10263		case "properties":
10264			if v != nil {
10265				var schemaContractProperties SchemaContractProperties
10266				err = json.Unmarshal(*v, &schemaContractProperties)
10267				if err != nil {
10268					return err
10269				}
10270				sc.SchemaContractProperties = &schemaContractProperties
10271			}
10272		case "id":
10273			if v != nil {
10274				var ID string
10275				err = json.Unmarshal(*v, &ID)
10276				if err != nil {
10277					return err
10278				}
10279				sc.ID = &ID
10280			}
10281		case "name":
10282			if v != nil {
10283				var name string
10284				err = json.Unmarshal(*v, &name)
10285				if err != nil {
10286					return err
10287				}
10288				sc.Name = &name
10289			}
10290		case "type":
10291			if v != nil {
10292				var typeVar string
10293				err = json.Unmarshal(*v, &typeVar)
10294				if err != nil {
10295					return err
10296				}
10297				sc.Type = &typeVar
10298			}
10299		}
10300	}
10301
10302	return nil
10303}
10304
10305// SchemaContractProperties API Schema create or update contract Properties.
10306type SchemaContractProperties struct {
10307	// 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). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`.
10308	ContentType *string `json:"contentType,omitempty"`
10309	// SchemaDocumentProperties - Create or update Properties of the Schema Document.
10310	*SchemaDocumentProperties `json:"document,omitempty"`
10311}
10312
10313// MarshalJSON is the custom marshaler for SchemaContractProperties.
10314func (scp SchemaContractProperties) MarshalJSON() ([]byte, error) {
10315	objectMap := make(map[string]interface{})
10316	if scp.ContentType != nil {
10317		objectMap["contentType"] = scp.ContentType
10318	}
10319	if scp.SchemaDocumentProperties != nil {
10320		objectMap["document"] = scp.SchemaDocumentProperties
10321	}
10322	return json.Marshal(objectMap)
10323}
10324
10325// UnmarshalJSON is the custom unmarshaler for SchemaContractProperties struct.
10326func (scp *SchemaContractProperties) UnmarshalJSON(body []byte) error {
10327	var m map[string]*json.RawMessage
10328	err := json.Unmarshal(body, &m)
10329	if err != nil {
10330		return err
10331	}
10332	for k, v := range m {
10333		switch k {
10334		case "contentType":
10335			if v != nil {
10336				var contentType string
10337				err = json.Unmarshal(*v, &contentType)
10338				if err != nil {
10339					return err
10340				}
10341				scp.ContentType = &contentType
10342			}
10343		case "document":
10344			if v != nil {
10345				var schemaDocumentProperties SchemaDocumentProperties
10346				err = json.Unmarshal(*v, &schemaDocumentProperties)
10347				if err != nil {
10348					return err
10349				}
10350				scp.SchemaDocumentProperties = &schemaDocumentProperties
10351			}
10352		}
10353	}
10354
10355	return nil
10356}
10357
10358// SchemaDocumentProperties schema Document Properties.
10359type SchemaDocumentProperties struct {
10360	// Value - Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI.
10361	Value *string `json:"value,omitempty"`
10362	// Definitions - Types definitions. Used for Swagger/OpenAPI schemas only, null otherwise.
10363	Definitions interface{} `json:"definitions,omitempty"`
10364}
10365
10366// ServiceApplyNetworkConfigurationParameters parameter supplied to the Apply Network configuration
10367// operation.
10368type ServiceApplyNetworkConfigurationParameters struct {
10369	// Location - Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required.
10370	Location *string `json:"location,omitempty"`
10371}
10372
10373// ServiceApplyNetworkConfigurationUpdatesFuture an abstraction for monitoring and retrieving the results
10374// of a long-running operation.
10375type ServiceApplyNetworkConfigurationUpdatesFuture struct {
10376	azure.Future
10377}
10378
10379// Result returns the result of the asynchronous operation.
10380// If the operation has not completed it will return an error.
10381func (future *ServiceApplyNetworkConfigurationUpdatesFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
10382	var done bool
10383	done, err = future.DoneWithContext(context.Background(), client)
10384	if err != nil {
10385		err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", future.Response(), "Polling failure")
10386		return
10387	}
10388	if !done {
10389		err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture")
10390		return
10391	}
10392	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10393	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
10394		sr, err = client.ApplyNetworkConfigurationUpdatesResponder(sr.Response.Response)
10395		if err != nil {
10396			err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", sr.Response.Response, "Failure responding to request")
10397		}
10398	}
10399	return
10400}
10401
10402// ServiceBackupFuture an abstraction for monitoring and retrieving the results of a long-running
10403// operation.
10404type ServiceBackupFuture struct {
10405	azure.Future
10406}
10407
10408// Result returns the result of the asynchronous operation.
10409// If the operation has not completed it will return an error.
10410func (future *ServiceBackupFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
10411	var done bool
10412	done, err = future.DoneWithContext(context.Background(), client)
10413	if err != nil {
10414		err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", future.Response(), "Polling failure")
10415		return
10416	}
10417	if !done {
10418		err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceBackupFuture")
10419		return
10420	}
10421	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10422	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
10423		sr, err = client.BackupResponder(sr.Response.Response)
10424		if err != nil {
10425			err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", sr.Response.Response, "Failure responding to request")
10426		}
10427	}
10428	return
10429}
10430
10431// ServiceBackupRestoreParameters parameters supplied to the Backup/Restore of an API Management service
10432// operation.
10433type ServiceBackupRestoreParameters struct {
10434	// StorageAccount - Azure Cloud Storage account (used to place/retrieve the backup) name.
10435	StorageAccount *string `json:"storageAccount,omitempty"`
10436	// AccessKey - Azure Cloud Storage account (used to place/retrieve the backup) access key.
10437	AccessKey *string `json:"accessKey,omitempty"`
10438	// ContainerName - Azure Cloud Storage blob container name used to place/retrieve the backup.
10439	ContainerName *string `json:"containerName,omitempty"`
10440	// BackupName - The name of the backup file to create.
10441	BackupName *string `json:"backupName,omitempty"`
10442}
10443
10444// ServiceBaseProperties base Properties of an API Management service resource description.
10445type ServiceBaseProperties struct {
10446	// NotificationSenderEmail - Email address from which the notification will be sent.
10447	NotificationSenderEmail *string `json:"notificationSenderEmail,omitempty"`
10448	// ProvisioningState - READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
10449	ProvisioningState *string `json:"provisioningState,omitempty"`
10450	// TargetProvisioningState - READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started on the service.
10451	TargetProvisioningState *string `json:"targetProvisioningState,omitempty"`
10452	// CreatedAtUtc - READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
10453	CreatedAtUtc *date.Time `json:"createdAtUtc,omitempty"`
10454	// GatewayURL - READ-ONLY; Gateway URL of the API Management service.
10455	GatewayURL *string `json:"gatewayUrl,omitempty"`
10456	// GatewayRegionalURL - READ-ONLY; Gateway URL of the API Management service in the Default Region.
10457	GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty"`
10458	// PortalURL - READ-ONLY; Publisher portal endpoint Url of the API Management service.
10459	PortalURL *string `json:"portalUrl,omitempty"`
10460	// ManagementAPIURL - READ-ONLY; Management API endpoint URL of the API Management service.
10461	ManagementAPIURL *string `json:"managementApiUrl,omitempty"`
10462	// ScmURL - READ-ONLY; SCM endpoint URL of the API Management service.
10463	ScmURL *string `json:"scmUrl,omitempty"`
10464	// DeveloperPortalURL - READ-ONLY; DEveloper Portal endpoint URL of the API Management service.
10465	DeveloperPortalURL *string `json:"developerPortalUrl,omitempty"`
10466	// HostnameConfigurations - Custom hostname configuration of the API Management service.
10467	HostnameConfigurations *[]HostnameConfiguration `json:"hostnameConfigurations,omitempty"`
10468	// PublicIPAddresses - READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard and Premium SKU.
10469	PublicIPAddresses *[]string `json:"publicIPAddresses,omitempty"`
10470	// PrivateIPAddresses - READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard and Premium SKU.
10471	PrivateIPAddresses *[]string `json:"privateIPAddresses,omitempty"`
10472	// VirtualNetworkConfiguration - Virtual network configuration of the API Management service.
10473	VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"`
10474	// AdditionalLocations - Additional datacenter locations of the API Management service.
10475	AdditionalLocations *[]AdditionalLocation `json:"additionalLocations,omitempty"`
10476	// CustomProperties - Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.  Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384
10477	CustomProperties map[string]*string `json:"customProperties"`
10478	// Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
10479	Certificates *[]CertificateConfiguration `json:"certificates,omitempty"`
10480	// EnableClientCertificate - Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway.
10481	EnableClientCertificate *bool `json:"enableClientCertificate,omitempty"`
10482	// DisableGateway - Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region.
10483	DisableGateway *bool `json:"disableGateway,omitempty"`
10484	// VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal'
10485	VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"`
10486	// APIVersionConstraint - Control Plane Apis version constraint for the API Management service.
10487	APIVersionConstraint *APIVersionConstraint `json:"apiVersionConstraint,omitempty"`
10488}
10489
10490// MarshalJSON is the custom marshaler for ServiceBaseProperties.
10491func (sbp ServiceBaseProperties) MarshalJSON() ([]byte, error) {
10492	objectMap := make(map[string]interface{})
10493	if sbp.NotificationSenderEmail != nil {
10494		objectMap["notificationSenderEmail"] = sbp.NotificationSenderEmail
10495	}
10496	if sbp.HostnameConfigurations != nil {
10497		objectMap["hostnameConfigurations"] = sbp.HostnameConfigurations
10498	}
10499	if sbp.VirtualNetworkConfiguration != nil {
10500		objectMap["virtualNetworkConfiguration"] = sbp.VirtualNetworkConfiguration
10501	}
10502	if sbp.AdditionalLocations != nil {
10503		objectMap["additionalLocations"] = sbp.AdditionalLocations
10504	}
10505	if sbp.CustomProperties != nil {
10506		objectMap["customProperties"] = sbp.CustomProperties
10507	}
10508	if sbp.Certificates != nil {
10509		objectMap["certificates"] = sbp.Certificates
10510	}
10511	if sbp.EnableClientCertificate != nil {
10512		objectMap["enableClientCertificate"] = sbp.EnableClientCertificate
10513	}
10514	if sbp.DisableGateway != nil {
10515		objectMap["disableGateway"] = sbp.DisableGateway
10516	}
10517	if sbp.VirtualNetworkType != "" {
10518		objectMap["virtualNetworkType"] = sbp.VirtualNetworkType
10519	}
10520	if sbp.APIVersionConstraint != nil {
10521		objectMap["apiVersionConstraint"] = sbp.APIVersionConstraint
10522	}
10523	return json.Marshal(objectMap)
10524}
10525
10526// ServiceCheckNameAvailabilityParameters parameters supplied to the CheckNameAvailability operation.
10527type ServiceCheckNameAvailabilityParameters struct {
10528	// Name - The name to check for availability.
10529	Name *string `json:"name,omitempty"`
10530}
10531
10532// ServiceCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
10533// operation.
10534type ServiceCreateOrUpdateFuture struct {
10535	azure.Future
10536}
10537
10538// Result returns the result of the asynchronous operation.
10539// If the operation has not completed it will return an error.
10540func (future *ServiceCreateOrUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
10541	var done bool
10542	done, err = future.DoneWithContext(context.Background(), client)
10543	if err != nil {
10544		err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10545		return
10546	}
10547	if !done {
10548		err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceCreateOrUpdateFuture")
10549		return
10550	}
10551	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10552	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
10553		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
10554		if err != nil {
10555			err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
10556		}
10557	}
10558	return
10559}
10560
10561// ServiceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10562// operation.
10563type ServiceDeleteFuture struct {
10564	azure.Future
10565}
10566
10567// Result returns the result of the asynchronous operation.
10568// If the operation has not completed it will return an error.
10569func (future *ServiceDeleteFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
10570	var done bool
10571	done, err = future.DoneWithContext(context.Background(), client)
10572	if err != nil {
10573		err = autorest.NewErrorWithError(err, "apimanagement.ServiceDeleteFuture", "Result", future.Response(), "Polling failure")
10574		return
10575	}
10576	if !done {
10577		err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceDeleteFuture")
10578		return
10579	}
10580	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10581	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
10582		sr, err = client.DeleteResponder(sr.Response.Response)
10583		if err != nil {
10584			err = autorest.NewErrorWithError(err, "apimanagement.ServiceDeleteFuture", "Result", sr.Response.Response, "Failure responding to request")
10585		}
10586	}
10587	return
10588}
10589
10590// ServiceGetSsoTokenResult the response of the GetSsoToken operation.
10591type ServiceGetSsoTokenResult struct {
10592	autorest.Response `json:"-"`
10593	// RedirectURI - Redirect URL to the Publisher Portal containing the SSO token.
10594	RedirectURI *string `json:"redirectUri,omitempty"`
10595}
10596
10597// ServiceIdentity identity properties of the Api Management service resource.
10598type ServiceIdentity struct {
10599	// Type - The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssignedUserAssigned', 'None'
10600	Type ApimIdentityType `json:"type,omitempty"`
10601	// PrincipalID - READ-ONLY; The principal id of the identity.
10602	PrincipalID *uuid.UUID `json:"principalId,omitempty"`
10603	// TenantID - READ-ONLY; The client tenant id of the identity.
10604	TenantID *uuid.UUID `json:"tenantId,omitempty"`
10605	// UserAssignedIdentities - The list of user identities associated with the resource. The user identity
10606	// dictionary key references will be ARM resource ids in the form:
10607	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/
10608	//     providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
10609	UserAssignedIdentities map[string]*UserIdentityProperties `json:"userAssignedIdentities"`
10610}
10611
10612// MarshalJSON is the custom marshaler for ServiceIdentity.
10613func (si ServiceIdentity) MarshalJSON() ([]byte, error) {
10614	objectMap := make(map[string]interface{})
10615	if si.Type != "" {
10616		objectMap["type"] = si.Type
10617	}
10618	if si.UserAssignedIdentities != nil {
10619		objectMap["userAssignedIdentities"] = si.UserAssignedIdentities
10620	}
10621	return json.Marshal(objectMap)
10622}
10623
10624// ServiceListResult the response of the List API Management services operation.
10625type ServiceListResult struct {
10626	autorest.Response `json:"-"`
10627	// Value - Result of the List API Management services operation.
10628	Value *[]ServiceResource `json:"value,omitempty"`
10629	// NextLink - Link to the next set of results. Not empty if Value contains incomplete list of API Management services.
10630	NextLink *string `json:"nextLink,omitempty"`
10631}
10632
10633// ServiceListResultIterator provides access to a complete listing of ServiceResource values.
10634type ServiceListResultIterator struct {
10635	i    int
10636	page ServiceListResultPage
10637}
10638
10639// NextWithContext advances to the next value.  If there was an error making
10640// the request the iterator does not advance and the error is returned.
10641func (iter *ServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
10642	if tracing.IsEnabled() {
10643		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceListResultIterator.NextWithContext")
10644		defer func() {
10645			sc := -1
10646			if iter.Response().Response.Response != nil {
10647				sc = iter.Response().Response.Response.StatusCode
10648			}
10649			tracing.EndSpan(ctx, sc, err)
10650		}()
10651	}
10652	iter.i++
10653	if iter.i < len(iter.page.Values()) {
10654		return nil
10655	}
10656	err = iter.page.NextWithContext(ctx)
10657	if err != nil {
10658		iter.i--
10659		return err
10660	}
10661	iter.i = 0
10662	return nil
10663}
10664
10665// Next advances to the next value.  If there was an error making
10666// the request the iterator does not advance and the error is returned.
10667// Deprecated: Use NextWithContext() instead.
10668func (iter *ServiceListResultIterator) Next() error {
10669	return iter.NextWithContext(context.Background())
10670}
10671
10672// NotDone returns true if the enumeration should be started or is not yet complete.
10673func (iter ServiceListResultIterator) NotDone() bool {
10674	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10675}
10676
10677// Response returns the raw server response from the last page request.
10678func (iter ServiceListResultIterator) Response() ServiceListResult {
10679	return iter.page.Response()
10680}
10681
10682// Value returns the current value or a zero-initialized value if the
10683// iterator has advanced beyond the end of the collection.
10684func (iter ServiceListResultIterator) Value() ServiceResource {
10685	if !iter.page.NotDone() {
10686		return ServiceResource{}
10687	}
10688	return iter.page.Values()[iter.i]
10689}
10690
10691// Creates a new instance of the ServiceListResultIterator type.
10692func NewServiceListResultIterator(page ServiceListResultPage) ServiceListResultIterator {
10693	return ServiceListResultIterator{page: page}
10694}
10695
10696// IsEmpty returns true if the ListResult contains no values.
10697func (slr ServiceListResult) IsEmpty() bool {
10698	return slr.Value == nil || len(*slr.Value) == 0
10699}
10700
10701// serviceListResultPreparer prepares a request to retrieve the next set of results.
10702// It returns nil if no more results exist.
10703func (slr ServiceListResult) serviceListResultPreparer(ctx context.Context) (*http.Request, error) {
10704	if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
10705		return nil, nil
10706	}
10707	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10708		autorest.AsJSON(),
10709		autorest.AsGet(),
10710		autorest.WithBaseURL(to.String(slr.NextLink)))
10711}
10712
10713// ServiceListResultPage contains a page of ServiceResource values.
10714type ServiceListResultPage struct {
10715	fn  func(context.Context, ServiceListResult) (ServiceListResult, error)
10716	slr ServiceListResult
10717}
10718
10719// NextWithContext advances to the next page of values.  If there was an error making
10720// the request the page does not advance and the error is returned.
10721func (page *ServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
10722	if tracing.IsEnabled() {
10723		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceListResultPage.NextWithContext")
10724		defer func() {
10725			sc := -1
10726			if page.Response().Response.Response != nil {
10727				sc = page.Response().Response.Response.StatusCode
10728			}
10729			tracing.EndSpan(ctx, sc, err)
10730		}()
10731	}
10732	next, err := page.fn(ctx, page.slr)
10733	if err != nil {
10734		return err
10735	}
10736	page.slr = next
10737	return nil
10738}
10739
10740// Next advances to the next page of values.  If there was an error making
10741// the request the page does not advance and the error is returned.
10742// Deprecated: Use NextWithContext() instead.
10743func (page *ServiceListResultPage) Next() error {
10744	return page.NextWithContext(context.Background())
10745}
10746
10747// NotDone returns true if the page enumeration should be started or is not yet complete.
10748func (page ServiceListResultPage) NotDone() bool {
10749	return !page.slr.IsEmpty()
10750}
10751
10752// Response returns the raw server response from the last page request.
10753func (page ServiceListResultPage) Response() ServiceListResult {
10754	return page.slr
10755}
10756
10757// Values returns the slice of values for the current page or nil if there are no values.
10758func (page ServiceListResultPage) Values() []ServiceResource {
10759	if page.slr.IsEmpty() {
10760		return nil
10761	}
10762	return *page.slr.Value
10763}
10764
10765// Creates a new instance of the ServiceListResultPage type.
10766func NewServiceListResultPage(getNextPage func(context.Context, ServiceListResult) (ServiceListResult, error)) ServiceListResultPage {
10767	return ServiceListResultPage{fn: getNextPage}
10768}
10769
10770// ServiceNameAvailabilityResult response of the CheckNameAvailability operation.
10771type ServiceNameAvailabilityResult struct {
10772	autorest.Response `json:"-"`
10773	// NameAvailable - READ-ONLY; True if the name is available and can be used to create a new API Management service; otherwise false.
10774	NameAvailable *bool `json:"nameAvailable,omitempty"`
10775	// Message - READ-ONLY; If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that <resourceName> is already in use, and direct them to select a different name.
10776	Message *string `json:"message,omitempty"`
10777	// Reason - Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.)  AlreadyExists indicates that the name is already in use and is therefore unavailable. Possible values include: 'Valid', 'Invalid', 'AlreadyExists'
10778	Reason NameAvailabilityReason `json:"reason,omitempty"`
10779}
10780
10781// ServiceProperties properties of an API Management service resource description.
10782type ServiceProperties struct {
10783	// PublisherEmail - Publisher email.
10784	PublisherEmail *string `json:"publisherEmail,omitempty"`
10785	// PublisherName - Publisher name.
10786	PublisherName *string `json:"publisherName,omitempty"`
10787	// NotificationSenderEmail - Email address from which the notification will be sent.
10788	NotificationSenderEmail *string `json:"notificationSenderEmail,omitempty"`
10789	// ProvisioningState - READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
10790	ProvisioningState *string `json:"provisioningState,omitempty"`
10791	// TargetProvisioningState - READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started on the service.
10792	TargetProvisioningState *string `json:"targetProvisioningState,omitempty"`
10793	// CreatedAtUtc - READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
10794	CreatedAtUtc *date.Time `json:"createdAtUtc,omitempty"`
10795	// GatewayURL - READ-ONLY; Gateway URL of the API Management service.
10796	GatewayURL *string `json:"gatewayUrl,omitempty"`
10797	// GatewayRegionalURL - READ-ONLY; Gateway URL of the API Management service in the Default Region.
10798	GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty"`
10799	// PortalURL - READ-ONLY; Publisher portal endpoint Url of the API Management service.
10800	PortalURL *string `json:"portalUrl,omitempty"`
10801	// ManagementAPIURL - READ-ONLY; Management API endpoint URL of the API Management service.
10802	ManagementAPIURL *string `json:"managementApiUrl,omitempty"`
10803	// ScmURL - READ-ONLY; SCM endpoint URL of the API Management service.
10804	ScmURL *string `json:"scmUrl,omitempty"`
10805	// DeveloperPortalURL - READ-ONLY; DEveloper Portal endpoint URL of the API Management service.
10806	DeveloperPortalURL *string `json:"developerPortalUrl,omitempty"`
10807	// HostnameConfigurations - Custom hostname configuration of the API Management service.
10808	HostnameConfigurations *[]HostnameConfiguration `json:"hostnameConfigurations,omitempty"`
10809	// PublicIPAddresses - READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard and Premium SKU.
10810	PublicIPAddresses *[]string `json:"publicIPAddresses,omitempty"`
10811	// PrivateIPAddresses - READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard and Premium SKU.
10812	PrivateIPAddresses *[]string `json:"privateIPAddresses,omitempty"`
10813	// VirtualNetworkConfiguration - Virtual network configuration of the API Management service.
10814	VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"`
10815	// AdditionalLocations - Additional datacenter locations of the API Management service.
10816	AdditionalLocations *[]AdditionalLocation `json:"additionalLocations,omitempty"`
10817	// CustomProperties - Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.  Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384
10818	CustomProperties map[string]*string `json:"customProperties"`
10819	// Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
10820	Certificates *[]CertificateConfiguration `json:"certificates,omitempty"`
10821	// EnableClientCertificate - Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway.
10822	EnableClientCertificate *bool `json:"enableClientCertificate,omitempty"`
10823	// DisableGateway - Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region.
10824	DisableGateway *bool `json:"disableGateway,omitempty"`
10825	// VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal'
10826	VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"`
10827	// APIVersionConstraint - Control Plane Apis version constraint for the API Management service.
10828	APIVersionConstraint *APIVersionConstraint `json:"apiVersionConstraint,omitempty"`
10829}
10830
10831// MarshalJSON is the custom marshaler for ServiceProperties.
10832func (sp ServiceProperties) MarshalJSON() ([]byte, error) {
10833	objectMap := make(map[string]interface{})
10834	if sp.PublisherEmail != nil {
10835		objectMap["publisherEmail"] = sp.PublisherEmail
10836	}
10837	if sp.PublisherName != nil {
10838		objectMap["publisherName"] = sp.PublisherName
10839	}
10840	if sp.NotificationSenderEmail != nil {
10841		objectMap["notificationSenderEmail"] = sp.NotificationSenderEmail
10842	}
10843	if sp.HostnameConfigurations != nil {
10844		objectMap["hostnameConfigurations"] = sp.HostnameConfigurations
10845	}
10846	if sp.VirtualNetworkConfiguration != nil {
10847		objectMap["virtualNetworkConfiguration"] = sp.VirtualNetworkConfiguration
10848	}
10849	if sp.AdditionalLocations != nil {
10850		objectMap["additionalLocations"] = sp.AdditionalLocations
10851	}
10852	if sp.CustomProperties != nil {
10853		objectMap["customProperties"] = sp.CustomProperties
10854	}
10855	if sp.Certificates != nil {
10856		objectMap["certificates"] = sp.Certificates
10857	}
10858	if sp.EnableClientCertificate != nil {
10859		objectMap["enableClientCertificate"] = sp.EnableClientCertificate
10860	}
10861	if sp.DisableGateway != nil {
10862		objectMap["disableGateway"] = sp.DisableGateway
10863	}
10864	if sp.VirtualNetworkType != "" {
10865		objectMap["virtualNetworkType"] = sp.VirtualNetworkType
10866	}
10867	if sp.APIVersionConstraint != nil {
10868		objectMap["apiVersionConstraint"] = sp.APIVersionConstraint
10869	}
10870	return json.Marshal(objectMap)
10871}
10872
10873// ServiceResource a single API Management service resource in List or Get response.
10874type ServiceResource struct {
10875	autorest.Response `json:"-"`
10876	// ServiceProperties - Properties of the API Management service.
10877	*ServiceProperties `json:"properties,omitempty"`
10878	// Sku - SKU properties of the API Management service.
10879	Sku *ServiceSkuProperties `json:"sku,omitempty"`
10880	// Identity - Managed service identity of the Api Management service.
10881	Identity *ServiceIdentity `json:"identity,omitempty"`
10882	// Location - Resource location.
10883	Location *string `json:"location,omitempty"`
10884	// Etag - READ-ONLY; ETag of the resource.
10885	Etag *string `json:"etag,omitempty"`
10886	// ID - READ-ONLY; Resource ID.
10887	ID *string `json:"id,omitempty"`
10888	// Name - READ-ONLY; Resource name.
10889	Name *string `json:"name,omitempty"`
10890	// Type - READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement.
10891	Type *string `json:"type,omitempty"`
10892	// Tags - Resource tags.
10893	Tags map[string]*string `json:"tags"`
10894}
10895
10896// MarshalJSON is the custom marshaler for ServiceResource.
10897func (sr ServiceResource) MarshalJSON() ([]byte, error) {
10898	objectMap := make(map[string]interface{})
10899	if sr.ServiceProperties != nil {
10900		objectMap["properties"] = sr.ServiceProperties
10901	}
10902	if sr.Sku != nil {
10903		objectMap["sku"] = sr.Sku
10904	}
10905	if sr.Identity != nil {
10906		objectMap["identity"] = sr.Identity
10907	}
10908	if sr.Location != nil {
10909		objectMap["location"] = sr.Location
10910	}
10911	if sr.Tags != nil {
10912		objectMap["tags"] = sr.Tags
10913	}
10914	return json.Marshal(objectMap)
10915}
10916
10917// UnmarshalJSON is the custom unmarshaler for ServiceResource struct.
10918func (sr *ServiceResource) UnmarshalJSON(body []byte) error {
10919	var m map[string]*json.RawMessage
10920	err := json.Unmarshal(body, &m)
10921	if err != nil {
10922		return err
10923	}
10924	for k, v := range m {
10925		switch k {
10926		case "properties":
10927			if v != nil {
10928				var serviceProperties ServiceProperties
10929				err = json.Unmarshal(*v, &serviceProperties)
10930				if err != nil {
10931					return err
10932				}
10933				sr.ServiceProperties = &serviceProperties
10934			}
10935		case "sku":
10936			if v != nil {
10937				var sku ServiceSkuProperties
10938				err = json.Unmarshal(*v, &sku)
10939				if err != nil {
10940					return err
10941				}
10942				sr.Sku = &sku
10943			}
10944		case "identity":
10945			if v != nil {
10946				var identity ServiceIdentity
10947				err = json.Unmarshal(*v, &identity)
10948				if err != nil {
10949					return err
10950				}
10951				sr.Identity = &identity
10952			}
10953		case "location":
10954			if v != nil {
10955				var location string
10956				err = json.Unmarshal(*v, &location)
10957				if err != nil {
10958					return err
10959				}
10960				sr.Location = &location
10961			}
10962		case "etag":
10963			if v != nil {
10964				var etag string
10965				err = json.Unmarshal(*v, &etag)
10966				if err != nil {
10967					return err
10968				}
10969				sr.Etag = &etag
10970			}
10971		case "id":
10972			if v != nil {
10973				var ID string
10974				err = json.Unmarshal(*v, &ID)
10975				if err != nil {
10976					return err
10977				}
10978				sr.ID = &ID
10979			}
10980		case "name":
10981			if v != nil {
10982				var name string
10983				err = json.Unmarshal(*v, &name)
10984				if err != nil {
10985					return err
10986				}
10987				sr.Name = &name
10988			}
10989		case "type":
10990			if v != nil {
10991				var typeVar string
10992				err = json.Unmarshal(*v, &typeVar)
10993				if err != nil {
10994					return err
10995				}
10996				sr.Type = &typeVar
10997			}
10998		case "tags":
10999			if v != nil {
11000				var tags map[string]*string
11001				err = json.Unmarshal(*v, &tags)
11002				if err != nil {
11003					return err
11004				}
11005				sr.Tags = tags
11006			}
11007		}
11008	}
11009
11010	return nil
11011}
11012
11013// ServiceRestoreFuture an abstraction for monitoring and retrieving the results of a long-running
11014// operation.
11015type ServiceRestoreFuture struct {
11016	azure.Future
11017}
11018
11019// Result returns the result of the asynchronous operation.
11020// If the operation has not completed it will return an error.
11021func (future *ServiceRestoreFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
11022	var done bool
11023	done, err = future.DoneWithContext(context.Background(), client)
11024	if err != nil {
11025		err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", future.Response(), "Polling failure")
11026		return
11027	}
11028	if !done {
11029		err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceRestoreFuture")
11030		return
11031	}
11032	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11033	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
11034		sr, err = client.RestoreResponder(sr.Response.Response)
11035		if err != nil {
11036			err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", sr.Response.Response, "Failure responding to request")
11037		}
11038	}
11039	return
11040}
11041
11042// ServiceSkuProperties API Management service resource SKU properties.
11043type ServiceSkuProperties struct {
11044	// Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic', 'SkuTypeConsumption'
11045	Name SkuType `json:"name,omitempty"`
11046	// Capacity - Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0.
11047	Capacity *int32 `json:"capacity,omitempty"`
11048}
11049
11050// ServiceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
11051// operation.
11052type ServiceUpdateFuture struct {
11053	azure.Future
11054}
11055
11056// Result returns the result of the asynchronous operation.
11057// If the operation has not completed it will return an error.
11058func (future *ServiceUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
11059	var done bool
11060	done, err = future.DoneWithContext(context.Background(), client)
11061	if err != nil {
11062		err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", future.Response(), "Polling failure")
11063		return
11064	}
11065	if !done {
11066		err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceUpdateFuture")
11067		return
11068	}
11069	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11070	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
11071		sr, err = client.UpdateResponder(sr.Response.Response)
11072		if err != nil {
11073			err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
11074		}
11075	}
11076	return
11077}
11078
11079// ServiceUpdateParameters parameter supplied to Update Api Management Service.
11080type ServiceUpdateParameters struct {
11081	// ServiceUpdateProperties - Properties of the API Management service.
11082	*ServiceUpdateProperties `json:"properties,omitempty"`
11083	// Sku - SKU properties of the API Management service.
11084	Sku *ServiceSkuProperties `json:"sku,omitempty"`
11085	// Identity - Managed service identity of the Api Management service.
11086	Identity *ServiceIdentity `json:"identity,omitempty"`
11087	// Etag - READ-ONLY; ETag of the resource.
11088	Etag *string `json:"etag,omitempty"`
11089	// ID - READ-ONLY; Resource ID.
11090	ID *string `json:"id,omitempty"`
11091	// Name - READ-ONLY; Resource name.
11092	Name *string `json:"name,omitempty"`
11093	// Type - READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement.
11094	Type *string `json:"type,omitempty"`
11095	// Tags - Resource tags.
11096	Tags map[string]*string `json:"tags"`
11097}
11098
11099// MarshalJSON is the custom marshaler for ServiceUpdateParameters.
11100func (sup ServiceUpdateParameters) MarshalJSON() ([]byte, error) {
11101	objectMap := make(map[string]interface{})
11102	if sup.ServiceUpdateProperties != nil {
11103		objectMap["properties"] = sup.ServiceUpdateProperties
11104	}
11105	if sup.Sku != nil {
11106		objectMap["sku"] = sup.Sku
11107	}
11108	if sup.Identity != nil {
11109		objectMap["identity"] = sup.Identity
11110	}
11111	if sup.Tags != nil {
11112		objectMap["tags"] = sup.Tags
11113	}
11114	return json.Marshal(objectMap)
11115}
11116
11117// UnmarshalJSON is the custom unmarshaler for ServiceUpdateParameters struct.
11118func (sup *ServiceUpdateParameters) UnmarshalJSON(body []byte) error {
11119	var m map[string]*json.RawMessage
11120	err := json.Unmarshal(body, &m)
11121	if err != nil {
11122		return err
11123	}
11124	for k, v := range m {
11125		switch k {
11126		case "properties":
11127			if v != nil {
11128				var serviceUpdateProperties ServiceUpdateProperties
11129				err = json.Unmarshal(*v, &serviceUpdateProperties)
11130				if err != nil {
11131					return err
11132				}
11133				sup.ServiceUpdateProperties = &serviceUpdateProperties
11134			}
11135		case "sku":
11136			if v != nil {
11137				var sku ServiceSkuProperties
11138				err = json.Unmarshal(*v, &sku)
11139				if err != nil {
11140					return err
11141				}
11142				sup.Sku = &sku
11143			}
11144		case "identity":
11145			if v != nil {
11146				var identity ServiceIdentity
11147				err = json.Unmarshal(*v, &identity)
11148				if err != nil {
11149					return err
11150				}
11151				sup.Identity = &identity
11152			}
11153		case "etag":
11154			if v != nil {
11155				var etag string
11156				err = json.Unmarshal(*v, &etag)
11157				if err != nil {
11158					return err
11159				}
11160				sup.Etag = &etag
11161			}
11162		case "id":
11163			if v != nil {
11164				var ID string
11165				err = json.Unmarshal(*v, &ID)
11166				if err != nil {
11167					return err
11168				}
11169				sup.ID = &ID
11170			}
11171		case "name":
11172			if v != nil {
11173				var name string
11174				err = json.Unmarshal(*v, &name)
11175				if err != nil {
11176					return err
11177				}
11178				sup.Name = &name
11179			}
11180		case "type":
11181			if v != nil {
11182				var typeVar string
11183				err = json.Unmarshal(*v, &typeVar)
11184				if err != nil {
11185					return err
11186				}
11187				sup.Type = &typeVar
11188			}
11189		case "tags":
11190			if v != nil {
11191				var tags map[string]*string
11192				err = json.Unmarshal(*v, &tags)
11193				if err != nil {
11194					return err
11195				}
11196				sup.Tags = tags
11197			}
11198		}
11199	}
11200
11201	return nil
11202}
11203
11204// ServiceUpdateProperties properties of an API Management service resource description.
11205type ServiceUpdateProperties struct {
11206	// PublisherEmail - Publisher email.
11207	PublisherEmail *string `json:"publisherEmail,omitempty"`
11208	// PublisherName - Publisher name.
11209	PublisherName *string `json:"publisherName,omitempty"`
11210	// NotificationSenderEmail - Email address from which the notification will be sent.
11211	NotificationSenderEmail *string `json:"notificationSenderEmail,omitempty"`
11212	// ProvisioningState - READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
11213	ProvisioningState *string `json:"provisioningState,omitempty"`
11214	// TargetProvisioningState - READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started on the service.
11215	TargetProvisioningState *string `json:"targetProvisioningState,omitempty"`
11216	// CreatedAtUtc - READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
11217	CreatedAtUtc *date.Time `json:"createdAtUtc,omitempty"`
11218	// GatewayURL - READ-ONLY; Gateway URL of the API Management service.
11219	GatewayURL *string `json:"gatewayUrl,omitempty"`
11220	// GatewayRegionalURL - READ-ONLY; Gateway URL of the API Management service in the Default Region.
11221	GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty"`
11222	// PortalURL - READ-ONLY; Publisher portal endpoint Url of the API Management service.
11223	PortalURL *string `json:"portalUrl,omitempty"`
11224	// ManagementAPIURL - READ-ONLY; Management API endpoint URL of the API Management service.
11225	ManagementAPIURL *string `json:"managementApiUrl,omitempty"`
11226	// ScmURL - READ-ONLY; SCM endpoint URL of the API Management service.
11227	ScmURL *string `json:"scmUrl,omitempty"`
11228	// DeveloperPortalURL - READ-ONLY; DEveloper Portal endpoint URL of the API Management service.
11229	DeveloperPortalURL *string `json:"developerPortalUrl,omitempty"`
11230	// HostnameConfigurations - Custom hostname configuration of the API Management service.
11231	HostnameConfigurations *[]HostnameConfiguration `json:"hostnameConfigurations,omitempty"`
11232	// PublicIPAddresses - READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard and Premium SKU.
11233	PublicIPAddresses *[]string `json:"publicIPAddresses,omitempty"`
11234	// PrivateIPAddresses - READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard and Premium SKU.
11235	PrivateIPAddresses *[]string `json:"privateIPAddresses,omitempty"`
11236	// VirtualNetworkConfiguration - Virtual network configuration of the API Management service.
11237	VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"`
11238	// AdditionalLocations - Additional datacenter locations of the API Management service.
11239	AdditionalLocations *[]AdditionalLocation `json:"additionalLocations,omitempty"`
11240	// CustomProperties - Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.  Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384
11241	CustomProperties map[string]*string `json:"customProperties"`
11242	// Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
11243	Certificates *[]CertificateConfiguration `json:"certificates,omitempty"`
11244	// EnableClientCertificate - Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway.
11245	EnableClientCertificate *bool `json:"enableClientCertificate,omitempty"`
11246	// DisableGateway - Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region.
11247	DisableGateway *bool `json:"disableGateway,omitempty"`
11248	// VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal'
11249	VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"`
11250	// APIVersionConstraint - Control Plane Apis version constraint for the API Management service.
11251	APIVersionConstraint *APIVersionConstraint `json:"apiVersionConstraint,omitempty"`
11252}
11253
11254// MarshalJSON is the custom marshaler for ServiceUpdateProperties.
11255func (sup ServiceUpdateProperties) MarshalJSON() ([]byte, error) {
11256	objectMap := make(map[string]interface{})
11257	if sup.PublisherEmail != nil {
11258		objectMap["publisherEmail"] = sup.PublisherEmail
11259	}
11260	if sup.PublisherName != nil {
11261		objectMap["publisherName"] = sup.PublisherName
11262	}
11263	if sup.NotificationSenderEmail != nil {
11264		objectMap["notificationSenderEmail"] = sup.NotificationSenderEmail
11265	}
11266	if sup.HostnameConfigurations != nil {
11267		objectMap["hostnameConfigurations"] = sup.HostnameConfigurations
11268	}
11269	if sup.VirtualNetworkConfiguration != nil {
11270		objectMap["virtualNetworkConfiguration"] = sup.VirtualNetworkConfiguration
11271	}
11272	if sup.AdditionalLocations != nil {
11273		objectMap["additionalLocations"] = sup.AdditionalLocations
11274	}
11275	if sup.CustomProperties != nil {
11276		objectMap["customProperties"] = sup.CustomProperties
11277	}
11278	if sup.Certificates != nil {
11279		objectMap["certificates"] = sup.Certificates
11280	}
11281	if sup.EnableClientCertificate != nil {
11282		objectMap["enableClientCertificate"] = sup.EnableClientCertificate
11283	}
11284	if sup.DisableGateway != nil {
11285		objectMap["disableGateway"] = sup.DisableGateway
11286	}
11287	if sup.VirtualNetworkType != "" {
11288		objectMap["virtualNetworkType"] = sup.VirtualNetworkType
11289	}
11290	if sup.APIVersionConstraint != nil {
11291		objectMap["apiVersionConstraint"] = sup.APIVersionConstraint
11292	}
11293	return json.Marshal(objectMap)
11294}
11295
11296// SubscriptionCollection paged Subscriptions list representation.
11297type SubscriptionCollection struct {
11298	autorest.Response `json:"-"`
11299	// Value - Page values.
11300	Value *[]SubscriptionContract `json:"value,omitempty"`
11301	// NextLink - Next page link if any.
11302	NextLink *string `json:"nextLink,omitempty"`
11303}
11304
11305// SubscriptionCollectionIterator provides access to a complete listing of SubscriptionContract values.
11306type SubscriptionCollectionIterator struct {
11307	i    int
11308	page SubscriptionCollectionPage
11309}
11310
11311// NextWithContext advances to the next value.  If there was an error making
11312// the request the iterator does not advance and the error is returned.
11313func (iter *SubscriptionCollectionIterator) NextWithContext(ctx context.Context) (err error) {
11314	if tracing.IsEnabled() {
11315		ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionCollectionIterator.NextWithContext")
11316		defer func() {
11317			sc := -1
11318			if iter.Response().Response.Response != nil {
11319				sc = iter.Response().Response.Response.StatusCode
11320			}
11321			tracing.EndSpan(ctx, sc, err)
11322		}()
11323	}
11324	iter.i++
11325	if iter.i < len(iter.page.Values()) {
11326		return nil
11327	}
11328	err = iter.page.NextWithContext(ctx)
11329	if err != nil {
11330		iter.i--
11331		return err
11332	}
11333	iter.i = 0
11334	return nil
11335}
11336
11337// Next advances to the next value.  If there was an error making
11338// the request the iterator does not advance and the error is returned.
11339// Deprecated: Use NextWithContext() instead.
11340func (iter *SubscriptionCollectionIterator) Next() error {
11341	return iter.NextWithContext(context.Background())
11342}
11343
11344// NotDone returns true if the enumeration should be started or is not yet complete.
11345func (iter SubscriptionCollectionIterator) NotDone() bool {
11346	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11347}
11348
11349// Response returns the raw server response from the last page request.
11350func (iter SubscriptionCollectionIterator) Response() SubscriptionCollection {
11351	return iter.page.Response()
11352}
11353
11354// Value returns the current value or a zero-initialized value if the
11355// iterator has advanced beyond the end of the collection.
11356func (iter SubscriptionCollectionIterator) Value() SubscriptionContract {
11357	if !iter.page.NotDone() {
11358		return SubscriptionContract{}
11359	}
11360	return iter.page.Values()[iter.i]
11361}
11362
11363// Creates a new instance of the SubscriptionCollectionIterator type.
11364func NewSubscriptionCollectionIterator(page SubscriptionCollectionPage) SubscriptionCollectionIterator {
11365	return SubscriptionCollectionIterator{page: page}
11366}
11367
11368// IsEmpty returns true if the ListResult contains no values.
11369func (sc SubscriptionCollection) IsEmpty() bool {
11370	return sc.Value == nil || len(*sc.Value) == 0
11371}
11372
11373// subscriptionCollectionPreparer prepares a request to retrieve the next set of results.
11374// It returns nil if no more results exist.
11375func (sc SubscriptionCollection) subscriptionCollectionPreparer(ctx context.Context) (*http.Request, error) {
11376	if sc.NextLink == nil || len(to.String(sc.NextLink)) < 1 {
11377		return nil, nil
11378	}
11379	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11380		autorest.AsJSON(),
11381		autorest.AsGet(),
11382		autorest.WithBaseURL(to.String(sc.NextLink)))
11383}
11384
11385// SubscriptionCollectionPage contains a page of SubscriptionContract values.
11386type SubscriptionCollectionPage struct {
11387	fn func(context.Context, SubscriptionCollection) (SubscriptionCollection, error)
11388	sc SubscriptionCollection
11389}
11390
11391// NextWithContext advances to the next page of values.  If there was an error making
11392// the request the page does not advance and the error is returned.
11393func (page *SubscriptionCollectionPage) NextWithContext(ctx context.Context) (err error) {
11394	if tracing.IsEnabled() {
11395		ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionCollectionPage.NextWithContext")
11396		defer func() {
11397			sc := -1
11398			if page.Response().Response.Response != nil {
11399				sc = page.Response().Response.Response.StatusCode
11400			}
11401			tracing.EndSpan(ctx, sc, err)
11402		}()
11403	}
11404	next, err := page.fn(ctx, page.sc)
11405	if err != nil {
11406		return err
11407	}
11408	page.sc = next
11409	return nil
11410}
11411
11412// Next advances to the next page of values.  If there was an error making
11413// the request the page does not advance and the error is returned.
11414// Deprecated: Use NextWithContext() instead.
11415func (page *SubscriptionCollectionPage) Next() error {
11416	return page.NextWithContext(context.Background())
11417}
11418
11419// NotDone returns true if the page enumeration should be started or is not yet complete.
11420func (page SubscriptionCollectionPage) NotDone() bool {
11421	return !page.sc.IsEmpty()
11422}
11423
11424// Response returns the raw server response from the last page request.
11425func (page SubscriptionCollectionPage) Response() SubscriptionCollection {
11426	return page.sc
11427}
11428
11429// Values returns the slice of values for the current page or nil if there are no values.
11430func (page SubscriptionCollectionPage) Values() []SubscriptionContract {
11431	if page.sc.IsEmpty() {
11432		return nil
11433	}
11434	return *page.sc.Value
11435}
11436
11437// Creates a new instance of the SubscriptionCollectionPage type.
11438func NewSubscriptionCollectionPage(getNextPage func(context.Context, SubscriptionCollection) (SubscriptionCollection, error)) SubscriptionCollectionPage {
11439	return SubscriptionCollectionPage{fn: getNextPage}
11440}
11441
11442// SubscriptionContract subscription details.
11443type SubscriptionContract struct {
11444	autorest.Response `json:"-"`
11445	// SubscriptionContractProperties - Subscription contract properties.
11446	*SubscriptionContractProperties `json:"properties,omitempty"`
11447	// ID - READ-ONLY; Resource ID.
11448	ID *string `json:"id,omitempty"`
11449	// Name - READ-ONLY; Resource name.
11450	Name *string `json:"name,omitempty"`
11451	// Type - READ-ONLY; Resource type for API Management resource.
11452	Type *string `json:"type,omitempty"`
11453}
11454
11455// MarshalJSON is the custom marshaler for SubscriptionContract.
11456func (sc SubscriptionContract) MarshalJSON() ([]byte, error) {
11457	objectMap := make(map[string]interface{})
11458	if sc.SubscriptionContractProperties != nil {
11459		objectMap["properties"] = sc.SubscriptionContractProperties
11460	}
11461	return json.Marshal(objectMap)
11462}
11463
11464// UnmarshalJSON is the custom unmarshaler for SubscriptionContract struct.
11465func (sc *SubscriptionContract) UnmarshalJSON(body []byte) error {
11466	var m map[string]*json.RawMessage
11467	err := json.Unmarshal(body, &m)
11468	if err != nil {
11469		return err
11470	}
11471	for k, v := range m {
11472		switch k {
11473		case "properties":
11474			if v != nil {
11475				var subscriptionContractProperties SubscriptionContractProperties
11476				err = json.Unmarshal(*v, &subscriptionContractProperties)
11477				if err != nil {
11478					return err
11479				}
11480				sc.SubscriptionContractProperties = &subscriptionContractProperties
11481			}
11482		case "id":
11483			if v != nil {
11484				var ID string
11485				err = json.Unmarshal(*v, &ID)
11486				if err != nil {
11487					return err
11488				}
11489				sc.ID = &ID
11490			}
11491		case "name":
11492			if v != nil {
11493				var name string
11494				err = json.Unmarshal(*v, &name)
11495				if err != nil {
11496					return err
11497				}
11498				sc.Name = &name
11499			}
11500		case "type":
11501			if v != nil {
11502				var typeVar string
11503				err = json.Unmarshal(*v, &typeVar)
11504				if err != nil {
11505					return err
11506				}
11507				sc.Type = &typeVar
11508			}
11509		}
11510	}
11511
11512	return nil
11513}
11514
11515// SubscriptionContractProperties subscription details.
11516type SubscriptionContractProperties struct {
11517	// OwnerID - The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier.
11518	OwnerID *string `json:"ownerId,omitempty"`
11519	// Scope - Scope like /products/{productId} or /apis or /apis/{apiId}.
11520	Scope *string `json:"scope,omitempty"`
11521	// DisplayName - The name of the subscription, or null if the subscription has no name.
11522	DisplayName *string `json:"displayName,omitempty"`
11523	// 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'
11524	State SubscriptionState `json:"state,omitempty"`
11525	// 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.
11526	CreatedDate *date.Time `json:"createdDate,omitempty"`
11527	// 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.
11528	StartDate *date.Time `json:"startDate,omitempty"`
11529	// 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.
11530	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
11531	// 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.
11532	EndDate *date.Time `json:"endDate,omitempty"`
11533	// 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.
11534	NotificationDate *date.Time `json:"notificationDate,omitempty"`
11535	// PrimaryKey - Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
11536	PrimaryKey *string `json:"primaryKey,omitempty"`
11537	// SecondaryKey - Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
11538	SecondaryKey *string `json:"secondaryKey,omitempty"`
11539	// StateComment - Optional subscription comment added by an administrator.
11540	StateComment *string `json:"stateComment,omitempty"`
11541	// AllowTracing - Determines whether tracing is enabled
11542	AllowTracing *bool `json:"allowTracing,omitempty"`
11543}
11544
11545// SubscriptionCreateParameterProperties parameters supplied to the Create subscription operation.
11546type SubscriptionCreateParameterProperties struct {
11547	// OwnerID - User (user id path) for whom subscription is being created in form /users/{userId}
11548	OwnerID *string `json:"ownerId,omitempty"`
11549	// Scope - Scope like /products/{productId} or /apis or /apis/{apiId}.
11550	Scope *string `json:"scope,omitempty"`
11551	// DisplayName - Subscription name.
11552	DisplayName *string `json:"displayName,omitempty"`
11553	// PrimaryKey - Primary subscription key. If not specified during request key will be generated automatically.
11554	PrimaryKey *string `json:"primaryKey,omitempty"`
11555	// SecondaryKey - Secondary subscription key. If not specified during request key will be generated automatically.
11556	SecondaryKey *string `json:"secondaryKey,omitempty"`
11557	// 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'
11558	State SubscriptionState `json:"state,omitempty"`
11559	// AllowTracing - Determines whether tracing can be enabled
11560	AllowTracing *bool `json:"allowTracing,omitempty"`
11561}
11562
11563// SubscriptionCreateParameters subscription create details.
11564type SubscriptionCreateParameters struct {
11565	// SubscriptionCreateParameterProperties - Subscription contract properties.
11566	*SubscriptionCreateParameterProperties `json:"properties,omitempty"`
11567}
11568
11569// MarshalJSON is the custom marshaler for SubscriptionCreateParameters.
11570func (scp SubscriptionCreateParameters) MarshalJSON() ([]byte, error) {
11571	objectMap := make(map[string]interface{})
11572	if scp.SubscriptionCreateParameterProperties != nil {
11573		objectMap["properties"] = scp.SubscriptionCreateParameterProperties
11574	}
11575	return json.Marshal(objectMap)
11576}
11577
11578// UnmarshalJSON is the custom unmarshaler for SubscriptionCreateParameters struct.
11579func (scp *SubscriptionCreateParameters) UnmarshalJSON(body []byte) error {
11580	var m map[string]*json.RawMessage
11581	err := json.Unmarshal(body, &m)
11582	if err != nil {
11583		return err
11584	}
11585	for k, v := range m {
11586		switch k {
11587		case "properties":
11588			if v != nil {
11589				var subscriptionCreateParameterProperties SubscriptionCreateParameterProperties
11590				err = json.Unmarshal(*v, &subscriptionCreateParameterProperties)
11591				if err != nil {
11592					return err
11593				}
11594				scp.SubscriptionCreateParameterProperties = &subscriptionCreateParameterProperties
11595			}
11596		}
11597	}
11598
11599	return nil
11600}
11601
11602// SubscriptionKeyParameterNamesContract subscription key parameter names details.
11603type SubscriptionKeyParameterNamesContract struct {
11604	// Header - Subscription key header name.
11605	Header *string `json:"header,omitempty"`
11606	// Query - Subscription key query string parameter name.
11607	Query *string `json:"query,omitempty"`
11608}
11609
11610// SubscriptionKeysContract subscription keys.
11611type SubscriptionKeysContract struct {
11612	autorest.Response `json:"-"`
11613	// PrimaryKey - Subscription primary key.
11614	PrimaryKey *string `json:"primaryKey,omitempty"`
11615	// SecondaryKey - Subscription secondary key.
11616	SecondaryKey *string `json:"secondaryKey,omitempty"`
11617}
11618
11619// SubscriptionsDelegationSettingsProperties subscriptions delegation settings properties.
11620type SubscriptionsDelegationSettingsProperties struct {
11621	// Enabled - Enable or disable delegation for subscriptions.
11622	Enabled *bool `json:"enabled,omitempty"`
11623}
11624
11625// SubscriptionUpdateParameterProperties parameters supplied to the Update subscription operation.
11626type SubscriptionUpdateParameterProperties struct {
11627	// OwnerID - User identifier path: /users/{userId}
11628	OwnerID *string `json:"ownerId,omitempty"`
11629	// Scope - Scope like /products/{productId} or /apis or /apis/{apiId}
11630	Scope *string `json:"scope,omitempty"`
11631	// 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.
11632	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
11633	// DisplayName - Subscription name.
11634	DisplayName *string `json:"displayName,omitempty"`
11635	// PrimaryKey - Primary subscription key.
11636	PrimaryKey *string `json:"primaryKey,omitempty"`
11637	// SecondaryKey - Secondary subscription key.
11638	SecondaryKey *string `json:"secondaryKey,omitempty"`
11639	// 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'
11640	State SubscriptionState `json:"state,omitempty"`
11641	// StateComment - Comments describing subscription state change by the administrator.
11642	StateComment *string `json:"stateComment,omitempty"`
11643	// AllowTracing - Determines whether tracing can be enabled
11644	AllowTracing *bool `json:"allowTracing,omitempty"`
11645}
11646
11647// SubscriptionUpdateParameters subscription update details.
11648type SubscriptionUpdateParameters struct {
11649	// SubscriptionUpdateParameterProperties - Subscription Update contract properties.
11650	*SubscriptionUpdateParameterProperties `json:"properties,omitempty"`
11651}
11652
11653// MarshalJSON is the custom marshaler for SubscriptionUpdateParameters.
11654func (sup SubscriptionUpdateParameters) MarshalJSON() ([]byte, error) {
11655	objectMap := make(map[string]interface{})
11656	if sup.SubscriptionUpdateParameterProperties != nil {
11657		objectMap["properties"] = sup.SubscriptionUpdateParameterProperties
11658	}
11659	return json.Marshal(objectMap)
11660}
11661
11662// UnmarshalJSON is the custom unmarshaler for SubscriptionUpdateParameters struct.
11663func (sup *SubscriptionUpdateParameters) UnmarshalJSON(body []byte) error {
11664	var m map[string]*json.RawMessage
11665	err := json.Unmarshal(body, &m)
11666	if err != nil {
11667		return err
11668	}
11669	for k, v := range m {
11670		switch k {
11671		case "properties":
11672			if v != nil {
11673				var subscriptionUpdateParameterProperties SubscriptionUpdateParameterProperties
11674				err = json.Unmarshal(*v, &subscriptionUpdateParameterProperties)
11675				if err != nil {
11676					return err
11677				}
11678				sup.SubscriptionUpdateParameterProperties = &subscriptionUpdateParameterProperties
11679			}
11680		}
11681	}
11682
11683	return nil
11684}
11685
11686// TagCollection paged Tag list representation.
11687type TagCollection struct {
11688	autorest.Response `json:"-"`
11689	// Value - Page values.
11690	Value *[]TagContract `json:"value,omitempty"`
11691	// NextLink - Next page link if any.
11692	NextLink *string `json:"nextLink,omitempty"`
11693}
11694
11695// TagCollectionIterator provides access to a complete listing of TagContract values.
11696type TagCollectionIterator struct {
11697	i    int
11698	page TagCollectionPage
11699}
11700
11701// NextWithContext advances to the next value.  If there was an error making
11702// the request the iterator does not advance and the error is returned.
11703func (iter *TagCollectionIterator) NextWithContext(ctx context.Context) (err error) {
11704	if tracing.IsEnabled() {
11705		ctx = tracing.StartSpan(ctx, fqdn+"/TagCollectionIterator.NextWithContext")
11706		defer func() {
11707			sc := -1
11708			if iter.Response().Response.Response != nil {
11709				sc = iter.Response().Response.Response.StatusCode
11710			}
11711			tracing.EndSpan(ctx, sc, err)
11712		}()
11713	}
11714	iter.i++
11715	if iter.i < len(iter.page.Values()) {
11716		return nil
11717	}
11718	err = iter.page.NextWithContext(ctx)
11719	if err != nil {
11720		iter.i--
11721		return err
11722	}
11723	iter.i = 0
11724	return nil
11725}
11726
11727// Next advances to the next value.  If there was an error making
11728// the request the iterator does not advance and the error is returned.
11729// Deprecated: Use NextWithContext() instead.
11730func (iter *TagCollectionIterator) Next() error {
11731	return iter.NextWithContext(context.Background())
11732}
11733
11734// NotDone returns true if the enumeration should be started or is not yet complete.
11735func (iter TagCollectionIterator) NotDone() bool {
11736	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11737}
11738
11739// Response returns the raw server response from the last page request.
11740func (iter TagCollectionIterator) Response() TagCollection {
11741	return iter.page.Response()
11742}
11743
11744// Value returns the current value or a zero-initialized value if the
11745// iterator has advanced beyond the end of the collection.
11746func (iter TagCollectionIterator) Value() TagContract {
11747	if !iter.page.NotDone() {
11748		return TagContract{}
11749	}
11750	return iter.page.Values()[iter.i]
11751}
11752
11753// Creates a new instance of the TagCollectionIterator type.
11754func NewTagCollectionIterator(page TagCollectionPage) TagCollectionIterator {
11755	return TagCollectionIterator{page: page}
11756}
11757
11758// IsEmpty returns true if the ListResult contains no values.
11759func (tc TagCollection) IsEmpty() bool {
11760	return tc.Value == nil || len(*tc.Value) == 0
11761}
11762
11763// tagCollectionPreparer prepares a request to retrieve the next set of results.
11764// It returns nil if no more results exist.
11765func (tc TagCollection) tagCollectionPreparer(ctx context.Context) (*http.Request, error) {
11766	if tc.NextLink == nil || len(to.String(tc.NextLink)) < 1 {
11767		return nil, nil
11768	}
11769	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11770		autorest.AsJSON(),
11771		autorest.AsGet(),
11772		autorest.WithBaseURL(to.String(tc.NextLink)))
11773}
11774
11775// TagCollectionPage contains a page of TagContract values.
11776type TagCollectionPage struct {
11777	fn func(context.Context, TagCollection) (TagCollection, error)
11778	tc TagCollection
11779}
11780
11781// NextWithContext advances to the next page of values.  If there was an error making
11782// the request the page does not advance and the error is returned.
11783func (page *TagCollectionPage) NextWithContext(ctx context.Context) (err error) {
11784	if tracing.IsEnabled() {
11785		ctx = tracing.StartSpan(ctx, fqdn+"/TagCollectionPage.NextWithContext")
11786		defer func() {
11787			sc := -1
11788			if page.Response().Response.Response != nil {
11789				sc = page.Response().Response.Response.StatusCode
11790			}
11791			tracing.EndSpan(ctx, sc, err)
11792		}()
11793	}
11794	next, err := page.fn(ctx, page.tc)
11795	if err != nil {
11796		return err
11797	}
11798	page.tc = next
11799	return nil
11800}
11801
11802// Next advances to the next page of values.  If there was an error making
11803// the request the page does not advance and the error is returned.
11804// Deprecated: Use NextWithContext() instead.
11805func (page *TagCollectionPage) Next() error {
11806	return page.NextWithContext(context.Background())
11807}
11808
11809// NotDone returns true if the page enumeration should be started or is not yet complete.
11810func (page TagCollectionPage) NotDone() bool {
11811	return !page.tc.IsEmpty()
11812}
11813
11814// Response returns the raw server response from the last page request.
11815func (page TagCollectionPage) Response() TagCollection {
11816	return page.tc
11817}
11818
11819// Values returns the slice of values for the current page or nil if there are no values.
11820func (page TagCollectionPage) Values() []TagContract {
11821	if page.tc.IsEmpty() {
11822		return nil
11823	}
11824	return *page.tc.Value
11825}
11826
11827// Creates a new instance of the TagCollectionPage type.
11828func NewTagCollectionPage(getNextPage func(context.Context, TagCollection) (TagCollection, error)) TagCollectionPage {
11829	return TagCollectionPage{fn: getNextPage}
11830}
11831
11832// TagContract tag Contract details.
11833type TagContract struct {
11834	autorest.Response `json:"-"`
11835	// TagContractProperties - Tag entity contract properties.
11836	*TagContractProperties `json:"properties,omitempty"`
11837	// ID - READ-ONLY; Resource ID.
11838	ID *string `json:"id,omitempty"`
11839	// Name - READ-ONLY; Resource name.
11840	Name *string `json:"name,omitempty"`
11841	// Type - READ-ONLY; Resource type for API Management resource.
11842	Type *string `json:"type,omitempty"`
11843}
11844
11845// MarshalJSON is the custom marshaler for TagContract.
11846func (tc TagContract) MarshalJSON() ([]byte, error) {
11847	objectMap := make(map[string]interface{})
11848	if tc.TagContractProperties != nil {
11849		objectMap["properties"] = tc.TagContractProperties
11850	}
11851	return json.Marshal(objectMap)
11852}
11853
11854// UnmarshalJSON is the custom unmarshaler for TagContract struct.
11855func (tc *TagContract) UnmarshalJSON(body []byte) error {
11856	var m map[string]*json.RawMessage
11857	err := json.Unmarshal(body, &m)
11858	if err != nil {
11859		return err
11860	}
11861	for k, v := range m {
11862		switch k {
11863		case "properties":
11864			if v != nil {
11865				var tagContractProperties TagContractProperties
11866				err = json.Unmarshal(*v, &tagContractProperties)
11867				if err != nil {
11868					return err
11869				}
11870				tc.TagContractProperties = &tagContractProperties
11871			}
11872		case "id":
11873			if v != nil {
11874				var ID string
11875				err = json.Unmarshal(*v, &ID)
11876				if err != nil {
11877					return err
11878				}
11879				tc.ID = &ID
11880			}
11881		case "name":
11882			if v != nil {
11883				var name string
11884				err = json.Unmarshal(*v, &name)
11885				if err != nil {
11886					return err
11887				}
11888				tc.Name = &name
11889			}
11890		case "type":
11891			if v != nil {
11892				var typeVar string
11893				err = json.Unmarshal(*v, &typeVar)
11894				if err != nil {
11895					return err
11896				}
11897				tc.Type = &typeVar
11898			}
11899		}
11900	}
11901
11902	return nil
11903}
11904
11905// TagContractProperties tag contract Properties.
11906type TagContractProperties struct {
11907	// DisplayName - Tag name.
11908	DisplayName *string `json:"displayName,omitempty"`
11909}
11910
11911// TagCreateUpdateParameters parameters supplied to Create/Update Tag operations.
11912type TagCreateUpdateParameters struct {
11913	// TagContractProperties - Properties supplied to Create Tag operation.
11914	*TagContractProperties `json:"properties,omitempty"`
11915}
11916
11917// MarshalJSON is the custom marshaler for TagCreateUpdateParameters.
11918func (tcup TagCreateUpdateParameters) MarshalJSON() ([]byte, error) {
11919	objectMap := make(map[string]interface{})
11920	if tcup.TagContractProperties != nil {
11921		objectMap["properties"] = tcup.TagContractProperties
11922	}
11923	return json.Marshal(objectMap)
11924}
11925
11926// UnmarshalJSON is the custom unmarshaler for TagCreateUpdateParameters struct.
11927func (tcup *TagCreateUpdateParameters) UnmarshalJSON(body []byte) error {
11928	var m map[string]*json.RawMessage
11929	err := json.Unmarshal(body, &m)
11930	if err != nil {
11931		return err
11932	}
11933	for k, v := range m {
11934		switch k {
11935		case "properties":
11936			if v != nil {
11937				var tagContractProperties TagContractProperties
11938				err = json.Unmarshal(*v, &tagContractProperties)
11939				if err != nil {
11940					return err
11941				}
11942				tcup.TagContractProperties = &tagContractProperties
11943			}
11944		}
11945	}
11946
11947	return nil
11948}
11949
11950// TagDescriptionBaseProperties parameters supplied to the Create TagDescription operation.
11951type TagDescriptionBaseProperties struct {
11952	// Description - Description of the Tag.
11953	Description *string `json:"description,omitempty"`
11954	// ExternalDocsURL - Absolute URL of external resources describing the tag.
11955	ExternalDocsURL *string `json:"externalDocsUrl,omitempty"`
11956	// ExternalDocsDescription - Description of the external resources describing the tag.
11957	ExternalDocsDescription *string `json:"externalDocsDescription,omitempty"`
11958}
11959
11960// TagDescriptionCollection paged TagDescription list representation.
11961type TagDescriptionCollection struct {
11962	autorest.Response `json:"-"`
11963	// Value - Page values.
11964	Value *[]TagDescriptionContract `json:"value,omitempty"`
11965	// NextLink - Next page link if any.
11966	NextLink *string `json:"nextLink,omitempty"`
11967}
11968
11969// TagDescriptionCollectionIterator provides access to a complete listing of TagDescriptionContract values.
11970type TagDescriptionCollectionIterator struct {
11971	i    int
11972	page TagDescriptionCollectionPage
11973}
11974
11975// NextWithContext advances to the next value.  If there was an error making
11976// the request the iterator does not advance and the error is returned.
11977func (iter *TagDescriptionCollectionIterator) NextWithContext(ctx context.Context) (err error) {
11978	if tracing.IsEnabled() {
11979		ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionCollectionIterator.NextWithContext")
11980		defer func() {
11981			sc := -1
11982			if iter.Response().Response.Response != nil {
11983				sc = iter.Response().Response.Response.StatusCode
11984			}
11985			tracing.EndSpan(ctx, sc, err)
11986		}()
11987	}
11988	iter.i++
11989	if iter.i < len(iter.page.Values()) {
11990		return nil
11991	}
11992	err = iter.page.NextWithContext(ctx)
11993	if err != nil {
11994		iter.i--
11995		return err
11996	}
11997	iter.i = 0
11998	return nil
11999}
12000
12001// Next advances to the next value.  If there was an error making
12002// the request the iterator does not advance and the error is returned.
12003// Deprecated: Use NextWithContext() instead.
12004func (iter *TagDescriptionCollectionIterator) Next() error {
12005	return iter.NextWithContext(context.Background())
12006}
12007
12008// NotDone returns true if the enumeration should be started or is not yet complete.
12009func (iter TagDescriptionCollectionIterator) NotDone() bool {
12010	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12011}
12012
12013// Response returns the raw server response from the last page request.
12014func (iter TagDescriptionCollectionIterator) Response() TagDescriptionCollection {
12015	return iter.page.Response()
12016}
12017
12018// Value returns the current value or a zero-initialized value if the
12019// iterator has advanced beyond the end of the collection.
12020func (iter TagDescriptionCollectionIterator) Value() TagDescriptionContract {
12021	if !iter.page.NotDone() {
12022		return TagDescriptionContract{}
12023	}
12024	return iter.page.Values()[iter.i]
12025}
12026
12027// Creates a new instance of the TagDescriptionCollectionIterator type.
12028func NewTagDescriptionCollectionIterator(page TagDescriptionCollectionPage) TagDescriptionCollectionIterator {
12029	return TagDescriptionCollectionIterator{page: page}
12030}
12031
12032// IsEmpty returns true if the ListResult contains no values.
12033func (tdc TagDescriptionCollection) IsEmpty() bool {
12034	return tdc.Value == nil || len(*tdc.Value) == 0
12035}
12036
12037// tagDescriptionCollectionPreparer prepares a request to retrieve the next set of results.
12038// It returns nil if no more results exist.
12039func (tdc TagDescriptionCollection) tagDescriptionCollectionPreparer(ctx context.Context) (*http.Request, error) {
12040	if tdc.NextLink == nil || len(to.String(tdc.NextLink)) < 1 {
12041		return nil, nil
12042	}
12043	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12044		autorest.AsJSON(),
12045		autorest.AsGet(),
12046		autorest.WithBaseURL(to.String(tdc.NextLink)))
12047}
12048
12049// TagDescriptionCollectionPage contains a page of TagDescriptionContract values.
12050type TagDescriptionCollectionPage struct {
12051	fn  func(context.Context, TagDescriptionCollection) (TagDescriptionCollection, error)
12052	tdc TagDescriptionCollection
12053}
12054
12055// NextWithContext advances to the next page of values.  If there was an error making
12056// the request the page does not advance and the error is returned.
12057func (page *TagDescriptionCollectionPage) NextWithContext(ctx context.Context) (err error) {
12058	if tracing.IsEnabled() {
12059		ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionCollectionPage.NextWithContext")
12060		defer func() {
12061			sc := -1
12062			if page.Response().Response.Response != nil {
12063				sc = page.Response().Response.Response.StatusCode
12064			}
12065			tracing.EndSpan(ctx, sc, err)
12066		}()
12067	}
12068	next, err := page.fn(ctx, page.tdc)
12069	if err != nil {
12070		return err
12071	}
12072	page.tdc = next
12073	return nil
12074}
12075
12076// Next advances to the next page of values.  If there was an error making
12077// the request the page does not advance and the error is returned.
12078// Deprecated: Use NextWithContext() instead.
12079func (page *TagDescriptionCollectionPage) Next() error {
12080	return page.NextWithContext(context.Background())
12081}
12082
12083// NotDone returns true if the page enumeration should be started or is not yet complete.
12084func (page TagDescriptionCollectionPage) NotDone() bool {
12085	return !page.tdc.IsEmpty()
12086}
12087
12088// Response returns the raw server response from the last page request.
12089func (page TagDescriptionCollectionPage) Response() TagDescriptionCollection {
12090	return page.tdc
12091}
12092
12093// Values returns the slice of values for the current page or nil if there are no values.
12094func (page TagDescriptionCollectionPage) Values() []TagDescriptionContract {
12095	if page.tdc.IsEmpty() {
12096		return nil
12097	}
12098	return *page.tdc.Value
12099}
12100
12101// Creates a new instance of the TagDescriptionCollectionPage type.
12102func NewTagDescriptionCollectionPage(getNextPage func(context.Context, TagDescriptionCollection) (TagDescriptionCollection, error)) TagDescriptionCollectionPage {
12103	return TagDescriptionCollectionPage{fn: getNextPage}
12104}
12105
12106// TagDescriptionContract contract details.
12107type TagDescriptionContract struct {
12108	autorest.Response `json:"-"`
12109	// TagDescriptionContractProperties - TagDescription entity contract properties.
12110	*TagDescriptionContractProperties `json:"properties,omitempty"`
12111	// ID - READ-ONLY; Resource ID.
12112	ID *string `json:"id,omitempty"`
12113	// Name - READ-ONLY; Resource name.
12114	Name *string `json:"name,omitempty"`
12115	// Type - READ-ONLY; Resource type for API Management resource.
12116	Type *string `json:"type,omitempty"`
12117}
12118
12119// MarshalJSON is the custom marshaler for TagDescriptionContract.
12120func (tdc TagDescriptionContract) MarshalJSON() ([]byte, error) {
12121	objectMap := make(map[string]interface{})
12122	if tdc.TagDescriptionContractProperties != nil {
12123		objectMap["properties"] = tdc.TagDescriptionContractProperties
12124	}
12125	return json.Marshal(objectMap)
12126}
12127
12128// UnmarshalJSON is the custom unmarshaler for TagDescriptionContract struct.
12129func (tdc *TagDescriptionContract) UnmarshalJSON(body []byte) error {
12130	var m map[string]*json.RawMessage
12131	err := json.Unmarshal(body, &m)
12132	if err != nil {
12133		return err
12134	}
12135	for k, v := range m {
12136		switch k {
12137		case "properties":
12138			if v != nil {
12139				var tagDescriptionContractProperties TagDescriptionContractProperties
12140				err = json.Unmarshal(*v, &tagDescriptionContractProperties)
12141				if err != nil {
12142					return err
12143				}
12144				tdc.TagDescriptionContractProperties = &tagDescriptionContractProperties
12145			}
12146		case "id":
12147			if v != nil {
12148				var ID string
12149				err = json.Unmarshal(*v, &ID)
12150				if err != nil {
12151					return err
12152				}
12153				tdc.ID = &ID
12154			}
12155		case "name":
12156			if v != nil {
12157				var name string
12158				err = json.Unmarshal(*v, &name)
12159				if err != nil {
12160					return err
12161				}
12162				tdc.Name = &name
12163			}
12164		case "type":
12165			if v != nil {
12166				var typeVar string
12167				err = json.Unmarshal(*v, &typeVar)
12168				if err != nil {
12169					return err
12170				}
12171				tdc.Type = &typeVar
12172			}
12173		}
12174	}
12175
12176	return nil
12177}
12178
12179// TagDescriptionContractProperties tagDescription contract Properties.
12180type TagDescriptionContractProperties struct {
12181	// TagID - Identifier of the tag in the form of /tags/{tagId}
12182	TagID *string `json:"tagId,omitempty"`
12183	// DisplayName - Tag name.
12184	DisplayName *string `json:"displayName,omitempty"`
12185	// Description - Description of the Tag.
12186	Description *string `json:"description,omitempty"`
12187	// ExternalDocsURL - Absolute URL of external resources describing the tag.
12188	ExternalDocsURL *string `json:"externalDocsUrl,omitempty"`
12189	// ExternalDocsDescription - Description of the external resources describing the tag.
12190	ExternalDocsDescription *string `json:"externalDocsDescription,omitempty"`
12191}
12192
12193// TagDescriptionCreateParameters parameters supplied to the Create TagDescription operation.
12194type TagDescriptionCreateParameters struct {
12195	// TagDescriptionBaseProperties - Properties supplied to Create TagDescription operation.
12196	*TagDescriptionBaseProperties `json:"properties,omitempty"`
12197}
12198
12199// MarshalJSON is the custom marshaler for TagDescriptionCreateParameters.
12200func (tdcp TagDescriptionCreateParameters) MarshalJSON() ([]byte, error) {
12201	objectMap := make(map[string]interface{})
12202	if tdcp.TagDescriptionBaseProperties != nil {
12203		objectMap["properties"] = tdcp.TagDescriptionBaseProperties
12204	}
12205	return json.Marshal(objectMap)
12206}
12207
12208// UnmarshalJSON is the custom unmarshaler for TagDescriptionCreateParameters struct.
12209func (tdcp *TagDescriptionCreateParameters) UnmarshalJSON(body []byte) error {
12210	var m map[string]*json.RawMessage
12211	err := json.Unmarshal(body, &m)
12212	if err != nil {
12213		return err
12214	}
12215	for k, v := range m {
12216		switch k {
12217		case "properties":
12218			if v != nil {
12219				var tagDescriptionBaseProperties TagDescriptionBaseProperties
12220				err = json.Unmarshal(*v, &tagDescriptionBaseProperties)
12221				if err != nil {
12222					return err
12223				}
12224				tdcp.TagDescriptionBaseProperties = &tagDescriptionBaseProperties
12225			}
12226		}
12227	}
12228
12229	return nil
12230}
12231
12232// TagResourceCollection paged Tag list representation.
12233type TagResourceCollection struct {
12234	autorest.Response `json:"-"`
12235	// Value - Page values.
12236	Value *[]TagResourceContract `json:"value,omitempty"`
12237	// NextLink - Next page link if any.
12238	NextLink *string `json:"nextLink,omitempty"`
12239}
12240
12241// TagResourceCollectionIterator provides access to a complete listing of TagResourceContract values.
12242type TagResourceCollectionIterator struct {
12243	i    int
12244	page TagResourceCollectionPage
12245}
12246
12247// NextWithContext advances to the next value.  If there was an error making
12248// the request the iterator does not advance and the error is returned.
12249func (iter *TagResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
12250	if tracing.IsEnabled() {
12251		ctx = tracing.StartSpan(ctx, fqdn+"/TagResourceCollectionIterator.NextWithContext")
12252		defer func() {
12253			sc := -1
12254			if iter.Response().Response.Response != nil {
12255				sc = iter.Response().Response.Response.StatusCode
12256			}
12257			tracing.EndSpan(ctx, sc, err)
12258		}()
12259	}
12260	iter.i++
12261	if iter.i < len(iter.page.Values()) {
12262		return nil
12263	}
12264	err = iter.page.NextWithContext(ctx)
12265	if err != nil {
12266		iter.i--
12267		return err
12268	}
12269	iter.i = 0
12270	return nil
12271}
12272
12273// Next advances to the next value.  If there was an error making
12274// the request the iterator does not advance and the error is returned.
12275// Deprecated: Use NextWithContext() instead.
12276func (iter *TagResourceCollectionIterator) Next() error {
12277	return iter.NextWithContext(context.Background())
12278}
12279
12280// NotDone returns true if the enumeration should be started or is not yet complete.
12281func (iter TagResourceCollectionIterator) NotDone() bool {
12282	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12283}
12284
12285// Response returns the raw server response from the last page request.
12286func (iter TagResourceCollectionIterator) Response() TagResourceCollection {
12287	return iter.page.Response()
12288}
12289
12290// Value returns the current value or a zero-initialized value if the
12291// iterator has advanced beyond the end of the collection.
12292func (iter TagResourceCollectionIterator) Value() TagResourceContract {
12293	if !iter.page.NotDone() {
12294		return TagResourceContract{}
12295	}
12296	return iter.page.Values()[iter.i]
12297}
12298
12299// Creates a new instance of the TagResourceCollectionIterator type.
12300func NewTagResourceCollectionIterator(page TagResourceCollectionPage) TagResourceCollectionIterator {
12301	return TagResourceCollectionIterator{page: page}
12302}
12303
12304// IsEmpty returns true if the ListResult contains no values.
12305func (trc TagResourceCollection) IsEmpty() bool {
12306	return trc.Value == nil || len(*trc.Value) == 0
12307}
12308
12309// tagResourceCollectionPreparer prepares a request to retrieve the next set of results.
12310// It returns nil if no more results exist.
12311func (trc TagResourceCollection) tagResourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
12312	if trc.NextLink == nil || len(to.String(trc.NextLink)) < 1 {
12313		return nil, nil
12314	}
12315	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12316		autorest.AsJSON(),
12317		autorest.AsGet(),
12318		autorest.WithBaseURL(to.String(trc.NextLink)))
12319}
12320
12321// TagResourceCollectionPage contains a page of TagResourceContract values.
12322type TagResourceCollectionPage struct {
12323	fn  func(context.Context, TagResourceCollection) (TagResourceCollection, error)
12324	trc TagResourceCollection
12325}
12326
12327// NextWithContext advances to the next page of values.  If there was an error making
12328// the request the page does not advance and the error is returned.
12329func (page *TagResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
12330	if tracing.IsEnabled() {
12331		ctx = tracing.StartSpan(ctx, fqdn+"/TagResourceCollectionPage.NextWithContext")
12332		defer func() {
12333			sc := -1
12334			if page.Response().Response.Response != nil {
12335				sc = page.Response().Response.Response.StatusCode
12336			}
12337			tracing.EndSpan(ctx, sc, err)
12338		}()
12339	}
12340	next, err := page.fn(ctx, page.trc)
12341	if err != nil {
12342		return err
12343	}
12344	page.trc = next
12345	return nil
12346}
12347
12348// Next advances to the next page of values.  If there was an error making
12349// the request the page does not advance and the error is returned.
12350// Deprecated: Use NextWithContext() instead.
12351func (page *TagResourceCollectionPage) Next() error {
12352	return page.NextWithContext(context.Background())
12353}
12354
12355// NotDone returns true if the page enumeration should be started or is not yet complete.
12356func (page TagResourceCollectionPage) NotDone() bool {
12357	return !page.trc.IsEmpty()
12358}
12359
12360// Response returns the raw server response from the last page request.
12361func (page TagResourceCollectionPage) Response() TagResourceCollection {
12362	return page.trc
12363}
12364
12365// Values returns the slice of values for the current page or nil if there are no values.
12366func (page TagResourceCollectionPage) Values() []TagResourceContract {
12367	if page.trc.IsEmpty() {
12368		return nil
12369	}
12370	return *page.trc.Value
12371}
12372
12373// Creates a new instance of the TagResourceCollectionPage type.
12374func NewTagResourceCollectionPage(getNextPage func(context.Context, TagResourceCollection) (TagResourceCollection, error)) TagResourceCollectionPage {
12375	return TagResourceCollectionPage{fn: getNextPage}
12376}
12377
12378// TagResourceContract tagResource contract properties.
12379type TagResourceContract struct {
12380	// Tag - Tag associated with the resource.
12381	Tag *TagTagResourceContractProperties `json:"tag,omitempty"`
12382	// API - Api associated with the tag.
12383	API *APITagResourceContractProperties `json:"api,omitempty"`
12384	// Operation - Operation associated with the tag.
12385	Operation *OperationTagResourceContractProperties `json:"operation,omitempty"`
12386	// Product - Product associated with the tag.
12387	Product *ProductTagResourceContractProperties `json:"product,omitempty"`
12388}
12389
12390// TagTagResourceContractProperties contract defining the Tag property in the Tag Resource Contract
12391type TagTagResourceContractProperties struct {
12392	// ID - Tag identifier
12393	ID *string `json:"id,omitempty"`
12394	// Name - Tag Name
12395	Name *string `json:"name,omitempty"`
12396}
12397
12398// TenantConfigurationDeployFuture an abstraction for monitoring and retrieving the results of a
12399// long-running operation.
12400type TenantConfigurationDeployFuture struct {
12401	azure.Future
12402}
12403
12404// Result returns the result of the asynchronous operation.
12405// If the operation has not completed it will return an error.
12406func (future *TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
12407	var done bool
12408	done, err = future.DoneWithContext(context.Background(), client)
12409	if err != nil {
12410		err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", future.Response(), "Polling failure")
12411		return
12412	}
12413	if !done {
12414		err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture")
12415		return
12416	}
12417	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12418	if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
12419		orc, err = client.DeployResponder(orc.Response.Response)
12420		if err != nil {
12421			err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", orc.Response.Response, "Failure responding to request")
12422		}
12423	}
12424	return
12425}
12426
12427// TenantConfigurationSaveFuture an abstraction for monitoring and retrieving the results of a long-running
12428// operation.
12429type TenantConfigurationSaveFuture struct {
12430	azure.Future
12431}
12432
12433// Result returns the result of the asynchronous operation.
12434// If the operation has not completed it will return an error.
12435func (future *TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
12436	var done bool
12437	done, err = future.DoneWithContext(context.Background(), client)
12438	if err != nil {
12439		err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", future.Response(), "Polling failure")
12440		return
12441	}
12442	if !done {
12443		err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture")
12444		return
12445	}
12446	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12447	if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
12448		orc, err = client.SaveResponder(orc.Response.Response)
12449		if err != nil {
12450			err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", orc.Response.Response, "Failure responding to request")
12451		}
12452	}
12453	return
12454}
12455
12456// TenantConfigurationSyncStateContract tenant Configuration Synchronization State.
12457type TenantConfigurationSyncStateContract struct {
12458	autorest.Response `json:"-"`
12459	// Branch - The name of Git branch.
12460	Branch *string `json:"branch,omitempty"`
12461	// CommitID - The latest commit Id.
12462	CommitID *string `json:"commitId,omitempty"`
12463	// IsExport - value indicating if last sync was save (true) or deploy (false) operation.
12464	IsExport *bool `json:"isExport,omitempty"`
12465	// IsSynced - value indicating if last synchronization was later than the configuration change.
12466	IsSynced *bool `json:"isSynced,omitempty"`
12467	// IsGitEnabled - value indicating whether Git configuration access is enabled.
12468	IsGitEnabled *bool `json:"isGitEnabled,omitempty"`
12469	// 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.
12470	SyncDate *date.Time `json:"syncDate,omitempty"`
12471	// 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.
12472	ConfigurationChangeDate *date.Time `json:"configurationChangeDate,omitempty"`
12473}
12474
12475// TenantConfigurationValidateFuture an abstraction for monitoring and retrieving the results of a
12476// long-running operation.
12477type TenantConfigurationValidateFuture struct {
12478	azure.Future
12479}
12480
12481// Result returns the result of the asynchronous operation.
12482// If the operation has not completed it will return an error.
12483func (future *TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
12484	var done bool
12485	done, err = future.DoneWithContext(context.Background(), client)
12486	if err != nil {
12487		err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", future.Response(), "Polling failure")
12488		return
12489	}
12490	if !done {
12491		err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture")
12492		return
12493	}
12494	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12495	if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
12496		orc, err = client.ValidateResponder(orc.Response.Response)
12497		if err != nil {
12498			err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", orc.Response.Response, "Failure responding to request")
12499		}
12500	}
12501	return
12502}
12503
12504// TermsOfServiceProperties terms of service contract properties.
12505type TermsOfServiceProperties struct {
12506	// Text - A terms of service text.
12507	Text *string `json:"text,omitempty"`
12508	// Enabled - Display terms of service during a sign-up process.
12509	Enabled *bool `json:"enabled,omitempty"`
12510	// ConsentRequired - Ask user for consent to the terms of service.
12511	ConsentRequired *bool `json:"consentRequired,omitempty"`
12512}
12513
12514// TokenBodyParameterContract oAuth acquire token request body parameter (www-url-form-encoded).
12515type TokenBodyParameterContract struct {
12516	// Name - body parameter name.
12517	Name *string `json:"name,omitempty"`
12518	// Value - body parameter value.
12519	Value *string `json:"value,omitempty"`
12520}
12521
12522// UserCollection paged Users list representation.
12523type UserCollection struct {
12524	autorest.Response `json:"-"`
12525	// Value - Page values.
12526	Value *[]UserContract `json:"value,omitempty"`
12527	// NextLink - Next page link if any.
12528	NextLink *string `json:"nextLink,omitempty"`
12529}
12530
12531// UserCollectionIterator provides access to a complete listing of UserContract values.
12532type UserCollectionIterator struct {
12533	i    int
12534	page UserCollectionPage
12535}
12536
12537// NextWithContext advances to the next value.  If there was an error making
12538// the request the iterator does not advance and the error is returned.
12539func (iter *UserCollectionIterator) NextWithContext(ctx context.Context) (err error) {
12540	if tracing.IsEnabled() {
12541		ctx = tracing.StartSpan(ctx, fqdn+"/UserCollectionIterator.NextWithContext")
12542		defer func() {
12543			sc := -1
12544			if iter.Response().Response.Response != nil {
12545				sc = iter.Response().Response.Response.StatusCode
12546			}
12547			tracing.EndSpan(ctx, sc, err)
12548		}()
12549	}
12550	iter.i++
12551	if iter.i < len(iter.page.Values()) {
12552		return nil
12553	}
12554	err = iter.page.NextWithContext(ctx)
12555	if err != nil {
12556		iter.i--
12557		return err
12558	}
12559	iter.i = 0
12560	return nil
12561}
12562
12563// Next advances to the next value.  If there was an error making
12564// the request the iterator does not advance and the error is returned.
12565// Deprecated: Use NextWithContext() instead.
12566func (iter *UserCollectionIterator) Next() error {
12567	return iter.NextWithContext(context.Background())
12568}
12569
12570// NotDone returns true if the enumeration should be started or is not yet complete.
12571func (iter UserCollectionIterator) NotDone() bool {
12572	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12573}
12574
12575// Response returns the raw server response from the last page request.
12576func (iter UserCollectionIterator) Response() UserCollection {
12577	return iter.page.Response()
12578}
12579
12580// Value returns the current value or a zero-initialized value if the
12581// iterator has advanced beyond the end of the collection.
12582func (iter UserCollectionIterator) Value() UserContract {
12583	if !iter.page.NotDone() {
12584		return UserContract{}
12585	}
12586	return iter.page.Values()[iter.i]
12587}
12588
12589// Creates a new instance of the UserCollectionIterator type.
12590func NewUserCollectionIterator(page UserCollectionPage) UserCollectionIterator {
12591	return UserCollectionIterator{page: page}
12592}
12593
12594// IsEmpty returns true if the ListResult contains no values.
12595func (uc UserCollection) IsEmpty() bool {
12596	return uc.Value == nil || len(*uc.Value) == 0
12597}
12598
12599// userCollectionPreparer prepares a request to retrieve the next set of results.
12600// It returns nil if no more results exist.
12601func (uc UserCollection) userCollectionPreparer(ctx context.Context) (*http.Request, error) {
12602	if uc.NextLink == nil || len(to.String(uc.NextLink)) < 1 {
12603		return nil, nil
12604	}
12605	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12606		autorest.AsJSON(),
12607		autorest.AsGet(),
12608		autorest.WithBaseURL(to.String(uc.NextLink)))
12609}
12610
12611// UserCollectionPage contains a page of UserContract values.
12612type UserCollectionPage struct {
12613	fn func(context.Context, UserCollection) (UserCollection, error)
12614	uc UserCollection
12615}
12616
12617// NextWithContext advances to the next page of values.  If there was an error making
12618// the request the page does not advance and the error is returned.
12619func (page *UserCollectionPage) NextWithContext(ctx context.Context) (err error) {
12620	if tracing.IsEnabled() {
12621		ctx = tracing.StartSpan(ctx, fqdn+"/UserCollectionPage.NextWithContext")
12622		defer func() {
12623			sc := -1
12624			if page.Response().Response.Response != nil {
12625				sc = page.Response().Response.Response.StatusCode
12626			}
12627			tracing.EndSpan(ctx, sc, err)
12628		}()
12629	}
12630	next, err := page.fn(ctx, page.uc)
12631	if err != nil {
12632		return err
12633	}
12634	page.uc = next
12635	return nil
12636}
12637
12638// Next advances to the next page of values.  If there was an error making
12639// the request the page does not advance and the error is returned.
12640// Deprecated: Use NextWithContext() instead.
12641func (page *UserCollectionPage) Next() error {
12642	return page.NextWithContext(context.Background())
12643}
12644
12645// NotDone returns true if the page enumeration should be started or is not yet complete.
12646func (page UserCollectionPage) NotDone() bool {
12647	return !page.uc.IsEmpty()
12648}
12649
12650// Response returns the raw server response from the last page request.
12651func (page UserCollectionPage) Response() UserCollection {
12652	return page.uc
12653}
12654
12655// Values returns the slice of values for the current page or nil if there are no values.
12656func (page UserCollectionPage) Values() []UserContract {
12657	if page.uc.IsEmpty() {
12658		return nil
12659	}
12660	return *page.uc.Value
12661}
12662
12663// Creates a new instance of the UserCollectionPage type.
12664func NewUserCollectionPage(getNextPage func(context.Context, UserCollection) (UserCollection, error)) UserCollectionPage {
12665	return UserCollectionPage{fn: getNextPage}
12666}
12667
12668// UserContract user details.
12669type UserContract struct {
12670	autorest.Response `json:"-"`
12671	// UserContractProperties - User entity contract properties.
12672	*UserContractProperties `json:"properties,omitempty"`
12673	// ID - READ-ONLY; Resource ID.
12674	ID *string `json:"id,omitempty"`
12675	// Name - READ-ONLY; Resource name.
12676	Name *string `json:"name,omitempty"`
12677	// Type - READ-ONLY; Resource type for API Management resource.
12678	Type *string `json:"type,omitempty"`
12679}
12680
12681// MarshalJSON is the custom marshaler for UserContract.
12682func (uc UserContract) MarshalJSON() ([]byte, error) {
12683	objectMap := make(map[string]interface{})
12684	if uc.UserContractProperties != nil {
12685		objectMap["properties"] = uc.UserContractProperties
12686	}
12687	return json.Marshal(objectMap)
12688}
12689
12690// UnmarshalJSON is the custom unmarshaler for UserContract struct.
12691func (uc *UserContract) UnmarshalJSON(body []byte) error {
12692	var m map[string]*json.RawMessage
12693	err := json.Unmarshal(body, &m)
12694	if err != nil {
12695		return err
12696	}
12697	for k, v := range m {
12698		switch k {
12699		case "properties":
12700			if v != nil {
12701				var userContractProperties UserContractProperties
12702				err = json.Unmarshal(*v, &userContractProperties)
12703				if err != nil {
12704					return err
12705				}
12706				uc.UserContractProperties = &userContractProperties
12707			}
12708		case "id":
12709			if v != nil {
12710				var ID string
12711				err = json.Unmarshal(*v, &ID)
12712				if err != nil {
12713					return err
12714				}
12715				uc.ID = &ID
12716			}
12717		case "name":
12718			if v != nil {
12719				var name string
12720				err = json.Unmarshal(*v, &name)
12721				if err != nil {
12722					return err
12723				}
12724				uc.Name = &name
12725			}
12726		case "type":
12727			if v != nil {
12728				var typeVar string
12729				err = json.Unmarshal(*v, &typeVar)
12730				if err != nil {
12731					return err
12732				}
12733				uc.Type = &typeVar
12734			}
12735		}
12736	}
12737
12738	return nil
12739}
12740
12741// UserContractProperties user profile.
12742type UserContractProperties struct {
12743	// FirstName - First name.
12744	FirstName *string `json:"firstName,omitempty"`
12745	// LastName - Last name.
12746	LastName *string `json:"lastName,omitempty"`
12747	// Email - Email address.
12748	Email *string `json:"email,omitempty"`
12749	// RegistrationDate - Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
12750	RegistrationDate *date.Time `json:"registrationDate,omitempty"`
12751	// Groups - READ-ONLY; Collection of groups user is part of.
12752	Groups *[]GroupContractProperties `json:"groups,omitempty"`
12753	// 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', 'UserStatePending', 'UserStateDeleted'
12754	State UserState `json:"state,omitempty"`
12755	// Note - Optional note about a user set by the administrator.
12756	Note *string `json:"note,omitempty"`
12757	// Identities - Collection of user identities.
12758	Identities *[]UserIdentityContract `json:"identities,omitempty"`
12759}
12760
12761// UserCreateParameterProperties parameters supplied to the Create User operation.
12762type UserCreateParameterProperties struct {
12763	// Email - Email address. Must not be empty and must be unique within the service instance.
12764	Email *string `json:"email,omitempty"`
12765	// FirstName - First name.
12766	FirstName *string `json:"firstName,omitempty"`
12767	// LastName - Last name.
12768	LastName *string `json:"lastName,omitempty"`
12769	// Password - User Password. If no value is provided, a default password is generated.
12770	Password *string `json:"password,omitempty"`
12771	// AppType - Determines the type of application which send the create user request. Default is old publisher portal. Possible values include: 'DeveloperPortal'
12772	AppType AppType `json:"appType,omitempty"`
12773	// Confirmation - Determines the type of confirmation e-mail that will be sent to the newly created user. Possible values include: 'Signup', 'Invite'
12774	Confirmation Confirmation `json:"confirmation,omitempty"`
12775	// 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', 'UserStatePending', 'UserStateDeleted'
12776	State UserState `json:"state,omitempty"`
12777	// Note - Optional note about a user set by the administrator.
12778	Note *string `json:"note,omitempty"`
12779	// Identities - Collection of user identities.
12780	Identities *[]UserIdentityContract `json:"identities,omitempty"`
12781}
12782
12783// UserCreateParameters user create details.
12784type UserCreateParameters struct {
12785	// UserCreateParameterProperties - User entity create contract properties.
12786	*UserCreateParameterProperties `json:"properties,omitempty"`
12787}
12788
12789// MarshalJSON is the custom marshaler for UserCreateParameters.
12790func (ucp UserCreateParameters) MarshalJSON() ([]byte, error) {
12791	objectMap := make(map[string]interface{})
12792	if ucp.UserCreateParameterProperties != nil {
12793		objectMap["properties"] = ucp.UserCreateParameterProperties
12794	}
12795	return json.Marshal(objectMap)
12796}
12797
12798// UnmarshalJSON is the custom unmarshaler for UserCreateParameters struct.
12799func (ucp *UserCreateParameters) UnmarshalJSON(body []byte) error {
12800	var m map[string]*json.RawMessage
12801	err := json.Unmarshal(body, &m)
12802	if err != nil {
12803		return err
12804	}
12805	for k, v := range m {
12806		switch k {
12807		case "properties":
12808			if v != nil {
12809				var userCreateParameterProperties UserCreateParameterProperties
12810				err = json.Unmarshal(*v, &userCreateParameterProperties)
12811				if err != nil {
12812					return err
12813				}
12814				ucp.UserCreateParameterProperties = &userCreateParameterProperties
12815			}
12816		}
12817	}
12818
12819	return nil
12820}
12821
12822// UserEntityBaseParameters user Entity Base Parameters set.
12823type UserEntityBaseParameters struct {
12824	// 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', 'UserStatePending', 'UserStateDeleted'
12825	State UserState `json:"state,omitempty"`
12826	// Note - Optional note about a user set by the administrator.
12827	Note *string `json:"note,omitempty"`
12828	// Identities - Collection of user identities.
12829	Identities *[]UserIdentityContract `json:"identities,omitempty"`
12830}
12831
12832// UserIdentityCollection list of Users Identity list representation.
12833type UserIdentityCollection struct {
12834	autorest.Response `json:"-"`
12835	// Value - User Identity values.
12836	Value *[]UserIdentityContract `json:"value,omitempty"`
12837	// Count - Total record count number across all pages.
12838	Count *int64 `json:"count,omitempty"`
12839	// NextLink - Next page link if any.
12840	NextLink *string `json:"nextLink,omitempty"`
12841}
12842
12843// UserIdentityCollectionIterator provides access to a complete listing of UserIdentityContract values.
12844type UserIdentityCollectionIterator struct {
12845	i    int
12846	page UserIdentityCollectionPage
12847}
12848
12849// NextWithContext advances to the next value.  If there was an error making
12850// the request the iterator does not advance and the error is returned.
12851func (iter *UserIdentityCollectionIterator) NextWithContext(ctx context.Context) (err error) {
12852	if tracing.IsEnabled() {
12853		ctx = tracing.StartSpan(ctx, fqdn+"/UserIdentityCollectionIterator.NextWithContext")
12854		defer func() {
12855			sc := -1
12856			if iter.Response().Response.Response != nil {
12857				sc = iter.Response().Response.Response.StatusCode
12858			}
12859			tracing.EndSpan(ctx, sc, err)
12860		}()
12861	}
12862	iter.i++
12863	if iter.i < len(iter.page.Values()) {
12864		return nil
12865	}
12866	err = iter.page.NextWithContext(ctx)
12867	if err != nil {
12868		iter.i--
12869		return err
12870	}
12871	iter.i = 0
12872	return nil
12873}
12874
12875// Next advances to the next value.  If there was an error making
12876// the request the iterator does not advance and the error is returned.
12877// Deprecated: Use NextWithContext() instead.
12878func (iter *UserIdentityCollectionIterator) Next() error {
12879	return iter.NextWithContext(context.Background())
12880}
12881
12882// NotDone returns true if the enumeration should be started or is not yet complete.
12883func (iter UserIdentityCollectionIterator) NotDone() bool {
12884	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12885}
12886
12887// Response returns the raw server response from the last page request.
12888func (iter UserIdentityCollectionIterator) Response() UserIdentityCollection {
12889	return iter.page.Response()
12890}
12891
12892// Value returns the current value or a zero-initialized value if the
12893// iterator has advanced beyond the end of the collection.
12894func (iter UserIdentityCollectionIterator) Value() UserIdentityContract {
12895	if !iter.page.NotDone() {
12896		return UserIdentityContract{}
12897	}
12898	return iter.page.Values()[iter.i]
12899}
12900
12901// Creates a new instance of the UserIdentityCollectionIterator type.
12902func NewUserIdentityCollectionIterator(page UserIdentityCollectionPage) UserIdentityCollectionIterator {
12903	return UserIdentityCollectionIterator{page: page}
12904}
12905
12906// IsEmpty returns true if the ListResult contains no values.
12907func (uic UserIdentityCollection) IsEmpty() bool {
12908	return uic.Value == nil || len(*uic.Value) == 0
12909}
12910
12911// userIdentityCollectionPreparer prepares a request to retrieve the next set of results.
12912// It returns nil if no more results exist.
12913func (uic UserIdentityCollection) userIdentityCollectionPreparer(ctx context.Context) (*http.Request, error) {
12914	if uic.NextLink == nil || len(to.String(uic.NextLink)) < 1 {
12915		return nil, nil
12916	}
12917	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12918		autorest.AsJSON(),
12919		autorest.AsGet(),
12920		autorest.WithBaseURL(to.String(uic.NextLink)))
12921}
12922
12923// UserIdentityCollectionPage contains a page of UserIdentityContract values.
12924type UserIdentityCollectionPage struct {
12925	fn  func(context.Context, UserIdentityCollection) (UserIdentityCollection, error)
12926	uic UserIdentityCollection
12927}
12928
12929// NextWithContext advances to the next page of values.  If there was an error making
12930// the request the page does not advance and the error is returned.
12931func (page *UserIdentityCollectionPage) NextWithContext(ctx context.Context) (err error) {
12932	if tracing.IsEnabled() {
12933		ctx = tracing.StartSpan(ctx, fqdn+"/UserIdentityCollectionPage.NextWithContext")
12934		defer func() {
12935			sc := -1
12936			if page.Response().Response.Response != nil {
12937				sc = page.Response().Response.Response.StatusCode
12938			}
12939			tracing.EndSpan(ctx, sc, err)
12940		}()
12941	}
12942	next, err := page.fn(ctx, page.uic)
12943	if err != nil {
12944		return err
12945	}
12946	page.uic = next
12947	return nil
12948}
12949
12950// Next advances to the next page of values.  If there was an error making
12951// the request the page does not advance and the error is returned.
12952// Deprecated: Use NextWithContext() instead.
12953func (page *UserIdentityCollectionPage) Next() error {
12954	return page.NextWithContext(context.Background())
12955}
12956
12957// NotDone returns true if the page enumeration should be started or is not yet complete.
12958func (page UserIdentityCollectionPage) NotDone() bool {
12959	return !page.uic.IsEmpty()
12960}
12961
12962// Response returns the raw server response from the last page request.
12963func (page UserIdentityCollectionPage) Response() UserIdentityCollection {
12964	return page.uic
12965}
12966
12967// Values returns the slice of values for the current page or nil if there are no values.
12968func (page UserIdentityCollectionPage) Values() []UserIdentityContract {
12969	if page.uic.IsEmpty() {
12970		return nil
12971	}
12972	return *page.uic.Value
12973}
12974
12975// Creates a new instance of the UserIdentityCollectionPage type.
12976func NewUserIdentityCollectionPage(getNextPage func(context.Context, UserIdentityCollection) (UserIdentityCollection, error)) UserIdentityCollectionPage {
12977	return UserIdentityCollectionPage{fn: getNextPage}
12978}
12979
12980// UserIdentityContract user identity details.
12981type UserIdentityContract struct {
12982	// Provider - Identity provider name.
12983	Provider *string `json:"provider,omitempty"`
12984	// ID - Identifier value within provider.
12985	ID *string `json:"id,omitempty"`
12986}
12987
12988// UserIdentityProperties ...
12989type UserIdentityProperties struct {
12990	// PrincipalID - The principal id of user assigned identity.
12991	PrincipalID *string `json:"principalId,omitempty"`
12992	// ClientID - The client id of user assigned identity.
12993	ClientID *string `json:"clientId,omitempty"`
12994}
12995
12996// UserTokenParameterProperties parameters supplied to the Get User Token operation.
12997type UserTokenParameterProperties struct {
12998	// KeyType - The Key to be used to generate token for user. Possible values include: 'Primary', 'Secondary'
12999	KeyType KeyType `json:"keyType,omitempty"`
13000	// 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.
13001	Expiry *date.Time `json:"expiry,omitempty"`
13002}
13003
13004// UserTokenParameters get User Token parameters.
13005type UserTokenParameters struct {
13006	// UserTokenParameterProperties - User Token Parameter contract properties.
13007	*UserTokenParameterProperties `json:"properties,omitempty"`
13008}
13009
13010// MarshalJSON is the custom marshaler for UserTokenParameters.
13011func (utp UserTokenParameters) MarshalJSON() ([]byte, error) {
13012	objectMap := make(map[string]interface{})
13013	if utp.UserTokenParameterProperties != nil {
13014		objectMap["properties"] = utp.UserTokenParameterProperties
13015	}
13016	return json.Marshal(objectMap)
13017}
13018
13019// UnmarshalJSON is the custom unmarshaler for UserTokenParameters struct.
13020func (utp *UserTokenParameters) UnmarshalJSON(body []byte) error {
13021	var m map[string]*json.RawMessage
13022	err := json.Unmarshal(body, &m)
13023	if err != nil {
13024		return err
13025	}
13026	for k, v := range m {
13027		switch k {
13028		case "properties":
13029			if v != nil {
13030				var userTokenParameterProperties UserTokenParameterProperties
13031				err = json.Unmarshal(*v, &userTokenParameterProperties)
13032				if err != nil {
13033					return err
13034				}
13035				utp.UserTokenParameterProperties = &userTokenParameterProperties
13036			}
13037		}
13038	}
13039
13040	return nil
13041}
13042
13043// UserTokenResult get User Token response details.
13044type UserTokenResult struct {
13045	autorest.Response `json:"-"`
13046	// Value - Shared Access Authorization token for the User.
13047	Value *string `json:"value,omitempty"`
13048}
13049
13050// UserUpdateParameters user update parameters.
13051type UserUpdateParameters struct {
13052	// UserUpdateParametersProperties - User entity update contract properties.
13053	*UserUpdateParametersProperties `json:"properties,omitempty"`
13054}
13055
13056// MarshalJSON is the custom marshaler for UserUpdateParameters.
13057func (uup UserUpdateParameters) MarshalJSON() ([]byte, error) {
13058	objectMap := make(map[string]interface{})
13059	if uup.UserUpdateParametersProperties != nil {
13060		objectMap["properties"] = uup.UserUpdateParametersProperties
13061	}
13062	return json.Marshal(objectMap)
13063}
13064
13065// UnmarshalJSON is the custom unmarshaler for UserUpdateParameters struct.
13066func (uup *UserUpdateParameters) UnmarshalJSON(body []byte) error {
13067	var m map[string]*json.RawMessage
13068	err := json.Unmarshal(body, &m)
13069	if err != nil {
13070		return err
13071	}
13072	for k, v := range m {
13073		switch k {
13074		case "properties":
13075			if v != nil {
13076				var userUpdateParametersProperties UserUpdateParametersProperties
13077				err = json.Unmarshal(*v, &userUpdateParametersProperties)
13078				if err != nil {
13079					return err
13080				}
13081				uup.UserUpdateParametersProperties = &userUpdateParametersProperties
13082			}
13083		}
13084	}
13085
13086	return nil
13087}
13088
13089// UserUpdateParametersProperties parameters supplied to the Update User operation.
13090type UserUpdateParametersProperties struct {
13091	// Email - Email address. Must not be empty and must be unique within the service instance.
13092	Email *string `json:"email,omitempty"`
13093	// Password - User Password.
13094	Password *string `json:"password,omitempty"`
13095	// FirstName - First name.
13096	FirstName *string `json:"firstName,omitempty"`
13097	// LastName - Last name.
13098	LastName *string `json:"lastName,omitempty"`
13099	// 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', 'UserStatePending', 'UserStateDeleted'
13100	State UserState `json:"state,omitempty"`
13101	// Note - Optional note about a user set by the administrator.
13102	Note *string `json:"note,omitempty"`
13103	// Identities - Collection of user identities.
13104	Identities *[]UserIdentityContract `json:"identities,omitempty"`
13105}
13106
13107// VirtualNetworkConfiguration configuration of a virtual network to which API Management service is
13108// deployed.
13109type VirtualNetworkConfiguration struct {
13110	// Vnetid - READ-ONLY; The virtual network ID. This is typically a GUID. Expect a null GUID by default.
13111	Vnetid *string `json:"vnetid,omitempty"`
13112	// Subnetname - READ-ONLY; The name of the subnet.
13113	Subnetname *string `json:"subnetname,omitempty"`
13114	// SubnetResourceID - The full resource ID of a subnet in a virtual network to deploy the API Management service in.
13115	SubnetResourceID *string `json:"subnetResourceId,omitempty"`
13116}
13117
13118// X509CertificateName properties of server X509Names.
13119type X509CertificateName struct {
13120	// Name - Common Name of the Certificate.
13121	Name *string `json:"name,omitempty"`
13122	// IssuerCertificateThumbprint - Thumbprint for the Issuer of the Certificate.
13123	IssuerCertificateThumbprint *string `json:"issuerCertificateThumbprint,omitempty"`
13124}
13125