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-01-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// APIType enumerates the values for api type.
49type APIType string
50
51const (
52	// HTTP ...
53	HTTP APIType = "http"
54	// Soap ...
55	Soap APIType = "soap"
56)
57
58// PossibleAPITypeValues returns an array of possible values for the APIType const type.
59func PossibleAPITypeValues() []APIType {
60	return []APIType{HTTP, Soap}
61}
62
63// AsyncOperationStatus enumerates the values for async operation status.
64type AsyncOperationStatus string
65
66const (
67	// Failed ...
68	Failed AsyncOperationStatus = "Failed"
69	// InProgress ...
70	InProgress AsyncOperationStatus = "InProgress"
71	// Started ...
72	Started AsyncOperationStatus = "Started"
73	// Succeeded ...
74	Succeeded AsyncOperationStatus = "Succeeded"
75)
76
77// PossibleAsyncOperationStatusValues returns an array of possible values for the AsyncOperationStatus const type.
78func PossibleAsyncOperationStatusValues() []AsyncOperationStatus {
79	return []AsyncOperationStatus{Failed, InProgress, Started, Succeeded}
80}
81
82// AuthorizationMethod enumerates the values for authorization method.
83type AuthorizationMethod string
84
85const (
86	// DELETE ...
87	DELETE AuthorizationMethod = "DELETE"
88	// GET ...
89	GET AuthorizationMethod = "GET"
90	// HEAD ...
91	HEAD AuthorizationMethod = "HEAD"
92	// OPTIONS ...
93	OPTIONS AuthorizationMethod = "OPTIONS"
94	// PATCH ...
95	PATCH AuthorizationMethod = "PATCH"
96	// POST ...
97	POST AuthorizationMethod = "POST"
98	// PUT ...
99	PUT AuthorizationMethod = "PUT"
100	// TRACE ...
101	TRACE AuthorizationMethod = "TRACE"
102)
103
104// PossibleAuthorizationMethodValues returns an array of possible values for the AuthorizationMethod const type.
105func PossibleAuthorizationMethodValues() []AuthorizationMethod {
106	return []AuthorizationMethod{DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, TRACE}
107}
108
109// BackendProtocol enumerates the values for backend protocol.
110type BackendProtocol string
111
112const (
113	// BackendProtocolHTTP The Backend is a RESTful service.
114	BackendProtocolHTTP BackendProtocol = "http"
115	// BackendProtocolSoap The Backend is a SOAP service.
116	BackendProtocolSoap BackendProtocol = "soap"
117)
118
119// PossibleBackendProtocolValues returns an array of possible values for the BackendProtocol const type.
120func PossibleBackendProtocolValues() []BackendProtocol {
121	return []BackendProtocol{BackendProtocolHTTP, BackendProtocolSoap}
122}
123
124// BearerTokenSendingMethod enumerates the values for bearer token sending method.
125type BearerTokenSendingMethod string
126
127const (
128	// AuthorizationHeader ...
129	AuthorizationHeader BearerTokenSendingMethod = "authorizationHeader"
130	// Query ...
131	Query BearerTokenSendingMethod = "query"
132)
133
134// PossibleBearerTokenSendingMethodValues returns an array of possible values for the BearerTokenSendingMethod const type.
135func PossibleBearerTokenSendingMethodValues() []BearerTokenSendingMethod {
136	return []BearerTokenSendingMethod{AuthorizationHeader, Query}
137}
138
139// BearerTokenSendingMethods enumerates the values for bearer token sending methods.
140type BearerTokenSendingMethods string
141
142const (
143	// BearerTokenSendingMethodsAuthorizationHeader Access token will be transmitted in the Authorization
144	// header using Bearer schema
145	BearerTokenSendingMethodsAuthorizationHeader BearerTokenSendingMethods = "authorizationHeader"
146	// BearerTokenSendingMethodsQuery Access token will be transmitted as query parameters.
147	BearerTokenSendingMethodsQuery BearerTokenSendingMethods = "query"
148)
149
150// PossibleBearerTokenSendingMethodsValues returns an array of possible values for the BearerTokenSendingMethods const type.
151func PossibleBearerTokenSendingMethodsValues() []BearerTokenSendingMethods {
152	return []BearerTokenSendingMethods{BearerTokenSendingMethodsAuthorizationHeader, BearerTokenSendingMethodsQuery}
153}
154
155// ClientAuthenticationMethod enumerates the values for client authentication method.
156type ClientAuthenticationMethod string
157
158const (
159	// Basic Basic Client Authentication method.
160	Basic ClientAuthenticationMethod = "Basic"
161	// Body Body based Authentication method.
162	Body ClientAuthenticationMethod = "Body"
163)
164
165// PossibleClientAuthenticationMethodValues returns an array of possible values for the ClientAuthenticationMethod const type.
166func PossibleClientAuthenticationMethodValues() []ClientAuthenticationMethod {
167	return []ClientAuthenticationMethod{Basic, Body}
168}
169
170// Confirmation enumerates the values for confirmation.
171type Confirmation string
172
173const (
174	// Invite Send an e-mail inviting the user to sign-up and complete registration.
175	Invite Confirmation = "invite"
176	// Signup Send an e-mail to the user confirming they have successfully signed up.
177	Signup Confirmation = "signup"
178)
179
180// PossibleConfirmationValues returns an array of possible values for the Confirmation const type.
181func PossibleConfirmationValues() []Confirmation {
182	return []Confirmation{Invite, Signup}
183}
184
185// ConnectivityStatusType enumerates the values for connectivity status type.
186type ConnectivityStatusType string
187
188const (
189	// Failure ...
190	Failure ConnectivityStatusType = "failure"
191	// Initializing ...
192	Initializing ConnectivityStatusType = "initializing"
193	// Success ...
194	Success ConnectivityStatusType = "success"
195)
196
197// PossibleConnectivityStatusTypeValues returns an array of possible values for the ConnectivityStatusType const type.
198func PossibleConnectivityStatusTypeValues() []ConnectivityStatusType {
199	return []ConnectivityStatusType{Failure, Initializing, Success}
200}
201
202// ContentFormat enumerates the values for content format.
203type ContentFormat string
204
205const (
206	// Openapi The contents are inline and Content Type is a OpenApi 3.0 Document in YAML format.
207	Openapi ContentFormat = "openapi"
208	// Openapijson The contents are inline and Content Type is a OpenApi 3.0 Document in JSON format.
209	Openapijson ContentFormat = "openapi+json"
210	// OpenapiLink The Open Api 3.0 document is hosted on a publicly accessible internet address.
211	OpenapiLink ContentFormat = "openapi-link"
212	// SwaggerJSON The contents are inline and Content Type is a OpenApi 2.0 Document.
213	SwaggerJSON ContentFormat = "swagger-json"
214	// SwaggerLinkJSON The Open Api 2.0 document is hosted on a publicly accessible internet address.
215	SwaggerLinkJSON ContentFormat = "swagger-link-json"
216	// WadlLinkJSON The WADL document is hosted on a publicly accessible internet address.
217	WadlLinkJSON ContentFormat = "wadl-link-json"
218	// WadlXML The contents are inline and Content type is a WADL document.
219	WadlXML ContentFormat = "wadl-xml"
220	// Wsdl The contents are inline and the document is a WSDL/Soap document.
221	Wsdl ContentFormat = "wsdl"
222	// WsdlLink The WSDL document is hosted on a publicly accessible internet address.
223	WsdlLink ContentFormat = "wsdl-link"
224)
225
226// PossibleContentFormatValues returns an array of possible values for the ContentFormat const type.
227func PossibleContentFormatValues() []ContentFormat {
228	return []ContentFormat{Openapi, Openapijson, OpenapiLink, SwaggerJSON, SwaggerLinkJSON, WadlLinkJSON, WadlXML, Wsdl, WsdlLink}
229}
230
231// ExportFormat enumerates the values for export format.
232type ExportFormat string
233
234const (
235	// ExportFormatOpenapi Export the Api Definition in OpenApi Specification 3.0 to Storage Blob.
236	ExportFormatOpenapi ExportFormat = "openapi-link"
237	// ExportFormatSwagger Export the Api Definition in OpenApi Specification 2.0 format to the Storage Blob.
238	ExportFormatSwagger ExportFormat = "swagger-link"
239	// ExportFormatWadl Export the Api Definition in WADL Schema to Storage Blob.
240	ExportFormatWadl ExportFormat = "wadl-link"
241	// ExportFormatWsdl Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for
242	// APIs of Type `soap`
243	ExportFormatWsdl ExportFormat = "wsdl-link"
244)
245
246// PossibleExportFormatValues returns an array of possible values for the ExportFormat const type.
247func PossibleExportFormatValues() []ExportFormat {
248	return []ExportFormat{ExportFormatOpenapi, ExportFormatSwagger, ExportFormatWadl, ExportFormatWsdl}
249}
250
251// ExportResultFormat enumerates the values for export result format.
252type ExportResultFormat string
253
254const (
255	// ExportResultFormatOpenAPI Export the Api Definition in OpenApi Specification 3.0 to Storage Blob.
256	ExportResultFormatOpenAPI ExportResultFormat = "openapi-link"
257	// ExportResultFormatSwagger The Api Definition is exported in OpenApi Specification 2.0 format to the
258	// Storage Blob.
259	ExportResultFormatSwagger ExportResultFormat = "swagger-link-json"
260	// ExportResultFormatWadl Export the Api Definition in WADL Schema to Storage Blob.
261	ExportResultFormatWadl ExportResultFormat = "wadl-link-json"
262	// ExportResultFormatWsdl The Api Definition is exported in WSDL Schema to Storage Blob. This is only
263	// supported for APIs of Type `soap`
264	ExportResultFormatWsdl ExportResultFormat = "wsdl-link+xml"
265)
266
267// PossibleExportResultFormatValues returns an array of possible values for the ExportResultFormat const type.
268func PossibleExportResultFormatValues() []ExportResultFormat {
269	return []ExportResultFormat{ExportResultFormatOpenAPI, ExportResultFormatSwagger, ExportResultFormatWadl, ExportResultFormatWsdl}
270}
271
272// GrantType enumerates the values for grant type.
273type GrantType string
274
275const (
276	// AuthorizationCode Authorization Code Grant flow as described
277	// https://tools.ietf.org/html/rfc6749#section-4.1.
278	AuthorizationCode GrantType = "authorizationCode"
279	// ClientCredentials Client Credentials Grant flow as described
280	// https://tools.ietf.org/html/rfc6749#section-4.4.
281	ClientCredentials GrantType = "clientCredentials"
282	// Implicit Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2.
283	Implicit GrantType = "implicit"
284	// ResourceOwnerPassword Resource Owner Password Grant flow as described
285	// https://tools.ietf.org/html/rfc6749#section-4.3.
286	ResourceOwnerPassword GrantType = "resourceOwnerPassword"
287)
288
289// PossibleGrantTypeValues returns an array of possible values for the GrantType const type.
290func PossibleGrantTypeValues() []GrantType {
291	return []GrantType{AuthorizationCode, ClientCredentials, Implicit, ResourceOwnerPassword}
292}
293
294// GroupType enumerates the values for group type.
295type GroupType string
296
297const (
298	// Custom ...
299	Custom GroupType = "custom"
300	// External ...
301	External GroupType = "external"
302	// System ...
303	System GroupType = "system"
304)
305
306// PossibleGroupTypeValues returns an array of possible values for the GroupType const type.
307func PossibleGroupTypeValues() []GroupType {
308	return []GroupType{Custom, External, System}
309}
310
311// HostnameType enumerates the values for hostname type.
312type HostnameType string
313
314const (
315	// DeveloperPortal ...
316	DeveloperPortal HostnameType = "DeveloperPortal"
317	// Management ...
318	Management HostnameType = "Management"
319	// Portal ...
320	Portal HostnameType = "Portal"
321	// Proxy ...
322	Proxy HostnameType = "Proxy"
323	// Scm ...
324	Scm HostnameType = "Scm"
325)
326
327// PossibleHostnameTypeValues returns an array of possible values for the HostnameType const type.
328func PossibleHostnameTypeValues() []HostnameType {
329	return []HostnameType{DeveloperPortal, Management, Portal, Proxy, Scm}
330}
331
332// IdentityProviderType enumerates the values for identity provider type.
333type IdentityProviderType string
334
335const (
336	// Aad Azure Active Directory as Identity provider.
337	Aad IdentityProviderType = "aad"
338	// AadB2C Azure Active Directory B2C as Identity provider.
339	AadB2C IdentityProviderType = "aadB2C"
340	// Facebook Facebook as Identity provider.
341	Facebook IdentityProviderType = "facebook"
342	// Google Google as Identity provider.
343	Google IdentityProviderType = "google"
344	// Microsoft Microsoft Live as Identity provider.
345	Microsoft IdentityProviderType = "microsoft"
346	// Twitter Twitter as Identity provider.
347	Twitter IdentityProviderType = "twitter"
348)
349
350// PossibleIdentityProviderTypeValues returns an array of possible values for the IdentityProviderType const type.
351func PossibleIdentityProviderTypeValues() []IdentityProviderType {
352	return []IdentityProviderType{Aad, AadB2C, Facebook, Google, Microsoft, Twitter}
353}
354
355// KeyType enumerates the values for key type.
356type KeyType string
357
358const (
359	// Primary ...
360	Primary KeyType = "primary"
361	// Secondary ...
362	Secondary KeyType = "secondary"
363)
364
365// PossibleKeyTypeValues returns an array of possible values for the KeyType const type.
366func PossibleKeyTypeValues() []KeyType {
367	return []KeyType{Primary, Secondary}
368}
369
370// LoggerType enumerates the values for logger type.
371type LoggerType string
372
373const (
374	// ApplicationInsights Azure Application Insights as log destination.
375	ApplicationInsights LoggerType = "applicationInsights"
376	// AzureEventHub Azure Event Hub as log destination.
377	AzureEventHub LoggerType = "azureEventHub"
378)
379
380// PossibleLoggerTypeValues returns an array of possible values for the LoggerType const type.
381func PossibleLoggerTypeValues() []LoggerType {
382	return []LoggerType{ApplicationInsights, AzureEventHub}
383}
384
385// NameAvailabilityReason enumerates the values for name availability reason.
386type NameAvailabilityReason string
387
388const (
389	// AlreadyExists ...
390	AlreadyExists NameAvailabilityReason = "AlreadyExists"
391	// Invalid ...
392	Invalid NameAvailabilityReason = "Invalid"
393	// Valid ...
394	Valid NameAvailabilityReason = "Valid"
395)
396
397// PossibleNameAvailabilityReasonValues returns an array of possible values for the NameAvailabilityReason const type.
398func PossibleNameAvailabilityReasonValues() []NameAvailabilityReason {
399	return []NameAvailabilityReason{AlreadyExists, Invalid, Valid}
400}
401
402// NotificationName enumerates the values for notification name.
403type NotificationName string
404
405const (
406	// AccountClosedPublisher The following email recipients and users will receive email notifications when
407	// developer closes his account.
408	AccountClosedPublisher NotificationName = "AccountClosedPublisher"
409	// BCC The following recipients will receive blind carbon copies of all emails sent to developers.
410	BCC NotificationName = "BCC"
411	// NewApplicationNotificationMessage The following email recipients and users will receive email
412	// notifications when new applications are submitted to the application gallery.
413	NewApplicationNotificationMessage NotificationName = "NewApplicationNotificationMessage"
414	// NewIssuePublisherNotificationMessage The following email recipients and users will receive email
415	// notifications when a new issue or comment is submitted on the developer portal.
416	NewIssuePublisherNotificationMessage NotificationName = "NewIssuePublisherNotificationMessage"
417	// PurchasePublisherNotificationMessage The following email recipients and users will receive email
418	// notifications about new API product subscriptions.
419	PurchasePublisherNotificationMessage NotificationName = "PurchasePublisherNotificationMessage"
420	// QuotaLimitApproachingPublisherNotificationMessage The following email recipients and users will receive
421	// email notifications when subscription usage gets close to usage quota.
422	QuotaLimitApproachingPublisherNotificationMessage NotificationName = "QuotaLimitApproachingPublisherNotificationMessage"
423	// RequestPublisherNotificationMessage The following email recipients and users will receive email
424	// notifications about subscription requests for API products requiring approval.
425	RequestPublisherNotificationMessage NotificationName = "RequestPublisherNotificationMessage"
426)
427
428// PossibleNotificationNameValues returns an array of possible values for the NotificationName const type.
429func PossibleNotificationNameValues() []NotificationName {
430	return []NotificationName{AccountClosedPublisher, BCC, NewApplicationNotificationMessage, NewIssuePublisherNotificationMessage, PurchasePublisherNotificationMessage, QuotaLimitApproachingPublisherNotificationMessage, RequestPublisherNotificationMessage}
431}
432
433// PolicyContentFormat enumerates the values for policy content format.
434type PolicyContentFormat string
435
436const (
437	// Rawxml The contents are inline and Content type is a non XML encoded policy document.
438	Rawxml PolicyContentFormat = "rawxml"
439	// RawxmlLink The policy document is not Xml encoded and is hosted on a http endpoint accessible from the
440	// API Management service.
441	RawxmlLink PolicyContentFormat = "rawxml-link"
442	// XML The contents are inline and Content type is an XML document.
443	XML PolicyContentFormat = "xml"
444	// XMLLink The policy XML document is hosted on a http endpoint accessible from the API Management service.
445	XMLLink PolicyContentFormat = "xml-link"
446)
447
448// PossiblePolicyContentFormatValues returns an array of possible values for the PolicyContentFormat const type.
449func PossiblePolicyContentFormatValues() []PolicyContentFormat {
450	return []PolicyContentFormat{Rawxml, RawxmlLink, XML, XMLLink}
451}
452
453// PolicyExportFormat enumerates the values for policy export format.
454type PolicyExportFormat string
455
456const (
457	// PolicyExportFormatRawxml The contents are inline and Content type is a non XML encoded policy document.
458	PolicyExportFormatRawxml PolicyExportFormat = "rawxml"
459	// PolicyExportFormatXML The contents are inline and Content type is an XML document.
460	PolicyExportFormatXML PolicyExportFormat = "xml"
461)
462
463// PossiblePolicyExportFormatValues returns an array of possible values for the PolicyExportFormat const type.
464func PossiblePolicyExportFormatValues() []PolicyExportFormat {
465	return []PolicyExportFormat{PolicyExportFormatRawxml, PolicyExportFormatXML}
466}
467
468// PolicyScopeContract enumerates the values for policy scope contract.
469type PolicyScopeContract string
470
471const (
472	// PolicyScopeContractAll ...
473	PolicyScopeContractAll PolicyScopeContract = "All"
474	// PolicyScopeContractAPI ...
475	PolicyScopeContractAPI PolicyScopeContract = "Api"
476	// PolicyScopeContractOperation ...
477	PolicyScopeContractOperation PolicyScopeContract = "Operation"
478	// PolicyScopeContractProduct ...
479	PolicyScopeContractProduct PolicyScopeContract = "Product"
480	// PolicyScopeContractTenant ...
481	PolicyScopeContractTenant PolicyScopeContract = "Tenant"
482)
483
484// PossiblePolicyScopeContractValues returns an array of possible values for the PolicyScopeContract const type.
485func PossiblePolicyScopeContractValues() []PolicyScopeContract {
486	return []PolicyScopeContract{PolicyScopeContractAll, PolicyScopeContractAPI, PolicyScopeContractOperation, PolicyScopeContractProduct, PolicyScopeContractTenant}
487}
488
489// ProductState enumerates the values for product state.
490type ProductState string
491
492const (
493	// NotPublished ...
494	NotPublished ProductState = "notPublished"
495	// Published ...
496	Published ProductState = "published"
497)
498
499// PossibleProductStateValues returns an array of possible values for the ProductState const type.
500func PossibleProductStateValues() []ProductState {
501	return []ProductState{NotPublished, Published}
502}
503
504// Protocol enumerates the values for protocol.
505type Protocol string
506
507const (
508	// ProtocolHTTP ...
509	ProtocolHTTP Protocol = "http"
510	// ProtocolHTTPS ...
511	ProtocolHTTPS Protocol = "https"
512)
513
514// PossibleProtocolValues returns an array of possible values for the Protocol const type.
515func PossibleProtocolValues() []Protocol {
516	return []Protocol{ProtocolHTTP, ProtocolHTTPS}
517}
518
519// ResourceSkuCapacityScaleType enumerates the values for resource sku capacity scale type.
520type ResourceSkuCapacityScaleType string
521
522const (
523	// Automatic Supported scale type automatic.
524	Automatic ResourceSkuCapacityScaleType = "automatic"
525	// Manual Supported scale type manual.
526	Manual ResourceSkuCapacityScaleType = "manual"
527	// None Scaling not supported.
528	None ResourceSkuCapacityScaleType = "none"
529)
530
531// PossibleResourceSkuCapacityScaleTypeValues returns an array of possible values for the ResourceSkuCapacityScaleType const type.
532func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType {
533	return []ResourceSkuCapacityScaleType{Automatic, Manual, None}
534}
535
536// SamplingType enumerates the values for sampling type.
537type SamplingType string
538
539const (
540	// Fixed Fixed-rate sampling.
541	Fixed SamplingType = "fixed"
542)
543
544// PossibleSamplingTypeValues returns an array of possible values for the SamplingType const type.
545func PossibleSamplingTypeValues() []SamplingType {
546	return []SamplingType{Fixed}
547}
548
549// SkuType enumerates the values for sku type.
550type SkuType string
551
552const (
553	// SkuTypeBasic Basic SKU of Api Management.
554	SkuTypeBasic SkuType = "Basic"
555	// SkuTypeConsumption Consumption SKU of Api Management.
556	SkuTypeConsumption SkuType = "Consumption"
557	// SkuTypeDeveloper Developer SKU of Api Management.
558	SkuTypeDeveloper SkuType = "Developer"
559	// SkuTypePremium Premium SKU of Api Management.
560	SkuTypePremium SkuType = "Premium"
561	// SkuTypeStandard Standard SKU of Api Management.
562	SkuTypeStandard SkuType = "Standard"
563)
564
565// PossibleSkuTypeValues returns an array of possible values for the SkuType const type.
566func PossibleSkuTypeValues() []SkuType {
567	return []SkuType{SkuTypeBasic, SkuTypeConsumption, SkuTypeDeveloper, SkuTypePremium, SkuTypeStandard}
568}
569
570// SoapAPIType enumerates the values for soap api type.
571type SoapAPIType string
572
573const (
574	// SoapPassThrough Imports the Soap API having a SOAP front end.
575	SoapPassThrough SoapAPIType = "soap"
576	// SoapToRest Imports a SOAP API having a RESTful front end.
577	SoapToRest SoapAPIType = "http"
578)
579
580// PossibleSoapAPITypeValues returns an array of possible values for the SoapAPIType const type.
581func PossibleSoapAPITypeValues() []SoapAPIType {
582	return []SoapAPIType{SoapPassThrough, SoapToRest}
583}
584
585// State enumerates the values for state.
586type State string
587
588const (
589	// Closed The issue was closed.
590	Closed State = "closed"
591	// Open The issue is opened.
592	Open State = "open"
593	// Proposed The issue is proposed.
594	Proposed State = "proposed"
595	// Removed The issue was removed.
596	Removed State = "removed"
597	// Resolved The issue is now resolved.
598	Resolved State = "resolved"
599)
600
601// PossibleStateValues returns an array of possible values for the State const type.
602func PossibleStateValues() []State {
603	return []State{Closed, Open, Proposed, Removed, Resolved}
604}
605
606// StoreName enumerates the values for store name.
607type StoreName string
608
609const (
610	// CertificateAuthority ...
611	CertificateAuthority StoreName = "CertificateAuthority"
612	// Root ...
613	Root StoreName = "Root"
614)
615
616// PossibleStoreNameValues returns an array of possible values for the StoreName const type.
617func PossibleStoreNameValues() []StoreName {
618	return []StoreName{CertificateAuthority, Root}
619}
620
621// SubscriptionState enumerates the values for subscription state.
622type SubscriptionState string
623
624const (
625	// Active ...
626	Active SubscriptionState = "active"
627	// Cancelled ...
628	Cancelled SubscriptionState = "cancelled"
629	// Expired ...
630	Expired SubscriptionState = "expired"
631	// Rejected ...
632	Rejected SubscriptionState = "rejected"
633	// Submitted ...
634	Submitted SubscriptionState = "submitted"
635	// Suspended ...
636	Suspended SubscriptionState = "suspended"
637)
638
639// PossibleSubscriptionStateValues returns an array of possible values for the SubscriptionState const type.
640func PossibleSubscriptionStateValues() []SubscriptionState {
641	return []SubscriptionState{Active, Cancelled, Expired, Rejected, Submitted, Suspended}
642}
643
644// TemplateName enumerates the values for template name.
645type TemplateName string
646
647const (
648	// AccountClosedDeveloper ...
649	AccountClosedDeveloper TemplateName = "accountClosedDeveloper"
650	// ApplicationApprovedNotificationMessage ...
651	ApplicationApprovedNotificationMessage TemplateName = "applicationApprovedNotificationMessage"
652	// ConfirmSignUpIdentityDefault ...
653	ConfirmSignUpIdentityDefault TemplateName = "confirmSignUpIdentityDefault"
654	// EmailChangeIdentityDefault ...
655	EmailChangeIdentityDefault TemplateName = "emailChangeIdentityDefault"
656	// InviteUserNotificationMessage ...
657	InviteUserNotificationMessage TemplateName = "inviteUserNotificationMessage"
658	// NewCommentNotificationMessage ...
659	NewCommentNotificationMessage TemplateName = "newCommentNotificationMessage"
660	// NewDeveloperNotificationMessage ...
661	NewDeveloperNotificationMessage TemplateName = "newDeveloperNotificationMessage"
662	// NewIssueNotificationMessage ...
663	NewIssueNotificationMessage TemplateName = "newIssueNotificationMessage"
664	// PasswordResetByAdminNotificationMessage ...
665	PasswordResetByAdminNotificationMessage TemplateName = "passwordResetByAdminNotificationMessage"
666	// PasswordResetIdentityDefault ...
667	PasswordResetIdentityDefault TemplateName = "passwordResetIdentityDefault"
668	// PurchaseDeveloperNotificationMessage ...
669	PurchaseDeveloperNotificationMessage TemplateName = "purchaseDeveloperNotificationMessage"
670	// QuotaLimitApproachingDeveloperNotificationMessage ...
671	QuotaLimitApproachingDeveloperNotificationMessage TemplateName = "quotaLimitApproachingDeveloperNotificationMessage"
672	// RejectDeveloperNotificationMessage ...
673	RejectDeveloperNotificationMessage TemplateName = "rejectDeveloperNotificationMessage"
674	// RequestDeveloperNotificationMessage ...
675	RequestDeveloperNotificationMessage TemplateName = "requestDeveloperNotificationMessage"
676)
677
678// PossibleTemplateNameValues returns an array of possible values for the TemplateName const type.
679func PossibleTemplateNameValues() []TemplateName {
680	return []TemplateName{AccountClosedDeveloper, ApplicationApprovedNotificationMessage, ConfirmSignUpIdentityDefault, EmailChangeIdentityDefault, InviteUserNotificationMessage, NewCommentNotificationMessage, NewDeveloperNotificationMessage, NewIssueNotificationMessage, PasswordResetByAdminNotificationMessage, PasswordResetIdentityDefault, PurchaseDeveloperNotificationMessage, QuotaLimitApproachingDeveloperNotificationMessage, RejectDeveloperNotificationMessage, RequestDeveloperNotificationMessage}
681}
682
683// UserState enumerates the values for user state.
684type UserState string
685
686const (
687	// UserStateActive User state is active.
688	UserStateActive UserState = "active"
689	// UserStateBlocked User is blocked. Blocked users cannot authenticate at developer portal or call API.
690	UserStateBlocked UserState = "blocked"
691	// UserStateDeleted User account is closed. All identities and related entities are removed.
692	UserStateDeleted UserState = "deleted"
693	// UserStatePending User account is pending. Requires identity confirmation before it can be made active.
694	UserStatePending UserState = "pending"
695)
696
697// PossibleUserStateValues returns an array of possible values for the UserState const type.
698func PossibleUserStateValues() []UserState {
699	return []UserState{UserStateActive, UserStateBlocked, UserStateDeleted, UserStatePending}
700}
701
702// VersioningScheme enumerates the values for versioning scheme.
703type VersioningScheme string
704
705const (
706	// VersioningSchemeHeader The API Version is passed in a HTTP header.
707	VersioningSchemeHeader VersioningScheme = "Header"
708	// VersioningSchemeQuery The API Version is passed in a query parameter.
709	VersioningSchemeQuery VersioningScheme = "Query"
710	// VersioningSchemeSegment The API Version is passed in a path segment.
711	VersioningSchemeSegment VersioningScheme = "Segment"
712)
713
714// PossibleVersioningSchemeValues returns an array of possible values for the VersioningScheme const type.
715func PossibleVersioningSchemeValues() []VersioningScheme {
716	return []VersioningScheme{VersioningSchemeHeader, VersioningSchemeQuery, VersioningSchemeSegment}
717}
718
719// VersioningScheme1 enumerates the values for versioning scheme 1.
720type VersioningScheme1 string
721
722const (
723	// VersioningScheme1Header ...
724	VersioningScheme1Header VersioningScheme1 = "Header"
725	// VersioningScheme1Query ...
726	VersioningScheme1Query VersioningScheme1 = "Query"
727	// VersioningScheme1Segment ...
728	VersioningScheme1Segment VersioningScheme1 = "Segment"
729)
730
731// PossibleVersioningScheme1Values returns an array of possible values for the VersioningScheme1 const type.
732func PossibleVersioningScheme1Values() []VersioningScheme1 {
733	return []VersioningScheme1{VersioningScheme1Header, VersioningScheme1Query, VersioningScheme1Segment}
734}
735
736// VirtualNetworkType enumerates the values for virtual network type.
737type VirtualNetworkType string
738
739const (
740	// VirtualNetworkTypeExternal The service is part of Virtual Network and it is accessible from Internet.
741	VirtualNetworkTypeExternal VirtualNetworkType = "External"
742	// VirtualNetworkTypeInternal The service is part of Virtual Network and it is only accessible from within
743	// the virtual network.
744	VirtualNetworkTypeInternal VirtualNetworkType = "Internal"
745	// VirtualNetworkTypeNone The service is not part of any Virtual Network.
746	VirtualNetworkTypeNone VirtualNetworkType = "None"
747)
748
749// PossibleVirtualNetworkTypeValues returns an array of possible values for the VirtualNetworkType const type.
750func PossibleVirtualNetworkTypeValues() []VirtualNetworkType {
751	return []VirtualNetworkType{VirtualNetworkTypeExternal, VirtualNetworkTypeInternal, VirtualNetworkTypeNone}
752}
753
754// AccessInformationContract tenant access information contract of the API Management service.
755type AccessInformationContract struct {
756	autorest.Response `json:"-"`
757	// ID - Identifier.
758	ID *string `json:"id,omitempty"`
759	// PrimaryKey - Primary access key.
760	PrimaryKey *string `json:"primaryKey,omitempty"`
761	// SecondaryKey - Secondary access key.
762	SecondaryKey *string `json:"secondaryKey,omitempty"`
763	// Enabled - Determines whether direct access is enabled.
764	Enabled *bool `json:"enabled,omitempty"`
765}
766
767// AccessInformationUpdateParameterProperties tenant access information update parameters of the API
768// Management service
769type AccessInformationUpdateParameterProperties struct {
770	// Enabled - Determines whether direct access is enabled.
771	Enabled *bool `json:"enabled,omitempty"`
772}
773
774// AccessInformationUpdateParameters tenant access information update parameters.
775type AccessInformationUpdateParameters struct {
776	// AccessInformationUpdateParameterProperties - Tenant access information update parameter properties.
777	*AccessInformationUpdateParameterProperties `json:"properties,omitempty"`
778}
779
780// MarshalJSON is the custom marshaler for AccessInformationUpdateParameters.
781func (aiup AccessInformationUpdateParameters) MarshalJSON() ([]byte, error) {
782	objectMap := make(map[string]interface{})
783	if aiup.AccessInformationUpdateParameterProperties != nil {
784		objectMap["properties"] = aiup.AccessInformationUpdateParameterProperties
785	}
786	return json.Marshal(objectMap)
787}
788
789// UnmarshalJSON is the custom unmarshaler for AccessInformationUpdateParameters struct.
790func (aiup *AccessInformationUpdateParameters) UnmarshalJSON(body []byte) error {
791	var m map[string]*json.RawMessage
792	err := json.Unmarshal(body, &m)
793	if err != nil {
794		return err
795	}
796	for k, v := range m {
797		switch k {
798		case "properties":
799			if v != nil {
800				var accessInformationUpdateParameterProperties AccessInformationUpdateParameterProperties
801				err = json.Unmarshal(*v, &accessInformationUpdateParameterProperties)
802				if err != nil {
803					return err
804				}
805				aiup.AccessInformationUpdateParameterProperties = &accessInformationUpdateParameterProperties
806			}
807		}
808	}
809
810	return nil
811}
812
813// AdditionalLocation description of an additional API Management resource location.
814type AdditionalLocation struct {
815	// Location - The location name of the additional region among Azure Data center regions.
816	Location *string `json:"location,omitempty"`
817	// Sku - SKU properties of the API Management service.
818	Sku *ServiceSkuProperties `json:"sku,omitempty"`
819	// 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.
820	PublicIPAddresses *[]string `json:"publicIPAddresses,omitempty"`
821	// 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.
822	PrivateIPAddresses *[]string `json:"privateIPAddresses,omitempty"`
823	// VirtualNetworkConfiguration - Virtual network configuration for the location.
824	VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"`
825	// GatewayRegionalURL - READ-ONLY; Gateway URL of the API Management service in the Region.
826	GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty"`
827}
828
829// APICollection paged Api list representation.
830type APICollection struct {
831	autorest.Response `json:"-"`
832	// Value - READ-ONLY; Page values.
833	Value *[]APIContract `json:"value,omitempty"`
834	// NextLink - READ-ONLY; Next page link if any.
835	NextLink *string `json:"nextLink,omitempty"`
836}
837
838// APICollectionIterator provides access to a complete listing of APIContract values.
839type APICollectionIterator struct {
840	i    int
841	page APICollectionPage
842}
843
844// NextWithContext advances to the next value.  If there was an error making
845// the request the iterator does not advance and the error is returned.
846func (iter *APICollectionIterator) NextWithContext(ctx context.Context) (err error) {
847	if tracing.IsEnabled() {
848		ctx = tracing.StartSpan(ctx, fqdn+"/APICollectionIterator.NextWithContext")
849		defer func() {
850			sc := -1
851			if iter.Response().Response.Response != nil {
852				sc = iter.Response().Response.Response.StatusCode
853			}
854			tracing.EndSpan(ctx, sc, err)
855		}()
856	}
857	iter.i++
858	if iter.i < len(iter.page.Values()) {
859		return nil
860	}
861	err = iter.page.NextWithContext(ctx)
862	if err != nil {
863		iter.i--
864		return err
865	}
866	iter.i = 0
867	return nil
868}
869
870// Next advances to the next value.  If there was an error making
871// the request the iterator does not advance and the error is returned.
872// Deprecated: Use NextWithContext() instead.
873func (iter *APICollectionIterator) Next() error {
874	return iter.NextWithContext(context.Background())
875}
876
877// NotDone returns true if the enumeration should be started or is not yet complete.
878func (iter APICollectionIterator) NotDone() bool {
879	return iter.page.NotDone() && iter.i < len(iter.page.Values())
880}
881
882// Response returns the raw server response from the last page request.
883func (iter APICollectionIterator) Response() APICollection {
884	return iter.page.Response()
885}
886
887// Value returns the current value or a zero-initialized value if the
888// iterator has advanced beyond the end of the collection.
889func (iter APICollectionIterator) Value() APIContract {
890	if !iter.page.NotDone() {
891		return APIContract{}
892	}
893	return iter.page.Values()[iter.i]
894}
895
896// Creates a new instance of the APICollectionIterator type.
897func NewAPICollectionIterator(page APICollectionPage) APICollectionIterator {
898	return APICollectionIterator{page: page}
899}
900
901// IsEmpty returns true if the ListResult contains no values.
902func (ac APICollection) IsEmpty() bool {
903	return ac.Value == nil || len(*ac.Value) == 0
904}
905
906// aPICollectionPreparer prepares a request to retrieve the next set of results.
907// It returns nil if no more results exist.
908func (ac APICollection) aPICollectionPreparer(ctx context.Context) (*http.Request, error) {
909	if ac.NextLink == nil || len(to.String(ac.NextLink)) < 1 {
910		return nil, nil
911	}
912	return autorest.Prepare((&http.Request{}).WithContext(ctx),
913		autorest.AsJSON(),
914		autorest.AsGet(),
915		autorest.WithBaseURL(to.String(ac.NextLink)))
916}
917
918// APICollectionPage contains a page of APIContract values.
919type APICollectionPage struct {
920	fn func(context.Context, APICollection) (APICollection, error)
921	ac APICollection
922}
923
924// NextWithContext advances to the next page of values.  If there was an error making
925// the request the page does not advance and the error is returned.
926func (page *APICollectionPage) NextWithContext(ctx context.Context) (err error) {
927	if tracing.IsEnabled() {
928		ctx = tracing.StartSpan(ctx, fqdn+"/APICollectionPage.NextWithContext")
929		defer func() {
930			sc := -1
931			if page.Response().Response.Response != nil {
932				sc = page.Response().Response.Response.StatusCode
933			}
934			tracing.EndSpan(ctx, sc, err)
935		}()
936	}
937	next, err := page.fn(ctx, page.ac)
938	if err != nil {
939		return err
940	}
941	page.ac = next
942	return nil
943}
944
945// Next advances to the next page of values.  If there was an error making
946// the request the page does not advance and the error is returned.
947// Deprecated: Use NextWithContext() instead.
948func (page *APICollectionPage) Next() error {
949	return page.NextWithContext(context.Background())
950}
951
952// NotDone returns true if the page enumeration should be started or is not yet complete.
953func (page APICollectionPage) NotDone() bool {
954	return !page.ac.IsEmpty()
955}
956
957// Response returns the raw server response from the last page request.
958func (page APICollectionPage) Response() APICollection {
959	return page.ac
960}
961
962// Values returns the slice of values for the current page or nil if there are no values.
963func (page APICollectionPage) Values() []APIContract {
964	if page.ac.IsEmpty() {
965		return nil
966	}
967	return *page.ac.Value
968}
969
970// Creates a new instance of the APICollectionPage type.
971func NewAPICollectionPage(getNextPage func(context.Context, APICollection) (APICollection, error)) APICollectionPage {
972	return APICollectionPage{fn: getNextPage}
973}
974
975// APIContract api details.
976type APIContract struct {
977	autorest.Response `json:"-"`
978	// APIContractProperties - Api entity contract properties.
979	*APIContractProperties `json:"properties,omitempty"`
980	// ID - READ-ONLY; Resource ID.
981	ID *string `json:"id,omitempty"`
982	// Name - READ-ONLY; Resource name.
983	Name *string `json:"name,omitempty"`
984	// Type - READ-ONLY; Resource type for API Management resource.
985	Type *string `json:"type,omitempty"`
986}
987
988// MarshalJSON is the custom marshaler for APIContract.
989func (ac APIContract) MarshalJSON() ([]byte, error) {
990	objectMap := make(map[string]interface{})
991	if ac.APIContractProperties != nil {
992		objectMap["properties"] = ac.APIContractProperties
993	}
994	return json.Marshal(objectMap)
995}
996
997// UnmarshalJSON is the custom unmarshaler for APIContract struct.
998func (ac *APIContract) UnmarshalJSON(body []byte) error {
999	var m map[string]*json.RawMessage
1000	err := json.Unmarshal(body, &m)
1001	if err != nil {
1002		return err
1003	}
1004	for k, v := range m {
1005		switch k {
1006		case "properties":
1007			if v != nil {
1008				var APIContractProperties APIContractProperties
1009				err = json.Unmarshal(*v, &APIContractProperties)
1010				if err != nil {
1011					return err
1012				}
1013				ac.APIContractProperties = &APIContractProperties
1014			}
1015		case "id":
1016			if v != nil {
1017				var ID string
1018				err = json.Unmarshal(*v, &ID)
1019				if err != nil {
1020					return err
1021				}
1022				ac.ID = &ID
1023			}
1024		case "name":
1025			if v != nil {
1026				var name string
1027				err = json.Unmarshal(*v, &name)
1028				if err != nil {
1029					return err
1030				}
1031				ac.Name = &name
1032			}
1033		case "type":
1034			if v != nil {
1035				var typeVar string
1036				err = json.Unmarshal(*v, &typeVar)
1037				if err != nil {
1038					return err
1039				}
1040				ac.Type = &typeVar
1041			}
1042		}
1043	}
1044
1045	return nil
1046}
1047
1048// APIContractProperties api Entity Properties
1049type APIContractProperties struct {
1050	// SourceAPIID - API identifier of the source API.
1051	SourceAPIID *string `json:"sourceApiId,omitempty"`
1052	// DisplayName - API name. Must be 1 to 300 characters long.
1053	DisplayName *string `json:"displayName,omitempty"`
1054	// ServiceURL - Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
1055	ServiceURL *string `json:"serviceUrl,omitempty"`
1056	// 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.
1057	Path *string `json:"path,omitempty"`
1058	// Protocols - Describes on which protocols the operations in this API can be invoked.
1059	Protocols *[]Protocol `json:"protocols,omitempty"`
1060	// APIVersionSet - Version set details
1061	APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"`
1062	// Description - Description of the API. May include HTML formatting tags.
1063	Description *string `json:"description,omitempty"`
1064	// AuthenticationSettings - Collection of authentication settings included into this API.
1065	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
1066	// SubscriptionKeyParameterNames - Protocols over which API is made available.
1067	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
1068	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
1069	APIType APIType `json:"type,omitempty"`
1070	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
1071	APIRevision *string `json:"apiRevision,omitempty"`
1072	// APIVersion - Indicates the Version identifier of the API if the API is versioned
1073	APIVersion *string `json:"apiVersion,omitempty"`
1074	// IsCurrent - Indicates if API revision is current api revision.
1075	IsCurrent *bool `json:"isCurrent,omitempty"`
1076	// IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway.
1077	IsOnline *bool `json:"isOnline,omitempty"`
1078	// APIRevisionDescription - Description of the Api Revision.
1079	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`
1080	// APIVersionDescription - Description of the Api Version.
1081	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
1082	// APIVersionSetID - A resource identifier for the related ApiVersionSet.
1083	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
1084	// SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
1085	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
1086}
1087
1088// APIContractUpdateProperties API update contract properties.
1089type APIContractUpdateProperties struct {
1090	// DisplayName - API name.
1091	DisplayName *string `json:"displayName,omitempty"`
1092	// ServiceURL - Absolute URL of the backend service implementing this API.
1093	ServiceURL *string `json:"serviceUrl,omitempty"`
1094	// 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.
1095	Path *string `json:"path,omitempty"`
1096	// Protocols - Describes on which protocols the operations in this API can be invoked.
1097	Protocols *[]Protocol `json:"protocols,omitempty"`
1098	// Description - Description of the API. May include HTML formatting tags.
1099	Description *string `json:"description,omitempty"`
1100	// AuthenticationSettings - Collection of authentication settings included into this API.
1101	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
1102	// SubscriptionKeyParameterNames - Protocols over which API is made available.
1103	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
1104	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
1105	APIType APIType `json:"type,omitempty"`
1106	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
1107	APIRevision *string `json:"apiRevision,omitempty"`
1108	// APIVersion - Indicates the Version identifier of the API if the API is versioned
1109	APIVersion *string `json:"apiVersion,omitempty"`
1110	// IsCurrent - Indicates if API revision is current api revision.
1111	IsCurrent *bool `json:"isCurrent,omitempty"`
1112	// IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway.
1113	IsOnline *bool `json:"isOnline,omitempty"`
1114	// APIRevisionDescription - Description of the Api Revision.
1115	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`
1116	// APIVersionDescription - Description of the Api Version.
1117	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
1118	// APIVersionSetID - A resource identifier for the related ApiVersionSet.
1119	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
1120	// SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
1121	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
1122}
1123
1124// APICreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1125// operation.
1126type APICreateOrUpdateFuture struct {
1127	azure.Future
1128}
1129
1130// Result returns the result of the asynchronous operation.
1131// If the operation has not completed it will return an error.
1132func (future *APICreateOrUpdateFuture) Result(client APIClient) (ac APIContract, err error) {
1133	var done bool
1134	done, err = future.DoneWithContext(context.Background(), client)
1135	if err != nil {
1136		err = autorest.NewErrorWithError(err, "apimanagement.APICreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1137		return
1138	}
1139	if !done {
1140		err = azure.NewAsyncOpIncompleteError("apimanagement.APICreateOrUpdateFuture")
1141		return
1142	}
1143	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1144	if ac.Response.Response, err = future.GetResult(sender); err == nil && ac.Response.Response.StatusCode != http.StatusNoContent {
1145		ac, err = client.CreateOrUpdateResponder(ac.Response.Response)
1146		if err != nil {
1147			err = autorest.NewErrorWithError(err, "apimanagement.APICreateOrUpdateFuture", "Result", ac.Response.Response, "Failure responding to request")
1148		}
1149	}
1150	return
1151}
1152
1153// APICreateOrUpdateParameter API Create or Update Parameters.
1154type APICreateOrUpdateParameter struct {
1155	// APICreateOrUpdateProperties - Api entity create of update properties.
1156	*APICreateOrUpdateProperties `json:"properties,omitempty"`
1157}
1158
1159// MarshalJSON is the custom marshaler for APICreateOrUpdateParameter.
1160func (acoup APICreateOrUpdateParameter) MarshalJSON() ([]byte, error) {
1161	objectMap := make(map[string]interface{})
1162	if acoup.APICreateOrUpdateProperties != nil {
1163		objectMap["properties"] = acoup.APICreateOrUpdateProperties
1164	}
1165	return json.Marshal(objectMap)
1166}
1167
1168// UnmarshalJSON is the custom unmarshaler for APICreateOrUpdateParameter struct.
1169func (acoup *APICreateOrUpdateParameter) UnmarshalJSON(body []byte) error {
1170	var m map[string]*json.RawMessage
1171	err := json.Unmarshal(body, &m)
1172	if err != nil {
1173		return err
1174	}
1175	for k, v := range m {
1176		switch k {
1177		case "properties":
1178			if v != nil {
1179				var APICreateOrUpdateProperties APICreateOrUpdateProperties
1180				err = json.Unmarshal(*v, &APICreateOrUpdateProperties)
1181				if err != nil {
1182					return err
1183				}
1184				acoup.APICreateOrUpdateProperties = &APICreateOrUpdateProperties
1185			}
1186		}
1187	}
1188
1189	return nil
1190}
1191
1192// APICreateOrUpdateProperties api Create or Update Properties.
1193type APICreateOrUpdateProperties struct {
1194	// Value - Content value when Importing an API.
1195	Value *string `json:"value,omitempty"`
1196	// Format - Format of the Content in which the API is getting imported. Possible values include: 'WadlXML', 'WadlLinkJSON', 'SwaggerJSON', 'SwaggerLinkJSON', 'Wsdl', 'WsdlLink', 'Openapi', 'Openapijson', 'OpenapiLink'
1197	Format ContentFormat `json:"format,omitempty"`
1198	// WsdlSelector - Criteria to limit import of WSDL to a subset of the document.
1199	WsdlSelector *APICreateOrUpdatePropertiesWsdlSelector `json:"wsdlSelector,omitempty"`
1200	// SoapAPIType - Type of Api to create.
1201	//  * `http` creates a SOAP to REST API
1202	//  * `soap` creates a SOAP pass-through API. Possible values include: 'SoapToRest', 'SoapPassThrough'
1203	SoapAPIType SoapAPIType `json:"apiType,omitempty"`
1204	// SourceAPIID - API identifier of the source API.
1205	SourceAPIID *string `json:"sourceApiId,omitempty"`
1206	// DisplayName - API name. Must be 1 to 300 characters long.
1207	DisplayName *string `json:"displayName,omitempty"`
1208	// ServiceURL - Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
1209	ServiceURL *string `json:"serviceUrl,omitempty"`
1210	// 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.
1211	Path *string `json:"path,omitempty"`
1212	// Protocols - Describes on which protocols the operations in this API can be invoked.
1213	Protocols *[]Protocol `json:"protocols,omitempty"`
1214	// APIVersionSet - Version set details
1215	APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"`
1216	// Description - Description of the API. May include HTML formatting tags.
1217	Description *string `json:"description,omitempty"`
1218	// AuthenticationSettings - Collection of authentication settings included into this API.
1219	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
1220	// SubscriptionKeyParameterNames - Protocols over which API is made available.
1221	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
1222	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
1223	APIType APIType `json:"type,omitempty"`
1224	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
1225	APIRevision *string `json:"apiRevision,omitempty"`
1226	// APIVersion - Indicates the Version identifier of the API if the API is versioned
1227	APIVersion *string `json:"apiVersion,omitempty"`
1228	// IsCurrent - Indicates if API revision is current api revision.
1229	IsCurrent *bool `json:"isCurrent,omitempty"`
1230	// IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway.
1231	IsOnline *bool `json:"isOnline,omitempty"`
1232	// APIRevisionDescription - Description of the Api Revision.
1233	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`
1234	// APIVersionDescription - Description of the Api Version.
1235	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
1236	// APIVersionSetID - A resource identifier for the related ApiVersionSet.
1237	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
1238	// SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
1239	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
1240}
1241
1242// APICreateOrUpdatePropertiesWsdlSelector criteria to limit import of WSDL to a subset of the document.
1243type APICreateOrUpdatePropertiesWsdlSelector struct {
1244	// WsdlServiceName - Name of service to import from WSDL
1245	WsdlServiceName *string `json:"wsdlServiceName,omitempty"`
1246	// WsdlEndpointName - Name of endpoint(port) to import from WSDL
1247	WsdlEndpointName *string `json:"wsdlEndpointName,omitempty"`
1248}
1249
1250// APIEntityBaseContract API base contract details.
1251type APIEntityBaseContract struct {
1252	// Description - Description of the API. May include HTML formatting tags.
1253	Description *string `json:"description,omitempty"`
1254	// AuthenticationSettings - Collection of authentication settings included into this API.
1255	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
1256	// SubscriptionKeyParameterNames - Protocols over which API is made available.
1257	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
1258	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
1259	APIType APIType `json:"type,omitempty"`
1260	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
1261	APIRevision *string `json:"apiRevision,omitempty"`
1262	// APIVersion - Indicates the Version identifier of the API if the API is versioned
1263	APIVersion *string `json:"apiVersion,omitempty"`
1264	// IsCurrent - Indicates if API revision is current api revision.
1265	IsCurrent *bool `json:"isCurrent,omitempty"`
1266	// IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway.
1267	IsOnline *bool `json:"isOnline,omitempty"`
1268	// APIRevisionDescription - Description of the Api Revision.
1269	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`
1270	// APIVersionDescription - Description of the Api Version.
1271	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
1272	// APIVersionSetID - A resource identifier for the related ApiVersionSet.
1273	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
1274	// SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
1275	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
1276}
1277
1278// APIExportResult API Export result.
1279type APIExportResult struct {
1280	autorest.Response `json:"-"`
1281	// ID - ResourceId of the API which was exported.
1282	ID *string `json:"id,omitempty"`
1283	// 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'
1284	ExportResultFormat ExportResultFormat `json:"format,omitempty"`
1285	// Value - The object defining the schema of the exported Api Detail
1286	Value *APIExportResultValue `json:"value,omitempty"`
1287}
1288
1289// APIExportResultValue the object defining the schema of the exported Api Detail
1290type APIExportResultValue struct {
1291	// Link - Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes.
1292	Link *string `json:"link,omitempty"`
1293}
1294
1295// ApimResource the Resource definition.
1296type ApimResource struct {
1297	// ID - READ-ONLY; Resource ID.
1298	ID *string `json:"id,omitempty"`
1299	// Name - READ-ONLY; Resource name.
1300	Name *string `json:"name,omitempty"`
1301	// Type - READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement.
1302	Type *string `json:"type,omitempty"`
1303	// Tags - Resource tags.
1304	Tags map[string]*string `json:"tags"`
1305}
1306
1307// MarshalJSON is the custom marshaler for ApimResource.
1308func (ar ApimResource) MarshalJSON() ([]byte, error) {
1309	objectMap := make(map[string]interface{})
1310	if ar.Tags != nil {
1311		objectMap["tags"] = ar.Tags
1312	}
1313	return json.Marshal(objectMap)
1314}
1315
1316// APIReleaseCollection paged ApiRelease list representation.
1317type APIReleaseCollection struct {
1318	autorest.Response `json:"-"`
1319	// Value - READ-ONLY; Page values.
1320	Value *[]APIReleaseContract `json:"value,omitempty"`
1321	// NextLink - READ-ONLY; Next page link if any.
1322	NextLink *string `json:"nextLink,omitempty"`
1323}
1324
1325// APIReleaseCollectionIterator provides access to a complete listing of APIReleaseContract values.
1326type APIReleaseCollectionIterator struct {
1327	i    int
1328	page APIReleaseCollectionPage
1329}
1330
1331// NextWithContext advances to the next value.  If there was an error making
1332// the request the iterator does not advance and the error is returned.
1333func (iter *APIReleaseCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1334	if tracing.IsEnabled() {
1335		ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseCollectionIterator.NextWithContext")
1336		defer func() {
1337			sc := -1
1338			if iter.Response().Response.Response != nil {
1339				sc = iter.Response().Response.Response.StatusCode
1340			}
1341			tracing.EndSpan(ctx, sc, err)
1342		}()
1343	}
1344	iter.i++
1345	if iter.i < len(iter.page.Values()) {
1346		return nil
1347	}
1348	err = iter.page.NextWithContext(ctx)
1349	if err != nil {
1350		iter.i--
1351		return err
1352	}
1353	iter.i = 0
1354	return nil
1355}
1356
1357// Next advances to the next value.  If there was an error making
1358// the request the iterator does not advance and the error is returned.
1359// Deprecated: Use NextWithContext() instead.
1360func (iter *APIReleaseCollectionIterator) Next() error {
1361	return iter.NextWithContext(context.Background())
1362}
1363
1364// NotDone returns true if the enumeration should be started or is not yet complete.
1365func (iter APIReleaseCollectionIterator) NotDone() bool {
1366	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1367}
1368
1369// Response returns the raw server response from the last page request.
1370func (iter APIReleaseCollectionIterator) Response() APIReleaseCollection {
1371	return iter.page.Response()
1372}
1373
1374// Value returns the current value or a zero-initialized value if the
1375// iterator has advanced beyond the end of the collection.
1376func (iter APIReleaseCollectionIterator) Value() APIReleaseContract {
1377	if !iter.page.NotDone() {
1378		return APIReleaseContract{}
1379	}
1380	return iter.page.Values()[iter.i]
1381}
1382
1383// Creates a new instance of the APIReleaseCollectionIterator type.
1384func NewAPIReleaseCollectionIterator(page APIReleaseCollectionPage) APIReleaseCollectionIterator {
1385	return APIReleaseCollectionIterator{page: page}
1386}
1387
1388// IsEmpty returns true if the ListResult contains no values.
1389func (arc APIReleaseCollection) IsEmpty() bool {
1390	return arc.Value == nil || len(*arc.Value) == 0
1391}
1392
1393// aPIReleaseCollectionPreparer prepares a request to retrieve the next set of results.
1394// It returns nil if no more results exist.
1395func (arc APIReleaseCollection) aPIReleaseCollectionPreparer(ctx context.Context) (*http.Request, error) {
1396	if arc.NextLink == nil || len(to.String(arc.NextLink)) < 1 {
1397		return nil, nil
1398	}
1399	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1400		autorest.AsJSON(),
1401		autorest.AsGet(),
1402		autorest.WithBaseURL(to.String(arc.NextLink)))
1403}
1404
1405// APIReleaseCollectionPage contains a page of APIReleaseContract values.
1406type APIReleaseCollectionPage struct {
1407	fn  func(context.Context, APIReleaseCollection) (APIReleaseCollection, error)
1408	arc APIReleaseCollection
1409}
1410
1411// NextWithContext advances to the next page of values.  If there was an error making
1412// the request the page does not advance and the error is returned.
1413func (page *APIReleaseCollectionPage) NextWithContext(ctx context.Context) (err error) {
1414	if tracing.IsEnabled() {
1415		ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseCollectionPage.NextWithContext")
1416		defer func() {
1417			sc := -1
1418			if page.Response().Response.Response != nil {
1419				sc = page.Response().Response.Response.StatusCode
1420			}
1421			tracing.EndSpan(ctx, sc, err)
1422		}()
1423	}
1424	next, err := page.fn(ctx, page.arc)
1425	if err != nil {
1426		return err
1427	}
1428	page.arc = next
1429	return nil
1430}
1431
1432// Next advances to the next page of values.  If there was an error making
1433// the request the page does not advance and the error is returned.
1434// Deprecated: Use NextWithContext() instead.
1435func (page *APIReleaseCollectionPage) Next() error {
1436	return page.NextWithContext(context.Background())
1437}
1438
1439// NotDone returns true if the page enumeration should be started or is not yet complete.
1440func (page APIReleaseCollectionPage) NotDone() bool {
1441	return !page.arc.IsEmpty()
1442}
1443
1444// Response returns the raw server response from the last page request.
1445func (page APIReleaseCollectionPage) Response() APIReleaseCollection {
1446	return page.arc
1447}
1448
1449// Values returns the slice of values for the current page or nil if there are no values.
1450func (page APIReleaseCollectionPage) Values() []APIReleaseContract {
1451	if page.arc.IsEmpty() {
1452		return nil
1453	}
1454	return *page.arc.Value
1455}
1456
1457// Creates a new instance of the APIReleaseCollectionPage type.
1458func NewAPIReleaseCollectionPage(getNextPage func(context.Context, APIReleaseCollection) (APIReleaseCollection, error)) APIReleaseCollectionPage {
1459	return APIReleaseCollectionPage{fn: getNextPage}
1460}
1461
1462// APIReleaseContract apiRelease details.
1463type APIReleaseContract struct {
1464	autorest.Response `json:"-"`
1465	// APIReleaseContractProperties - ApiRelease entity contract properties.
1466	*APIReleaseContractProperties `json:"properties,omitempty"`
1467	// ID - READ-ONLY; Resource ID.
1468	ID *string `json:"id,omitempty"`
1469	// Name - READ-ONLY; Resource name.
1470	Name *string `json:"name,omitempty"`
1471	// Type - READ-ONLY; Resource type for API Management resource.
1472	Type *string `json:"type,omitempty"`
1473}
1474
1475// MarshalJSON is the custom marshaler for APIReleaseContract.
1476func (arc APIReleaseContract) MarshalJSON() ([]byte, error) {
1477	objectMap := make(map[string]interface{})
1478	if arc.APIReleaseContractProperties != nil {
1479		objectMap["properties"] = arc.APIReleaseContractProperties
1480	}
1481	return json.Marshal(objectMap)
1482}
1483
1484// UnmarshalJSON is the custom unmarshaler for APIReleaseContract struct.
1485func (arc *APIReleaseContract) UnmarshalJSON(body []byte) error {
1486	var m map[string]*json.RawMessage
1487	err := json.Unmarshal(body, &m)
1488	if err != nil {
1489		return err
1490	}
1491	for k, v := range m {
1492		switch k {
1493		case "properties":
1494			if v != nil {
1495				var APIReleaseContractProperties APIReleaseContractProperties
1496				err = json.Unmarshal(*v, &APIReleaseContractProperties)
1497				if err != nil {
1498					return err
1499				}
1500				arc.APIReleaseContractProperties = &APIReleaseContractProperties
1501			}
1502		case "id":
1503			if v != nil {
1504				var ID string
1505				err = json.Unmarshal(*v, &ID)
1506				if err != nil {
1507					return err
1508				}
1509				arc.ID = &ID
1510			}
1511		case "name":
1512			if v != nil {
1513				var name string
1514				err = json.Unmarshal(*v, &name)
1515				if err != nil {
1516					return err
1517				}
1518				arc.Name = &name
1519			}
1520		case "type":
1521			if v != nil {
1522				var typeVar string
1523				err = json.Unmarshal(*v, &typeVar)
1524				if err != nil {
1525					return err
1526				}
1527				arc.Type = &typeVar
1528			}
1529		}
1530	}
1531
1532	return nil
1533}
1534
1535// APIReleaseContractProperties API Release details
1536type APIReleaseContractProperties struct {
1537	// APIID - Identifier of the API the release belongs to.
1538	APIID *string `json:"apiId,omitempty"`
1539	// 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.
1540	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
1541	// UpdatedDateTime - READ-ONLY; The time the API release was updated.
1542	UpdatedDateTime *date.Time `json:"updatedDateTime,omitempty"`
1543	// Notes - Release Notes
1544	Notes *string `json:"notes,omitempty"`
1545}
1546
1547// APIRevisionCollection paged Api Revision list representation.
1548type APIRevisionCollection struct {
1549	autorest.Response `json:"-"`
1550	// Value - READ-ONLY; Page values.
1551	Value *[]APIRevisionContract `json:"value,omitempty"`
1552	// NextLink - READ-ONLY; Next page link if any.
1553	NextLink *string `json:"nextLink,omitempty"`
1554}
1555
1556// APIRevisionCollectionIterator provides access to a complete listing of APIRevisionContract values.
1557type APIRevisionCollectionIterator struct {
1558	i    int
1559	page APIRevisionCollectionPage
1560}
1561
1562// NextWithContext advances to the next value.  If there was an error making
1563// the request the iterator does not advance and the error is returned.
1564func (iter *APIRevisionCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1565	if tracing.IsEnabled() {
1566		ctx = tracing.StartSpan(ctx, fqdn+"/APIRevisionCollectionIterator.NextWithContext")
1567		defer func() {
1568			sc := -1
1569			if iter.Response().Response.Response != nil {
1570				sc = iter.Response().Response.Response.StatusCode
1571			}
1572			tracing.EndSpan(ctx, sc, err)
1573		}()
1574	}
1575	iter.i++
1576	if iter.i < len(iter.page.Values()) {
1577		return nil
1578	}
1579	err = iter.page.NextWithContext(ctx)
1580	if err != nil {
1581		iter.i--
1582		return err
1583	}
1584	iter.i = 0
1585	return nil
1586}
1587
1588// Next advances to the next value.  If there was an error making
1589// the request the iterator does not advance and the error is returned.
1590// Deprecated: Use NextWithContext() instead.
1591func (iter *APIRevisionCollectionIterator) Next() error {
1592	return iter.NextWithContext(context.Background())
1593}
1594
1595// NotDone returns true if the enumeration should be started or is not yet complete.
1596func (iter APIRevisionCollectionIterator) NotDone() bool {
1597	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1598}
1599
1600// Response returns the raw server response from the last page request.
1601func (iter APIRevisionCollectionIterator) Response() APIRevisionCollection {
1602	return iter.page.Response()
1603}
1604
1605// Value returns the current value or a zero-initialized value if the
1606// iterator has advanced beyond the end of the collection.
1607func (iter APIRevisionCollectionIterator) Value() APIRevisionContract {
1608	if !iter.page.NotDone() {
1609		return APIRevisionContract{}
1610	}
1611	return iter.page.Values()[iter.i]
1612}
1613
1614// Creates a new instance of the APIRevisionCollectionIterator type.
1615func NewAPIRevisionCollectionIterator(page APIRevisionCollectionPage) APIRevisionCollectionIterator {
1616	return APIRevisionCollectionIterator{page: page}
1617}
1618
1619// IsEmpty returns true if the ListResult contains no values.
1620func (arc APIRevisionCollection) IsEmpty() bool {
1621	return arc.Value == nil || len(*arc.Value) == 0
1622}
1623
1624// aPIRevisionCollectionPreparer prepares a request to retrieve the next set of results.
1625// It returns nil if no more results exist.
1626func (arc APIRevisionCollection) aPIRevisionCollectionPreparer(ctx context.Context) (*http.Request, error) {
1627	if arc.NextLink == nil || len(to.String(arc.NextLink)) < 1 {
1628		return nil, nil
1629	}
1630	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1631		autorest.AsJSON(),
1632		autorest.AsGet(),
1633		autorest.WithBaseURL(to.String(arc.NextLink)))
1634}
1635
1636// APIRevisionCollectionPage contains a page of APIRevisionContract values.
1637type APIRevisionCollectionPage struct {
1638	fn  func(context.Context, APIRevisionCollection) (APIRevisionCollection, error)
1639	arc APIRevisionCollection
1640}
1641
1642// NextWithContext advances to the next page of values.  If there was an error making
1643// the request the page does not advance and the error is returned.
1644func (page *APIRevisionCollectionPage) NextWithContext(ctx context.Context) (err error) {
1645	if tracing.IsEnabled() {
1646		ctx = tracing.StartSpan(ctx, fqdn+"/APIRevisionCollectionPage.NextWithContext")
1647		defer func() {
1648			sc := -1
1649			if page.Response().Response.Response != nil {
1650				sc = page.Response().Response.Response.StatusCode
1651			}
1652			tracing.EndSpan(ctx, sc, err)
1653		}()
1654	}
1655	next, err := page.fn(ctx, page.arc)
1656	if err != nil {
1657		return err
1658	}
1659	page.arc = next
1660	return nil
1661}
1662
1663// Next advances to the next page of values.  If there was an error making
1664// the request the page does not advance and the error is returned.
1665// Deprecated: Use NextWithContext() instead.
1666func (page *APIRevisionCollectionPage) Next() error {
1667	return page.NextWithContext(context.Background())
1668}
1669
1670// NotDone returns true if the page enumeration should be started or is not yet complete.
1671func (page APIRevisionCollectionPage) NotDone() bool {
1672	return !page.arc.IsEmpty()
1673}
1674
1675// Response returns the raw server response from the last page request.
1676func (page APIRevisionCollectionPage) Response() APIRevisionCollection {
1677	return page.arc
1678}
1679
1680// Values returns the slice of values for the current page or nil if there are no values.
1681func (page APIRevisionCollectionPage) Values() []APIRevisionContract {
1682	if page.arc.IsEmpty() {
1683		return nil
1684	}
1685	return *page.arc.Value
1686}
1687
1688// Creates a new instance of the APIRevisionCollectionPage type.
1689func NewAPIRevisionCollectionPage(getNextPage func(context.Context, APIRevisionCollection) (APIRevisionCollection, error)) APIRevisionCollectionPage {
1690	return APIRevisionCollectionPage{fn: getNextPage}
1691}
1692
1693// APIRevisionContract summary of revision metadata.
1694type APIRevisionContract struct {
1695	// APIID - READ-ONLY; Identifier of the API Revision.
1696	APIID *string `json:"apiId,omitempty"`
1697	// APIRevision - READ-ONLY; Revision number of API.
1698	APIRevision *string `json:"apiRevision,omitempty"`
1699	// 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.
1700	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
1701	// 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.
1702	UpdatedDateTime *date.Time `json:"updatedDateTime,omitempty"`
1703	// Description - READ-ONLY; Description of the API Revision.
1704	Description *string `json:"description,omitempty"`
1705	// PrivateURL - READ-ONLY; Gateway URL for accessing the non-current API Revision.
1706	PrivateURL *string `json:"privateUrl,omitempty"`
1707	// IsOnline - READ-ONLY; Indicates if API revision is the current api revision.
1708	IsOnline *bool `json:"isOnline,omitempty"`
1709	// IsCurrent - READ-ONLY; Indicates if API revision is accessible via the gateway.
1710	IsCurrent *bool `json:"isCurrent,omitempty"`
1711}
1712
1713// APIRevisionInfoContract object used to create an API Revision or Version based on an existing API
1714// Revision
1715type APIRevisionInfoContract struct {
1716	// SourceAPIID - Resource identifier of API to be used to create the revision from.
1717	SourceAPIID *string `json:"sourceApiId,omitempty"`
1718	// APIVersionName - Version identifier for the new API Version.
1719	APIVersionName *string `json:"apiVersionName,omitempty"`
1720	// APIRevisionDescription - Description of new API Revision.
1721	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`
1722	// APIVersionSet - Version set details
1723	APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"`
1724}
1725
1726// APITagResourceContractProperties API contract properties for the Tag Resources.
1727type APITagResourceContractProperties struct {
1728	// ID - API identifier in the form /apis/{apiId}.
1729	ID *string `json:"id,omitempty"`
1730	// Name - API name.
1731	Name *string `json:"name,omitempty"`
1732	// ServiceURL - Absolute URL of the backend service implementing this API.
1733	ServiceURL *string `json:"serviceUrl,omitempty"`
1734	// 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.
1735	Path *string `json:"path,omitempty"`
1736	// Protocols - Describes on which protocols the operations in this API can be invoked.
1737	Protocols *[]Protocol `json:"protocols,omitempty"`
1738	// Description - Description of the API. May include HTML formatting tags.
1739	Description *string `json:"description,omitempty"`
1740	// AuthenticationSettings - Collection of authentication settings included into this API.
1741	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`
1742	// SubscriptionKeyParameterNames - Protocols over which API is made available.
1743	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
1744	// APIType - Type of API. Possible values include: 'HTTP', 'Soap'
1745	APIType APIType `json:"type,omitempty"`
1746	// APIRevision - Describes the Revision of the Api. If no value is provided, default revision 1 is created
1747	APIRevision *string `json:"apiRevision,omitempty"`
1748	// APIVersion - Indicates the Version identifier of the API if the API is versioned
1749	APIVersion *string `json:"apiVersion,omitempty"`
1750	// IsCurrent - Indicates if API revision is current api revision.
1751	IsCurrent *bool `json:"isCurrent,omitempty"`
1752	// IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway.
1753	IsOnline *bool `json:"isOnline,omitempty"`
1754	// APIRevisionDescription - Description of the Api Revision.
1755	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`
1756	// APIVersionDescription - Description of the Api Version.
1757	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
1758	// APIVersionSetID - A resource identifier for the related ApiVersionSet.
1759	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
1760	// SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
1761	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
1762}
1763
1764// APIUpdateContract API update contract details.
1765type APIUpdateContract struct {
1766	// APIContractUpdateProperties - Properties of the API entity that can be updated.
1767	*APIContractUpdateProperties `json:"properties,omitempty"`
1768}
1769
1770// MarshalJSON is the custom marshaler for APIUpdateContract.
1771func (auc APIUpdateContract) MarshalJSON() ([]byte, error) {
1772	objectMap := make(map[string]interface{})
1773	if auc.APIContractUpdateProperties != nil {
1774		objectMap["properties"] = auc.APIContractUpdateProperties
1775	}
1776	return json.Marshal(objectMap)
1777}
1778
1779// UnmarshalJSON is the custom unmarshaler for APIUpdateContract struct.
1780func (auc *APIUpdateContract) UnmarshalJSON(body []byte) error {
1781	var m map[string]*json.RawMessage
1782	err := json.Unmarshal(body, &m)
1783	if err != nil {
1784		return err
1785	}
1786	for k, v := range m {
1787		switch k {
1788		case "properties":
1789			if v != nil {
1790				var APIContractUpdateProperties APIContractUpdateProperties
1791				err = json.Unmarshal(*v, &APIContractUpdateProperties)
1792				if err != nil {
1793					return err
1794				}
1795				auc.APIContractUpdateProperties = &APIContractUpdateProperties
1796			}
1797		}
1798	}
1799
1800	return nil
1801}
1802
1803// APIVersionSetCollection paged Api Version Set list representation.
1804type APIVersionSetCollection struct {
1805	autorest.Response `json:"-"`
1806	// Value - Page values.
1807	Value *[]APIVersionSetContract `json:"value,omitempty"`
1808	// NextLink - Next page link if any.
1809	NextLink *string `json:"nextLink,omitempty"`
1810}
1811
1812// APIVersionSetCollectionIterator provides access to a complete listing of APIVersionSetContract values.
1813type APIVersionSetCollectionIterator struct {
1814	i    int
1815	page APIVersionSetCollectionPage
1816}
1817
1818// NextWithContext advances to the next value.  If there was an error making
1819// the request the iterator does not advance and the error is returned.
1820func (iter *APIVersionSetCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1821	if tracing.IsEnabled() {
1822		ctx = tracing.StartSpan(ctx, fqdn+"/APIVersionSetCollectionIterator.NextWithContext")
1823		defer func() {
1824			sc := -1
1825			if iter.Response().Response.Response != nil {
1826				sc = iter.Response().Response.Response.StatusCode
1827			}
1828			tracing.EndSpan(ctx, sc, err)
1829		}()
1830	}
1831	iter.i++
1832	if iter.i < len(iter.page.Values()) {
1833		return nil
1834	}
1835	err = iter.page.NextWithContext(ctx)
1836	if err != nil {
1837		iter.i--
1838		return err
1839	}
1840	iter.i = 0
1841	return nil
1842}
1843
1844// Next advances to the next value.  If there was an error making
1845// the request the iterator does not advance and the error is returned.
1846// Deprecated: Use NextWithContext() instead.
1847func (iter *APIVersionSetCollectionIterator) Next() error {
1848	return iter.NextWithContext(context.Background())
1849}
1850
1851// NotDone returns true if the enumeration should be started or is not yet complete.
1852func (iter APIVersionSetCollectionIterator) NotDone() bool {
1853	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1854}
1855
1856// Response returns the raw server response from the last page request.
1857func (iter APIVersionSetCollectionIterator) Response() APIVersionSetCollection {
1858	return iter.page.Response()
1859}
1860
1861// Value returns the current value or a zero-initialized value if the
1862// iterator has advanced beyond the end of the collection.
1863func (iter APIVersionSetCollectionIterator) Value() APIVersionSetContract {
1864	if !iter.page.NotDone() {
1865		return APIVersionSetContract{}
1866	}
1867	return iter.page.Values()[iter.i]
1868}
1869
1870// Creates a new instance of the APIVersionSetCollectionIterator type.
1871func NewAPIVersionSetCollectionIterator(page APIVersionSetCollectionPage) APIVersionSetCollectionIterator {
1872	return APIVersionSetCollectionIterator{page: page}
1873}
1874
1875// IsEmpty returns true if the ListResult contains no values.
1876func (avsc APIVersionSetCollection) IsEmpty() bool {
1877	return avsc.Value == nil || len(*avsc.Value) == 0
1878}
1879
1880// aPIVersionSetCollectionPreparer prepares a request to retrieve the next set of results.
1881// It returns nil if no more results exist.
1882func (avsc APIVersionSetCollection) aPIVersionSetCollectionPreparer(ctx context.Context) (*http.Request, error) {
1883	if avsc.NextLink == nil || len(to.String(avsc.NextLink)) < 1 {
1884		return nil, nil
1885	}
1886	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1887		autorest.AsJSON(),
1888		autorest.AsGet(),
1889		autorest.WithBaseURL(to.String(avsc.NextLink)))
1890}
1891
1892// APIVersionSetCollectionPage contains a page of APIVersionSetContract values.
1893type APIVersionSetCollectionPage struct {
1894	fn   func(context.Context, APIVersionSetCollection) (APIVersionSetCollection, error)
1895	avsc APIVersionSetCollection
1896}
1897
1898// NextWithContext advances to the next page of values.  If there was an error making
1899// the request the page does not advance and the error is returned.
1900func (page *APIVersionSetCollectionPage) NextWithContext(ctx context.Context) (err error) {
1901	if tracing.IsEnabled() {
1902		ctx = tracing.StartSpan(ctx, fqdn+"/APIVersionSetCollectionPage.NextWithContext")
1903		defer func() {
1904			sc := -1
1905			if page.Response().Response.Response != nil {
1906				sc = page.Response().Response.Response.StatusCode
1907			}
1908			tracing.EndSpan(ctx, sc, err)
1909		}()
1910	}
1911	next, err := page.fn(ctx, page.avsc)
1912	if err != nil {
1913		return err
1914	}
1915	page.avsc = next
1916	return nil
1917}
1918
1919// Next advances to the next page of values.  If there was an error making
1920// the request the page does not advance and the error is returned.
1921// Deprecated: Use NextWithContext() instead.
1922func (page *APIVersionSetCollectionPage) Next() error {
1923	return page.NextWithContext(context.Background())
1924}
1925
1926// NotDone returns true if the page enumeration should be started or is not yet complete.
1927func (page APIVersionSetCollectionPage) NotDone() bool {
1928	return !page.avsc.IsEmpty()
1929}
1930
1931// Response returns the raw server response from the last page request.
1932func (page APIVersionSetCollectionPage) Response() APIVersionSetCollection {
1933	return page.avsc
1934}
1935
1936// Values returns the slice of values for the current page or nil if there are no values.
1937func (page APIVersionSetCollectionPage) Values() []APIVersionSetContract {
1938	if page.avsc.IsEmpty() {
1939		return nil
1940	}
1941	return *page.avsc.Value
1942}
1943
1944// Creates a new instance of the APIVersionSetCollectionPage type.
1945func NewAPIVersionSetCollectionPage(getNextPage func(context.Context, APIVersionSetCollection) (APIVersionSetCollection, error)) APIVersionSetCollectionPage {
1946	return APIVersionSetCollectionPage{fn: getNextPage}
1947}
1948
1949// APIVersionSetContract api Version Set Contract details.
1950type APIVersionSetContract struct {
1951	autorest.Response `json:"-"`
1952	// APIVersionSetContractProperties - Api VersionSet contract properties.
1953	*APIVersionSetContractProperties `json:"properties,omitempty"`
1954	// ID - READ-ONLY; Resource ID.
1955	ID *string `json:"id,omitempty"`
1956	// Name - READ-ONLY; Resource name.
1957	Name *string `json:"name,omitempty"`
1958	// Type - READ-ONLY; Resource type for API Management resource.
1959	Type *string `json:"type,omitempty"`
1960}
1961
1962// MarshalJSON is the custom marshaler for APIVersionSetContract.
1963func (avsc APIVersionSetContract) MarshalJSON() ([]byte, error) {
1964	objectMap := make(map[string]interface{})
1965	if avsc.APIVersionSetContractProperties != nil {
1966		objectMap["properties"] = avsc.APIVersionSetContractProperties
1967	}
1968	return json.Marshal(objectMap)
1969}
1970
1971// UnmarshalJSON is the custom unmarshaler for APIVersionSetContract struct.
1972func (avsc *APIVersionSetContract) UnmarshalJSON(body []byte) error {
1973	var m map[string]*json.RawMessage
1974	err := json.Unmarshal(body, &m)
1975	if err != nil {
1976		return err
1977	}
1978	for k, v := range m {
1979		switch k {
1980		case "properties":
1981			if v != nil {
1982				var APIVersionSetContractProperties APIVersionSetContractProperties
1983				err = json.Unmarshal(*v, &APIVersionSetContractProperties)
1984				if err != nil {
1985					return err
1986				}
1987				avsc.APIVersionSetContractProperties = &APIVersionSetContractProperties
1988			}
1989		case "id":
1990			if v != nil {
1991				var ID string
1992				err = json.Unmarshal(*v, &ID)
1993				if err != nil {
1994					return err
1995				}
1996				avsc.ID = &ID
1997			}
1998		case "name":
1999			if v != nil {
2000				var name string
2001				err = json.Unmarshal(*v, &name)
2002				if err != nil {
2003					return err
2004				}
2005				avsc.Name = &name
2006			}
2007		case "type":
2008			if v != nil {
2009				var typeVar string
2010				err = json.Unmarshal(*v, &typeVar)
2011				if err != nil {
2012					return err
2013				}
2014				avsc.Type = &typeVar
2015			}
2016		}
2017	}
2018
2019	return nil
2020}
2021
2022// APIVersionSetContractDetails an API Version Set contains the common configuration for a set of API
2023// Versions relating
2024type APIVersionSetContractDetails struct {
2025	// ID - Identifier for existing API Version Set. Omit this value to create a new Version Set.
2026	ID *string `json:"id,omitempty"`
2027	// Name - The display Name of the API Version Set.
2028	Name *string `json:"name,omitempty"`
2029	// Description - Description of API Version Set.
2030	Description *string `json:"description,omitempty"`
2031	// VersioningScheme - An value that determines where the API Version identifer will be located in a HTTP request. Possible values include: 'VersioningScheme1Segment', 'VersioningScheme1Query', 'VersioningScheme1Header'
2032	VersioningScheme VersioningScheme1 `json:"versioningScheme,omitempty"`
2033	// VersionQueryName - Name of query parameter that indicates the API Version if versioningScheme is set to `query`.
2034	VersionQueryName *string `json:"versionQueryName,omitempty"`
2035	// VersionHeaderName - Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.
2036	VersionHeaderName *string `json:"versionHeaderName,omitempty"`
2037}
2038
2039// APIVersionSetContractProperties properties of an API Version Set.
2040type APIVersionSetContractProperties struct {
2041	// DisplayName - Name of API Version Set
2042	DisplayName *string `json:"displayName,omitempty"`
2043	// VersioningScheme - An value that determines where the API Version identifer will be located in a HTTP request. Possible values include: 'VersioningSchemeSegment', 'VersioningSchemeQuery', 'VersioningSchemeHeader'
2044	VersioningScheme VersioningScheme `json:"versioningScheme,omitempty"`
2045	// Description - Description of API Version Set.
2046	Description *string `json:"description,omitempty"`
2047	// VersionQueryName - Name of query parameter that indicates the API Version if versioningScheme is set to `query`.
2048	VersionQueryName *string `json:"versionQueryName,omitempty"`
2049	// VersionHeaderName - Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.
2050	VersionHeaderName *string `json:"versionHeaderName,omitempty"`
2051}
2052
2053// APIVersionSetEntityBase api Version set base parameters
2054type APIVersionSetEntityBase struct {
2055	// Description - Description of API Version Set.
2056	Description *string `json:"description,omitempty"`
2057	// VersionQueryName - Name of query parameter that indicates the API Version if versioningScheme is set to `query`.
2058	VersionQueryName *string `json:"versionQueryName,omitempty"`
2059	// VersionHeaderName - Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.
2060	VersionHeaderName *string `json:"versionHeaderName,omitempty"`
2061}
2062
2063// APIVersionSetUpdateParameters parameters to update or create an Api Version Set Contract.
2064type APIVersionSetUpdateParameters struct {
2065	// APIVersionSetUpdateParametersProperties - Parameters to update or create an Api Version Set Contract.
2066	*APIVersionSetUpdateParametersProperties `json:"properties,omitempty"`
2067}
2068
2069// MarshalJSON is the custom marshaler for APIVersionSetUpdateParameters.
2070func (avsup APIVersionSetUpdateParameters) MarshalJSON() ([]byte, error) {
2071	objectMap := make(map[string]interface{})
2072	if avsup.APIVersionSetUpdateParametersProperties != nil {
2073		objectMap["properties"] = avsup.APIVersionSetUpdateParametersProperties
2074	}
2075	return json.Marshal(objectMap)
2076}
2077
2078// UnmarshalJSON is the custom unmarshaler for APIVersionSetUpdateParameters struct.
2079func (avsup *APIVersionSetUpdateParameters) UnmarshalJSON(body []byte) error {
2080	var m map[string]*json.RawMessage
2081	err := json.Unmarshal(body, &m)
2082	if err != nil {
2083		return err
2084	}
2085	for k, v := range m {
2086		switch k {
2087		case "properties":
2088			if v != nil {
2089				var APIVersionSetUpdateParametersProperties APIVersionSetUpdateParametersProperties
2090				err = json.Unmarshal(*v, &APIVersionSetUpdateParametersProperties)
2091				if err != nil {
2092					return err
2093				}
2094				avsup.APIVersionSetUpdateParametersProperties = &APIVersionSetUpdateParametersProperties
2095			}
2096		}
2097	}
2098
2099	return nil
2100}
2101
2102// APIVersionSetUpdateParametersProperties properties used to create or update an API Version Set.
2103type APIVersionSetUpdateParametersProperties struct {
2104	// DisplayName - Name of API Version Set
2105	DisplayName *string `json:"displayName,omitempty"`
2106	// VersioningScheme - An value that determines where the API Version identifer will be located in a HTTP request. Possible values include: 'VersioningSchemeSegment', 'VersioningSchemeQuery', 'VersioningSchemeHeader'
2107	VersioningScheme VersioningScheme `json:"versioningScheme,omitempty"`
2108	// Description - Description of API Version Set.
2109	Description *string `json:"description,omitempty"`
2110	// VersionQueryName - Name of query parameter that indicates the API Version if versioningScheme is set to `query`.
2111	VersionQueryName *string `json:"versionQueryName,omitempty"`
2112	// VersionHeaderName - Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.
2113	VersionHeaderName *string `json:"versionHeaderName,omitempty"`
2114}
2115
2116// AuthenticationSettingsContract API Authentication Settings.
2117type AuthenticationSettingsContract struct {
2118	// OAuth2 - OAuth2 Authentication settings
2119	OAuth2 *OAuth2AuthenticationSettingsContract `json:"oAuth2,omitempty"`
2120	// Openid - OpenID Connect Authentication Settings
2121	Openid *OpenIDAuthenticationSettingsContract `json:"openid,omitempty"`
2122	// SubscriptionKeyRequired - Specifies whether subscription key is required during call to this API, true - API is included into closed products only, false - API is included into open products alone, null - there is a mix of products.
2123	SubscriptionKeyRequired *bool `json:"subscriptionKeyRequired,omitempty"`
2124}
2125
2126// AuthorizationServerCollection paged OAuth2 Authorization Servers list representation.
2127type AuthorizationServerCollection struct {
2128	autorest.Response `json:"-"`
2129	// Value - Page values.
2130	Value *[]AuthorizationServerContract `json:"value,omitempty"`
2131	// Count - Total record count number across all pages.
2132	Count *int64 `json:"count,omitempty"`
2133	// NextLink - Next page link if any.
2134	NextLink *string `json:"nextLink,omitempty"`
2135}
2136
2137// AuthorizationServerCollectionIterator provides access to a complete listing of
2138// AuthorizationServerContract values.
2139type AuthorizationServerCollectionIterator struct {
2140	i    int
2141	page AuthorizationServerCollectionPage
2142}
2143
2144// NextWithContext advances to the next value.  If there was an error making
2145// the request the iterator does not advance and the error is returned.
2146func (iter *AuthorizationServerCollectionIterator) NextWithContext(ctx context.Context) (err error) {
2147	if tracing.IsEnabled() {
2148		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerCollectionIterator.NextWithContext")
2149		defer func() {
2150			sc := -1
2151			if iter.Response().Response.Response != nil {
2152				sc = iter.Response().Response.Response.StatusCode
2153			}
2154			tracing.EndSpan(ctx, sc, err)
2155		}()
2156	}
2157	iter.i++
2158	if iter.i < len(iter.page.Values()) {
2159		return nil
2160	}
2161	err = iter.page.NextWithContext(ctx)
2162	if err != nil {
2163		iter.i--
2164		return err
2165	}
2166	iter.i = 0
2167	return nil
2168}
2169
2170// Next advances to the next value.  If there was an error making
2171// the request the iterator does not advance and the error is returned.
2172// Deprecated: Use NextWithContext() instead.
2173func (iter *AuthorizationServerCollectionIterator) Next() error {
2174	return iter.NextWithContext(context.Background())
2175}
2176
2177// NotDone returns true if the enumeration should be started or is not yet complete.
2178func (iter AuthorizationServerCollectionIterator) NotDone() bool {
2179	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2180}
2181
2182// Response returns the raw server response from the last page request.
2183func (iter AuthorizationServerCollectionIterator) Response() AuthorizationServerCollection {
2184	return iter.page.Response()
2185}
2186
2187// Value returns the current value or a zero-initialized value if the
2188// iterator has advanced beyond the end of the collection.
2189func (iter AuthorizationServerCollectionIterator) Value() AuthorizationServerContract {
2190	if !iter.page.NotDone() {
2191		return AuthorizationServerContract{}
2192	}
2193	return iter.page.Values()[iter.i]
2194}
2195
2196// Creates a new instance of the AuthorizationServerCollectionIterator type.
2197func NewAuthorizationServerCollectionIterator(page AuthorizationServerCollectionPage) AuthorizationServerCollectionIterator {
2198	return AuthorizationServerCollectionIterator{page: page}
2199}
2200
2201// IsEmpty returns true if the ListResult contains no values.
2202func (asc AuthorizationServerCollection) IsEmpty() bool {
2203	return asc.Value == nil || len(*asc.Value) == 0
2204}
2205
2206// authorizationServerCollectionPreparer prepares a request to retrieve the next set of results.
2207// It returns nil if no more results exist.
2208func (asc AuthorizationServerCollection) authorizationServerCollectionPreparer(ctx context.Context) (*http.Request, error) {
2209	if asc.NextLink == nil || len(to.String(asc.NextLink)) < 1 {
2210		return nil, nil
2211	}
2212	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2213		autorest.AsJSON(),
2214		autorest.AsGet(),
2215		autorest.WithBaseURL(to.String(asc.NextLink)))
2216}
2217
2218// AuthorizationServerCollectionPage contains a page of AuthorizationServerContract values.
2219type AuthorizationServerCollectionPage struct {
2220	fn  func(context.Context, AuthorizationServerCollection) (AuthorizationServerCollection, error)
2221	asc AuthorizationServerCollection
2222}
2223
2224// NextWithContext advances to the next page of values.  If there was an error making
2225// the request the page does not advance and the error is returned.
2226func (page *AuthorizationServerCollectionPage) NextWithContext(ctx context.Context) (err error) {
2227	if tracing.IsEnabled() {
2228		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerCollectionPage.NextWithContext")
2229		defer func() {
2230			sc := -1
2231			if page.Response().Response.Response != nil {
2232				sc = page.Response().Response.Response.StatusCode
2233			}
2234			tracing.EndSpan(ctx, sc, err)
2235		}()
2236	}
2237	next, err := page.fn(ctx, page.asc)
2238	if err != nil {
2239		return err
2240	}
2241	page.asc = next
2242	return nil
2243}
2244
2245// Next advances to the next page of values.  If there was an error making
2246// the request the page does not advance and the error is returned.
2247// Deprecated: Use NextWithContext() instead.
2248func (page *AuthorizationServerCollectionPage) Next() error {
2249	return page.NextWithContext(context.Background())
2250}
2251
2252// NotDone returns true if the page enumeration should be started or is not yet complete.
2253func (page AuthorizationServerCollectionPage) NotDone() bool {
2254	return !page.asc.IsEmpty()
2255}
2256
2257// Response returns the raw server response from the last page request.
2258func (page AuthorizationServerCollectionPage) Response() AuthorizationServerCollection {
2259	return page.asc
2260}
2261
2262// Values returns the slice of values for the current page or nil if there are no values.
2263func (page AuthorizationServerCollectionPage) Values() []AuthorizationServerContract {
2264	if page.asc.IsEmpty() {
2265		return nil
2266	}
2267	return *page.asc.Value
2268}
2269
2270// Creates a new instance of the AuthorizationServerCollectionPage type.
2271func NewAuthorizationServerCollectionPage(getNextPage func(context.Context, AuthorizationServerCollection) (AuthorizationServerCollection, error)) AuthorizationServerCollectionPage {
2272	return AuthorizationServerCollectionPage{fn: getNextPage}
2273}
2274
2275// AuthorizationServerContract external OAuth authorization server settings.
2276type AuthorizationServerContract struct {
2277	autorest.Response `json:"-"`
2278	// AuthorizationServerContractProperties - Properties of the External OAuth authorization server Contract.
2279	*AuthorizationServerContractProperties `json:"properties,omitempty"`
2280	// ID - READ-ONLY; Resource ID.
2281	ID *string `json:"id,omitempty"`
2282	// Name - READ-ONLY; Resource name.
2283	Name *string `json:"name,omitempty"`
2284	// Type - READ-ONLY; Resource type for API Management resource.
2285	Type *string `json:"type,omitempty"`
2286}
2287
2288// MarshalJSON is the custom marshaler for AuthorizationServerContract.
2289func (asc AuthorizationServerContract) MarshalJSON() ([]byte, error) {
2290	objectMap := make(map[string]interface{})
2291	if asc.AuthorizationServerContractProperties != nil {
2292		objectMap["properties"] = asc.AuthorizationServerContractProperties
2293	}
2294	return json.Marshal(objectMap)
2295}
2296
2297// UnmarshalJSON is the custom unmarshaler for AuthorizationServerContract struct.
2298func (asc *AuthorizationServerContract) UnmarshalJSON(body []byte) error {
2299	var m map[string]*json.RawMessage
2300	err := json.Unmarshal(body, &m)
2301	if err != nil {
2302		return err
2303	}
2304	for k, v := range m {
2305		switch k {
2306		case "properties":
2307			if v != nil {
2308				var authorizationServerContractProperties AuthorizationServerContractProperties
2309				err = json.Unmarshal(*v, &authorizationServerContractProperties)
2310				if err != nil {
2311					return err
2312				}
2313				asc.AuthorizationServerContractProperties = &authorizationServerContractProperties
2314			}
2315		case "id":
2316			if v != nil {
2317				var ID string
2318				err = json.Unmarshal(*v, &ID)
2319				if err != nil {
2320					return err
2321				}
2322				asc.ID = &ID
2323			}
2324		case "name":
2325			if v != nil {
2326				var name string
2327				err = json.Unmarshal(*v, &name)
2328				if err != nil {
2329					return err
2330				}
2331				asc.Name = &name
2332			}
2333		case "type":
2334			if v != nil {
2335				var typeVar string
2336				err = json.Unmarshal(*v, &typeVar)
2337				if err != nil {
2338					return err
2339				}
2340				asc.Type = &typeVar
2341			}
2342		}
2343	}
2344
2345	return nil
2346}
2347
2348// AuthorizationServerContractBaseProperties external OAuth authorization server Update settings contract.
2349type AuthorizationServerContractBaseProperties struct {
2350	// Description - Description of the authorization server. Can contain HTML formatting tags.
2351	Description *string `json:"description,omitempty"`
2352	// AuthorizationMethods - HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
2353	AuthorizationMethods *[]AuthorizationMethod `json:"authorizationMethods,omitempty"`
2354	// 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.
2355	ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"`
2356	// 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"}.
2357	TokenBodyParameters *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"`
2358	// TokenEndpoint - OAuth token endpoint. Contains absolute URI to entity being referenced.
2359	TokenEndpoint *string `json:"tokenEndpoint,omitempty"`
2360	// 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.
2361	SupportState *bool `json:"supportState,omitempty"`
2362	// 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.
2363	DefaultScope *string `json:"defaultScope,omitempty"`
2364	// BearerTokenSendingMethods - Specifies the mechanism by which access token is passed to the API.
2365	BearerTokenSendingMethods *[]BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"`
2366	// ClientSecret - Client or app secret registered with this authorization server.
2367	ClientSecret *string `json:"clientSecret,omitempty"`
2368	// ResourceOwnerUsername - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
2369	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`
2370	// ResourceOwnerPassword - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
2371	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`
2372}
2373
2374// AuthorizationServerContractProperties external OAuth authorization server settings Properties.
2375type AuthorizationServerContractProperties struct {
2376	// DisplayName - User-friendly authorization server name.
2377	DisplayName *string `json:"displayName,omitempty"`
2378	// ClientRegistrationEndpoint - Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
2379	ClientRegistrationEndpoint *string `json:"clientRegistrationEndpoint,omitempty"`
2380	// AuthorizationEndpoint - OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
2381	AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty"`
2382	// GrantTypes - Form of an authorization grant, which the client uses to request the access token.
2383	GrantTypes *[]GrantType `json:"grantTypes,omitempty"`
2384	// ClientID - Client or app id registered with this authorization server.
2385	ClientID *string `json:"clientId,omitempty"`
2386	// Description - Description of the authorization server. Can contain HTML formatting tags.
2387	Description *string `json:"description,omitempty"`
2388	// AuthorizationMethods - HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
2389	AuthorizationMethods *[]AuthorizationMethod `json:"authorizationMethods,omitempty"`
2390	// 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.
2391	ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"`
2392	// 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"}.
2393	TokenBodyParameters *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"`
2394	// TokenEndpoint - OAuth token endpoint. Contains absolute URI to entity being referenced.
2395	TokenEndpoint *string `json:"tokenEndpoint,omitempty"`
2396	// 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.
2397	SupportState *bool `json:"supportState,omitempty"`
2398	// 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.
2399	DefaultScope *string `json:"defaultScope,omitempty"`
2400	// BearerTokenSendingMethods - Specifies the mechanism by which access token is passed to the API.
2401	BearerTokenSendingMethods *[]BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"`
2402	// ClientSecret - Client or app secret registered with this authorization server.
2403	ClientSecret *string `json:"clientSecret,omitempty"`
2404	// ResourceOwnerUsername - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
2405	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`
2406	// ResourceOwnerPassword - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
2407	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`
2408}
2409
2410// AuthorizationServerUpdateContract external OAuth authorization server settings.
2411type AuthorizationServerUpdateContract struct {
2412	// AuthorizationServerUpdateContractProperties - Properties of the External OAuth authorization server update Contract.
2413	*AuthorizationServerUpdateContractProperties `json:"properties,omitempty"`
2414	// ID - READ-ONLY; Resource ID.
2415	ID *string `json:"id,omitempty"`
2416	// Name - READ-ONLY; Resource name.
2417	Name *string `json:"name,omitempty"`
2418	// Type - READ-ONLY; Resource type for API Management resource.
2419	Type *string `json:"type,omitempty"`
2420}
2421
2422// MarshalJSON is the custom marshaler for AuthorizationServerUpdateContract.
2423func (asuc AuthorizationServerUpdateContract) MarshalJSON() ([]byte, error) {
2424	objectMap := make(map[string]interface{})
2425	if asuc.AuthorizationServerUpdateContractProperties != nil {
2426		objectMap["properties"] = asuc.AuthorizationServerUpdateContractProperties
2427	}
2428	return json.Marshal(objectMap)
2429}
2430
2431// UnmarshalJSON is the custom unmarshaler for AuthorizationServerUpdateContract struct.
2432func (asuc *AuthorizationServerUpdateContract) UnmarshalJSON(body []byte) error {
2433	var m map[string]*json.RawMessage
2434	err := json.Unmarshal(body, &m)
2435	if err != nil {
2436		return err
2437	}
2438	for k, v := range m {
2439		switch k {
2440		case "properties":
2441			if v != nil {
2442				var authorizationServerUpdateContractProperties AuthorizationServerUpdateContractProperties
2443				err = json.Unmarshal(*v, &authorizationServerUpdateContractProperties)
2444				if err != nil {
2445					return err
2446				}
2447				asuc.AuthorizationServerUpdateContractProperties = &authorizationServerUpdateContractProperties
2448			}
2449		case "id":
2450			if v != nil {
2451				var ID string
2452				err = json.Unmarshal(*v, &ID)
2453				if err != nil {
2454					return err
2455				}
2456				asuc.ID = &ID
2457			}
2458		case "name":
2459			if v != nil {
2460				var name string
2461				err = json.Unmarshal(*v, &name)
2462				if err != nil {
2463					return err
2464				}
2465				asuc.Name = &name
2466			}
2467		case "type":
2468			if v != nil {
2469				var typeVar string
2470				err = json.Unmarshal(*v, &typeVar)
2471				if err != nil {
2472					return err
2473				}
2474				asuc.Type = &typeVar
2475			}
2476		}
2477	}
2478
2479	return nil
2480}
2481
2482// AuthorizationServerUpdateContractProperties external OAuth authorization server Update settings
2483// contract.
2484type AuthorizationServerUpdateContractProperties struct {
2485	// DisplayName - User-friendly authorization server name.
2486	DisplayName *string `json:"displayName,omitempty"`
2487	// ClientRegistrationEndpoint - Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
2488	ClientRegistrationEndpoint *string `json:"clientRegistrationEndpoint,omitempty"`
2489	// AuthorizationEndpoint - OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
2490	AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty"`
2491	// GrantTypes - Form of an authorization grant, which the client uses to request the access token.
2492	GrantTypes *[]GrantType `json:"grantTypes,omitempty"`
2493	// ClientID - Client or app id registered with this authorization server.
2494	ClientID *string `json:"clientId,omitempty"`
2495	// Description - Description of the authorization server. Can contain HTML formatting tags.
2496	Description *string `json:"description,omitempty"`
2497	// AuthorizationMethods - HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
2498	AuthorizationMethods *[]AuthorizationMethod `json:"authorizationMethods,omitempty"`
2499	// 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.
2500	ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"`
2501	// 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"}.
2502	TokenBodyParameters *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"`
2503	// TokenEndpoint - OAuth token endpoint. Contains absolute URI to entity being referenced.
2504	TokenEndpoint *string `json:"tokenEndpoint,omitempty"`
2505	// 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.
2506	SupportState *bool `json:"supportState,omitempty"`
2507	// 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.
2508	DefaultScope *string `json:"defaultScope,omitempty"`
2509	// BearerTokenSendingMethods - Specifies the mechanism by which access token is passed to the API.
2510	BearerTokenSendingMethods *[]BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"`
2511	// ClientSecret - Client or app secret registered with this authorization server.
2512	ClientSecret *string `json:"clientSecret,omitempty"`
2513	// ResourceOwnerUsername - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
2514	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`
2515	// ResourceOwnerPassword - Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
2516	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`
2517}
2518
2519// BackendAuthorizationHeaderCredentials authorization header information.
2520type BackendAuthorizationHeaderCredentials struct {
2521	// Scheme - Authentication Scheme name.
2522	Scheme *string `json:"scheme,omitempty"`
2523	// Parameter - Authentication Parameter value.
2524	Parameter *string `json:"parameter,omitempty"`
2525}
2526
2527// BackendBaseParameters backend entity base Parameter set.
2528type BackendBaseParameters struct {
2529	// Title - Backend Title.
2530	Title *string `json:"title,omitempty"`
2531	// Description - Backend Description.
2532	Description *string `json:"description,omitempty"`
2533	// 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.
2534	ResourceID *string `json:"resourceId,omitempty"`
2535	// Properties - Backend Properties contract
2536	Properties *BackendProperties `json:"properties,omitempty"`
2537	// Credentials - Backend Credentials Contract Properties
2538	Credentials *BackendCredentialsContract `json:"credentials,omitempty"`
2539	// Proxy - Backend Proxy Contract Properties
2540	Proxy *BackendProxyContract `json:"proxy,omitempty"`
2541	// TLS - Backend TLS Properties
2542	TLS *BackendTLSProperties `json:"tls,omitempty"`
2543}
2544
2545// BackendCollection paged Backend list representation.
2546type BackendCollection struct {
2547	autorest.Response `json:"-"`
2548	// Value - Backend values.
2549	Value *[]BackendContract `json:"value,omitempty"`
2550	// NextLink - Next page link if any.
2551	NextLink *string `json:"nextLink,omitempty"`
2552}
2553
2554// BackendCollectionIterator provides access to a complete listing of BackendContract values.
2555type BackendCollectionIterator struct {
2556	i    int
2557	page BackendCollectionPage
2558}
2559
2560// NextWithContext advances to the next value.  If there was an error making
2561// the request the iterator does not advance and the error is returned.
2562func (iter *BackendCollectionIterator) NextWithContext(ctx context.Context) (err error) {
2563	if tracing.IsEnabled() {
2564		ctx = tracing.StartSpan(ctx, fqdn+"/BackendCollectionIterator.NextWithContext")
2565		defer func() {
2566			sc := -1
2567			if iter.Response().Response.Response != nil {
2568				sc = iter.Response().Response.Response.StatusCode
2569			}
2570			tracing.EndSpan(ctx, sc, err)
2571		}()
2572	}
2573	iter.i++
2574	if iter.i < len(iter.page.Values()) {
2575		return nil
2576	}
2577	err = iter.page.NextWithContext(ctx)
2578	if err != nil {
2579		iter.i--
2580		return err
2581	}
2582	iter.i = 0
2583	return nil
2584}
2585
2586// Next advances to the next value.  If there was an error making
2587// the request the iterator does not advance and the error is returned.
2588// Deprecated: Use NextWithContext() instead.
2589func (iter *BackendCollectionIterator) Next() error {
2590	return iter.NextWithContext(context.Background())
2591}
2592
2593// NotDone returns true if the enumeration should be started or is not yet complete.
2594func (iter BackendCollectionIterator) NotDone() bool {
2595	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2596}
2597
2598// Response returns the raw server response from the last page request.
2599func (iter BackendCollectionIterator) Response() BackendCollection {
2600	return iter.page.Response()
2601}
2602
2603// Value returns the current value or a zero-initialized value if the
2604// iterator has advanced beyond the end of the collection.
2605func (iter BackendCollectionIterator) Value() BackendContract {
2606	if !iter.page.NotDone() {
2607		return BackendContract{}
2608	}
2609	return iter.page.Values()[iter.i]
2610}
2611
2612// Creates a new instance of the BackendCollectionIterator type.
2613func NewBackendCollectionIterator(page BackendCollectionPage) BackendCollectionIterator {
2614	return BackendCollectionIterator{page: page}
2615}
2616
2617// IsEmpty returns true if the ListResult contains no values.
2618func (bc BackendCollection) IsEmpty() bool {
2619	return bc.Value == nil || len(*bc.Value) == 0
2620}
2621
2622// backendCollectionPreparer prepares a request to retrieve the next set of results.
2623// It returns nil if no more results exist.
2624func (bc BackendCollection) backendCollectionPreparer(ctx context.Context) (*http.Request, error) {
2625	if bc.NextLink == nil || len(to.String(bc.NextLink)) < 1 {
2626		return nil, nil
2627	}
2628	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2629		autorest.AsJSON(),
2630		autorest.AsGet(),
2631		autorest.WithBaseURL(to.String(bc.NextLink)))
2632}
2633
2634// BackendCollectionPage contains a page of BackendContract values.
2635type BackendCollectionPage struct {
2636	fn func(context.Context, BackendCollection) (BackendCollection, error)
2637	bc BackendCollection
2638}
2639
2640// NextWithContext advances to the next page of values.  If there was an error making
2641// the request the page does not advance and the error is returned.
2642func (page *BackendCollectionPage) NextWithContext(ctx context.Context) (err error) {
2643	if tracing.IsEnabled() {
2644		ctx = tracing.StartSpan(ctx, fqdn+"/BackendCollectionPage.NextWithContext")
2645		defer func() {
2646			sc := -1
2647			if page.Response().Response.Response != nil {
2648				sc = page.Response().Response.Response.StatusCode
2649			}
2650			tracing.EndSpan(ctx, sc, err)
2651		}()
2652	}
2653	next, err := page.fn(ctx, page.bc)
2654	if err != nil {
2655		return err
2656	}
2657	page.bc = next
2658	return nil
2659}
2660
2661// Next advances to the next page of values.  If there was an error making
2662// the request the page does not advance and the error is returned.
2663// Deprecated: Use NextWithContext() instead.
2664func (page *BackendCollectionPage) Next() error {
2665	return page.NextWithContext(context.Background())
2666}
2667
2668// NotDone returns true if the page enumeration should be started or is not yet complete.
2669func (page BackendCollectionPage) NotDone() bool {
2670	return !page.bc.IsEmpty()
2671}
2672
2673// Response returns the raw server response from the last page request.
2674func (page BackendCollectionPage) Response() BackendCollection {
2675	return page.bc
2676}
2677
2678// Values returns the slice of values for the current page or nil if there are no values.
2679func (page BackendCollectionPage) Values() []BackendContract {
2680	if page.bc.IsEmpty() {
2681		return nil
2682	}
2683	return *page.bc.Value
2684}
2685
2686// Creates a new instance of the BackendCollectionPage type.
2687func NewBackendCollectionPage(getNextPage func(context.Context, BackendCollection) (BackendCollection, error)) BackendCollectionPage {
2688	return BackendCollectionPage{fn: getNextPage}
2689}
2690
2691// BackendContract backend details.
2692type BackendContract struct {
2693	autorest.Response `json:"-"`
2694	// BackendContractProperties - Backend entity contract properties.
2695	*BackendContractProperties `json:"properties,omitempty"`
2696	// ID - READ-ONLY; Resource ID.
2697	ID *string `json:"id,omitempty"`
2698	// Name - READ-ONLY; Resource name.
2699	Name *string `json:"name,omitempty"`
2700	// Type - READ-ONLY; Resource type for API Management resource.
2701	Type *string `json:"type,omitempty"`
2702}
2703
2704// MarshalJSON is the custom marshaler for BackendContract.
2705func (bc BackendContract) MarshalJSON() ([]byte, error) {
2706	objectMap := make(map[string]interface{})
2707	if bc.BackendContractProperties != nil {
2708		objectMap["properties"] = bc.BackendContractProperties
2709	}
2710	return json.Marshal(objectMap)
2711}
2712
2713// UnmarshalJSON is the custom unmarshaler for BackendContract struct.
2714func (bc *BackendContract) UnmarshalJSON(body []byte) error {
2715	var m map[string]*json.RawMessage
2716	err := json.Unmarshal(body, &m)
2717	if err != nil {
2718		return err
2719	}
2720	for k, v := range m {
2721		switch k {
2722		case "properties":
2723			if v != nil {
2724				var backendContractProperties BackendContractProperties
2725				err = json.Unmarshal(*v, &backendContractProperties)
2726				if err != nil {
2727					return err
2728				}
2729				bc.BackendContractProperties = &backendContractProperties
2730			}
2731		case "id":
2732			if v != nil {
2733				var ID string
2734				err = json.Unmarshal(*v, &ID)
2735				if err != nil {
2736					return err
2737				}
2738				bc.ID = &ID
2739			}
2740		case "name":
2741			if v != nil {
2742				var name string
2743				err = json.Unmarshal(*v, &name)
2744				if err != nil {
2745					return err
2746				}
2747				bc.Name = &name
2748			}
2749		case "type":
2750			if v != nil {
2751				var typeVar string
2752				err = json.Unmarshal(*v, &typeVar)
2753				if err != nil {
2754					return err
2755				}
2756				bc.Type = &typeVar
2757			}
2758		}
2759	}
2760
2761	return nil
2762}
2763
2764// BackendContractProperties parameters supplied to the Create Backend operation.
2765type BackendContractProperties struct {
2766	// URL - Runtime Url of the Backend.
2767	URL *string `json:"url,omitempty"`
2768	// Protocol - Backend communication protocol. Possible values include: 'BackendProtocolHTTP', 'BackendProtocolSoap'
2769	Protocol BackendProtocol `json:"protocol,omitempty"`
2770	// Title - Backend Title.
2771	Title *string `json:"title,omitempty"`
2772	// Description - Backend Description.
2773	Description *string `json:"description,omitempty"`
2774	// 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.
2775	ResourceID *string `json:"resourceId,omitempty"`
2776	// Properties - Backend Properties contract
2777	Properties *BackendProperties `json:"properties,omitempty"`
2778	// Credentials - Backend Credentials Contract Properties
2779	Credentials *BackendCredentialsContract `json:"credentials,omitempty"`
2780	// Proxy - Backend Proxy Contract Properties
2781	Proxy *BackendProxyContract `json:"proxy,omitempty"`
2782	// TLS - Backend TLS Properties
2783	TLS *BackendTLSProperties `json:"tls,omitempty"`
2784}
2785
2786// BackendCredentialsContract details of the Credentials used to connect to Backend.
2787type BackendCredentialsContract struct {
2788	// Certificate - List of Client Certificate Thumbprint.
2789	Certificate *[]string `json:"certificate,omitempty"`
2790	// Query - Query Parameter description.
2791	Query map[string][]string `json:"query"`
2792	// Header - Header Parameter description.
2793	Header map[string][]string `json:"header"`
2794	// Authorization - Authorization header authentication
2795	Authorization *BackendAuthorizationHeaderCredentials `json:"authorization,omitempty"`
2796}
2797
2798// MarshalJSON is the custom marshaler for BackendCredentialsContract.
2799func (bcc BackendCredentialsContract) MarshalJSON() ([]byte, error) {
2800	objectMap := make(map[string]interface{})
2801	if bcc.Certificate != nil {
2802		objectMap["certificate"] = bcc.Certificate
2803	}
2804	if bcc.Query != nil {
2805		objectMap["query"] = bcc.Query
2806	}
2807	if bcc.Header != nil {
2808		objectMap["header"] = bcc.Header
2809	}
2810	if bcc.Authorization != nil {
2811		objectMap["authorization"] = bcc.Authorization
2812	}
2813	return json.Marshal(objectMap)
2814}
2815
2816// BackendProperties properties specific to the Backend Type.
2817type BackendProperties struct {
2818	// ServiceFabricCluster - Backend Service Fabric Cluster Properties
2819	ServiceFabricCluster *BackendServiceFabricClusterProperties `json:"serviceFabricCluster,omitempty"`
2820}
2821
2822// BackendProxyContract details of the Backend WebProxy Server to use in the Request to Backend.
2823type BackendProxyContract struct {
2824	// URL - WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings.
2825	URL *string `json:"url,omitempty"`
2826	// Username - Username to connect to the WebProxy server
2827	Username *string `json:"username,omitempty"`
2828	// Password - Password to connect to the WebProxy Server
2829	Password *string `json:"password,omitempty"`
2830}
2831
2832// BackendReconnectContract reconnect request parameters.
2833type BackendReconnectContract struct {
2834	// BackendReconnectProperties - Reconnect request properties.
2835	*BackendReconnectProperties `json:"properties,omitempty"`
2836	// ID - READ-ONLY; Resource ID.
2837	ID *string `json:"id,omitempty"`
2838	// Name - READ-ONLY; Resource name.
2839	Name *string `json:"name,omitempty"`
2840	// Type - READ-ONLY; Resource type for API Management resource.
2841	Type *string `json:"type,omitempty"`
2842}
2843
2844// MarshalJSON is the custom marshaler for BackendReconnectContract.
2845func (brc BackendReconnectContract) MarshalJSON() ([]byte, error) {
2846	objectMap := make(map[string]interface{})
2847	if brc.BackendReconnectProperties != nil {
2848		objectMap["properties"] = brc.BackendReconnectProperties
2849	}
2850	return json.Marshal(objectMap)
2851}
2852
2853// UnmarshalJSON is the custom unmarshaler for BackendReconnectContract struct.
2854func (brc *BackendReconnectContract) UnmarshalJSON(body []byte) error {
2855	var m map[string]*json.RawMessage
2856	err := json.Unmarshal(body, &m)
2857	if err != nil {
2858		return err
2859	}
2860	for k, v := range m {
2861		switch k {
2862		case "properties":
2863			if v != nil {
2864				var backendReconnectProperties BackendReconnectProperties
2865				err = json.Unmarshal(*v, &backendReconnectProperties)
2866				if err != nil {
2867					return err
2868				}
2869				brc.BackendReconnectProperties = &backendReconnectProperties
2870			}
2871		case "id":
2872			if v != nil {
2873				var ID string
2874				err = json.Unmarshal(*v, &ID)
2875				if err != nil {
2876					return err
2877				}
2878				brc.ID = &ID
2879			}
2880		case "name":
2881			if v != nil {
2882				var name string
2883				err = json.Unmarshal(*v, &name)
2884				if err != nil {
2885					return err
2886				}
2887				brc.Name = &name
2888			}
2889		case "type":
2890			if v != nil {
2891				var typeVar string
2892				err = json.Unmarshal(*v, &typeVar)
2893				if err != nil {
2894					return err
2895				}
2896				brc.Type = &typeVar
2897			}
2898		}
2899	}
2900
2901	return nil
2902}
2903
2904// BackendReconnectProperties properties to control reconnect requests.
2905type BackendReconnectProperties struct {
2906	// After - Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M.
2907	After *string `json:"after,omitempty"`
2908}
2909
2910// BackendServiceFabricClusterProperties properties of the Service Fabric Type Backend.
2911type BackendServiceFabricClusterProperties struct {
2912	// ClientCertificatethumbprint - The client certificate thumbprint for the management endpoint.
2913	ClientCertificatethumbprint *string `json:"clientCertificatethumbprint,omitempty"`
2914	// MaxPartitionResolutionRetries - Maximum number of retries while attempting resolve the partition.
2915	MaxPartitionResolutionRetries *int32 `json:"maxPartitionResolutionRetries,omitempty"`
2916	// ManagementEndpoints - The cluster management endpoint.
2917	ManagementEndpoints *[]string `json:"managementEndpoints,omitempty"`
2918	// ServerCertificateThumbprints - Thumbprints of certificates cluster management service uses for tls communication
2919	ServerCertificateThumbprints *[]string `json:"serverCertificateThumbprints,omitempty"`
2920	// ServerX509Names - Server X509 Certificate Names Collection
2921	ServerX509Names *[]X509CertificateName `json:"serverX509Names,omitempty"`
2922}
2923
2924// BackendTLSProperties properties controlling TLS Certificate Validation.
2925type BackendTLSProperties struct {
2926	// ValidateCertificateChain - Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host.
2927	ValidateCertificateChain *bool `json:"validateCertificateChain,omitempty"`
2928	// ValidateCertificateName - Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host.
2929	ValidateCertificateName *bool `json:"validateCertificateName,omitempty"`
2930}
2931
2932// BackendUpdateParameterProperties parameters supplied to the Update Backend operation.
2933type BackendUpdateParameterProperties struct {
2934	// URL - Runtime Url of the Backend.
2935	URL *string `json:"url,omitempty"`
2936	// Protocol - Backend communication protocol. Possible values include: 'BackendProtocolHTTP', 'BackendProtocolSoap'
2937	Protocol BackendProtocol `json:"protocol,omitempty"`
2938	// Title - Backend Title.
2939	Title *string `json:"title,omitempty"`
2940	// Description - Backend Description.
2941	Description *string `json:"description,omitempty"`
2942	// 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.
2943	ResourceID *string `json:"resourceId,omitempty"`
2944	// Properties - Backend Properties contract
2945	Properties *BackendProperties `json:"properties,omitempty"`
2946	// Credentials - Backend Credentials Contract Properties
2947	Credentials *BackendCredentialsContract `json:"credentials,omitempty"`
2948	// Proxy - Backend Proxy Contract Properties
2949	Proxy *BackendProxyContract `json:"proxy,omitempty"`
2950	// TLS - Backend TLS Properties
2951	TLS *BackendTLSProperties `json:"tls,omitempty"`
2952}
2953
2954// BackendUpdateParameters backend update parameters.
2955type BackendUpdateParameters struct {
2956	// BackendUpdateParameterProperties - Backend entity update contract properties.
2957	*BackendUpdateParameterProperties `json:"properties,omitempty"`
2958}
2959
2960// MarshalJSON is the custom marshaler for BackendUpdateParameters.
2961func (bup BackendUpdateParameters) MarshalJSON() ([]byte, error) {
2962	objectMap := make(map[string]interface{})
2963	if bup.BackendUpdateParameterProperties != nil {
2964		objectMap["properties"] = bup.BackendUpdateParameterProperties
2965	}
2966	return json.Marshal(objectMap)
2967}
2968
2969// UnmarshalJSON is the custom unmarshaler for BackendUpdateParameters struct.
2970func (bup *BackendUpdateParameters) UnmarshalJSON(body []byte) error {
2971	var m map[string]*json.RawMessage
2972	err := json.Unmarshal(body, &m)
2973	if err != nil {
2974		return err
2975	}
2976	for k, v := range m {
2977		switch k {
2978		case "properties":
2979			if v != nil {
2980				var backendUpdateParameterProperties BackendUpdateParameterProperties
2981				err = json.Unmarshal(*v, &backendUpdateParameterProperties)
2982				if err != nil {
2983					return err
2984				}
2985				bup.BackendUpdateParameterProperties = &backendUpdateParameterProperties
2986			}
2987		}
2988	}
2989
2990	return nil
2991}
2992
2993// BodyDiagnosticSettings body logging settings.
2994type BodyDiagnosticSettings struct {
2995	// Bytes - Number of request body bytes to log.
2996	Bytes *int32 `json:"bytes,omitempty"`
2997}
2998
2999// CacheCollection paged Caches list representation.
3000type CacheCollection struct {
3001	autorest.Response `json:"-"`
3002	// Value - Page values.
3003	Value *[]CacheContract `json:"value,omitempty"`
3004	// NextLink - Next page link if any.
3005	NextLink *string `json:"nextLink,omitempty"`
3006}
3007
3008// CacheCollectionIterator provides access to a complete listing of CacheContract values.
3009type CacheCollectionIterator struct {
3010	i    int
3011	page CacheCollectionPage
3012}
3013
3014// NextWithContext advances to the next value.  If there was an error making
3015// the request the iterator does not advance and the error is returned.
3016func (iter *CacheCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3017	if tracing.IsEnabled() {
3018		ctx = tracing.StartSpan(ctx, fqdn+"/CacheCollectionIterator.NextWithContext")
3019		defer func() {
3020			sc := -1
3021			if iter.Response().Response.Response != nil {
3022				sc = iter.Response().Response.Response.StatusCode
3023			}
3024			tracing.EndSpan(ctx, sc, err)
3025		}()
3026	}
3027	iter.i++
3028	if iter.i < len(iter.page.Values()) {
3029		return nil
3030	}
3031	err = iter.page.NextWithContext(ctx)
3032	if err != nil {
3033		iter.i--
3034		return err
3035	}
3036	iter.i = 0
3037	return nil
3038}
3039
3040// Next advances to the next value.  If there was an error making
3041// the request the iterator does not advance and the error is returned.
3042// Deprecated: Use NextWithContext() instead.
3043func (iter *CacheCollectionIterator) Next() error {
3044	return iter.NextWithContext(context.Background())
3045}
3046
3047// NotDone returns true if the enumeration should be started or is not yet complete.
3048func (iter CacheCollectionIterator) NotDone() bool {
3049	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3050}
3051
3052// Response returns the raw server response from the last page request.
3053func (iter CacheCollectionIterator) Response() CacheCollection {
3054	return iter.page.Response()
3055}
3056
3057// Value returns the current value or a zero-initialized value if the
3058// iterator has advanced beyond the end of the collection.
3059func (iter CacheCollectionIterator) Value() CacheContract {
3060	if !iter.page.NotDone() {
3061		return CacheContract{}
3062	}
3063	return iter.page.Values()[iter.i]
3064}
3065
3066// Creates a new instance of the CacheCollectionIterator type.
3067func NewCacheCollectionIterator(page CacheCollectionPage) CacheCollectionIterator {
3068	return CacheCollectionIterator{page: page}
3069}
3070
3071// IsEmpty returns true if the ListResult contains no values.
3072func (cc CacheCollection) IsEmpty() bool {
3073	return cc.Value == nil || len(*cc.Value) == 0
3074}
3075
3076// cacheCollectionPreparer prepares a request to retrieve the next set of results.
3077// It returns nil if no more results exist.
3078func (cc CacheCollection) cacheCollectionPreparer(ctx context.Context) (*http.Request, error) {
3079	if cc.NextLink == nil || len(to.String(cc.NextLink)) < 1 {
3080		return nil, nil
3081	}
3082	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3083		autorest.AsJSON(),
3084		autorest.AsGet(),
3085		autorest.WithBaseURL(to.String(cc.NextLink)))
3086}
3087
3088// CacheCollectionPage contains a page of CacheContract values.
3089type CacheCollectionPage struct {
3090	fn func(context.Context, CacheCollection) (CacheCollection, error)
3091	cc CacheCollection
3092}
3093
3094// NextWithContext advances to the next page of values.  If there was an error making
3095// the request the page does not advance and the error is returned.
3096func (page *CacheCollectionPage) NextWithContext(ctx context.Context) (err error) {
3097	if tracing.IsEnabled() {
3098		ctx = tracing.StartSpan(ctx, fqdn+"/CacheCollectionPage.NextWithContext")
3099		defer func() {
3100			sc := -1
3101			if page.Response().Response.Response != nil {
3102				sc = page.Response().Response.Response.StatusCode
3103			}
3104			tracing.EndSpan(ctx, sc, err)
3105		}()
3106	}
3107	next, err := page.fn(ctx, page.cc)
3108	if err != nil {
3109		return err
3110	}
3111	page.cc = next
3112	return nil
3113}
3114
3115// Next advances to the next page of values.  If there was an error making
3116// the request the page does not advance and the error is returned.
3117// Deprecated: Use NextWithContext() instead.
3118func (page *CacheCollectionPage) Next() error {
3119	return page.NextWithContext(context.Background())
3120}
3121
3122// NotDone returns true if the page enumeration should be started or is not yet complete.
3123func (page CacheCollectionPage) NotDone() bool {
3124	return !page.cc.IsEmpty()
3125}
3126
3127// Response returns the raw server response from the last page request.
3128func (page CacheCollectionPage) Response() CacheCollection {
3129	return page.cc
3130}
3131
3132// Values returns the slice of values for the current page or nil if there are no values.
3133func (page CacheCollectionPage) Values() []CacheContract {
3134	if page.cc.IsEmpty() {
3135		return nil
3136	}
3137	return *page.cc.Value
3138}
3139
3140// Creates a new instance of the CacheCollectionPage type.
3141func NewCacheCollectionPage(getNextPage func(context.Context, CacheCollection) (CacheCollection, error)) CacheCollectionPage {
3142	return CacheCollectionPage{fn: getNextPage}
3143}
3144
3145// CacheContract cache details.
3146type CacheContract struct {
3147	autorest.Response `json:"-"`
3148	// CacheContractProperties - Cache properties details.
3149	*CacheContractProperties `json:"properties,omitempty"`
3150	// ID - READ-ONLY; Resource ID.
3151	ID *string `json:"id,omitempty"`
3152	// Name - READ-ONLY; Resource name.
3153	Name *string `json:"name,omitempty"`
3154	// Type - READ-ONLY; Resource type for API Management resource.
3155	Type *string `json:"type,omitempty"`
3156}
3157
3158// MarshalJSON is the custom marshaler for CacheContract.
3159func (cc CacheContract) MarshalJSON() ([]byte, error) {
3160	objectMap := make(map[string]interface{})
3161	if cc.CacheContractProperties != nil {
3162		objectMap["properties"] = cc.CacheContractProperties
3163	}
3164	return json.Marshal(objectMap)
3165}
3166
3167// UnmarshalJSON is the custom unmarshaler for CacheContract struct.
3168func (cc *CacheContract) UnmarshalJSON(body []byte) error {
3169	var m map[string]*json.RawMessage
3170	err := json.Unmarshal(body, &m)
3171	if err != nil {
3172		return err
3173	}
3174	for k, v := range m {
3175		switch k {
3176		case "properties":
3177			if v != nil {
3178				var cacheContractProperties CacheContractProperties
3179				err = json.Unmarshal(*v, &cacheContractProperties)
3180				if err != nil {
3181					return err
3182				}
3183				cc.CacheContractProperties = &cacheContractProperties
3184			}
3185		case "id":
3186			if v != nil {
3187				var ID string
3188				err = json.Unmarshal(*v, &ID)
3189				if err != nil {
3190					return err
3191				}
3192				cc.ID = &ID
3193			}
3194		case "name":
3195			if v != nil {
3196				var name string
3197				err = json.Unmarshal(*v, &name)
3198				if err != nil {
3199					return err
3200				}
3201				cc.Name = &name
3202			}
3203		case "type":
3204			if v != nil {
3205				var typeVar string
3206				err = json.Unmarshal(*v, &typeVar)
3207				if err != nil {
3208					return err
3209				}
3210				cc.Type = &typeVar
3211			}
3212		}
3213	}
3214
3215	return nil
3216}
3217
3218// CacheContractProperties properties of the Cache contract.
3219type CacheContractProperties struct {
3220	// Description - Cache description
3221	Description *string `json:"description,omitempty"`
3222	// ConnectionString - Runtime connection string to cache
3223	ConnectionString *string `json:"connectionString,omitempty"`
3224	// ResourceID - Original uri of entity in external system cache points to
3225	ResourceID *string `json:"resourceId,omitempty"`
3226}
3227
3228// CacheUpdateParameters cache update details.
3229type CacheUpdateParameters struct {
3230	// CacheUpdateProperties - Cache update properties details.
3231	*CacheUpdateProperties `json:"properties,omitempty"`
3232}
3233
3234// MarshalJSON is the custom marshaler for CacheUpdateParameters.
3235func (cup CacheUpdateParameters) MarshalJSON() ([]byte, error) {
3236	objectMap := make(map[string]interface{})
3237	if cup.CacheUpdateProperties != nil {
3238		objectMap["properties"] = cup.CacheUpdateProperties
3239	}
3240	return json.Marshal(objectMap)
3241}
3242
3243// UnmarshalJSON is the custom unmarshaler for CacheUpdateParameters struct.
3244func (cup *CacheUpdateParameters) UnmarshalJSON(body []byte) error {
3245	var m map[string]*json.RawMessage
3246	err := json.Unmarshal(body, &m)
3247	if err != nil {
3248		return err
3249	}
3250	for k, v := range m {
3251		switch k {
3252		case "properties":
3253			if v != nil {
3254				var cacheUpdateProperties CacheUpdateProperties
3255				err = json.Unmarshal(*v, &cacheUpdateProperties)
3256				if err != nil {
3257					return err
3258				}
3259				cup.CacheUpdateProperties = &cacheUpdateProperties
3260			}
3261		}
3262	}
3263
3264	return nil
3265}
3266
3267// CacheUpdateProperties parameters supplied to the Update Cache operation.
3268type CacheUpdateProperties struct {
3269	// Description - Cache description
3270	Description *string `json:"description,omitempty"`
3271	// ConnectionString - Runtime connection string to cache
3272	ConnectionString *string `json:"connectionString,omitempty"`
3273	// ResourceID - Original uri of entity in external system cache points to
3274	ResourceID *string `json:"resourceId,omitempty"`
3275}
3276
3277// CertificateCollection paged Certificates list representation.
3278type CertificateCollection struct {
3279	autorest.Response `json:"-"`
3280	// Value - Page values.
3281	Value *[]CertificateContract `json:"value,omitempty"`
3282	// NextLink - Next page link if any.
3283	NextLink *string `json:"nextLink,omitempty"`
3284}
3285
3286// CertificateCollectionIterator provides access to a complete listing of CertificateContract values.
3287type CertificateCollectionIterator struct {
3288	i    int
3289	page CertificateCollectionPage
3290}
3291
3292// NextWithContext advances to the next value.  If there was an error making
3293// the request the iterator does not advance and the error is returned.
3294func (iter *CertificateCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3295	if tracing.IsEnabled() {
3296		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionIterator.NextWithContext")
3297		defer func() {
3298			sc := -1
3299			if iter.Response().Response.Response != nil {
3300				sc = iter.Response().Response.Response.StatusCode
3301			}
3302			tracing.EndSpan(ctx, sc, err)
3303		}()
3304	}
3305	iter.i++
3306	if iter.i < len(iter.page.Values()) {
3307		return nil
3308	}
3309	err = iter.page.NextWithContext(ctx)
3310	if err != nil {
3311		iter.i--
3312		return err
3313	}
3314	iter.i = 0
3315	return nil
3316}
3317
3318// Next advances to the next value.  If there was an error making
3319// the request the iterator does not advance and the error is returned.
3320// Deprecated: Use NextWithContext() instead.
3321func (iter *CertificateCollectionIterator) Next() error {
3322	return iter.NextWithContext(context.Background())
3323}
3324
3325// NotDone returns true if the enumeration should be started or is not yet complete.
3326func (iter CertificateCollectionIterator) NotDone() bool {
3327	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3328}
3329
3330// Response returns the raw server response from the last page request.
3331func (iter CertificateCollectionIterator) Response() CertificateCollection {
3332	return iter.page.Response()
3333}
3334
3335// Value returns the current value or a zero-initialized value if the
3336// iterator has advanced beyond the end of the collection.
3337func (iter CertificateCollectionIterator) Value() CertificateContract {
3338	if !iter.page.NotDone() {
3339		return CertificateContract{}
3340	}
3341	return iter.page.Values()[iter.i]
3342}
3343
3344// Creates a new instance of the CertificateCollectionIterator type.
3345func NewCertificateCollectionIterator(page CertificateCollectionPage) CertificateCollectionIterator {
3346	return CertificateCollectionIterator{page: page}
3347}
3348
3349// IsEmpty returns true if the ListResult contains no values.
3350func (cc CertificateCollection) IsEmpty() bool {
3351	return cc.Value == nil || len(*cc.Value) == 0
3352}
3353
3354// certificateCollectionPreparer prepares a request to retrieve the next set of results.
3355// It returns nil if no more results exist.
3356func (cc CertificateCollection) certificateCollectionPreparer(ctx context.Context) (*http.Request, error) {
3357	if cc.NextLink == nil || len(to.String(cc.NextLink)) < 1 {
3358		return nil, nil
3359	}
3360	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3361		autorest.AsJSON(),
3362		autorest.AsGet(),
3363		autorest.WithBaseURL(to.String(cc.NextLink)))
3364}
3365
3366// CertificateCollectionPage contains a page of CertificateContract values.
3367type CertificateCollectionPage struct {
3368	fn func(context.Context, CertificateCollection) (CertificateCollection, error)
3369	cc CertificateCollection
3370}
3371
3372// NextWithContext advances to the next page of values.  If there was an error making
3373// the request the page does not advance and the error is returned.
3374func (page *CertificateCollectionPage) NextWithContext(ctx context.Context) (err error) {
3375	if tracing.IsEnabled() {
3376		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionPage.NextWithContext")
3377		defer func() {
3378			sc := -1
3379			if page.Response().Response.Response != nil {
3380				sc = page.Response().Response.Response.StatusCode
3381			}
3382			tracing.EndSpan(ctx, sc, err)
3383		}()
3384	}
3385	next, err := page.fn(ctx, page.cc)
3386	if err != nil {
3387		return err
3388	}
3389	page.cc = next
3390	return nil
3391}
3392
3393// Next advances to the next page of values.  If there was an error making
3394// the request the page does not advance and the error is returned.
3395// Deprecated: Use NextWithContext() instead.
3396func (page *CertificateCollectionPage) Next() error {
3397	return page.NextWithContext(context.Background())
3398}
3399
3400// NotDone returns true if the page enumeration should be started or is not yet complete.
3401func (page CertificateCollectionPage) NotDone() bool {
3402	return !page.cc.IsEmpty()
3403}
3404
3405// Response returns the raw server response from the last page request.
3406func (page CertificateCollectionPage) Response() CertificateCollection {
3407	return page.cc
3408}
3409
3410// Values returns the slice of values for the current page or nil if there are no values.
3411func (page CertificateCollectionPage) Values() []CertificateContract {
3412	if page.cc.IsEmpty() {
3413		return nil
3414	}
3415	return *page.cc.Value
3416}
3417
3418// Creates a new instance of the CertificateCollectionPage type.
3419func NewCertificateCollectionPage(getNextPage func(context.Context, CertificateCollection) (CertificateCollection, error)) CertificateCollectionPage {
3420	return CertificateCollectionPage{fn: getNextPage}
3421}
3422
3423// CertificateConfiguration certificate configuration which consist of non-trusted intermediates and root
3424// certificates.
3425type CertificateConfiguration struct {
3426	// EncodedCertificate - Base64 Encoded certificate.
3427	EncodedCertificate *string `json:"encodedCertificate,omitempty"`
3428	// CertificatePassword - Certificate Password.
3429	CertificatePassword *string `json:"certificatePassword,omitempty"`
3430	// StoreName - The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. Possible values include: 'CertificateAuthority', 'Root'
3431	StoreName StoreName `json:"storeName,omitempty"`
3432	// Certificate - Certificate information.
3433	Certificate *CertificateInformation `json:"certificate,omitempty"`
3434}
3435
3436// CertificateContract certificate details.
3437type CertificateContract struct {
3438	autorest.Response `json:"-"`
3439	// CertificateContractProperties - Certificate properties details.
3440	*CertificateContractProperties `json:"properties,omitempty"`
3441	// ID - READ-ONLY; Resource ID.
3442	ID *string `json:"id,omitempty"`
3443	// Name - READ-ONLY; Resource name.
3444	Name *string `json:"name,omitempty"`
3445	// Type - READ-ONLY; Resource type for API Management resource.
3446	Type *string `json:"type,omitempty"`
3447}
3448
3449// MarshalJSON is the custom marshaler for CertificateContract.
3450func (cc CertificateContract) MarshalJSON() ([]byte, error) {
3451	objectMap := make(map[string]interface{})
3452	if cc.CertificateContractProperties != nil {
3453		objectMap["properties"] = cc.CertificateContractProperties
3454	}
3455	return json.Marshal(objectMap)
3456}
3457
3458// UnmarshalJSON is the custom unmarshaler for CertificateContract struct.
3459func (cc *CertificateContract) UnmarshalJSON(body []byte) error {
3460	var m map[string]*json.RawMessage
3461	err := json.Unmarshal(body, &m)
3462	if err != nil {
3463		return err
3464	}
3465	for k, v := range m {
3466		switch k {
3467		case "properties":
3468			if v != nil {
3469				var certificateContractProperties CertificateContractProperties
3470				err = json.Unmarshal(*v, &certificateContractProperties)
3471				if err != nil {
3472					return err
3473				}
3474				cc.CertificateContractProperties = &certificateContractProperties
3475			}
3476		case "id":
3477			if v != nil {
3478				var ID string
3479				err = json.Unmarshal(*v, &ID)
3480				if err != nil {
3481					return err
3482				}
3483				cc.ID = &ID
3484			}
3485		case "name":
3486			if v != nil {
3487				var name string
3488				err = json.Unmarshal(*v, &name)
3489				if err != nil {
3490					return err
3491				}
3492				cc.Name = &name
3493			}
3494		case "type":
3495			if v != nil {
3496				var typeVar string
3497				err = json.Unmarshal(*v, &typeVar)
3498				if err != nil {
3499					return err
3500				}
3501				cc.Type = &typeVar
3502			}
3503		}
3504	}
3505
3506	return nil
3507}
3508
3509// CertificateContractProperties properties of the Certificate contract.
3510type CertificateContractProperties struct {
3511	// Subject - Subject attribute of the certificate.
3512	Subject *string `json:"subject,omitempty"`
3513	// Thumbprint - Thumbprint of the certificate.
3514	Thumbprint *string `json:"thumbprint,omitempty"`
3515	// 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.
3516	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
3517}
3518
3519// CertificateCreateOrUpdateParameters certificate create or update details.
3520type CertificateCreateOrUpdateParameters struct {
3521	// CertificateCreateOrUpdateProperties - Certificate create or update properties details.
3522	*CertificateCreateOrUpdateProperties `json:"properties,omitempty"`
3523}
3524
3525// MarshalJSON is the custom marshaler for CertificateCreateOrUpdateParameters.
3526func (ccoup CertificateCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
3527	objectMap := make(map[string]interface{})
3528	if ccoup.CertificateCreateOrUpdateProperties != nil {
3529		objectMap["properties"] = ccoup.CertificateCreateOrUpdateProperties
3530	}
3531	return json.Marshal(objectMap)
3532}
3533
3534// UnmarshalJSON is the custom unmarshaler for CertificateCreateOrUpdateParameters struct.
3535func (ccoup *CertificateCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
3536	var m map[string]*json.RawMessage
3537	err := json.Unmarshal(body, &m)
3538	if err != nil {
3539		return err
3540	}
3541	for k, v := range m {
3542		switch k {
3543		case "properties":
3544			if v != nil {
3545				var certificateCreateOrUpdateProperties CertificateCreateOrUpdateProperties
3546				err = json.Unmarshal(*v, &certificateCreateOrUpdateProperties)
3547				if err != nil {
3548					return err
3549				}
3550				ccoup.CertificateCreateOrUpdateProperties = &certificateCreateOrUpdateProperties
3551			}
3552		}
3553	}
3554
3555	return nil
3556}
3557
3558// CertificateCreateOrUpdateProperties parameters supplied to the CreateOrUpdate certificate operation.
3559type CertificateCreateOrUpdateProperties struct {
3560	// Data - Base 64 encoded certificate using the application/x-pkcs12 representation.
3561	Data *string `json:"data,omitempty"`
3562	// Password - Password for the Certificate
3563	Password *string `json:"password,omitempty"`
3564}
3565
3566// CertificateInformation SSL certificate information.
3567type CertificateInformation struct {
3568	// 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.
3569	Expiry *date.Time `json:"expiry,omitempty"`
3570	// Thumbprint - Thumbprint of the certificate.
3571	Thumbprint *string `json:"thumbprint,omitempty"`
3572	// Subject - Subject of the certificate.
3573	Subject *string `json:"subject,omitempty"`
3574}
3575
3576// ConnectivityStatusContract details about connectivity to a resource.
3577type ConnectivityStatusContract struct {
3578	// 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.
3579	Name *string `json:"name,omitempty"`
3580	// Status - Resource Connectivity Status Type identifier. Possible values include: 'Initializing', 'Success', 'Failure'
3581	Status ConnectivityStatusType `json:"status,omitempty"`
3582	// Error - Error details of the connectivity to the resource.
3583	Error *string `json:"error,omitempty"`
3584	// 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.
3585	LastUpdated *date.Time `json:"lastUpdated,omitempty"`
3586	// 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.
3587	LastStatusChange *date.Time `json:"lastStatusChange,omitempty"`
3588}
3589
3590// DeployConfigurationParameterProperties parameters supplied to the Deploy Configuration operation.
3591type DeployConfigurationParameterProperties struct {
3592	// Branch - The name of the Git branch from which the configuration is to be deployed to the configuration database.
3593	Branch *string `json:"branch,omitempty"`
3594	// Force - The value enforcing deleting subscriptions to products that are deleted in this update.
3595	Force *bool `json:"force,omitempty"`
3596}
3597
3598// DeployConfigurationParameters deploy Tenant Configuration Contract.
3599type DeployConfigurationParameters struct {
3600	// DeployConfigurationParameterProperties - Deploy Configuration Parameter contract properties.
3601	*DeployConfigurationParameterProperties `json:"properties,omitempty"`
3602}
3603
3604// MarshalJSON is the custom marshaler for DeployConfigurationParameters.
3605func (dcp DeployConfigurationParameters) MarshalJSON() ([]byte, error) {
3606	objectMap := make(map[string]interface{})
3607	if dcp.DeployConfigurationParameterProperties != nil {
3608		objectMap["properties"] = dcp.DeployConfigurationParameterProperties
3609	}
3610	return json.Marshal(objectMap)
3611}
3612
3613// UnmarshalJSON is the custom unmarshaler for DeployConfigurationParameters struct.
3614func (dcp *DeployConfigurationParameters) UnmarshalJSON(body []byte) error {
3615	var m map[string]*json.RawMessage
3616	err := json.Unmarshal(body, &m)
3617	if err != nil {
3618		return err
3619	}
3620	for k, v := range m {
3621		switch k {
3622		case "properties":
3623			if v != nil {
3624				var deployConfigurationParameterProperties DeployConfigurationParameterProperties
3625				err = json.Unmarshal(*v, &deployConfigurationParameterProperties)
3626				if err != nil {
3627					return err
3628				}
3629				dcp.DeployConfigurationParameterProperties = &deployConfigurationParameterProperties
3630			}
3631		}
3632	}
3633
3634	return nil
3635}
3636
3637// DiagnosticCollection paged Diagnostic list representation.
3638type DiagnosticCollection struct {
3639	autorest.Response `json:"-"`
3640	// Value - Page values.
3641	Value *[]DiagnosticContract `json:"value,omitempty"`
3642	// NextLink - Next page link if any.
3643	NextLink *string `json:"nextLink,omitempty"`
3644}
3645
3646// DiagnosticCollectionIterator provides access to a complete listing of DiagnosticContract values.
3647type DiagnosticCollectionIterator struct {
3648	i    int
3649	page DiagnosticCollectionPage
3650}
3651
3652// NextWithContext advances to the next value.  If there was an error making
3653// the request the iterator does not advance and the error is returned.
3654func (iter *DiagnosticCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3655	if tracing.IsEnabled() {
3656		ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticCollectionIterator.NextWithContext")
3657		defer func() {
3658			sc := -1
3659			if iter.Response().Response.Response != nil {
3660				sc = iter.Response().Response.Response.StatusCode
3661			}
3662			tracing.EndSpan(ctx, sc, err)
3663		}()
3664	}
3665	iter.i++
3666	if iter.i < len(iter.page.Values()) {
3667		return nil
3668	}
3669	err = iter.page.NextWithContext(ctx)
3670	if err != nil {
3671		iter.i--
3672		return err
3673	}
3674	iter.i = 0
3675	return nil
3676}
3677
3678// Next advances to the next value.  If there was an error making
3679// the request the iterator does not advance and the error is returned.
3680// Deprecated: Use NextWithContext() instead.
3681func (iter *DiagnosticCollectionIterator) Next() error {
3682	return iter.NextWithContext(context.Background())
3683}
3684
3685// NotDone returns true if the enumeration should be started or is not yet complete.
3686func (iter DiagnosticCollectionIterator) NotDone() bool {
3687	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3688}
3689
3690// Response returns the raw server response from the last page request.
3691func (iter DiagnosticCollectionIterator) Response() DiagnosticCollection {
3692	return iter.page.Response()
3693}
3694
3695// Value returns the current value or a zero-initialized value if the
3696// iterator has advanced beyond the end of the collection.
3697func (iter DiagnosticCollectionIterator) Value() DiagnosticContract {
3698	if !iter.page.NotDone() {
3699		return DiagnosticContract{}
3700	}
3701	return iter.page.Values()[iter.i]
3702}
3703
3704// Creates a new instance of the DiagnosticCollectionIterator type.
3705func NewDiagnosticCollectionIterator(page DiagnosticCollectionPage) DiagnosticCollectionIterator {
3706	return DiagnosticCollectionIterator{page: page}
3707}
3708
3709// IsEmpty returns true if the ListResult contains no values.
3710func (dc DiagnosticCollection) IsEmpty() bool {
3711	return dc.Value == nil || len(*dc.Value) == 0
3712}
3713
3714// diagnosticCollectionPreparer prepares a request to retrieve the next set of results.
3715// It returns nil if no more results exist.
3716func (dc DiagnosticCollection) diagnosticCollectionPreparer(ctx context.Context) (*http.Request, error) {
3717	if dc.NextLink == nil || len(to.String(dc.NextLink)) < 1 {
3718		return nil, nil
3719	}
3720	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3721		autorest.AsJSON(),
3722		autorest.AsGet(),
3723		autorest.WithBaseURL(to.String(dc.NextLink)))
3724}
3725
3726// DiagnosticCollectionPage contains a page of DiagnosticContract values.
3727type DiagnosticCollectionPage struct {
3728	fn func(context.Context, DiagnosticCollection) (DiagnosticCollection, error)
3729	dc DiagnosticCollection
3730}
3731
3732// NextWithContext advances to the next page of values.  If there was an error making
3733// the request the page does not advance and the error is returned.
3734func (page *DiagnosticCollectionPage) NextWithContext(ctx context.Context) (err error) {
3735	if tracing.IsEnabled() {
3736		ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticCollectionPage.NextWithContext")
3737		defer func() {
3738			sc := -1
3739			if page.Response().Response.Response != nil {
3740				sc = page.Response().Response.Response.StatusCode
3741			}
3742			tracing.EndSpan(ctx, sc, err)
3743		}()
3744	}
3745	next, err := page.fn(ctx, page.dc)
3746	if err != nil {
3747		return err
3748	}
3749	page.dc = next
3750	return nil
3751}
3752
3753// Next advances to the next page of values.  If there was an error making
3754// the request the page does not advance and the error is returned.
3755// Deprecated: Use NextWithContext() instead.
3756func (page *DiagnosticCollectionPage) Next() error {
3757	return page.NextWithContext(context.Background())
3758}
3759
3760// NotDone returns true if the page enumeration should be started or is not yet complete.
3761func (page DiagnosticCollectionPage) NotDone() bool {
3762	return !page.dc.IsEmpty()
3763}
3764
3765// Response returns the raw server response from the last page request.
3766func (page DiagnosticCollectionPage) Response() DiagnosticCollection {
3767	return page.dc
3768}
3769
3770// Values returns the slice of values for the current page or nil if there are no values.
3771func (page DiagnosticCollectionPage) Values() []DiagnosticContract {
3772	if page.dc.IsEmpty() {
3773		return nil
3774	}
3775	return *page.dc.Value
3776}
3777
3778// Creates a new instance of the DiagnosticCollectionPage type.
3779func NewDiagnosticCollectionPage(getNextPage func(context.Context, DiagnosticCollection) (DiagnosticCollection, error)) DiagnosticCollectionPage {
3780	return DiagnosticCollectionPage{fn: getNextPage}
3781}
3782
3783// DiagnosticContract diagnostic details.
3784type DiagnosticContract struct {
3785	autorest.Response `json:"-"`
3786	// DiagnosticContractProperties - Diagnostic entity contract properties.
3787	*DiagnosticContractProperties `json:"properties,omitempty"`
3788	// ID - READ-ONLY; Resource ID.
3789	ID *string `json:"id,omitempty"`
3790	// Name - READ-ONLY; Resource name.
3791	Name *string `json:"name,omitempty"`
3792	// Type - READ-ONLY; Resource type for API Management resource.
3793	Type *string `json:"type,omitempty"`
3794}
3795
3796// MarshalJSON is the custom marshaler for DiagnosticContract.
3797func (dc DiagnosticContract) MarshalJSON() ([]byte, error) {
3798	objectMap := make(map[string]interface{})
3799	if dc.DiagnosticContractProperties != nil {
3800		objectMap["properties"] = dc.DiagnosticContractProperties
3801	}
3802	return json.Marshal(objectMap)
3803}
3804
3805// UnmarshalJSON is the custom unmarshaler for DiagnosticContract struct.
3806func (dc *DiagnosticContract) UnmarshalJSON(body []byte) error {
3807	var m map[string]*json.RawMessage
3808	err := json.Unmarshal(body, &m)
3809	if err != nil {
3810		return err
3811	}
3812	for k, v := range m {
3813		switch k {
3814		case "properties":
3815			if v != nil {
3816				var diagnosticContractProperties DiagnosticContractProperties
3817				err = json.Unmarshal(*v, &diagnosticContractProperties)
3818				if err != nil {
3819					return err
3820				}
3821				dc.DiagnosticContractProperties = &diagnosticContractProperties
3822			}
3823		case "id":
3824			if v != nil {
3825				var ID string
3826				err = json.Unmarshal(*v, &ID)
3827				if err != nil {
3828					return err
3829				}
3830				dc.ID = &ID
3831			}
3832		case "name":
3833			if v != nil {
3834				var name string
3835				err = json.Unmarshal(*v, &name)
3836				if err != nil {
3837					return err
3838				}
3839				dc.Name = &name
3840			}
3841		case "type":
3842			if v != nil {
3843				var typeVar string
3844				err = json.Unmarshal(*v, &typeVar)
3845				if err != nil {
3846					return err
3847				}
3848				dc.Type = &typeVar
3849			}
3850		}
3851	}
3852
3853	return nil
3854}
3855
3856// DiagnosticContractProperties diagnostic Entity Properties
3857type DiagnosticContractProperties struct {
3858	// AlwaysLog - Specifies for what type of messages sampling settings should not apply. Possible values include: 'AllErrors'
3859	AlwaysLog AlwaysLog `json:"alwaysLog,omitempty"`
3860	// LoggerID - Resource Id of a target logger.
3861	LoggerID *string `json:"loggerId,omitempty"`
3862	// Sampling - Sampling settings for Diagnostic.
3863	Sampling *SamplingSettings `json:"sampling,omitempty"`
3864	// Frontend - Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
3865	Frontend *PipelineDiagnosticSettings `json:"frontend,omitempty"`
3866	// Backend - Diagnostic settings for incoming/outgoing HTTP messages to the Backend
3867	Backend *PipelineDiagnosticSettings `json:"backend,omitempty"`
3868	// EnableHTTPCorrelationHeaders - Whether to process Correlation Headers coming to Api Management Service. Only applicable to Application Insights diagnostics. Default is true.
3869	EnableHTTPCorrelationHeaders *bool `json:"enableHttpCorrelationHeaders,omitempty"`
3870}
3871
3872// EmailTemplateCollection paged email template list representation.
3873type EmailTemplateCollection struct {
3874	autorest.Response `json:"-"`
3875	// Value - Page values.
3876	Value *[]EmailTemplateContract `json:"value,omitempty"`
3877	// NextLink - Next page link if any.
3878	NextLink *string `json:"nextLink,omitempty"`
3879}
3880
3881// EmailTemplateCollectionIterator provides access to a complete listing of EmailTemplateContract values.
3882type EmailTemplateCollectionIterator struct {
3883	i    int
3884	page EmailTemplateCollectionPage
3885}
3886
3887// NextWithContext advances to the next value.  If there was an error making
3888// the request the iterator does not advance and the error is returned.
3889func (iter *EmailTemplateCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3890	if tracing.IsEnabled() {
3891		ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateCollectionIterator.NextWithContext")
3892		defer func() {
3893			sc := -1
3894			if iter.Response().Response.Response != nil {
3895				sc = iter.Response().Response.Response.StatusCode
3896			}
3897			tracing.EndSpan(ctx, sc, err)
3898		}()
3899	}
3900	iter.i++
3901	if iter.i < len(iter.page.Values()) {
3902		return nil
3903	}
3904	err = iter.page.NextWithContext(ctx)
3905	if err != nil {
3906		iter.i--
3907		return err
3908	}
3909	iter.i = 0
3910	return nil
3911}
3912
3913// Next advances to the next value.  If there was an error making
3914// the request the iterator does not advance and the error is returned.
3915// Deprecated: Use NextWithContext() instead.
3916func (iter *EmailTemplateCollectionIterator) Next() error {
3917	return iter.NextWithContext(context.Background())
3918}
3919
3920// NotDone returns true if the enumeration should be started or is not yet complete.
3921func (iter EmailTemplateCollectionIterator) NotDone() bool {
3922	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3923}
3924
3925// Response returns the raw server response from the last page request.
3926func (iter EmailTemplateCollectionIterator) Response() EmailTemplateCollection {
3927	return iter.page.Response()
3928}
3929
3930// Value returns the current value or a zero-initialized value if the
3931// iterator has advanced beyond the end of the collection.
3932func (iter EmailTemplateCollectionIterator) Value() EmailTemplateContract {
3933	if !iter.page.NotDone() {
3934		return EmailTemplateContract{}
3935	}
3936	return iter.page.Values()[iter.i]
3937}
3938
3939// Creates a new instance of the EmailTemplateCollectionIterator type.
3940func NewEmailTemplateCollectionIterator(page EmailTemplateCollectionPage) EmailTemplateCollectionIterator {
3941	return EmailTemplateCollectionIterator{page: page}
3942}
3943
3944// IsEmpty returns true if the ListResult contains no values.
3945func (etc EmailTemplateCollection) IsEmpty() bool {
3946	return etc.Value == nil || len(*etc.Value) == 0
3947}
3948
3949// emailTemplateCollectionPreparer prepares a request to retrieve the next set of results.
3950// It returns nil if no more results exist.
3951func (etc EmailTemplateCollection) emailTemplateCollectionPreparer(ctx context.Context) (*http.Request, error) {
3952	if etc.NextLink == nil || len(to.String(etc.NextLink)) < 1 {
3953		return nil, nil
3954	}
3955	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3956		autorest.AsJSON(),
3957		autorest.AsGet(),
3958		autorest.WithBaseURL(to.String(etc.NextLink)))
3959}
3960
3961// EmailTemplateCollectionPage contains a page of EmailTemplateContract values.
3962type EmailTemplateCollectionPage struct {
3963	fn  func(context.Context, EmailTemplateCollection) (EmailTemplateCollection, error)
3964	etc EmailTemplateCollection
3965}
3966
3967// NextWithContext advances to the next page of values.  If there was an error making
3968// the request the page does not advance and the error is returned.
3969func (page *EmailTemplateCollectionPage) NextWithContext(ctx context.Context) (err error) {
3970	if tracing.IsEnabled() {
3971		ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateCollectionPage.NextWithContext")
3972		defer func() {
3973			sc := -1
3974			if page.Response().Response.Response != nil {
3975				sc = page.Response().Response.Response.StatusCode
3976			}
3977			tracing.EndSpan(ctx, sc, err)
3978		}()
3979	}
3980	next, err := page.fn(ctx, page.etc)
3981	if err != nil {
3982		return err
3983	}
3984	page.etc = next
3985	return nil
3986}
3987
3988// Next advances to the next page of values.  If there was an error making
3989// the request the page does not advance and the error is returned.
3990// Deprecated: Use NextWithContext() instead.
3991func (page *EmailTemplateCollectionPage) Next() error {
3992	return page.NextWithContext(context.Background())
3993}
3994
3995// NotDone returns true if the page enumeration should be started or is not yet complete.
3996func (page EmailTemplateCollectionPage) NotDone() bool {
3997	return !page.etc.IsEmpty()
3998}
3999
4000// Response returns the raw server response from the last page request.
4001func (page EmailTemplateCollectionPage) Response() EmailTemplateCollection {
4002	return page.etc
4003}
4004
4005// Values returns the slice of values for the current page or nil if there are no values.
4006func (page EmailTemplateCollectionPage) Values() []EmailTemplateContract {
4007	if page.etc.IsEmpty() {
4008		return nil
4009	}
4010	return *page.etc.Value
4011}
4012
4013// Creates a new instance of the EmailTemplateCollectionPage type.
4014func NewEmailTemplateCollectionPage(getNextPage func(context.Context, EmailTemplateCollection) (EmailTemplateCollection, error)) EmailTemplateCollectionPage {
4015	return EmailTemplateCollectionPage{fn: getNextPage}
4016}
4017
4018// EmailTemplateContract email Template details.
4019type EmailTemplateContract struct {
4020	autorest.Response `json:"-"`
4021	// EmailTemplateContractProperties - Email Template entity contract properties.
4022	*EmailTemplateContractProperties `json:"properties,omitempty"`
4023	// ID - READ-ONLY; Resource ID.
4024	ID *string `json:"id,omitempty"`
4025	// Name - READ-ONLY; Resource name.
4026	Name *string `json:"name,omitempty"`
4027	// Type - READ-ONLY; Resource type for API Management resource.
4028	Type *string `json:"type,omitempty"`
4029}
4030
4031// MarshalJSON is the custom marshaler for EmailTemplateContract.
4032func (etc EmailTemplateContract) MarshalJSON() ([]byte, error) {
4033	objectMap := make(map[string]interface{})
4034	if etc.EmailTemplateContractProperties != nil {
4035		objectMap["properties"] = etc.EmailTemplateContractProperties
4036	}
4037	return json.Marshal(objectMap)
4038}
4039
4040// UnmarshalJSON is the custom unmarshaler for EmailTemplateContract struct.
4041func (etc *EmailTemplateContract) UnmarshalJSON(body []byte) error {
4042	var m map[string]*json.RawMessage
4043	err := json.Unmarshal(body, &m)
4044	if err != nil {
4045		return err
4046	}
4047	for k, v := range m {
4048		switch k {
4049		case "properties":
4050			if v != nil {
4051				var emailTemplateContractProperties EmailTemplateContractProperties
4052				err = json.Unmarshal(*v, &emailTemplateContractProperties)
4053				if err != nil {
4054					return err
4055				}
4056				etc.EmailTemplateContractProperties = &emailTemplateContractProperties
4057			}
4058		case "id":
4059			if v != nil {
4060				var ID string
4061				err = json.Unmarshal(*v, &ID)
4062				if err != nil {
4063					return err
4064				}
4065				etc.ID = &ID
4066			}
4067		case "name":
4068			if v != nil {
4069				var name string
4070				err = json.Unmarshal(*v, &name)
4071				if err != nil {
4072					return err
4073				}
4074				etc.Name = &name
4075			}
4076		case "type":
4077			if v != nil {
4078				var typeVar string
4079				err = json.Unmarshal(*v, &typeVar)
4080				if err != nil {
4081					return err
4082				}
4083				etc.Type = &typeVar
4084			}
4085		}
4086	}
4087
4088	return nil
4089}
4090
4091// EmailTemplateContractProperties email Template Contract properties.
4092type EmailTemplateContractProperties struct {
4093	// Subject - Subject of the Template.
4094	Subject *string `json:"subject,omitempty"`
4095	// Body - Email Template Body. This should be a valid XDocument
4096	Body *string `json:"body,omitempty"`
4097	// Title - Title of the Template.
4098	Title *string `json:"title,omitempty"`
4099	// Description - Description of the Email Template.
4100	Description *string `json:"description,omitempty"`
4101	// IsDefault - READ-ONLY; Whether the template is the default template provided by Api Management or has been edited.
4102	IsDefault *bool `json:"isDefault,omitempty"`
4103	// Parameters - Email Template Parameter values.
4104	Parameters *[]EmailTemplateParametersContractProperties `json:"parameters,omitempty"`
4105}
4106
4107// EmailTemplateParametersContractProperties email Template Parameter contract.
4108type EmailTemplateParametersContractProperties struct {
4109	// Name - Template parameter name.
4110	Name *string `json:"name,omitempty"`
4111	// Title - Template parameter title.
4112	Title *string `json:"title,omitempty"`
4113	// Description - Template parameter description.
4114	Description *string `json:"description,omitempty"`
4115}
4116
4117// EmailTemplateUpdateParameterProperties email Template Update Contract properties.
4118type EmailTemplateUpdateParameterProperties struct {
4119	// Subject - Subject of the Template.
4120	Subject *string `json:"subject,omitempty"`
4121	// Title - Title of the Template.
4122	Title *string `json:"title,omitempty"`
4123	// Description - Description of the Email Template.
4124	Description *string `json:"description,omitempty"`
4125	// Body - Email Template Body. This should be a valid XDocument
4126	Body *string `json:"body,omitempty"`
4127	// Parameters - Email Template Parameter values.
4128	Parameters *[]EmailTemplateParametersContractProperties `json:"parameters,omitempty"`
4129}
4130
4131// EmailTemplateUpdateParameters email Template update Parameters.
4132type EmailTemplateUpdateParameters struct {
4133	// EmailTemplateUpdateParameterProperties - Email Template Update contract properties.
4134	*EmailTemplateUpdateParameterProperties `json:"properties,omitempty"`
4135}
4136
4137// MarshalJSON is the custom marshaler for EmailTemplateUpdateParameters.
4138func (etup EmailTemplateUpdateParameters) MarshalJSON() ([]byte, error) {
4139	objectMap := make(map[string]interface{})
4140	if etup.EmailTemplateUpdateParameterProperties != nil {
4141		objectMap["properties"] = etup.EmailTemplateUpdateParameterProperties
4142	}
4143	return json.Marshal(objectMap)
4144}
4145
4146// UnmarshalJSON is the custom unmarshaler for EmailTemplateUpdateParameters struct.
4147func (etup *EmailTemplateUpdateParameters) UnmarshalJSON(body []byte) error {
4148	var m map[string]*json.RawMessage
4149	err := json.Unmarshal(body, &m)
4150	if err != nil {
4151		return err
4152	}
4153	for k, v := range m {
4154		switch k {
4155		case "properties":
4156			if v != nil {
4157				var emailTemplateUpdateParameterProperties EmailTemplateUpdateParameterProperties
4158				err = json.Unmarshal(*v, &emailTemplateUpdateParameterProperties)
4159				if err != nil {
4160					return err
4161				}
4162				etup.EmailTemplateUpdateParameterProperties = &emailTemplateUpdateParameterProperties
4163			}
4164		}
4165	}
4166
4167	return nil
4168}
4169
4170// ErrorFieldContract error Field contract.
4171type ErrorFieldContract struct {
4172	// Code - Property level error code.
4173	Code *string `json:"code,omitempty"`
4174	// Message - Human-readable representation of property-level error.
4175	Message *string `json:"message,omitempty"`
4176	// Target - Property name.
4177	Target *string `json:"target,omitempty"`
4178}
4179
4180// ErrorResponse error Response.
4181type ErrorResponse struct {
4182	// ErrorResponseBody - Properties of the Error Response.
4183	*ErrorResponseBody `json:"error,omitempty"`
4184}
4185
4186// MarshalJSON is the custom marshaler for ErrorResponse.
4187func (er ErrorResponse) MarshalJSON() ([]byte, error) {
4188	objectMap := make(map[string]interface{})
4189	if er.ErrorResponseBody != nil {
4190		objectMap["error"] = er.ErrorResponseBody
4191	}
4192	return json.Marshal(objectMap)
4193}
4194
4195// UnmarshalJSON is the custom unmarshaler for ErrorResponse struct.
4196func (er *ErrorResponse) UnmarshalJSON(body []byte) error {
4197	var m map[string]*json.RawMessage
4198	err := json.Unmarshal(body, &m)
4199	if err != nil {
4200		return err
4201	}
4202	for k, v := range m {
4203		switch k {
4204		case "error":
4205			if v != nil {
4206				var errorResponseBody ErrorResponseBody
4207				err = json.Unmarshal(*v, &errorResponseBody)
4208				if err != nil {
4209					return err
4210				}
4211				er.ErrorResponseBody = &errorResponseBody
4212			}
4213		}
4214	}
4215
4216	return nil
4217}
4218
4219// ErrorResponseBody error Body contract.
4220type ErrorResponseBody struct {
4221	// Code - Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
4222	Code *string `json:"code,omitempty"`
4223	// Message - Human-readable representation of the error.
4224	Message *string `json:"message,omitempty"`
4225	// Details - The list of invalid fields send in request, in case of validation error.
4226	Details *[]ErrorFieldContract `json:"details,omitempty"`
4227}
4228
4229// GenerateSsoURLResult generate SSO Url operations response details.
4230type GenerateSsoURLResult struct {
4231	autorest.Response `json:"-"`
4232	// Value - Redirect Url containing the SSO URL value.
4233	Value *string `json:"value,omitempty"`
4234}
4235
4236// GroupCollection paged Group list representation.
4237type GroupCollection struct {
4238	autorest.Response `json:"-"`
4239	// Value - Page values.
4240	Value *[]GroupContract `json:"value,omitempty"`
4241	// NextLink - Next page link if any.
4242	NextLink *string `json:"nextLink,omitempty"`
4243}
4244
4245// GroupCollectionIterator provides access to a complete listing of GroupContract values.
4246type GroupCollectionIterator struct {
4247	i    int
4248	page GroupCollectionPage
4249}
4250
4251// NextWithContext advances to the next value.  If there was an error making
4252// the request the iterator does not advance and the error is returned.
4253func (iter *GroupCollectionIterator) NextWithContext(ctx context.Context) (err error) {
4254	if tracing.IsEnabled() {
4255		ctx = tracing.StartSpan(ctx, fqdn+"/GroupCollectionIterator.NextWithContext")
4256		defer func() {
4257			sc := -1
4258			if iter.Response().Response.Response != nil {
4259				sc = iter.Response().Response.Response.StatusCode
4260			}
4261			tracing.EndSpan(ctx, sc, err)
4262		}()
4263	}
4264	iter.i++
4265	if iter.i < len(iter.page.Values()) {
4266		return nil
4267	}
4268	err = iter.page.NextWithContext(ctx)
4269	if err != nil {
4270		iter.i--
4271		return err
4272	}
4273	iter.i = 0
4274	return nil
4275}
4276
4277// Next advances to the next value.  If there was an error making
4278// the request the iterator does not advance and the error is returned.
4279// Deprecated: Use NextWithContext() instead.
4280func (iter *GroupCollectionIterator) Next() error {
4281	return iter.NextWithContext(context.Background())
4282}
4283
4284// NotDone returns true if the enumeration should be started or is not yet complete.
4285func (iter GroupCollectionIterator) NotDone() bool {
4286	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4287}
4288
4289// Response returns the raw server response from the last page request.
4290func (iter GroupCollectionIterator) Response() GroupCollection {
4291	return iter.page.Response()
4292}
4293
4294// Value returns the current value or a zero-initialized value if the
4295// iterator has advanced beyond the end of the collection.
4296func (iter GroupCollectionIterator) Value() GroupContract {
4297	if !iter.page.NotDone() {
4298		return GroupContract{}
4299	}
4300	return iter.page.Values()[iter.i]
4301}
4302
4303// Creates a new instance of the GroupCollectionIterator type.
4304func NewGroupCollectionIterator(page GroupCollectionPage) GroupCollectionIterator {
4305	return GroupCollectionIterator{page: page}
4306}
4307
4308// IsEmpty returns true if the ListResult contains no values.
4309func (gc GroupCollection) IsEmpty() bool {
4310	return gc.Value == nil || len(*gc.Value) == 0
4311}
4312
4313// groupCollectionPreparer prepares a request to retrieve the next set of results.
4314// It returns nil if no more results exist.
4315func (gc GroupCollection) groupCollectionPreparer(ctx context.Context) (*http.Request, error) {
4316	if gc.NextLink == nil || len(to.String(gc.NextLink)) < 1 {
4317		return nil, nil
4318	}
4319	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4320		autorest.AsJSON(),
4321		autorest.AsGet(),
4322		autorest.WithBaseURL(to.String(gc.NextLink)))
4323}
4324
4325// GroupCollectionPage contains a page of GroupContract values.
4326type GroupCollectionPage struct {
4327	fn func(context.Context, GroupCollection) (GroupCollection, error)
4328	gc GroupCollection
4329}
4330
4331// NextWithContext advances to the next page of values.  If there was an error making
4332// the request the page does not advance and the error is returned.
4333func (page *GroupCollectionPage) NextWithContext(ctx context.Context) (err error) {
4334	if tracing.IsEnabled() {
4335		ctx = tracing.StartSpan(ctx, fqdn+"/GroupCollectionPage.NextWithContext")
4336		defer func() {
4337			sc := -1
4338			if page.Response().Response.Response != nil {
4339				sc = page.Response().Response.Response.StatusCode
4340			}
4341			tracing.EndSpan(ctx, sc, err)
4342		}()
4343	}
4344	next, err := page.fn(ctx, page.gc)
4345	if err != nil {
4346		return err
4347	}
4348	page.gc = next
4349	return nil
4350}
4351
4352// Next advances to the next page of values.  If there was an error making
4353// the request the page does not advance and the error is returned.
4354// Deprecated: Use NextWithContext() instead.
4355func (page *GroupCollectionPage) Next() error {
4356	return page.NextWithContext(context.Background())
4357}
4358
4359// NotDone returns true if the page enumeration should be started or is not yet complete.
4360func (page GroupCollectionPage) NotDone() bool {
4361	return !page.gc.IsEmpty()
4362}
4363
4364// Response returns the raw server response from the last page request.
4365func (page GroupCollectionPage) Response() GroupCollection {
4366	return page.gc
4367}
4368
4369// Values returns the slice of values for the current page or nil if there are no values.
4370func (page GroupCollectionPage) Values() []GroupContract {
4371	if page.gc.IsEmpty() {
4372		return nil
4373	}
4374	return *page.gc.Value
4375}
4376
4377// Creates a new instance of the GroupCollectionPage type.
4378func NewGroupCollectionPage(getNextPage func(context.Context, GroupCollection) (GroupCollection, error)) GroupCollectionPage {
4379	return GroupCollectionPage{fn: getNextPage}
4380}
4381
4382// GroupContract contract details.
4383type GroupContract struct {
4384	autorest.Response `json:"-"`
4385	// GroupContractProperties - Group entity contract properties.
4386	*GroupContractProperties `json:"properties,omitempty"`
4387	// ID - READ-ONLY; Resource ID.
4388	ID *string `json:"id,omitempty"`
4389	// Name - READ-ONLY; Resource name.
4390	Name *string `json:"name,omitempty"`
4391	// Type - READ-ONLY; Resource type for API Management resource.
4392	Type *string `json:"type,omitempty"`
4393}
4394
4395// MarshalJSON is the custom marshaler for GroupContract.
4396func (gc GroupContract) MarshalJSON() ([]byte, error) {
4397	objectMap := make(map[string]interface{})
4398	if gc.GroupContractProperties != nil {
4399		objectMap["properties"] = gc.GroupContractProperties
4400	}
4401	return json.Marshal(objectMap)
4402}
4403
4404// UnmarshalJSON is the custom unmarshaler for GroupContract struct.
4405func (gc *GroupContract) UnmarshalJSON(body []byte) error {
4406	var m map[string]*json.RawMessage
4407	err := json.Unmarshal(body, &m)
4408	if err != nil {
4409		return err
4410	}
4411	for k, v := range m {
4412		switch k {
4413		case "properties":
4414			if v != nil {
4415				var groupContractProperties GroupContractProperties
4416				err = json.Unmarshal(*v, &groupContractProperties)
4417				if err != nil {
4418					return err
4419				}
4420				gc.GroupContractProperties = &groupContractProperties
4421			}
4422		case "id":
4423			if v != nil {
4424				var ID string
4425				err = json.Unmarshal(*v, &ID)
4426				if err != nil {
4427					return err
4428				}
4429				gc.ID = &ID
4430			}
4431		case "name":
4432			if v != nil {
4433				var name string
4434				err = json.Unmarshal(*v, &name)
4435				if err != nil {
4436					return err
4437				}
4438				gc.Name = &name
4439			}
4440		case "type":
4441			if v != nil {
4442				var typeVar string
4443				err = json.Unmarshal(*v, &typeVar)
4444				if err != nil {
4445					return err
4446				}
4447				gc.Type = &typeVar
4448			}
4449		}
4450	}
4451
4452	return nil
4453}
4454
4455// GroupContractProperties group contract Properties.
4456type GroupContractProperties struct {
4457	// DisplayName - Group name.
4458	DisplayName *string `json:"displayName,omitempty"`
4459	// Description - Group description. Can contain HTML formatting tags.
4460	Description *string `json:"description,omitempty"`
4461	// BuiltIn - READ-ONLY; true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
4462	BuiltIn *bool `json:"builtIn,omitempty"`
4463	// Type - Group type. Possible values include: 'Custom', 'System', 'External'
4464	Type GroupType `json:"type,omitempty"`
4465	// 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.
4466	ExternalID *string `json:"externalId,omitempty"`
4467}
4468
4469// GroupCreateParameters parameters supplied to the Create Group operation.
4470type GroupCreateParameters struct {
4471	// GroupCreateParametersProperties - Properties supplied to Create Group operation.
4472	*GroupCreateParametersProperties `json:"properties,omitempty"`
4473}
4474
4475// MarshalJSON is the custom marshaler for GroupCreateParameters.
4476func (gcp GroupCreateParameters) MarshalJSON() ([]byte, error) {
4477	objectMap := make(map[string]interface{})
4478	if gcp.GroupCreateParametersProperties != nil {
4479		objectMap["properties"] = gcp.GroupCreateParametersProperties
4480	}
4481	return json.Marshal(objectMap)
4482}
4483
4484// UnmarshalJSON is the custom unmarshaler for GroupCreateParameters struct.
4485func (gcp *GroupCreateParameters) UnmarshalJSON(body []byte) error {
4486	var m map[string]*json.RawMessage
4487	err := json.Unmarshal(body, &m)
4488	if err != nil {
4489		return err
4490	}
4491	for k, v := range m {
4492		switch k {
4493		case "properties":
4494			if v != nil {
4495				var groupCreateParametersProperties GroupCreateParametersProperties
4496				err = json.Unmarshal(*v, &groupCreateParametersProperties)
4497				if err != nil {
4498					return err
4499				}
4500				gcp.GroupCreateParametersProperties = &groupCreateParametersProperties
4501			}
4502		}
4503	}
4504
4505	return nil
4506}
4507
4508// GroupCreateParametersProperties parameters supplied to the Create Group operation.
4509type GroupCreateParametersProperties struct {
4510	// DisplayName - Group name.
4511	DisplayName *string `json:"displayName,omitempty"`
4512	// Description - Group description.
4513	Description *string `json:"description,omitempty"`
4514	// Type - Group type. Possible values include: 'Custom', 'System', 'External'
4515	Type GroupType `json:"type,omitempty"`
4516	// 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.
4517	ExternalID *string `json:"externalId,omitempty"`
4518}
4519
4520// GroupUpdateParameters parameters supplied to the Update Group operation.
4521type GroupUpdateParameters struct {
4522	// GroupUpdateParametersProperties - Group entity update contract properties.
4523	*GroupUpdateParametersProperties `json:"properties,omitempty"`
4524}
4525
4526// MarshalJSON is the custom marshaler for GroupUpdateParameters.
4527func (gup GroupUpdateParameters) MarshalJSON() ([]byte, error) {
4528	objectMap := make(map[string]interface{})
4529	if gup.GroupUpdateParametersProperties != nil {
4530		objectMap["properties"] = gup.GroupUpdateParametersProperties
4531	}
4532	return json.Marshal(objectMap)
4533}
4534
4535// UnmarshalJSON is the custom unmarshaler for GroupUpdateParameters struct.
4536func (gup *GroupUpdateParameters) UnmarshalJSON(body []byte) error {
4537	var m map[string]*json.RawMessage
4538	err := json.Unmarshal(body, &m)
4539	if err != nil {
4540		return err
4541	}
4542	for k, v := range m {
4543		switch k {
4544		case "properties":
4545			if v != nil {
4546				var groupUpdateParametersProperties GroupUpdateParametersProperties
4547				err = json.Unmarshal(*v, &groupUpdateParametersProperties)
4548				if err != nil {
4549					return err
4550				}
4551				gup.GroupUpdateParametersProperties = &groupUpdateParametersProperties
4552			}
4553		}
4554	}
4555
4556	return nil
4557}
4558
4559// GroupUpdateParametersProperties parameters supplied to the Update Group operation.
4560type GroupUpdateParametersProperties struct {
4561	// DisplayName - Group name.
4562	DisplayName *string `json:"displayName,omitempty"`
4563	// Description - Group description.
4564	Description *string `json:"description,omitempty"`
4565	// Type - Group type. Possible values include: 'Custom', 'System', 'External'
4566	Type GroupType `json:"type,omitempty"`
4567	// 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.
4568	ExternalID *string `json:"externalId,omitempty"`
4569}
4570
4571// HostnameConfiguration custom hostname configuration.
4572type HostnameConfiguration struct {
4573	// Type - Hostname type. Possible values include: 'Proxy', 'Portal', 'Management', 'Scm', 'DeveloperPortal'
4574	Type HostnameType `json:"type,omitempty"`
4575	// HostName - Hostname to configure on the Api Management service.
4576	HostName *string `json:"hostName,omitempty"`
4577	// 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*
4578	KeyVaultID *string `json:"keyVaultId,omitempty"`
4579	// EncodedCertificate - Base64 Encoded certificate.
4580	EncodedCertificate *string `json:"encodedCertificate,omitempty"`
4581	// CertificatePassword - Certificate Password.
4582	CertificatePassword *string `json:"certificatePassword,omitempty"`
4583	// 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.
4584	DefaultSslBinding *bool `json:"defaultSslBinding,omitempty"`
4585	// NegotiateClientCertificate - Specify true to always negotiate client certificate on the hostname. Default Value is false.
4586	NegotiateClientCertificate *bool `json:"negotiateClientCertificate,omitempty"`
4587	// Certificate - Certificate information.
4588	Certificate *CertificateInformation `json:"certificate,omitempty"`
4589}
4590
4591// HTTPMessageDiagnostic http message diagnostic settings.
4592type HTTPMessageDiagnostic struct {
4593	// Headers - Array of HTTP Headers to log.
4594	Headers *[]string `json:"headers,omitempty"`
4595	// Body - Body logging settings.
4596	Body *BodyDiagnosticSettings `json:"body,omitempty"`
4597}
4598
4599// IdentityProviderBaseParameters identity Provider Base Parameter Properties.
4600type IdentityProviderBaseParameters struct {
4601	// Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C'
4602	Type IdentityProviderType `json:"type,omitempty"`
4603	// AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login.
4604	AllowedTenants *[]string `json:"allowedTenants,omitempty"`
4605	// Authority - OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
4606	Authority *string `json:"authority,omitempty"`
4607	// SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider.
4608	SignupPolicyName *string `json:"signupPolicyName,omitempty"`
4609	// SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider.
4610	SigninPolicyName *string `json:"signinPolicyName,omitempty"`
4611	// ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
4612	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`
4613	// PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
4614	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`
4615}
4616
4617// IdentityProviderContract identity Provider details.
4618type IdentityProviderContract struct {
4619	autorest.Response `json:"-"`
4620	// IdentityProviderContractProperties - Identity Provider contract properties.
4621	*IdentityProviderContractProperties `json:"properties,omitempty"`
4622	// ID - READ-ONLY; Resource ID.
4623	ID *string `json:"id,omitempty"`
4624	// Name - READ-ONLY; Resource name.
4625	Name *string `json:"name,omitempty"`
4626	// Type - READ-ONLY; Resource type for API Management resource.
4627	Type *string `json:"type,omitempty"`
4628}
4629
4630// MarshalJSON is the custom marshaler for IdentityProviderContract.
4631func (ipc IdentityProviderContract) MarshalJSON() ([]byte, error) {
4632	objectMap := make(map[string]interface{})
4633	if ipc.IdentityProviderContractProperties != nil {
4634		objectMap["properties"] = ipc.IdentityProviderContractProperties
4635	}
4636	return json.Marshal(objectMap)
4637}
4638
4639// UnmarshalJSON is the custom unmarshaler for IdentityProviderContract struct.
4640func (ipc *IdentityProviderContract) UnmarshalJSON(body []byte) error {
4641	var m map[string]*json.RawMessage
4642	err := json.Unmarshal(body, &m)
4643	if err != nil {
4644		return err
4645	}
4646	for k, v := range m {
4647		switch k {
4648		case "properties":
4649			if v != nil {
4650				var identityProviderContractProperties IdentityProviderContractProperties
4651				err = json.Unmarshal(*v, &identityProviderContractProperties)
4652				if err != nil {
4653					return err
4654				}
4655				ipc.IdentityProviderContractProperties = &identityProviderContractProperties
4656			}
4657		case "id":
4658			if v != nil {
4659				var ID string
4660				err = json.Unmarshal(*v, &ID)
4661				if err != nil {
4662					return err
4663				}
4664				ipc.ID = &ID
4665			}
4666		case "name":
4667			if v != nil {
4668				var name string
4669				err = json.Unmarshal(*v, &name)
4670				if err != nil {
4671					return err
4672				}
4673				ipc.Name = &name
4674			}
4675		case "type":
4676			if v != nil {
4677				var typeVar string
4678				err = json.Unmarshal(*v, &typeVar)
4679				if err != nil {
4680					return err
4681				}
4682				ipc.Type = &typeVar
4683			}
4684		}
4685	}
4686
4687	return nil
4688}
4689
4690// IdentityProviderContractProperties the external Identity Providers like Facebook, Google, Microsoft,
4691// Twitter or Azure Active Directory which can be used to enable access to the API Management service
4692// developer portal for all users.
4693type IdentityProviderContractProperties struct {
4694	// 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.
4695	ClientID *string `json:"clientId,omitempty"`
4696	// 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.
4697	ClientSecret *string `json:"clientSecret,omitempty"`
4698	// Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C'
4699	Type IdentityProviderType `json:"type,omitempty"`
4700	// AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login.
4701	AllowedTenants *[]string `json:"allowedTenants,omitempty"`
4702	// Authority - OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
4703	Authority *string `json:"authority,omitempty"`
4704	// SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider.
4705	SignupPolicyName *string `json:"signupPolicyName,omitempty"`
4706	// SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider.
4707	SigninPolicyName *string `json:"signinPolicyName,omitempty"`
4708	// ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
4709	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`
4710	// PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
4711	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`
4712}
4713
4714// IdentityProviderList list of all the Identity Providers configured on the service instance.
4715type IdentityProviderList struct {
4716	autorest.Response `json:"-"`
4717	// Value - Identity Provider configuration values.
4718	Value *[]IdentityProviderContract `json:"value,omitempty"`
4719	// NextLink - Next page link if any.
4720	NextLink *string `json:"nextLink,omitempty"`
4721}
4722
4723// IdentityProviderListIterator provides access to a complete listing of IdentityProviderContract values.
4724type IdentityProviderListIterator struct {
4725	i    int
4726	page IdentityProviderListPage
4727}
4728
4729// NextWithContext advances to the next value.  If there was an error making
4730// the request the iterator does not advance and the error is returned.
4731func (iter *IdentityProviderListIterator) NextWithContext(ctx context.Context) (err error) {
4732	if tracing.IsEnabled() {
4733		ctx = tracing.StartSpan(ctx, fqdn+"/IdentityProviderListIterator.NextWithContext")
4734		defer func() {
4735			sc := -1
4736			if iter.Response().Response.Response != nil {
4737				sc = iter.Response().Response.Response.StatusCode
4738			}
4739			tracing.EndSpan(ctx, sc, err)
4740		}()
4741	}
4742	iter.i++
4743	if iter.i < len(iter.page.Values()) {
4744		return nil
4745	}
4746	err = iter.page.NextWithContext(ctx)
4747	if err != nil {
4748		iter.i--
4749		return err
4750	}
4751	iter.i = 0
4752	return nil
4753}
4754
4755// Next advances to the next value.  If there was an error making
4756// the request the iterator does not advance and the error is returned.
4757// Deprecated: Use NextWithContext() instead.
4758func (iter *IdentityProviderListIterator) Next() error {
4759	return iter.NextWithContext(context.Background())
4760}
4761
4762// NotDone returns true if the enumeration should be started or is not yet complete.
4763func (iter IdentityProviderListIterator) NotDone() bool {
4764	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4765}
4766
4767// Response returns the raw server response from the last page request.
4768func (iter IdentityProviderListIterator) Response() IdentityProviderList {
4769	return iter.page.Response()
4770}
4771
4772// Value returns the current value or a zero-initialized value if the
4773// iterator has advanced beyond the end of the collection.
4774func (iter IdentityProviderListIterator) Value() IdentityProviderContract {
4775	if !iter.page.NotDone() {
4776		return IdentityProviderContract{}
4777	}
4778	return iter.page.Values()[iter.i]
4779}
4780
4781// Creates a new instance of the IdentityProviderListIterator type.
4782func NewIdentityProviderListIterator(page IdentityProviderListPage) IdentityProviderListIterator {
4783	return IdentityProviderListIterator{page: page}
4784}
4785
4786// IsEmpty returns true if the ListResult contains no values.
4787func (ipl IdentityProviderList) IsEmpty() bool {
4788	return ipl.Value == nil || len(*ipl.Value) == 0
4789}
4790
4791// identityProviderListPreparer prepares a request to retrieve the next set of results.
4792// It returns nil if no more results exist.
4793func (ipl IdentityProviderList) identityProviderListPreparer(ctx context.Context) (*http.Request, error) {
4794	if ipl.NextLink == nil || len(to.String(ipl.NextLink)) < 1 {
4795		return nil, nil
4796	}
4797	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4798		autorest.AsJSON(),
4799		autorest.AsGet(),
4800		autorest.WithBaseURL(to.String(ipl.NextLink)))
4801}
4802
4803// IdentityProviderListPage contains a page of IdentityProviderContract values.
4804type IdentityProviderListPage struct {
4805	fn  func(context.Context, IdentityProviderList) (IdentityProviderList, error)
4806	ipl IdentityProviderList
4807}
4808
4809// NextWithContext advances to the next page of values.  If there was an error making
4810// the request the page does not advance and the error is returned.
4811func (page *IdentityProviderListPage) NextWithContext(ctx context.Context) (err error) {
4812	if tracing.IsEnabled() {
4813		ctx = tracing.StartSpan(ctx, fqdn+"/IdentityProviderListPage.NextWithContext")
4814		defer func() {
4815			sc := -1
4816			if page.Response().Response.Response != nil {
4817				sc = page.Response().Response.Response.StatusCode
4818			}
4819			tracing.EndSpan(ctx, sc, err)
4820		}()
4821	}
4822	next, err := page.fn(ctx, page.ipl)
4823	if err != nil {
4824		return err
4825	}
4826	page.ipl = next
4827	return nil
4828}
4829
4830// Next advances to the next page of values.  If there was an error making
4831// the request the page does not advance and the error is returned.
4832// Deprecated: Use NextWithContext() instead.
4833func (page *IdentityProviderListPage) Next() error {
4834	return page.NextWithContext(context.Background())
4835}
4836
4837// NotDone returns true if the page enumeration should be started or is not yet complete.
4838func (page IdentityProviderListPage) NotDone() bool {
4839	return !page.ipl.IsEmpty()
4840}
4841
4842// Response returns the raw server response from the last page request.
4843func (page IdentityProviderListPage) Response() IdentityProviderList {
4844	return page.ipl
4845}
4846
4847// Values returns the slice of values for the current page or nil if there are no values.
4848func (page IdentityProviderListPage) Values() []IdentityProviderContract {
4849	if page.ipl.IsEmpty() {
4850		return nil
4851	}
4852	return *page.ipl.Value
4853}
4854
4855// Creates a new instance of the IdentityProviderListPage type.
4856func NewIdentityProviderListPage(getNextPage func(context.Context, IdentityProviderList) (IdentityProviderList, error)) IdentityProviderListPage {
4857	return IdentityProviderListPage{fn: getNextPage}
4858}
4859
4860// IdentityProviderUpdateParameters parameters supplied to update Identity Provider
4861type IdentityProviderUpdateParameters struct {
4862	// IdentityProviderUpdateProperties - Identity Provider update properties.
4863	*IdentityProviderUpdateProperties `json:"properties,omitempty"`
4864}
4865
4866// MarshalJSON is the custom marshaler for IdentityProviderUpdateParameters.
4867func (ipup IdentityProviderUpdateParameters) MarshalJSON() ([]byte, error) {
4868	objectMap := make(map[string]interface{})
4869	if ipup.IdentityProviderUpdateProperties != nil {
4870		objectMap["properties"] = ipup.IdentityProviderUpdateProperties
4871	}
4872	return json.Marshal(objectMap)
4873}
4874
4875// UnmarshalJSON is the custom unmarshaler for IdentityProviderUpdateParameters struct.
4876func (ipup *IdentityProviderUpdateParameters) UnmarshalJSON(body []byte) error {
4877	var m map[string]*json.RawMessage
4878	err := json.Unmarshal(body, &m)
4879	if err != nil {
4880		return err
4881	}
4882	for k, v := range m {
4883		switch k {
4884		case "properties":
4885			if v != nil {
4886				var identityProviderUpdateProperties IdentityProviderUpdateProperties
4887				err = json.Unmarshal(*v, &identityProviderUpdateProperties)
4888				if err != nil {
4889					return err
4890				}
4891				ipup.IdentityProviderUpdateProperties = &identityProviderUpdateProperties
4892			}
4893		}
4894	}
4895
4896	return nil
4897}
4898
4899// IdentityProviderUpdateProperties parameters supplied to the Update Identity Provider operation.
4900type IdentityProviderUpdateProperties struct {
4901	// 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.
4902	ClientID *string `json:"clientId,omitempty"`
4903	// 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.
4904	ClientSecret *string `json:"clientSecret,omitempty"`
4905	// Type - Identity Provider Type identifier. Possible values include: 'Facebook', 'Google', 'Microsoft', 'Twitter', 'Aad', 'AadB2C'
4906	Type IdentityProviderType `json:"type,omitempty"`
4907	// AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login.
4908	AllowedTenants *[]string `json:"allowedTenants,omitempty"`
4909	// Authority - OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
4910	Authority *string `json:"authority,omitempty"`
4911	// SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider.
4912	SignupPolicyName *string `json:"signupPolicyName,omitempty"`
4913	// SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider.
4914	SigninPolicyName *string `json:"signinPolicyName,omitempty"`
4915	// ProfileEditingPolicyName - Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
4916	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`
4917	// PasswordResetPolicyName - Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
4918	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`
4919}
4920
4921// IssueAttachmentCollection paged Issue Attachment list representation.
4922type IssueAttachmentCollection struct {
4923	autorest.Response `json:"-"`
4924	// Value - READ-ONLY; Issue Attachment values.
4925	Value *[]IssueAttachmentContract `json:"value,omitempty"`
4926	// NextLink - READ-ONLY; Next page link if any.
4927	NextLink *string `json:"nextLink,omitempty"`
4928}
4929
4930// IssueAttachmentCollectionIterator provides access to a complete listing of IssueAttachmentContract
4931// values.
4932type IssueAttachmentCollectionIterator struct {
4933	i    int
4934	page IssueAttachmentCollectionPage
4935}
4936
4937// NextWithContext advances to the next value.  If there was an error making
4938// the request the iterator does not advance and the error is returned.
4939func (iter *IssueAttachmentCollectionIterator) NextWithContext(ctx context.Context) (err error) {
4940	if tracing.IsEnabled() {
4941		ctx = tracing.StartSpan(ctx, fqdn+"/IssueAttachmentCollectionIterator.NextWithContext")
4942		defer func() {
4943			sc := -1
4944			if iter.Response().Response.Response != nil {
4945				sc = iter.Response().Response.Response.StatusCode
4946			}
4947			tracing.EndSpan(ctx, sc, err)
4948		}()
4949	}
4950	iter.i++
4951	if iter.i < len(iter.page.Values()) {
4952		return nil
4953	}
4954	err = iter.page.NextWithContext(ctx)
4955	if err != nil {
4956		iter.i--
4957		return err
4958	}
4959	iter.i = 0
4960	return nil
4961}
4962
4963// Next advances to the next value.  If there was an error making
4964// the request the iterator does not advance and the error is returned.
4965// Deprecated: Use NextWithContext() instead.
4966func (iter *IssueAttachmentCollectionIterator) Next() error {
4967	return iter.NextWithContext(context.Background())
4968}
4969
4970// NotDone returns true if the enumeration should be started or is not yet complete.
4971func (iter IssueAttachmentCollectionIterator) NotDone() bool {
4972	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4973}
4974
4975// Response returns the raw server response from the last page request.
4976func (iter IssueAttachmentCollectionIterator) Response() IssueAttachmentCollection {
4977	return iter.page.Response()
4978}
4979
4980// Value returns the current value or a zero-initialized value if the
4981// iterator has advanced beyond the end of the collection.
4982func (iter IssueAttachmentCollectionIterator) Value() IssueAttachmentContract {
4983	if !iter.page.NotDone() {
4984		return IssueAttachmentContract{}
4985	}
4986	return iter.page.Values()[iter.i]
4987}
4988
4989// Creates a new instance of the IssueAttachmentCollectionIterator type.
4990func NewIssueAttachmentCollectionIterator(page IssueAttachmentCollectionPage) IssueAttachmentCollectionIterator {
4991	return IssueAttachmentCollectionIterator{page: page}
4992}
4993
4994// IsEmpty returns true if the ListResult contains no values.
4995func (iac IssueAttachmentCollection) IsEmpty() bool {
4996	return iac.Value == nil || len(*iac.Value) == 0
4997}
4998
4999// issueAttachmentCollectionPreparer prepares a request to retrieve the next set of results.
5000// It returns nil if no more results exist.
5001func (iac IssueAttachmentCollection) issueAttachmentCollectionPreparer(ctx context.Context) (*http.Request, error) {
5002	if iac.NextLink == nil || len(to.String(iac.NextLink)) < 1 {
5003		return nil, nil
5004	}
5005	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5006		autorest.AsJSON(),
5007		autorest.AsGet(),
5008		autorest.WithBaseURL(to.String(iac.NextLink)))
5009}
5010
5011// IssueAttachmentCollectionPage contains a page of IssueAttachmentContract values.
5012type IssueAttachmentCollectionPage struct {
5013	fn  func(context.Context, IssueAttachmentCollection) (IssueAttachmentCollection, error)
5014	iac IssueAttachmentCollection
5015}
5016
5017// NextWithContext advances to the next page of values.  If there was an error making
5018// the request the page does not advance and the error is returned.
5019func (page *IssueAttachmentCollectionPage) NextWithContext(ctx context.Context) (err error) {
5020	if tracing.IsEnabled() {
5021		ctx = tracing.StartSpan(ctx, fqdn+"/IssueAttachmentCollectionPage.NextWithContext")
5022		defer func() {
5023			sc := -1
5024			if page.Response().Response.Response != nil {
5025				sc = page.Response().Response.Response.StatusCode
5026			}
5027			tracing.EndSpan(ctx, sc, err)
5028		}()
5029	}
5030	next, err := page.fn(ctx, page.iac)
5031	if err != nil {
5032		return err
5033	}
5034	page.iac = next
5035	return nil
5036}
5037
5038// Next advances to the next page of values.  If there was an error making
5039// the request the page does not advance and the error is returned.
5040// Deprecated: Use NextWithContext() instead.
5041func (page *IssueAttachmentCollectionPage) Next() error {
5042	return page.NextWithContext(context.Background())
5043}
5044
5045// NotDone returns true if the page enumeration should be started or is not yet complete.
5046func (page IssueAttachmentCollectionPage) NotDone() bool {
5047	return !page.iac.IsEmpty()
5048}
5049
5050// Response returns the raw server response from the last page request.
5051func (page IssueAttachmentCollectionPage) Response() IssueAttachmentCollection {
5052	return page.iac
5053}
5054
5055// Values returns the slice of values for the current page or nil if there are no values.
5056func (page IssueAttachmentCollectionPage) Values() []IssueAttachmentContract {
5057	if page.iac.IsEmpty() {
5058		return nil
5059	}
5060	return *page.iac.Value
5061}
5062
5063// Creates a new instance of the IssueAttachmentCollectionPage type.
5064func NewIssueAttachmentCollectionPage(getNextPage func(context.Context, IssueAttachmentCollection) (IssueAttachmentCollection, error)) IssueAttachmentCollectionPage {
5065	return IssueAttachmentCollectionPage{fn: getNextPage}
5066}
5067
5068// IssueAttachmentContract issue Attachment Contract details.
5069type IssueAttachmentContract struct {
5070	autorest.Response `json:"-"`
5071	// IssueAttachmentContractProperties - Properties of the Issue Attachment.
5072	*IssueAttachmentContractProperties `json:"properties,omitempty"`
5073	// ID - READ-ONLY; Resource ID.
5074	ID *string `json:"id,omitempty"`
5075	// Name - READ-ONLY; Resource name.
5076	Name *string `json:"name,omitempty"`
5077	// Type - READ-ONLY; Resource type for API Management resource.
5078	Type *string `json:"type,omitempty"`
5079}
5080
5081// MarshalJSON is the custom marshaler for IssueAttachmentContract.
5082func (iac IssueAttachmentContract) MarshalJSON() ([]byte, error) {
5083	objectMap := make(map[string]interface{})
5084	if iac.IssueAttachmentContractProperties != nil {
5085		objectMap["properties"] = iac.IssueAttachmentContractProperties
5086	}
5087	return json.Marshal(objectMap)
5088}
5089
5090// UnmarshalJSON is the custom unmarshaler for IssueAttachmentContract struct.
5091func (iac *IssueAttachmentContract) UnmarshalJSON(body []byte) error {
5092	var m map[string]*json.RawMessage
5093	err := json.Unmarshal(body, &m)
5094	if err != nil {
5095		return err
5096	}
5097	for k, v := range m {
5098		switch k {
5099		case "properties":
5100			if v != nil {
5101				var issueAttachmentContractProperties IssueAttachmentContractProperties
5102				err = json.Unmarshal(*v, &issueAttachmentContractProperties)
5103				if err != nil {
5104					return err
5105				}
5106				iac.IssueAttachmentContractProperties = &issueAttachmentContractProperties
5107			}
5108		case "id":
5109			if v != nil {
5110				var ID string
5111				err = json.Unmarshal(*v, &ID)
5112				if err != nil {
5113					return err
5114				}
5115				iac.ID = &ID
5116			}
5117		case "name":
5118			if v != nil {
5119				var name string
5120				err = json.Unmarshal(*v, &name)
5121				if err != nil {
5122					return err
5123				}
5124				iac.Name = &name
5125			}
5126		case "type":
5127			if v != nil {
5128				var typeVar string
5129				err = json.Unmarshal(*v, &typeVar)
5130				if err != nil {
5131					return err
5132				}
5133				iac.Type = &typeVar
5134			}
5135		}
5136	}
5137
5138	return nil
5139}
5140
5141// IssueAttachmentContractProperties issue Attachment contract Properties.
5142type IssueAttachmentContractProperties struct {
5143	// Title - Filename by which the binary data will be saved.
5144	Title *string `json:"title,omitempty"`
5145	// 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.
5146	ContentFormat *string `json:"contentFormat,omitempty"`
5147	// Content - An HTTP link or Base64-encoded binary data.
5148	Content *string `json:"content,omitempty"`
5149}
5150
5151// IssueCollection paged Issue list representation.
5152type IssueCollection struct {
5153	autorest.Response `json:"-"`
5154	// Value - READ-ONLY; Issue values.
5155	Value *[]IssueContract `json:"value,omitempty"`
5156	// NextLink - READ-ONLY; Next page link if any.
5157	NextLink *string `json:"nextLink,omitempty"`
5158}
5159
5160// IssueCollectionIterator provides access to a complete listing of IssueContract values.
5161type IssueCollectionIterator struct {
5162	i    int
5163	page IssueCollectionPage
5164}
5165
5166// NextWithContext advances to the next value.  If there was an error making
5167// the request the iterator does not advance and the error is returned.
5168func (iter *IssueCollectionIterator) NextWithContext(ctx context.Context) (err error) {
5169	if tracing.IsEnabled() {
5170		ctx = tracing.StartSpan(ctx, fqdn+"/IssueCollectionIterator.NextWithContext")
5171		defer func() {
5172			sc := -1
5173			if iter.Response().Response.Response != nil {
5174				sc = iter.Response().Response.Response.StatusCode
5175			}
5176			tracing.EndSpan(ctx, sc, err)
5177		}()
5178	}
5179	iter.i++
5180	if iter.i < len(iter.page.Values()) {
5181		return nil
5182	}
5183	err = iter.page.NextWithContext(ctx)
5184	if err != nil {
5185		iter.i--
5186		return err
5187	}
5188	iter.i = 0
5189	return nil
5190}
5191
5192// Next advances to the next value.  If there was an error making
5193// the request the iterator does not advance and the error is returned.
5194// Deprecated: Use NextWithContext() instead.
5195func (iter *IssueCollectionIterator) Next() error {
5196	return iter.NextWithContext(context.Background())
5197}
5198
5199// NotDone returns true if the enumeration should be started or is not yet complete.
5200func (iter IssueCollectionIterator) NotDone() bool {
5201	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5202}
5203
5204// Response returns the raw server response from the last page request.
5205func (iter IssueCollectionIterator) Response() IssueCollection {
5206	return iter.page.Response()
5207}
5208
5209// Value returns the current value or a zero-initialized value if the
5210// iterator has advanced beyond the end of the collection.
5211func (iter IssueCollectionIterator) Value() IssueContract {
5212	if !iter.page.NotDone() {
5213		return IssueContract{}
5214	}
5215	return iter.page.Values()[iter.i]
5216}
5217
5218// Creates a new instance of the IssueCollectionIterator type.
5219func NewIssueCollectionIterator(page IssueCollectionPage) IssueCollectionIterator {
5220	return IssueCollectionIterator{page: page}
5221}
5222
5223// IsEmpty returns true if the ListResult contains no values.
5224func (ic IssueCollection) IsEmpty() bool {
5225	return ic.Value == nil || len(*ic.Value) == 0
5226}
5227
5228// issueCollectionPreparer prepares a request to retrieve the next set of results.
5229// It returns nil if no more results exist.
5230func (ic IssueCollection) issueCollectionPreparer(ctx context.Context) (*http.Request, error) {
5231	if ic.NextLink == nil || len(to.String(ic.NextLink)) < 1 {
5232		return nil, nil
5233	}
5234	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5235		autorest.AsJSON(),
5236		autorest.AsGet(),
5237		autorest.WithBaseURL(to.String(ic.NextLink)))
5238}
5239
5240// IssueCollectionPage contains a page of IssueContract values.
5241type IssueCollectionPage struct {
5242	fn func(context.Context, IssueCollection) (IssueCollection, error)
5243	ic IssueCollection
5244}
5245
5246// NextWithContext advances to the next page of values.  If there was an error making
5247// the request the page does not advance and the error is returned.
5248func (page *IssueCollectionPage) NextWithContext(ctx context.Context) (err error) {
5249	if tracing.IsEnabled() {
5250		ctx = tracing.StartSpan(ctx, fqdn+"/IssueCollectionPage.NextWithContext")
5251		defer func() {
5252			sc := -1
5253			if page.Response().Response.Response != nil {
5254				sc = page.Response().Response.Response.StatusCode
5255			}
5256			tracing.EndSpan(ctx, sc, err)
5257		}()
5258	}
5259	next, err := page.fn(ctx, page.ic)
5260	if err != nil {
5261		return err
5262	}
5263	page.ic = next
5264	return nil
5265}
5266
5267// Next advances to the next page of values.  If there was an error making
5268// the request the page does not advance and the error is returned.
5269// Deprecated: Use NextWithContext() instead.
5270func (page *IssueCollectionPage) Next() error {
5271	return page.NextWithContext(context.Background())
5272}
5273
5274// NotDone returns true if the page enumeration should be started or is not yet complete.
5275func (page IssueCollectionPage) NotDone() bool {
5276	return !page.ic.IsEmpty()
5277}
5278
5279// Response returns the raw server response from the last page request.
5280func (page IssueCollectionPage) Response() IssueCollection {
5281	return page.ic
5282}
5283
5284// Values returns the slice of values for the current page or nil if there are no values.
5285func (page IssueCollectionPage) Values() []IssueContract {
5286	if page.ic.IsEmpty() {
5287		return nil
5288	}
5289	return *page.ic.Value
5290}
5291
5292// Creates a new instance of the IssueCollectionPage type.
5293func NewIssueCollectionPage(getNextPage func(context.Context, IssueCollection) (IssueCollection, error)) IssueCollectionPage {
5294	return IssueCollectionPage{fn: getNextPage}
5295}
5296
5297// IssueCommentCollection paged Issue Comment list representation.
5298type IssueCommentCollection struct {
5299	autorest.Response `json:"-"`
5300	// Value - READ-ONLY; Issue Comment values.
5301	Value *[]IssueCommentContract `json:"value,omitempty"`
5302	// NextLink - READ-ONLY; Next page link if any.
5303	NextLink *string `json:"nextLink,omitempty"`
5304}
5305
5306// IssueCommentCollectionIterator provides access to a complete listing of IssueCommentContract values.
5307type IssueCommentCollectionIterator struct {
5308	i    int
5309	page IssueCommentCollectionPage
5310}
5311
5312// NextWithContext advances to the next value.  If there was an error making
5313// the request the iterator does not advance and the error is returned.
5314func (iter *IssueCommentCollectionIterator) NextWithContext(ctx context.Context) (err error) {
5315	if tracing.IsEnabled() {
5316		ctx = tracing.StartSpan(ctx, fqdn+"/IssueCommentCollectionIterator.NextWithContext")
5317		defer func() {
5318			sc := -1
5319			if iter.Response().Response.Response != nil {
5320				sc = iter.Response().Response.Response.StatusCode
5321			}
5322			tracing.EndSpan(ctx, sc, err)
5323		}()
5324	}
5325	iter.i++
5326	if iter.i < len(iter.page.Values()) {
5327		return nil
5328	}
5329	err = iter.page.NextWithContext(ctx)
5330	if err != nil {
5331		iter.i--
5332		return err
5333	}
5334	iter.i = 0
5335	return nil
5336}
5337
5338// Next advances to the next value.  If there was an error making
5339// the request the iterator does not advance and the error is returned.
5340// Deprecated: Use NextWithContext() instead.
5341func (iter *IssueCommentCollectionIterator) Next() error {
5342	return iter.NextWithContext(context.Background())
5343}
5344
5345// NotDone returns true if the enumeration should be started or is not yet complete.
5346func (iter IssueCommentCollectionIterator) NotDone() bool {
5347	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5348}
5349
5350// Response returns the raw server response from the last page request.
5351func (iter IssueCommentCollectionIterator) Response() IssueCommentCollection {
5352	return iter.page.Response()
5353}
5354
5355// Value returns the current value or a zero-initialized value if the
5356// iterator has advanced beyond the end of the collection.
5357func (iter IssueCommentCollectionIterator) Value() IssueCommentContract {
5358	if !iter.page.NotDone() {
5359		return IssueCommentContract{}
5360	}
5361	return iter.page.Values()[iter.i]
5362}
5363
5364// Creates a new instance of the IssueCommentCollectionIterator type.
5365func NewIssueCommentCollectionIterator(page IssueCommentCollectionPage) IssueCommentCollectionIterator {
5366	return IssueCommentCollectionIterator{page: page}
5367}
5368
5369// IsEmpty returns true if the ListResult contains no values.
5370func (icc IssueCommentCollection) IsEmpty() bool {
5371	return icc.Value == nil || len(*icc.Value) == 0
5372}
5373
5374// issueCommentCollectionPreparer prepares a request to retrieve the next set of results.
5375// It returns nil if no more results exist.
5376func (icc IssueCommentCollection) issueCommentCollectionPreparer(ctx context.Context) (*http.Request, error) {
5377	if icc.NextLink == nil || len(to.String(icc.NextLink)) < 1 {
5378		return nil, nil
5379	}
5380	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5381		autorest.AsJSON(),
5382		autorest.AsGet(),
5383		autorest.WithBaseURL(to.String(icc.NextLink)))
5384}
5385
5386// IssueCommentCollectionPage contains a page of IssueCommentContract values.
5387type IssueCommentCollectionPage struct {
5388	fn  func(context.Context, IssueCommentCollection) (IssueCommentCollection, error)
5389	icc IssueCommentCollection
5390}
5391
5392// NextWithContext advances to the next page of values.  If there was an error making
5393// the request the page does not advance and the error is returned.
5394func (page *IssueCommentCollectionPage) NextWithContext(ctx context.Context) (err error) {
5395	if tracing.IsEnabled() {
5396		ctx = tracing.StartSpan(ctx, fqdn+"/IssueCommentCollectionPage.NextWithContext")
5397		defer func() {
5398			sc := -1
5399			if page.Response().Response.Response != nil {
5400				sc = page.Response().Response.Response.StatusCode
5401			}
5402			tracing.EndSpan(ctx, sc, err)
5403		}()
5404	}
5405	next, err := page.fn(ctx, page.icc)
5406	if err != nil {
5407		return err
5408	}
5409	page.icc = next
5410	return nil
5411}
5412
5413// Next advances to the next page of values.  If there was an error making
5414// the request the page does not advance and the error is returned.
5415// Deprecated: Use NextWithContext() instead.
5416func (page *IssueCommentCollectionPage) Next() error {
5417	return page.NextWithContext(context.Background())
5418}
5419
5420// NotDone returns true if the page enumeration should be started or is not yet complete.
5421func (page IssueCommentCollectionPage) NotDone() bool {
5422	return !page.icc.IsEmpty()
5423}
5424
5425// Response returns the raw server response from the last page request.
5426func (page IssueCommentCollectionPage) Response() IssueCommentCollection {
5427	return page.icc
5428}
5429
5430// Values returns the slice of values for the current page or nil if there are no values.
5431func (page IssueCommentCollectionPage) Values() []IssueCommentContract {
5432	if page.icc.IsEmpty() {
5433		return nil
5434	}
5435	return *page.icc.Value
5436}
5437
5438// Creates a new instance of the IssueCommentCollectionPage type.
5439func NewIssueCommentCollectionPage(getNextPage func(context.Context, IssueCommentCollection) (IssueCommentCollection, error)) IssueCommentCollectionPage {
5440	return IssueCommentCollectionPage{fn: getNextPage}
5441}
5442
5443// IssueCommentContract issue Comment Contract details.
5444type IssueCommentContract struct {
5445	autorest.Response `json:"-"`
5446	// IssueCommentContractProperties - Properties of the Issue Comment.
5447	*IssueCommentContractProperties `json:"properties,omitempty"`
5448	// ID - READ-ONLY; Resource ID.
5449	ID *string `json:"id,omitempty"`
5450	// Name - READ-ONLY; Resource name.
5451	Name *string `json:"name,omitempty"`
5452	// Type - READ-ONLY; Resource type for API Management resource.
5453	Type *string `json:"type,omitempty"`
5454}
5455
5456// MarshalJSON is the custom marshaler for IssueCommentContract.
5457func (icc IssueCommentContract) MarshalJSON() ([]byte, error) {
5458	objectMap := make(map[string]interface{})
5459	if icc.IssueCommentContractProperties != nil {
5460		objectMap["properties"] = icc.IssueCommentContractProperties
5461	}
5462	return json.Marshal(objectMap)
5463}
5464
5465// UnmarshalJSON is the custom unmarshaler for IssueCommentContract struct.
5466func (icc *IssueCommentContract) UnmarshalJSON(body []byte) error {
5467	var m map[string]*json.RawMessage
5468	err := json.Unmarshal(body, &m)
5469	if err != nil {
5470		return err
5471	}
5472	for k, v := range m {
5473		switch k {
5474		case "properties":
5475			if v != nil {
5476				var issueCommentContractProperties IssueCommentContractProperties
5477				err = json.Unmarshal(*v, &issueCommentContractProperties)
5478				if err != nil {
5479					return err
5480				}
5481				icc.IssueCommentContractProperties = &issueCommentContractProperties
5482			}
5483		case "id":
5484			if v != nil {
5485				var ID string
5486				err = json.Unmarshal(*v, &ID)
5487				if err != nil {
5488					return err
5489				}
5490				icc.ID = &ID
5491			}
5492		case "name":
5493			if v != nil {
5494				var name string
5495				err = json.Unmarshal(*v, &name)
5496				if err != nil {
5497					return err
5498				}
5499				icc.Name = &name
5500			}
5501		case "type":
5502			if v != nil {
5503				var typeVar string
5504				err = json.Unmarshal(*v, &typeVar)
5505				if err != nil {
5506					return err
5507				}
5508				icc.Type = &typeVar
5509			}
5510		}
5511	}
5512
5513	return nil
5514}
5515
5516// IssueCommentContractProperties issue Comment contract Properties.
5517type IssueCommentContractProperties struct {
5518	// Text - Comment text.
5519	Text *string `json:"text,omitempty"`
5520	// CreatedDate - Date and time when the comment was created.
5521	CreatedDate *date.Time `json:"createdDate,omitempty"`
5522	// UserID - A resource identifier for the user who left the comment.
5523	UserID *string `json:"userId,omitempty"`
5524}
5525
5526// IssueContract issue Contract details.
5527type IssueContract struct {
5528	autorest.Response `json:"-"`
5529	// IssueContractProperties - Properties of the Issue.
5530	*IssueContractProperties `json:"properties,omitempty"`
5531	// ID - READ-ONLY; Resource ID.
5532	ID *string `json:"id,omitempty"`
5533	// Name - READ-ONLY; Resource name.
5534	Name *string `json:"name,omitempty"`
5535	// Type - READ-ONLY; Resource type for API Management resource.
5536	Type *string `json:"type,omitempty"`
5537}
5538
5539// MarshalJSON is the custom marshaler for IssueContract.
5540func (ic IssueContract) MarshalJSON() ([]byte, error) {
5541	objectMap := make(map[string]interface{})
5542	if ic.IssueContractProperties != nil {
5543		objectMap["properties"] = ic.IssueContractProperties
5544	}
5545	return json.Marshal(objectMap)
5546}
5547
5548// UnmarshalJSON is the custom unmarshaler for IssueContract struct.
5549func (ic *IssueContract) UnmarshalJSON(body []byte) error {
5550	var m map[string]*json.RawMessage
5551	err := json.Unmarshal(body, &m)
5552	if err != nil {
5553		return err
5554	}
5555	for k, v := range m {
5556		switch k {
5557		case "properties":
5558			if v != nil {
5559				var issueContractProperties IssueContractProperties
5560				err = json.Unmarshal(*v, &issueContractProperties)
5561				if err != nil {
5562					return err
5563				}
5564				ic.IssueContractProperties = &issueContractProperties
5565			}
5566		case "id":
5567			if v != nil {
5568				var ID string
5569				err = json.Unmarshal(*v, &ID)
5570				if err != nil {
5571					return err
5572				}
5573				ic.ID = &ID
5574			}
5575		case "name":
5576			if v != nil {
5577				var name string
5578				err = json.Unmarshal(*v, &name)
5579				if err != nil {
5580					return err
5581				}
5582				ic.Name = &name
5583			}
5584		case "type":
5585			if v != nil {
5586				var typeVar string
5587				err = json.Unmarshal(*v, &typeVar)
5588				if err != nil {
5589					return err
5590				}
5591				ic.Type = &typeVar
5592			}
5593		}
5594	}
5595
5596	return nil
5597}
5598
5599// IssueContractBaseProperties issue contract Base Properties.
5600type IssueContractBaseProperties struct {
5601	// CreatedDate - Date and time when the issue was created.
5602	CreatedDate *date.Time `json:"createdDate,omitempty"`
5603	// State - Status of the issue. Possible values include: 'Proposed', 'Open', 'Removed', 'Resolved', 'Closed'
5604	State State `json:"state,omitempty"`
5605	// APIID - A resource identifier for the API the issue was created for.
5606	APIID *string `json:"apiId,omitempty"`
5607}
5608
5609// IssueContractProperties issue contract Properties.
5610type IssueContractProperties struct {
5611	// Title - The issue title.
5612	Title *string `json:"title,omitempty"`
5613	// Description - Text describing the issue.
5614	Description *string `json:"description,omitempty"`
5615	// UserID - A resource identifier for the user created the issue.
5616	UserID *string `json:"userId,omitempty"`
5617	// CreatedDate - Date and time when the issue was created.
5618	CreatedDate *date.Time `json:"createdDate,omitempty"`
5619	// State - Status of the issue. Possible values include: 'Proposed', 'Open', 'Removed', 'Resolved', 'Closed'
5620	State State `json:"state,omitempty"`
5621	// APIID - A resource identifier for the API the issue was created for.
5622	APIID *string `json:"apiId,omitempty"`
5623}
5624
5625// IssueUpdateContract issue update Parameters.
5626type IssueUpdateContract struct {
5627	// IssueUpdateContractProperties - Issue entity Update contract properties.
5628	*IssueUpdateContractProperties `json:"properties,omitempty"`
5629}
5630
5631// MarshalJSON is the custom marshaler for IssueUpdateContract.
5632func (iuc IssueUpdateContract) MarshalJSON() ([]byte, error) {
5633	objectMap := make(map[string]interface{})
5634	if iuc.IssueUpdateContractProperties != nil {
5635		objectMap["properties"] = iuc.IssueUpdateContractProperties
5636	}
5637	return json.Marshal(objectMap)
5638}
5639
5640// UnmarshalJSON is the custom unmarshaler for IssueUpdateContract struct.
5641func (iuc *IssueUpdateContract) UnmarshalJSON(body []byte) error {
5642	var m map[string]*json.RawMessage
5643	err := json.Unmarshal(body, &m)
5644	if err != nil {
5645		return err
5646	}
5647	for k, v := range m {
5648		switch k {
5649		case "properties":
5650			if v != nil {
5651				var issueUpdateContractProperties IssueUpdateContractProperties
5652				err = json.Unmarshal(*v, &issueUpdateContractProperties)
5653				if err != nil {
5654					return err
5655				}
5656				iuc.IssueUpdateContractProperties = &issueUpdateContractProperties
5657			}
5658		}
5659	}
5660
5661	return nil
5662}
5663
5664// IssueUpdateContractProperties issue contract Update Properties.
5665type IssueUpdateContractProperties struct {
5666	// Title - The issue title.
5667	Title *string `json:"title,omitempty"`
5668	// Description - Text describing the issue.
5669	Description *string `json:"description,omitempty"`
5670	// UserID - A resource identifier for the user created the issue.
5671	UserID *string `json:"userId,omitempty"`
5672	// CreatedDate - Date and time when the issue was created.
5673	CreatedDate *date.Time `json:"createdDate,omitempty"`
5674	// State - Status of the issue. Possible values include: 'Proposed', 'Open', 'Removed', 'Resolved', 'Closed'
5675	State State `json:"state,omitempty"`
5676	// APIID - A resource identifier for the API the issue was created for.
5677	APIID *string `json:"apiId,omitempty"`
5678}
5679
5680// ListNetworkStatusContractByLocation ...
5681type ListNetworkStatusContractByLocation struct {
5682	autorest.Response `json:"-"`
5683	Value             *[]NetworkStatusContractByLocation `json:"value,omitempty"`
5684}
5685
5686// LoggerCollection paged Logger list representation.
5687type LoggerCollection struct {
5688	autorest.Response `json:"-"`
5689	// Value - Logger values.
5690	Value *[]LoggerContract `json:"value,omitempty"`
5691	// Count - Total record count number across all pages.
5692	Count *int64 `json:"count,omitempty"`
5693	// NextLink - Next page link if any.
5694	NextLink *string `json:"nextLink,omitempty"`
5695}
5696
5697// LoggerCollectionIterator provides access to a complete listing of LoggerContract values.
5698type LoggerCollectionIterator struct {
5699	i    int
5700	page LoggerCollectionPage
5701}
5702
5703// NextWithContext advances to the next value.  If there was an error making
5704// the request the iterator does not advance and the error is returned.
5705func (iter *LoggerCollectionIterator) NextWithContext(ctx context.Context) (err error) {
5706	if tracing.IsEnabled() {
5707		ctx = tracing.StartSpan(ctx, fqdn+"/LoggerCollectionIterator.NextWithContext")
5708		defer func() {
5709			sc := -1
5710			if iter.Response().Response.Response != nil {
5711				sc = iter.Response().Response.Response.StatusCode
5712			}
5713			tracing.EndSpan(ctx, sc, err)
5714		}()
5715	}
5716	iter.i++
5717	if iter.i < len(iter.page.Values()) {
5718		return nil
5719	}
5720	err = iter.page.NextWithContext(ctx)
5721	if err != nil {
5722		iter.i--
5723		return err
5724	}
5725	iter.i = 0
5726	return nil
5727}
5728
5729// Next advances to the next value.  If there was an error making
5730// the request the iterator does not advance and the error is returned.
5731// Deprecated: Use NextWithContext() instead.
5732func (iter *LoggerCollectionIterator) Next() error {
5733	return iter.NextWithContext(context.Background())
5734}
5735
5736// NotDone returns true if the enumeration should be started or is not yet complete.
5737func (iter LoggerCollectionIterator) NotDone() bool {
5738	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5739}
5740
5741// Response returns the raw server response from the last page request.
5742func (iter LoggerCollectionIterator) Response() LoggerCollection {
5743	return iter.page.Response()
5744}
5745
5746// Value returns the current value or a zero-initialized value if the
5747// iterator has advanced beyond the end of the collection.
5748func (iter LoggerCollectionIterator) Value() LoggerContract {
5749	if !iter.page.NotDone() {
5750		return LoggerContract{}
5751	}
5752	return iter.page.Values()[iter.i]
5753}
5754
5755// Creates a new instance of the LoggerCollectionIterator type.
5756func NewLoggerCollectionIterator(page LoggerCollectionPage) LoggerCollectionIterator {
5757	return LoggerCollectionIterator{page: page}
5758}
5759
5760// IsEmpty returns true if the ListResult contains no values.
5761func (lc LoggerCollection) IsEmpty() bool {
5762	return lc.Value == nil || len(*lc.Value) == 0
5763}
5764
5765// loggerCollectionPreparer prepares a request to retrieve the next set of results.
5766// It returns nil if no more results exist.
5767func (lc LoggerCollection) loggerCollectionPreparer(ctx context.Context) (*http.Request, error) {
5768	if lc.NextLink == nil || len(to.String(lc.NextLink)) < 1 {
5769		return nil, nil
5770	}
5771	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5772		autorest.AsJSON(),
5773		autorest.AsGet(),
5774		autorest.WithBaseURL(to.String(lc.NextLink)))
5775}
5776
5777// LoggerCollectionPage contains a page of LoggerContract values.
5778type LoggerCollectionPage struct {
5779	fn func(context.Context, LoggerCollection) (LoggerCollection, error)
5780	lc LoggerCollection
5781}
5782
5783// NextWithContext advances to the next page of values.  If there was an error making
5784// the request the page does not advance and the error is returned.
5785func (page *LoggerCollectionPage) NextWithContext(ctx context.Context) (err error) {
5786	if tracing.IsEnabled() {
5787		ctx = tracing.StartSpan(ctx, fqdn+"/LoggerCollectionPage.NextWithContext")
5788		defer func() {
5789			sc := -1
5790			if page.Response().Response.Response != nil {
5791				sc = page.Response().Response.Response.StatusCode
5792			}
5793			tracing.EndSpan(ctx, sc, err)
5794		}()
5795	}
5796	next, err := page.fn(ctx, page.lc)
5797	if err != nil {
5798		return err
5799	}
5800	page.lc = next
5801	return nil
5802}
5803
5804// Next advances to the next page of values.  If there was an error making
5805// the request the page does not advance and the error is returned.
5806// Deprecated: Use NextWithContext() instead.
5807func (page *LoggerCollectionPage) Next() error {
5808	return page.NextWithContext(context.Background())
5809}
5810
5811// NotDone returns true if the page enumeration should be started or is not yet complete.
5812func (page LoggerCollectionPage) NotDone() bool {
5813	return !page.lc.IsEmpty()
5814}
5815
5816// Response returns the raw server response from the last page request.
5817func (page LoggerCollectionPage) Response() LoggerCollection {
5818	return page.lc
5819}
5820
5821// Values returns the slice of values for the current page or nil if there are no values.
5822func (page LoggerCollectionPage) Values() []LoggerContract {
5823	if page.lc.IsEmpty() {
5824		return nil
5825	}
5826	return *page.lc.Value
5827}
5828
5829// Creates a new instance of the LoggerCollectionPage type.
5830func NewLoggerCollectionPage(getNextPage func(context.Context, LoggerCollection) (LoggerCollection, error)) LoggerCollectionPage {
5831	return LoggerCollectionPage{fn: getNextPage}
5832}
5833
5834// LoggerContract logger details.
5835type LoggerContract struct {
5836	autorest.Response `json:"-"`
5837	// LoggerContractProperties - Logger entity contract properties.
5838	*LoggerContractProperties `json:"properties,omitempty"`
5839	// ID - READ-ONLY; Resource ID.
5840	ID *string `json:"id,omitempty"`
5841	// Name - READ-ONLY; Resource name.
5842	Name *string `json:"name,omitempty"`
5843	// Type - READ-ONLY; Resource type for API Management resource.
5844	Type *string `json:"type,omitempty"`
5845}
5846
5847// MarshalJSON is the custom marshaler for LoggerContract.
5848func (lc LoggerContract) MarshalJSON() ([]byte, error) {
5849	objectMap := make(map[string]interface{})
5850	if lc.LoggerContractProperties != nil {
5851		objectMap["properties"] = lc.LoggerContractProperties
5852	}
5853	return json.Marshal(objectMap)
5854}
5855
5856// UnmarshalJSON is the custom unmarshaler for LoggerContract struct.
5857func (lc *LoggerContract) UnmarshalJSON(body []byte) error {
5858	var m map[string]*json.RawMessage
5859	err := json.Unmarshal(body, &m)
5860	if err != nil {
5861		return err
5862	}
5863	for k, v := range m {
5864		switch k {
5865		case "properties":
5866			if v != nil {
5867				var loggerContractProperties LoggerContractProperties
5868				err = json.Unmarshal(*v, &loggerContractProperties)
5869				if err != nil {
5870					return err
5871				}
5872				lc.LoggerContractProperties = &loggerContractProperties
5873			}
5874		case "id":
5875			if v != nil {
5876				var ID string
5877				err = json.Unmarshal(*v, &ID)
5878				if err != nil {
5879					return err
5880				}
5881				lc.ID = &ID
5882			}
5883		case "name":
5884			if v != nil {
5885				var name string
5886				err = json.Unmarshal(*v, &name)
5887				if err != nil {
5888					return err
5889				}
5890				lc.Name = &name
5891			}
5892		case "type":
5893			if v != nil {
5894				var typeVar string
5895				err = json.Unmarshal(*v, &typeVar)
5896				if err != nil {
5897					return err
5898				}
5899				lc.Type = &typeVar
5900			}
5901		}
5902	}
5903
5904	return nil
5905}
5906
5907// LoggerContractProperties the Logger entity in API Management represents an event sink that you can use
5908// to log API Management events. Currently the Logger entity supports logging API Management events to
5909// Azure Event Hubs.
5910type LoggerContractProperties struct {
5911	// LoggerType - Logger type. Possible values include: 'AzureEventHub', 'ApplicationInsights'
5912	LoggerType LoggerType `json:"loggerType,omitempty"`
5913	// Description - Logger description.
5914	Description *string `json:"description,omitempty"`
5915	// Credentials - The name and SendRule connection string of the event hub for azureEventHub logger.
5916	// Instrumentation key for applicationInsights logger.
5917	Credentials map[string]*string `json:"credentials"`
5918	// IsBuffered - Whether records are buffered in the logger before publishing. Default is assumed to be true.
5919	IsBuffered *bool `json:"isBuffered,omitempty"`
5920	// ResourceID - Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
5921	ResourceID *string `json:"resourceId,omitempty"`
5922}
5923
5924// MarshalJSON is the custom marshaler for LoggerContractProperties.
5925func (lcp LoggerContractProperties) MarshalJSON() ([]byte, error) {
5926	objectMap := make(map[string]interface{})
5927	if lcp.LoggerType != "" {
5928		objectMap["loggerType"] = lcp.LoggerType
5929	}
5930	if lcp.Description != nil {
5931		objectMap["description"] = lcp.Description
5932	}
5933	if lcp.Credentials != nil {
5934		objectMap["credentials"] = lcp.Credentials
5935	}
5936	if lcp.IsBuffered != nil {
5937		objectMap["isBuffered"] = lcp.IsBuffered
5938	}
5939	if lcp.ResourceID != nil {
5940		objectMap["resourceId"] = lcp.ResourceID
5941	}
5942	return json.Marshal(objectMap)
5943}
5944
5945// LoggerUpdateContract logger update contract.
5946type LoggerUpdateContract struct {
5947	// LoggerUpdateParameters - Logger entity update contract properties.
5948	*LoggerUpdateParameters `json:"properties,omitempty"`
5949}
5950
5951// MarshalJSON is the custom marshaler for LoggerUpdateContract.
5952func (luc LoggerUpdateContract) MarshalJSON() ([]byte, error) {
5953	objectMap := make(map[string]interface{})
5954	if luc.LoggerUpdateParameters != nil {
5955		objectMap["properties"] = luc.LoggerUpdateParameters
5956	}
5957	return json.Marshal(objectMap)
5958}
5959
5960// UnmarshalJSON is the custom unmarshaler for LoggerUpdateContract struct.
5961func (luc *LoggerUpdateContract) UnmarshalJSON(body []byte) error {
5962	var m map[string]*json.RawMessage
5963	err := json.Unmarshal(body, &m)
5964	if err != nil {
5965		return err
5966	}
5967	for k, v := range m {
5968		switch k {
5969		case "properties":
5970			if v != nil {
5971				var loggerUpdateParameters LoggerUpdateParameters
5972				err = json.Unmarshal(*v, &loggerUpdateParameters)
5973				if err != nil {
5974					return err
5975				}
5976				luc.LoggerUpdateParameters = &loggerUpdateParameters
5977			}
5978		}
5979	}
5980
5981	return nil
5982}
5983
5984// LoggerUpdateParameters parameters supplied to the Update Logger operation.
5985type LoggerUpdateParameters struct {
5986	// LoggerType - Logger type. Possible values include: 'AzureEventHub', 'ApplicationInsights'
5987	LoggerType LoggerType `json:"loggerType,omitempty"`
5988	// Description - Logger description.
5989	Description *string `json:"description,omitempty"`
5990	// Credentials - Logger credentials.
5991	Credentials map[string]*string `json:"credentials"`
5992	// IsBuffered - Whether records are buffered in the logger before publishing. Default is assumed to be true.
5993	IsBuffered *bool `json:"isBuffered,omitempty"`
5994}
5995
5996// MarshalJSON is the custom marshaler for LoggerUpdateParameters.
5997func (lup LoggerUpdateParameters) MarshalJSON() ([]byte, error) {
5998	objectMap := make(map[string]interface{})
5999	if lup.LoggerType != "" {
6000		objectMap["loggerType"] = lup.LoggerType
6001	}
6002	if lup.Description != nil {
6003		objectMap["description"] = lup.Description
6004	}
6005	if lup.Credentials != nil {
6006		objectMap["credentials"] = lup.Credentials
6007	}
6008	if lup.IsBuffered != nil {
6009		objectMap["isBuffered"] = lup.IsBuffered
6010	}
6011	return json.Marshal(objectMap)
6012}
6013
6014// NetworkStatusContract network Status details.
6015type NetworkStatusContract struct {
6016	autorest.Response `json:"-"`
6017	// DNSServers - Gets the list of DNS servers IPV4 addresses.
6018	DNSServers *[]string `json:"dnsServers,omitempty"`
6019	// ConnectivityStatus - Gets the list of Connectivity Status to the Resources on which the service depends upon.
6020	ConnectivityStatus *[]ConnectivityStatusContract `json:"connectivityStatus,omitempty"`
6021}
6022
6023// NetworkStatusContractByLocation network Status in the Location
6024type NetworkStatusContractByLocation struct {
6025	// Location - Location of service
6026	Location *string `json:"location,omitempty"`
6027	// NetworkStatus - Network status in Location
6028	NetworkStatus *NetworkStatusContract `json:"networkStatus,omitempty"`
6029}
6030
6031// NotificationCollection paged Notification list representation.
6032type NotificationCollection struct {
6033	autorest.Response `json:"-"`
6034	// Value - Page values.
6035	Value *[]NotificationContract `json:"value,omitempty"`
6036	// NextLink - Next page link if any.
6037	NextLink *string `json:"nextLink,omitempty"`
6038}
6039
6040// NotificationCollectionIterator provides access to a complete listing of NotificationContract values.
6041type NotificationCollectionIterator struct {
6042	i    int
6043	page NotificationCollectionPage
6044}
6045
6046// NextWithContext advances to the next value.  If there was an error making
6047// the request the iterator does not advance and the error is returned.
6048func (iter *NotificationCollectionIterator) NextWithContext(ctx context.Context) (err error) {
6049	if tracing.IsEnabled() {
6050		ctx = tracing.StartSpan(ctx, fqdn+"/NotificationCollectionIterator.NextWithContext")
6051		defer func() {
6052			sc := -1
6053			if iter.Response().Response.Response != nil {
6054				sc = iter.Response().Response.Response.StatusCode
6055			}
6056			tracing.EndSpan(ctx, sc, err)
6057		}()
6058	}
6059	iter.i++
6060	if iter.i < len(iter.page.Values()) {
6061		return nil
6062	}
6063	err = iter.page.NextWithContext(ctx)
6064	if err != nil {
6065		iter.i--
6066		return err
6067	}
6068	iter.i = 0
6069	return nil
6070}
6071
6072// Next advances to the next value.  If there was an error making
6073// the request the iterator does not advance and the error is returned.
6074// Deprecated: Use NextWithContext() instead.
6075func (iter *NotificationCollectionIterator) Next() error {
6076	return iter.NextWithContext(context.Background())
6077}
6078
6079// NotDone returns true if the enumeration should be started or is not yet complete.
6080func (iter NotificationCollectionIterator) NotDone() bool {
6081	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6082}
6083
6084// Response returns the raw server response from the last page request.
6085func (iter NotificationCollectionIterator) Response() NotificationCollection {
6086	return iter.page.Response()
6087}
6088
6089// Value returns the current value or a zero-initialized value if the
6090// iterator has advanced beyond the end of the collection.
6091func (iter NotificationCollectionIterator) Value() NotificationContract {
6092	if !iter.page.NotDone() {
6093		return NotificationContract{}
6094	}
6095	return iter.page.Values()[iter.i]
6096}
6097
6098// Creates a new instance of the NotificationCollectionIterator type.
6099func NewNotificationCollectionIterator(page NotificationCollectionPage) NotificationCollectionIterator {
6100	return NotificationCollectionIterator{page: page}
6101}
6102
6103// IsEmpty returns true if the ListResult contains no values.
6104func (nc NotificationCollection) IsEmpty() bool {
6105	return nc.Value == nil || len(*nc.Value) == 0
6106}
6107
6108// notificationCollectionPreparer prepares a request to retrieve the next set of results.
6109// It returns nil if no more results exist.
6110func (nc NotificationCollection) notificationCollectionPreparer(ctx context.Context) (*http.Request, error) {
6111	if nc.NextLink == nil || len(to.String(nc.NextLink)) < 1 {
6112		return nil, nil
6113	}
6114	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6115		autorest.AsJSON(),
6116		autorest.AsGet(),
6117		autorest.WithBaseURL(to.String(nc.NextLink)))
6118}
6119
6120// NotificationCollectionPage contains a page of NotificationContract values.
6121type NotificationCollectionPage struct {
6122	fn func(context.Context, NotificationCollection) (NotificationCollection, error)
6123	nc NotificationCollection
6124}
6125
6126// NextWithContext advances to the next page of values.  If there was an error making
6127// the request the page does not advance and the error is returned.
6128func (page *NotificationCollectionPage) NextWithContext(ctx context.Context) (err error) {
6129	if tracing.IsEnabled() {
6130		ctx = tracing.StartSpan(ctx, fqdn+"/NotificationCollectionPage.NextWithContext")
6131		defer func() {
6132			sc := -1
6133			if page.Response().Response.Response != nil {
6134				sc = page.Response().Response.Response.StatusCode
6135			}
6136			tracing.EndSpan(ctx, sc, err)
6137		}()
6138	}
6139	next, err := page.fn(ctx, page.nc)
6140	if err != nil {
6141		return err
6142	}
6143	page.nc = next
6144	return nil
6145}
6146
6147// Next advances to the next page of values.  If there was an error making
6148// the request the page does not advance and the error is returned.
6149// Deprecated: Use NextWithContext() instead.
6150func (page *NotificationCollectionPage) Next() error {
6151	return page.NextWithContext(context.Background())
6152}
6153
6154// NotDone returns true if the page enumeration should be started or is not yet complete.
6155func (page NotificationCollectionPage) NotDone() bool {
6156	return !page.nc.IsEmpty()
6157}
6158
6159// Response returns the raw server response from the last page request.
6160func (page NotificationCollectionPage) Response() NotificationCollection {
6161	return page.nc
6162}
6163
6164// Values returns the slice of values for the current page or nil if there are no values.
6165func (page NotificationCollectionPage) Values() []NotificationContract {
6166	if page.nc.IsEmpty() {
6167		return nil
6168	}
6169	return *page.nc.Value
6170}
6171
6172// Creates a new instance of the NotificationCollectionPage type.
6173func NewNotificationCollectionPage(getNextPage func(context.Context, NotificationCollection) (NotificationCollection, error)) NotificationCollectionPage {
6174	return NotificationCollectionPage{fn: getNextPage}
6175}
6176
6177// NotificationContract notification details.
6178type NotificationContract struct {
6179	autorest.Response `json:"-"`
6180	// NotificationContractProperties - Notification entity contract properties.
6181	*NotificationContractProperties `json:"properties,omitempty"`
6182	// ID - READ-ONLY; Resource ID.
6183	ID *string `json:"id,omitempty"`
6184	// Name - READ-ONLY; Resource name.
6185	Name *string `json:"name,omitempty"`
6186	// Type - READ-ONLY; Resource type for API Management resource.
6187	Type *string `json:"type,omitempty"`
6188}
6189
6190// MarshalJSON is the custom marshaler for NotificationContract.
6191func (nc NotificationContract) MarshalJSON() ([]byte, error) {
6192	objectMap := make(map[string]interface{})
6193	if nc.NotificationContractProperties != nil {
6194		objectMap["properties"] = nc.NotificationContractProperties
6195	}
6196	return json.Marshal(objectMap)
6197}
6198
6199// UnmarshalJSON is the custom unmarshaler for NotificationContract struct.
6200func (nc *NotificationContract) UnmarshalJSON(body []byte) error {
6201	var m map[string]*json.RawMessage
6202	err := json.Unmarshal(body, &m)
6203	if err != nil {
6204		return err
6205	}
6206	for k, v := range m {
6207		switch k {
6208		case "properties":
6209			if v != nil {
6210				var notificationContractProperties NotificationContractProperties
6211				err = json.Unmarshal(*v, &notificationContractProperties)
6212				if err != nil {
6213					return err
6214				}
6215				nc.NotificationContractProperties = &notificationContractProperties
6216			}
6217		case "id":
6218			if v != nil {
6219				var ID string
6220				err = json.Unmarshal(*v, &ID)
6221				if err != nil {
6222					return err
6223				}
6224				nc.ID = &ID
6225			}
6226		case "name":
6227			if v != nil {
6228				var name string
6229				err = json.Unmarshal(*v, &name)
6230				if err != nil {
6231					return err
6232				}
6233				nc.Name = &name
6234			}
6235		case "type":
6236			if v != nil {
6237				var typeVar string
6238				err = json.Unmarshal(*v, &typeVar)
6239				if err != nil {
6240					return err
6241				}
6242				nc.Type = &typeVar
6243			}
6244		}
6245	}
6246
6247	return nil
6248}
6249
6250// NotificationContractProperties notification Contract properties.
6251type NotificationContractProperties struct {
6252	// Title - Title of the Notification.
6253	Title *string `json:"title,omitempty"`
6254	// Description - Description of the Notification.
6255	Description *string `json:"description,omitempty"`
6256	// Recipients - Recipient Parameter values.
6257	Recipients *RecipientsContractProperties `json:"recipients,omitempty"`
6258}
6259
6260// OAuth2AuthenticationSettingsContract API OAuth2 Authentication settings details.
6261type OAuth2AuthenticationSettingsContract struct {
6262	// AuthorizationServerID - OAuth authorization server identifier.
6263	AuthorizationServerID *string `json:"authorizationServerId,omitempty"`
6264	// Scope - operations scope.
6265	Scope *string `json:"scope,omitempty"`
6266}
6267
6268// OpenIDAuthenticationSettingsContract API OAuth2 Authentication settings details.
6269type OpenIDAuthenticationSettingsContract struct {
6270	// OpenidProviderID - OAuth authorization server identifier.
6271	OpenidProviderID *string `json:"openidProviderId,omitempty"`
6272	// BearerTokenSendingMethods - How to send token to the server.
6273	BearerTokenSendingMethods *[]BearerTokenSendingMethods `json:"bearerTokenSendingMethods,omitempty"`
6274}
6275
6276// OpenIDConnectProviderCollection paged OpenIdProviders list representation.
6277type OpenIDConnectProviderCollection struct {
6278	autorest.Response `json:"-"`
6279	// Value - Page values.
6280	Value *[]OpenidConnectProviderContract `json:"value,omitempty"`
6281	// NextLink - Next page link if any.
6282	NextLink *string `json:"nextLink,omitempty"`
6283}
6284
6285// OpenIDConnectProviderCollectionIterator provides access to a complete listing of
6286// OpenidConnectProviderContract values.
6287type OpenIDConnectProviderCollectionIterator struct {
6288	i    int
6289	page OpenIDConnectProviderCollectionPage
6290}
6291
6292// NextWithContext advances to the next value.  If there was an error making
6293// the request the iterator does not advance and the error is returned.
6294func (iter *OpenIDConnectProviderCollectionIterator) NextWithContext(ctx context.Context) (err error) {
6295	if tracing.IsEnabled() {
6296		ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderCollectionIterator.NextWithContext")
6297		defer func() {
6298			sc := -1
6299			if iter.Response().Response.Response != nil {
6300				sc = iter.Response().Response.Response.StatusCode
6301			}
6302			tracing.EndSpan(ctx, sc, err)
6303		}()
6304	}
6305	iter.i++
6306	if iter.i < len(iter.page.Values()) {
6307		return nil
6308	}
6309	err = iter.page.NextWithContext(ctx)
6310	if err != nil {
6311		iter.i--
6312		return err
6313	}
6314	iter.i = 0
6315	return nil
6316}
6317
6318// Next advances to the next value.  If there was an error making
6319// the request the iterator does not advance and the error is returned.
6320// Deprecated: Use NextWithContext() instead.
6321func (iter *OpenIDConnectProviderCollectionIterator) Next() error {
6322	return iter.NextWithContext(context.Background())
6323}
6324
6325// NotDone returns true if the enumeration should be started or is not yet complete.
6326func (iter OpenIDConnectProviderCollectionIterator) NotDone() bool {
6327	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6328}
6329
6330// Response returns the raw server response from the last page request.
6331func (iter OpenIDConnectProviderCollectionIterator) Response() OpenIDConnectProviderCollection {
6332	return iter.page.Response()
6333}
6334
6335// Value returns the current value or a zero-initialized value if the
6336// iterator has advanced beyond the end of the collection.
6337func (iter OpenIDConnectProviderCollectionIterator) Value() OpenidConnectProviderContract {
6338	if !iter.page.NotDone() {
6339		return OpenidConnectProviderContract{}
6340	}
6341	return iter.page.Values()[iter.i]
6342}
6343
6344// Creates a new instance of the OpenIDConnectProviderCollectionIterator type.
6345func NewOpenIDConnectProviderCollectionIterator(page OpenIDConnectProviderCollectionPage) OpenIDConnectProviderCollectionIterator {
6346	return OpenIDConnectProviderCollectionIterator{page: page}
6347}
6348
6349// IsEmpty returns true if the ListResult contains no values.
6350func (oicpc OpenIDConnectProviderCollection) IsEmpty() bool {
6351	return oicpc.Value == nil || len(*oicpc.Value) == 0
6352}
6353
6354// openIDConnectProviderCollectionPreparer prepares a request to retrieve the next set of results.
6355// It returns nil if no more results exist.
6356func (oicpc OpenIDConnectProviderCollection) openIDConnectProviderCollectionPreparer(ctx context.Context) (*http.Request, error) {
6357	if oicpc.NextLink == nil || len(to.String(oicpc.NextLink)) < 1 {
6358		return nil, nil
6359	}
6360	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6361		autorest.AsJSON(),
6362		autorest.AsGet(),
6363		autorest.WithBaseURL(to.String(oicpc.NextLink)))
6364}
6365
6366// OpenIDConnectProviderCollectionPage contains a page of OpenidConnectProviderContract values.
6367type OpenIDConnectProviderCollectionPage struct {
6368	fn    func(context.Context, OpenIDConnectProviderCollection) (OpenIDConnectProviderCollection, error)
6369	oicpc OpenIDConnectProviderCollection
6370}
6371
6372// NextWithContext advances to the next page of values.  If there was an error making
6373// the request the page does not advance and the error is returned.
6374func (page *OpenIDConnectProviderCollectionPage) NextWithContext(ctx context.Context) (err error) {
6375	if tracing.IsEnabled() {
6376		ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderCollectionPage.NextWithContext")
6377		defer func() {
6378			sc := -1
6379			if page.Response().Response.Response != nil {
6380				sc = page.Response().Response.Response.StatusCode
6381			}
6382			tracing.EndSpan(ctx, sc, err)
6383		}()
6384	}
6385	next, err := page.fn(ctx, page.oicpc)
6386	if err != nil {
6387		return err
6388	}
6389	page.oicpc = next
6390	return nil
6391}
6392
6393// Next advances to the next page of values.  If there was an error making
6394// the request the page does not advance and the error is returned.
6395// Deprecated: Use NextWithContext() instead.
6396func (page *OpenIDConnectProviderCollectionPage) Next() error {
6397	return page.NextWithContext(context.Background())
6398}
6399
6400// NotDone returns true if the page enumeration should be started or is not yet complete.
6401func (page OpenIDConnectProviderCollectionPage) NotDone() bool {
6402	return !page.oicpc.IsEmpty()
6403}
6404
6405// Response returns the raw server response from the last page request.
6406func (page OpenIDConnectProviderCollectionPage) Response() OpenIDConnectProviderCollection {
6407	return page.oicpc
6408}
6409
6410// Values returns the slice of values for the current page or nil if there are no values.
6411func (page OpenIDConnectProviderCollectionPage) Values() []OpenidConnectProviderContract {
6412	if page.oicpc.IsEmpty() {
6413		return nil
6414	}
6415	return *page.oicpc.Value
6416}
6417
6418// Creates a new instance of the OpenIDConnectProviderCollectionPage type.
6419func NewOpenIDConnectProviderCollectionPage(getNextPage func(context.Context, OpenIDConnectProviderCollection) (OpenIDConnectProviderCollection, error)) OpenIDConnectProviderCollectionPage {
6420	return OpenIDConnectProviderCollectionPage{fn: getNextPage}
6421}
6422
6423// OpenidConnectProviderContract openId Connect Provider details.
6424type OpenidConnectProviderContract struct {
6425	autorest.Response `json:"-"`
6426	// OpenidConnectProviderContractProperties - OpenId Connect Provider contract properties.
6427	*OpenidConnectProviderContractProperties `json:"properties,omitempty"`
6428	// ID - READ-ONLY; Resource ID.
6429	ID *string `json:"id,omitempty"`
6430	// Name - READ-ONLY; Resource name.
6431	Name *string `json:"name,omitempty"`
6432	// Type - READ-ONLY; Resource type for API Management resource.
6433	Type *string `json:"type,omitempty"`
6434}
6435
6436// MarshalJSON is the custom marshaler for OpenidConnectProviderContract.
6437func (ocpc OpenidConnectProviderContract) MarshalJSON() ([]byte, error) {
6438	objectMap := make(map[string]interface{})
6439	if ocpc.OpenidConnectProviderContractProperties != nil {
6440		objectMap["properties"] = ocpc.OpenidConnectProviderContractProperties
6441	}
6442	return json.Marshal(objectMap)
6443}
6444
6445// UnmarshalJSON is the custom unmarshaler for OpenidConnectProviderContract struct.
6446func (ocpc *OpenidConnectProviderContract) UnmarshalJSON(body []byte) error {
6447	var m map[string]*json.RawMessage
6448	err := json.Unmarshal(body, &m)
6449	if err != nil {
6450		return err
6451	}
6452	for k, v := range m {
6453		switch k {
6454		case "properties":
6455			if v != nil {
6456				var openidConnectProviderContractProperties OpenidConnectProviderContractProperties
6457				err = json.Unmarshal(*v, &openidConnectProviderContractProperties)
6458				if err != nil {
6459					return err
6460				}
6461				ocpc.OpenidConnectProviderContractProperties = &openidConnectProviderContractProperties
6462			}
6463		case "id":
6464			if v != nil {
6465				var ID string
6466				err = json.Unmarshal(*v, &ID)
6467				if err != nil {
6468					return err
6469				}
6470				ocpc.ID = &ID
6471			}
6472		case "name":
6473			if v != nil {
6474				var name string
6475				err = json.Unmarshal(*v, &name)
6476				if err != nil {
6477					return err
6478				}
6479				ocpc.Name = &name
6480			}
6481		case "type":
6482			if v != nil {
6483				var typeVar string
6484				err = json.Unmarshal(*v, &typeVar)
6485				if err != nil {
6486					return err
6487				}
6488				ocpc.Type = &typeVar
6489			}
6490		}
6491	}
6492
6493	return nil
6494}
6495
6496// OpenidConnectProviderContractProperties openID Connect Providers Contract.
6497type OpenidConnectProviderContractProperties struct {
6498	// DisplayName - User-friendly OpenID Connect Provider name.
6499	DisplayName *string `json:"displayName,omitempty"`
6500	// Description - User-friendly description of OpenID Connect Provider.
6501	Description *string `json:"description,omitempty"`
6502	// MetadataEndpoint - Metadata endpoint URI.
6503	MetadataEndpoint *string `json:"metadataEndpoint,omitempty"`
6504	// ClientID - Client ID of developer console which is the client application.
6505	ClientID *string `json:"clientId,omitempty"`
6506	// ClientSecret - Client Secret of developer console which is the client application.
6507	ClientSecret *string `json:"clientSecret,omitempty"`
6508}
6509
6510// OpenidConnectProviderUpdateContract parameters supplied to the Update OpenID Connect Provider operation.
6511type OpenidConnectProviderUpdateContract struct {
6512	// OpenidConnectProviderUpdateContractProperties - OpenId Connect Provider Update contract properties.
6513	*OpenidConnectProviderUpdateContractProperties `json:"properties,omitempty"`
6514}
6515
6516// MarshalJSON is the custom marshaler for OpenidConnectProviderUpdateContract.
6517func (ocpuc OpenidConnectProviderUpdateContract) MarshalJSON() ([]byte, error) {
6518	objectMap := make(map[string]interface{})
6519	if ocpuc.OpenidConnectProviderUpdateContractProperties != nil {
6520		objectMap["properties"] = ocpuc.OpenidConnectProviderUpdateContractProperties
6521	}
6522	return json.Marshal(objectMap)
6523}
6524
6525// UnmarshalJSON is the custom unmarshaler for OpenidConnectProviderUpdateContract struct.
6526func (ocpuc *OpenidConnectProviderUpdateContract) UnmarshalJSON(body []byte) error {
6527	var m map[string]*json.RawMessage
6528	err := json.Unmarshal(body, &m)
6529	if err != nil {
6530		return err
6531	}
6532	for k, v := range m {
6533		switch k {
6534		case "properties":
6535			if v != nil {
6536				var openidConnectProviderUpdateContractProperties OpenidConnectProviderUpdateContractProperties
6537				err = json.Unmarshal(*v, &openidConnectProviderUpdateContractProperties)
6538				if err != nil {
6539					return err
6540				}
6541				ocpuc.OpenidConnectProviderUpdateContractProperties = &openidConnectProviderUpdateContractProperties
6542			}
6543		}
6544	}
6545
6546	return nil
6547}
6548
6549// OpenidConnectProviderUpdateContractProperties parameters supplied to the Update OpenID Connect Provider
6550// operation.
6551type OpenidConnectProviderUpdateContractProperties struct {
6552	// DisplayName - User-friendly OpenID Connect Provider name.
6553	DisplayName *string `json:"displayName,omitempty"`
6554	// Description - User-friendly description of OpenID Connect Provider.
6555	Description *string `json:"description,omitempty"`
6556	// MetadataEndpoint - Metadata endpoint URI.
6557	MetadataEndpoint *string `json:"metadataEndpoint,omitempty"`
6558	// ClientID - Client ID of developer console which is the client application.
6559	ClientID *string `json:"clientId,omitempty"`
6560	// ClientSecret - Client Secret of developer console which is the client application.
6561	ClientSecret *string `json:"clientSecret,omitempty"`
6562}
6563
6564// Operation REST API operation
6565type Operation struct {
6566	// Name - Operation name: {provider}/{resource}/{operation}
6567	Name *string `json:"name,omitempty"`
6568	// Display - The object that describes the operation.
6569	Display *OperationDisplay `json:"display,omitempty"`
6570	// Origin - The operation origin.
6571	Origin *string `json:"origin,omitempty"`
6572	// Properties - The operation properties.
6573	Properties interface{} `json:"properties,omitempty"`
6574}
6575
6576// OperationCollection paged Operation list representation.
6577type OperationCollection struct {
6578	autorest.Response `json:"-"`
6579	// Value - READ-ONLY; Page values.
6580	Value *[]OperationContract `json:"value,omitempty"`
6581	// NextLink - READ-ONLY; Next page link if any.
6582	NextLink *string `json:"nextLink,omitempty"`
6583}
6584
6585// OperationCollectionIterator provides access to a complete listing of OperationContract values.
6586type OperationCollectionIterator struct {
6587	i    int
6588	page OperationCollectionPage
6589}
6590
6591// NextWithContext advances to the next value.  If there was an error making
6592// the request the iterator does not advance and the error is returned.
6593func (iter *OperationCollectionIterator) NextWithContext(ctx context.Context) (err error) {
6594	if tracing.IsEnabled() {
6595		ctx = tracing.StartSpan(ctx, fqdn+"/OperationCollectionIterator.NextWithContext")
6596		defer func() {
6597			sc := -1
6598			if iter.Response().Response.Response != nil {
6599				sc = iter.Response().Response.Response.StatusCode
6600			}
6601			tracing.EndSpan(ctx, sc, err)
6602		}()
6603	}
6604	iter.i++
6605	if iter.i < len(iter.page.Values()) {
6606		return nil
6607	}
6608	err = iter.page.NextWithContext(ctx)
6609	if err != nil {
6610		iter.i--
6611		return err
6612	}
6613	iter.i = 0
6614	return nil
6615}
6616
6617// Next advances to the next value.  If there was an error making
6618// the request the iterator does not advance and the error is returned.
6619// Deprecated: Use NextWithContext() instead.
6620func (iter *OperationCollectionIterator) Next() error {
6621	return iter.NextWithContext(context.Background())
6622}
6623
6624// NotDone returns true if the enumeration should be started or is not yet complete.
6625func (iter OperationCollectionIterator) NotDone() bool {
6626	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6627}
6628
6629// Response returns the raw server response from the last page request.
6630func (iter OperationCollectionIterator) Response() OperationCollection {
6631	return iter.page.Response()
6632}
6633
6634// Value returns the current value or a zero-initialized value if the
6635// iterator has advanced beyond the end of the collection.
6636func (iter OperationCollectionIterator) Value() OperationContract {
6637	if !iter.page.NotDone() {
6638		return OperationContract{}
6639	}
6640	return iter.page.Values()[iter.i]
6641}
6642
6643// Creates a new instance of the OperationCollectionIterator type.
6644func NewOperationCollectionIterator(page OperationCollectionPage) OperationCollectionIterator {
6645	return OperationCollectionIterator{page: page}
6646}
6647
6648// IsEmpty returns true if the ListResult contains no values.
6649func (oc OperationCollection) IsEmpty() bool {
6650	return oc.Value == nil || len(*oc.Value) == 0
6651}
6652
6653// operationCollectionPreparer prepares a request to retrieve the next set of results.
6654// It returns nil if no more results exist.
6655func (oc OperationCollection) operationCollectionPreparer(ctx context.Context) (*http.Request, error) {
6656	if oc.NextLink == nil || len(to.String(oc.NextLink)) < 1 {
6657		return nil, nil
6658	}
6659	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6660		autorest.AsJSON(),
6661		autorest.AsGet(),
6662		autorest.WithBaseURL(to.String(oc.NextLink)))
6663}
6664
6665// OperationCollectionPage contains a page of OperationContract values.
6666type OperationCollectionPage struct {
6667	fn func(context.Context, OperationCollection) (OperationCollection, error)
6668	oc OperationCollection
6669}
6670
6671// NextWithContext advances to the next page of values.  If there was an error making
6672// the request the page does not advance and the error is returned.
6673func (page *OperationCollectionPage) NextWithContext(ctx context.Context) (err error) {
6674	if tracing.IsEnabled() {
6675		ctx = tracing.StartSpan(ctx, fqdn+"/OperationCollectionPage.NextWithContext")
6676		defer func() {
6677			sc := -1
6678			if page.Response().Response.Response != nil {
6679				sc = page.Response().Response.Response.StatusCode
6680			}
6681			tracing.EndSpan(ctx, sc, err)
6682		}()
6683	}
6684	next, err := page.fn(ctx, page.oc)
6685	if err != nil {
6686		return err
6687	}
6688	page.oc = next
6689	return nil
6690}
6691
6692// Next advances to the next page of values.  If there was an error making
6693// the request the page does not advance and the error is returned.
6694// Deprecated: Use NextWithContext() instead.
6695func (page *OperationCollectionPage) Next() error {
6696	return page.NextWithContext(context.Background())
6697}
6698
6699// NotDone returns true if the page enumeration should be started or is not yet complete.
6700func (page OperationCollectionPage) NotDone() bool {
6701	return !page.oc.IsEmpty()
6702}
6703
6704// Response returns the raw server response from the last page request.
6705func (page OperationCollectionPage) Response() OperationCollection {
6706	return page.oc
6707}
6708
6709// Values returns the slice of values for the current page or nil if there are no values.
6710func (page OperationCollectionPage) Values() []OperationContract {
6711	if page.oc.IsEmpty() {
6712		return nil
6713	}
6714	return *page.oc.Value
6715}
6716
6717// Creates a new instance of the OperationCollectionPage type.
6718func NewOperationCollectionPage(getNextPage func(context.Context, OperationCollection) (OperationCollection, error)) OperationCollectionPage {
6719	return OperationCollectionPage{fn: getNextPage}
6720}
6721
6722// OperationContract api Operation details.
6723type OperationContract struct {
6724	autorest.Response `json:"-"`
6725	// OperationContractProperties - Properties of the Operation Contract.
6726	*OperationContractProperties `json:"properties,omitempty"`
6727	// ID - READ-ONLY; Resource ID.
6728	ID *string `json:"id,omitempty"`
6729	// Name - READ-ONLY; Resource name.
6730	Name *string `json:"name,omitempty"`
6731	// Type - READ-ONLY; Resource type for API Management resource.
6732	Type *string `json:"type,omitempty"`
6733}
6734
6735// MarshalJSON is the custom marshaler for OperationContract.
6736func (oc OperationContract) MarshalJSON() ([]byte, error) {
6737	objectMap := make(map[string]interface{})
6738	if oc.OperationContractProperties != nil {
6739		objectMap["properties"] = oc.OperationContractProperties
6740	}
6741	return json.Marshal(objectMap)
6742}
6743
6744// UnmarshalJSON is the custom unmarshaler for OperationContract struct.
6745func (oc *OperationContract) UnmarshalJSON(body []byte) error {
6746	var m map[string]*json.RawMessage
6747	err := json.Unmarshal(body, &m)
6748	if err != nil {
6749		return err
6750	}
6751	for k, v := range m {
6752		switch k {
6753		case "properties":
6754			if v != nil {
6755				var operationContractProperties OperationContractProperties
6756				err = json.Unmarshal(*v, &operationContractProperties)
6757				if err != nil {
6758					return err
6759				}
6760				oc.OperationContractProperties = &operationContractProperties
6761			}
6762		case "id":
6763			if v != nil {
6764				var ID string
6765				err = json.Unmarshal(*v, &ID)
6766				if err != nil {
6767					return err
6768				}
6769				oc.ID = &ID
6770			}
6771		case "name":
6772			if v != nil {
6773				var name string
6774				err = json.Unmarshal(*v, &name)
6775				if err != nil {
6776					return err
6777				}
6778				oc.Name = &name
6779			}
6780		case "type":
6781			if v != nil {
6782				var typeVar string
6783				err = json.Unmarshal(*v, &typeVar)
6784				if err != nil {
6785					return err
6786				}
6787				oc.Type = &typeVar
6788			}
6789		}
6790	}
6791
6792	return nil
6793}
6794
6795// OperationContractProperties operation Contract Properties
6796type OperationContractProperties struct {
6797	// DisplayName - Operation Name.
6798	DisplayName *string `json:"displayName,omitempty"`
6799	// Method - A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
6800	Method *string `json:"method,omitempty"`
6801	// URLTemplate - Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
6802	URLTemplate *string `json:"urlTemplate,omitempty"`
6803	// TemplateParameters - Collection of URL template parameters.
6804	TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"`
6805	// Description - Description of the operation. May include HTML formatting tags.
6806	Description *string `json:"description,omitempty"`
6807	// Request - An entity containing request details.
6808	Request *RequestContract `json:"request,omitempty"`
6809	// Responses - Array of Operation responses.
6810	Responses *[]ResponseContract `json:"responses,omitempty"`
6811	// Policies - Operation Policies
6812	Policies *string `json:"policies,omitempty"`
6813}
6814
6815// OperationDisplay the object that describes the operation.
6816type OperationDisplay struct {
6817	// Provider - Friendly name of the resource provider
6818	Provider *string `json:"provider,omitempty"`
6819	// Operation - Operation type: read, write, delete, listKeys/action, etc.
6820	Operation *string `json:"operation,omitempty"`
6821	// Resource - Resource type on which the operation is performed.
6822	Resource *string `json:"resource,omitempty"`
6823	// Description - Friendly name of the operation
6824	Description *string `json:"description,omitempty"`
6825}
6826
6827// OperationEntityBaseContract api Operation Entity Base Contract details.
6828type OperationEntityBaseContract struct {
6829	// TemplateParameters - Collection of URL template parameters.
6830	TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"`
6831	// Description - Description of the operation. May include HTML formatting tags.
6832	Description *string `json:"description,omitempty"`
6833	// Request - An entity containing request details.
6834	Request *RequestContract `json:"request,omitempty"`
6835	// Responses - Array of Operation responses.
6836	Responses *[]ResponseContract `json:"responses,omitempty"`
6837	// Policies - Operation Policies
6838	Policies *string `json:"policies,omitempty"`
6839}
6840
6841// OperationListResult result of the request to list REST API operations. It contains a list of operations
6842// and a URL nextLink to get the next set of results.
6843type OperationListResult struct {
6844	autorest.Response `json:"-"`
6845	// Value - List of operations supported by the resource provider.
6846	Value *[]Operation `json:"value,omitempty"`
6847	// NextLink - URL to get the next set of operation list results if there are any.
6848	NextLink *string `json:"nextLink,omitempty"`
6849}
6850
6851// OperationListResultIterator provides access to a complete listing of Operation values.
6852type OperationListResultIterator struct {
6853	i    int
6854	page OperationListResultPage
6855}
6856
6857// NextWithContext advances to the next value.  If there was an error making
6858// the request the iterator does not advance and the error is returned.
6859func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
6860	if tracing.IsEnabled() {
6861		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
6862		defer func() {
6863			sc := -1
6864			if iter.Response().Response.Response != nil {
6865				sc = iter.Response().Response.Response.StatusCode
6866			}
6867			tracing.EndSpan(ctx, sc, err)
6868		}()
6869	}
6870	iter.i++
6871	if iter.i < len(iter.page.Values()) {
6872		return nil
6873	}
6874	err = iter.page.NextWithContext(ctx)
6875	if err != nil {
6876		iter.i--
6877		return err
6878	}
6879	iter.i = 0
6880	return nil
6881}
6882
6883// Next advances to the next value.  If there was an error making
6884// the request the iterator does not advance and the error is returned.
6885// Deprecated: Use NextWithContext() instead.
6886func (iter *OperationListResultIterator) Next() error {
6887	return iter.NextWithContext(context.Background())
6888}
6889
6890// NotDone returns true if the enumeration should be started or is not yet complete.
6891func (iter OperationListResultIterator) NotDone() bool {
6892	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6893}
6894
6895// Response returns the raw server response from the last page request.
6896func (iter OperationListResultIterator) Response() OperationListResult {
6897	return iter.page.Response()
6898}
6899
6900// Value returns the current value or a zero-initialized value if the
6901// iterator has advanced beyond the end of the collection.
6902func (iter OperationListResultIterator) Value() Operation {
6903	if !iter.page.NotDone() {
6904		return Operation{}
6905	}
6906	return iter.page.Values()[iter.i]
6907}
6908
6909// Creates a new instance of the OperationListResultIterator type.
6910func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
6911	return OperationListResultIterator{page: page}
6912}
6913
6914// IsEmpty returns true if the ListResult contains no values.
6915func (olr OperationListResult) IsEmpty() bool {
6916	return olr.Value == nil || len(*olr.Value) == 0
6917}
6918
6919// operationListResultPreparer prepares a request to retrieve the next set of results.
6920// It returns nil if no more results exist.
6921func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
6922	if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
6923		return nil, nil
6924	}
6925	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6926		autorest.AsJSON(),
6927		autorest.AsGet(),
6928		autorest.WithBaseURL(to.String(olr.NextLink)))
6929}
6930
6931// OperationListResultPage contains a page of Operation values.
6932type OperationListResultPage struct {
6933	fn  func(context.Context, OperationListResult) (OperationListResult, error)
6934	olr OperationListResult
6935}
6936
6937// NextWithContext advances to the next page of values.  If there was an error making
6938// the request the page does not advance and the error is returned.
6939func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
6940	if tracing.IsEnabled() {
6941		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
6942		defer func() {
6943			sc := -1
6944			if page.Response().Response.Response != nil {
6945				sc = page.Response().Response.Response.StatusCode
6946			}
6947			tracing.EndSpan(ctx, sc, err)
6948		}()
6949	}
6950	next, err := page.fn(ctx, page.olr)
6951	if err != nil {
6952		return err
6953	}
6954	page.olr = next
6955	return nil
6956}
6957
6958// Next advances to the next page of values.  If there was an error making
6959// the request the page does not advance and the error is returned.
6960// Deprecated: Use NextWithContext() instead.
6961func (page *OperationListResultPage) Next() error {
6962	return page.NextWithContext(context.Background())
6963}
6964
6965// NotDone returns true if the page enumeration should be started or is not yet complete.
6966func (page OperationListResultPage) NotDone() bool {
6967	return !page.olr.IsEmpty()
6968}
6969
6970// Response returns the raw server response from the last page request.
6971func (page OperationListResultPage) Response() OperationListResult {
6972	return page.olr
6973}
6974
6975// Values returns the slice of values for the current page or nil if there are no values.
6976func (page OperationListResultPage) Values() []Operation {
6977	if page.olr.IsEmpty() {
6978		return nil
6979	}
6980	return *page.olr.Value
6981}
6982
6983// Creates a new instance of the OperationListResultPage type.
6984func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
6985	return OperationListResultPage{fn: getNextPage}
6986}
6987
6988// OperationResultContract operation Result.
6989type OperationResultContract struct {
6990	autorest.Response `json:"-"`
6991	// ID - Operation result identifier.
6992	ID *string `json:"id,omitempty"`
6993	// Status - Status of an async operation. Possible values include: 'Started', 'InProgress', 'Succeeded', 'Failed'
6994	Status AsyncOperationStatus `json:"status,omitempty"`
6995	// 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.
6996	Started *date.Time `json:"started,omitempty"`
6997	// 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.
6998	Updated *date.Time `json:"updated,omitempty"`
6999	// ResultInfo - Optional result info.
7000	ResultInfo *string `json:"resultInfo,omitempty"`
7001	// Error - Error Body Contract
7002	Error *ErrorResponseBody `json:"error,omitempty"`
7003	// 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.
7004	ActionLog *[]OperationResultLogItemContract `json:"actionLog,omitempty"`
7005}
7006
7007// OperationResultLogItemContract log of the entity being created, updated or deleted.
7008type OperationResultLogItemContract struct {
7009	// ObjectType - The type of entity contract.
7010	ObjectType *string `json:"objectType,omitempty"`
7011	// Action - Action like create/update/delete.
7012	Action *string `json:"action,omitempty"`
7013	// ObjectKey - Identifier of the entity being created/updated/deleted.
7014	ObjectKey *string `json:"objectKey,omitempty"`
7015}
7016
7017// OperationTagResourceContractProperties operation Entity contract Properties.
7018type OperationTagResourceContractProperties struct {
7019	// ID - Identifier of the operation in form /operations/{operationId}.
7020	ID *string `json:"id,omitempty"`
7021	// Name - READ-ONLY; Operation name.
7022	Name *string `json:"name,omitempty"`
7023	// APIName - READ-ONLY; Api Name.
7024	APIName *string `json:"apiName,omitempty"`
7025	// APIRevision - READ-ONLY; Api Revision.
7026	APIRevision *string `json:"apiRevision,omitempty"`
7027	// APIVersion - READ-ONLY; Api Version.
7028	APIVersion *string `json:"apiVersion,omitempty"`
7029	// Description - READ-ONLY; Operation Description.
7030	Description *string `json:"description,omitempty"`
7031	// Method - READ-ONLY; A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
7032	Method *string `json:"method,omitempty"`
7033	// URLTemplate - READ-ONLY; Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
7034	URLTemplate *string `json:"urlTemplate,omitempty"`
7035}
7036
7037// OperationUpdateContract api Operation Update Contract details.
7038type OperationUpdateContract struct {
7039	// OperationUpdateContractProperties - Properties of the API Operation entity that can be updated.
7040	*OperationUpdateContractProperties `json:"properties,omitempty"`
7041}
7042
7043// MarshalJSON is the custom marshaler for OperationUpdateContract.
7044func (ouc OperationUpdateContract) MarshalJSON() ([]byte, error) {
7045	objectMap := make(map[string]interface{})
7046	if ouc.OperationUpdateContractProperties != nil {
7047		objectMap["properties"] = ouc.OperationUpdateContractProperties
7048	}
7049	return json.Marshal(objectMap)
7050}
7051
7052// UnmarshalJSON is the custom unmarshaler for OperationUpdateContract struct.
7053func (ouc *OperationUpdateContract) UnmarshalJSON(body []byte) error {
7054	var m map[string]*json.RawMessage
7055	err := json.Unmarshal(body, &m)
7056	if err != nil {
7057		return err
7058	}
7059	for k, v := range m {
7060		switch k {
7061		case "properties":
7062			if v != nil {
7063				var operationUpdateContractProperties OperationUpdateContractProperties
7064				err = json.Unmarshal(*v, &operationUpdateContractProperties)
7065				if err != nil {
7066					return err
7067				}
7068				ouc.OperationUpdateContractProperties = &operationUpdateContractProperties
7069			}
7070		}
7071	}
7072
7073	return nil
7074}
7075
7076// OperationUpdateContractProperties operation Update Contract Properties.
7077type OperationUpdateContractProperties struct {
7078	// DisplayName - Operation Name.
7079	DisplayName *string `json:"displayName,omitempty"`
7080	// Method - A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
7081	Method *string `json:"method,omitempty"`
7082	// URLTemplate - Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
7083	URLTemplate *string `json:"urlTemplate,omitempty"`
7084	// TemplateParameters - Collection of URL template parameters.
7085	TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"`
7086	// Description - Description of the operation. May include HTML formatting tags.
7087	Description *string `json:"description,omitempty"`
7088	// Request - An entity containing request details.
7089	Request *RequestContract `json:"request,omitempty"`
7090	// Responses - Array of Operation responses.
7091	Responses *[]ResponseContract `json:"responses,omitempty"`
7092	// Policies - Operation Policies
7093	Policies *string `json:"policies,omitempty"`
7094}
7095
7096// ParameterContract operation parameters details.
7097type ParameterContract struct {
7098	// Name - Parameter name.
7099	Name *string `json:"name,omitempty"`
7100	// Description - Parameter description.
7101	Description *string `json:"description,omitempty"`
7102	// Type - Parameter type.
7103	Type *string `json:"type,omitempty"`
7104	// DefaultValue - Default parameter value.
7105	DefaultValue *string `json:"defaultValue,omitempty"`
7106	// Required - Specifies whether parameter is required or not.
7107	Required *bool `json:"required,omitempty"`
7108	// Values - Parameter values.
7109	Values *[]string `json:"values,omitempty"`
7110}
7111
7112// PipelineDiagnosticSettings diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
7113type PipelineDiagnosticSettings struct {
7114	// Request - Diagnostic settings for request.
7115	Request *HTTPMessageDiagnostic `json:"request,omitempty"`
7116	// Response - Diagnostic settings for response.
7117	Response *HTTPMessageDiagnostic `json:"response,omitempty"`
7118}
7119
7120// PolicyCollection the response of the list policy operation.
7121type PolicyCollection struct {
7122	autorest.Response `json:"-"`
7123	// Value - Policy Contract value.
7124	Value *[]PolicyContract `json:"value,omitempty"`
7125	// NextLink - Next page link if any.
7126	NextLink *string `json:"nextLink,omitempty"`
7127}
7128
7129// PolicyContract policy Contract details.
7130type PolicyContract struct {
7131	autorest.Response `json:"-"`
7132	// PolicyContractProperties - Properties of the Policy.
7133	*PolicyContractProperties `json:"properties,omitempty"`
7134	// ID - READ-ONLY; Resource ID.
7135	ID *string `json:"id,omitempty"`
7136	// Name - READ-ONLY; Resource name.
7137	Name *string `json:"name,omitempty"`
7138	// Type - READ-ONLY; Resource type for API Management resource.
7139	Type *string `json:"type,omitempty"`
7140}
7141
7142// MarshalJSON is the custom marshaler for PolicyContract.
7143func (pc PolicyContract) MarshalJSON() ([]byte, error) {
7144	objectMap := make(map[string]interface{})
7145	if pc.PolicyContractProperties != nil {
7146		objectMap["properties"] = pc.PolicyContractProperties
7147	}
7148	return json.Marshal(objectMap)
7149}
7150
7151// UnmarshalJSON is the custom unmarshaler for PolicyContract struct.
7152func (pc *PolicyContract) UnmarshalJSON(body []byte) error {
7153	var m map[string]*json.RawMessage
7154	err := json.Unmarshal(body, &m)
7155	if err != nil {
7156		return err
7157	}
7158	for k, v := range m {
7159		switch k {
7160		case "properties":
7161			if v != nil {
7162				var policyContractProperties PolicyContractProperties
7163				err = json.Unmarshal(*v, &policyContractProperties)
7164				if err != nil {
7165					return err
7166				}
7167				pc.PolicyContractProperties = &policyContractProperties
7168			}
7169		case "id":
7170			if v != nil {
7171				var ID string
7172				err = json.Unmarshal(*v, &ID)
7173				if err != nil {
7174					return err
7175				}
7176				pc.ID = &ID
7177			}
7178		case "name":
7179			if v != nil {
7180				var name string
7181				err = json.Unmarshal(*v, &name)
7182				if err != nil {
7183					return err
7184				}
7185				pc.Name = &name
7186			}
7187		case "type":
7188			if v != nil {
7189				var typeVar string
7190				err = json.Unmarshal(*v, &typeVar)
7191				if err != nil {
7192					return err
7193				}
7194				pc.Type = &typeVar
7195			}
7196		}
7197	}
7198
7199	return nil
7200}
7201
7202// PolicyContractProperties policy contract Properties.
7203type PolicyContractProperties struct {
7204	// Value - Contents of the Policy as defined by the format.
7205	Value *string `json:"value,omitempty"`
7206	// Format - Format of the policyContent. Possible values include: 'XML', 'XMLLink', 'Rawxml', 'RawxmlLink'
7207	Format PolicyContentFormat `json:"format,omitempty"`
7208}
7209
7210// PolicySnippetContract policy snippet.
7211type PolicySnippetContract struct {
7212	// Name - READ-ONLY; Snippet name.
7213	Name *string `json:"name,omitempty"`
7214	// Content - READ-ONLY; Snippet content.
7215	Content *string `json:"content,omitempty"`
7216	// ToolTip - READ-ONLY; Snippet toolTip.
7217	ToolTip *string `json:"toolTip,omitempty"`
7218	// Scope - READ-ONLY; Binary OR value of the Snippet scope.
7219	Scope *int32 `json:"scope,omitempty"`
7220}
7221
7222// PolicySnippetsCollection the response of the list policy snippets operation.
7223type PolicySnippetsCollection struct {
7224	autorest.Response `json:"-"`
7225	// Value - Policy snippet value.
7226	Value *[]PolicySnippetContract `json:"value,omitempty"`
7227}
7228
7229// PortalDelegationSettings delegation settings for a developer portal.
7230type PortalDelegationSettings struct {
7231	autorest.Response `json:"-"`
7232	// PortalDelegationSettingsProperties - Delegation settings contract properties.
7233	*PortalDelegationSettingsProperties `json:"properties,omitempty"`
7234	// ID - READ-ONLY; Resource ID.
7235	ID *string `json:"id,omitempty"`
7236	// Name - READ-ONLY; Resource name.
7237	Name *string `json:"name,omitempty"`
7238	// Type - READ-ONLY; Resource type for API Management resource.
7239	Type *string `json:"type,omitempty"`
7240}
7241
7242// MarshalJSON is the custom marshaler for PortalDelegationSettings.
7243func (pds PortalDelegationSettings) MarshalJSON() ([]byte, error) {
7244	objectMap := make(map[string]interface{})
7245	if pds.PortalDelegationSettingsProperties != nil {
7246		objectMap["properties"] = pds.PortalDelegationSettingsProperties
7247	}
7248	return json.Marshal(objectMap)
7249}
7250
7251// UnmarshalJSON is the custom unmarshaler for PortalDelegationSettings struct.
7252func (pds *PortalDelegationSettings) UnmarshalJSON(body []byte) error {
7253	var m map[string]*json.RawMessage
7254	err := json.Unmarshal(body, &m)
7255	if err != nil {
7256		return err
7257	}
7258	for k, v := range m {
7259		switch k {
7260		case "properties":
7261			if v != nil {
7262				var portalDelegationSettingsProperties PortalDelegationSettingsProperties
7263				err = json.Unmarshal(*v, &portalDelegationSettingsProperties)
7264				if err != nil {
7265					return err
7266				}
7267				pds.PortalDelegationSettingsProperties = &portalDelegationSettingsProperties
7268			}
7269		case "id":
7270			if v != nil {
7271				var ID string
7272				err = json.Unmarshal(*v, &ID)
7273				if err != nil {
7274					return err
7275				}
7276				pds.ID = &ID
7277			}
7278		case "name":
7279			if v != nil {
7280				var name string
7281				err = json.Unmarshal(*v, &name)
7282				if err != nil {
7283					return err
7284				}
7285				pds.Name = &name
7286			}
7287		case "type":
7288			if v != nil {
7289				var typeVar string
7290				err = json.Unmarshal(*v, &typeVar)
7291				if err != nil {
7292					return err
7293				}
7294				pds.Type = &typeVar
7295			}
7296		}
7297	}
7298
7299	return nil
7300}
7301
7302// PortalDelegationSettingsProperties delegation settings contract properties.
7303type PortalDelegationSettingsProperties struct {
7304	// URL - A delegation Url.
7305	URL *string `json:"url,omitempty"`
7306	// ValidationKey - A base64-encoded validation key to validate, that a request is coming from Azure API Management.
7307	ValidationKey *string `json:"validationKey,omitempty"`
7308	// Subscriptions - Subscriptions delegation settings.
7309	Subscriptions *SubscriptionsDelegationSettingsProperties `json:"subscriptions,omitempty"`
7310	// UserRegistration - User registration delegation settings.
7311	UserRegistration *RegistrationDelegationSettingsProperties `json:"userRegistration,omitempty"`
7312}
7313
7314// PortalSigninSettingProperties sign-in settings contract properties.
7315type PortalSigninSettingProperties struct {
7316	// Enabled - Redirect Anonymous users to the Sign-In page.
7317	Enabled *bool `json:"enabled,omitempty"`
7318}
7319
7320// PortalSigninSettings sign-In settings for the Developer Portal.
7321type PortalSigninSettings struct {
7322	autorest.Response `json:"-"`
7323	// PortalSigninSettingProperties - Sign-in settings contract properties.
7324	*PortalSigninSettingProperties `json:"properties,omitempty"`
7325	// ID - READ-ONLY; Resource ID.
7326	ID *string `json:"id,omitempty"`
7327	// Name - READ-ONLY; Resource name.
7328	Name *string `json:"name,omitempty"`
7329	// Type - READ-ONLY; Resource type for API Management resource.
7330	Type *string `json:"type,omitempty"`
7331}
7332
7333// MarshalJSON is the custom marshaler for PortalSigninSettings.
7334func (pss PortalSigninSettings) MarshalJSON() ([]byte, error) {
7335	objectMap := make(map[string]interface{})
7336	if pss.PortalSigninSettingProperties != nil {
7337		objectMap["properties"] = pss.PortalSigninSettingProperties
7338	}
7339	return json.Marshal(objectMap)
7340}
7341
7342// UnmarshalJSON is the custom unmarshaler for PortalSigninSettings struct.
7343func (pss *PortalSigninSettings) UnmarshalJSON(body []byte) error {
7344	var m map[string]*json.RawMessage
7345	err := json.Unmarshal(body, &m)
7346	if err != nil {
7347		return err
7348	}
7349	for k, v := range m {
7350		switch k {
7351		case "properties":
7352			if v != nil {
7353				var portalSigninSettingProperties PortalSigninSettingProperties
7354				err = json.Unmarshal(*v, &portalSigninSettingProperties)
7355				if err != nil {
7356					return err
7357				}
7358				pss.PortalSigninSettingProperties = &portalSigninSettingProperties
7359			}
7360		case "id":
7361			if v != nil {
7362				var ID string
7363				err = json.Unmarshal(*v, &ID)
7364				if err != nil {
7365					return err
7366				}
7367				pss.ID = &ID
7368			}
7369		case "name":
7370			if v != nil {
7371				var name string
7372				err = json.Unmarshal(*v, &name)
7373				if err != nil {
7374					return err
7375				}
7376				pss.Name = &name
7377			}
7378		case "type":
7379			if v != nil {
7380				var typeVar string
7381				err = json.Unmarshal(*v, &typeVar)
7382				if err != nil {
7383					return err
7384				}
7385				pss.Type = &typeVar
7386			}
7387		}
7388	}
7389
7390	return nil
7391}
7392
7393// PortalSignupSettings sign-Up settings for a developer portal.
7394type PortalSignupSettings struct {
7395	autorest.Response `json:"-"`
7396	// PortalSignupSettingsProperties - Sign-up settings contract properties.
7397	*PortalSignupSettingsProperties `json:"properties,omitempty"`
7398	// ID - READ-ONLY; Resource ID.
7399	ID *string `json:"id,omitempty"`
7400	// Name - READ-ONLY; Resource name.
7401	Name *string `json:"name,omitempty"`
7402	// Type - READ-ONLY; Resource type for API Management resource.
7403	Type *string `json:"type,omitempty"`
7404}
7405
7406// MarshalJSON is the custom marshaler for PortalSignupSettings.
7407func (pss PortalSignupSettings) MarshalJSON() ([]byte, error) {
7408	objectMap := make(map[string]interface{})
7409	if pss.PortalSignupSettingsProperties != nil {
7410		objectMap["properties"] = pss.PortalSignupSettingsProperties
7411	}
7412	return json.Marshal(objectMap)
7413}
7414
7415// UnmarshalJSON is the custom unmarshaler for PortalSignupSettings struct.
7416func (pss *PortalSignupSettings) UnmarshalJSON(body []byte) error {
7417	var m map[string]*json.RawMessage
7418	err := json.Unmarshal(body, &m)
7419	if err != nil {
7420		return err
7421	}
7422	for k, v := range m {
7423		switch k {
7424		case "properties":
7425			if v != nil {
7426				var portalSignupSettingsProperties PortalSignupSettingsProperties
7427				err = json.Unmarshal(*v, &portalSignupSettingsProperties)
7428				if err != nil {
7429					return err
7430				}
7431				pss.PortalSignupSettingsProperties = &portalSignupSettingsProperties
7432			}
7433		case "id":
7434			if v != nil {
7435				var ID string
7436				err = json.Unmarshal(*v, &ID)
7437				if err != nil {
7438					return err
7439				}
7440				pss.ID = &ID
7441			}
7442		case "name":
7443			if v != nil {
7444				var name string
7445				err = json.Unmarshal(*v, &name)
7446				if err != nil {
7447					return err
7448				}
7449				pss.Name = &name
7450			}
7451		case "type":
7452			if v != nil {
7453				var typeVar string
7454				err = json.Unmarshal(*v, &typeVar)
7455				if err != nil {
7456					return err
7457				}
7458				pss.Type = &typeVar
7459			}
7460		}
7461	}
7462
7463	return nil
7464}
7465
7466// PortalSignupSettingsProperties sign-up settings contract properties.
7467type PortalSignupSettingsProperties struct {
7468	// Enabled - Allow users to sign up on a developer portal.
7469	Enabled *bool `json:"enabled,omitempty"`
7470	// TermsOfService - Terms of service contract properties.
7471	TermsOfService *TermsOfServiceProperties `json:"termsOfService,omitempty"`
7472}
7473
7474// ProductCollection paged Products list representation.
7475type ProductCollection struct {
7476	autorest.Response `json:"-"`
7477	// Value - Page values.
7478	Value *[]ProductContract `json:"value,omitempty"`
7479	// NextLink - Next page link if any.
7480	NextLink *string `json:"nextLink,omitempty"`
7481}
7482
7483// ProductCollectionIterator provides access to a complete listing of ProductContract values.
7484type ProductCollectionIterator struct {
7485	i    int
7486	page ProductCollectionPage
7487}
7488
7489// NextWithContext advances to the next value.  If there was an error making
7490// the request the iterator does not advance and the error is returned.
7491func (iter *ProductCollectionIterator) NextWithContext(ctx context.Context) (err error) {
7492	if tracing.IsEnabled() {
7493		ctx = tracing.StartSpan(ctx, fqdn+"/ProductCollectionIterator.NextWithContext")
7494		defer func() {
7495			sc := -1
7496			if iter.Response().Response.Response != nil {
7497				sc = iter.Response().Response.Response.StatusCode
7498			}
7499			tracing.EndSpan(ctx, sc, err)
7500		}()
7501	}
7502	iter.i++
7503	if iter.i < len(iter.page.Values()) {
7504		return nil
7505	}
7506	err = iter.page.NextWithContext(ctx)
7507	if err != nil {
7508		iter.i--
7509		return err
7510	}
7511	iter.i = 0
7512	return nil
7513}
7514
7515// Next advances to the next value.  If there was an error making
7516// the request the iterator does not advance and the error is returned.
7517// Deprecated: Use NextWithContext() instead.
7518func (iter *ProductCollectionIterator) Next() error {
7519	return iter.NextWithContext(context.Background())
7520}
7521
7522// NotDone returns true if the enumeration should be started or is not yet complete.
7523func (iter ProductCollectionIterator) NotDone() bool {
7524	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7525}
7526
7527// Response returns the raw server response from the last page request.
7528func (iter ProductCollectionIterator) Response() ProductCollection {
7529	return iter.page.Response()
7530}
7531
7532// Value returns the current value or a zero-initialized value if the
7533// iterator has advanced beyond the end of the collection.
7534func (iter ProductCollectionIterator) Value() ProductContract {
7535	if !iter.page.NotDone() {
7536		return ProductContract{}
7537	}
7538	return iter.page.Values()[iter.i]
7539}
7540
7541// Creates a new instance of the ProductCollectionIterator type.
7542func NewProductCollectionIterator(page ProductCollectionPage) ProductCollectionIterator {
7543	return ProductCollectionIterator{page: page}
7544}
7545
7546// IsEmpty returns true if the ListResult contains no values.
7547func (pc ProductCollection) IsEmpty() bool {
7548	return pc.Value == nil || len(*pc.Value) == 0
7549}
7550
7551// productCollectionPreparer prepares a request to retrieve the next set of results.
7552// It returns nil if no more results exist.
7553func (pc ProductCollection) productCollectionPreparer(ctx context.Context) (*http.Request, error) {
7554	if pc.NextLink == nil || len(to.String(pc.NextLink)) < 1 {
7555		return nil, nil
7556	}
7557	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7558		autorest.AsJSON(),
7559		autorest.AsGet(),
7560		autorest.WithBaseURL(to.String(pc.NextLink)))
7561}
7562
7563// ProductCollectionPage contains a page of ProductContract values.
7564type ProductCollectionPage struct {
7565	fn func(context.Context, ProductCollection) (ProductCollection, error)
7566	pc ProductCollection
7567}
7568
7569// NextWithContext advances to the next page of values.  If there was an error making
7570// the request the page does not advance and the error is returned.
7571func (page *ProductCollectionPage) NextWithContext(ctx context.Context) (err error) {
7572	if tracing.IsEnabled() {
7573		ctx = tracing.StartSpan(ctx, fqdn+"/ProductCollectionPage.NextWithContext")
7574		defer func() {
7575			sc := -1
7576			if page.Response().Response.Response != nil {
7577				sc = page.Response().Response.Response.StatusCode
7578			}
7579			tracing.EndSpan(ctx, sc, err)
7580		}()
7581	}
7582	next, err := page.fn(ctx, page.pc)
7583	if err != nil {
7584		return err
7585	}
7586	page.pc = next
7587	return nil
7588}
7589
7590// Next advances to the next page of values.  If there was an error making
7591// the request the page does not advance and the error is returned.
7592// Deprecated: Use NextWithContext() instead.
7593func (page *ProductCollectionPage) Next() error {
7594	return page.NextWithContext(context.Background())
7595}
7596
7597// NotDone returns true if the page enumeration should be started or is not yet complete.
7598func (page ProductCollectionPage) NotDone() bool {
7599	return !page.pc.IsEmpty()
7600}
7601
7602// Response returns the raw server response from the last page request.
7603func (page ProductCollectionPage) Response() ProductCollection {
7604	return page.pc
7605}
7606
7607// Values returns the slice of values for the current page or nil if there are no values.
7608func (page ProductCollectionPage) Values() []ProductContract {
7609	if page.pc.IsEmpty() {
7610		return nil
7611	}
7612	return *page.pc.Value
7613}
7614
7615// Creates a new instance of the ProductCollectionPage type.
7616func NewProductCollectionPage(getNextPage func(context.Context, ProductCollection) (ProductCollection, error)) ProductCollectionPage {
7617	return ProductCollectionPage{fn: getNextPage}
7618}
7619
7620// ProductContract product details.
7621type ProductContract struct {
7622	autorest.Response `json:"-"`
7623	// ProductContractProperties - Product entity contract properties.
7624	*ProductContractProperties `json:"properties,omitempty"`
7625	// ID - READ-ONLY; Resource ID.
7626	ID *string `json:"id,omitempty"`
7627	// Name - READ-ONLY; Resource name.
7628	Name *string `json:"name,omitempty"`
7629	// Type - READ-ONLY; Resource type for API Management resource.
7630	Type *string `json:"type,omitempty"`
7631}
7632
7633// MarshalJSON is the custom marshaler for ProductContract.
7634func (pc ProductContract) MarshalJSON() ([]byte, error) {
7635	objectMap := make(map[string]interface{})
7636	if pc.ProductContractProperties != nil {
7637		objectMap["properties"] = pc.ProductContractProperties
7638	}
7639	return json.Marshal(objectMap)
7640}
7641
7642// UnmarshalJSON is the custom unmarshaler for ProductContract struct.
7643func (pc *ProductContract) UnmarshalJSON(body []byte) error {
7644	var m map[string]*json.RawMessage
7645	err := json.Unmarshal(body, &m)
7646	if err != nil {
7647		return err
7648	}
7649	for k, v := range m {
7650		switch k {
7651		case "properties":
7652			if v != nil {
7653				var productContractProperties ProductContractProperties
7654				err = json.Unmarshal(*v, &productContractProperties)
7655				if err != nil {
7656					return err
7657				}
7658				pc.ProductContractProperties = &productContractProperties
7659			}
7660		case "id":
7661			if v != nil {
7662				var ID string
7663				err = json.Unmarshal(*v, &ID)
7664				if err != nil {
7665					return err
7666				}
7667				pc.ID = &ID
7668			}
7669		case "name":
7670			if v != nil {
7671				var name string
7672				err = json.Unmarshal(*v, &name)
7673				if err != nil {
7674					return err
7675				}
7676				pc.Name = &name
7677			}
7678		case "type":
7679			if v != nil {
7680				var typeVar string
7681				err = json.Unmarshal(*v, &typeVar)
7682				if err != nil {
7683					return err
7684				}
7685				pc.Type = &typeVar
7686			}
7687		}
7688	}
7689
7690	return nil
7691}
7692
7693// ProductContractProperties product profile.
7694type ProductContractProperties struct {
7695	// DisplayName - Product name.
7696	DisplayName *string `json:"displayName,omitempty"`
7697	// Description - Product description. May include HTML formatting tags.
7698	Description *string `json:"description,omitempty"`
7699	// 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.
7700	Terms *string `json:"terms,omitempty"`
7701	// 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.
7702	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
7703	// 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.
7704	ApprovalRequired *bool `json:"approvalRequired,omitempty"`
7705	// 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.
7706	SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"`
7707	// 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'
7708	State ProductState `json:"state,omitempty"`
7709}
7710
7711// ProductEntityBaseParameters product Entity Base Parameters
7712type ProductEntityBaseParameters struct {
7713	// Description - Product description. May include HTML formatting tags.
7714	Description *string `json:"description,omitempty"`
7715	// 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.
7716	Terms *string `json:"terms,omitempty"`
7717	// 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.
7718	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
7719	// 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.
7720	ApprovalRequired *bool `json:"approvalRequired,omitempty"`
7721	// 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.
7722	SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"`
7723	// 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'
7724	State ProductState `json:"state,omitempty"`
7725}
7726
7727// ProductTagResourceContractProperties product profile.
7728type ProductTagResourceContractProperties struct {
7729	// ID - Identifier of the product in the form of /products/{productId}
7730	ID *string `json:"id,omitempty"`
7731	// Name - Product name.
7732	Name *string `json:"name,omitempty"`
7733	// Description - Product description. May include HTML formatting tags.
7734	Description *string `json:"description,omitempty"`
7735	// 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.
7736	Terms *string `json:"terms,omitempty"`
7737	// 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.
7738	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
7739	// 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.
7740	ApprovalRequired *bool `json:"approvalRequired,omitempty"`
7741	// 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.
7742	SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"`
7743	// 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'
7744	State ProductState `json:"state,omitempty"`
7745}
7746
7747// ProductUpdateParameters product Update parameters.
7748type ProductUpdateParameters struct {
7749	// ProductUpdateProperties - Product entity Update contract properties.
7750	*ProductUpdateProperties `json:"properties,omitempty"`
7751}
7752
7753// MarshalJSON is the custom marshaler for ProductUpdateParameters.
7754func (pup ProductUpdateParameters) MarshalJSON() ([]byte, error) {
7755	objectMap := make(map[string]interface{})
7756	if pup.ProductUpdateProperties != nil {
7757		objectMap["properties"] = pup.ProductUpdateProperties
7758	}
7759	return json.Marshal(objectMap)
7760}
7761
7762// UnmarshalJSON is the custom unmarshaler for ProductUpdateParameters struct.
7763func (pup *ProductUpdateParameters) UnmarshalJSON(body []byte) error {
7764	var m map[string]*json.RawMessage
7765	err := json.Unmarshal(body, &m)
7766	if err != nil {
7767		return err
7768	}
7769	for k, v := range m {
7770		switch k {
7771		case "properties":
7772			if v != nil {
7773				var productUpdateProperties ProductUpdateProperties
7774				err = json.Unmarshal(*v, &productUpdateProperties)
7775				if err != nil {
7776					return err
7777				}
7778				pup.ProductUpdateProperties = &productUpdateProperties
7779			}
7780		}
7781	}
7782
7783	return nil
7784}
7785
7786// ProductUpdateProperties parameters supplied to the Update Product operation.
7787type ProductUpdateProperties struct {
7788	// DisplayName - Product name.
7789	DisplayName *string `json:"displayName,omitempty"`
7790	// Description - Product description. May include HTML formatting tags.
7791	Description *string `json:"description,omitempty"`
7792	// 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.
7793	Terms *string `json:"terms,omitempty"`
7794	// 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.
7795	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
7796	// 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.
7797	ApprovalRequired *bool `json:"approvalRequired,omitempty"`
7798	// 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.
7799	SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"`
7800	// 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'
7801	State ProductState `json:"state,omitempty"`
7802}
7803
7804// PropertyCollection paged Property list representation.
7805type PropertyCollection struct {
7806	autorest.Response `json:"-"`
7807	// Value - Page values.
7808	Value *[]PropertyContract `json:"value,omitempty"`
7809	// NextLink - Next page link if any.
7810	NextLink *string `json:"nextLink,omitempty"`
7811}
7812
7813// PropertyCollectionIterator provides access to a complete listing of PropertyContract values.
7814type PropertyCollectionIterator struct {
7815	i    int
7816	page PropertyCollectionPage
7817}
7818
7819// NextWithContext advances to the next value.  If there was an error making
7820// the request the iterator does not advance and the error is returned.
7821func (iter *PropertyCollectionIterator) NextWithContext(ctx context.Context) (err error) {
7822	if tracing.IsEnabled() {
7823		ctx = tracing.StartSpan(ctx, fqdn+"/PropertyCollectionIterator.NextWithContext")
7824		defer func() {
7825			sc := -1
7826			if iter.Response().Response.Response != nil {
7827				sc = iter.Response().Response.Response.StatusCode
7828			}
7829			tracing.EndSpan(ctx, sc, err)
7830		}()
7831	}
7832	iter.i++
7833	if iter.i < len(iter.page.Values()) {
7834		return nil
7835	}
7836	err = iter.page.NextWithContext(ctx)
7837	if err != nil {
7838		iter.i--
7839		return err
7840	}
7841	iter.i = 0
7842	return nil
7843}
7844
7845// Next advances to the next value.  If there was an error making
7846// the request the iterator does not advance and the error is returned.
7847// Deprecated: Use NextWithContext() instead.
7848func (iter *PropertyCollectionIterator) Next() error {
7849	return iter.NextWithContext(context.Background())
7850}
7851
7852// NotDone returns true if the enumeration should be started or is not yet complete.
7853func (iter PropertyCollectionIterator) NotDone() bool {
7854	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7855}
7856
7857// Response returns the raw server response from the last page request.
7858func (iter PropertyCollectionIterator) Response() PropertyCollection {
7859	return iter.page.Response()
7860}
7861
7862// Value returns the current value or a zero-initialized value if the
7863// iterator has advanced beyond the end of the collection.
7864func (iter PropertyCollectionIterator) Value() PropertyContract {
7865	if !iter.page.NotDone() {
7866		return PropertyContract{}
7867	}
7868	return iter.page.Values()[iter.i]
7869}
7870
7871// Creates a new instance of the PropertyCollectionIterator type.
7872func NewPropertyCollectionIterator(page PropertyCollectionPage) PropertyCollectionIterator {
7873	return PropertyCollectionIterator{page: page}
7874}
7875
7876// IsEmpty returns true if the ListResult contains no values.
7877func (pc PropertyCollection) IsEmpty() bool {
7878	return pc.Value == nil || len(*pc.Value) == 0
7879}
7880
7881// propertyCollectionPreparer prepares a request to retrieve the next set of results.
7882// It returns nil if no more results exist.
7883func (pc PropertyCollection) propertyCollectionPreparer(ctx context.Context) (*http.Request, error) {
7884	if pc.NextLink == nil || len(to.String(pc.NextLink)) < 1 {
7885		return nil, nil
7886	}
7887	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7888		autorest.AsJSON(),
7889		autorest.AsGet(),
7890		autorest.WithBaseURL(to.String(pc.NextLink)))
7891}
7892
7893// PropertyCollectionPage contains a page of PropertyContract values.
7894type PropertyCollectionPage struct {
7895	fn func(context.Context, PropertyCollection) (PropertyCollection, error)
7896	pc PropertyCollection
7897}
7898
7899// NextWithContext advances to the next page of values.  If there was an error making
7900// the request the page does not advance and the error is returned.
7901func (page *PropertyCollectionPage) NextWithContext(ctx context.Context) (err error) {
7902	if tracing.IsEnabled() {
7903		ctx = tracing.StartSpan(ctx, fqdn+"/PropertyCollectionPage.NextWithContext")
7904		defer func() {
7905			sc := -1
7906			if page.Response().Response.Response != nil {
7907				sc = page.Response().Response.Response.StatusCode
7908			}
7909			tracing.EndSpan(ctx, sc, err)
7910		}()
7911	}
7912	next, err := page.fn(ctx, page.pc)
7913	if err != nil {
7914		return err
7915	}
7916	page.pc = next
7917	return nil
7918}
7919
7920// Next advances to the next page of values.  If there was an error making
7921// the request the page does not advance and the error is returned.
7922// Deprecated: Use NextWithContext() instead.
7923func (page *PropertyCollectionPage) Next() error {
7924	return page.NextWithContext(context.Background())
7925}
7926
7927// NotDone returns true if the page enumeration should be started or is not yet complete.
7928func (page PropertyCollectionPage) NotDone() bool {
7929	return !page.pc.IsEmpty()
7930}
7931
7932// Response returns the raw server response from the last page request.
7933func (page PropertyCollectionPage) Response() PropertyCollection {
7934	return page.pc
7935}
7936
7937// Values returns the slice of values for the current page or nil if there are no values.
7938func (page PropertyCollectionPage) Values() []PropertyContract {
7939	if page.pc.IsEmpty() {
7940		return nil
7941	}
7942	return *page.pc.Value
7943}
7944
7945// Creates a new instance of the PropertyCollectionPage type.
7946func NewPropertyCollectionPage(getNextPage func(context.Context, PropertyCollection) (PropertyCollection, error)) PropertyCollectionPage {
7947	return PropertyCollectionPage{fn: getNextPage}
7948}
7949
7950// PropertyContract property details.
7951type PropertyContract struct {
7952	autorest.Response `json:"-"`
7953	// PropertyContractProperties - Property entity contract properties.
7954	*PropertyContractProperties `json:"properties,omitempty"`
7955	// ID - READ-ONLY; Resource ID.
7956	ID *string `json:"id,omitempty"`
7957	// Name - READ-ONLY; Resource name.
7958	Name *string `json:"name,omitempty"`
7959	// Type - READ-ONLY; Resource type for API Management resource.
7960	Type *string `json:"type,omitempty"`
7961}
7962
7963// MarshalJSON is the custom marshaler for PropertyContract.
7964func (pc PropertyContract) MarshalJSON() ([]byte, error) {
7965	objectMap := make(map[string]interface{})
7966	if pc.PropertyContractProperties != nil {
7967		objectMap["properties"] = pc.PropertyContractProperties
7968	}
7969	return json.Marshal(objectMap)
7970}
7971
7972// UnmarshalJSON is the custom unmarshaler for PropertyContract struct.
7973func (pc *PropertyContract) UnmarshalJSON(body []byte) error {
7974	var m map[string]*json.RawMessage
7975	err := json.Unmarshal(body, &m)
7976	if err != nil {
7977		return err
7978	}
7979	for k, v := range m {
7980		switch k {
7981		case "properties":
7982			if v != nil {
7983				var propertyContractProperties PropertyContractProperties
7984				err = json.Unmarshal(*v, &propertyContractProperties)
7985				if err != nil {
7986					return err
7987				}
7988				pc.PropertyContractProperties = &propertyContractProperties
7989			}
7990		case "id":
7991			if v != nil {
7992				var ID string
7993				err = json.Unmarshal(*v, &ID)
7994				if err != nil {
7995					return err
7996				}
7997				pc.ID = &ID
7998			}
7999		case "name":
8000			if v != nil {
8001				var name string
8002				err = json.Unmarshal(*v, &name)
8003				if err != nil {
8004					return err
8005				}
8006				pc.Name = &name
8007			}
8008		case "type":
8009			if v != nil {
8010				var typeVar string
8011				err = json.Unmarshal(*v, &typeVar)
8012				if err != nil {
8013					return err
8014				}
8015				pc.Type = &typeVar
8016			}
8017		}
8018	}
8019
8020	return nil
8021}
8022
8023// PropertyContractProperties property Contract properties.
8024type PropertyContractProperties struct {
8025	// DisplayName - Unique name of Property. It may contain only letters, digits, period, dash, and underscore characters.
8026	DisplayName *string `json:"displayName,omitempty"`
8027	// Value - Value of the property. Can contain policy expressions. It may not be empty or consist only of whitespace.
8028	Value *string `json:"value,omitempty"`
8029	// Tags - Optional tags that when provided can be used to filter the property list.
8030	Tags *[]string `json:"tags,omitempty"`
8031	// Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false.
8032	Secret *bool `json:"secret,omitempty"`
8033}
8034
8035// PropertyEntityBaseParameters property Entity Base Parameters set.
8036type PropertyEntityBaseParameters struct {
8037	// Tags - Optional tags that when provided can be used to filter the property list.
8038	Tags *[]string `json:"tags,omitempty"`
8039	// Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false.
8040	Secret *bool `json:"secret,omitempty"`
8041}
8042
8043// PropertyUpdateParameterProperties property Contract properties.
8044type PropertyUpdateParameterProperties struct {
8045	// DisplayName - Unique name of Property. It may contain only letters, digits, period, dash, and underscore characters.
8046	DisplayName *string `json:"displayName,omitempty"`
8047	// Value - Value of the property. Can contain policy expressions. It may not be empty or consist only of whitespace.
8048	Value *string `json:"value,omitempty"`
8049	// Tags - Optional tags that when provided can be used to filter the property list.
8050	Tags *[]string `json:"tags,omitempty"`
8051	// Secret - Determines whether the value is a secret and should be encrypted or not. Default value is false.
8052	Secret *bool `json:"secret,omitempty"`
8053}
8054
8055// PropertyUpdateParameters property update Parameters.
8056type PropertyUpdateParameters struct {
8057	// PropertyUpdateParameterProperties - Property entity Update contract properties.
8058	*PropertyUpdateParameterProperties `json:"properties,omitempty"`
8059}
8060
8061// MarshalJSON is the custom marshaler for PropertyUpdateParameters.
8062func (pup PropertyUpdateParameters) MarshalJSON() ([]byte, error) {
8063	objectMap := make(map[string]interface{})
8064	if pup.PropertyUpdateParameterProperties != nil {
8065		objectMap["properties"] = pup.PropertyUpdateParameterProperties
8066	}
8067	return json.Marshal(objectMap)
8068}
8069
8070// UnmarshalJSON is the custom unmarshaler for PropertyUpdateParameters struct.
8071func (pup *PropertyUpdateParameters) UnmarshalJSON(body []byte) error {
8072	var m map[string]*json.RawMessage
8073	err := json.Unmarshal(body, &m)
8074	if err != nil {
8075		return err
8076	}
8077	for k, v := range m {
8078		switch k {
8079		case "properties":
8080			if v != nil {
8081				var propertyUpdateParameterProperties PropertyUpdateParameterProperties
8082				err = json.Unmarshal(*v, &propertyUpdateParameterProperties)
8083				if err != nil {
8084					return err
8085				}
8086				pup.PropertyUpdateParameterProperties = &propertyUpdateParameterProperties
8087			}
8088		}
8089	}
8090
8091	return nil
8092}
8093
8094// QuotaCounterCollection paged Quota Counter list representation.
8095type QuotaCounterCollection struct {
8096	autorest.Response `json:"-"`
8097	// Value - Quota counter values.
8098	Value *[]QuotaCounterContract `json:"value,omitempty"`
8099	// Count - Total record count number across all pages.
8100	Count *int64 `json:"count,omitempty"`
8101	// NextLink - Next page link if any.
8102	NextLink *string `json:"nextLink,omitempty"`
8103}
8104
8105// QuotaCounterContract quota counter details.
8106type QuotaCounterContract struct {
8107	autorest.Response `json:"-"`
8108	// CounterKey - The Key value of the Counter. Must not be empty.
8109	CounterKey *string `json:"counterKey,omitempty"`
8110	// PeriodKey - Identifier of the Period for which the counter was collected. Must not be empty.
8111	PeriodKey *string `json:"periodKey,omitempty"`
8112	// 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.
8113	PeriodStartTime *date.Time `json:"periodStartTime,omitempty"`
8114	// 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.
8115	PeriodEndTime *date.Time `json:"periodEndTime,omitempty"`
8116	// Value - Quota Value Properties
8117	Value *QuotaCounterValueContractProperties `json:"value,omitempty"`
8118}
8119
8120// QuotaCounterValueContract quota counter value details.
8121type QuotaCounterValueContract struct {
8122	// QuotaCounterValueContractProperties - Quota counter Value Properties.
8123	*QuotaCounterValueContractProperties `json:"value,omitempty"`
8124}
8125
8126// MarshalJSON is the custom marshaler for QuotaCounterValueContract.
8127func (qcvc QuotaCounterValueContract) MarshalJSON() ([]byte, error) {
8128	objectMap := make(map[string]interface{})
8129	if qcvc.QuotaCounterValueContractProperties != nil {
8130		objectMap["value"] = qcvc.QuotaCounterValueContractProperties
8131	}
8132	return json.Marshal(objectMap)
8133}
8134
8135// UnmarshalJSON is the custom unmarshaler for QuotaCounterValueContract struct.
8136func (qcvc *QuotaCounterValueContract) UnmarshalJSON(body []byte) error {
8137	var m map[string]*json.RawMessage
8138	err := json.Unmarshal(body, &m)
8139	if err != nil {
8140		return err
8141	}
8142	for k, v := range m {
8143		switch k {
8144		case "value":
8145			if v != nil {
8146				var quotaCounterValueContractProperties QuotaCounterValueContractProperties
8147				err = json.Unmarshal(*v, &quotaCounterValueContractProperties)
8148				if err != nil {
8149					return err
8150				}
8151				qcvc.QuotaCounterValueContractProperties = &quotaCounterValueContractProperties
8152			}
8153		}
8154	}
8155
8156	return nil
8157}
8158
8159// QuotaCounterValueContractProperties quota counter value details.
8160type QuotaCounterValueContractProperties struct {
8161	// CallsCount - Number of times Counter was called.
8162	CallsCount *int32 `json:"callsCount,omitempty"`
8163	// KbTransferred - Data Transferred in KiloBytes.
8164	KbTransferred *float64 `json:"kbTransferred,omitempty"`
8165}
8166
8167// RecipientEmailCollection paged Recipient User list representation.
8168type RecipientEmailCollection struct {
8169	autorest.Response `json:"-"`
8170	// Value - Page values.
8171	Value *[]RecipientEmailContract `json:"value,omitempty"`
8172	// NextLink - Next page link if any.
8173	NextLink *string `json:"nextLink,omitempty"`
8174}
8175
8176// RecipientEmailContract recipient Email details.
8177type RecipientEmailContract struct {
8178	autorest.Response `json:"-"`
8179	// RecipientEmailContractProperties - Recipient Email contract properties.
8180	*RecipientEmailContractProperties `json:"properties,omitempty"`
8181	// ID - READ-ONLY; Resource ID.
8182	ID *string `json:"id,omitempty"`
8183	// Name - READ-ONLY; Resource name.
8184	Name *string `json:"name,omitempty"`
8185	// Type - READ-ONLY; Resource type for API Management resource.
8186	Type *string `json:"type,omitempty"`
8187}
8188
8189// MarshalJSON is the custom marshaler for RecipientEmailContract.
8190func (rec RecipientEmailContract) MarshalJSON() ([]byte, error) {
8191	objectMap := make(map[string]interface{})
8192	if rec.RecipientEmailContractProperties != nil {
8193		objectMap["properties"] = rec.RecipientEmailContractProperties
8194	}
8195	return json.Marshal(objectMap)
8196}
8197
8198// UnmarshalJSON is the custom unmarshaler for RecipientEmailContract struct.
8199func (rec *RecipientEmailContract) UnmarshalJSON(body []byte) error {
8200	var m map[string]*json.RawMessage
8201	err := json.Unmarshal(body, &m)
8202	if err != nil {
8203		return err
8204	}
8205	for k, v := range m {
8206		switch k {
8207		case "properties":
8208			if v != nil {
8209				var recipientEmailContractProperties RecipientEmailContractProperties
8210				err = json.Unmarshal(*v, &recipientEmailContractProperties)
8211				if err != nil {
8212					return err
8213				}
8214				rec.RecipientEmailContractProperties = &recipientEmailContractProperties
8215			}
8216		case "id":
8217			if v != nil {
8218				var ID string
8219				err = json.Unmarshal(*v, &ID)
8220				if err != nil {
8221					return err
8222				}
8223				rec.ID = &ID
8224			}
8225		case "name":
8226			if v != nil {
8227				var name string
8228				err = json.Unmarshal(*v, &name)
8229				if err != nil {
8230					return err
8231				}
8232				rec.Name = &name
8233			}
8234		case "type":
8235			if v != nil {
8236				var typeVar string
8237				err = json.Unmarshal(*v, &typeVar)
8238				if err != nil {
8239					return err
8240				}
8241				rec.Type = &typeVar
8242			}
8243		}
8244	}
8245
8246	return nil
8247}
8248
8249// RecipientEmailContractProperties recipient Email Contract Properties.
8250type RecipientEmailContractProperties struct {
8251	// Email - User Email subscribed to notification.
8252	Email *string `json:"email,omitempty"`
8253}
8254
8255// RecipientsContractProperties notification Parameter contract.
8256type RecipientsContractProperties struct {
8257	// Emails - List of Emails subscribed for the notification.
8258	Emails *[]string `json:"emails,omitempty"`
8259	// Users - List of Users subscribed for the notification.
8260	Users *[]string `json:"users,omitempty"`
8261}
8262
8263// RecipientUserCollection paged Recipient User list representation.
8264type RecipientUserCollection struct {
8265	autorest.Response `json:"-"`
8266	// Value - Page values.
8267	Value *[]RecipientUserContract `json:"value,omitempty"`
8268	// NextLink - Next page link if any.
8269	NextLink *string `json:"nextLink,omitempty"`
8270}
8271
8272// RecipientUserContract recipient User details.
8273type RecipientUserContract struct {
8274	autorest.Response `json:"-"`
8275	// RecipientUsersContractProperties - Recipient User entity contract properties.
8276	*RecipientUsersContractProperties `json:"properties,omitempty"`
8277	// ID - READ-ONLY; Resource ID.
8278	ID *string `json:"id,omitempty"`
8279	// Name - READ-ONLY; Resource name.
8280	Name *string `json:"name,omitempty"`
8281	// Type - READ-ONLY; Resource type for API Management resource.
8282	Type *string `json:"type,omitempty"`
8283}
8284
8285// MarshalJSON is the custom marshaler for RecipientUserContract.
8286func (ruc RecipientUserContract) MarshalJSON() ([]byte, error) {
8287	objectMap := make(map[string]interface{})
8288	if ruc.RecipientUsersContractProperties != nil {
8289		objectMap["properties"] = ruc.RecipientUsersContractProperties
8290	}
8291	return json.Marshal(objectMap)
8292}
8293
8294// UnmarshalJSON is the custom unmarshaler for RecipientUserContract struct.
8295func (ruc *RecipientUserContract) UnmarshalJSON(body []byte) error {
8296	var m map[string]*json.RawMessage
8297	err := json.Unmarshal(body, &m)
8298	if err != nil {
8299		return err
8300	}
8301	for k, v := range m {
8302		switch k {
8303		case "properties":
8304			if v != nil {
8305				var recipientUsersContractProperties RecipientUsersContractProperties
8306				err = json.Unmarshal(*v, &recipientUsersContractProperties)
8307				if err != nil {
8308					return err
8309				}
8310				ruc.RecipientUsersContractProperties = &recipientUsersContractProperties
8311			}
8312		case "id":
8313			if v != nil {
8314				var ID string
8315				err = json.Unmarshal(*v, &ID)
8316				if err != nil {
8317					return err
8318				}
8319				ruc.ID = &ID
8320			}
8321		case "name":
8322			if v != nil {
8323				var name string
8324				err = json.Unmarshal(*v, &name)
8325				if err != nil {
8326					return err
8327				}
8328				ruc.Name = &name
8329			}
8330		case "type":
8331			if v != nil {
8332				var typeVar string
8333				err = json.Unmarshal(*v, &typeVar)
8334				if err != nil {
8335					return err
8336				}
8337				ruc.Type = &typeVar
8338			}
8339		}
8340	}
8341
8342	return nil
8343}
8344
8345// RecipientUsersContractProperties recipient User Contract Properties.
8346type RecipientUsersContractProperties struct {
8347	// UserID - API Management UserId subscribed to notification.
8348	UserID *string `json:"userId,omitempty"`
8349}
8350
8351// RegionContract region profile.
8352type RegionContract struct {
8353	// Name - READ-ONLY; Region name.
8354	Name *string `json:"name,omitempty"`
8355	// IsMasterRegion - whether Region is the master region.
8356	IsMasterRegion *bool `json:"isMasterRegion,omitempty"`
8357	// IsDeleted - whether Region is deleted.
8358	IsDeleted *bool `json:"isDeleted,omitempty"`
8359}
8360
8361// RegionListResult lists Regions operation response details.
8362type RegionListResult struct {
8363	autorest.Response `json:"-"`
8364	// Value - Lists of Regions.
8365	Value *[]RegionContract `json:"value,omitempty"`
8366	// Count - Total record count number across all pages.
8367	Count *int64 `json:"count,omitempty"`
8368	// NextLink - Next page link if any.
8369	NextLink *string `json:"nextLink,omitempty"`
8370}
8371
8372// RegionListResultIterator provides access to a complete listing of RegionContract values.
8373type RegionListResultIterator struct {
8374	i    int
8375	page RegionListResultPage
8376}
8377
8378// NextWithContext advances to the next value.  If there was an error making
8379// the request the iterator does not advance and the error is returned.
8380func (iter *RegionListResultIterator) NextWithContext(ctx context.Context) (err error) {
8381	if tracing.IsEnabled() {
8382		ctx = tracing.StartSpan(ctx, fqdn+"/RegionListResultIterator.NextWithContext")
8383		defer func() {
8384			sc := -1
8385			if iter.Response().Response.Response != nil {
8386				sc = iter.Response().Response.Response.StatusCode
8387			}
8388			tracing.EndSpan(ctx, sc, err)
8389		}()
8390	}
8391	iter.i++
8392	if iter.i < len(iter.page.Values()) {
8393		return nil
8394	}
8395	err = iter.page.NextWithContext(ctx)
8396	if err != nil {
8397		iter.i--
8398		return err
8399	}
8400	iter.i = 0
8401	return nil
8402}
8403
8404// Next advances to the next value.  If there was an error making
8405// the request the iterator does not advance and the error is returned.
8406// Deprecated: Use NextWithContext() instead.
8407func (iter *RegionListResultIterator) Next() error {
8408	return iter.NextWithContext(context.Background())
8409}
8410
8411// NotDone returns true if the enumeration should be started or is not yet complete.
8412func (iter RegionListResultIterator) NotDone() bool {
8413	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8414}
8415
8416// Response returns the raw server response from the last page request.
8417func (iter RegionListResultIterator) Response() RegionListResult {
8418	return iter.page.Response()
8419}
8420
8421// Value returns the current value or a zero-initialized value if the
8422// iterator has advanced beyond the end of the collection.
8423func (iter RegionListResultIterator) Value() RegionContract {
8424	if !iter.page.NotDone() {
8425		return RegionContract{}
8426	}
8427	return iter.page.Values()[iter.i]
8428}
8429
8430// Creates a new instance of the RegionListResultIterator type.
8431func NewRegionListResultIterator(page RegionListResultPage) RegionListResultIterator {
8432	return RegionListResultIterator{page: page}
8433}
8434
8435// IsEmpty returns true if the ListResult contains no values.
8436func (rlr RegionListResult) IsEmpty() bool {
8437	return rlr.Value == nil || len(*rlr.Value) == 0
8438}
8439
8440// regionListResultPreparer prepares a request to retrieve the next set of results.
8441// It returns nil if no more results exist.
8442func (rlr RegionListResult) regionListResultPreparer(ctx context.Context) (*http.Request, error) {
8443	if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 {
8444		return nil, nil
8445	}
8446	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8447		autorest.AsJSON(),
8448		autorest.AsGet(),
8449		autorest.WithBaseURL(to.String(rlr.NextLink)))
8450}
8451
8452// RegionListResultPage contains a page of RegionContract values.
8453type RegionListResultPage struct {
8454	fn  func(context.Context, RegionListResult) (RegionListResult, error)
8455	rlr RegionListResult
8456}
8457
8458// NextWithContext advances to the next page of values.  If there was an error making
8459// the request the page does not advance and the error is returned.
8460func (page *RegionListResultPage) NextWithContext(ctx context.Context) (err error) {
8461	if tracing.IsEnabled() {
8462		ctx = tracing.StartSpan(ctx, fqdn+"/RegionListResultPage.NextWithContext")
8463		defer func() {
8464			sc := -1
8465			if page.Response().Response.Response != nil {
8466				sc = page.Response().Response.Response.StatusCode
8467			}
8468			tracing.EndSpan(ctx, sc, err)
8469		}()
8470	}
8471	next, err := page.fn(ctx, page.rlr)
8472	if err != nil {
8473		return err
8474	}
8475	page.rlr = next
8476	return nil
8477}
8478
8479// Next advances to the next page of values.  If there was an error making
8480// the request the page does not advance and the error is returned.
8481// Deprecated: Use NextWithContext() instead.
8482func (page *RegionListResultPage) Next() error {
8483	return page.NextWithContext(context.Background())
8484}
8485
8486// NotDone returns true if the page enumeration should be started or is not yet complete.
8487func (page RegionListResultPage) NotDone() bool {
8488	return !page.rlr.IsEmpty()
8489}
8490
8491// Response returns the raw server response from the last page request.
8492func (page RegionListResultPage) Response() RegionListResult {
8493	return page.rlr
8494}
8495
8496// Values returns the slice of values for the current page or nil if there are no values.
8497func (page RegionListResultPage) Values() []RegionContract {
8498	if page.rlr.IsEmpty() {
8499		return nil
8500	}
8501	return *page.rlr.Value
8502}
8503
8504// Creates a new instance of the RegionListResultPage type.
8505func NewRegionListResultPage(getNextPage func(context.Context, RegionListResult) (RegionListResult, error)) RegionListResultPage {
8506	return RegionListResultPage{fn: getNextPage}
8507}
8508
8509// RegistrationDelegationSettingsProperties user registration delegation settings properties.
8510type RegistrationDelegationSettingsProperties struct {
8511	// Enabled - Enable or disable delegation for user registration.
8512	Enabled *bool `json:"enabled,omitempty"`
8513}
8514
8515// ReportCollection paged Report records list representation.
8516type ReportCollection struct {
8517	autorest.Response `json:"-"`
8518	// Value - Page values.
8519	Value *[]ReportRecordContract `json:"value,omitempty"`
8520	// Count - Total record count number across all pages.
8521	Count *int64 `json:"count,omitempty"`
8522	// NextLink - Next page link if any.
8523	NextLink *string `json:"nextLink,omitempty"`
8524}
8525
8526// ReportCollectionIterator provides access to a complete listing of ReportRecordContract values.
8527type ReportCollectionIterator struct {
8528	i    int
8529	page ReportCollectionPage
8530}
8531
8532// NextWithContext advances to the next value.  If there was an error making
8533// the request the iterator does not advance and the error is returned.
8534func (iter *ReportCollectionIterator) NextWithContext(ctx context.Context) (err error) {
8535	if tracing.IsEnabled() {
8536		ctx = tracing.StartSpan(ctx, fqdn+"/ReportCollectionIterator.NextWithContext")
8537		defer func() {
8538			sc := -1
8539			if iter.Response().Response.Response != nil {
8540				sc = iter.Response().Response.Response.StatusCode
8541			}
8542			tracing.EndSpan(ctx, sc, err)
8543		}()
8544	}
8545	iter.i++
8546	if iter.i < len(iter.page.Values()) {
8547		return nil
8548	}
8549	err = iter.page.NextWithContext(ctx)
8550	if err != nil {
8551		iter.i--
8552		return err
8553	}
8554	iter.i = 0
8555	return nil
8556}
8557
8558// Next advances to the next value.  If there was an error making
8559// the request the iterator does not advance and the error is returned.
8560// Deprecated: Use NextWithContext() instead.
8561func (iter *ReportCollectionIterator) Next() error {
8562	return iter.NextWithContext(context.Background())
8563}
8564
8565// NotDone returns true if the enumeration should be started or is not yet complete.
8566func (iter ReportCollectionIterator) NotDone() bool {
8567	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8568}
8569
8570// Response returns the raw server response from the last page request.
8571func (iter ReportCollectionIterator) Response() ReportCollection {
8572	return iter.page.Response()
8573}
8574
8575// Value returns the current value or a zero-initialized value if the
8576// iterator has advanced beyond the end of the collection.
8577func (iter ReportCollectionIterator) Value() ReportRecordContract {
8578	if !iter.page.NotDone() {
8579		return ReportRecordContract{}
8580	}
8581	return iter.page.Values()[iter.i]
8582}
8583
8584// Creates a new instance of the ReportCollectionIterator type.
8585func NewReportCollectionIterator(page ReportCollectionPage) ReportCollectionIterator {
8586	return ReportCollectionIterator{page: page}
8587}
8588
8589// IsEmpty returns true if the ListResult contains no values.
8590func (rc ReportCollection) IsEmpty() bool {
8591	return rc.Value == nil || len(*rc.Value) == 0
8592}
8593
8594// reportCollectionPreparer prepares a request to retrieve the next set of results.
8595// It returns nil if no more results exist.
8596func (rc ReportCollection) reportCollectionPreparer(ctx context.Context) (*http.Request, error) {
8597	if rc.NextLink == nil || len(to.String(rc.NextLink)) < 1 {
8598		return nil, nil
8599	}
8600	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8601		autorest.AsJSON(),
8602		autorest.AsGet(),
8603		autorest.WithBaseURL(to.String(rc.NextLink)))
8604}
8605
8606// ReportCollectionPage contains a page of ReportRecordContract values.
8607type ReportCollectionPage struct {
8608	fn func(context.Context, ReportCollection) (ReportCollection, error)
8609	rc ReportCollection
8610}
8611
8612// NextWithContext advances to the next page of values.  If there was an error making
8613// the request the page does not advance and the error is returned.
8614func (page *ReportCollectionPage) NextWithContext(ctx context.Context) (err error) {
8615	if tracing.IsEnabled() {
8616		ctx = tracing.StartSpan(ctx, fqdn+"/ReportCollectionPage.NextWithContext")
8617		defer func() {
8618			sc := -1
8619			if page.Response().Response.Response != nil {
8620				sc = page.Response().Response.Response.StatusCode
8621			}
8622			tracing.EndSpan(ctx, sc, err)
8623		}()
8624	}
8625	next, err := page.fn(ctx, page.rc)
8626	if err != nil {
8627		return err
8628	}
8629	page.rc = next
8630	return nil
8631}
8632
8633// Next advances to the next page of values.  If there was an error making
8634// the request the page does not advance and the error is returned.
8635// Deprecated: Use NextWithContext() instead.
8636func (page *ReportCollectionPage) Next() error {
8637	return page.NextWithContext(context.Background())
8638}
8639
8640// NotDone returns true if the page enumeration should be started or is not yet complete.
8641func (page ReportCollectionPage) NotDone() bool {
8642	return !page.rc.IsEmpty()
8643}
8644
8645// Response returns the raw server response from the last page request.
8646func (page ReportCollectionPage) Response() ReportCollection {
8647	return page.rc
8648}
8649
8650// Values returns the slice of values for the current page or nil if there are no values.
8651func (page ReportCollectionPage) Values() []ReportRecordContract {
8652	if page.rc.IsEmpty() {
8653		return nil
8654	}
8655	return *page.rc.Value
8656}
8657
8658// Creates a new instance of the ReportCollectionPage type.
8659func NewReportCollectionPage(getNextPage func(context.Context, ReportCollection) (ReportCollection, error)) ReportCollectionPage {
8660	return ReportCollectionPage{fn: getNextPage}
8661}
8662
8663// ReportRecordContract report data.
8664type ReportRecordContract struct {
8665	// Name - Name depending on report endpoint specifies product, API, operation or developer name.
8666	Name *string `json:"name,omitempty"`
8667	// Timestamp - Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
8668	Timestamp *date.Time `json:"timestamp,omitempty"`
8669	// 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).
8670	Interval *string `json:"interval,omitempty"`
8671	// Country - Country to which this record data is related.
8672	Country *string `json:"country,omitempty"`
8673	// Region - Country region to which this record data is related.
8674	Region *string `json:"region,omitempty"`
8675	// Zip - Zip code to which this record data is related.
8676	Zip *string `json:"zip,omitempty"`
8677	// UserID - READ-ONLY; User identifier path. /users/{userId}
8678	UserID *string `json:"userId,omitempty"`
8679	// ProductID - READ-ONLY; Product identifier path. /products/{productId}
8680	ProductID *string `json:"productId,omitempty"`
8681	// APIID - API identifier path. /apis/{apiId}
8682	APIID *string `json:"apiId,omitempty"`
8683	// OperationID - Operation identifier path. /apis/{apiId}/operations/{operationId}
8684	OperationID *string `json:"operationId,omitempty"`
8685	// APIRegion - API region identifier.
8686	APIRegion *string `json:"apiRegion,omitempty"`
8687	// SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId}
8688	SubscriptionID *string `json:"subscriptionId,omitempty"`
8689	// CallCountSuccess - Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect
8690	CallCountSuccess *int32 `json:"callCountSuccess,omitempty"`
8691	// CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests
8692	CallCountBlocked *int32 `json:"callCountBlocked,omitempty"`
8693	// 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
8694	CallCountFailed *int32 `json:"callCountFailed,omitempty"`
8695	// CallCountOther - Number of other calls.
8696	CallCountOther *int32 `json:"callCountOther,omitempty"`
8697	// CallCountTotal - Total number of calls.
8698	CallCountTotal *int32 `json:"callCountTotal,omitempty"`
8699	// Bandwidth - Bandwidth consumed.
8700	Bandwidth *int64 `json:"bandwidth,omitempty"`
8701	// CacheHitCount - Number of times when content was served from cache policy.
8702	CacheHitCount *int32 `json:"cacheHitCount,omitempty"`
8703	// CacheMissCount - Number of times content was fetched from backend.
8704	CacheMissCount *int32 `json:"cacheMissCount,omitempty"`
8705	// APITimeAvg - Average time it took to process request.
8706	APITimeAvg *float64 `json:"apiTimeAvg,omitempty"`
8707	// APITimeMin - Minimum time it took to process request.
8708	APITimeMin *float64 `json:"apiTimeMin,omitempty"`
8709	// APITimeMax - Maximum time it took to process request.
8710	APITimeMax *float64 `json:"apiTimeMax,omitempty"`
8711	// ServiceTimeAvg - Average time it took to process request on backend.
8712	ServiceTimeAvg *float64 `json:"serviceTimeAvg,omitempty"`
8713	// ServiceTimeMin - Minimum time it took to process request on backend.
8714	ServiceTimeMin *float64 `json:"serviceTimeMin,omitempty"`
8715	// ServiceTimeMax - Maximum time it took to process request on backend.
8716	ServiceTimeMax *float64 `json:"serviceTimeMax,omitempty"`
8717}
8718
8719// RepresentationContract operation request/response representation details.
8720type RepresentationContract struct {
8721	// ContentType - Specifies a registered or custom content type for this representation, e.g. application/xml.
8722	ContentType *string `json:"contentType,omitempty"`
8723	// Sample - An example of the representation.
8724	Sample *string `json:"sample,omitempty"`
8725	// SchemaID - Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
8726	SchemaID *string `json:"schemaId,omitempty"`
8727	// TypeName - Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
8728	TypeName *string `json:"typeName,omitempty"`
8729	// FormParameters - Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
8730	FormParameters *[]ParameterContract `json:"formParameters,omitempty"`
8731}
8732
8733// RequestContract operation request details.
8734type RequestContract struct {
8735	// Description - Operation request description.
8736	Description *string `json:"description,omitempty"`
8737	// QueryParameters - Collection of operation request query parameters.
8738	QueryParameters *[]ParameterContract `json:"queryParameters,omitempty"`
8739	// Headers - Collection of operation request headers.
8740	Headers *[]ParameterContract `json:"headers,omitempty"`
8741	// Representations - Collection of operation request representations.
8742	Representations *[]RepresentationContract `json:"representations,omitempty"`
8743}
8744
8745// RequestReportCollection paged Report records list representation.
8746type RequestReportCollection struct {
8747	autorest.Response `json:"-"`
8748	// Value - Page values.
8749	Value *[]RequestReportRecordContract `json:"value,omitempty"`
8750	// Count - Total record count number across all pages.
8751	Count *int64 `json:"count,omitempty"`
8752}
8753
8754// RequestReportRecordContract request Report data.
8755type RequestReportRecordContract struct {
8756	// APIID - API identifier path. /apis/{apiId}
8757	APIID *string `json:"apiId,omitempty"`
8758	// OperationID - Operation identifier path. /apis/{apiId}/operations/{operationId}
8759	OperationID *string `json:"operationId,omitempty"`
8760	// ProductID - READ-ONLY; Product identifier path. /products/{productId}
8761	ProductID *string `json:"productId,omitempty"`
8762	// UserID - READ-ONLY; User identifier path. /users/{userId}
8763	UserID *string `json:"userId,omitempty"`
8764	// Method - The HTTP method associated with this request..
8765	Method *string `json:"method,omitempty"`
8766	// URL - The full URL associated with this request.
8767	URL *string `json:"url,omitempty"`
8768	// IPAddress - The client IP address associated with this request.
8769	IPAddress *string `json:"ipAddress,omitempty"`
8770	// BackendResponseCode - The HTTP status code received by the gateway as a result of forwarding this request to the backend.
8771	BackendResponseCode *string `json:"backendResponseCode,omitempty"`
8772	// ResponseCode - The HTTP status code returned by the gateway.
8773	ResponseCode *int32 `json:"responseCode,omitempty"`
8774	// ResponseSize - The size of the response returned by the gateway.
8775	ResponseSize *int32 `json:"responseSize,omitempty"`
8776	// Timestamp - The date and time when this request was received by the gateway in ISO 8601 format.
8777	Timestamp *date.Time `json:"timestamp,omitempty"`
8778	// 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.
8779	Cache *string `json:"cache,omitempty"`
8780	// APITime - The total time it took to process this request.
8781	APITime *float64 `json:"apiTime,omitempty"`
8782	// ServiceTime - he time it took to forward this request to the backend and get the response back.
8783	ServiceTime *float64 `json:"serviceTime,omitempty"`
8784	// APIRegion - Azure region where the gateway that processed this request is located.
8785	APIRegion *string `json:"apiRegion,omitempty"`
8786	// SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId}
8787	SubscriptionID *string `json:"subscriptionId,omitempty"`
8788	// RequestID - Request Identifier.
8789	RequestID *string `json:"requestId,omitempty"`
8790	// RequestSize - The size of this request..
8791	RequestSize *int32 `json:"requestSize,omitempty"`
8792}
8793
8794// Resource the Resource definition.
8795type Resource struct {
8796	// ID - READ-ONLY; Resource ID.
8797	ID *string `json:"id,omitempty"`
8798	// Name - READ-ONLY; Resource name.
8799	Name *string `json:"name,omitempty"`
8800	// Type - READ-ONLY; Resource type for API Management resource.
8801	Type *string `json:"type,omitempty"`
8802}
8803
8804// ResourceSku describes an available API Management SKU.
8805type ResourceSku struct {
8806	// Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic', 'SkuTypeConsumption'
8807	Name SkuType `json:"name,omitempty"`
8808}
8809
8810// ResourceSkuCapacity describes scaling information of a SKU.
8811type ResourceSkuCapacity struct {
8812	// Minimum - READ-ONLY; The minimum capacity.
8813	Minimum *int32 `json:"minimum,omitempty"`
8814	// Maximum - READ-ONLY; The maximum capacity that can be set.
8815	Maximum *int32 `json:"maximum,omitempty"`
8816	// Default - READ-ONLY; The default capacity.
8817	Default *int32 `json:"default,omitempty"`
8818	// ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'Automatic', 'Manual', 'None'
8819	ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"`
8820}
8821
8822// ResourceSkuResult describes an available API Management service SKU.
8823type ResourceSkuResult struct {
8824	// ResourceType - READ-ONLY; The type of resource the SKU applies to.
8825	ResourceType *string `json:"resourceType,omitempty"`
8826	// Sku - READ-ONLY; Specifies API Management SKU.
8827	Sku *ResourceSku `json:"sku,omitempty"`
8828	// Capacity - READ-ONLY; Specifies the number of API Management units.
8829	Capacity *ResourceSkuCapacity `json:"capacity,omitempty"`
8830}
8831
8832// ResourceSkuResults the API Management service SKUs operation response.
8833type ResourceSkuResults struct {
8834	autorest.Response `json:"-"`
8835	// Value - The list of skus available for the service.
8836	Value *[]ResourceSkuResult `json:"value,omitempty"`
8837	// NextLink - The uri to fetch the next page of API Management service Skus.
8838	NextLink *string `json:"nextLink,omitempty"`
8839}
8840
8841// ResourceSkuResultsIterator provides access to a complete listing of ResourceSkuResult values.
8842type ResourceSkuResultsIterator struct {
8843	i    int
8844	page ResourceSkuResultsPage
8845}
8846
8847// NextWithContext advances to the next value.  If there was an error making
8848// the request the iterator does not advance and the error is returned.
8849func (iter *ResourceSkuResultsIterator) NextWithContext(ctx context.Context) (err error) {
8850	if tracing.IsEnabled() {
8851		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuResultsIterator.NextWithContext")
8852		defer func() {
8853			sc := -1
8854			if iter.Response().Response.Response != nil {
8855				sc = iter.Response().Response.Response.StatusCode
8856			}
8857			tracing.EndSpan(ctx, sc, err)
8858		}()
8859	}
8860	iter.i++
8861	if iter.i < len(iter.page.Values()) {
8862		return nil
8863	}
8864	err = iter.page.NextWithContext(ctx)
8865	if err != nil {
8866		iter.i--
8867		return err
8868	}
8869	iter.i = 0
8870	return nil
8871}
8872
8873// Next advances to the next value.  If there was an error making
8874// the request the iterator does not advance and the error is returned.
8875// Deprecated: Use NextWithContext() instead.
8876func (iter *ResourceSkuResultsIterator) Next() error {
8877	return iter.NextWithContext(context.Background())
8878}
8879
8880// NotDone returns true if the enumeration should be started or is not yet complete.
8881func (iter ResourceSkuResultsIterator) NotDone() bool {
8882	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8883}
8884
8885// Response returns the raw server response from the last page request.
8886func (iter ResourceSkuResultsIterator) Response() ResourceSkuResults {
8887	return iter.page.Response()
8888}
8889
8890// Value returns the current value or a zero-initialized value if the
8891// iterator has advanced beyond the end of the collection.
8892func (iter ResourceSkuResultsIterator) Value() ResourceSkuResult {
8893	if !iter.page.NotDone() {
8894		return ResourceSkuResult{}
8895	}
8896	return iter.page.Values()[iter.i]
8897}
8898
8899// Creates a new instance of the ResourceSkuResultsIterator type.
8900func NewResourceSkuResultsIterator(page ResourceSkuResultsPage) ResourceSkuResultsIterator {
8901	return ResourceSkuResultsIterator{page: page}
8902}
8903
8904// IsEmpty returns true if the ListResult contains no values.
8905func (rsr ResourceSkuResults) IsEmpty() bool {
8906	return rsr.Value == nil || len(*rsr.Value) == 0
8907}
8908
8909// resourceSkuResultsPreparer prepares a request to retrieve the next set of results.
8910// It returns nil if no more results exist.
8911func (rsr ResourceSkuResults) resourceSkuResultsPreparer(ctx context.Context) (*http.Request, error) {
8912	if rsr.NextLink == nil || len(to.String(rsr.NextLink)) < 1 {
8913		return nil, nil
8914	}
8915	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8916		autorest.AsJSON(),
8917		autorest.AsGet(),
8918		autorest.WithBaseURL(to.String(rsr.NextLink)))
8919}
8920
8921// ResourceSkuResultsPage contains a page of ResourceSkuResult values.
8922type ResourceSkuResultsPage struct {
8923	fn  func(context.Context, ResourceSkuResults) (ResourceSkuResults, error)
8924	rsr ResourceSkuResults
8925}
8926
8927// NextWithContext advances to the next page of values.  If there was an error making
8928// the request the page does not advance and the error is returned.
8929func (page *ResourceSkuResultsPage) NextWithContext(ctx context.Context) (err error) {
8930	if tracing.IsEnabled() {
8931		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuResultsPage.NextWithContext")
8932		defer func() {
8933			sc := -1
8934			if page.Response().Response.Response != nil {
8935				sc = page.Response().Response.Response.StatusCode
8936			}
8937			tracing.EndSpan(ctx, sc, err)
8938		}()
8939	}
8940	next, err := page.fn(ctx, page.rsr)
8941	if err != nil {
8942		return err
8943	}
8944	page.rsr = next
8945	return nil
8946}
8947
8948// Next advances to the next page of values.  If there was an error making
8949// the request the page does not advance and the error is returned.
8950// Deprecated: Use NextWithContext() instead.
8951func (page *ResourceSkuResultsPage) Next() error {
8952	return page.NextWithContext(context.Background())
8953}
8954
8955// NotDone returns true if the page enumeration should be started or is not yet complete.
8956func (page ResourceSkuResultsPage) NotDone() bool {
8957	return !page.rsr.IsEmpty()
8958}
8959
8960// Response returns the raw server response from the last page request.
8961func (page ResourceSkuResultsPage) Response() ResourceSkuResults {
8962	return page.rsr
8963}
8964
8965// Values returns the slice of values for the current page or nil if there are no values.
8966func (page ResourceSkuResultsPage) Values() []ResourceSkuResult {
8967	if page.rsr.IsEmpty() {
8968		return nil
8969	}
8970	return *page.rsr.Value
8971}
8972
8973// Creates a new instance of the ResourceSkuResultsPage type.
8974func NewResourceSkuResultsPage(getNextPage func(context.Context, ResourceSkuResults) (ResourceSkuResults, error)) ResourceSkuResultsPage {
8975	return ResourceSkuResultsPage{fn: getNextPage}
8976}
8977
8978// ResponseContract operation response details.
8979type ResponseContract struct {
8980	// StatusCode - Operation response HTTP status code.
8981	StatusCode *int32 `json:"statusCode,omitempty"`
8982	// Description - Operation response description.
8983	Description *string `json:"description,omitempty"`
8984	// Representations - Collection of operation response representations.
8985	Representations *[]RepresentationContract `json:"representations,omitempty"`
8986	// Headers - Collection of operation response headers.
8987	Headers *[]ParameterContract `json:"headers,omitempty"`
8988}
8989
8990// SamplingSettings sampling settings for Diagnostic.
8991type SamplingSettings struct {
8992	// SamplingType - Sampling type. Possible values include: 'Fixed'
8993	SamplingType SamplingType `json:"samplingType,omitempty"`
8994	// Percentage - Rate of sampling for fixed-rate sampling.
8995	Percentage *float64 `json:"percentage,omitempty"`
8996}
8997
8998// SaveConfigurationParameter save Tenant Configuration Contract details.
8999type SaveConfigurationParameter struct {
9000	// SaveConfigurationParameterProperties - Properties of the Save Configuration Parameters.
9001	*SaveConfigurationParameterProperties `json:"properties,omitempty"`
9002}
9003
9004// MarshalJSON is the custom marshaler for SaveConfigurationParameter.
9005func (scp SaveConfigurationParameter) MarshalJSON() ([]byte, error) {
9006	objectMap := make(map[string]interface{})
9007	if scp.SaveConfigurationParameterProperties != nil {
9008		objectMap["properties"] = scp.SaveConfigurationParameterProperties
9009	}
9010	return json.Marshal(objectMap)
9011}
9012
9013// UnmarshalJSON is the custom unmarshaler for SaveConfigurationParameter struct.
9014func (scp *SaveConfigurationParameter) UnmarshalJSON(body []byte) error {
9015	var m map[string]*json.RawMessage
9016	err := json.Unmarshal(body, &m)
9017	if err != nil {
9018		return err
9019	}
9020	for k, v := range m {
9021		switch k {
9022		case "properties":
9023			if v != nil {
9024				var saveConfigurationParameterProperties SaveConfigurationParameterProperties
9025				err = json.Unmarshal(*v, &saveConfigurationParameterProperties)
9026				if err != nil {
9027					return err
9028				}
9029				scp.SaveConfigurationParameterProperties = &saveConfigurationParameterProperties
9030			}
9031		}
9032	}
9033
9034	return nil
9035}
9036
9037// SaveConfigurationParameterProperties parameters supplied to the Save Tenant Configuration operation.
9038type SaveConfigurationParameterProperties struct {
9039	// Branch - The name of the Git branch in which to commit the current configuration snapshot.
9040	Branch *string `json:"branch,omitempty"`
9041	// 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.
9042	Force *bool `json:"force,omitempty"`
9043}
9044
9045// SchemaCollection the response of the list schema operation.
9046type SchemaCollection struct {
9047	autorest.Response `json:"-"`
9048	// Value - READ-ONLY; Api Schema Contract value.
9049	Value *[]SchemaContract `json:"value,omitempty"`
9050	// NextLink - READ-ONLY; Next page link if any.
9051	NextLink *string `json:"nextLink,omitempty"`
9052}
9053
9054// SchemaCollectionIterator provides access to a complete listing of SchemaContract values.
9055type SchemaCollectionIterator struct {
9056	i    int
9057	page SchemaCollectionPage
9058}
9059
9060// NextWithContext advances to the next value.  If there was an error making
9061// the request the iterator does not advance and the error is returned.
9062func (iter *SchemaCollectionIterator) NextWithContext(ctx context.Context) (err error) {
9063	if tracing.IsEnabled() {
9064		ctx = tracing.StartSpan(ctx, fqdn+"/SchemaCollectionIterator.NextWithContext")
9065		defer func() {
9066			sc := -1
9067			if iter.Response().Response.Response != nil {
9068				sc = iter.Response().Response.Response.StatusCode
9069			}
9070			tracing.EndSpan(ctx, sc, err)
9071		}()
9072	}
9073	iter.i++
9074	if iter.i < len(iter.page.Values()) {
9075		return nil
9076	}
9077	err = iter.page.NextWithContext(ctx)
9078	if err != nil {
9079		iter.i--
9080		return err
9081	}
9082	iter.i = 0
9083	return nil
9084}
9085
9086// Next advances to the next value.  If there was an error making
9087// the request the iterator does not advance and the error is returned.
9088// Deprecated: Use NextWithContext() instead.
9089func (iter *SchemaCollectionIterator) Next() error {
9090	return iter.NextWithContext(context.Background())
9091}
9092
9093// NotDone returns true if the enumeration should be started or is not yet complete.
9094func (iter SchemaCollectionIterator) NotDone() bool {
9095	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9096}
9097
9098// Response returns the raw server response from the last page request.
9099func (iter SchemaCollectionIterator) Response() SchemaCollection {
9100	return iter.page.Response()
9101}
9102
9103// Value returns the current value or a zero-initialized value if the
9104// iterator has advanced beyond the end of the collection.
9105func (iter SchemaCollectionIterator) Value() SchemaContract {
9106	if !iter.page.NotDone() {
9107		return SchemaContract{}
9108	}
9109	return iter.page.Values()[iter.i]
9110}
9111
9112// Creates a new instance of the SchemaCollectionIterator type.
9113func NewSchemaCollectionIterator(page SchemaCollectionPage) SchemaCollectionIterator {
9114	return SchemaCollectionIterator{page: page}
9115}
9116
9117// IsEmpty returns true if the ListResult contains no values.
9118func (sc SchemaCollection) IsEmpty() bool {
9119	return sc.Value == nil || len(*sc.Value) == 0
9120}
9121
9122// schemaCollectionPreparer prepares a request to retrieve the next set of results.
9123// It returns nil if no more results exist.
9124func (sc SchemaCollection) schemaCollectionPreparer(ctx context.Context) (*http.Request, error) {
9125	if sc.NextLink == nil || len(to.String(sc.NextLink)) < 1 {
9126		return nil, nil
9127	}
9128	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9129		autorest.AsJSON(),
9130		autorest.AsGet(),
9131		autorest.WithBaseURL(to.String(sc.NextLink)))
9132}
9133
9134// SchemaCollectionPage contains a page of SchemaContract values.
9135type SchemaCollectionPage struct {
9136	fn func(context.Context, SchemaCollection) (SchemaCollection, error)
9137	sc SchemaCollection
9138}
9139
9140// NextWithContext advances to the next page of values.  If there was an error making
9141// the request the page does not advance and the error is returned.
9142func (page *SchemaCollectionPage) NextWithContext(ctx context.Context) (err error) {
9143	if tracing.IsEnabled() {
9144		ctx = tracing.StartSpan(ctx, fqdn+"/SchemaCollectionPage.NextWithContext")
9145		defer func() {
9146			sc := -1
9147			if page.Response().Response.Response != nil {
9148				sc = page.Response().Response.Response.StatusCode
9149			}
9150			tracing.EndSpan(ctx, sc, err)
9151		}()
9152	}
9153	next, err := page.fn(ctx, page.sc)
9154	if err != nil {
9155		return err
9156	}
9157	page.sc = next
9158	return nil
9159}
9160
9161// Next advances to the next page of values.  If there was an error making
9162// the request the page does not advance and the error is returned.
9163// Deprecated: Use NextWithContext() instead.
9164func (page *SchemaCollectionPage) Next() error {
9165	return page.NextWithContext(context.Background())
9166}
9167
9168// NotDone returns true if the page enumeration should be started or is not yet complete.
9169func (page SchemaCollectionPage) NotDone() bool {
9170	return !page.sc.IsEmpty()
9171}
9172
9173// Response returns the raw server response from the last page request.
9174func (page SchemaCollectionPage) Response() SchemaCollection {
9175	return page.sc
9176}
9177
9178// Values returns the slice of values for the current page or nil if there are no values.
9179func (page SchemaCollectionPage) Values() []SchemaContract {
9180	if page.sc.IsEmpty() {
9181		return nil
9182	}
9183	return *page.sc.Value
9184}
9185
9186// Creates a new instance of the SchemaCollectionPage type.
9187func NewSchemaCollectionPage(getNextPage func(context.Context, SchemaCollection) (SchemaCollection, error)) SchemaCollectionPage {
9188	return SchemaCollectionPage{fn: getNextPage}
9189}
9190
9191// SchemaContract schema Contract details.
9192type SchemaContract struct {
9193	autorest.Response `json:"-"`
9194	// SchemaContractProperties - Properties of the Schema.
9195	*SchemaContractProperties `json:"properties,omitempty"`
9196	// ID - READ-ONLY; Resource ID.
9197	ID *string `json:"id,omitempty"`
9198	// Name - READ-ONLY; Resource name.
9199	Name *string `json:"name,omitempty"`
9200	// Type - READ-ONLY; Resource type for API Management resource.
9201	Type *string `json:"type,omitempty"`
9202}
9203
9204// MarshalJSON is the custom marshaler for SchemaContract.
9205func (sc SchemaContract) MarshalJSON() ([]byte, error) {
9206	objectMap := make(map[string]interface{})
9207	if sc.SchemaContractProperties != nil {
9208		objectMap["properties"] = sc.SchemaContractProperties
9209	}
9210	return json.Marshal(objectMap)
9211}
9212
9213// UnmarshalJSON is the custom unmarshaler for SchemaContract struct.
9214func (sc *SchemaContract) UnmarshalJSON(body []byte) error {
9215	var m map[string]*json.RawMessage
9216	err := json.Unmarshal(body, &m)
9217	if err != nil {
9218		return err
9219	}
9220	for k, v := range m {
9221		switch k {
9222		case "properties":
9223			if v != nil {
9224				var schemaContractProperties SchemaContractProperties
9225				err = json.Unmarshal(*v, &schemaContractProperties)
9226				if err != nil {
9227					return err
9228				}
9229				sc.SchemaContractProperties = &schemaContractProperties
9230			}
9231		case "id":
9232			if v != nil {
9233				var ID string
9234				err = json.Unmarshal(*v, &ID)
9235				if err != nil {
9236					return err
9237				}
9238				sc.ID = &ID
9239			}
9240		case "name":
9241			if v != nil {
9242				var name string
9243				err = json.Unmarshal(*v, &name)
9244				if err != nil {
9245					return err
9246				}
9247				sc.Name = &name
9248			}
9249		case "type":
9250			if v != nil {
9251				var typeVar string
9252				err = json.Unmarshal(*v, &typeVar)
9253				if err != nil {
9254					return err
9255				}
9256				sc.Type = &typeVar
9257			}
9258		}
9259	}
9260
9261	return nil
9262}
9263
9264// SchemaContractProperties schema contract Properties.
9265type SchemaContractProperties struct {
9266	// 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`.
9267	ContentType *string `json:"contentType,omitempty"`
9268	// Document - Properties of the Schema Document.
9269	Document interface{} `json:"document,omitempty"`
9270}
9271
9272// SchemaCreateOrUpdateContract schema Contract details.
9273type SchemaCreateOrUpdateContract struct {
9274	// SchemaCreateOrUpdateProperties - Properties of the Schema.
9275	*SchemaCreateOrUpdateProperties `json:"properties,omitempty"`
9276	// ID - READ-ONLY; Resource ID.
9277	ID *string `json:"id,omitempty"`
9278	// Name - READ-ONLY; Resource name.
9279	Name *string `json:"name,omitempty"`
9280	// Type - READ-ONLY; Resource type for API Management resource.
9281	Type *string `json:"type,omitempty"`
9282}
9283
9284// MarshalJSON is the custom marshaler for SchemaCreateOrUpdateContract.
9285func (scouc SchemaCreateOrUpdateContract) MarshalJSON() ([]byte, error) {
9286	objectMap := make(map[string]interface{})
9287	if scouc.SchemaCreateOrUpdateProperties != nil {
9288		objectMap["properties"] = scouc.SchemaCreateOrUpdateProperties
9289	}
9290	return json.Marshal(objectMap)
9291}
9292
9293// UnmarshalJSON is the custom unmarshaler for SchemaCreateOrUpdateContract struct.
9294func (scouc *SchemaCreateOrUpdateContract) UnmarshalJSON(body []byte) error {
9295	var m map[string]*json.RawMessage
9296	err := json.Unmarshal(body, &m)
9297	if err != nil {
9298		return err
9299	}
9300	for k, v := range m {
9301		switch k {
9302		case "properties":
9303			if v != nil {
9304				var schemaCreateOrUpdateProperties SchemaCreateOrUpdateProperties
9305				err = json.Unmarshal(*v, &schemaCreateOrUpdateProperties)
9306				if err != nil {
9307					return err
9308				}
9309				scouc.SchemaCreateOrUpdateProperties = &schemaCreateOrUpdateProperties
9310			}
9311		case "id":
9312			if v != nil {
9313				var ID string
9314				err = json.Unmarshal(*v, &ID)
9315				if err != nil {
9316					return err
9317				}
9318				scouc.ID = &ID
9319			}
9320		case "name":
9321			if v != nil {
9322				var name string
9323				err = json.Unmarshal(*v, &name)
9324				if err != nil {
9325					return err
9326				}
9327				scouc.Name = &name
9328			}
9329		case "type":
9330			if v != nil {
9331				var typeVar string
9332				err = json.Unmarshal(*v, &typeVar)
9333				if err != nil {
9334					return err
9335				}
9336				scouc.Type = &typeVar
9337			}
9338		}
9339	}
9340
9341	return nil
9342}
9343
9344// SchemaCreateOrUpdateProperties API Schema create or update contract Properties.
9345type SchemaCreateOrUpdateProperties struct {
9346	// 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`.
9347	ContentType *string `json:"contentType,omitempty"`
9348	// SchemaDocumentProperties - Create or update Properties of the Schema Document.
9349	*SchemaDocumentProperties `json:"document,omitempty"`
9350}
9351
9352// MarshalJSON is the custom marshaler for SchemaCreateOrUpdateProperties.
9353func (scoup SchemaCreateOrUpdateProperties) MarshalJSON() ([]byte, error) {
9354	objectMap := make(map[string]interface{})
9355	if scoup.ContentType != nil {
9356		objectMap["contentType"] = scoup.ContentType
9357	}
9358	if scoup.SchemaDocumentProperties != nil {
9359		objectMap["document"] = scoup.SchemaDocumentProperties
9360	}
9361	return json.Marshal(objectMap)
9362}
9363
9364// UnmarshalJSON is the custom unmarshaler for SchemaCreateOrUpdateProperties struct.
9365func (scoup *SchemaCreateOrUpdateProperties) UnmarshalJSON(body []byte) error {
9366	var m map[string]*json.RawMessage
9367	err := json.Unmarshal(body, &m)
9368	if err != nil {
9369		return err
9370	}
9371	for k, v := range m {
9372		switch k {
9373		case "contentType":
9374			if v != nil {
9375				var contentType string
9376				err = json.Unmarshal(*v, &contentType)
9377				if err != nil {
9378					return err
9379				}
9380				scoup.ContentType = &contentType
9381			}
9382		case "document":
9383			if v != nil {
9384				var schemaDocumentProperties SchemaDocumentProperties
9385				err = json.Unmarshal(*v, &schemaDocumentProperties)
9386				if err != nil {
9387					return err
9388				}
9389				scoup.SchemaDocumentProperties = &schemaDocumentProperties
9390			}
9391		}
9392	}
9393
9394	return nil
9395}
9396
9397// SchemaDocumentProperties schema Document Properties.
9398type SchemaDocumentProperties struct {
9399	// Value - Json escaped string defining the document representing the Schema.
9400	Value *string `json:"value,omitempty"`
9401}
9402
9403// ServiceApplyNetworkConfigurationParameters parameter supplied to the Apply Network configuration
9404// operation.
9405type ServiceApplyNetworkConfigurationParameters struct {
9406	// 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.
9407	Location *string `json:"location,omitempty"`
9408}
9409
9410// ServiceApplyNetworkConfigurationUpdatesFuture an abstraction for monitoring and retrieving the results
9411// of a long-running operation.
9412type ServiceApplyNetworkConfigurationUpdatesFuture struct {
9413	azure.Future
9414}
9415
9416// Result returns the result of the asynchronous operation.
9417// If the operation has not completed it will return an error.
9418func (future *ServiceApplyNetworkConfigurationUpdatesFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
9419	var done bool
9420	done, err = future.DoneWithContext(context.Background(), client)
9421	if err != nil {
9422		err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", future.Response(), "Polling failure")
9423		return
9424	}
9425	if !done {
9426		err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture")
9427		return
9428	}
9429	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9430	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
9431		sr, err = client.ApplyNetworkConfigurationUpdatesResponder(sr.Response.Response)
9432		if err != nil {
9433			err = autorest.NewErrorWithError(err, "apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture", "Result", sr.Response.Response, "Failure responding to request")
9434		}
9435	}
9436	return
9437}
9438
9439// ServiceBackupFuture an abstraction for monitoring and retrieving the results of a long-running
9440// operation.
9441type ServiceBackupFuture struct {
9442	azure.Future
9443}
9444
9445// Result returns the result of the asynchronous operation.
9446// If the operation has not completed it will return an error.
9447func (future *ServiceBackupFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
9448	var done bool
9449	done, err = future.DoneWithContext(context.Background(), client)
9450	if err != nil {
9451		err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", future.Response(), "Polling failure")
9452		return
9453	}
9454	if !done {
9455		err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceBackupFuture")
9456		return
9457	}
9458	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9459	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
9460		sr, err = client.BackupResponder(sr.Response.Response)
9461		if err != nil {
9462			err = autorest.NewErrorWithError(err, "apimanagement.ServiceBackupFuture", "Result", sr.Response.Response, "Failure responding to request")
9463		}
9464	}
9465	return
9466}
9467
9468// ServiceBackupRestoreParameters parameters supplied to the Backup/Restore of an API Management service
9469// operation.
9470type ServiceBackupRestoreParameters struct {
9471	// StorageAccount - Azure Cloud Storage account (used to place/retrieve the backup) name.
9472	StorageAccount *string `json:"storageAccount,omitempty"`
9473	// AccessKey - Azure Cloud Storage account (used to place/retrieve the backup) access key.
9474	AccessKey *string `json:"accessKey,omitempty"`
9475	// ContainerName - Azure Cloud Storage blob container name used to place/retrieve the backup.
9476	ContainerName *string `json:"containerName,omitempty"`
9477	// BackupName - The name of the backup file to create.
9478	BackupName *string `json:"backupName,omitempty"`
9479}
9480
9481// ServiceBaseProperties base Properties of an API Management service resource description.
9482type ServiceBaseProperties struct {
9483	// NotificationSenderEmail - Email address from which the notification will be sent.
9484	NotificationSenderEmail *string `json:"notificationSenderEmail,omitempty"`
9485	// 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.
9486	ProvisioningState *string `json:"provisioningState,omitempty"`
9487	// TargetProvisioningState - READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started on the service.
9488	TargetProvisioningState *string `json:"targetProvisioningState,omitempty"`
9489	// 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.
9490	CreatedAtUtc *date.Time `json:"createdAtUtc,omitempty"`
9491	// GatewayURL - READ-ONLY; Gateway URL of the API Management service.
9492	GatewayURL *string `json:"gatewayUrl,omitempty"`
9493	// GatewayRegionalURL - READ-ONLY; Gateway URL of the API Management service in the Default Region.
9494	GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty"`
9495	// PortalURL - READ-ONLY; Publisher portal endpoint Url of the API Management service.
9496	PortalURL *string `json:"portalUrl,omitempty"`
9497	// ManagementAPIURL - READ-ONLY; Management API endpoint URL of the API Management service.
9498	ManagementAPIURL *string `json:"managementApiUrl,omitempty"`
9499	// ScmURL - READ-ONLY; SCM endpoint URL of the API Management service.
9500	ScmURL *string `json:"scmUrl,omitempty"`
9501	// HostnameConfigurations - Custom hostname configuration of the API Management service.
9502	HostnameConfigurations *[]HostnameConfiguration `json:"hostnameConfigurations,omitempty"`
9503	// 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.
9504	PublicIPAddresses *[]string `json:"publicIPAddresses,omitempty"`
9505	// 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.
9506	PrivateIPAddresses *[]string `json:"privateIPAddresses,omitempty"`
9507	// VirtualNetworkConfiguration - Virtual network configuration of the API Management service.
9508	VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"`
9509	// AdditionalLocations - Additional datacenter locations of the API Management service.
9510	AdditionalLocations *[]AdditionalLocation `json:"additionalLocations,omitempty"`
9511	// 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.
9512	CustomProperties map[string]*string `json:"customProperties"`
9513	// Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
9514	Certificates *[]CertificateConfiguration `json:"certificates,omitempty"`
9515	// 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.
9516	EnableClientCertificate *bool `json:"enableClientCertificate,omitempty"`
9517	// 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'
9518	VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"`
9519}
9520
9521// MarshalJSON is the custom marshaler for ServiceBaseProperties.
9522func (sbp ServiceBaseProperties) MarshalJSON() ([]byte, error) {
9523	objectMap := make(map[string]interface{})
9524	if sbp.NotificationSenderEmail != nil {
9525		objectMap["notificationSenderEmail"] = sbp.NotificationSenderEmail
9526	}
9527	if sbp.HostnameConfigurations != nil {
9528		objectMap["hostnameConfigurations"] = sbp.HostnameConfigurations
9529	}
9530	if sbp.VirtualNetworkConfiguration != nil {
9531		objectMap["virtualNetworkConfiguration"] = sbp.VirtualNetworkConfiguration
9532	}
9533	if sbp.AdditionalLocations != nil {
9534		objectMap["additionalLocations"] = sbp.AdditionalLocations
9535	}
9536	if sbp.CustomProperties != nil {
9537		objectMap["customProperties"] = sbp.CustomProperties
9538	}
9539	if sbp.Certificates != nil {
9540		objectMap["certificates"] = sbp.Certificates
9541	}
9542	if sbp.EnableClientCertificate != nil {
9543		objectMap["enableClientCertificate"] = sbp.EnableClientCertificate
9544	}
9545	if sbp.VirtualNetworkType != "" {
9546		objectMap["virtualNetworkType"] = sbp.VirtualNetworkType
9547	}
9548	return json.Marshal(objectMap)
9549}
9550
9551// ServiceCheckNameAvailabilityParameters parameters supplied to the CheckNameAvailability operation.
9552type ServiceCheckNameAvailabilityParameters struct {
9553	// Name - The name to check for availability.
9554	Name *string `json:"name,omitempty"`
9555}
9556
9557// ServiceCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
9558// operation.
9559type ServiceCreateOrUpdateFuture struct {
9560	azure.Future
9561}
9562
9563// Result returns the result of the asynchronous operation.
9564// If the operation has not completed it will return an error.
9565func (future *ServiceCreateOrUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
9566	var done bool
9567	done, err = future.DoneWithContext(context.Background(), client)
9568	if err != nil {
9569		err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9570		return
9571	}
9572	if !done {
9573		err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceCreateOrUpdateFuture")
9574		return
9575	}
9576	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9577	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
9578		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
9579		if err != nil {
9580			err = autorest.NewErrorWithError(err, "apimanagement.ServiceCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
9581		}
9582	}
9583	return
9584}
9585
9586// ServiceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9587// operation.
9588type ServiceDeleteFuture struct {
9589	azure.Future
9590}
9591
9592// Result returns the result of the asynchronous operation.
9593// If the operation has not completed it will return an error.
9594func (future *ServiceDeleteFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
9595	var done bool
9596	done, err = future.DoneWithContext(context.Background(), client)
9597	if err != nil {
9598		err = autorest.NewErrorWithError(err, "apimanagement.ServiceDeleteFuture", "Result", future.Response(), "Polling failure")
9599		return
9600	}
9601	if !done {
9602		err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceDeleteFuture")
9603		return
9604	}
9605	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9606	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
9607		sr, err = client.DeleteResponder(sr.Response.Response)
9608		if err != nil {
9609			err = autorest.NewErrorWithError(err, "apimanagement.ServiceDeleteFuture", "Result", sr.Response.Response, "Failure responding to request")
9610		}
9611	}
9612	return
9613}
9614
9615// ServiceGetSsoTokenResult the response of the GetSsoToken operation.
9616type ServiceGetSsoTokenResult struct {
9617	autorest.Response `json:"-"`
9618	// RedirectURI - Redirect URL to the Publisher Portal containing the SSO token.
9619	RedirectURI *string `json:"redirectUri,omitempty"`
9620}
9621
9622// ServiceIdentity identity properties of the Api Management service resource.
9623type ServiceIdentity struct {
9624	// Type - The identity type. Currently the only supported type is 'SystemAssigned'.
9625	Type *string `json:"type,omitempty"`
9626	// PrincipalID - READ-ONLY; The principal id of the identity.
9627	PrincipalID *uuid.UUID `json:"principalId,omitempty"`
9628	// TenantID - READ-ONLY; The client tenant id of the identity.
9629	TenantID *uuid.UUID `json:"tenantId,omitempty"`
9630}
9631
9632// ServiceListResult the response of the List API Management services operation.
9633type ServiceListResult struct {
9634	autorest.Response `json:"-"`
9635	// Value - Result of the List API Management services operation.
9636	Value *[]ServiceResource `json:"value,omitempty"`
9637	// NextLink - Link to the next set of results. Not empty if Value contains incomplete list of API Management services.
9638	NextLink *string `json:"nextLink,omitempty"`
9639}
9640
9641// ServiceListResultIterator provides access to a complete listing of ServiceResource values.
9642type ServiceListResultIterator struct {
9643	i    int
9644	page ServiceListResultPage
9645}
9646
9647// NextWithContext advances to the next value.  If there was an error making
9648// the request the iterator does not advance and the error is returned.
9649func (iter *ServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
9650	if tracing.IsEnabled() {
9651		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceListResultIterator.NextWithContext")
9652		defer func() {
9653			sc := -1
9654			if iter.Response().Response.Response != nil {
9655				sc = iter.Response().Response.Response.StatusCode
9656			}
9657			tracing.EndSpan(ctx, sc, err)
9658		}()
9659	}
9660	iter.i++
9661	if iter.i < len(iter.page.Values()) {
9662		return nil
9663	}
9664	err = iter.page.NextWithContext(ctx)
9665	if err != nil {
9666		iter.i--
9667		return err
9668	}
9669	iter.i = 0
9670	return nil
9671}
9672
9673// Next advances to the next value.  If there was an error making
9674// the request the iterator does not advance and the error is returned.
9675// Deprecated: Use NextWithContext() instead.
9676func (iter *ServiceListResultIterator) Next() error {
9677	return iter.NextWithContext(context.Background())
9678}
9679
9680// NotDone returns true if the enumeration should be started or is not yet complete.
9681func (iter ServiceListResultIterator) NotDone() bool {
9682	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9683}
9684
9685// Response returns the raw server response from the last page request.
9686func (iter ServiceListResultIterator) Response() ServiceListResult {
9687	return iter.page.Response()
9688}
9689
9690// Value returns the current value or a zero-initialized value if the
9691// iterator has advanced beyond the end of the collection.
9692func (iter ServiceListResultIterator) Value() ServiceResource {
9693	if !iter.page.NotDone() {
9694		return ServiceResource{}
9695	}
9696	return iter.page.Values()[iter.i]
9697}
9698
9699// Creates a new instance of the ServiceListResultIterator type.
9700func NewServiceListResultIterator(page ServiceListResultPage) ServiceListResultIterator {
9701	return ServiceListResultIterator{page: page}
9702}
9703
9704// IsEmpty returns true if the ListResult contains no values.
9705func (slr ServiceListResult) IsEmpty() bool {
9706	return slr.Value == nil || len(*slr.Value) == 0
9707}
9708
9709// serviceListResultPreparer prepares a request to retrieve the next set of results.
9710// It returns nil if no more results exist.
9711func (slr ServiceListResult) serviceListResultPreparer(ctx context.Context) (*http.Request, error) {
9712	if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
9713		return nil, nil
9714	}
9715	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9716		autorest.AsJSON(),
9717		autorest.AsGet(),
9718		autorest.WithBaseURL(to.String(slr.NextLink)))
9719}
9720
9721// ServiceListResultPage contains a page of ServiceResource values.
9722type ServiceListResultPage struct {
9723	fn  func(context.Context, ServiceListResult) (ServiceListResult, error)
9724	slr ServiceListResult
9725}
9726
9727// NextWithContext advances to the next page of values.  If there was an error making
9728// the request the page does not advance and the error is returned.
9729func (page *ServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
9730	if tracing.IsEnabled() {
9731		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceListResultPage.NextWithContext")
9732		defer func() {
9733			sc := -1
9734			if page.Response().Response.Response != nil {
9735				sc = page.Response().Response.Response.StatusCode
9736			}
9737			tracing.EndSpan(ctx, sc, err)
9738		}()
9739	}
9740	next, err := page.fn(ctx, page.slr)
9741	if err != nil {
9742		return err
9743	}
9744	page.slr = next
9745	return nil
9746}
9747
9748// Next advances to the next page of values.  If there was an error making
9749// the request the page does not advance and the error is returned.
9750// Deprecated: Use NextWithContext() instead.
9751func (page *ServiceListResultPage) Next() error {
9752	return page.NextWithContext(context.Background())
9753}
9754
9755// NotDone returns true if the page enumeration should be started or is not yet complete.
9756func (page ServiceListResultPage) NotDone() bool {
9757	return !page.slr.IsEmpty()
9758}
9759
9760// Response returns the raw server response from the last page request.
9761func (page ServiceListResultPage) Response() ServiceListResult {
9762	return page.slr
9763}
9764
9765// Values returns the slice of values for the current page or nil if there are no values.
9766func (page ServiceListResultPage) Values() []ServiceResource {
9767	if page.slr.IsEmpty() {
9768		return nil
9769	}
9770	return *page.slr.Value
9771}
9772
9773// Creates a new instance of the ServiceListResultPage type.
9774func NewServiceListResultPage(getNextPage func(context.Context, ServiceListResult) (ServiceListResult, error)) ServiceListResultPage {
9775	return ServiceListResultPage{fn: getNextPage}
9776}
9777
9778// ServiceNameAvailabilityResult response of the CheckNameAvailability operation.
9779type ServiceNameAvailabilityResult struct {
9780	autorest.Response `json:"-"`
9781	// NameAvailable - READ-ONLY; True if the name is available and can be used to create a new API Management service; otherwise false.
9782	NameAvailable *bool `json:"nameAvailable,omitempty"`
9783	// 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.
9784	Message *string `json:"message,omitempty"`
9785	// 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'
9786	Reason NameAvailabilityReason `json:"reason,omitempty"`
9787}
9788
9789// ServiceProperties properties of an API Management service resource description.
9790type ServiceProperties struct {
9791	// PublisherEmail - Publisher email.
9792	PublisherEmail *string `json:"publisherEmail,omitempty"`
9793	// PublisherName - Publisher name.
9794	PublisherName *string `json:"publisherName,omitempty"`
9795	// NotificationSenderEmail - Email address from which the notification will be sent.
9796	NotificationSenderEmail *string `json:"notificationSenderEmail,omitempty"`
9797	// 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.
9798	ProvisioningState *string `json:"provisioningState,omitempty"`
9799	// TargetProvisioningState - READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started on the service.
9800	TargetProvisioningState *string `json:"targetProvisioningState,omitempty"`
9801	// 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.
9802	CreatedAtUtc *date.Time `json:"createdAtUtc,omitempty"`
9803	// GatewayURL - READ-ONLY; Gateway URL of the API Management service.
9804	GatewayURL *string `json:"gatewayUrl,omitempty"`
9805	// GatewayRegionalURL - READ-ONLY; Gateway URL of the API Management service in the Default Region.
9806	GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty"`
9807	// PortalURL - READ-ONLY; Publisher portal endpoint Url of the API Management service.
9808	PortalURL *string `json:"portalUrl,omitempty"`
9809	// ManagementAPIURL - READ-ONLY; Management API endpoint URL of the API Management service.
9810	ManagementAPIURL *string `json:"managementApiUrl,omitempty"`
9811	// ScmURL - READ-ONLY; SCM endpoint URL of the API Management service.
9812	ScmURL *string `json:"scmUrl,omitempty"`
9813	// HostnameConfigurations - Custom hostname configuration of the API Management service.
9814	HostnameConfigurations *[]HostnameConfiguration `json:"hostnameConfigurations,omitempty"`
9815	// 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.
9816	PublicIPAddresses *[]string `json:"publicIPAddresses,omitempty"`
9817	// 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.
9818	PrivateIPAddresses *[]string `json:"privateIPAddresses,omitempty"`
9819	// VirtualNetworkConfiguration - Virtual network configuration of the API Management service.
9820	VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"`
9821	// AdditionalLocations - Additional datacenter locations of the API Management service.
9822	AdditionalLocations *[]AdditionalLocation `json:"additionalLocations,omitempty"`
9823	// 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.
9824	CustomProperties map[string]*string `json:"customProperties"`
9825	// Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
9826	Certificates *[]CertificateConfiguration `json:"certificates,omitempty"`
9827	// 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.
9828	EnableClientCertificate *bool `json:"enableClientCertificate,omitempty"`
9829	// 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'
9830	VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"`
9831}
9832
9833// MarshalJSON is the custom marshaler for ServiceProperties.
9834func (sp ServiceProperties) MarshalJSON() ([]byte, error) {
9835	objectMap := make(map[string]interface{})
9836	if sp.PublisherEmail != nil {
9837		objectMap["publisherEmail"] = sp.PublisherEmail
9838	}
9839	if sp.PublisherName != nil {
9840		objectMap["publisherName"] = sp.PublisherName
9841	}
9842	if sp.NotificationSenderEmail != nil {
9843		objectMap["notificationSenderEmail"] = sp.NotificationSenderEmail
9844	}
9845	if sp.HostnameConfigurations != nil {
9846		objectMap["hostnameConfigurations"] = sp.HostnameConfigurations
9847	}
9848	if sp.VirtualNetworkConfiguration != nil {
9849		objectMap["virtualNetworkConfiguration"] = sp.VirtualNetworkConfiguration
9850	}
9851	if sp.AdditionalLocations != nil {
9852		objectMap["additionalLocations"] = sp.AdditionalLocations
9853	}
9854	if sp.CustomProperties != nil {
9855		objectMap["customProperties"] = sp.CustomProperties
9856	}
9857	if sp.Certificates != nil {
9858		objectMap["certificates"] = sp.Certificates
9859	}
9860	if sp.EnableClientCertificate != nil {
9861		objectMap["enableClientCertificate"] = sp.EnableClientCertificate
9862	}
9863	if sp.VirtualNetworkType != "" {
9864		objectMap["virtualNetworkType"] = sp.VirtualNetworkType
9865	}
9866	return json.Marshal(objectMap)
9867}
9868
9869// ServiceResource a single API Management service resource in List or Get response.
9870type ServiceResource struct {
9871	autorest.Response `json:"-"`
9872	// ServiceProperties - Properties of the API Management service.
9873	*ServiceProperties `json:"properties,omitempty"`
9874	// Sku - SKU properties of the API Management service.
9875	Sku *ServiceSkuProperties `json:"sku,omitempty"`
9876	// Identity - Managed service identity of the Api Management service.
9877	Identity *ServiceIdentity `json:"identity,omitempty"`
9878	// Location - Resource location.
9879	Location *string `json:"location,omitempty"`
9880	// Etag - READ-ONLY; ETag of the resource.
9881	Etag *string `json:"etag,omitempty"`
9882	// ID - READ-ONLY; Resource ID.
9883	ID *string `json:"id,omitempty"`
9884	// Name - READ-ONLY; Resource name.
9885	Name *string `json:"name,omitempty"`
9886	// Type - READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement.
9887	Type *string `json:"type,omitempty"`
9888	// Tags - Resource tags.
9889	Tags map[string]*string `json:"tags"`
9890}
9891
9892// MarshalJSON is the custom marshaler for ServiceResource.
9893func (sr ServiceResource) MarshalJSON() ([]byte, error) {
9894	objectMap := make(map[string]interface{})
9895	if sr.ServiceProperties != nil {
9896		objectMap["properties"] = sr.ServiceProperties
9897	}
9898	if sr.Sku != nil {
9899		objectMap["sku"] = sr.Sku
9900	}
9901	if sr.Identity != nil {
9902		objectMap["identity"] = sr.Identity
9903	}
9904	if sr.Location != nil {
9905		objectMap["location"] = sr.Location
9906	}
9907	if sr.Tags != nil {
9908		objectMap["tags"] = sr.Tags
9909	}
9910	return json.Marshal(objectMap)
9911}
9912
9913// UnmarshalJSON is the custom unmarshaler for ServiceResource struct.
9914func (sr *ServiceResource) UnmarshalJSON(body []byte) error {
9915	var m map[string]*json.RawMessage
9916	err := json.Unmarshal(body, &m)
9917	if err != nil {
9918		return err
9919	}
9920	for k, v := range m {
9921		switch k {
9922		case "properties":
9923			if v != nil {
9924				var serviceProperties ServiceProperties
9925				err = json.Unmarshal(*v, &serviceProperties)
9926				if err != nil {
9927					return err
9928				}
9929				sr.ServiceProperties = &serviceProperties
9930			}
9931		case "sku":
9932			if v != nil {
9933				var sku ServiceSkuProperties
9934				err = json.Unmarshal(*v, &sku)
9935				if err != nil {
9936					return err
9937				}
9938				sr.Sku = &sku
9939			}
9940		case "identity":
9941			if v != nil {
9942				var identity ServiceIdentity
9943				err = json.Unmarshal(*v, &identity)
9944				if err != nil {
9945					return err
9946				}
9947				sr.Identity = &identity
9948			}
9949		case "location":
9950			if v != nil {
9951				var location string
9952				err = json.Unmarshal(*v, &location)
9953				if err != nil {
9954					return err
9955				}
9956				sr.Location = &location
9957			}
9958		case "etag":
9959			if v != nil {
9960				var etag string
9961				err = json.Unmarshal(*v, &etag)
9962				if err != nil {
9963					return err
9964				}
9965				sr.Etag = &etag
9966			}
9967		case "id":
9968			if v != nil {
9969				var ID string
9970				err = json.Unmarshal(*v, &ID)
9971				if err != nil {
9972					return err
9973				}
9974				sr.ID = &ID
9975			}
9976		case "name":
9977			if v != nil {
9978				var name string
9979				err = json.Unmarshal(*v, &name)
9980				if err != nil {
9981					return err
9982				}
9983				sr.Name = &name
9984			}
9985		case "type":
9986			if v != nil {
9987				var typeVar string
9988				err = json.Unmarshal(*v, &typeVar)
9989				if err != nil {
9990					return err
9991				}
9992				sr.Type = &typeVar
9993			}
9994		case "tags":
9995			if v != nil {
9996				var tags map[string]*string
9997				err = json.Unmarshal(*v, &tags)
9998				if err != nil {
9999					return err
10000				}
10001				sr.Tags = tags
10002			}
10003		}
10004	}
10005
10006	return nil
10007}
10008
10009// ServiceRestoreFuture an abstraction for monitoring and retrieving the results of a long-running
10010// operation.
10011type ServiceRestoreFuture struct {
10012	azure.Future
10013}
10014
10015// Result returns the result of the asynchronous operation.
10016// If the operation has not completed it will return an error.
10017func (future *ServiceRestoreFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
10018	var done bool
10019	done, err = future.DoneWithContext(context.Background(), client)
10020	if err != nil {
10021		err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", future.Response(), "Polling failure")
10022		return
10023	}
10024	if !done {
10025		err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceRestoreFuture")
10026		return
10027	}
10028	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10029	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
10030		sr, err = client.RestoreResponder(sr.Response.Response)
10031		if err != nil {
10032			err = autorest.NewErrorWithError(err, "apimanagement.ServiceRestoreFuture", "Result", sr.Response.Response, "Failure responding to request")
10033		}
10034	}
10035	return
10036}
10037
10038// ServiceSkuProperties API Management service resource SKU properties.
10039type ServiceSkuProperties struct {
10040	// Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic', 'SkuTypeConsumption'
10041	Name SkuType `json:"name,omitempty"`
10042	// Capacity - Capacity of the SKU (number of deployed units of the SKU).
10043	Capacity *int32 `json:"capacity,omitempty"`
10044}
10045
10046// ServiceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
10047// operation.
10048type ServiceUpdateFuture struct {
10049	azure.Future
10050}
10051
10052// Result returns the result of the asynchronous operation.
10053// If the operation has not completed it will return an error.
10054func (future *ServiceUpdateFuture) Result(client ServiceClient) (sr ServiceResource, err error) {
10055	var done bool
10056	done, err = future.DoneWithContext(context.Background(), client)
10057	if err != nil {
10058		err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", future.Response(), "Polling failure")
10059		return
10060	}
10061	if !done {
10062		err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceUpdateFuture")
10063		return
10064	}
10065	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10066	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
10067		sr, err = client.UpdateResponder(sr.Response.Response)
10068		if err != nil {
10069			err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
10070		}
10071	}
10072	return
10073}
10074
10075// ServiceUpdateParameters parameter supplied to Update Api Management Service.
10076type ServiceUpdateParameters struct {
10077	// ServiceUpdateProperties - Properties of the API Management service.
10078	*ServiceUpdateProperties `json:"properties,omitempty"`
10079	// Sku - SKU properties of the API Management service.
10080	Sku *ServiceSkuProperties `json:"sku,omitempty"`
10081	// Identity - Managed service identity of the Api Management service.
10082	Identity *ServiceIdentity `json:"identity,omitempty"`
10083	// Etag - READ-ONLY; ETag of the resource.
10084	Etag *string `json:"etag,omitempty"`
10085	// ID - READ-ONLY; Resource ID.
10086	ID *string `json:"id,omitempty"`
10087	// Name - READ-ONLY; Resource name.
10088	Name *string `json:"name,omitempty"`
10089	// Type - READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement.
10090	Type *string `json:"type,omitempty"`
10091	// Tags - Resource tags.
10092	Tags map[string]*string `json:"tags"`
10093}
10094
10095// MarshalJSON is the custom marshaler for ServiceUpdateParameters.
10096func (sup ServiceUpdateParameters) MarshalJSON() ([]byte, error) {
10097	objectMap := make(map[string]interface{})
10098	if sup.ServiceUpdateProperties != nil {
10099		objectMap["properties"] = sup.ServiceUpdateProperties
10100	}
10101	if sup.Sku != nil {
10102		objectMap["sku"] = sup.Sku
10103	}
10104	if sup.Identity != nil {
10105		objectMap["identity"] = sup.Identity
10106	}
10107	if sup.Tags != nil {
10108		objectMap["tags"] = sup.Tags
10109	}
10110	return json.Marshal(objectMap)
10111}
10112
10113// UnmarshalJSON is the custom unmarshaler for ServiceUpdateParameters struct.
10114func (sup *ServiceUpdateParameters) UnmarshalJSON(body []byte) error {
10115	var m map[string]*json.RawMessage
10116	err := json.Unmarshal(body, &m)
10117	if err != nil {
10118		return err
10119	}
10120	for k, v := range m {
10121		switch k {
10122		case "properties":
10123			if v != nil {
10124				var serviceUpdateProperties ServiceUpdateProperties
10125				err = json.Unmarshal(*v, &serviceUpdateProperties)
10126				if err != nil {
10127					return err
10128				}
10129				sup.ServiceUpdateProperties = &serviceUpdateProperties
10130			}
10131		case "sku":
10132			if v != nil {
10133				var sku ServiceSkuProperties
10134				err = json.Unmarshal(*v, &sku)
10135				if err != nil {
10136					return err
10137				}
10138				sup.Sku = &sku
10139			}
10140		case "identity":
10141			if v != nil {
10142				var identity ServiceIdentity
10143				err = json.Unmarshal(*v, &identity)
10144				if err != nil {
10145					return err
10146				}
10147				sup.Identity = &identity
10148			}
10149		case "etag":
10150			if v != nil {
10151				var etag string
10152				err = json.Unmarshal(*v, &etag)
10153				if err != nil {
10154					return err
10155				}
10156				sup.Etag = &etag
10157			}
10158		case "id":
10159			if v != nil {
10160				var ID string
10161				err = json.Unmarshal(*v, &ID)
10162				if err != nil {
10163					return err
10164				}
10165				sup.ID = &ID
10166			}
10167		case "name":
10168			if v != nil {
10169				var name string
10170				err = json.Unmarshal(*v, &name)
10171				if err != nil {
10172					return err
10173				}
10174				sup.Name = &name
10175			}
10176		case "type":
10177			if v != nil {
10178				var typeVar string
10179				err = json.Unmarshal(*v, &typeVar)
10180				if err != nil {
10181					return err
10182				}
10183				sup.Type = &typeVar
10184			}
10185		case "tags":
10186			if v != nil {
10187				var tags map[string]*string
10188				err = json.Unmarshal(*v, &tags)
10189				if err != nil {
10190					return err
10191				}
10192				sup.Tags = tags
10193			}
10194		}
10195	}
10196
10197	return nil
10198}
10199
10200// ServiceUpdateProperties properties of an API Management service resource description.
10201type ServiceUpdateProperties struct {
10202	// PublisherEmail - Publisher email.
10203	PublisherEmail *string `json:"publisherEmail,omitempty"`
10204	// PublisherName - Publisher name.
10205	PublisherName *string `json:"publisherName,omitempty"`
10206	// NotificationSenderEmail - Email address from which the notification will be sent.
10207	NotificationSenderEmail *string `json:"notificationSenderEmail,omitempty"`
10208	// 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.
10209	ProvisioningState *string `json:"provisioningState,omitempty"`
10210	// TargetProvisioningState - READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started on the service.
10211	TargetProvisioningState *string `json:"targetProvisioningState,omitempty"`
10212	// 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.
10213	CreatedAtUtc *date.Time `json:"createdAtUtc,omitempty"`
10214	// GatewayURL - READ-ONLY; Gateway URL of the API Management service.
10215	GatewayURL *string `json:"gatewayUrl,omitempty"`
10216	// GatewayRegionalURL - READ-ONLY; Gateway URL of the API Management service in the Default Region.
10217	GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty"`
10218	// PortalURL - READ-ONLY; Publisher portal endpoint Url of the API Management service.
10219	PortalURL *string `json:"portalUrl,omitempty"`
10220	// ManagementAPIURL - READ-ONLY; Management API endpoint URL of the API Management service.
10221	ManagementAPIURL *string `json:"managementApiUrl,omitempty"`
10222	// ScmURL - READ-ONLY; SCM endpoint URL of the API Management service.
10223	ScmURL *string `json:"scmUrl,omitempty"`
10224	// HostnameConfigurations - Custom hostname configuration of the API Management service.
10225	HostnameConfigurations *[]HostnameConfiguration `json:"hostnameConfigurations,omitempty"`
10226	// 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.
10227	PublicIPAddresses *[]string `json:"publicIPAddresses,omitempty"`
10228	// 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.
10229	PrivateIPAddresses *[]string `json:"privateIPAddresses,omitempty"`
10230	// VirtualNetworkConfiguration - Virtual network configuration of the API Management service.
10231	VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"`
10232	// AdditionalLocations - Additional datacenter locations of the API Management service.
10233	AdditionalLocations *[]AdditionalLocation `json:"additionalLocations,omitempty"`
10234	// 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.
10235	CustomProperties map[string]*string `json:"customProperties"`
10236	// Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
10237	Certificates *[]CertificateConfiguration `json:"certificates,omitempty"`
10238	// 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.
10239	EnableClientCertificate *bool `json:"enableClientCertificate,omitempty"`
10240	// 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'
10241	VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"`
10242}
10243
10244// MarshalJSON is the custom marshaler for ServiceUpdateProperties.
10245func (sup ServiceUpdateProperties) MarshalJSON() ([]byte, error) {
10246	objectMap := make(map[string]interface{})
10247	if sup.PublisherEmail != nil {
10248		objectMap["publisherEmail"] = sup.PublisherEmail
10249	}
10250	if sup.PublisherName != nil {
10251		objectMap["publisherName"] = sup.PublisherName
10252	}
10253	if sup.NotificationSenderEmail != nil {
10254		objectMap["notificationSenderEmail"] = sup.NotificationSenderEmail
10255	}
10256	if sup.HostnameConfigurations != nil {
10257		objectMap["hostnameConfigurations"] = sup.HostnameConfigurations
10258	}
10259	if sup.VirtualNetworkConfiguration != nil {
10260		objectMap["virtualNetworkConfiguration"] = sup.VirtualNetworkConfiguration
10261	}
10262	if sup.AdditionalLocations != nil {
10263		objectMap["additionalLocations"] = sup.AdditionalLocations
10264	}
10265	if sup.CustomProperties != nil {
10266		objectMap["customProperties"] = sup.CustomProperties
10267	}
10268	if sup.Certificates != nil {
10269		objectMap["certificates"] = sup.Certificates
10270	}
10271	if sup.EnableClientCertificate != nil {
10272		objectMap["enableClientCertificate"] = sup.EnableClientCertificate
10273	}
10274	if sup.VirtualNetworkType != "" {
10275		objectMap["virtualNetworkType"] = sup.VirtualNetworkType
10276	}
10277	return json.Marshal(objectMap)
10278}
10279
10280// SubscriptionCollection paged Subscriptions list representation.
10281type SubscriptionCollection struct {
10282	autorest.Response `json:"-"`
10283	// Value - Page values.
10284	Value *[]SubscriptionContract `json:"value,omitempty"`
10285	// NextLink - Next page link if any.
10286	NextLink *string `json:"nextLink,omitempty"`
10287}
10288
10289// SubscriptionCollectionIterator provides access to a complete listing of SubscriptionContract values.
10290type SubscriptionCollectionIterator struct {
10291	i    int
10292	page SubscriptionCollectionPage
10293}
10294
10295// NextWithContext advances to the next value.  If there was an error making
10296// the request the iterator does not advance and the error is returned.
10297func (iter *SubscriptionCollectionIterator) NextWithContext(ctx context.Context) (err error) {
10298	if tracing.IsEnabled() {
10299		ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionCollectionIterator.NextWithContext")
10300		defer func() {
10301			sc := -1
10302			if iter.Response().Response.Response != nil {
10303				sc = iter.Response().Response.Response.StatusCode
10304			}
10305			tracing.EndSpan(ctx, sc, err)
10306		}()
10307	}
10308	iter.i++
10309	if iter.i < len(iter.page.Values()) {
10310		return nil
10311	}
10312	err = iter.page.NextWithContext(ctx)
10313	if err != nil {
10314		iter.i--
10315		return err
10316	}
10317	iter.i = 0
10318	return nil
10319}
10320
10321// Next advances to the next value.  If there was an error making
10322// the request the iterator does not advance and the error is returned.
10323// Deprecated: Use NextWithContext() instead.
10324func (iter *SubscriptionCollectionIterator) Next() error {
10325	return iter.NextWithContext(context.Background())
10326}
10327
10328// NotDone returns true if the enumeration should be started or is not yet complete.
10329func (iter SubscriptionCollectionIterator) NotDone() bool {
10330	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10331}
10332
10333// Response returns the raw server response from the last page request.
10334func (iter SubscriptionCollectionIterator) Response() SubscriptionCollection {
10335	return iter.page.Response()
10336}
10337
10338// Value returns the current value or a zero-initialized value if the
10339// iterator has advanced beyond the end of the collection.
10340func (iter SubscriptionCollectionIterator) Value() SubscriptionContract {
10341	if !iter.page.NotDone() {
10342		return SubscriptionContract{}
10343	}
10344	return iter.page.Values()[iter.i]
10345}
10346
10347// Creates a new instance of the SubscriptionCollectionIterator type.
10348func NewSubscriptionCollectionIterator(page SubscriptionCollectionPage) SubscriptionCollectionIterator {
10349	return SubscriptionCollectionIterator{page: page}
10350}
10351
10352// IsEmpty returns true if the ListResult contains no values.
10353func (sc SubscriptionCollection) IsEmpty() bool {
10354	return sc.Value == nil || len(*sc.Value) == 0
10355}
10356
10357// subscriptionCollectionPreparer prepares a request to retrieve the next set of results.
10358// It returns nil if no more results exist.
10359func (sc SubscriptionCollection) subscriptionCollectionPreparer(ctx context.Context) (*http.Request, error) {
10360	if sc.NextLink == nil || len(to.String(sc.NextLink)) < 1 {
10361		return nil, nil
10362	}
10363	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10364		autorest.AsJSON(),
10365		autorest.AsGet(),
10366		autorest.WithBaseURL(to.String(sc.NextLink)))
10367}
10368
10369// SubscriptionCollectionPage contains a page of SubscriptionContract values.
10370type SubscriptionCollectionPage struct {
10371	fn func(context.Context, SubscriptionCollection) (SubscriptionCollection, error)
10372	sc SubscriptionCollection
10373}
10374
10375// NextWithContext advances to the next page of values.  If there was an error making
10376// the request the page does not advance and the error is returned.
10377func (page *SubscriptionCollectionPage) NextWithContext(ctx context.Context) (err error) {
10378	if tracing.IsEnabled() {
10379		ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionCollectionPage.NextWithContext")
10380		defer func() {
10381			sc := -1
10382			if page.Response().Response.Response != nil {
10383				sc = page.Response().Response.Response.StatusCode
10384			}
10385			tracing.EndSpan(ctx, sc, err)
10386		}()
10387	}
10388	next, err := page.fn(ctx, page.sc)
10389	if err != nil {
10390		return err
10391	}
10392	page.sc = next
10393	return nil
10394}
10395
10396// Next advances to the next page of values.  If there was an error making
10397// the request the page does not advance and the error is returned.
10398// Deprecated: Use NextWithContext() instead.
10399func (page *SubscriptionCollectionPage) Next() error {
10400	return page.NextWithContext(context.Background())
10401}
10402
10403// NotDone returns true if the page enumeration should be started or is not yet complete.
10404func (page SubscriptionCollectionPage) NotDone() bool {
10405	return !page.sc.IsEmpty()
10406}
10407
10408// Response returns the raw server response from the last page request.
10409func (page SubscriptionCollectionPage) Response() SubscriptionCollection {
10410	return page.sc
10411}
10412
10413// Values returns the slice of values for the current page or nil if there are no values.
10414func (page SubscriptionCollectionPage) Values() []SubscriptionContract {
10415	if page.sc.IsEmpty() {
10416		return nil
10417	}
10418	return *page.sc.Value
10419}
10420
10421// Creates a new instance of the SubscriptionCollectionPage type.
10422func NewSubscriptionCollectionPage(getNextPage func(context.Context, SubscriptionCollection) (SubscriptionCollection, error)) SubscriptionCollectionPage {
10423	return SubscriptionCollectionPage{fn: getNextPage}
10424}
10425
10426// SubscriptionContract subscription details.
10427type SubscriptionContract struct {
10428	autorest.Response `json:"-"`
10429	// SubscriptionContractProperties - Subscription contract properties.
10430	*SubscriptionContractProperties `json:"properties,omitempty"`
10431	// ID - READ-ONLY; Resource ID.
10432	ID *string `json:"id,omitempty"`
10433	// Name - READ-ONLY; Resource name.
10434	Name *string `json:"name,omitempty"`
10435	// Type - READ-ONLY; Resource type for API Management resource.
10436	Type *string `json:"type,omitempty"`
10437}
10438
10439// MarshalJSON is the custom marshaler for SubscriptionContract.
10440func (sc SubscriptionContract) MarshalJSON() ([]byte, error) {
10441	objectMap := make(map[string]interface{})
10442	if sc.SubscriptionContractProperties != nil {
10443		objectMap["properties"] = sc.SubscriptionContractProperties
10444	}
10445	return json.Marshal(objectMap)
10446}
10447
10448// UnmarshalJSON is the custom unmarshaler for SubscriptionContract struct.
10449func (sc *SubscriptionContract) UnmarshalJSON(body []byte) error {
10450	var m map[string]*json.RawMessage
10451	err := json.Unmarshal(body, &m)
10452	if err != nil {
10453		return err
10454	}
10455	for k, v := range m {
10456		switch k {
10457		case "properties":
10458			if v != nil {
10459				var subscriptionContractProperties SubscriptionContractProperties
10460				err = json.Unmarshal(*v, &subscriptionContractProperties)
10461				if err != nil {
10462					return err
10463				}
10464				sc.SubscriptionContractProperties = &subscriptionContractProperties
10465			}
10466		case "id":
10467			if v != nil {
10468				var ID string
10469				err = json.Unmarshal(*v, &ID)
10470				if err != nil {
10471					return err
10472				}
10473				sc.ID = &ID
10474			}
10475		case "name":
10476			if v != nil {
10477				var name string
10478				err = json.Unmarshal(*v, &name)
10479				if err != nil {
10480					return err
10481				}
10482				sc.Name = &name
10483			}
10484		case "type":
10485			if v != nil {
10486				var typeVar string
10487				err = json.Unmarshal(*v, &typeVar)
10488				if err != nil {
10489					return err
10490				}
10491				sc.Type = &typeVar
10492			}
10493		}
10494	}
10495
10496	return nil
10497}
10498
10499// SubscriptionContractProperties subscription details.
10500type SubscriptionContractProperties struct {
10501	// 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.
10502	OwnerID *string `json:"ownerId,omitempty"`
10503	// Scope - Scope like /products/{productId} or /apis or /apis/{apiId}.
10504	Scope *string `json:"scope,omitempty"`
10505	// DisplayName - The name of the subscription, or null if the subscription has no name.
10506	DisplayName *string `json:"displayName,omitempty"`
10507	// 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'
10508	State SubscriptionState `json:"state,omitempty"`
10509	// 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.
10510	CreatedDate *date.Time `json:"createdDate,omitempty"`
10511	// 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.
10512	StartDate *date.Time `json:"startDate,omitempty"`
10513	// 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.
10514	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
10515	// 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.
10516	EndDate *date.Time `json:"endDate,omitempty"`
10517	// 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.
10518	NotificationDate *date.Time `json:"notificationDate,omitempty"`
10519	// PrimaryKey - Subscription primary key.
10520	PrimaryKey *string `json:"primaryKey,omitempty"`
10521	// SecondaryKey - Subscription secondary key.
10522	SecondaryKey *string `json:"secondaryKey,omitempty"`
10523	// StateComment - Optional subscription comment added by an administrator.
10524	StateComment *string `json:"stateComment,omitempty"`
10525	// AllowTracing - Determines whether tracing is enabled
10526	AllowTracing *bool `json:"allowTracing,omitempty"`
10527}
10528
10529// SubscriptionCreateParameterProperties parameters supplied to the Create subscription operation.
10530type SubscriptionCreateParameterProperties struct {
10531	// OwnerID - User (user id path) for whom subscription is being created in form /users/{userId}
10532	OwnerID *string `json:"ownerId,omitempty"`
10533	// Scope - Scope like /products/{productId} or /apis or /apis/{apiId}.
10534	Scope *string `json:"scope,omitempty"`
10535	// DisplayName - Subscription name.
10536	DisplayName *string `json:"displayName,omitempty"`
10537	// PrimaryKey - Primary subscription key. If not specified during request key will be generated automatically.
10538	PrimaryKey *string `json:"primaryKey,omitempty"`
10539	// SecondaryKey - Secondary subscription key. If not specified during request key will be generated automatically.
10540	SecondaryKey *string `json:"secondaryKey,omitempty"`
10541	// 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'
10542	State SubscriptionState `json:"state,omitempty"`
10543	// AllowTracing - Determines whether tracing can be enabled
10544	AllowTracing *bool `json:"allowTracing,omitempty"`
10545}
10546
10547// SubscriptionCreateParameters subscription create details.
10548type SubscriptionCreateParameters struct {
10549	// SubscriptionCreateParameterProperties - Subscription contract properties.
10550	*SubscriptionCreateParameterProperties `json:"properties,omitempty"`
10551}
10552
10553// MarshalJSON is the custom marshaler for SubscriptionCreateParameters.
10554func (scp SubscriptionCreateParameters) MarshalJSON() ([]byte, error) {
10555	objectMap := make(map[string]interface{})
10556	if scp.SubscriptionCreateParameterProperties != nil {
10557		objectMap["properties"] = scp.SubscriptionCreateParameterProperties
10558	}
10559	return json.Marshal(objectMap)
10560}
10561
10562// UnmarshalJSON is the custom unmarshaler for SubscriptionCreateParameters struct.
10563func (scp *SubscriptionCreateParameters) UnmarshalJSON(body []byte) error {
10564	var m map[string]*json.RawMessage
10565	err := json.Unmarshal(body, &m)
10566	if err != nil {
10567		return err
10568	}
10569	for k, v := range m {
10570		switch k {
10571		case "properties":
10572			if v != nil {
10573				var subscriptionCreateParameterProperties SubscriptionCreateParameterProperties
10574				err = json.Unmarshal(*v, &subscriptionCreateParameterProperties)
10575				if err != nil {
10576					return err
10577				}
10578				scp.SubscriptionCreateParameterProperties = &subscriptionCreateParameterProperties
10579			}
10580		}
10581	}
10582
10583	return nil
10584}
10585
10586// SubscriptionKeyParameterNamesContract subscription key parameter names details.
10587type SubscriptionKeyParameterNamesContract struct {
10588	// Header - Subscription key header name.
10589	Header *string `json:"header,omitempty"`
10590	// Query - Subscription key query string parameter name.
10591	Query *string `json:"query,omitempty"`
10592}
10593
10594// SubscriptionsDelegationSettingsProperties subscriptions delegation settings properties.
10595type SubscriptionsDelegationSettingsProperties struct {
10596	// Enabled - Enable or disable delegation for subscriptions.
10597	Enabled *bool `json:"enabled,omitempty"`
10598}
10599
10600// SubscriptionUpdateParameterProperties parameters supplied to the Update subscription operation.
10601type SubscriptionUpdateParameterProperties struct {
10602	// OwnerID - User identifier path: /users/{userId}
10603	OwnerID *string `json:"ownerId,omitempty"`
10604	// Scope - Scope like /products/{productId} or /apis or /apis/{apiId}
10605	Scope *string `json:"scope,omitempty"`
10606	// 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.
10607	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
10608	// DisplayName - Subscription name.
10609	DisplayName *string `json:"displayName,omitempty"`
10610	// PrimaryKey - Primary subscription key.
10611	PrimaryKey *string `json:"primaryKey,omitempty"`
10612	// SecondaryKey - Secondary subscription key.
10613	SecondaryKey *string `json:"secondaryKey,omitempty"`
10614	// 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'
10615	State SubscriptionState `json:"state,omitempty"`
10616	// StateComment - Comments describing subscription state change by the administrator.
10617	StateComment *string `json:"stateComment,omitempty"`
10618	// AllowTracing - Determines whether tracing can be enabled
10619	AllowTracing *bool `json:"allowTracing,omitempty"`
10620}
10621
10622// SubscriptionUpdateParameters subscription update details.
10623type SubscriptionUpdateParameters struct {
10624	// SubscriptionUpdateParameterProperties - Subscription Update contract properties.
10625	*SubscriptionUpdateParameterProperties `json:"properties,omitempty"`
10626}
10627
10628// MarshalJSON is the custom marshaler for SubscriptionUpdateParameters.
10629func (sup SubscriptionUpdateParameters) MarshalJSON() ([]byte, error) {
10630	objectMap := make(map[string]interface{})
10631	if sup.SubscriptionUpdateParameterProperties != nil {
10632		objectMap["properties"] = sup.SubscriptionUpdateParameterProperties
10633	}
10634	return json.Marshal(objectMap)
10635}
10636
10637// UnmarshalJSON is the custom unmarshaler for SubscriptionUpdateParameters struct.
10638func (sup *SubscriptionUpdateParameters) UnmarshalJSON(body []byte) error {
10639	var m map[string]*json.RawMessage
10640	err := json.Unmarshal(body, &m)
10641	if err != nil {
10642		return err
10643	}
10644	for k, v := range m {
10645		switch k {
10646		case "properties":
10647			if v != nil {
10648				var subscriptionUpdateParameterProperties SubscriptionUpdateParameterProperties
10649				err = json.Unmarshal(*v, &subscriptionUpdateParameterProperties)
10650				if err != nil {
10651					return err
10652				}
10653				sup.SubscriptionUpdateParameterProperties = &subscriptionUpdateParameterProperties
10654			}
10655		}
10656	}
10657
10658	return nil
10659}
10660
10661// TagCollection paged Tag list representation.
10662type TagCollection struct {
10663	autorest.Response `json:"-"`
10664	// Value - Page values.
10665	Value *[]TagContract `json:"value,omitempty"`
10666	// NextLink - Next page link if any.
10667	NextLink *string `json:"nextLink,omitempty"`
10668}
10669
10670// TagCollectionIterator provides access to a complete listing of TagContract values.
10671type TagCollectionIterator struct {
10672	i    int
10673	page TagCollectionPage
10674}
10675
10676// NextWithContext advances to the next value.  If there was an error making
10677// the request the iterator does not advance and the error is returned.
10678func (iter *TagCollectionIterator) NextWithContext(ctx context.Context) (err error) {
10679	if tracing.IsEnabled() {
10680		ctx = tracing.StartSpan(ctx, fqdn+"/TagCollectionIterator.NextWithContext")
10681		defer func() {
10682			sc := -1
10683			if iter.Response().Response.Response != nil {
10684				sc = iter.Response().Response.Response.StatusCode
10685			}
10686			tracing.EndSpan(ctx, sc, err)
10687		}()
10688	}
10689	iter.i++
10690	if iter.i < len(iter.page.Values()) {
10691		return nil
10692	}
10693	err = iter.page.NextWithContext(ctx)
10694	if err != nil {
10695		iter.i--
10696		return err
10697	}
10698	iter.i = 0
10699	return nil
10700}
10701
10702// Next advances to the next value.  If there was an error making
10703// the request the iterator does not advance and the error is returned.
10704// Deprecated: Use NextWithContext() instead.
10705func (iter *TagCollectionIterator) Next() error {
10706	return iter.NextWithContext(context.Background())
10707}
10708
10709// NotDone returns true if the enumeration should be started or is not yet complete.
10710func (iter TagCollectionIterator) NotDone() bool {
10711	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10712}
10713
10714// Response returns the raw server response from the last page request.
10715func (iter TagCollectionIterator) Response() TagCollection {
10716	return iter.page.Response()
10717}
10718
10719// Value returns the current value or a zero-initialized value if the
10720// iterator has advanced beyond the end of the collection.
10721func (iter TagCollectionIterator) Value() TagContract {
10722	if !iter.page.NotDone() {
10723		return TagContract{}
10724	}
10725	return iter.page.Values()[iter.i]
10726}
10727
10728// Creates a new instance of the TagCollectionIterator type.
10729func NewTagCollectionIterator(page TagCollectionPage) TagCollectionIterator {
10730	return TagCollectionIterator{page: page}
10731}
10732
10733// IsEmpty returns true if the ListResult contains no values.
10734func (tc TagCollection) IsEmpty() bool {
10735	return tc.Value == nil || len(*tc.Value) == 0
10736}
10737
10738// tagCollectionPreparer prepares a request to retrieve the next set of results.
10739// It returns nil if no more results exist.
10740func (tc TagCollection) tagCollectionPreparer(ctx context.Context) (*http.Request, error) {
10741	if tc.NextLink == nil || len(to.String(tc.NextLink)) < 1 {
10742		return nil, nil
10743	}
10744	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10745		autorest.AsJSON(),
10746		autorest.AsGet(),
10747		autorest.WithBaseURL(to.String(tc.NextLink)))
10748}
10749
10750// TagCollectionPage contains a page of TagContract values.
10751type TagCollectionPage struct {
10752	fn func(context.Context, TagCollection) (TagCollection, error)
10753	tc TagCollection
10754}
10755
10756// NextWithContext advances to the next page of values.  If there was an error making
10757// the request the page does not advance and the error is returned.
10758func (page *TagCollectionPage) NextWithContext(ctx context.Context) (err error) {
10759	if tracing.IsEnabled() {
10760		ctx = tracing.StartSpan(ctx, fqdn+"/TagCollectionPage.NextWithContext")
10761		defer func() {
10762			sc := -1
10763			if page.Response().Response.Response != nil {
10764				sc = page.Response().Response.Response.StatusCode
10765			}
10766			tracing.EndSpan(ctx, sc, err)
10767		}()
10768	}
10769	next, err := page.fn(ctx, page.tc)
10770	if err != nil {
10771		return err
10772	}
10773	page.tc = next
10774	return nil
10775}
10776
10777// Next advances to the next page of values.  If there was an error making
10778// the request the page does not advance and the error is returned.
10779// Deprecated: Use NextWithContext() instead.
10780func (page *TagCollectionPage) Next() error {
10781	return page.NextWithContext(context.Background())
10782}
10783
10784// NotDone returns true if the page enumeration should be started or is not yet complete.
10785func (page TagCollectionPage) NotDone() bool {
10786	return !page.tc.IsEmpty()
10787}
10788
10789// Response returns the raw server response from the last page request.
10790func (page TagCollectionPage) Response() TagCollection {
10791	return page.tc
10792}
10793
10794// Values returns the slice of values for the current page or nil if there are no values.
10795func (page TagCollectionPage) Values() []TagContract {
10796	if page.tc.IsEmpty() {
10797		return nil
10798	}
10799	return *page.tc.Value
10800}
10801
10802// Creates a new instance of the TagCollectionPage type.
10803func NewTagCollectionPage(getNextPage func(context.Context, TagCollection) (TagCollection, error)) TagCollectionPage {
10804	return TagCollectionPage{fn: getNextPage}
10805}
10806
10807// TagContract tag Contract details.
10808type TagContract struct {
10809	autorest.Response `json:"-"`
10810	// TagContractProperties - Tag entity contract properties.
10811	*TagContractProperties `json:"properties,omitempty"`
10812	// ID - READ-ONLY; Resource ID.
10813	ID *string `json:"id,omitempty"`
10814	// Name - READ-ONLY; Resource name.
10815	Name *string `json:"name,omitempty"`
10816	// Type - READ-ONLY; Resource type for API Management resource.
10817	Type *string `json:"type,omitempty"`
10818}
10819
10820// MarshalJSON is the custom marshaler for TagContract.
10821func (tc TagContract) MarshalJSON() ([]byte, error) {
10822	objectMap := make(map[string]interface{})
10823	if tc.TagContractProperties != nil {
10824		objectMap["properties"] = tc.TagContractProperties
10825	}
10826	return json.Marshal(objectMap)
10827}
10828
10829// UnmarshalJSON is the custom unmarshaler for TagContract struct.
10830func (tc *TagContract) UnmarshalJSON(body []byte) error {
10831	var m map[string]*json.RawMessage
10832	err := json.Unmarshal(body, &m)
10833	if err != nil {
10834		return err
10835	}
10836	for k, v := range m {
10837		switch k {
10838		case "properties":
10839			if v != nil {
10840				var tagContractProperties TagContractProperties
10841				err = json.Unmarshal(*v, &tagContractProperties)
10842				if err != nil {
10843					return err
10844				}
10845				tc.TagContractProperties = &tagContractProperties
10846			}
10847		case "id":
10848			if v != nil {
10849				var ID string
10850				err = json.Unmarshal(*v, &ID)
10851				if err != nil {
10852					return err
10853				}
10854				tc.ID = &ID
10855			}
10856		case "name":
10857			if v != nil {
10858				var name string
10859				err = json.Unmarshal(*v, &name)
10860				if err != nil {
10861					return err
10862				}
10863				tc.Name = &name
10864			}
10865		case "type":
10866			if v != nil {
10867				var typeVar string
10868				err = json.Unmarshal(*v, &typeVar)
10869				if err != nil {
10870					return err
10871				}
10872				tc.Type = &typeVar
10873			}
10874		}
10875	}
10876
10877	return nil
10878}
10879
10880// TagContractProperties tag contract Properties.
10881type TagContractProperties struct {
10882	// DisplayName - Tag name.
10883	DisplayName *string `json:"displayName,omitempty"`
10884}
10885
10886// TagCreateUpdateParameters parameters supplied to Create/Update Tag operations.
10887type TagCreateUpdateParameters struct {
10888	// TagContractProperties - Properties supplied to Create Tag operation.
10889	*TagContractProperties `json:"properties,omitempty"`
10890}
10891
10892// MarshalJSON is the custom marshaler for TagCreateUpdateParameters.
10893func (tcup TagCreateUpdateParameters) MarshalJSON() ([]byte, error) {
10894	objectMap := make(map[string]interface{})
10895	if tcup.TagContractProperties != nil {
10896		objectMap["properties"] = tcup.TagContractProperties
10897	}
10898	return json.Marshal(objectMap)
10899}
10900
10901// UnmarshalJSON is the custom unmarshaler for TagCreateUpdateParameters struct.
10902func (tcup *TagCreateUpdateParameters) UnmarshalJSON(body []byte) error {
10903	var m map[string]*json.RawMessage
10904	err := json.Unmarshal(body, &m)
10905	if err != nil {
10906		return err
10907	}
10908	for k, v := range m {
10909		switch k {
10910		case "properties":
10911			if v != nil {
10912				var tagContractProperties TagContractProperties
10913				err = json.Unmarshal(*v, &tagContractProperties)
10914				if err != nil {
10915					return err
10916				}
10917				tcup.TagContractProperties = &tagContractProperties
10918			}
10919		}
10920	}
10921
10922	return nil
10923}
10924
10925// TagDescriptionBaseProperties parameters supplied to the Create TagDescription operation.
10926type TagDescriptionBaseProperties struct {
10927	// Description - Description of the Tag.
10928	Description *string `json:"description,omitempty"`
10929	// ExternalDocsURL - Absolute URL of external resources describing the tag.
10930	ExternalDocsURL *string `json:"externalDocsUrl,omitempty"`
10931	// ExternalDocsDescription - Description of the external resources describing the tag.
10932	ExternalDocsDescription *string `json:"externalDocsDescription,omitempty"`
10933}
10934
10935// TagDescriptionCollection paged TagDescription list representation.
10936type TagDescriptionCollection struct {
10937	autorest.Response `json:"-"`
10938	// Value - Page values.
10939	Value *[]TagDescriptionContract `json:"value,omitempty"`
10940	// NextLink - Next page link if any.
10941	NextLink *string `json:"nextLink,omitempty"`
10942}
10943
10944// TagDescriptionCollectionIterator provides access to a complete listing of TagDescriptionContract values.
10945type TagDescriptionCollectionIterator struct {
10946	i    int
10947	page TagDescriptionCollectionPage
10948}
10949
10950// NextWithContext advances to the next value.  If there was an error making
10951// the request the iterator does not advance and the error is returned.
10952func (iter *TagDescriptionCollectionIterator) NextWithContext(ctx context.Context) (err error) {
10953	if tracing.IsEnabled() {
10954		ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionCollectionIterator.NextWithContext")
10955		defer func() {
10956			sc := -1
10957			if iter.Response().Response.Response != nil {
10958				sc = iter.Response().Response.Response.StatusCode
10959			}
10960			tracing.EndSpan(ctx, sc, err)
10961		}()
10962	}
10963	iter.i++
10964	if iter.i < len(iter.page.Values()) {
10965		return nil
10966	}
10967	err = iter.page.NextWithContext(ctx)
10968	if err != nil {
10969		iter.i--
10970		return err
10971	}
10972	iter.i = 0
10973	return nil
10974}
10975
10976// Next advances to the next value.  If there was an error making
10977// the request the iterator does not advance and the error is returned.
10978// Deprecated: Use NextWithContext() instead.
10979func (iter *TagDescriptionCollectionIterator) Next() error {
10980	return iter.NextWithContext(context.Background())
10981}
10982
10983// NotDone returns true if the enumeration should be started or is not yet complete.
10984func (iter TagDescriptionCollectionIterator) NotDone() bool {
10985	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10986}
10987
10988// Response returns the raw server response from the last page request.
10989func (iter TagDescriptionCollectionIterator) Response() TagDescriptionCollection {
10990	return iter.page.Response()
10991}
10992
10993// Value returns the current value or a zero-initialized value if the
10994// iterator has advanced beyond the end of the collection.
10995func (iter TagDescriptionCollectionIterator) Value() TagDescriptionContract {
10996	if !iter.page.NotDone() {
10997		return TagDescriptionContract{}
10998	}
10999	return iter.page.Values()[iter.i]
11000}
11001
11002// Creates a new instance of the TagDescriptionCollectionIterator type.
11003func NewTagDescriptionCollectionIterator(page TagDescriptionCollectionPage) TagDescriptionCollectionIterator {
11004	return TagDescriptionCollectionIterator{page: page}
11005}
11006
11007// IsEmpty returns true if the ListResult contains no values.
11008func (tdc TagDescriptionCollection) IsEmpty() bool {
11009	return tdc.Value == nil || len(*tdc.Value) == 0
11010}
11011
11012// tagDescriptionCollectionPreparer prepares a request to retrieve the next set of results.
11013// It returns nil if no more results exist.
11014func (tdc TagDescriptionCollection) tagDescriptionCollectionPreparer(ctx context.Context) (*http.Request, error) {
11015	if tdc.NextLink == nil || len(to.String(tdc.NextLink)) < 1 {
11016		return nil, nil
11017	}
11018	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11019		autorest.AsJSON(),
11020		autorest.AsGet(),
11021		autorest.WithBaseURL(to.String(tdc.NextLink)))
11022}
11023
11024// TagDescriptionCollectionPage contains a page of TagDescriptionContract values.
11025type TagDescriptionCollectionPage struct {
11026	fn  func(context.Context, TagDescriptionCollection) (TagDescriptionCollection, error)
11027	tdc TagDescriptionCollection
11028}
11029
11030// NextWithContext advances to the next page of values.  If there was an error making
11031// the request the page does not advance and the error is returned.
11032func (page *TagDescriptionCollectionPage) NextWithContext(ctx context.Context) (err error) {
11033	if tracing.IsEnabled() {
11034		ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionCollectionPage.NextWithContext")
11035		defer func() {
11036			sc := -1
11037			if page.Response().Response.Response != nil {
11038				sc = page.Response().Response.Response.StatusCode
11039			}
11040			tracing.EndSpan(ctx, sc, err)
11041		}()
11042	}
11043	next, err := page.fn(ctx, page.tdc)
11044	if err != nil {
11045		return err
11046	}
11047	page.tdc = next
11048	return nil
11049}
11050
11051// Next advances to the next page of values.  If there was an error making
11052// the request the page does not advance and the error is returned.
11053// Deprecated: Use NextWithContext() instead.
11054func (page *TagDescriptionCollectionPage) Next() error {
11055	return page.NextWithContext(context.Background())
11056}
11057
11058// NotDone returns true if the page enumeration should be started or is not yet complete.
11059func (page TagDescriptionCollectionPage) NotDone() bool {
11060	return !page.tdc.IsEmpty()
11061}
11062
11063// Response returns the raw server response from the last page request.
11064func (page TagDescriptionCollectionPage) Response() TagDescriptionCollection {
11065	return page.tdc
11066}
11067
11068// Values returns the slice of values for the current page or nil if there are no values.
11069func (page TagDescriptionCollectionPage) Values() []TagDescriptionContract {
11070	if page.tdc.IsEmpty() {
11071		return nil
11072	}
11073	return *page.tdc.Value
11074}
11075
11076// Creates a new instance of the TagDescriptionCollectionPage type.
11077func NewTagDescriptionCollectionPage(getNextPage func(context.Context, TagDescriptionCollection) (TagDescriptionCollection, error)) TagDescriptionCollectionPage {
11078	return TagDescriptionCollectionPage{fn: getNextPage}
11079}
11080
11081// TagDescriptionContract contract details.
11082type TagDescriptionContract struct {
11083	autorest.Response `json:"-"`
11084	// TagDescriptionContractProperties - TagDescription entity contract properties.
11085	*TagDescriptionContractProperties `json:"properties,omitempty"`
11086	// ID - READ-ONLY; Resource ID.
11087	ID *string `json:"id,omitempty"`
11088	// Name - READ-ONLY; Resource name.
11089	Name *string `json:"name,omitempty"`
11090	// Type - READ-ONLY; Resource type for API Management resource.
11091	Type *string `json:"type,omitempty"`
11092}
11093
11094// MarshalJSON is the custom marshaler for TagDescriptionContract.
11095func (tdc TagDescriptionContract) MarshalJSON() ([]byte, error) {
11096	objectMap := make(map[string]interface{})
11097	if tdc.TagDescriptionContractProperties != nil {
11098		objectMap["properties"] = tdc.TagDescriptionContractProperties
11099	}
11100	return json.Marshal(objectMap)
11101}
11102
11103// UnmarshalJSON is the custom unmarshaler for TagDescriptionContract struct.
11104func (tdc *TagDescriptionContract) UnmarshalJSON(body []byte) error {
11105	var m map[string]*json.RawMessage
11106	err := json.Unmarshal(body, &m)
11107	if err != nil {
11108		return err
11109	}
11110	for k, v := range m {
11111		switch k {
11112		case "properties":
11113			if v != nil {
11114				var tagDescriptionContractProperties TagDescriptionContractProperties
11115				err = json.Unmarshal(*v, &tagDescriptionContractProperties)
11116				if err != nil {
11117					return err
11118				}
11119				tdc.TagDescriptionContractProperties = &tagDescriptionContractProperties
11120			}
11121		case "id":
11122			if v != nil {
11123				var ID string
11124				err = json.Unmarshal(*v, &ID)
11125				if err != nil {
11126					return err
11127				}
11128				tdc.ID = &ID
11129			}
11130		case "name":
11131			if v != nil {
11132				var name string
11133				err = json.Unmarshal(*v, &name)
11134				if err != nil {
11135					return err
11136				}
11137				tdc.Name = &name
11138			}
11139		case "type":
11140			if v != nil {
11141				var typeVar string
11142				err = json.Unmarshal(*v, &typeVar)
11143				if err != nil {
11144					return err
11145				}
11146				tdc.Type = &typeVar
11147			}
11148		}
11149	}
11150
11151	return nil
11152}
11153
11154// TagDescriptionContractProperties tagDescription contract Properties.
11155type TagDescriptionContractProperties struct {
11156	// DisplayName - Tag name.
11157	DisplayName *string `json:"displayName,omitempty"`
11158	// Description - Description of the Tag.
11159	Description *string `json:"description,omitempty"`
11160	// ExternalDocsURL - Absolute URL of external resources describing the tag.
11161	ExternalDocsURL *string `json:"externalDocsUrl,omitempty"`
11162	// ExternalDocsDescription - Description of the external resources describing the tag.
11163	ExternalDocsDescription *string `json:"externalDocsDescription,omitempty"`
11164}
11165
11166// TagDescriptionCreateParameters parameters supplied to the Create TagDescription operation.
11167type TagDescriptionCreateParameters struct {
11168	// TagDescriptionBaseProperties - Properties supplied to Create TagDescription operation.
11169	*TagDescriptionBaseProperties `json:"properties,omitempty"`
11170}
11171
11172// MarshalJSON is the custom marshaler for TagDescriptionCreateParameters.
11173func (tdcp TagDescriptionCreateParameters) MarshalJSON() ([]byte, error) {
11174	objectMap := make(map[string]interface{})
11175	if tdcp.TagDescriptionBaseProperties != nil {
11176		objectMap["properties"] = tdcp.TagDescriptionBaseProperties
11177	}
11178	return json.Marshal(objectMap)
11179}
11180
11181// UnmarshalJSON is the custom unmarshaler for TagDescriptionCreateParameters struct.
11182func (tdcp *TagDescriptionCreateParameters) UnmarshalJSON(body []byte) error {
11183	var m map[string]*json.RawMessage
11184	err := json.Unmarshal(body, &m)
11185	if err != nil {
11186		return err
11187	}
11188	for k, v := range m {
11189		switch k {
11190		case "properties":
11191			if v != nil {
11192				var tagDescriptionBaseProperties TagDescriptionBaseProperties
11193				err = json.Unmarshal(*v, &tagDescriptionBaseProperties)
11194				if err != nil {
11195					return err
11196				}
11197				tdcp.TagDescriptionBaseProperties = &tagDescriptionBaseProperties
11198			}
11199		}
11200	}
11201
11202	return nil
11203}
11204
11205// TagResourceCollection paged Tag list representation.
11206type TagResourceCollection struct {
11207	autorest.Response `json:"-"`
11208	// Value - Page values.
11209	Value *[]TagResourceContract `json:"value,omitempty"`
11210	// NextLink - Next page link if any.
11211	NextLink *string `json:"nextLink,omitempty"`
11212}
11213
11214// TagResourceCollectionIterator provides access to a complete listing of TagResourceContract values.
11215type TagResourceCollectionIterator struct {
11216	i    int
11217	page TagResourceCollectionPage
11218}
11219
11220// NextWithContext advances to the next value.  If there was an error making
11221// the request the iterator does not advance and the error is returned.
11222func (iter *TagResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
11223	if tracing.IsEnabled() {
11224		ctx = tracing.StartSpan(ctx, fqdn+"/TagResourceCollectionIterator.NextWithContext")
11225		defer func() {
11226			sc := -1
11227			if iter.Response().Response.Response != nil {
11228				sc = iter.Response().Response.Response.StatusCode
11229			}
11230			tracing.EndSpan(ctx, sc, err)
11231		}()
11232	}
11233	iter.i++
11234	if iter.i < len(iter.page.Values()) {
11235		return nil
11236	}
11237	err = iter.page.NextWithContext(ctx)
11238	if err != nil {
11239		iter.i--
11240		return err
11241	}
11242	iter.i = 0
11243	return nil
11244}
11245
11246// Next advances to the next value.  If there was an error making
11247// the request the iterator does not advance and the error is returned.
11248// Deprecated: Use NextWithContext() instead.
11249func (iter *TagResourceCollectionIterator) Next() error {
11250	return iter.NextWithContext(context.Background())
11251}
11252
11253// NotDone returns true if the enumeration should be started or is not yet complete.
11254func (iter TagResourceCollectionIterator) NotDone() bool {
11255	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11256}
11257
11258// Response returns the raw server response from the last page request.
11259func (iter TagResourceCollectionIterator) Response() TagResourceCollection {
11260	return iter.page.Response()
11261}
11262
11263// Value returns the current value or a zero-initialized value if the
11264// iterator has advanced beyond the end of the collection.
11265func (iter TagResourceCollectionIterator) Value() TagResourceContract {
11266	if !iter.page.NotDone() {
11267		return TagResourceContract{}
11268	}
11269	return iter.page.Values()[iter.i]
11270}
11271
11272// Creates a new instance of the TagResourceCollectionIterator type.
11273func NewTagResourceCollectionIterator(page TagResourceCollectionPage) TagResourceCollectionIterator {
11274	return TagResourceCollectionIterator{page: page}
11275}
11276
11277// IsEmpty returns true if the ListResult contains no values.
11278func (trc TagResourceCollection) IsEmpty() bool {
11279	return trc.Value == nil || len(*trc.Value) == 0
11280}
11281
11282// tagResourceCollectionPreparer prepares a request to retrieve the next set of results.
11283// It returns nil if no more results exist.
11284func (trc TagResourceCollection) tagResourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
11285	if trc.NextLink == nil || len(to.String(trc.NextLink)) < 1 {
11286		return nil, nil
11287	}
11288	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11289		autorest.AsJSON(),
11290		autorest.AsGet(),
11291		autorest.WithBaseURL(to.String(trc.NextLink)))
11292}
11293
11294// TagResourceCollectionPage contains a page of TagResourceContract values.
11295type TagResourceCollectionPage struct {
11296	fn  func(context.Context, TagResourceCollection) (TagResourceCollection, error)
11297	trc TagResourceCollection
11298}
11299
11300// NextWithContext advances to the next page of values.  If there was an error making
11301// the request the page does not advance and the error is returned.
11302func (page *TagResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
11303	if tracing.IsEnabled() {
11304		ctx = tracing.StartSpan(ctx, fqdn+"/TagResourceCollectionPage.NextWithContext")
11305		defer func() {
11306			sc := -1
11307			if page.Response().Response.Response != nil {
11308				sc = page.Response().Response.Response.StatusCode
11309			}
11310			tracing.EndSpan(ctx, sc, err)
11311		}()
11312	}
11313	next, err := page.fn(ctx, page.trc)
11314	if err != nil {
11315		return err
11316	}
11317	page.trc = next
11318	return nil
11319}
11320
11321// Next advances to the next page of values.  If there was an error making
11322// the request the page does not advance and the error is returned.
11323// Deprecated: Use NextWithContext() instead.
11324func (page *TagResourceCollectionPage) Next() error {
11325	return page.NextWithContext(context.Background())
11326}
11327
11328// NotDone returns true if the page enumeration should be started or is not yet complete.
11329func (page TagResourceCollectionPage) NotDone() bool {
11330	return !page.trc.IsEmpty()
11331}
11332
11333// Response returns the raw server response from the last page request.
11334func (page TagResourceCollectionPage) Response() TagResourceCollection {
11335	return page.trc
11336}
11337
11338// Values returns the slice of values for the current page or nil if there are no values.
11339func (page TagResourceCollectionPage) Values() []TagResourceContract {
11340	if page.trc.IsEmpty() {
11341		return nil
11342	}
11343	return *page.trc.Value
11344}
11345
11346// Creates a new instance of the TagResourceCollectionPage type.
11347func NewTagResourceCollectionPage(getNextPage func(context.Context, TagResourceCollection) (TagResourceCollection, error)) TagResourceCollectionPage {
11348	return TagResourceCollectionPage{fn: getNextPage}
11349}
11350
11351// TagResourceContract tagResource contract properties.
11352type TagResourceContract struct {
11353	// Tag - Tag associated with the resource.
11354	Tag *TagTagResourceContractProperties `json:"tag,omitempty"`
11355	// API - Api associated with the tag.
11356	API *APITagResourceContractProperties `json:"api,omitempty"`
11357	// Operation - Operation associated with the tag.
11358	Operation *OperationTagResourceContractProperties `json:"operation,omitempty"`
11359	// Product - Product associated with the tag.
11360	Product *ProductTagResourceContractProperties `json:"product,omitempty"`
11361}
11362
11363// TagTagResourceContractProperties contract defining the Tag property in the Tag Resource Contract
11364type TagTagResourceContractProperties struct {
11365	// ID - Tag identifier
11366	ID *string `json:"id,omitempty"`
11367	// Name - Tag Name
11368	Name *string `json:"name,omitempty"`
11369}
11370
11371// TenantConfigurationDeployFuture an abstraction for monitoring and retrieving the results of a
11372// long-running operation.
11373type TenantConfigurationDeployFuture struct {
11374	azure.Future
11375}
11376
11377// Result returns the result of the asynchronous operation.
11378// If the operation has not completed it will return an error.
11379func (future *TenantConfigurationDeployFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
11380	var done bool
11381	done, err = future.DoneWithContext(context.Background(), client)
11382	if err != nil {
11383		err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", future.Response(), "Polling failure")
11384		return
11385	}
11386	if !done {
11387		err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationDeployFuture")
11388		return
11389	}
11390	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11391	if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
11392		orc, err = client.DeployResponder(orc.Response.Response)
11393		if err != nil {
11394			err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationDeployFuture", "Result", orc.Response.Response, "Failure responding to request")
11395		}
11396	}
11397	return
11398}
11399
11400// TenantConfigurationSaveFuture an abstraction for monitoring and retrieving the results of a long-running
11401// operation.
11402type TenantConfigurationSaveFuture struct {
11403	azure.Future
11404}
11405
11406// Result returns the result of the asynchronous operation.
11407// If the operation has not completed it will return an error.
11408func (future *TenantConfigurationSaveFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
11409	var done bool
11410	done, err = future.DoneWithContext(context.Background(), client)
11411	if err != nil {
11412		err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", future.Response(), "Polling failure")
11413		return
11414	}
11415	if !done {
11416		err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationSaveFuture")
11417		return
11418	}
11419	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11420	if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
11421		orc, err = client.SaveResponder(orc.Response.Response)
11422		if err != nil {
11423			err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationSaveFuture", "Result", orc.Response.Response, "Failure responding to request")
11424		}
11425	}
11426	return
11427}
11428
11429// TenantConfigurationSyncStateContract tenant Configuration Synchronization State.
11430type TenantConfigurationSyncStateContract struct {
11431	autorest.Response `json:"-"`
11432	// Branch - The name of Git branch.
11433	Branch *string `json:"branch,omitempty"`
11434	// CommitID - The latest commit Id.
11435	CommitID *string `json:"commitId,omitempty"`
11436	// IsExport - value indicating if last sync was save (true) or deploy (false) operation.
11437	IsExport *bool `json:"isExport,omitempty"`
11438	// IsSynced - value indicating if last synchronization was later than the configuration change.
11439	IsSynced *bool `json:"isSynced,omitempty"`
11440	// IsGitEnabled - value indicating whether Git configuration access is enabled.
11441	IsGitEnabled *bool `json:"isGitEnabled,omitempty"`
11442	// 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.
11443	SyncDate *date.Time `json:"syncDate,omitempty"`
11444	// 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.
11445	ConfigurationChangeDate *date.Time `json:"configurationChangeDate,omitempty"`
11446}
11447
11448// TenantConfigurationValidateFuture an abstraction for monitoring and retrieving the results of a
11449// long-running operation.
11450type TenantConfigurationValidateFuture struct {
11451	azure.Future
11452}
11453
11454// Result returns the result of the asynchronous operation.
11455// If the operation has not completed it will return an error.
11456func (future *TenantConfigurationValidateFuture) Result(client TenantConfigurationClient) (orc OperationResultContract, err error) {
11457	var done bool
11458	done, err = future.DoneWithContext(context.Background(), client)
11459	if err != nil {
11460		err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", future.Response(), "Polling failure")
11461		return
11462	}
11463	if !done {
11464		err = azure.NewAsyncOpIncompleteError("apimanagement.TenantConfigurationValidateFuture")
11465		return
11466	}
11467	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11468	if orc.Response.Response, err = future.GetResult(sender); err == nil && orc.Response.Response.StatusCode != http.StatusNoContent {
11469		orc, err = client.ValidateResponder(orc.Response.Response)
11470		if err != nil {
11471			err = autorest.NewErrorWithError(err, "apimanagement.TenantConfigurationValidateFuture", "Result", orc.Response.Response, "Failure responding to request")
11472		}
11473	}
11474	return
11475}
11476
11477// TermsOfServiceProperties terms of service contract properties.
11478type TermsOfServiceProperties struct {
11479	// Text - A terms of service text.
11480	Text *string `json:"text,omitempty"`
11481	// Enabled - Display terms of service during a sign-up process.
11482	Enabled *bool `json:"enabled,omitempty"`
11483	// ConsentRequired - Ask user for consent to the terms of service.
11484	ConsentRequired *bool `json:"consentRequired,omitempty"`
11485}
11486
11487// TokenBodyParameterContract oAuth acquire token request body parameter (www-url-form-encoded).
11488type TokenBodyParameterContract struct {
11489	// Name - body parameter name.
11490	Name *string `json:"name,omitempty"`
11491	// Value - body parameter value.
11492	Value *string `json:"value,omitempty"`
11493}
11494
11495// UserCollection paged Users list representation.
11496type UserCollection struct {
11497	autorest.Response `json:"-"`
11498	// Value - Page values.
11499	Value *[]UserContract `json:"value,omitempty"`
11500	// NextLink - Next page link if any.
11501	NextLink *string `json:"nextLink,omitempty"`
11502}
11503
11504// UserCollectionIterator provides access to a complete listing of UserContract values.
11505type UserCollectionIterator struct {
11506	i    int
11507	page UserCollectionPage
11508}
11509
11510// NextWithContext advances to the next value.  If there was an error making
11511// the request the iterator does not advance and the error is returned.
11512func (iter *UserCollectionIterator) NextWithContext(ctx context.Context) (err error) {
11513	if tracing.IsEnabled() {
11514		ctx = tracing.StartSpan(ctx, fqdn+"/UserCollectionIterator.NextWithContext")
11515		defer func() {
11516			sc := -1
11517			if iter.Response().Response.Response != nil {
11518				sc = iter.Response().Response.Response.StatusCode
11519			}
11520			tracing.EndSpan(ctx, sc, err)
11521		}()
11522	}
11523	iter.i++
11524	if iter.i < len(iter.page.Values()) {
11525		return nil
11526	}
11527	err = iter.page.NextWithContext(ctx)
11528	if err != nil {
11529		iter.i--
11530		return err
11531	}
11532	iter.i = 0
11533	return nil
11534}
11535
11536// Next advances to the next value.  If there was an error making
11537// the request the iterator does not advance and the error is returned.
11538// Deprecated: Use NextWithContext() instead.
11539func (iter *UserCollectionIterator) Next() error {
11540	return iter.NextWithContext(context.Background())
11541}
11542
11543// NotDone returns true if the enumeration should be started or is not yet complete.
11544func (iter UserCollectionIterator) NotDone() bool {
11545	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11546}
11547
11548// Response returns the raw server response from the last page request.
11549func (iter UserCollectionIterator) Response() UserCollection {
11550	return iter.page.Response()
11551}
11552
11553// Value returns the current value or a zero-initialized value if the
11554// iterator has advanced beyond the end of the collection.
11555func (iter UserCollectionIterator) Value() UserContract {
11556	if !iter.page.NotDone() {
11557		return UserContract{}
11558	}
11559	return iter.page.Values()[iter.i]
11560}
11561
11562// Creates a new instance of the UserCollectionIterator type.
11563func NewUserCollectionIterator(page UserCollectionPage) UserCollectionIterator {
11564	return UserCollectionIterator{page: page}
11565}
11566
11567// IsEmpty returns true if the ListResult contains no values.
11568func (uc UserCollection) IsEmpty() bool {
11569	return uc.Value == nil || len(*uc.Value) == 0
11570}
11571
11572// userCollectionPreparer prepares a request to retrieve the next set of results.
11573// It returns nil if no more results exist.
11574func (uc UserCollection) userCollectionPreparer(ctx context.Context) (*http.Request, error) {
11575	if uc.NextLink == nil || len(to.String(uc.NextLink)) < 1 {
11576		return nil, nil
11577	}
11578	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11579		autorest.AsJSON(),
11580		autorest.AsGet(),
11581		autorest.WithBaseURL(to.String(uc.NextLink)))
11582}
11583
11584// UserCollectionPage contains a page of UserContract values.
11585type UserCollectionPage struct {
11586	fn func(context.Context, UserCollection) (UserCollection, error)
11587	uc UserCollection
11588}
11589
11590// NextWithContext advances to the next page of values.  If there was an error making
11591// the request the page does not advance and the error is returned.
11592func (page *UserCollectionPage) NextWithContext(ctx context.Context) (err error) {
11593	if tracing.IsEnabled() {
11594		ctx = tracing.StartSpan(ctx, fqdn+"/UserCollectionPage.NextWithContext")
11595		defer func() {
11596			sc := -1
11597			if page.Response().Response.Response != nil {
11598				sc = page.Response().Response.Response.StatusCode
11599			}
11600			tracing.EndSpan(ctx, sc, err)
11601		}()
11602	}
11603	next, err := page.fn(ctx, page.uc)
11604	if err != nil {
11605		return err
11606	}
11607	page.uc = next
11608	return nil
11609}
11610
11611// Next advances to the next page of values.  If there was an error making
11612// the request the page does not advance and the error is returned.
11613// Deprecated: Use NextWithContext() instead.
11614func (page *UserCollectionPage) Next() error {
11615	return page.NextWithContext(context.Background())
11616}
11617
11618// NotDone returns true if the page enumeration should be started or is not yet complete.
11619func (page UserCollectionPage) NotDone() bool {
11620	return !page.uc.IsEmpty()
11621}
11622
11623// Response returns the raw server response from the last page request.
11624func (page UserCollectionPage) Response() UserCollection {
11625	return page.uc
11626}
11627
11628// Values returns the slice of values for the current page or nil if there are no values.
11629func (page UserCollectionPage) Values() []UserContract {
11630	if page.uc.IsEmpty() {
11631		return nil
11632	}
11633	return *page.uc.Value
11634}
11635
11636// Creates a new instance of the UserCollectionPage type.
11637func NewUserCollectionPage(getNextPage func(context.Context, UserCollection) (UserCollection, error)) UserCollectionPage {
11638	return UserCollectionPage{fn: getNextPage}
11639}
11640
11641// UserContract user details.
11642type UserContract struct {
11643	autorest.Response `json:"-"`
11644	// UserContractProperties - User entity contract properties.
11645	*UserContractProperties `json:"properties,omitempty"`
11646	// ID - READ-ONLY; Resource ID.
11647	ID *string `json:"id,omitempty"`
11648	// Name - READ-ONLY; Resource name.
11649	Name *string `json:"name,omitempty"`
11650	// Type - READ-ONLY; Resource type for API Management resource.
11651	Type *string `json:"type,omitempty"`
11652}
11653
11654// MarshalJSON is the custom marshaler for UserContract.
11655func (uc UserContract) MarshalJSON() ([]byte, error) {
11656	objectMap := make(map[string]interface{})
11657	if uc.UserContractProperties != nil {
11658		objectMap["properties"] = uc.UserContractProperties
11659	}
11660	return json.Marshal(objectMap)
11661}
11662
11663// UnmarshalJSON is the custom unmarshaler for UserContract struct.
11664func (uc *UserContract) UnmarshalJSON(body []byte) error {
11665	var m map[string]*json.RawMessage
11666	err := json.Unmarshal(body, &m)
11667	if err != nil {
11668		return err
11669	}
11670	for k, v := range m {
11671		switch k {
11672		case "properties":
11673			if v != nil {
11674				var userContractProperties UserContractProperties
11675				err = json.Unmarshal(*v, &userContractProperties)
11676				if err != nil {
11677					return err
11678				}
11679				uc.UserContractProperties = &userContractProperties
11680			}
11681		case "id":
11682			if v != nil {
11683				var ID string
11684				err = json.Unmarshal(*v, &ID)
11685				if err != nil {
11686					return err
11687				}
11688				uc.ID = &ID
11689			}
11690		case "name":
11691			if v != nil {
11692				var name string
11693				err = json.Unmarshal(*v, &name)
11694				if err != nil {
11695					return err
11696				}
11697				uc.Name = &name
11698			}
11699		case "type":
11700			if v != nil {
11701				var typeVar string
11702				err = json.Unmarshal(*v, &typeVar)
11703				if err != nil {
11704					return err
11705				}
11706				uc.Type = &typeVar
11707			}
11708		}
11709	}
11710
11711	return nil
11712}
11713
11714// UserContractProperties user profile.
11715type UserContractProperties struct {
11716	// FirstName - First name.
11717	FirstName *string `json:"firstName,omitempty"`
11718	// LastName - Last name.
11719	LastName *string `json:"lastName,omitempty"`
11720	// Email - Email address.
11721	Email *string `json:"email,omitempty"`
11722	// RegistrationDate - Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
11723	RegistrationDate *date.Time `json:"registrationDate,omitempty"`
11724	// Groups - READ-ONLY; Collection of groups user is part of.
11725	Groups *[]GroupContractProperties `json:"groups,omitempty"`
11726	// 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'
11727	State UserState `json:"state,omitempty"`
11728	// Note - Optional note about a user set by the administrator.
11729	Note *string `json:"note,omitempty"`
11730	// Identities - Collection of user identities.
11731	Identities *[]UserIdentityContract `json:"identities,omitempty"`
11732}
11733
11734// UserCreateParameterProperties parameters supplied to the Create User operation.
11735type UserCreateParameterProperties struct {
11736	// Email - Email address. Must not be empty and must be unique within the service instance.
11737	Email *string `json:"email,omitempty"`
11738	// FirstName - First name.
11739	FirstName *string `json:"firstName,omitempty"`
11740	// LastName - Last name.
11741	LastName *string `json:"lastName,omitempty"`
11742	// Password - User Password. If no value is provided, a default password is generated.
11743	Password *string `json:"password,omitempty"`
11744	// Confirmation - Determines the type of confirmation e-mail that will be sent to the newly created user. Possible values include: 'Signup', 'Invite'
11745	Confirmation Confirmation `json:"confirmation,omitempty"`
11746	// 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'
11747	State UserState `json:"state,omitempty"`
11748	// Note - Optional note about a user set by the administrator.
11749	Note *string `json:"note,omitempty"`
11750	// Identities - Collection of user identities.
11751	Identities *[]UserIdentityContract `json:"identities,omitempty"`
11752}
11753
11754// UserCreateParameters user create details.
11755type UserCreateParameters struct {
11756	// UserCreateParameterProperties - User entity create contract properties.
11757	*UserCreateParameterProperties `json:"properties,omitempty"`
11758}
11759
11760// MarshalJSON is the custom marshaler for UserCreateParameters.
11761func (ucp UserCreateParameters) MarshalJSON() ([]byte, error) {
11762	objectMap := make(map[string]interface{})
11763	if ucp.UserCreateParameterProperties != nil {
11764		objectMap["properties"] = ucp.UserCreateParameterProperties
11765	}
11766	return json.Marshal(objectMap)
11767}
11768
11769// UnmarshalJSON is the custom unmarshaler for UserCreateParameters struct.
11770func (ucp *UserCreateParameters) UnmarshalJSON(body []byte) error {
11771	var m map[string]*json.RawMessage
11772	err := json.Unmarshal(body, &m)
11773	if err != nil {
11774		return err
11775	}
11776	for k, v := range m {
11777		switch k {
11778		case "properties":
11779			if v != nil {
11780				var userCreateParameterProperties UserCreateParameterProperties
11781				err = json.Unmarshal(*v, &userCreateParameterProperties)
11782				if err != nil {
11783					return err
11784				}
11785				ucp.UserCreateParameterProperties = &userCreateParameterProperties
11786			}
11787		}
11788	}
11789
11790	return nil
11791}
11792
11793// UserEntityBaseParameters user Entity Base Parameters set.
11794type UserEntityBaseParameters struct {
11795	// 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'
11796	State UserState `json:"state,omitempty"`
11797	// Note - Optional note about a user set by the administrator.
11798	Note *string `json:"note,omitempty"`
11799	// Identities - Collection of user identities.
11800	Identities *[]UserIdentityContract `json:"identities,omitempty"`
11801}
11802
11803// UserIdentityCollection list of Users Identity list representation.
11804type UserIdentityCollection struct {
11805	autorest.Response `json:"-"`
11806	// Value - User Identity values.
11807	Value *[]UserIdentityContract `json:"value,omitempty"`
11808	// Count - Total record count number across all pages.
11809	Count *int64 `json:"count,omitempty"`
11810	// NextLink - Next page link if any.
11811	NextLink *string `json:"nextLink,omitempty"`
11812}
11813
11814// UserIdentityCollectionIterator provides access to a complete listing of UserIdentityContract values.
11815type UserIdentityCollectionIterator struct {
11816	i    int
11817	page UserIdentityCollectionPage
11818}
11819
11820// NextWithContext advances to the next value.  If there was an error making
11821// the request the iterator does not advance and the error is returned.
11822func (iter *UserIdentityCollectionIterator) NextWithContext(ctx context.Context) (err error) {
11823	if tracing.IsEnabled() {
11824		ctx = tracing.StartSpan(ctx, fqdn+"/UserIdentityCollectionIterator.NextWithContext")
11825		defer func() {
11826			sc := -1
11827			if iter.Response().Response.Response != nil {
11828				sc = iter.Response().Response.Response.StatusCode
11829			}
11830			tracing.EndSpan(ctx, sc, err)
11831		}()
11832	}
11833	iter.i++
11834	if iter.i < len(iter.page.Values()) {
11835		return nil
11836	}
11837	err = iter.page.NextWithContext(ctx)
11838	if err != nil {
11839		iter.i--
11840		return err
11841	}
11842	iter.i = 0
11843	return nil
11844}
11845
11846// Next advances to the next value.  If there was an error making
11847// the request the iterator does not advance and the error is returned.
11848// Deprecated: Use NextWithContext() instead.
11849func (iter *UserIdentityCollectionIterator) Next() error {
11850	return iter.NextWithContext(context.Background())
11851}
11852
11853// NotDone returns true if the enumeration should be started or is not yet complete.
11854func (iter UserIdentityCollectionIterator) NotDone() bool {
11855	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11856}
11857
11858// Response returns the raw server response from the last page request.
11859func (iter UserIdentityCollectionIterator) Response() UserIdentityCollection {
11860	return iter.page.Response()
11861}
11862
11863// Value returns the current value or a zero-initialized value if the
11864// iterator has advanced beyond the end of the collection.
11865func (iter UserIdentityCollectionIterator) Value() UserIdentityContract {
11866	if !iter.page.NotDone() {
11867		return UserIdentityContract{}
11868	}
11869	return iter.page.Values()[iter.i]
11870}
11871
11872// Creates a new instance of the UserIdentityCollectionIterator type.
11873func NewUserIdentityCollectionIterator(page UserIdentityCollectionPage) UserIdentityCollectionIterator {
11874	return UserIdentityCollectionIterator{page: page}
11875}
11876
11877// IsEmpty returns true if the ListResult contains no values.
11878func (uic UserIdentityCollection) IsEmpty() bool {
11879	return uic.Value == nil || len(*uic.Value) == 0
11880}
11881
11882// userIdentityCollectionPreparer prepares a request to retrieve the next set of results.
11883// It returns nil if no more results exist.
11884func (uic UserIdentityCollection) userIdentityCollectionPreparer(ctx context.Context) (*http.Request, error) {
11885	if uic.NextLink == nil || len(to.String(uic.NextLink)) < 1 {
11886		return nil, nil
11887	}
11888	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11889		autorest.AsJSON(),
11890		autorest.AsGet(),
11891		autorest.WithBaseURL(to.String(uic.NextLink)))
11892}
11893
11894// UserIdentityCollectionPage contains a page of UserIdentityContract values.
11895type UserIdentityCollectionPage struct {
11896	fn  func(context.Context, UserIdentityCollection) (UserIdentityCollection, error)
11897	uic UserIdentityCollection
11898}
11899
11900// NextWithContext advances to the next page of values.  If there was an error making
11901// the request the page does not advance and the error is returned.
11902func (page *UserIdentityCollectionPage) NextWithContext(ctx context.Context) (err error) {
11903	if tracing.IsEnabled() {
11904		ctx = tracing.StartSpan(ctx, fqdn+"/UserIdentityCollectionPage.NextWithContext")
11905		defer func() {
11906			sc := -1
11907			if page.Response().Response.Response != nil {
11908				sc = page.Response().Response.Response.StatusCode
11909			}
11910			tracing.EndSpan(ctx, sc, err)
11911		}()
11912	}
11913	next, err := page.fn(ctx, page.uic)
11914	if err != nil {
11915		return err
11916	}
11917	page.uic = next
11918	return nil
11919}
11920
11921// Next advances to the next page of values.  If there was an error making
11922// the request the page does not advance and the error is returned.
11923// Deprecated: Use NextWithContext() instead.
11924func (page *UserIdentityCollectionPage) Next() error {
11925	return page.NextWithContext(context.Background())
11926}
11927
11928// NotDone returns true if the page enumeration should be started or is not yet complete.
11929func (page UserIdentityCollectionPage) NotDone() bool {
11930	return !page.uic.IsEmpty()
11931}
11932
11933// Response returns the raw server response from the last page request.
11934func (page UserIdentityCollectionPage) Response() UserIdentityCollection {
11935	return page.uic
11936}
11937
11938// Values returns the slice of values for the current page or nil if there are no values.
11939func (page UserIdentityCollectionPage) Values() []UserIdentityContract {
11940	if page.uic.IsEmpty() {
11941		return nil
11942	}
11943	return *page.uic.Value
11944}
11945
11946// Creates a new instance of the UserIdentityCollectionPage type.
11947func NewUserIdentityCollectionPage(getNextPage func(context.Context, UserIdentityCollection) (UserIdentityCollection, error)) UserIdentityCollectionPage {
11948	return UserIdentityCollectionPage{fn: getNextPage}
11949}
11950
11951// UserIdentityContract user identity details.
11952type UserIdentityContract struct {
11953	// Provider - Identity provider name.
11954	Provider *string `json:"provider,omitempty"`
11955	// ID - Identifier value within provider.
11956	ID *string `json:"id,omitempty"`
11957}
11958
11959// UserTokenParameterProperties parameters supplied to the Get User Token operation.
11960type UserTokenParameterProperties struct {
11961	// KeyType - The Key to be used to generate token for user. Possible values include: 'Primary', 'Secondary'
11962	KeyType KeyType `json:"keyType,omitempty"`
11963	// 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.
11964	Expiry *date.Time `json:"expiry,omitempty"`
11965}
11966
11967// UserTokenParameters get User Token parameters.
11968type UserTokenParameters struct {
11969	// UserTokenParameterProperties - User Token Parameter contract properties.
11970	*UserTokenParameterProperties `json:"properties,omitempty"`
11971}
11972
11973// MarshalJSON is the custom marshaler for UserTokenParameters.
11974func (utp UserTokenParameters) MarshalJSON() ([]byte, error) {
11975	objectMap := make(map[string]interface{})
11976	if utp.UserTokenParameterProperties != nil {
11977		objectMap["properties"] = utp.UserTokenParameterProperties
11978	}
11979	return json.Marshal(objectMap)
11980}
11981
11982// UnmarshalJSON is the custom unmarshaler for UserTokenParameters struct.
11983func (utp *UserTokenParameters) UnmarshalJSON(body []byte) error {
11984	var m map[string]*json.RawMessage
11985	err := json.Unmarshal(body, &m)
11986	if err != nil {
11987		return err
11988	}
11989	for k, v := range m {
11990		switch k {
11991		case "properties":
11992			if v != nil {
11993				var userTokenParameterProperties UserTokenParameterProperties
11994				err = json.Unmarshal(*v, &userTokenParameterProperties)
11995				if err != nil {
11996					return err
11997				}
11998				utp.UserTokenParameterProperties = &userTokenParameterProperties
11999			}
12000		}
12001	}
12002
12003	return nil
12004}
12005
12006// UserTokenResult get User Token response details.
12007type UserTokenResult struct {
12008	autorest.Response `json:"-"`
12009	// Value - Shared Access Authorization token for the User.
12010	Value *string `json:"value,omitempty"`
12011}
12012
12013// UserUpdateParameters user update parameters.
12014type UserUpdateParameters struct {
12015	// UserUpdateParametersProperties - User entity update contract properties.
12016	*UserUpdateParametersProperties `json:"properties,omitempty"`
12017}
12018
12019// MarshalJSON is the custom marshaler for UserUpdateParameters.
12020func (uup UserUpdateParameters) MarshalJSON() ([]byte, error) {
12021	objectMap := make(map[string]interface{})
12022	if uup.UserUpdateParametersProperties != nil {
12023		objectMap["properties"] = uup.UserUpdateParametersProperties
12024	}
12025	return json.Marshal(objectMap)
12026}
12027
12028// UnmarshalJSON is the custom unmarshaler for UserUpdateParameters struct.
12029func (uup *UserUpdateParameters) UnmarshalJSON(body []byte) error {
12030	var m map[string]*json.RawMessage
12031	err := json.Unmarshal(body, &m)
12032	if err != nil {
12033		return err
12034	}
12035	for k, v := range m {
12036		switch k {
12037		case "properties":
12038			if v != nil {
12039				var userUpdateParametersProperties UserUpdateParametersProperties
12040				err = json.Unmarshal(*v, &userUpdateParametersProperties)
12041				if err != nil {
12042					return err
12043				}
12044				uup.UserUpdateParametersProperties = &userUpdateParametersProperties
12045			}
12046		}
12047	}
12048
12049	return nil
12050}
12051
12052// UserUpdateParametersProperties parameters supplied to the Update User operation.
12053type UserUpdateParametersProperties struct {
12054	// Email - Email address. Must not be empty and must be unique within the service instance.
12055	Email *string `json:"email,omitempty"`
12056	// Password - User Password.
12057	Password *string `json:"password,omitempty"`
12058	// FirstName - First name.
12059	FirstName *string `json:"firstName,omitempty"`
12060	// LastName - Last name.
12061	LastName *string `json:"lastName,omitempty"`
12062	// 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'
12063	State UserState `json:"state,omitempty"`
12064	// Note - Optional note about a user set by the administrator.
12065	Note *string `json:"note,omitempty"`
12066	// Identities - Collection of user identities.
12067	Identities *[]UserIdentityContract `json:"identities,omitempty"`
12068}
12069
12070// VirtualNetworkConfiguration configuration of a virtual network to which API Management service is
12071// deployed.
12072type VirtualNetworkConfiguration struct {
12073	// Vnetid - READ-ONLY; The virtual network ID. This is typically a GUID. Expect a null GUID by default.
12074	Vnetid *string `json:"vnetid,omitempty"`
12075	// Subnetname - READ-ONLY; The name of the subnet.
12076	Subnetname *string `json:"subnetname,omitempty"`
12077	// SubnetResourceID - The full resource ID of a subnet in a virtual network to deploy the API Management service in.
12078	SubnetResourceID *string `json:"subnetResourceId,omitempty"`
12079}
12080
12081// X509CertificateName properties of server X509Names.
12082type X509CertificateName struct {
12083	// Name - Common Name of the Certificate.
12084	Name *string `json:"name,omitempty"`
12085	// IssuerCertificateThumbprint - Thumbprint for the Issuer of the Certificate.
12086	IssuerCertificateThumbprint *string `json:"issuerCertificateThumbprint,omitempty"`
12087}
12088