1package cdn
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/to"
26	"github.com/Azure/go-autorest/tracing"
27	"net/http"
28)
29
30// The package's fully qualified name.
31const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/cdn/mgmt/2020-04-15/cdn"
32
33// ActionType enumerates the values for action type.
34type ActionType string
35
36const (
37	// Allow ...
38	Allow ActionType = "Allow"
39	// Block ...
40	Block ActionType = "Block"
41	// Log ...
42	Log ActionType = "Log"
43	// Redirect ...
44	Redirect ActionType = "Redirect"
45)
46
47// PossibleActionTypeValues returns an array of possible values for the ActionType const type.
48func PossibleActionTypeValues() []ActionType {
49	return []ActionType{Allow, Block, Log, Redirect}
50}
51
52// Algorithm enumerates the values for algorithm.
53type Algorithm string
54
55const (
56	// SHA256 ...
57	SHA256 Algorithm = "SHA256"
58)
59
60// PossibleAlgorithmValues returns an array of possible values for the Algorithm const type.
61func PossibleAlgorithmValues() []Algorithm {
62	return []Algorithm{SHA256}
63}
64
65// CacheBehavior enumerates the values for cache behavior.
66type CacheBehavior string
67
68const (
69	// BypassCache ...
70	BypassCache CacheBehavior = "BypassCache"
71	// Override ...
72	Override CacheBehavior = "Override"
73	// SetIfMissing ...
74	SetIfMissing CacheBehavior = "SetIfMissing"
75)
76
77// PossibleCacheBehaviorValues returns an array of possible values for the CacheBehavior const type.
78func PossibleCacheBehaviorValues() []CacheBehavior {
79	return []CacheBehavior{BypassCache, Override, SetIfMissing}
80}
81
82// CertificateSource enumerates the values for certificate source.
83type CertificateSource string
84
85const (
86	// CertificateSourceAzureKeyVault ...
87	CertificateSourceAzureKeyVault CertificateSource = "AzureKeyVault"
88	// CertificateSourceCdn ...
89	CertificateSourceCdn CertificateSource = "Cdn"
90	// CertificateSourceCustomDomainHTTPSParameters ...
91	CertificateSourceCustomDomainHTTPSParameters CertificateSource = "CustomDomainHttpsParameters"
92)
93
94// PossibleCertificateSourceValues returns an array of possible values for the CertificateSource const type.
95func PossibleCertificateSourceValues() []CertificateSource {
96	return []CertificateSource{CertificateSourceAzureKeyVault, CertificateSourceCdn, CertificateSourceCustomDomainHTTPSParameters}
97}
98
99// CertificateType enumerates the values for certificate type.
100type CertificateType string
101
102const (
103	// Dedicated ...
104	Dedicated CertificateType = "Dedicated"
105	// Shared ...
106	Shared CertificateType = "Shared"
107)
108
109// PossibleCertificateTypeValues returns an array of possible values for the CertificateType const type.
110func PossibleCertificateTypeValues() []CertificateType {
111	return []CertificateType{Dedicated, Shared}
112}
113
114// CookiesOperator enumerates the values for cookies operator.
115type CookiesOperator string
116
117const (
118	// Any ...
119	Any CookiesOperator = "Any"
120	// BeginsWith ...
121	BeginsWith CookiesOperator = "BeginsWith"
122	// Contains ...
123	Contains CookiesOperator = "Contains"
124	// EndsWith ...
125	EndsWith CookiesOperator = "EndsWith"
126	// Equal ...
127	Equal CookiesOperator = "Equal"
128	// GreaterThan ...
129	GreaterThan CookiesOperator = "GreaterThan"
130	// GreaterThanOrEqual ...
131	GreaterThanOrEqual CookiesOperator = "GreaterThanOrEqual"
132	// LessThan ...
133	LessThan CookiesOperator = "LessThan"
134	// LessThanOrEqual ...
135	LessThanOrEqual CookiesOperator = "LessThanOrEqual"
136)
137
138// PossibleCookiesOperatorValues returns an array of possible values for the CookiesOperator const type.
139func PossibleCookiesOperatorValues() []CookiesOperator {
140	return []CookiesOperator{Any, BeginsWith, Contains, EndsWith, Equal, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual}
141}
142
143// CustomDomainResourceState enumerates the values for custom domain resource state.
144type CustomDomainResourceState string
145
146const (
147	// Active ...
148	Active CustomDomainResourceState = "Active"
149	// Creating ...
150	Creating CustomDomainResourceState = "Creating"
151	// Deleting ...
152	Deleting CustomDomainResourceState = "Deleting"
153)
154
155// PossibleCustomDomainResourceStateValues returns an array of possible values for the CustomDomainResourceState const type.
156func PossibleCustomDomainResourceStateValues() []CustomDomainResourceState {
157	return []CustomDomainResourceState{Active, Creating, Deleting}
158}
159
160// CustomHTTPSProvisioningState enumerates the values for custom https provisioning state.
161type CustomHTTPSProvisioningState string
162
163const (
164	// Disabled ...
165	Disabled CustomHTTPSProvisioningState = "Disabled"
166	// Disabling ...
167	Disabling CustomHTTPSProvisioningState = "Disabling"
168	// Enabled ...
169	Enabled CustomHTTPSProvisioningState = "Enabled"
170	// Enabling ...
171	Enabling CustomHTTPSProvisioningState = "Enabling"
172	// Failed ...
173	Failed CustomHTTPSProvisioningState = "Failed"
174)
175
176// PossibleCustomHTTPSProvisioningStateValues returns an array of possible values for the CustomHTTPSProvisioningState const type.
177func PossibleCustomHTTPSProvisioningStateValues() []CustomHTTPSProvisioningState {
178	return []CustomHTTPSProvisioningState{Disabled, Disabling, Enabled, Enabling, Failed}
179}
180
181// CustomHTTPSProvisioningSubstate enumerates the values for custom https provisioning substate.
182type CustomHTTPSProvisioningSubstate string
183
184const (
185	// CertificateDeleted ...
186	CertificateDeleted CustomHTTPSProvisioningSubstate = "CertificateDeleted"
187	// CertificateDeployed ...
188	CertificateDeployed CustomHTTPSProvisioningSubstate = "CertificateDeployed"
189	// DeletingCertificate ...
190	DeletingCertificate CustomHTTPSProvisioningSubstate = "DeletingCertificate"
191	// DeployingCertificate ...
192	DeployingCertificate CustomHTTPSProvisioningSubstate = "DeployingCertificate"
193	// DomainControlValidationRequestApproved ...
194	DomainControlValidationRequestApproved CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestApproved"
195	// DomainControlValidationRequestRejected ...
196	DomainControlValidationRequestRejected CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestRejected"
197	// DomainControlValidationRequestTimedOut ...
198	DomainControlValidationRequestTimedOut CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestTimedOut"
199	// IssuingCertificate ...
200	IssuingCertificate CustomHTTPSProvisioningSubstate = "IssuingCertificate"
201	// PendingDomainControlValidationREquestApproval ...
202	PendingDomainControlValidationREquestApproval CustomHTTPSProvisioningSubstate = "PendingDomainControlValidationREquestApproval"
203	// SubmittingDomainControlValidationRequest ...
204	SubmittingDomainControlValidationRequest CustomHTTPSProvisioningSubstate = "SubmittingDomainControlValidationRequest"
205)
206
207// PossibleCustomHTTPSProvisioningSubstateValues returns an array of possible values for the CustomHTTPSProvisioningSubstate const type.
208func PossibleCustomHTTPSProvisioningSubstateValues() []CustomHTTPSProvisioningSubstate {
209	return []CustomHTTPSProvisioningSubstate{CertificateDeleted, CertificateDeployed, DeletingCertificate, DeployingCertificate, DomainControlValidationRequestApproved, DomainControlValidationRequestRejected, DomainControlValidationRequestTimedOut, IssuingCertificate, PendingDomainControlValidationREquestApproval, SubmittingDomainControlValidationRequest}
210}
211
212// CustomRuleEnabledState enumerates the values for custom rule enabled state.
213type CustomRuleEnabledState string
214
215const (
216	// CustomRuleEnabledStateDisabled ...
217	CustomRuleEnabledStateDisabled CustomRuleEnabledState = "Disabled"
218	// CustomRuleEnabledStateEnabled ...
219	CustomRuleEnabledStateEnabled CustomRuleEnabledState = "Enabled"
220)
221
222// PossibleCustomRuleEnabledStateValues returns an array of possible values for the CustomRuleEnabledState const type.
223func PossibleCustomRuleEnabledStateValues() []CustomRuleEnabledState {
224	return []CustomRuleEnabledState{CustomRuleEnabledStateDisabled, CustomRuleEnabledStateEnabled}
225}
226
227// DestinationProtocol enumerates the values for destination protocol.
228type DestinationProtocol string
229
230const (
231	// HTTP ...
232	HTTP DestinationProtocol = "Http"
233	// HTTPS ...
234	HTTPS DestinationProtocol = "Https"
235	// MatchRequest ...
236	MatchRequest DestinationProtocol = "MatchRequest"
237)
238
239// PossibleDestinationProtocolValues returns an array of possible values for the DestinationProtocol const type.
240func PossibleDestinationProtocolValues() []DestinationProtocol {
241	return []DestinationProtocol{HTTP, HTTPS, MatchRequest}
242}
243
244// EndpointResourceState enumerates the values for endpoint resource state.
245type EndpointResourceState string
246
247const (
248	// EndpointResourceStateCreating ...
249	EndpointResourceStateCreating EndpointResourceState = "Creating"
250	// EndpointResourceStateDeleting ...
251	EndpointResourceStateDeleting EndpointResourceState = "Deleting"
252	// EndpointResourceStateRunning ...
253	EndpointResourceStateRunning EndpointResourceState = "Running"
254	// EndpointResourceStateStarting ...
255	EndpointResourceStateStarting EndpointResourceState = "Starting"
256	// EndpointResourceStateStopped ...
257	EndpointResourceStateStopped EndpointResourceState = "Stopped"
258	// EndpointResourceStateStopping ...
259	EndpointResourceStateStopping EndpointResourceState = "Stopping"
260)
261
262// PossibleEndpointResourceStateValues returns an array of possible values for the EndpointResourceState const type.
263func PossibleEndpointResourceStateValues() []EndpointResourceState {
264	return []EndpointResourceState{EndpointResourceStateCreating, EndpointResourceStateDeleting, EndpointResourceStateRunning, EndpointResourceStateStarting, EndpointResourceStateStopped, EndpointResourceStateStopping}
265}
266
267// GeoFilterActions enumerates the values for geo filter actions.
268type GeoFilterActions string
269
270const (
271	// GeoFilterActionsAllow ...
272	GeoFilterActionsAllow GeoFilterActions = "Allow"
273	// GeoFilterActionsBlock ...
274	GeoFilterActionsBlock GeoFilterActions = "Block"
275)
276
277// PossibleGeoFilterActionsValues returns an array of possible values for the GeoFilterActions const type.
278func PossibleGeoFilterActionsValues() []GeoFilterActions {
279	return []GeoFilterActions{GeoFilterActionsAllow, GeoFilterActionsBlock}
280}
281
282// HeaderAction enumerates the values for header action.
283type HeaderAction string
284
285const (
286	// Append ...
287	Append HeaderAction = "Append"
288	// Delete ...
289	Delete HeaderAction = "Delete"
290	// Overwrite ...
291	Overwrite HeaderAction = "Overwrite"
292)
293
294// PossibleHeaderActionValues returns an array of possible values for the HeaderAction const type.
295func PossibleHeaderActionValues() []HeaderAction {
296	return []HeaderAction{Append, Delete, Overwrite}
297}
298
299// HealthProbeRequestType enumerates the values for health probe request type.
300type HealthProbeRequestType string
301
302const (
303	// GET ...
304	GET HealthProbeRequestType = "GET"
305	// HEAD ...
306	HEAD HealthProbeRequestType = "HEAD"
307	// NotSet ...
308	NotSet HealthProbeRequestType = "NotSet"
309)
310
311// PossibleHealthProbeRequestTypeValues returns an array of possible values for the HealthProbeRequestType const type.
312func PossibleHealthProbeRequestTypeValues() []HealthProbeRequestType {
313	return []HealthProbeRequestType{GET, HEAD, NotSet}
314}
315
316// ManagedRuleEnabledState enumerates the values for managed rule enabled state.
317type ManagedRuleEnabledState string
318
319const (
320	// ManagedRuleEnabledStateDisabled ...
321	ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled"
322	// ManagedRuleEnabledStateEnabled ...
323	ManagedRuleEnabledStateEnabled ManagedRuleEnabledState = "Enabled"
324)
325
326// PossibleManagedRuleEnabledStateValues returns an array of possible values for the ManagedRuleEnabledState const type.
327func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState {
328	return []ManagedRuleEnabledState{ManagedRuleEnabledStateDisabled, ManagedRuleEnabledStateEnabled}
329}
330
331// MatchVariable enumerates the values for match variable.
332type MatchVariable string
333
334const (
335	// Cookies ...
336	Cookies MatchVariable = "Cookies"
337	// PostArgs ...
338	PostArgs MatchVariable = "PostArgs"
339	// QueryString ...
340	QueryString MatchVariable = "QueryString"
341	// RemoteAddr ...
342	RemoteAddr MatchVariable = "RemoteAddr"
343	// RequestBody ...
344	RequestBody MatchVariable = "RequestBody"
345	// RequestHeader ...
346	RequestHeader MatchVariable = "RequestHeader"
347	// RequestMethod ...
348	RequestMethod MatchVariable = "RequestMethod"
349	// RequestURI ...
350	RequestURI MatchVariable = "RequestUri"
351	// SocketAddr ...
352	SocketAddr MatchVariable = "SocketAddr"
353)
354
355// PossibleMatchVariableValues returns an array of possible values for the MatchVariable const type.
356func PossibleMatchVariableValues() []MatchVariable {
357	return []MatchVariable{Cookies, PostArgs, QueryString, RemoteAddr, RequestBody, RequestHeader, RequestMethod, RequestURI, SocketAddr}
358}
359
360// MinimumTLSVersion enumerates the values for minimum tls version.
361type MinimumTLSVersion string
362
363const (
364	// None ...
365	None MinimumTLSVersion = "None"
366	// TLS10 ...
367	TLS10 MinimumTLSVersion = "TLS10"
368	// TLS12 ...
369	TLS12 MinimumTLSVersion = "TLS12"
370)
371
372// PossibleMinimumTLSVersionValues returns an array of possible values for the MinimumTLSVersion const type.
373func PossibleMinimumTLSVersionValues() []MinimumTLSVersion {
374	return []MinimumTLSVersion{None, TLS10, TLS12}
375}
376
377// Name enumerates the values for name.
378type Name string
379
380const (
381	// NameCookies ...
382	NameCookies Name = "Cookies"
383	// NameDeliveryRuleCondition ...
384	NameDeliveryRuleCondition Name = "DeliveryRuleCondition"
385	// NameHTTPVersion ...
386	NameHTTPVersion Name = "HttpVersion"
387	// NameIsDevice ...
388	NameIsDevice Name = "IsDevice"
389	// NamePostArgs ...
390	NamePostArgs Name = "PostArgs"
391	// NameQueryString ...
392	NameQueryString Name = "QueryString"
393	// NameRemoteAddress ...
394	NameRemoteAddress Name = "RemoteAddress"
395	// NameRequestBody ...
396	NameRequestBody Name = "RequestBody"
397	// NameRequestHeader ...
398	NameRequestHeader Name = "RequestHeader"
399	// NameRequestMethod ...
400	NameRequestMethod Name = "RequestMethod"
401	// NameRequestScheme ...
402	NameRequestScheme Name = "RequestScheme"
403	// NameRequestURI ...
404	NameRequestURI Name = "RequestUri"
405	// NameURLFileExtension ...
406	NameURLFileExtension Name = "UrlFileExtension"
407	// NameURLFileName ...
408	NameURLFileName Name = "UrlFileName"
409	// NameURLPath ...
410	NameURLPath Name = "UrlPath"
411)
412
413// PossibleNameValues returns an array of possible values for the Name const type.
414func PossibleNameValues() []Name {
415	return []Name{NameCookies, NameDeliveryRuleCondition, NameHTTPVersion, NameIsDevice, NamePostArgs, NameQueryString, NameRemoteAddress, NameRequestBody, NameRequestHeader, NameRequestMethod, NameRequestScheme, NameRequestURI, NameURLFileExtension, NameURLFileName, NameURLPath}
416}
417
418// NameBasicDeliveryRuleAction enumerates the values for name basic delivery rule action.
419type NameBasicDeliveryRuleAction string
420
421const (
422	// NameCacheExpiration ...
423	NameCacheExpiration NameBasicDeliveryRuleAction = "CacheExpiration"
424	// NameCacheKeyQueryString ...
425	NameCacheKeyQueryString NameBasicDeliveryRuleAction = "CacheKeyQueryString"
426	// NameDeliveryRuleAction ...
427	NameDeliveryRuleAction NameBasicDeliveryRuleAction = "DeliveryRuleAction"
428	// NameModifyRequestHeader ...
429	NameModifyRequestHeader NameBasicDeliveryRuleAction = "ModifyRequestHeader"
430	// NameModifyResponseHeader ...
431	NameModifyResponseHeader NameBasicDeliveryRuleAction = "ModifyResponseHeader"
432	// NameURLRedirect ...
433	NameURLRedirect NameBasicDeliveryRuleAction = "UrlRedirect"
434	// NameURLRewrite ...
435	NameURLRewrite NameBasicDeliveryRuleAction = "UrlRewrite"
436)
437
438// PossibleNameBasicDeliveryRuleActionValues returns an array of possible values for the NameBasicDeliveryRuleAction const type.
439func PossibleNameBasicDeliveryRuleActionValues() []NameBasicDeliveryRuleAction {
440	return []NameBasicDeliveryRuleAction{NameCacheExpiration, NameCacheKeyQueryString, NameDeliveryRuleAction, NameModifyRequestHeader, NameModifyResponseHeader, NameURLRedirect, NameURLRewrite}
441}
442
443// Operator enumerates the values for operator.
444type Operator string
445
446const (
447	// OperatorAny ...
448	OperatorAny Operator = "Any"
449	// OperatorBeginsWith ...
450	OperatorBeginsWith Operator = "BeginsWith"
451	// OperatorContains ...
452	OperatorContains Operator = "Contains"
453	// OperatorEndsWith ...
454	OperatorEndsWith Operator = "EndsWith"
455	// OperatorEqual ...
456	OperatorEqual Operator = "Equal"
457	// OperatorGeoMatch ...
458	OperatorGeoMatch Operator = "GeoMatch"
459	// OperatorGreaterThan ...
460	OperatorGreaterThan Operator = "GreaterThan"
461	// OperatorGreaterThanOrEqual ...
462	OperatorGreaterThanOrEqual Operator = "GreaterThanOrEqual"
463	// OperatorIPMatch ...
464	OperatorIPMatch Operator = "IPMatch"
465	// OperatorLessThan ...
466	OperatorLessThan Operator = "LessThan"
467	// OperatorLessThanOrEqual ...
468	OperatorLessThanOrEqual Operator = "LessThanOrEqual"
469	// OperatorRegEx ...
470	OperatorRegEx Operator = "RegEx"
471)
472
473// PossibleOperatorValues returns an array of possible values for the Operator const type.
474func PossibleOperatorValues() []Operator {
475	return []Operator{OperatorAny, OperatorBeginsWith, OperatorContains, OperatorEndsWith, OperatorEqual, OperatorGeoMatch, OperatorGreaterThan, OperatorGreaterThanOrEqual, OperatorIPMatch, OperatorLessThan, OperatorLessThanOrEqual, OperatorRegEx}
476}
477
478// OptimizationType enumerates the values for optimization type.
479type OptimizationType string
480
481const (
482	// DynamicSiteAcceleration ...
483	DynamicSiteAcceleration OptimizationType = "DynamicSiteAcceleration"
484	// GeneralMediaStreaming ...
485	GeneralMediaStreaming OptimizationType = "GeneralMediaStreaming"
486	// GeneralWebDelivery ...
487	GeneralWebDelivery OptimizationType = "GeneralWebDelivery"
488	// LargeFileDownload ...
489	LargeFileDownload OptimizationType = "LargeFileDownload"
490	// VideoOnDemandMediaStreaming ...
491	VideoOnDemandMediaStreaming OptimizationType = "VideoOnDemandMediaStreaming"
492)
493
494// PossibleOptimizationTypeValues returns an array of possible values for the OptimizationType const type.
495func PossibleOptimizationTypeValues() []OptimizationType {
496	return []OptimizationType{DynamicSiteAcceleration, GeneralMediaStreaming, GeneralWebDelivery, LargeFileDownload, VideoOnDemandMediaStreaming}
497}
498
499// OriginGroupResourceState enumerates the values for origin group resource state.
500type OriginGroupResourceState string
501
502const (
503	// OriginGroupResourceStateActive ...
504	OriginGroupResourceStateActive OriginGroupResourceState = "Active"
505	// OriginGroupResourceStateCreating ...
506	OriginGroupResourceStateCreating OriginGroupResourceState = "Creating"
507	// OriginGroupResourceStateDeleting ...
508	OriginGroupResourceStateDeleting OriginGroupResourceState = "Deleting"
509)
510
511// PossibleOriginGroupResourceStateValues returns an array of possible values for the OriginGroupResourceState const type.
512func PossibleOriginGroupResourceStateValues() []OriginGroupResourceState {
513	return []OriginGroupResourceState{OriginGroupResourceStateActive, OriginGroupResourceStateCreating, OriginGroupResourceStateDeleting}
514}
515
516// OriginResourceState enumerates the values for origin resource state.
517type OriginResourceState string
518
519const (
520	// OriginResourceStateActive ...
521	OriginResourceStateActive OriginResourceState = "Active"
522	// OriginResourceStateCreating ...
523	OriginResourceStateCreating OriginResourceState = "Creating"
524	// OriginResourceStateDeleting ...
525	OriginResourceStateDeleting OriginResourceState = "Deleting"
526)
527
528// PossibleOriginResourceStateValues returns an array of possible values for the OriginResourceState const type.
529func PossibleOriginResourceStateValues() []OriginResourceState {
530	return []OriginResourceState{OriginResourceStateActive, OriginResourceStateCreating, OriginResourceStateDeleting}
531}
532
533// ParamIndicator enumerates the values for param indicator.
534type ParamIndicator string
535
536const (
537	// Expires ...
538	Expires ParamIndicator = "expires"
539	// KeyID ...
540	KeyID ParamIndicator = "keyId"
541	// Signature ...
542	Signature ParamIndicator = "signature"
543)
544
545// PossibleParamIndicatorValues returns an array of possible values for the ParamIndicator const type.
546func PossibleParamIndicatorValues() []ParamIndicator {
547	return []ParamIndicator{Expires, KeyID, Signature}
548}
549
550// PolicyEnabledState enumerates the values for policy enabled state.
551type PolicyEnabledState string
552
553const (
554	// PolicyEnabledStateDisabled ...
555	PolicyEnabledStateDisabled PolicyEnabledState = "Disabled"
556	// PolicyEnabledStateEnabled ...
557	PolicyEnabledStateEnabled PolicyEnabledState = "Enabled"
558)
559
560// PossiblePolicyEnabledStateValues returns an array of possible values for the PolicyEnabledState const type.
561func PossiblePolicyEnabledStateValues() []PolicyEnabledState {
562	return []PolicyEnabledState{PolicyEnabledStateDisabled, PolicyEnabledStateEnabled}
563}
564
565// PolicyMode enumerates the values for policy mode.
566type PolicyMode string
567
568const (
569	// Detection ...
570	Detection PolicyMode = "Detection"
571	// Prevention ...
572	Prevention PolicyMode = "Prevention"
573)
574
575// PossiblePolicyModeValues returns an array of possible values for the PolicyMode const type.
576func PossiblePolicyModeValues() []PolicyMode {
577	return []PolicyMode{Detection, Prevention}
578}
579
580// PolicyResourceState enumerates the values for policy resource state.
581type PolicyResourceState string
582
583const (
584	// PolicyResourceStateCreating ...
585	PolicyResourceStateCreating PolicyResourceState = "Creating"
586	// PolicyResourceStateDeleting ...
587	PolicyResourceStateDeleting PolicyResourceState = "Deleting"
588	// PolicyResourceStateDisabled ...
589	PolicyResourceStateDisabled PolicyResourceState = "Disabled"
590	// PolicyResourceStateDisabling ...
591	PolicyResourceStateDisabling PolicyResourceState = "Disabling"
592	// PolicyResourceStateEnabled ...
593	PolicyResourceStateEnabled PolicyResourceState = "Enabled"
594	// PolicyResourceStateEnabling ...
595	PolicyResourceStateEnabling PolicyResourceState = "Enabling"
596)
597
598// PossiblePolicyResourceStateValues returns an array of possible values for the PolicyResourceState const type.
599func PossiblePolicyResourceStateValues() []PolicyResourceState {
600	return []PolicyResourceState{PolicyResourceStateCreating, PolicyResourceStateDeleting, PolicyResourceStateDisabled, PolicyResourceStateDisabling, PolicyResourceStateEnabled, PolicyResourceStateEnabling}
601}
602
603// PostArgsOperator enumerates the values for post args operator.
604type PostArgsOperator string
605
606const (
607	// PostArgsOperatorAny ...
608	PostArgsOperatorAny PostArgsOperator = "Any"
609	// PostArgsOperatorBeginsWith ...
610	PostArgsOperatorBeginsWith PostArgsOperator = "BeginsWith"
611	// PostArgsOperatorContains ...
612	PostArgsOperatorContains PostArgsOperator = "Contains"
613	// PostArgsOperatorEndsWith ...
614	PostArgsOperatorEndsWith PostArgsOperator = "EndsWith"
615	// PostArgsOperatorEqual ...
616	PostArgsOperatorEqual PostArgsOperator = "Equal"
617	// PostArgsOperatorGreaterThan ...
618	PostArgsOperatorGreaterThan PostArgsOperator = "GreaterThan"
619	// PostArgsOperatorGreaterThanOrEqual ...
620	PostArgsOperatorGreaterThanOrEqual PostArgsOperator = "GreaterThanOrEqual"
621	// PostArgsOperatorLessThan ...
622	PostArgsOperatorLessThan PostArgsOperator = "LessThan"
623	// PostArgsOperatorLessThanOrEqual ...
624	PostArgsOperatorLessThanOrEqual PostArgsOperator = "LessThanOrEqual"
625)
626
627// PossiblePostArgsOperatorValues returns an array of possible values for the PostArgsOperator const type.
628func PossiblePostArgsOperatorValues() []PostArgsOperator {
629	return []PostArgsOperator{PostArgsOperatorAny, PostArgsOperatorBeginsWith, PostArgsOperatorContains, PostArgsOperatorEndsWith, PostArgsOperatorEqual, PostArgsOperatorGreaterThan, PostArgsOperatorGreaterThanOrEqual, PostArgsOperatorLessThan, PostArgsOperatorLessThanOrEqual}
630}
631
632// PrivateEndpointStatus enumerates the values for private endpoint status.
633type PrivateEndpointStatus string
634
635const (
636	// Approved ...
637	Approved PrivateEndpointStatus = "Approved"
638	// Disconnected ...
639	Disconnected PrivateEndpointStatus = "Disconnected"
640	// Pending ...
641	Pending PrivateEndpointStatus = "Pending"
642	// Rejected ...
643	Rejected PrivateEndpointStatus = "Rejected"
644	// Timeout ...
645	Timeout PrivateEndpointStatus = "Timeout"
646)
647
648// PossiblePrivateEndpointStatusValues returns an array of possible values for the PrivateEndpointStatus const type.
649func PossiblePrivateEndpointStatusValues() []PrivateEndpointStatus {
650	return []PrivateEndpointStatus{Approved, Disconnected, Pending, Rejected, Timeout}
651}
652
653// ProbeProtocol enumerates the values for probe protocol.
654type ProbeProtocol string
655
656const (
657	// ProbeProtocolHTTP ...
658	ProbeProtocolHTTP ProbeProtocol = "Http"
659	// ProbeProtocolHTTPS ...
660	ProbeProtocolHTTPS ProbeProtocol = "Https"
661	// ProbeProtocolNotSet ...
662	ProbeProtocolNotSet ProbeProtocol = "NotSet"
663)
664
665// PossibleProbeProtocolValues returns an array of possible values for the ProbeProtocol const type.
666func PossibleProbeProtocolValues() []ProbeProtocol {
667	return []ProbeProtocol{ProbeProtocolHTTP, ProbeProtocolHTTPS, ProbeProtocolNotSet}
668}
669
670// ProfileResourceState enumerates the values for profile resource state.
671type ProfileResourceState string
672
673const (
674	// ProfileResourceStateActive ...
675	ProfileResourceStateActive ProfileResourceState = "Active"
676	// ProfileResourceStateCreating ...
677	ProfileResourceStateCreating ProfileResourceState = "Creating"
678	// ProfileResourceStateDeleting ...
679	ProfileResourceStateDeleting ProfileResourceState = "Deleting"
680	// ProfileResourceStateDisabled ...
681	ProfileResourceStateDisabled ProfileResourceState = "Disabled"
682)
683
684// PossibleProfileResourceStateValues returns an array of possible values for the ProfileResourceState const type.
685func PossibleProfileResourceStateValues() []ProfileResourceState {
686	return []ProfileResourceState{ProfileResourceStateActive, ProfileResourceStateCreating, ProfileResourceStateDeleting, ProfileResourceStateDisabled}
687}
688
689// ProtocolType enumerates the values for protocol type.
690type ProtocolType string
691
692const (
693	// IPBased ...
694	IPBased ProtocolType = "IPBased"
695	// ServerNameIndication ...
696	ServerNameIndication ProtocolType = "ServerNameIndication"
697)
698
699// PossibleProtocolTypeValues returns an array of possible values for the ProtocolType const type.
700func PossibleProtocolTypeValues() []ProtocolType {
701	return []ProtocolType{IPBased, ServerNameIndication}
702}
703
704// ProvisioningState enumerates the values for provisioning state.
705type ProvisioningState string
706
707const (
708	// ProvisioningStateCreating ...
709	ProvisioningStateCreating ProvisioningState = "Creating"
710	// ProvisioningStateFailed ...
711	ProvisioningStateFailed ProvisioningState = "Failed"
712	// ProvisioningStateSucceeded ...
713	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
714)
715
716// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
717func PossibleProvisioningStateValues() []ProvisioningState {
718	return []ProvisioningState{ProvisioningStateCreating, ProvisioningStateFailed, ProvisioningStateSucceeded}
719}
720
721// QueryStringBehavior enumerates the values for query string behavior.
722type QueryStringBehavior string
723
724const (
725	// Exclude ...
726	Exclude QueryStringBehavior = "Exclude"
727	// ExcludeAll ...
728	ExcludeAll QueryStringBehavior = "ExcludeAll"
729	// Include ...
730	Include QueryStringBehavior = "Include"
731	// IncludeAll ...
732	IncludeAll QueryStringBehavior = "IncludeAll"
733)
734
735// PossibleQueryStringBehaviorValues returns an array of possible values for the QueryStringBehavior const type.
736func PossibleQueryStringBehaviorValues() []QueryStringBehavior {
737	return []QueryStringBehavior{Exclude, ExcludeAll, Include, IncludeAll}
738}
739
740// QueryStringCachingBehavior enumerates the values for query string caching behavior.
741type QueryStringCachingBehavior string
742
743const (
744	// QueryStringCachingBehaviorBypassCaching ...
745	QueryStringCachingBehaviorBypassCaching QueryStringCachingBehavior = "BypassCaching"
746	// QueryStringCachingBehaviorIgnoreQueryString ...
747	QueryStringCachingBehaviorIgnoreQueryString QueryStringCachingBehavior = "IgnoreQueryString"
748	// QueryStringCachingBehaviorNotSet ...
749	QueryStringCachingBehaviorNotSet QueryStringCachingBehavior = "NotSet"
750	// QueryStringCachingBehaviorUseQueryString ...
751	QueryStringCachingBehaviorUseQueryString QueryStringCachingBehavior = "UseQueryString"
752)
753
754// PossibleQueryStringCachingBehaviorValues returns an array of possible values for the QueryStringCachingBehavior const type.
755func PossibleQueryStringCachingBehaviorValues() []QueryStringCachingBehavior {
756	return []QueryStringCachingBehavior{QueryStringCachingBehaviorBypassCaching, QueryStringCachingBehaviorIgnoreQueryString, QueryStringCachingBehaviorNotSet, QueryStringCachingBehaviorUseQueryString}
757}
758
759// QueryStringOperator enumerates the values for query string operator.
760type QueryStringOperator string
761
762const (
763	// QueryStringOperatorAny ...
764	QueryStringOperatorAny QueryStringOperator = "Any"
765	// QueryStringOperatorBeginsWith ...
766	QueryStringOperatorBeginsWith QueryStringOperator = "BeginsWith"
767	// QueryStringOperatorContains ...
768	QueryStringOperatorContains QueryStringOperator = "Contains"
769	// QueryStringOperatorEndsWith ...
770	QueryStringOperatorEndsWith QueryStringOperator = "EndsWith"
771	// QueryStringOperatorEqual ...
772	QueryStringOperatorEqual QueryStringOperator = "Equal"
773	// QueryStringOperatorGreaterThan ...
774	QueryStringOperatorGreaterThan QueryStringOperator = "GreaterThan"
775	// QueryStringOperatorGreaterThanOrEqual ...
776	QueryStringOperatorGreaterThanOrEqual QueryStringOperator = "GreaterThanOrEqual"
777	// QueryStringOperatorLessThan ...
778	QueryStringOperatorLessThan QueryStringOperator = "LessThan"
779	// QueryStringOperatorLessThanOrEqual ...
780	QueryStringOperatorLessThanOrEqual QueryStringOperator = "LessThanOrEqual"
781)
782
783// PossibleQueryStringOperatorValues returns an array of possible values for the QueryStringOperator const type.
784func PossibleQueryStringOperatorValues() []QueryStringOperator {
785	return []QueryStringOperator{QueryStringOperatorAny, QueryStringOperatorBeginsWith, QueryStringOperatorContains, QueryStringOperatorEndsWith, QueryStringOperatorEqual, QueryStringOperatorGreaterThan, QueryStringOperatorGreaterThanOrEqual, QueryStringOperatorLessThan, QueryStringOperatorLessThanOrEqual}
786}
787
788// RedirectType enumerates the values for redirect type.
789type RedirectType string
790
791const (
792	// Found ...
793	Found RedirectType = "Found"
794	// Moved ...
795	Moved RedirectType = "Moved"
796	// PermanentRedirect ...
797	PermanentRedirect RedirectType = "PermanentRedirect"
798	// TemporaryRedirect ...
799	TemporaryRedirect RedirectType = "TemporaryRedirect"
800)
801
802// PossibleRedirectTypeValues returns an array of possible values for the RedirectType const type.
803func PossibleRedirectTypeValues() []RedirectType {
804	return []RedirectType{Found, Moved, PermanentRedirect, TemporaryRedirect}
805}
806
807// RemoteAddressOperator enumerates the values for remote address operator.
808type RemoteAddressOperator string
809
810const (
811	// RemoteAddressOperatorAny ...
812	RemoteAddressOperatorAny RemoteAddressOperator = "Any"
813	// RemoteAddressOperatorGeoMatch ...
814	RemoteAddressOperatorGeoMatch RemoteAddressOperator = "GeoMatch"
815	// RemoteAddressOperatorIPMatch ...
816	RemoteAddressOperatorIPMatch RemoteAddressOperator = "IPMatch"
817)
818
819// PossibleRemoteAddressOperatorValues returns an array of possible values for the RemoteAddressOperator const type.
820func PossibleRemoteAddressOperatorValues() []RemoteAddressOperator {
821	return []RemoteAddressOperator{RemoteAddressOperatorAny, RemoteAddressOperatorGeoMatch, RemoteAddressOperatorIPMatch}
822}
823
824// RequestBodyOperator enumerates the values for request body operator.
825type RequestBodyOperator string
826
827const (
828	// RequestBodyOperatorAny ...
829	RequestBodyOperatorAny RequestBodyOperator = "Any"
830	// RequestBodyOperatorBeginsWith ...
831	RequestBodyOperatorBeginsWith RequestBodyOperator = "BeginsWith"
832	// RequestBodyOperatorContains ...
833	RequestBodyOperatorContains RequestBodyOperator = "Contains"
834	// RequestBodyOperatorEndsWith ...
835	RequestBodyOperatorEndsWith RequestBodyOperator = "EndsWith"
836	// RequestBodyOperatorEqual ...
837	RequestBodyOperatorEqual RequestBodyOperator = "Equal"
838	// RequestBodyOperatorGreaterThan ...
839	RequestBodyOperatorGreaterThan RequestBodyOperator = "GreaterThan"
840	// RequestBodyOperatorGreaterThanOrEqual ...
841	RequestBodyOperatorGreaterThanOrEqual RequestBodyOperator = "GreaterThanOrEqual"
842	// RequestBodyOperatorLessThan ...
843	RequestBodyOperatorLessThan RequestBodyOperator = "LessThan"
844	// RequestBodyOperatorLessThanOrEqual ...
845	RequestBodyOperatorLessThanOrEqual RequestBodyOperator = "LessThanOrEqual"
846)
847
848// PossibleRequestBodyOperatorValues returns an array of possible values for the RequestBodyOperator const type.
849func PossibleRequestBodyOperatorValues() []RequestBodyOperator {
850	return []RequestBodyOperator{RequestBodyOperatorAny, RequestBodyOperatorBeginsWith, RequestBodyOperatorContains, RequestBodyOperatorEndsWith, RequestBodyOperatorEqual, RequestBodyOperatorGreaterThan, RequestBodyOperatorGreaterThanOrEqual, RequestBodyOperatorLessThan, RequestBodyOperatorLessThanOrEqual}
851}
852
853// RequestHeaderOperator enumerates the values for request header operator.
854type RequestHeaderOperator string
855
856const (
857	// RequestHeaderOperatorAny ...
858	RequestHeaderOperatorAny RequestHeaderOperator = "Any"
859	// RequestHeaderOperatorBeginsWith ...
860	RequestHeaderOperatorBeginsWith RequestHeaderOperator = "BeginsWith"
861	// RequestHeaderOperatorContains ...
862	RequestHeaderOperatorContains RequestHeaderOperator = "Contains"
863	// RequestHeaderOperatorEndsWith ...
864	RequestHeaderOperatorEndsWith RequestHeaderOperator = "EndsWith"
865	// RequestHeaderOperatorEqual ...
866	RequestHeaderOperatorEqual RequestHeaderOperator = "Equal"
867	// RequestHeaderOperatorGreaterThan ...
868	RequestHeaderOperatorGreaterThan RequestHeaderOperator = "GreaterThan"
869	// RequestHeaderOperatorGreaterThanOrEqual ...
870	RequestHeaderOperatorGreaterThanOrEqual RequestHeaderOperator = "GreaterThanOrEqual"
871	// RequestHeaderOperatorLessThan ...
872	RequestHeaderOperatorLessThan RequestHeaderOperator = "LessThan"
873	// RequestHeaderOperatorLessThanOrEqual ...
874	RequestHeaderOperatorLessThanOrEqual RequestHeaderOperator = "LessThanOrEqual"
875)
876
877// PossibleRequestHeaderOperatorValues returns an array of possible values for the RequestHeaderOperator const type.
878func PossibleRequestHeaderOperatorValues() []RequestHeaderOperator {
879	return []RequestHeaderOperator{RequestHeaderOperatorAny, RequestHeaderOperatorBeginsWith, RequestHeaderOperatorContains, RequestHeaderOperatorEndsWith, RequestHeaderOperatorEqual, RequestHeaderOperatorGreaterThan, RequestHeaderOperatorGreaterThanOrEqual, RequestHeaderOperatorLessThan, RequestHeaderOperatorLessThanOrEqual}
880}
881
882// RequestURIOperator enumerates the values for request uri operator.
883type RequestURIOperator string
884
885const (
886	// RequestURIOperatorAny ...
887	RequestURIOperatorAny RequestURIOperator = "Any"
888	// RequestURIOperatorBeginsWith ...
889	RequestURIOperatorBeginsWith RequestURIOperator = "BeginsWith"
890	// RequestURIOperatorContains ...
891	RequestURIOperatorContains RequestURIOperator = "Contains"
892	// RequestURIOperatorEndsWith ...
893	RequestURIOperatorEndsWith RequestURIOperator = "EndsWith"
894	// RequestURIOperatorEqual ...
895	RequestURIOperatorEqual RequestURIOperator = "Equal"
896	// RequestURIOperatorGreaterThan ...
897	RequestURIOperatorGreaterThan RequestURIOperator = "GreaterThan"
898	// RequestURIOperatorGreaterThanOrEqual ...
899	RequestURIOperatorGreaterThanOrEqual RequestURIOperator = "GreaterThanOrEqual"
900	// RequestURIOperatorLessThan ...
901	RequestURIOperatorLessThan RequestURIOperator = "LessThan"
902	// RequestURIOperatorLessThanOrEqual ...
903	RequestURIOperatorLessThanOrEqual RequestURIOperator = "LessThanOrEqual"
904)
905
906// PossibleRequestURIOperatorValues returns an array of possible values for the RequestURIOperator const type.
907func PossibleRequestURIOperatorValues() []RequestURIOperator {
908	return []RequestURIOperator{RequestURIOperatorAny, RequestURIOperatorBeginsWith, RequestURIOperatorContains, RequestURIOperatorEndsWith, RequestURIOperatorEqual, RequestURIOperatorGreaterThan, RequestURIOperatorGreaterThanOrEqual, RequestURIOperatorLessThan, RequestURIOperatorLessThanOrEqual}
909}
910
911// ResourceType enumerates the values for resource type.
912type ResourceType string
913
914const (
915	// MicrosoftCdnProfilesEndpoints ...
916	MicrosoftCdnProfilesEndpoints ResourceType = "Microsoft.Cdn/Profiles/Endpoints"
917)
918
919// PossibleResourceTypeValues returns an array of possible values for the ResourceType const type.
920func PossibleResourceTypeValues() []ResourceType {
921	return []ResourceType{MicrosoftCdnProfilesEndpoints}
922}
923
924// ResponseBasedDetectedErrorTypes enumerates the values for response based detected error types.
925type ResponseBasedDetectedErrorTypes string
926
927const (
928	// ResponseBasedDetectedErrorTypesNone ...
929	ResponseBasedDetectedErrorTypesNone ResponseBasedDetectedErrorTypes = "None"
930	// ResponseBasedDetectedErrorTypesTCPAndHTTPErrors ...
931	ResponseBasedDetectedErrorTypesTCPAndHTTPErrors ResponseBasedDetectedErrorTypes = "TcpAndHttpErrors"
932	// ResponseBasedDetectedErrorTypesTCPErrorsOnly ...
933	ResponseBasedDetectedErrorTypesTCPErrorsOnly ResponseBasedDetectedErrorTypes = "TcpErrorsOnly"
934)
935
936// PossibleResponseBasedDetectedErrorTypesValues returns an array of possible values for the ResponseBasedDetectedErrorTypes const type.
937func PossibleResponseBasedDetectedErrorTypesValues() []ResponseBasedDetectedErrorTypes {
938	return []ResponseBasedDetectedErrorTypes{ResponseBasedDetectedErrorTypesNone, ResponseBasedDetectedErrorTypesTCPAndHTTPErrors, ResponseBasedDetectedErrorTypesTCPErrorsOnly}
939}
940
941// SkuName enumerates the values for sku name.
942type SkuName string
943
944const (
945	// CustomVerizon ...
946	CustomVerizon SkuName = "Custom_Verizon"
947	// PremiumChinaCdn ...
948	PremiumChinaCdn SkuName = "Premium_ChinaCdn"
949	// PremiumVerizon ...
950	PremiumVerizon SkuName = "Premium_Verizon"
951	// StandardAkamai ...
952	StandardAkamai SkuName = "Standard_Akamai"
953	// StandardChinaCdn ...
954	StandardChinaCdn SkuName = "Standard_ChinaCdn"
955	// StandardMicrosoft ...
956	StandardMicrosoft SkuName = "Standard_Microsoft"
957	// StandardVerizon ...
958	StandardVerizon SkuName = "Standard_Verizon"
959)
960
961// PossibleSkuNameValues returns an array of possible values for the SkuName const type.
962func PossibleSkuNameValues() []SkuName {
963	return []SkuName{CustomVerizon, PremiumChinaCdn, PremiumVerizon, StandardAkamai, StandardChinaCdn, StandardMicrosoft, StandardVerizon}
964}
965
966// Transform enumerates the values for transform.
967type Transform string
968
969const (
970	// Lowercase ...
971	Lowercase Transform = "Lowercase"
972	// Uppercase ...
973	Uppercase Transform = "Uppercase"
974)
975
976// PossibleTransformValues returns an array of possible values for the Transform const type.
977func PossibleTransformValues() []Transform {
978	return []Transform{Lowercase, Uppercase}
979}
980
981// TransformType enumerates the values for transform type.
982type TransformType string
983
984const (
985	// TransformTypeLowercase ...
986	TransformTypeLowercase TransformType = "Lowercase"
987	// TransformTypeRemoveNulls ...
988	TransformTypeRemoveNulls TransformType = "RemoveNulls"
989	// TransformTypeTrim ...
990	TransformTypeTrim TransformType = "Trim"
991	// TransformTypeUppercase ...
992	TransformTypeUppercase TransformType = "Uppercase"
993	// TransformTypeURLDecode ...
994	TransformTypeURLDecode TransformType = "UrlDecode"
995	// TransformTypeURLEncode ...
996	TransformTypeURLEncode TransformType = "UrlEncode"
997)
998
999// PossibleTransformTypeValues returns an array of possible values for the TransformType const type.
1000func PossibleTransformTypeValues() []TransformType {
1001	return []TransformType{TransformTypeLowercase, TransformTypeRemoveNulls, TransformTypeTrim, TransformTypeUppercase, TransformTypeURLDecode, TransformTypeURLEncode}
1002}
1003
1004// URLFileExtensionOperator enumerates the values for url file extension operator.
1005type URLFileExtensionOperator string
1006
1007const (
1008	// URLFileExtensionOperatorAny ...
1009	URLFileExtensionOperatorAny URLFileExtensionOperator = "Any"
1010	// URLFileExtensionOperatorBeginsWith ...
1011	URLFileExtensionOperatorBeginsWith URLFileExtensionOperator = "BeginsWith"
1012	// URLFileExtensionOperatorContains ...
1013	URLFileExtensionOperatorContains URLFileExtensionOperator = "Contains"
1014	// URLFileExtensionOperatorEndsWith ...
1015	URLFileExtensionOperatorEndsWith URLFileExtensionOperator = "EndsWith"
1016	// URLFileExtensionOperatorEqual ...
1017	URLFileExtensionOperatorEqual URLFileExtensionOperator = "Equal"
1018	// URLFileExtensionOperatorGreaterThan ...
1019	URLFileExtensionOperatorGreaterThan URLFileExtensionOperator = "GreaterThan"
1020	// URLFileExtensionOperatorGreaterThanOrEqual ...
1021	URLFileExtensionOperatorGreaterThanOrEqual URLFileExtensionOperator = "GreaterThanOrEqual"
1022	// URLFileExtensionOperatorLessThan ...
1023	URLFileExtensionOperatorLessThan URLFileExtensionOperator = "LessThan"
1024	// URLFileExtensionOperatorLessThanOrEqual ...
1025	URLFileExtensionOperatorLessThanOrEqual URLFileExtensionOperator = "LessThanOrEqual"
1026)
1027
1028// PossibleURLFileExtensionOperatorValues returns an array of possible values for the URLFileExtensionOperator const type.
1029func PossibleURLFileExtensionOperatorValues() []URLFileExtensionOperator {
1030	return []URLFileExtensionOperator{URLFileExtensionOperatorAny, URLFileExtensionOperatorBeginsWith, URLFileExtensionOperatorContains, URLFileExtensionOperatorEndsWith, URLFileExtensionOperatorEqual, URLFileExtensionOperatorGreaterThan, URLFileExtensionOperatorGreaterThanOrEqual, URLFileExtensionOperatorLessThan, URLFileExtensionOperatorLessThanOrEqual}
1031}
1032
1033// URLFileNameOperator enumerates the values for url file name operator.
1034type URLFileNameOperator string
1035
1036const (
1037	// URLFileNameOperatorAny ...
1038	URLFileNameOperatorAny URLFileNameOperator = "Any"
1039	// URLFileNameOperatorBeginsWith ...
1040	URLFileNameOperatorBeginsWith URLFileNameOperator = "BeginsWith"
1041	// URLFileNameOperatorContains ...
1042	URLFileNameOperatorContains URLFileNameOperator = "Contains"
1043	// URLFileNameOperatorEndsWith ...
1044	URLFileNameOperatorEndsWith URLFileNameOperator = "EndsWith"
1045	// URLFileNameOperatorEqual ...
1046	URLFileNameOperatorEqual URLFileNameOperator = "Equal"
1047	// URLFileNameOperatorGreaterThan ...
1048	URLFileNameOperatorGreaterThan URLFileNameOperator = "GreaterThan"
1049	// URLFileNameOperatorGreaterThanOrEqual ...
1050	URLFileNameOperatorGreaterThanOrEqual URLFileNameOperator = "GreaterThanOrEqual"
1051	// URLFileNameOperatorLessThan ...
1052	URLFileNameOperatorLessThan URLFileNameOperator = "LessThan"
1053	// URLFileNameOperatorLessThanOrEqual ...
1054	URLFileNameOperatorLessThanOrEqual URLFileNameOperator = "LessThanOrEqual"
1055)
1056
1057// PossibleURLFileNameOperatorValues returns an array of possible values for the URLFileNameOperator const type.
1058func PossibleURLFileNameOperatorValues() []URLFileNameOperator {
1059	return []URLFileNameOperator{URLFileNameOperatorAny, URLFileNameOperatorBeginsWith, URLFileNameOperatorContains, URLFileNameOperatorEndsWith, URLFileNameOperatorEqual, URLFileNameOperatorGreaterThan, URLFileNameOperatorGreaterThanOrEqual, URLFileNameOperatorLessThan, URLFileNameOperatorLessThanOrEqual}
1060}
1061
1062// URLPathOperator enumerates the values for url path operator.
1063type URLPathOperator string
1064
1065const (
1066	// URLPathOperatorAny ...
1067	URLPathOperatorAny URLPathOperator = "Any"
1068	// URLPathOperatorBeginsWith ...
1069	URLPathOperatorBeginsWith URLPathOperator = "BeginsWith"
1070	// URLPathOperatorContains ...
1071	URLPathOperatorContains URLPathOperator = "Contains"
1072	// URLPathOperatorEndsWith ...
1073	URLPathOperatorEndsWith URLPathOperator = "EndsWith"
1074	// URLPathOperatorEqual ...
1075	URLPathOperatorEqual URLPathOperator = "Equal"
1076	// URLPathOperatorGreaterThan ...
1077	URLPathOperatorGreaterThan URLPathOperator = "GreaterThan"
1078	// URLPathOperatorGreaterThanOrEqual ...
1079	URLPathOperatorGreaterThanOrEqual URLPathOperator = "GreaterThanOrEqual"
1080	// URLPathOperatorLessThan ...
1081	URLPathOperatorLessThan URLPathOperator = "LessThan"
1082	// URLPathOperatorLessThanOrEqual ...
1083	URLPathOperatorLessThanOrEqual URLPathOperator = "LessThanOrEqual"
1084	// URLPathOperatorWildcard ...
1085	URLPathOperatorWildcard URLPathOperator = "Wildcard"
1086)
1087
1088// PossibleURLPathOperatorValues returns an array of possible values for the URLPathOperator const type.
1089func PossibleURLPathOperatorValues() []URLPathOperator {
1090	return []URLPathOperator{URLPathOperatorAny, URLPathOperatorBeginsWith, URLPathOperatorContains, URLPathOperatorEndsWith, URLPathOperatorEqual, URLPathOperatorGreaterThan, URLPathOperatorGreaterThanOrEqual, URLPathOperatorLessThan, URLPathOperatorLessThanOrEqual, URLPathOperatorWildcard}
1091}
1092
1093// CacheExpirationActionParameters defines the parameters for the cache expiration action.
1094type CacheExpirationActionParameters struct {
1095	OdataType *string `json:"@odata.type,omitempty"`
1096	// CacheBehavior - Caching behavior for the requests. Possible values include: 'BypassCache', 'Override', 'SetIfMissing'
1097	CacheBehavior CacheBehavior `json:"cacheBehavior,omitempty"`
1098	// CacheType - The level at which the content needs to be cached.
1099	CacheType *string `json:"cacheType,omitempty"`
1100	// CacheDuration - The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss
1101	CacheDuration *string `json:"cacheDuration,omitempty"`
1102}
1103
1104// CacheKeyQueryStringActionParameters defines the parameters for the cache-key query string action.
1105type CacheKeyQueryStringActionParameters struct {
1106	OdataType *string `json:"@odata.type,omitempty"`
1107	// QueryStringBehavior - Caching behavior for the requests. Possible values include: 'Include', 'IncludeAll', 'Exclude', 'ExcludeAll'
1108	QueryStringBehavior QueryStringBehavior `json:"queryStringBehavior,omitempty"`
1109	// QueryParameters - query parameters to include or exclude (comma separated).
1110	QueryParameters *string `json:"queryParameters,omitempty"`
1111}
1112
1113// CertificateSourceParameters defines the parameters for using CDN managed certificate for securing custom
1114// domain.
1115type CertificateSourceParameters struct {
1116	OdataType *string `json:"@odata.type,omitempty"`
1117	// CertificateType - Type of certificate used. Possible values include: 'Shared', 'Dedicated'
1118	CertificateType CertificateType `json:"certificateType,omitempty"`
1119}
1120
1121// CheckNameAvailabilityInput input of CheckNameAvailability API.
1122type CheckNameAvailabilityInput struct {
1123	// Name - The resource name to validate.
1124	Name *string `json:"name,omitempty"`
1125	// Type - The type of the resource whose name is to be validated.
1126	Type *string `json:"type,omitempty"`
1127}
1128
1129// CheckNameAvailabilityOutput output of check name availability API.
1130type CheckNameAvailabilityOutput struct {
1131	autorest.Response `json:"-"`
1132	// NameAvailable - READ-ONLY; Indicates whether the name is available.
1133	NameAvailable *bool `json:"nameAvailable,omitempty"`
1134	// Reason - READ-ONLY; The reason why the name is not available.
1135	Reason *string `json:"reason,omitempty"`
1136	// Message - READ-ONLY; The detailed error message describing why the name is not available.
1137	Message *string `json:"message,omitempty"`
1138}
1139
1140// CidrIPAddress CIDR Ip address
1141type CidrIPAddress struct {
1142	// BaseIPAddress - Ip address itself.
1143	BaseIPAddress *string `json:"baseIpAddress,omitempty"`
1144	// PrefixLength - The length of the prefix of the ip address.
1145	PrefixLength *int32 `json:"prefixLength,omitempty"`
1146}
1147
1148// CookiesMatchConditionParameters defines the parameters for Cookies match conditions
1149type CookiesMatchConditionParameters struct {
1150	OdataType *string `json:"@odata.type,omitempty"`
1151	// Selector - Name of Cookies to be matched
1152	Selector *string `json:"selector,omitempty"`
1153	// Operator - Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual'
1154	Operator CookiesOperator `json:"operator,omitempty"`
1155	// NegateCondition - Describes if this is negate condition or not
1156	NegateCondition *bool `json:"negateCondition,omitempty"`
1157	// MatchValues - The match value for the condition of the delivery rule
1158	MatchValues *[]string `json:"matchValues,omitempty"`
1159	// Transforms - List of transforms
1160	Transforms *[]Transform `json:"transforms,omitempty"`
1161}
1162
1163// CustomDomain friendly domain name mapping to the endpoint hostname that the customer provides for
1164// branding purposes, e.g. www.contoso.com.
1165type CustomDomain struct {
1166	autorest.Response       `json:"-"`
1167	*CustomDomainProperties `json:"properties,omitempty"`
1168	// ID - READ-ONLY; Resource ID.
1169	ID *string `json:"id,omitempty"`
1170	// Name - READ-ONLY; Resource name.
1171	Name *string `json:"name,omitempty"`
1172	// Type - READ-ONLY; Resource type.
1173	Type *string `json:"type,omitempty"`
1174}
1175
1176// MarshalJSON is the custom marshaler for CustomDomain.
1177func (cd CustomDomain) MarshalJSON() ([]byte, error) {
1178	objectMap := make(map[string]interface{})
1179	if cd.CustomDomainProperties != nil {
1180		objectMap["properties"] = cd.CustomDomainProperties
1181	}
1182	return json.Marshal(objectMap)
1183}
1184
1185// UnmarshalJSON is the custom unmarshaler for CustomDomain struct.
1186func (cd *CustomDomain) UnmarshalJSON(body []byte) error {
1187	var m map[string]*json.RawMessage
1188	err := json.Unmarshal(body, &m)
1189	if err != nil {
1190		return err
1191	}
1192	for k, v := range m {
1193		switch k {
1194		case "properties":
1195			if v != nil {
1196				var customDomainProperties CustomDomainProperties
1197				err = json.Unmarshal(*v, &customDomainProperties)
1198				if err != nil {
1199					return err
1200				}
1201				cd.CustomDomainProperties = &customDomainProperties
1202			}
1203		case "id":
1204			if v != nil {
1205				var ID string
1206				err = json.Unmarshal(*v, &ID)
1207				if err != nil {
1208					return err
1209				}
1210				cd.ID = &ID
1211			}
1212		case "name":
1213			if v != nil {
1214				var name string
1215				err = json.Unmarshal(*v, &name)
1216				if err != nil {
1217					return err
1218				}
1219				cd.Name = &name
1220			}
1221		case "type":
1222			if v != nil {
1223				var typeVar string
1224				err = json.Unmarshal(*v, &typeVar)
1225				if err != nil {
1226					return err
1227				}
1228				cd.Type = &typeVar
1229			}
1230		}
1231	}
1232
1233	return nil
1234}
1235
1236// BasicCustomDomainHTTPSParameters the JSON object that contains the properties to secure a custom domain.
1237type BasicCustomDomainHTTPSParameters interface {
1238	AsManagedHTTPSParameters() (*ManagedHTTPSParameters, bool)
1239	AsUserManagedHTTPSParameters() (*UserManagedHTTPSParameters, bool)
1240	AsCustomDomainHTTPSParameters() (*CustomDomainHTTPSParameters, bool)
1241}
1242
1243// CustomDomainHTTPSParameters the JSON object that contains the properties to secure a custom domain.
1244type CustomDomainHTTPSParameters struct {
1245	// ProtocolType - Defines the TLS extension protocol that is used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased'
1246	ProtocolType ProtocolType `json:"protocolType,omitempty"`
1247	// MinimumTLSVersion - TLS protocol version that will be used for Https. Possible values include: 'None', 'TLS10', 'TLS12'
1248	MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"`
1249	// CertificateSource - Possible values include: 'CertificateSourceCustomDomainHTTPSParameters', 'CertificateSourceCdn', 'CertificateSourceAzureKeyVault'
1250	CertificateSource CertificateSource `json:"certificateSource,omitempty"`
1251}
1252
1253func unmarshalBasicCustomDomainHTTPSParameters(body []byte) (BasicCustomDomainHTTPSParameters, error) {
1254	var m map[string]interface{}
1255	err := json.Unmarshal(body, &m)
1256	if err != nil {
1257		return nil, err
1258	}
1259
1260	switch m["certificateSource"] {
1261	case string(CertificateSourceCdn):
1262		var mhp ManagedHTTPSParameters
1263		err := json.Unmarshal(body, &mhp)
1264		return mhp, err
1265	case string(CertificateSourceAzureKeyVault):
1266		var umhp UserManagedHTTPSParameters
1267		err := json.Unmarshal(body, &umhp)
1268		return umhp, err
1269	default:
1270		var cdhp CustomDomainHTTPSParameters
1271		err := json.Unmarshal(body, &cdhp)
1272		return cdhp, err
1273	}
1274}
1275func unmarshalBasicCustomDomainHTTPSParametersArray(body []byte) ([]BasicCustomDomainHTTPSParameters, error) {
1276	var rawMessages []*json.RawMessage
1277	err := json.Unmarshal(body, &rawMessages)
1278	if err != nil {
1279		return nil, err
1280	}
1281
1282	cdhpArray := make([]BasicCustomDomainHTTPSParameters, len(rawMessages))
1283
1284	for index, rawMessage := range rawMessages {
1285		cdhp, err := unmarshalBasicCustomDomainHTTPSParameters(*rawMessage)
1286		if err != nil {
1287			return nil, err
1288		}
1289		cdhpArray[index] = cdhp
1290	}
1291	return cdhpArray, nil
1292}
1293
1294// MarshalJSON is the custom marshaler for CustomDomainHTTPSParameters.
1295func (cdhp CustomDomainHTTPSParameters) MarshalJSON() ([]byte, error) {
1296	cdhp.CertificateSource = CertificateSourceCustomDomainHTTPSParameters
1297	objectMap := make(map[string]interface{})
1298	if cdhp.ProtocolType != "" {
1299		objectMap["protocolType"] = cdhp.ProtocolType
1300	}
1301	if cdhp.MinimumTLSVersion != "" {
1302		objectMap["minimumTlsVersion"] = cdhp.MinimumTLSVersion
1303	}
1304	if cdhp.CertificateSource != "" {
1305		objectMap["certificateSource"] = cdhp.CertificateSource
1306	}
1307	return json.Marshal(objectMap)
1308}
1309
1310// AsManagedHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for CustomDomainHTTPSParameters.
1311func (cdhp CustomDomainHTTPSParameters) AsManagedHTTPSParameters() (*ManagedHTTPSParameters, bool) {
1312	return nil, false
1313}
1314
1315// AsUserManagedHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for CustomDomainHTTPSParameters.
1316func (cdhp CustomDomainHTTPSParameters) AsUserManagedHTTPSParameters() (*UserManagedHTTPSParameters, bool) {
1317	return nil, false
1318}
1319
1320// AsCustomDomainHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for CustomDomainHTTPSParameters.
1321func (cdhp CustomDomainHTTPSParameters) AsCustomDomainHTTPSParameters() (*CustomDomainHTTPSParameters, bool) {
1322	return &cdhp, true
1323}
1324
1325// AsBasicCustomDomainHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for CustomDomainHTTPSParameters.
1326func (cdhp CustomDomainHTTPSParameters) AsBasicCustomDomainHTTPSParameters() (BasicCustomDomainHTTPSParameters, bool) {
1327	return &cdhp, true
1328}
1329
1330// CustomDomainListResult result of the request to list custom domains. It contains a list of custom domain
1331// objects and a URL link to get the next set of results.
1332type CustomDomainListResult struct {
1333	autorest.Response `json:"-"`
1334	// Value - READ-ONLY; List of CDN CustomDomains within an endpoint.
1335	Value *[]CustomDomain `json:"value,omitempty"`
1336	// NextLink - URL to get the next set of custom domain objects if there are any.
1337	NextLink *string `json:"nextLink,omitempty"`
1338}
1339
1340// CustomDomainListResultIterator provides access to a complete listing of CustomDomain values.
1341type CustomDomainListResultIterator struct {
1342	i    int
1343	page CustomDomainListResultPage
1344}
1345
1346// NextWithContext advances to the next value.  If there was an error making
1347// the request the iterator does not advance and the error is returned.
1348func (iter *CustomDomainListResultIterator) NextWithContext(ctx context.Context) (err error) {
1349	if tracing.IsEnabled() {
1350		ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainListResultIterator.NextWithContext")
1351		defer func() {
1352			sc := -1
1353			if iter.Response().Response.Response != nil {
1354				sc = iter.Response().Response.Response.StatusCode
1355			}
1356			tracing.EndSpan(ctx, sc, err)
1357		}()
1358	}
1359	iter.i++
1360	if iter.i < len(iter.page.Values()) {
1361		return nil
1362	}
1363	err = iter.page.NextWithContext(ctx)
1364	if err != nil {
1365		iter.i--
1366		return err
1367	}
1368	iter.i = 0
1369	return nil
1370}
1371
1372// Next advances to the next value.  If there was an error making
1373// the request the iterator does not advance and the error is returned.
1374// Deprecated: Use NextWithContext() instead.
1375func (iter *CustomDomainListResultIterator) Next() error {
1376	return iter.NextWithContext(context.Background())
1377}
1378
1379// NotDone returns true if the enumeration should be started or is not yet complete.
1380func (iter CustomDomainListResultIterator) NotDone() bool {
1381	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1382}
1383
1384// Response returns the raw server response from the last page request.
1385func (iter CustomDomainListResultIterator) Response() CustomDomainListResult {
1386	return iter.page.Response()
1387}
1388
1389// Value returns the current value or a zero-initialized value if the
1390// iterator has advanced beyond the end of the collection.
1391func (iter CustomDomainListResultIterator) Value() CustomDomain {
1392	if !iter.page.NotDone() {
1393		return CustomDomain{}
1394	}
1395	return iter.page.Values()[iter.i]
1396}
1397
1398// Creates a new instance of the CustomDomainListResultIterator type.
1399func NewCustomDomainListResultIterator(page CustomDomainListResultPage) CustomDomainListResultIterator {
1400	return CustomDomainListResultIterator{page: page}
1401}
1402
1403// IsEmpty returns true if the ListResult contains no values.
1404func (cdlr CustomDomainListResult) IsEmpty() bool {
1405	return cdlr.Value == nil || len(*cdlr.Value) == 0
1406}
1407
1408// customDomainListResultPreparer prepares a request to retrieve the next set of results.
1409// It returns nil if no more results exist.
1410func (cdlr CustomDomainListResult) customDomainListResultPreparer(ctx context.Context) (*http.Request, error) {
1411	if cdlr.NextLink == nil || len(to.String(cdlr.NextLink)) < 1 {
1412		return nil, nil
1413	}
1414	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1415		autorest.AsJSON(),
1416		autorest.AsGet(),
1417		autorest.WithBaseURL(to.String(cdlr.NextLink)))
1418}
1419
1420// CustomDomainListResultPage contains a page of CustomDomain values.
1421type CustomDomainListResultPage struct {
1422	fn   func(context.Context, CustomDomainListResult) (CustomDomainListResult, error)
1423	cdlr CustomDomainListResult
1424}
1425
1426// NextWithContext advances to the next page of values.  If there was an error making
1427// the request the page does not advance and the error is returned.
1428func (page *CustomDomainListResultPage) NextWithContext(ctx context.Context) (err error) {
1429	if tracing.IsEnabled() {
1430		ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainListResultPage.NextWithContext")
1431		defer func() {
1432			sc := -1
1433			if page.Response().Response.Response != nil {
1434				sc = page.Response().Response.Response.StatusCode
1435			}
1436			tracing.EndSpan(ctx, sc, err)
1437		}()
1438	}
1439	next, err := page.fn(ctx, page.cdlr)
1440	if err != nil {
1441		return err
1442	}
1443	page.cdlr = next
1444	return nil
1445}
1446
1447// Next advances to the next page of values.  If there was an error making
1448// the request the page does not advance and the error is returned.
1449// Deprecated: Use NextWithContext() instead.
1450func (page *CustomDomainListResultPage) Next() error {
1451	return page.NextWithContext(context.Background())
1452}
1453
1454// NotDone returns true if the page enumeration should be started or is not yet complete.
1455func (page CustomDomainListResultPage) NotDone() bool {
1456	return !page.cdlr.IsEmpty()
1457}
1458
1459// Response returns the raw server response from the last page request.
1460func (page CustomDomainListResultPage) Response() CustomDomainListResult {
1461	return page.cdlr
1462}
1463
1464// Values returns the slice of values for the current page or nil if there are no values.
1465func (page CustomDomainListResultPage) Values() []CustomDomain {
1466	if page.cdlr.IsEmpty() {
1467		return nil
1468	}
1469	return *page.cdlr.Value
1470}
1471
1472// Creates a new instance of the CustomDomainListResultPage type.
1473func NewCustomDomainListResultPage(getNextPage func(context.Context, CustomDomainListResult) (CustomDomainListResult, error)) CustomDomainListResultPage {
1474	return CustomDomainListResultPage{fn: getNextPage}
1475}
1476
1477// CustomDomainParameters the customDomain JSON object required for custom domain creation or update.
1478type CustomDomainParameters struct {
1479	*CustomDomainPropertiesParameters `json:"properties,omitempty"`
1480}
1481
1482// MarshalJSON is the custom marshaler for CustomDomainParameters.
1483func (cdp CustomDomainParameters) MarshalJSON() ([]byte, error) {
1484	objectMap := make(map[string]interface{})
1485	if cdp.CustomDomainPropertiesParameters != nil {
1486		objectMap["properties"] = cdp.CustomDomainPropertiesParameters
1487	}
1488	return json.Marshal(objectMap)
1489}
1490
1491// UnmarshalJSON is the custom unmarshaler for CustomDomainParameters struct.
1492func (cdp *CustomDomainParameters) UnmarshalJSON(body []byte) error {
1493	var m map[string]*json.RawMessage
1494	err := json.Unmarshal(body, &m)
1495	if err != nil {
1496		return err
1497	}
1498	for k, v := range m {
1499		switch k {
1500		case "properties":
1501			if v != nil {
1502				var customDomainPropertiesParameters CustomDomainPropertiesParameters
1503				err = json.Unmarshal(*v, &customDomainPropertiesParameters)
1504				if err != nil {
1505					return err
1506				}
1507				cdp.CustomDomainPropertiesParameters = &customDomainPropertiesParameters
1508			}
1509		}
1510	}
1511
1512	return nil
1513}
1514
1515// CustomDomainProperties the JSON object that contains the properties of the custom domain to create.
1516type CustomDomainProperties struct {
1517	// HostName - The host name of the custom domain. Must be a domain name.
1518	HostName *string `json:"hostName,omitempty"`
1519	// ResourceState - READ-ONLY; Resource status of the custom domain. Possible values include: 'Creating', 'Active', 'Deleting'
1520	ResourceState CustomDomainResourceState `json:"resourceState,omitempty"`
1521	// CustomHTTPSProvisioningState - READ-ONLY; Provisioning status of Custom Https of the custom domain. Possible values include: 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Failed'
1522	CustomHTTPSProvisioningState CustomHTTPSProvisioningState `json:"customHttpsProvisioningState,omitempty"`
1523	// CustomHTTPSProvisioningSubstate - READ-ONLY; Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. Possible values include: 'SubmittingDomainControlValidationRequest', 'PendingDomainControlValidationREquestApproval', 'DomainControlValidationRequestApproved', 'DomainControlValidationRequestRejected', 'DomainControlValidationRequestTimedOut', 'IssuingCertificate', 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', 'CertificateDeleted'
1524	CustomHTTPSProvisioningSubstate CustomHTTPSProvisioningSubstate `json:"customHttpsProvisioningSubstate,omitempty"`
1525	// ValidationData - Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China.
1526	ValidationData *string `json:"validationData,omitempty"`
1527	// ProvisioningState - READ-ONLY; Provisioning status of the custom domain.
1528	ProvisioningState *string `json:"provisioningState,omitempty"`
1529}
1530
1531// CustomDomainPropertiesParameters the JSON object that contains the properties of the custom domain to
1532// create.
1533type CustomDomainPropertiesParameters struct {
1534	// HostName - The host name of the custom domain. Must be a domain name.
1535	HostName *string `json:"hostName,omitempty"`
1536}
1537
1538// CustomDomainsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
1539// operation.
1540type CustomDomainsCreateFuture struct {
1541	azure.Future
1542}
1543
1544// Result returns the result of the asynchronous operation.
1545// If the operation has not completed it will return an error.
1546func (future *CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
1547	var done bool
1548	done, err = future.DoneWithContext(context.Background(), client)
1549	if err != nil {
1550		err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", future.Response(), "Polling failure")
1551		return
1552	}
1553	if !done {
1554		err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsCreateFuture")
1555		return
1556	}
1557	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1558	if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
1559		cd, err = client.CreateResponder(cd.Response.Response)
1560		if err != nil {
1561			err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", cd.Response.Response, "Failure responding to request")
1562		}
1563	}
1564	return
1565}
1566
1567// CustomDomainsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1568// operation.
1569type CustomDomainsDeleteFuture struct {
1570	azure.Future
1571}
1572
1573// Result returns the result of the asynchronous operation.
1574// If the operation has not completed it will return an error.
1575func (future *CustomDomainsDeleteFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
1576	var done bool
1577	done, err = future.DoneWithContext(context.Background(), client)
1578	if err != nil {
1579		err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", future.Response(), "Polling failure")
1580		return
1581	}
1582	if !done {
1583		err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDeleteFuture")
1584		return
1585	}
1586	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1587	if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
1588		cd, err = client.DeleteResponder(cd.Response.Response)
1589		if err != nil {
1590			err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", cd.Response.Response, "Failure responding to request")
1591		}
1592	}
1593	return
1594}
1595
1596// CustomRule defines the common attributes for a custom rule that can be included in a waf policy
1597type CustomRule struct {
1598	// Name - Defines the name of the custom rule
1599	Name *string `json:"name,omitempty"`
1600	// EnabledState - Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. Possible values include: 'CustomRuleEnabledStateDisabled', 'CustomRuleEnabledStateEnabled'
1601	EnabledState CustomRuleEnabledState `json:"enabledState,omitempty"`
1602	// Priority - Defines in what order this rule be evaluated in the overall list of custom rules
1603	Priority *int32 `json:"priority,omitempty"`
1604	// MatchConditions - List of match conditions.
1605	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
1606	// Action - Describes what action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect'
1607	Action ActionType `json:"action,omitempty"`
1608}
1609
1610// CustomRuleList defines contents of custom rules
1611type CustomRuleList struct {
1612	// Rules - List of rules
1613	Rules *[]CustomRule `json:"rules,omitempty"`
1614}
1615
1616// DeepCreatedOrigin the main origin of CDN content which is added when creating a CDN endpoint.
1617type DeepCreatedOrigin struct {
1618	// Name - Origin name which must be unique within the endpoint.
1619	Name                         *string `json:"name,omitempty"`
1620	*DeepCreatedOriginProperties `json:"properties,omitempty"`
1621}
1622
1623// MarshalJSON is the custom marshaler for DeepCreatedOrigin.
1624func (dco DeepCreatedOrigin) MarshalJSON() ([]byte, error) {
1625	objectMap := make(map[string]interface{})
1626	if dco.Name != nil {
1627		objectMap["name"] = dco.Name
1628	}
1629	if dco.DeepCreatedOriginProperties != nil {
1630		objectMap["properties"] = dco.DeepCreatedOriginProperties
1631	}
1632	return json.Marshal(objectMap)
1633}
1634
1635// UnmarshalJSON is the custom unmarshaler for DeepCreatedOrigin struct.
1636func (dco *DeepCreatedOrigin) UnmarshalJSON(body []byte) error {
1637	var m map[string]*json.RawMessage
1638	err := json.Unmarshal(body, &m)
1639	if err != nil {
1640		return err
1641	}
1642	for k, v := range m {
1643		switch k {
1644		case "name":
1645			if v != nil {
1646				var name string
1647				err = json.Unmarshal(*v, &name)
1648				if err != nil {
1649					return err
1650				}
1651				dco.Name = &name
1652			}
1653		case "properties":
1654			if v != nil {
1655				var deepCreatedOriginProperties DeepCreatedOriginProperties
1656				err = json.Unmarshal(*v, &deepCreatedOriginProperties)
1657				if err != nil {
1658					return err
1659				}
1660				dco.DeepCreatedOriginProperties = &deepCreatedOriginProperties
1661			}
1662		}
1663	}
1664
1665	return nil
1666}
1667
1668// DeepCreatedOriginGroup the origin group for CDN content which is added when creating a CDN endpoint.
1669// Traffic is sent to the origins within the origin group based on origin health.
1670type DeepCreatedOriginGroup struct {
1671	// Name - Origin group name which must be unique within the endpoint.
1672	Name                              *string `json:"name,omitempty"`
1673	*DeepCreatedOriginGroupProperties `json:"properties,omitempty"`
1674}
1675
1676// MarshalJSON is the custom marshaler for DeepCreatedOriginGroup.
1677func (dcog DeepCreatedOriginGroup) MarshalJSON() ([]byte, error) {
1678	objectMap := make(map[string]interface{})
1679	if dcog.Name != nil {
1680		objectMap["name"] = dcog.Name
1681	}
1682	if dcog.DeepCreatedOriginGroupProperties != nil {
1683		objectMap["properties"] = dcog.DeepCreatedOriginGroupProperties
1684	}
1685	return json.Marshal(objectMap)
1686}
1687
1688// UnmarshalJSON is the custom unmarshaler for DeepCreatedOriginGroup struct.
1689func (dcog *DeepCreatedOriginGroup) UnmarshalJSON(body []byte) error {
1690	var m map[string]*json.RawMessage
1691	err := json.Unmarshal(body, &m)
1692	if err != nil {
1693		return err
1694	}
1695	for k, v := range m {
1696		switch k {
1697		case "name":
1698			if v != nil {
1699				var name string
1700				err = json.Unmarshal(*v, &name)
1701				if err != nil {
1702					return err
1703				}
1704				dcog.Name = &name
1705			}
1706		case "properties":
1707			if v != nil {
1708				var deepCreatedOriginGroupProperties DeepCreatedOriginGroupProperties
1709				err = json.Unmarshal(*v, &deepCreatedOriginGroupProperties)
1710				if err != nil {
1711					return err
1712				}
1713				dcog.DeepCreatedOriginGroupProperties = &deepCreatedOriginGroupProperties
1714			}
1715		}
1716	}
1717
1718	return nil
1719}
1720
1721// DeepCreatedOriginGroupProperties properties of the origin group created on the CDN endpoint.
1722type DeepCreatedOriginGroupProperties struct {
1723	// HealthProbeSettings - Health probe settings to the origin that is used to determine the health of the origin.
1724	HealthProbeSettings *HealthProbeParameters `json:"healthProbeSettings,omitempty"`
1725	// Origins - The source of the content being delivered via CDN within given origin group.
1726	Origins *[]ResourceReference `json:"origins,omitempty"`
1727	// TrafficRestorationTimeToHealedOrNewEndpointsInMinutes - Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.
1728	TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32 `json:"trafficRestorationTimeToHealedOrNewEndpointsInMinutes,omitempty"`
1729	// ResponseBasedOriginErrorDetectionSettings - The JSON object that contains the properties to determine origin health using real requests/responses.This property is currently not supported.
1730	ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters `json:"responseBasedOriginErrorDetectionSettings,omitempty"`
1731}
1732
1733// DeepCreatedOriginProperties properties of the origin created on the CDN endpoint.
1734type DeepCreatedOriginProperties struct {
1735	// HostName - The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins in an endpoint.
1736	HostName *string `json:"hostName,omitempty"`
1737	// HTTPPort - The value of the HTTP port. Must be between 1 and 65535.
1738	HTTPPort *int32 `json:"httpPort,omitempty"`
1739	// HTTPSPort - The value of the HTTPS port. Must be between 1 and 65535.
1740	HTTPSPort *int32 `json:"httpsPort,omitempty"`
1741	// OriginHostHeader - The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.
1742	OriginHostHeader *string `json:"originHostHeader,omitempty"`
1743	// Priority - Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5.
1744	Priority *int32 `json:"priority,omitempty"`
1745	// Weight - Weight of the origin in given origin group for load balancing. Must be between 1 and 1000
1746	Weight *int32 `json:"weight,omitempty"`
1747	// Enabled - Origin is enabled for load balancing or not. By default, origin is always enabled.
1748	Enabled *bool `json:"enabled,omitempty"`
1749}
1750
1751// DeliveryRule a rule that specifies a set of actions and conditions
1752type DeliveryRule struct {
1753	// Name - Name of the rule
1754	Name *string `json:"name,omitempty"`
1755	// Order - The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.
1756	Order *int32 `json:"order,omitempty"`
1757	// Conditions - A list of conditions that must be matched for the actions to be executed
1758	Conditions *[]BasicDeliveryRuleCondition `json:"conditions,omitempty"`
1759	// Actions - A list of actions that are executed when all the conditions of a rule are satisfied.
1760	Actions *[]BasicDeliveryRuleAction `json:"actions,omitempty"`
1761}
1762
1763// UnmarshalJSON is the custom unmarshaler for DeliveryRule struct.
1764func (dr *DeliveryRule) UnmarshalJSON(body []byte) error {
1765	var m map[string]*json.RawMessage
1766	err := json.Unmarshal(body, &m)
1767	if err != nil {
1768		return err
1769	}
1770	for k, v := range m {
1771		switch k {
1772		case "name":
1773			if v != nil {
1774				var name string
1775				err = json.Unmarshal(*v, &name)
1776				if err != nil {
1777					return err
1778				}
1779				dr.Name = &name
1780			}
1781		case "order":
1782			if v != nil {
1783				var order int32
1784				err = json.Unmarshal(*v, &order)
1785				if err != nil {
1786					return err
1787				}
1788				dr.Order = &order
1789			}
1790		case "conditions":
1791			if v != nil {
1792				conditions, err := unmarshalBasicDeliveryRuleConditionArray(*v)
1793				if err != nil {
1794					return err
1795				}
1796				dr.Conditions = &conditions
1797			}
1798		case "actions":
1799			if v != nil {
1800				actions, err := unmarshalBasicDeliveryRuleActionArray(*v)
1801				if err != nil {
1802					return err
1803				}
1804				dr.Actions = &actions
1805			}
1806		}
1807	}
1808
1809	return nil
1810}
1811
1812// BasicDeliveryRuleAction an action for the delivery rule.
1813type BasicDeliveryRuleAction interface {
1814	AsURLRedirectAction() (*URLRedirectAction, bool)
1815	AsURLRewriteAction() (*URLRewriteAction, bool)
1816	AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool)
1817	AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool)
1818	AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool)
1819	AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool)
1820	AsDeliveryRuleAction() (*DeliveryRuleAction, bool)
1821}
1822
1823// DeliveryRuleAction an action for the delivery rule.
1824type DeliveryRuleAction struct {
1825	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
1826	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
1827}
1828
1829func unmarshalBasicDeliveryRuleAction(body []byte) (BasicDeliveryRuleAction, error) {
1830	var m map[string]interface{}
1831	err := json.Unmarshal(body, &m)
1832	if err != nil {
1833		return nil, err
1834	}
1835
1836	switch m["name"] {
1837	case string(NameURLRedirect):
1838		var ura URLRedirectAction
1839		err := json.Unmarshal(body, &ura)
1840		return ura, err
1841	case string(NameURLRewrite):
1842		var ura URLRewriteAction
1843		err := json.Unmarshal(body, &ura)
1844		return ura, err
1845	case string(NameModifyRequestHeader):
1846		var drrha DeliveryRuleRequestHeaderAction
1847		err := json.Unmarshal(body, &drrha)
1848		return drrha, err
1849	case string(NameModifyResponseHeader):
1850		var drrha DeliveryRuleResponseHeaderAction
1851		err := json.Unmarshal(body, &drrha)
1852		return drrha, err
1853	case string(NameCacheExpiration):
1854		var drcea DeliveryRuleCacheExpirationAction
1855		err := json.Unmarshal(body, &drcea)
1856		return drcea, err
1857	case string(NameCacheKeyQueryString):
1858		var drckqsa DeliveryRuleCacheKeyQueryStringAction
1859		err := json.Unmarshal(body, &drckqsa)
1860		return drckqsa, err
1861	default:
1862		var dra DeliveryRuleAction
1863		err := json.Unmarshal(body, &dra)
1864		return dra, err
1865	}
1866}
1867func unmarshalBasicDeliveryRuleActionArray(body []byte) ([]BasicDeliveryRuleAction, error) {
1868	var rawMessages []*json.RawMessage
1869	err := json.Unmarshal(body, &rawMessages)
1870	if err != nil {
1871		return nil, err
1872	}
1873
1874	draArray := make([]BasicDeliveryRuleAction, len(rawMessages))
1875
1876	for index, rawMessage := range rawMessages {
1877		dra, err := unmarshalBasicDeliveryRuleAction(*rawMessage)
1878		if err != nil {
1879			return nil, err
1880		}
1881		draArray[index] = dra
1882	}
1883	return draArray, nil
1884}
1885
1886// MarshalJSON is the custom marshaler for DeliveryRuleAction.
1887func (dra DeliveryRuleAction) MarshalJSON() ([]byte, error) {
1888	dra.Name = NameDeliveryRuleAction
1889	objectMap := make(map[string]interface{})
1890	if dra.Name != "" {
1891		objectMap["name"] = dra.Name
1892	}
1893	return json.Marshal(objectMap)
1894}
1895
1896// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1897func (dra DeliveryRuleAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
1898	return nil, false
1899}
1900
1901// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1902func (dra DeliveryRuleAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
1903	return nil, false
1904}
1905
1906// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1907func (dra DeliveryRuleAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
1908	return nil, false
1909}
1910
1911// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1912func (dra DeliveryRuleAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
1913	return nil, false
1914}
1915
1916// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1917func (dra DeliveryRuleAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
1918	return nil, false
1919}
1920
1921// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1922func (dra DeliveryRuleAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
1923	return nil, false
1924}
1925
1926// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1927func (dra DeliveryRuleAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
1928	return &dra, true
1929}
1930
1931// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1932func (dra DeliveryRuleAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
1933	return &dra, true
1934}
1935
1936// DeliveryRuleCacheExpirationAction defines the cache expiration action for the delivery rule.
1937type DeliveryRuleCacheExpirationAction struct {
1938	// Parameters - Defines the parameters for the action.
1939	Parameters *CacheExpirationActionParameters `json:"parameters,omitempty"`
1940	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
1941	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
1942}
1943
1944// MarshalJSON is the custom marshaler for DeliveryRuleCacheExpirationAction.
1945func (drcea DeliveryRuleCacheExpirationAction) MarshalJSON() ([]byte, error) {
1946	drcea.Name = NameCacheExpiration
1947	objectMap := make(map[string]interface{})
1948	if drcea.Parameters != nil {
1949		objectMap["parameters"] = drcea.Parameters
1950	}
1951	if drcea.Name != "" {
1952		objectMap["name"] = drcea.Name
1953	}
1954	return json.Marshal(objectMap)
1955}
1956
1957// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1958func (drcea DeliveryRuleCacheExpirationAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
1959	return nil, false
1960}
1961
1962// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1963func (drcea DeliveryRuleCacheExpirationAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
1964	return nil, false
1965}
1966
1967// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1968func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
1969	return nil, false
1970}
1971
1972// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1973func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
1974	return nil, false
1975}
1976
1977// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1978func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
1979	return &drcea, true
1980}
1981
1982// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1983func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
1984	return nil, false
1985}
1986
1987// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1988func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
1989	return nil, false
1990}
1991
1992// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1993func (drcea DeliveryRuleCacheExpirationAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
1994	return &drcea, true
1995}
1996
1997// DeliveryRuleCacheKeyQueryStringAction defines the cache-key query string action for the delivery rule.
1998type DeliveryRuleCacheKeyQueryStringAction struct {
1999	// Parameters - Defines the parameters for the action.
2000	Parameters *CacheKeyQueryStringActionParameters `json:"parameters,omitempty"`
2001	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
2002	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
2003}
2004
2005// MarshalJSON is the custom marshaler for DeliveryRuleCacheKeyQueryStringAction.
2006func (drckqsa DeliveryRuleCacheKeyQueryStringAction) MarshalJSON() ([]byte, error) {
2007	drckqsa.Name = NameCacheKeyQueryString
2008	objectMap := make(map[string]interface{})
2009	if drckqsa.Parameters != nil {
2010		objectMap["parameters"] = drckqsa.Parameters
2011	}
2012	if drckqsa.Name != "" {
2013		objectMap["name"] = drckqsa.Name
2014	}
2015	return json.Marshal(objectMap)
2016}
2017
2018// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
2019func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
2020	return nil, false
2021}
2022
2023// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
2024func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
2025	return nil, false
2026}
2027
2028// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
2029func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
2030	return nil, false
2031}
2032
2033// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
2034func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
2035	return nil, false
2036}
2037
2038// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
2039func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
2040	return nil, false
2041}
2042
2043// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
2044func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
2045	return &drckqsa, true
2046}
2047
2048// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
2049func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
2050	return nil, false
2051}
2052
2053// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
2054func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
2055	return &drckqsa, true
2056}
2057
2058// BasicDeliveryRuleCondition a condition for the delivery rule.
2059type BasicDeliveryRuleCondition interface {
2060	AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool)
2061	AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool)
2062	AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool)
2063	AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool)
2064	AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool)
2065	AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool)
2066	AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool)
2067	AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool)
2068	AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool)
2069	AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool)
2070	AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool)
2071	AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool)
2072	AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool)
2073	AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool)
2074	AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool)
2075}
2076
2077// DeliveryRuleCondition a condition for the delivery rule.
2078type DeliveryRuleCondition struct {
2079	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
2080	Name Name `json:"name,omitempty"`
2081}
2082
2083func unmarshalBasicDeliveryRuleCondition(body []byte) (BasicDeliveryRuleCondition, error) {
2084	var m map[string]interface{}
2085	err := json.Unmarshal(body, &m)
2086	if err != nil {
2087		return nil, err
2088	}
2089
2090	switch m["name"] {
2091	case string(NameRemoteAddress):
2092		var drrac DeliveryRuleRemoteAddressCondition
2093		err := json.Unmarshal(body, &drrac)
2094		return drrac, err
2095	case string(NameRequestMethod):
2096		var drrmc DeliveryRuleRequestMethodCondition
2097		err := json.Unmarshal(body, &drrmc)
2098		return drrmc, err
2099	case string(NameQueryString):
2100		var drqsc DeliveryRuleQueryStringCondition
2101		err := json.Unmarshal(body, &drqsc)
2102		return drqsc, err
2103	case string(NamePostArgs):
2104		var drpac DeliveryRulePostArgsCondition
2105		err := json.Unmarshal(body, &drpac)
2106		return drpac, err
2107	case string(NameRequestURI):
2108		var drruc DeliveryRuleRequestURICondition
2109		err := json.Unmarshal(body, &drruc)
2110		return drruc, err
2111	case string(NameRequestHeader):
2112		var drrhc DeliveryRuleRequestHeaderCondition
2113		err := json.Unmarshal(body, &drrhc)
2114		return drrhc, err
2115	case string(NameRequestBody):
2116		var drrbc DeliveryRuleRequestBodyCondition
2117		err := json.Unmarshal(body, &drrbc)
2118		return drrbc, err
2119	case string(NameRequestScheme):
2120		var drrsc DeliveryRuleRequestSchemeCondition
2121		err := json.Unmarshal(body, &drrsc)
2122		return drrsc, err
2123	case string(NameURLPath):
2124		var drupc DeliveryRuleURLPathCondition
2125		err := json.Unmarshal(body, &drupc)
2126		return drupc, err
2127	case string(NameURLFileExtension):
2128		var drufec DeliveryRuleURLFileExtensionCondition
2129		err := json.Unmarshal(body, &drufec)
2130		return drufec, err
2131	case string(NameURLFileName):
2132		var drufnc DeliveryRuleURLFileNameCondition
2133		err := json.Unmarshal(body, &drufnc)
2134		return drufnc, err
2135	case string(NameHTTPVersion):
2136		var drhvc DeliveryRuleHTTPVersionCondition
2137		err := json.Unmarshal(body, &drhvc)
2138		return drhvc, err
2139	case string(NameCookies):
2140		var drcc DeliveryRuleCookiesCondition
2141		err := json.Unmarshal(body, &drcc)
2142		return drcc, err
2143	case string(NameIsDevice):
2144		var dridc DeliveryRuleIsDeviceCondition
2145		err := json.Unmarshal(body, &dridc)
2146		return dridc, err
2147	default:
2148		var drc DeliveryRuleCondition
2149		err := json.Unmarshal(body, &drc)
2150		return drc, err
2151	}
2152}
2153func unmarshalBasicDeliveryRuleConditionArray(body []byte) ([]BasicDeliveryRuleCondition, error) {
2154	var rawMessages []*json.RawMessage
2155	err := json.Unmarshal(body, &rawMessages)
2156	if err != nil {
2157		return nil, err
2158	}
2159
2160	drcArray := make([]BasicDeliveryRuleCondition, len(rawMessages))
2161
2162	for index, rawMessage := range rawMessages {
2163		drc, err := unmarshalBasicDeliveryRuleCondition(*rawMessage)
2164		if err != nil {
2165			return nil, err
2166		}
2167		drcArray[index] = drc
2168	}
2169	return drcArray, nil
2170}
2171
2172// MarshalJSON is the custom marshaler for DeliveryRuleCondition.
2173func (drc DeliveryRuleCondition) MarshalJSON() ([]byte, error) {
2174	drc.Name = NameDeliveryRuleCondition
2175	objectMap := make(map[string]interface{})
2176	if drc.Name != "" {
2177		objectMap["name"] = drc.Name
2178	}
2179	return json.Marshal(objectMap)
2180}
2181
2182// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2183func (drc DeliveryRuleCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2184	return nil, false
2185}
2186
2187// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2188func (drc DeliveryRuleCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2189	return nil, false
2190}
2191
2192// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2193func (drc DeliveryRuleCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2194	return nil, false
2195}
2196
2197// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2198func (drc DeliveryRuleCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2199	return nil, false
2200}
2201
2202// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2203func (drc DeliveryRuleCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2204	return nil, false
2205}
2206
2207// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2208func (drc DeliveryRuleCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2209	return nil, false
2210}
2211
2212// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2213func (drc DeliveryRuleCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2214	return nil, false
2215}
2216
2217// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2218func (drc DeliveryRuleCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2219	return nil, false
2220}
2221
2222// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2223func (drc DeliveryRuleCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2224	return nil, false
2225}
2226
2227// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2228func (drc DeliveryRuleCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2229	return nil, false
2230}
2231
2232// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2233func (drc DeliveryRuleCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2234	return nil, false
2235}
2236
2237// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2238func (drc DeliveryRuleCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
2239	return nil, false
2240}
2241
2242// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2243func (drc DeliveryRuleCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
2244	return nil, false
2245}
2246
2247// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2248func (drc DeliveryRuleCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2249	return nil, false
2250}
2251
2252// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2253func (drc DeliveryRuleCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2254	return &drc, true
2255}
2256
2257// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
2258func (drc DeliveryRuleCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2259	return &drc, true
2260}
2261
2262// DeliveryRuleCookiesCondition defines the Cookies condition for the delivery rule.
2263type DeliveryRuleCookiesCondition struct {
2264	// Parameters - Defines the parameters for the condition.
2265	Parameters *CookiesMatchConditionParameters `json:"parameters,omitempty"`
2266	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
2267	Name Name `json:"name,omitempty"`
2268}
2269
2270// MarshalJSON is the custom marshaler for DeliveryRuleCookiesCondition.
2271func (drcc DeliveryRuleCookiesCondition) MarshalJSON() ([]byte, error) {
2272	drcc.Name = NameCookies
2273	objectMap := make(map[string]interface{})
2274	if drcc.Parameters != nil {
2275		objectMap["parameters"] = drcc.Parameters
2276	}
2277	if drcc.Name != "" {
2278		objectMap["name"] = drcc.Name
2279	}
2280	return json.Marshal(objectMap)
2281}
2282
2283// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2284func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2285	return nil, false
2286}
2287
2288// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2289func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2290	return nil, false
2291}
2292
2293// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2294func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2295	return nil, false
2296}
2297
2298// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2299func (drcc DeliveryRuleCookiesCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2300	return nil, false
2301}
2302
2303// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2304func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2305	return nil, false
2306}
2307
2308// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2309func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2310	return nil, false
2311}
2312
2313// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2314func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2315	return nil, false
2316}
2317
2318// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2319func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2320	return nil, false
2321}
2322
2323// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2324func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2325	return nil, false
2326}
2327
2328// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2329func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2330	return nil, false
2331}
2332
2333// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2334func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2335	return nil, false
2336}
2337
2338// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2339func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
2340	return nil, false
2341}
2342
2343// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2344func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
2345	return &drcc, true
2346}
2347
2348// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2349func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2350	return nil, false
2351}
2352
2353// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2354func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2355	return nil, false
2356}
2357
2358// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition.
2359func (drcc DeliveryRuleCookiesCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2360	return &drcc, true
2361}
2362
2363// DeliveryRuleHTTPVersionCondition defines the HttpVersion condition for the delivery rule.
2364type DeliveryRuleHTTPVersionCondition struct {
2365	// Parameters - Defines the parameters for the condition.
2366	Parameters *HTTPVersionMatchConditionParameters `json:"parameters,omitempty"`
2367	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
2368	Name Name `json:"name,omitempty"`
2369}
2370
2371// MarshalJSON is the custom marshaler for DeliveryRuleHTTPVersionCondition.
2372func (drhvc DeliveryRuleHTTPVersionCondition) MarshalJSON() ([]byte, error) {
2373	drhvc.Name = NameHTTPVersion
2374	objectMap := make(map[string]interface{})
2375	if drhvc.Parameters != nil {
2376		objectMap["parameters"] = drhvc.Parameters
2377	}
2378	if drhvc.Name != "" {
2379		objectMap["name"] = drhvc.Name
2380	}
2381	return json.Marshal(objectMap)
2382}
2383
2384// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2385func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2386	return nil, false
2387}
2388
2389// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2390func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2391	return nil, false
2392}
2393
2394// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2395func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2396	return nil, false
2397}
2398
2399// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2400func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2401	return nil, false
2402}
2403
2404// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2405func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2406	return nil, false
2407}
2408
2409// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2410func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2411	return nil, false
2412}
2413
2414// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2415func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2416	return nil, false
2417}
2418
2419// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2420func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2421	return nil, false
2422}
2423
2424// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2425func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2426	return nil, false
2427}
2428
2429// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2430func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2431	return nil, false
2432}
2433
2434// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2435func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2436	return nil, false
2437}
2438
2439// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2440func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
2441	return &drhvc, true
2442}
2443
2444// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2445func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
2446	return nil, false
2447}
2448
2449// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2450func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2451	return nil, false
2452}
2453
2454// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2455func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2456	return nil, false
2457}
2458
2459// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition.
2460func (drhvc DeliveryRuleHTTPVersionCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2461	return &drhvc, true
2462}
2463
2464// DeliveryRuleIsDeviceCondition defines the IsDevice condition for the delivery rule.
2465type DeliveryRuleIsDeviceCondition struct {
2466	// Parameters - Defines the parameters for the condition.
2467	Parameters *IsDeviceMatchConditionParameters `json:"parameters,omitempty"`
2468	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
2469	Name Name `json:"name,omitempty"`
2470}
2471
2472// MarshalJSON is the custom marshaler for DeliveryRuleIsDeviceCondition.
2473func (dridc DeliveryRuleIsDeviceCondition) MarshalJSON() ([]byte, error) {
2474	dridc.Name = NameIsDevice
2475	objectMap := make(map[string]interface{})
2476	if dridc.Parameters != nil {
2477		objectMap["parameters"] = dridc.Parameters
2478	}
2479	if dridc.Name != "" {
2480		objectMap["name"] = dridc.Name
2481	}
2482	return json.Marshal(objectMap)
2483}
2484
2485// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2486func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2487	return nil, false
2488}
2489
2490// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2491func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2492	return nil, false
2493}
2494
2495// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2496func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2497	return nil, false
2498}
2499
2500// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2501func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2502	return nil, false
2503}
2504
2505// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2506func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2507	return nil, false
2508}
2509
2510// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2511func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2512	return nil, false
2513}
2514
2515// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2516func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2517	return nil, false
2518}
2519
2520// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2521func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2522	return nil, false
2523}
2524
2525// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2526func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2527	return nil, false
2528}
2529
2530// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2531func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2532	return nil, false
2533}
2534
2535// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2536func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2537	return nil, false
2538}
2539
2540// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2541func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
2542	return nil, false
2543}
2544
2545// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2546func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
2547	return nil, false
2548}
2549
2550// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2551func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2552	return &dridc, true
2553}
2554
2555// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2556func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2557	return nil, false
2558}
2559
2560// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
2561func (dridc DeliveryRuleIsDeviceCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2562	return &dridc, true
2563}
2564
2565// DeliveryRulePostArgsCondition defines the PostArgs condition for the delivery rule.
2566type DeliveryRulePostArgsCondition struct {
2567	// Parameters - Defines the parameters for the condition.
2568	Parameters *PostArgsMatchConditionParameters `json:"parameters,omitempty"`
2569	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
2570	Name Name `json:"name,omitempty"`
2571}
2572
2573// MarshalJSON is the custom marshaler for DeliveryRulePostArgsCondition.
2574func (drpac DeliveryRulePostArgsCondition) MarshalJSON() ([]byte, error) {
2575	drpac.Name = NamePostArgs
2576	objectMap := make(map[string]interface{})
2577	if drpac.Parameters != nil {
2578		objectMap["parameters"] = drpac.Parameters
2579	}
2580	if drpac.Name != "" {
2581		objectMap["name"] = drpac.Name
2582	}
2583	return json.Marshal(objectMap)
2584}
2585
2586// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2587func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2588	return nil, false
2589}
2590
2591// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2592func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2593	return nil, false
2594}
2595
2596// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2597func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2598	return nil, false
2599}
2600
2601// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2602func (drpac DeliveryRulePostArgsCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2603	return &drpac, true
2604}
2605
2606// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2607func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2608	return nil, false
2609}
2610
2611// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2612func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2613	return nil, false
2614}
2615
2616// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2617func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2618	return nil, false
2619}
2620
2621// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2622func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2623	return nil, false
2624}
2625
2626// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2627func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2628	return nil, false
2629}
2630
2631// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2632func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2633	return nil, false
2634}
2635
2636// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2637func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2638	return nil, false
2639}
2640
2641// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2642func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
2643	return nil, false
2644}
2645
2646// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2647func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
2648	return nil, false
2649}
2650
2651// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2652func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2653	return nil, false
2654}
2655
2656// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2657func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2658	return nil, false
2659}
2660
2661// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
2662func (drpac DeliveryRulePostArgsCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2663	return &drpac, true
2664}
2665
2666// DeliveryRuleQueryStringCondition defines the QueryString condition for the delivery rule.
2667type DeliveryRuleQueryStringCondition struct {
2668	// Parameters - Defines the parameters for the condition.
2669	Parameters *QueryStringMatchConditionParameters `json:"parameters,omitempty"`
2670	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
2671	Name Name `json:"name,omitempty"`
2672}
2673
2674// MarshalJSON is the custom marshaler for DeliveryRuleQueryStringCondition.
2675func (drqsc DeliveryRuleQueryStringCondition) MarshalJSON() ([]byte, error) {
2676	drqsc.Name = NameQueryString
2677	objectMap := make(map[string]interface{})
2678	if drqsc.Parameters != nil {
2679		objectMap["parameters"] = drqsc.Parameters
2680	}
2681	if drqsc.Name != "" {
2682		objectMap["name"] = drqsc.Name
2683	}
2684	return json.Marshal(objectMap)
2685}
2686
2687// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2688func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2689	return nil, false
2690}
2691
2692// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2693func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2694	return nil, false
2695}
2696
2697// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2698func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2699	return &drqsc, true
2700}
2701
2702// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2703func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2704	return nil, false
2705}
2706
2707// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2708func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2709	return nil, false
2710}
2711
2712// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2713func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2714	return nil, false
2715}
2716
2717// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2718func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2719	return nil, false
2720}
2721
2722// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2723func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2724	return nil, false
2725}
2726
2727// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2728func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2729	return nil, false
2730}
2731
2732// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2733func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2734	return nil, false
2735}
2736
2737// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2738func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2739	return nil, false
2740}
2741
2742// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2743func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
2744	return nil, false
2745}
2746
2747// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2748func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
2749	return nil, false
2750}
2751
2752// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2753func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2754	return nil, false
2755}
2756
2757// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2758func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2759	return nil, false
2760}
2761
2762// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2763func (drqsc DeliveryRuleQueryStringCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2764	return &drqsc, true
2765}
2766
2767// DeliveryRuleRemoteAddressCondition defines the RemoteAddress condition for the delivery rule.
2768type DeliveryRuleRemoteAddressCondition struct {
2769	// Parameters - Defines the parameters for the condition.
2770	Parameters *RemoteAddressMatchConditionParameters `json:"parameters,omitempty"`
2771	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
2772	Name Name `json:"name,omitempty"`
2773}
2774
2775// MarshalJSON is the custom marshaler for DeliveryRuleRemoteAddressCondition.
2776func (drrac DeliveryRuleRemoteAddressCondition) MarshalJSON() ([]byte, error) {
2777	drrac.Name = NameRemoteAddress
2778	objectMap := make(map[string]interface{})
2779	if drrac.Parameters != nil {
2780		objectMap["parameters"] = drrac.Parameters
2781	}
2782	if drrac.Name != "" {
2783		objectMap["name"] = drrac.Name
2784	}
2785	return json.Marshal(objectMap)
2786}
2787
2788// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2789func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2790	return &drrac, true
2791}
2792
2793// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2794func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2795	return nil, false
2796}
2797
2798// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2799func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2800	return nil, false
2801}
2802
2803// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2804func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2805	return nil, false
2806}
2807
2808// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2809func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2810	return nil, false
2811}
2812
2813// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2814func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2815	return nil, false
2816}
2817
2818// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2819func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2820	return nil, false
2821}
2822
2823// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2824func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2825	return nil, false
2826}
2827
2828// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2829func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2830	return nil, false
2831}
2832
2833// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2834func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2835	return nil, false
2836}
2837
2838// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2839func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2840	return nil, false
2841}
2842
2843// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2844func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
2845	return nil, false
2846}
2847
2848// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2849func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
2850	return nil, false
2851}
2852
2853// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2854func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2855	return nil, false
2856}
2857
2858// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2859func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2860	return nil, false
2861}
2862
2863// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2864func (drrac DeliveryRuleRemoteAddressCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2865	return &drrac, true
2866}
2867
2868// DeliveryRuleRequestBodyCondition defines the RequestBody condition for the delivery rule.
2869type DeliveryRuleRequestBodyCondition struct {
2870	// Parameters - Defines the parameters for the condition.
2871	Parameters *RequestBodyMatchConditionParameters `json:"parameters,omitempty"`
2872	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
2873	Name Name `json:"name,omitempty"`
2874}
2875
2876// MarshalJSON is the custom marshaler for DeliveryRuleRequestBodyCondition.
2877func (drrbc DeliveryRuleRequestBodyCondition) MarshalJSON() ([]byte, error) {
2878	drrbc.Name = NameRequestBody
2879	objectMap := make(map[string]interface{})
2880	if drrbc.Parameters != nil {
2881		objectMap["parameters"] = drrbc.Parameters
2882	}
2883	if drrbc.Name != "" {
2884		objectMap["name"] = drrbc.Name
2885	}
2886	return json.Marshal(objectMap)
2887}
2888
2889// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2890func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2891	return nil, false
2892}
2893
2894// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2895func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2896	return nil, false
2897}
2898
2899// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2900func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2901	return nil, false
2902}
2903
2904// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2905func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2906	return nil, false
2907}
2908
2909// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2910func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2911	return nil, false
2912}
2913
2914// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2915func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2916	return nil, false
2917}
2918
2919// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2920func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2921	return &drrbc, true
2922}
2923
2924// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2925func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2926	return nil, false
2927}
2928
2929// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2930func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2931	return nil, false
2932}
2933
2934// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2935func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2936	return nil, false
2937}
2938
2939// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2940func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2941	return nil, false
2942}
2943
2944// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2945func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
2946	return nil, false
2947}
2948
2949// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2950func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
2951	return nil, false
2952}
2953
2954// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2955func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2956	return nil, false
2957}
2958
2959// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2960func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2961	return nil, false
2962}
2963
2964// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2965func (drrbc DeliveryRuleRequestBodyCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2966	return &drrbc, true
2967}
2968
2969// DeliveryRuleRequestHeaderAction defines the request header action for the delivery rule.
2970type DeliveryRuleRequestHeaderAction struct {
2971	// Parameters - Defines the parameters for the action.
2972	Parameters *HeaderActionParameters `json:"parameters,omitempty"`
2973	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
2974	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
2975}
2976
2977// MarshalJSON is the custom marshaler for DeliveryRuleRequestHeaderAction.
2978func (drrha DeliveryRuleRequestHeaderAction) MarshalJSON() ([]byte, error) {
2979	drrha.Name = NameModifyRequestHeader
2980	objectMap := make(map[string]interface{})
2981	if drrha.Parameters != nil {
2982		objectMap["parameters"] = drrha.Parameters
2983	}
2984	if drrha.Name != "" {
2985		objectMap["name"] = drrha.Name
2986	}
2987	return json.Marshal(objectMap)
2988}
2989
2990// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
2991func (drrha DeliveryRuleRequestHeaderAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
2992	return nil, false
2993}
2994
2995// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
2996func (drrha DeliveryRuleRequestHeaderAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
2997	return nil, false
2998}
2999
3000// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
3001func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
3002	return &drrha, true
3003}
3004
3005// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
3006func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
3007	return nil, false
3008}
3009
3010// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
3011func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
3012	return nil, false
3013}
3014
3015// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
3016func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
3017	return nil, false
3018}
3019
3020// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
3021func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
3022	return nil, false
3023}
3024
3025// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
3026func (drrha DeliveryRuleRequestHeaderAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
3027	return &drrha, true
3028}
3029
3030// DeliveryRuleRequestHeaderCondition defines the RequestHeader condition for the delivery rule.
3031type DeliveryRuleRequestHeaderCondition struct {
3032	// Parameters - Defines the parameters for the condition.
3033	Parameters *RequestHeaderMatchConditionParameters `json:"parameters,omitempty"`
3034	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
3035	Name Name `json:"name,omitempty"`
3036}
3037
3038// MarshalJSON is the custom marshaler for DeliveryRuleRequestHeaderCondition.
3039func (drrhc DeliveryRuleRequestHeaderCondition) MarshalJSON() ([]byte, error) {
3040	drrhc.Name = NameRequestHeader
3041	objectMap := make(map[string]interface{})
3042	if drrhc.Parameters != nil {
3043		objectMap["parameters"] = drrhc.Parameters
3044	}
3045	if drrhc.Name != "" {
3046		objectMap["name"] = drrhc.Name
3047	}
3048	return json.Marshal(objectMap)
3049}
3050
3051// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3052func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
3053	return nil, false
3054}
3055
3056// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3057func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
3058	return nil, false
3059}
3060
3061// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3062func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
3063	return nil, false
3064}
3065
3066// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3067func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
3068	return nil, false
3069}
3070
3071// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3072func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
3073	return nil, false
3074}
3075
3076// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3077func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
3078	return &drrhc, true
3079}
3080
3081// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3082func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
3083	return nil, false
3084}
3085
3086// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3087func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
3088	return nil, false
3089}
3090
3091// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3092func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
3093	return nil, false
3094}
3095
3096// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3097func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
3098	return nil, false
3099}
3100
3101// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3102func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
3103	return nil, false
3104}
3105
3106// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3107func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
3108	return nil, false
3109}
3110
3111// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3112func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
3113	return nil, false
3114}
3115
3116// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3117func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
3118	return nil, false
3119}
3120
3121// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3122func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
3123	return nil, false
3124}
3125
3126// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
3127func (drrhc DeliveryRuleRequestHeaderCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
3128	return &drrhc, true
3129}
3130
3131// DeliveryRuleRequestMethodCondition defines the RequestMethod condition for the delivery rule.
3132type DeliveryRuleRequestMethodCondition struct {
3133	// Parameters - Defines the parameters for the condition.
3134	Parameters *RequestMethodMatchConditionParameters `json:"parameters,omitempty"`
3135	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
3136	Name Name `json:"name,omitempty"`
3137}
3138
3139// MarshalJSON is the custom marshaler for DeliveryRuleRequestMethodCondition.
3140func (drrmc DeliveryRuleRequestMethodCondition) MarshalJSON() ([]byte, error) {
3141	drrmc.Name = NameRequestMethod
3142	objectMap := make(map[string]interface{})
3143	if drrmc.Parameters != nil {
3144		objectMap["parameters"] = drrmc.Parameters
3145	}
3146	if drrmc.Name != "" {
3147		objectMap["name"] = drrmc.Name
3148	}
3149	return json.Marshal(objectMap)
3150}
3151
3152// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3153func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
3154	return nil, false
3155}
3156
3157// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3158func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
3159	return &drrmc, true
3160}
3161
3162// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3163func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
3164	return nil, false
3165}
3166
3167// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3168func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
3169	return nil, false
3170}
3171
3172// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3173func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
3174	return nil, false
3175}
3176
3177// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3178func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
3179	return nil, false
3180}
3181
3182// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3183func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
3184	return nil, false
3185}
3186
3187// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3188func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
3189	return nil, false
3190}
3191
3192// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3193func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
3194	return nil, false
3195}
3196
3197// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3198func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
3199	return nil, false
3200}
3201
3202// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3203func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
3204	return nil, false
3205}
3206
3207// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3208func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
3209	return nil, false
3210}
3211
3212// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3213func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
3214	return nil, false
3215}
3216
3217// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3218func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
3219	return nil, false
3220}
3221
3222// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3223func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
3224	return nil, false
3225}
3226
3227// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
3228func (drrmc DeliveryRuleRequestMethodCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
3229	return &drrmc, true
3230}
3231
3232// DeliveryRuleRequestSchemeCondition defines the RequestScheme condition for the delivery rule.
3233type DeliveryRuleRequestSchemeCondition struct {
3234	// Parameters - Defines the parameters for the condition.
3235	Parameters *RequestSchemeMatchConditionParameters `json:"parameters,omitempty"`
3236	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
3237	Name Name `json:"name,omitempty"`
3238}
3239
3240// MarshalJSON is the custom marshaler for DeliveryRuleRequestSchemeCondition.
3241func (drrsc DeliveryRuleRequestSchemeCondition) MarshalJSON() ([]byte, error) {
3242	drrsc.Name = NameRequestScheme
3243	objectMap := make(map[string]interface{})
3244	if drrsc.Parameters != nil {
3245		objectMap["parameters"] = drrsc.Parameters
3246	}
3247	if drrsc.Name != "" {
3248		objectMap["name"] = drrsc.Name
3249	}
3250	return json.Marshal(objectMap)
3251}
3252
3253// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3254func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
3255	return nil, false
3256}
3257
3258// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3259func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
3260	return nil, false
3261}
3262
3263// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3264func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
3265	return nil, false
3266}
3267
3268// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3269func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
3270	return nil, false
3271}
3272
3273// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3274func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
3275	return nil, false
3276}
3277
3278// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3279func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
3280	return nil, false
3281}
3282
3283// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3284func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
3285	return nil, false
3286}
3287
3288// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3289func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
3290	return &drrsc, true
3291}
3292
3293// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3294func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
3295	return nil, false
3296}
3297
3298// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3299func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
3300	return nil, false
3301}
3302
3303// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3304func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
3305	return nil, false
3306}
3307
3308// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3309func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
3310	return nil, false
3311}
3312
3313// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3314func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
3315	return nil, false
3316}
3317
3318// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3319func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
3320	return nil, false
3321}
3322
3323// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3324func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
3325	return nil, false
3326}
3327
3328// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
3329func (drrsc DeliveryRuleRequestSchemeCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
3330	return &drrsc, true
3331}
3332
3333// DeliveryRuleRequestURICondition defines the RequestUri condition for the delivery rule.
3334type DeliveryRuleRequestURICondition struct {
3335	// Parameters - Defines the parameters for the condition.
3336	Parameters *RequestURIMatchConditionParameters `json:"parameters,omitempty"`
3337	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
3338	Name Name `json:"name,omitempty"`
3339}
3340
3341// MarshalJSON is the custom marshaler for DeliveryRuleRequestURICondition.
3342func (drruc DeliveryRuleRequestURICondition) MarshalJSON() ([]byte, error) {
3343	drruc.Name = NameRequestURI
3344	objectMap := make(map[string]interface{})
3345	if drruc.Parameters != nil {
3346		objectMap["parameters"] = drruc.Parameters
3347	}
3348	if drruc.Name != "" {
3349		objectMap["name"] = drruc.Name
3350	}
3351	return json.Marshal(objectMap)
3352}
3353
3354// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3355func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
3356	return nil, false
3357}
3358
3359// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3360func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
3361	return nil, false
3362}
3363
3364// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3365func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
3366	return nil, false
3367}
3368
3369// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3370func (drruc DeliveryRuleRequestURICondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
3371	return nil, false
3372}
3373
3374// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3375func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
3376	return &drruc, true
3377}
3378
3379// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3380func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
3381	return nil, false
3382}
3383
3384// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3385func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
3386	return nil, false
3387}
3388
3389// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3390func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
3391	return nil, false
3392}
3393
3394// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3395func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
3396	return nil, false
3397}
3398
3399// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3400func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
3401	return nil, false
3402}
3403
3404// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3405func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
3406	return nil, false
3407}
3408
3409// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3410func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
3411	return nil, false
3412}
3413
3414// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3415func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
3416	return nil, false
3417}
3418
3419// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3420func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
3421	return nil, false
3422}
3423
3424// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3425func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
3426	return nil, false
3427}
3428
3429// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
3430func (drruc DeliveryRuleRequestURICondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
3431	return &drruc, true
3432}
3433
3434// DeliveryRuleResponseHeaderAction defines the response header action for the delivery rule.
3435type DeliveryRuleResponseHeaderAction struct {
3436	// Parameters - Defines the parameters for the action.
3437	Parameters *HeaderActionParameters `json:"parameters,omitempty"`
3438	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
3439	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
3440}
3441
3442// MarshalJSON is the custom marshaler for DeliveryRuleResponseHeaderAction.
3443func (drrha DeliveryRuleResponseHeaderAction) MarshalJSON() ([]byte, error) {
3444	drrha.Name = NameModifyResponseHeader
3445	objectMap := make(map[string]interface{})
3446	if drrha.Parameters != nil {
3447		objectMap["parameters"] = drrha.Parameters
3448	}
3449	if drrha.Name != "" {
3450		objectMap["name"] = drrha.Name
3451	}
3452	return json.Marshal(objectMap)
3453}
3454
3455// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
3456func (drrha DeliveryRuleResponseHeaderAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
3457	return nil, false
3458}
3459
3460// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
3461func (drrha DeliveryRuleResponseHeaderAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
3462	return nil, false
3463}
3464
3465// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
3466func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
3467	return nil, false
3468}
3469
3470// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
3471func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
3472	return &drrha, true
3473}
3474
3475// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
3476func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
3477	return nil, false
3478}
3479
3480// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
3481func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
3482	return nil, false
3483}
3484
3485// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
3486func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
3487	return nil, false
3488}
3489
3490// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
3491func (drrha DeliveryRuleResponseHeaderAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
3492	return &drrha, true
3493}
3494
3495// DeliveryRuleURLFileExtensionCondition defines the UrlFileExtension condition for the delivery rule.
3496type DeliveryRuleURLFileExtensionCondition struct {
3497	// Parameters - Defines the parameters for the condition.
3498	Parameters *URLFileExtensionMatchConditionParameters `json:"parameters,omitempty"`
3499	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
3500	Name Name `json:"name,omitempty"`
3501}
3502
3503// MarshalJSON is the custom marshaler for DeliveryRuleURLFileExtensionCondition.
3504func (drufec DeliveryRuleURLFileExtensionCondition) MarshalJSON() ([]byte, error) {
3505	drufec.Name = NameURLFileExtension
3506	objectMap := make(map[string]interface{})
3507	if drufec.Parameters != nil {
3508		objectMap["parameters"] = drufec.Parameters
3509	}
3510	if drufec.Name != "" {
3511		objectMap["name"] = drufec.Name
3512	}
3513	return json.Marshal(objectMap)
3514}
3515
3516// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3517func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
3518	return nil, false
3519}
3520
3521// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3522func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
3523	return nil, false
3524}
3525
3526// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3527func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
3528	return nil, false
3529}
3530
3531// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3532func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
3533	return nil, false
3534}
3535
3536// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3537func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
3538	return nil, false
3539}
3540
3541// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3542func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
3543	return nil, false
3544}
3545
3546// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3547func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
3548	return nil, false
3549}
3550
3551// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3552func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
3553	return nil, false
3554}
3555
3556// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3557func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
3558	return nil, false
3559}
3560
3561// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3562func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
3563	return &drufec, true
3564}
3565
3566// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3567func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
3568	return nil, false
3569}
3570
3571// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3572func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
3573	return nil, false
3574}
3575
3576// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3577func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
3578	return nil, false
3579}
3580
3581// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3582func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
3583	return nil, false
3584}
3585
3586// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3587func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
3588	return nil, false
3589}
3590
3591// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
3592func (drufec DeliveryRuleURLFileExtensionCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
3593	return &drufec, true
3594}
3595
3596// DeliveryRuleURLFileNameCondition defines the UrlFileName condition for the delivery rule.
3597type DeliveryRuleURLFileNameCondition struct {
3598	// Parameters - Defines the parameters for the condition.
3599	Parameters *URLFileNameMatchConditionParameters `json:"parameters,omitempty"`
3600	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
3601	Name Name `json:"name,omitempty"`
3602}
3603
3604// MarshalJSON is the custom marshaler for DeliveryRuleURLFileNameCondition.
3605func (drufnc DeliveryRuleURLFileNameCondition) MarshalJSON() ([]byte, error) {
3606	drufnc.Name = NameURLFileName
3607	objectMap := make(map[string]interface{})
3608	if drufnc.Parameters != nil {
3609		objectMap["parameters"] = drufnc.Parameters
3610	}
3611	if drufnc.Name != "" {
3612		objectMap["name"] = drufnc.Name
3613	}
3614	return json.Marshal(objectMap)
3615}
3616
3617// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3618func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
3619	return nil, false
3620}
3621
3622// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3623func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
3624	return nil, false
3625}
3626
3627// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3628func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
3629	return nil, false
3630}
3631
3632// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3633func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
3634	return nil, false
3635}
3636
3637// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3638func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
3639	return nil, false
3640}
3641
3642// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3643func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
3644	return nil, false
3645}
3646
3647// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3648func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
3649	return nil, false
3650}
3651
3652// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3653func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
3654	return nil, false
3655}
3656
3657// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3658func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
3659	return nil, false
3660}
3661
3662// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3663func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
3664	return nil, false
3665}
3666
3667// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3668func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
3669	return &drufnc, true
3670}
3671
3672// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3673func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
3674	return nil, false
3675}
3676
3677// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3678func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
3679	return nil, false
3680}
3681
3682// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3683func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
3684	return nil, false
3685}
3686
3687// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3688func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
3689	return nil, false
3690}
3691
3692// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
3693func (drufnc DeliveryRuleURLFileNameCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
3694	return &drufnc, true
3695}
3696
3697// DeliveryRuleURLPathCondition defines the UrlPath condition for the delivery rule.
3698type DeliveryRuleURLPathCondition struct {
3699	// Parameters - Defines the parameters for the condition.
3700	Parameters *URLPathMatchConditionParameters `json:"parameters,omitempty"`
3701	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice'
3702	Name Name `json:"name,omitempty"`
3703}
3704
3705// MarshalJSON is the custom marshaler for DeliveryRuleURLPathCondition.
3706func (drupc DeliveryRuleURLPathCondition) MarshalJSON() ([]byte, error) {
3707	drupc.Name = NameURLPath
3708	objectMap := make(map[string]interface{})
3709	if drupc.Parameters != nil {
3710		objectMap["parameters"] = drupc.Parameters
3711	}
3712	if drupc.Name != "" {
3713		objectMap["name"] = drupc.Name
3714	}
3715	return json.Marshal(objectMap)
3716}
3717
3718// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3719func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
3720	return nil, false
3721}
3722
3723// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3724func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
3725	return nil, false
3726}
3727
3728// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3729func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
3730	return nil, false
3731}
3732
3733// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3734func (drupc DeliveryRuleURLPathCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
3735	return nil, false
3736}
3737
3738// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3739func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
3740	return nil, false
3741}
3742
3743// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3744func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
3745	return nil, false
3746}
3747
3748// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3749func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
3750	return nil, false
3751}
3752
3753// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3754func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
3755	return nil, false
3756}
3757
3758// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3759func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
3760	return &drupc, true
3761}
3762
3763// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3764func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
3765	return nil, false
3766}
3767
3768// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3769func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
3770	return nil, false
3771}
3772
3773// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3774func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) {
3775	return nil, false
3776}
3777
3778// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3779func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) {
3780	return nil, false
3781}
3782
3783// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3784func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
3785	return nil, false
3786}
3787
3788// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3789func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
3790	return nil, false
3791}
3792
3793// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
3794func (drupc DeliveryRuleURLPathCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
3795	return &drupc, true
3796}
3797
3798// EdgeNode edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users.
3799type EdgeNode struct {
3800	*EdgeNodeProperties `json:"properties,omitempty"`
3801	// ID - READ-ONLY; Resource ID.
3802	ID *string `json:"id,omitempty"`
3803	// Name - READ-ONLY; Resource name.
3804	Name *string `json:"name,omitempty"`
3805	// Type - READ-ONLY; Resource type.
3806	Type *string `json:"type,omitempty"`
3807}
3808
3809// MarshalJSON is the custom marshaler for EdgeNode.
3810func (en EdgeNode) MarshalJSON() ([]byte, error) {
3811	objectMap := make(map[string]interface{})
3812	if en.EdgeNodeProperties != nil {
3813		objectMap["properties"] = en.EdgeNodeProperties
3814	}
3815	return json.Marshal(objectMap)
3816}
3817
3818// UnmarshalJSON is the custom unmarshaler for EdgeNode struct.
3819func (en *EdgeNode) UnmarshalJSON(body []byte) error {
3820	var m map[string]*json.RawMessage
3821	err := json.Unmarshal(body, &m)
3822	if err != nil {
3823		return err
3824	}
3825	for k, v := range m {
3826		switch k {
3827		case "properties":
3828			if v != nil {
3829				var edgeNodeProperties EdgeNodeProperties
3830				err = json.Unmarshal(*v, &edgeNodeProperties)
3831				if err != nil {
3832					return err
3833				}
3834				en.EdgeNodeProperties = &edgeNodeProperties
3835			}
3836		case "id":
3837			if v != nil {
3838				var ID string
3839				err = json.Unmarshal(*v, &ID)
3840				if err != nil {
3841					return err
3842				}
3843				en.ID = &ID
3844			}
3845		case "name":
3846			if v != nil {
3847				var name string
3848				err = json.Unmarshal(*v, &name)
3849				if err != nil {
3850					return err
3851				}
3852				en.Name = &name
3853			}
3854		case "type":
3855			if v != nil {
3856				var typeVar string
3857				err = json.Unmarshal(*v, &typeVar)
3858				if err != nil {
3859					return err
3860				}
3861				en.Type = &typeVar
3862			}
3863		}
3864	}
3865
3866	return nil
3867}
3868
3869// EdgeNodeProperties the JSON object that contains the properties required to create an edgenode.
3870type EdgeNodeProperties struct {
3871	// IPAddressGroups - List of ip address groups.
3872	IPAddressGroups *[]IPAddressGroup `json:"ipAddressGroups,omitempty"`
3873}
3874
3875// EdgenodeResult result of the request to list CDN edgenodes. It contains a list of ip address group and a
3876// URL link to get the next set of results.
3877type EdgenodeResult struct {
3878	autorest.Response `json:"-"`
3879	// Value - READ-ONLY; Edge node of CDN service.
3880	Value *[]EdgeNode `json:"value,omitempty"`
3881	// NextLink - URL to get the next set of edgenode list results if there are any.
3882	NextLink *string `json:"nextLink,omitempty"`
3883}
3884
3885// EdgenodeResultIterator provides access to a complete listing of EdgeNode values.
3886type EdgenodeResultIterator struct {
3887	i    int
3888	page EdgenodeResultPage
3889}
3890
3891// NextWithContext advances to the next value.  If there was an error making
3892// the request the iterator does not advance and the error is returned.
3893func (iter *EdgenodeResultIterator) NextWithContext(ctx context.Context) (err error) {
3894	if tracing.IsEnabled() {
3895		ctx = tracing.StartSpan(ctx, fqdn+"/EdgenodeResultIterator.NextWithContext")
3896		defer func() {
3897			sc := -1
3898			if iter.Response().Response.Response != nil {
3899				sc = iter.Response().Response.Response.StatusCode
3900			}
3901			tracing.EndSpan(ctx, sc, err)
3902		}()
3903	}
3904	iter.i++
3905	if iter.i < len(iter.page.Values()) {
3906		return nil
3907	}
3908	err = iter.page.NextWithContext(ctx)
3909	if err != nil {
3910		iter.i--
3911		return err
3912	}
3913	iter.i = 0
3914	return nil
3915}
3916
3917// Next advances to the next value.  If there was an error making
3918// the request the iterator does not advance and the error is returned.
3919// Deprecated: Use NextWithContext() instead.
3920func (iter *EdgenodeResultIterator) Next() error {
3921	return iter.NextWithContext(context.Background())
3922}
3923
3924// NotDone returns true if the enumeration should be started or is not yet complete.
3925func (iter EdgenodeResultIterator) NotDone() bool {
3926	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3927}
3928
3929// Response returns the raw server response from the last page request.
3930func (iter EdgenodeResultIterator) Response() EdgenodeResult {
3931	return iter.page.Response()
3932}
3933
3934// Value returns the current value or a zero-initialized value if the
3935// iterator has advanced beyond the end of the collection.
3936func (iter EdgenodeResultIterator) Value() EdgeNode {
3937	if !iter.page.NotDone() {
3938		return EdgeNode{}
3939	}
3940	return iter.page.Values()[iter.i]
3941}
3942
3943// Creates a new instance of the EdgenodeResultIterator type.
3944func NewEdgenodeResultIterator(page EdgenodeResultPage) EdgenodeResultIterator {
3945	return EdgenodeResultIterator{page: page}
3946}
3947
3948// IsEmpty returns true if the ListResult contains no values.
3949func (er EdgenodeResult) IsEmpty() bool {
3950	return er.Value == nil || len(*er.Value) == 0
3951}
3952
3953// edgenodeResultPreparer prepares a request to retrieve the next set of results.
3954// It returns nil if no more results exist.
3955func (er EdgenodeResult) edgenodeResultPreparer(ctx context.Context) (*http.Request, error) {
3956	if er.NextLink == nil || len(to.String(er.NextLink)) < 1 {
3957		return nil, nil
3958	}
3959	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3960		autorest.AsJSON(),
3961		autorest.AsGet(),
3962		autorest.WithBaseURL(to.String(er.NextLink)))
3963}
3964
3965// EdgenodeResultPage contains a page of EdgeNode values.
3966type EdgenodeResultPage struct {
3967	fn func(context.Context, EdgenodeResult) (EdgenodeResult, error)
3968	er EdgenodeResult
3969}
3970
3971// NextWithContext advances to the next page of values.  If there was an error making
3972// the request the page does not advance and the error is returned.
3973func (page *EdgenodeResultPage) NextWithContext(ctx context.Context) (err error) {
3974	if tracing.IsEnabled() {
3975		ctx = tracing.StartSpan(ctx, fqdn+"/EdgenodeResultPage.NextWithContext")
3976		defer func() {
3977			sc := -1
3978			if page.Response().Response.Response != nil {
3979				sc = page.Response().Response.Response.StatusCode
3980			}
3981			tracing.EndSpan(ctx, sc, err)
3982		}()
3983	}
3984	next, err := page.fn(ctx, page.er)
3985	if err != nil {
3986		return err
3987	}
3988	page.er = next
3989	return nil
3990}
3991
3992// Next advances to the next page of values.  If there was an error making
3993// the request the page does not advance and the error is returned.
3994// Deprecated: Use NextWithContext() instead.
3995func (page *EdgenodeResultPage) Next() error {
3996	return page.NextWithContext(context.Background())
3997}
3998
3999// NotDone returns true if the page enumeration should be started or is not yet complete.
4000func (page EdgenodeResultPage) NotDone() bool {
4001	return !page.er.IsEmpty()
4002}
4003
4004// Response returns the raw server response from the last page request.
4005func (page EdgenodeResultPage) Response() EdgenodeResult {
4006	return page.er
4007}
4008
4009// Values returns the slice of values for the current page or nil if there are no values.
4010func (page EdgenodeResultPage) Values() []EdgeNode {
4011	if page.er.IsEmpty() {
4012		return nil
4013	}
4014	return *page.er.Value
4015}
4016
4017// Creates a new instance of the EdgenodeResultPage type.
4018func NewEdgenodeResultPage(getNextPage func(context.Context, EdgenodeResult) (EdgenodeResult, error)) EdgenodeResultPage {
4019	return EdgenodeResultPage{fn: getNextPage}
4020}
4021
4022// Endpoint CDN endpoint is the entity within a CDN profile containing configuration information such as
4023// origin, protocol, content caching and delivery behavior. The CDN endpoint uses the URL format
4024// <endpointname>.azureedge.net.
4025type Endpoint struct {
4026	autorest.Response   `json:"-"`
4027	*EndpointProperties `json:"properties,omitempty"`
4028	// Location - Resource location.
4029	Location *string `json:"location,omitempty"`
4030	// Tags - Resource tags.
4031	Tags map[string]*string `json:"tags"`
4032	// ID - READ-ONLY; Resource ID.
4033	ID *string `json:"id,omitempty"`
4034	// Name - READ-ONLY; Resource name.
4035	Name *string `json:"name,omitempty"`
4036	// Type - READ-ONLY; Resource type.
4037	Type *string `json:"type,omitempty"`
4038}
4039
4040// MarshalJSON is the custom marshaler for Endpoint.
4041func (e Endpoint) MarshalJSON() ([]byte, error) {
4042	objectMap := make(map[string]interface{})
4043	if e.EndpointProperties != nil {
4044		objectMap["properties"] = e.EndpointProperties
4045	}
4046	if e.Location != nil {
4047		objectMap["location"] = e.Location
4048	}
4049	if e.Tags != nil {
4050		objectMap["tags"] = e.Tags
4051	}
4052	return json.Marshal(objectMap)
4053}
4054
4055// UnmarshalJSON is the custom unmarshaler for Endpoint struct.
4056func (e *Endpoint) UnmarshalJSON(body []byte) error {
4057	var m map[string]*json.RawMessage
4058	err := json.Unmarshal(body, &m)
4059	if err != nil {
4060		return err
4061	}
4062	for k, v := range m {
4063		switch k {
4064		case "properties":
4065			if v != nil {
4066				var endpointProperties EndpointProperties
4067				err = json.Unmarshal(*v, &endpointProperties)
4068				if err != nil {
4069					return err
4070				}
4071				e.EndpointProperties = &endpointProperties
4072			}
4073		case "location":
4074			if v != nil {
4075				var location string
4076				err = json.Unmarshal(*v, &location)
4077				if err != nil {
4078					return err
4079				}
4080				e.Location = &location
4081			}
4082		case "tags":
4083			if v != nil {
4084				var tags map[string]*string
4085				err = json.Unmarshal(*v, &tags)
4086				if err != nil {
4087					return err
4088				}
4089				e.Tags = tags
4090			}
4091		case "id":
4092			if v != nil {
4093				var ID string
4094				err = json.Unmarshal(*v, &ID)
4095				if err != nil {
4096					return err
4097				}
4098				e.ID = &ID
4099			}
4100		case "name":
4101			if v != nil {
4102				var name string
4103				err = json.Unmarshal(*v, &name)
4104				if err != nil {
4105					return err
4106				}
4107				e.Name = &name
4108			}
4109		case "type":
4110			if v != nil {
4111				var typeVar string
4112				err = json.Unmarshal(*v, &typeVar)
4113				if err != nil {
4114					return err
4115				}
4116				e.Type = &typeVar
4117			}
4118		}
4119	}
4120
4121	return nil
4122}
4123
4124// EndpointListResult result of the request to list endpoints. It contains a list of endpoint objects and a
4125// URL link to get the next set of results.
4126type EndpointListResult struct {
4127	autorest.Response `json:"-"`
4128	// Value - READ-ONLY; List of CDN endpoints within a profile
4129	Value *[]Endpoint `json:"value,omitempty"`
4130	// NextLink - URL to get the next set of endpoint objects if there is any.
4131	NextLink *string `json:"nextLink,omitempty"`
4132}
4133
4134// EndpointListResultIterator provides access to a complete listing of Endpoint values.
4135type EndpointListResultIterator struct {
4136	i    int
4137	page EndpointListResultPage
4138}
4139
4140// NextWithContext advances to the next value.  If there was an error making
4141// the request the iterator does not advance and the error is returned.
4142func (iter *EndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
4143	if tracing.IsEnabled() {
4144		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointListResultIterator.NextWithContext")
4145		defer func() {
4146			sc := -1
4147			if iter.Response().Response.Response != nil {
4148				sc = iter.Response().Response.Response.StatusCode
4149			}
4150			tracing.EndSpan(ctx, sc, err)
4151		}()
4152	}
4153	iter.i++
4154	if iter.i < len(iter.page.Values()) {
4155		return nil
4156	}
4157	err = iter.page.NextWithContext(ctx)
4158	if err != nil {
4159		iter.i--
4160		return err
4161	}
4162	iter.i = 0
4163	return nil
4164}
4165
4166// Next advances to the next value.  If there was an error making
4167// the request the iterator does not advance and the error is returned.
4168// Deprecated: Use NextWithContext() instead.
4169func (iter *EndpointListResultIterator) Next() error {
4170	return iter.NextWithContext(context.Background())
4171}
4172
4173// NotDone returns true if the enumeration should be started or is not yet complete.
4174func (iter EndpointListResultIterator) NotDone() bool {
4175	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4176}
4177
4178// Response returns the raw server response from the last page request.
4179func (iter EndpointListResultIterator) Response() EndpointListResult {
4180	return iter.page.Response()
4181}
4182
4183// Value returns the current value or a zero-initialized value if the
4184// iterator has advanced beyond the end of the collection.
4185func (iter EndpointListResultIterator) Value() Endpoint {
4186	if !iter.page.NotDone() {
4187		return Endpoint{}
4188	}
4189	return iter.page.Values()[iter.i]
4190}
4191
4192// Creates a new instance of the EndpointListResultIterator type.
4193func NewEndpointListResultIterator(page EndpointListResultPage) EndpointListResultIterator {
4194	return EndpointListResultIterator{page: page}
4195}
4196
4197// IsEmpty returns true if the ListResult contains no values.
4198func (elr EndpointListResult) IsEmpty() bool {
4199	return elr.Value == nil || len(*elr.Value) == 0
4200}
4201
4202// endpointListResultPreparer prepares a request to retrieve the next set of results.
4203// It returns nil if no more results exist.
4204func (elr EndpointListResult) endpointListResultPreparer(ctx context.Context) (*http.Request, error) {
4205	if elr.NextLink == nil || len(to.String(elr.NextLink)) < 1 {
4206		return nil, nil
4207	}
4208	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4209		autorest.AsJSON(),
4210		autorest.AsGet(),
4211		autorest.WithBaseURL(to.String(elr.NextLink)))
4212}
4213
4214// EndpointListResultPage contains a page of Endpoint values.
4215type EndpointListResultPage struct {
4216	fn  func(context.Context, EndpointListResult) (EndpointListResult, error)
4217	elr EndpointListResult
4218}
4219
4220// NextWithContext advances to the next page of values.  If there was an error making
4221// the request the page does not advance and the error is returned.
4222func (page *EndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
4223	if tracing.IsEnabled() {
4224		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointListResultPage.NextWithContext")
4225		defer func() {
4226			sc := -1
4227			if page.Response().Response.Response != nil {
4228				sc = page.Response().Response.Response.StatusCode
4229			}
4230			tracing.EndSpan(ctx, sc, err)
4231		}()
4232	}
4233	next, err := page.fn(ctx, page.elr)
4234	if err != nil {
4235		return err
4236	}
4237	page.elr = next
4238	return nil
4239}
4240
4241// Next advances to the next page of values.  If there was an error making
4242// the request the page does not advance and the error is returned.
4243// Deprecated: Use NextWithContext() instead.
4244func (page *EndpointListResultPage) Next() error {
4245	return page.NextWithContext(context.Background())
4246}
4247
4248// NotDone returns true if the page enumeration should be started or is not yet complete.
4249func (page EndpointListResultPage) NotDone() bool {
4250	return !page.elr.IsEmpty()
4251}
4252
4253// Response returns the raw server response from the last page request.
4254func (page EndpointListResultPage) Response() EndpointListResult {
4255	return page.elr
4256}
4257
4258// Values returns the slice of values for the current page or nil if there are no values.
4259func (page EndpointListResultPage) Values() []Endpoint {
4260	if page.elr.IsEmpty() {
4261		return nil
4262	}
4263	return *page.elr.Value
4264}
4265
4266// Creates a new instance of the EndpointListResultPage type.
4267func NewEndpointListResultPage(getNextPage func(context.Context, EndpointListResult) (EndpointListResult, error)) EndpointListResultPage {
4268	return EndpointListResultPage{fn: getNextPage}
4269}
4270
4271// EndpointProperties the JSON object that contains the properties required to create an endpoint.
4272type EndpointProperties struct {
4273	// HostName - READ-ONLY; The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net
4274	HostName *string `json:"hostName,omitempty"`
4275	// Origins - The source of the content being delivered via CDN.
4276	Origins *[]DeepCreatedOrigin `json:"origins,omitempty"`
4277	// OriginGroups - The origin groups comprising of origins that are used for load balancing the traffic based on availability.
4278	OriginGroups *[]DeepCreatedOriginGroup `json:"originGroups,omitempty"`
4279	// ResourceState - READ-ONLY; Resource status of the endpoint. Possible values include: 'EndpointResourceStateCreating', 'EndpointResourceStateDeleting', 'EndpointResourceStateRunning', 'EndpointResourceStateStarting', 'EndpointResourceStateStopped', 'EndpointResourceStateStopping'
4280	ResourceState EndpointResourceState `json:"resourceState,omitempty"`
4281	// ProvisioningState - READ-ONLY; Provisioning status of the endpoint.
4282	ProvisioningState *string `json:"provisioningState,omitempty"`
4283	// OriginPath - A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
4284	OriginPath *string `json:"originPath,omitempty"`
4285	// ContentTypesToCompress - List of content types on which compression applies. The value should be a valid MIME type.
4286	ContentTypesToCompress *[]string `json:"contentTypesToCompress,omitempty"`
4287	// OriginHostHeader - The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.
4288	OriginHostHeader *string `json:"originHostHeader,omitempty"`
4289	// IsCompressionEnabled - Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.
4290	IsCompressionEnabled *bool `json:"isCompressionEnabled,omitempty"`
4291	// IsHTTPAllowed - Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
4292	IsHTTPAllowed *bool `json:"isHttpAllowed,omitempty"`
4293	// IsHTTPSAllowed - Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
4294	IsHTTPSAllowed *bool `json:"isHttpsAllowed,omitempty"`
4295	// QueryStringCachingBehavior - Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. Possible values include: 'QueryStringCachingBehaviorIgnoreQueryString', 'QueryStringCachingBehaviorBypassCaching', 'QueryStringCachingBehaviorUseQueryString', 'QueryStringCachingBehaviorNotSet'
4296	QueryStringCachingBehavior QueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"`
4297	// OptimizationType - Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization. Possible values include: 'GeneralWebDelivery', 'GeneralMediaStreaming', 'VideoOnDemandMediaStreaming', 'LargeFileDownload', 'DynamicSiteAcceleration'
4298	OptimizationType OptimizationType `json:"optimizationType,omitempty"`
4299	// ProbePath - Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.
4300	ProbePath *string `json:"probePath,omitempty"`
4301	// GeoFilters - List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/
4302	GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"`
4303	// DefaultOriginGroup - A reference to the origin group.
4304	DefaultOriginGroup *ResourceReference `json:"defaultOriginGroup,omitempty"`
4305	// URLSigningKeys - List of keys used to validate the signed URL hashes.
4306	URLSigningKeys *URLSigningKey `json:"urlSigningKeys,omitempty"`
4307	// DeliveryPolicy - A policy that specifies the delivery rules to be used for an endpoint.
4308	DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy `json:"deliveryPolicy,omitempty"`
4309	// WebApplicationFirewallPolicyLink - Defines the Web Application Firewall policy for the endpoint (if applicable)
4310	WebApplicationFirewallPolicyLink *EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink `json:"webApplicationFirewallPolicyLink,omitempty"`
4311}
4312
4313// EndpointPropertiesUpdateParameters the JSON object containing endpoint update parameters.
4314type EndpointPropertiesUpdateParameters struct {
4315	// OriginPath - A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
4316	OriginPath *string `json:"originPath,omitempty"`
4317	// ContentTypesToCompress - List of content types on which compression applies. The value should be a valid MIME type.
4318	ContentTypesToCompress *[]string `json:"contentTypesToCompress,omitempty"`
4319	// OriginHostHeader - The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.
4320	OriginHostHeader *string `json:"originHostHeader,omitempty"`
4321	// IsCompressionEnabled - Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.
4322	IsCompressionEnabled *bool `json:"isCompressionEnabled,omitempty"`
4323	// IsHTTPAllowed - Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
4324	IsHTTPAllowed *bool `json:"isHttpAllowed,omitempty"`
4325	// IsHTTPSAllowed - Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
4326	IsHTTPSAllowed *bool `json:"isHttpsAllowed,omitempty"`
4327	// QueryStringCachingBehavior - Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. Possible values include: 'QueryStringCachingBehaviorIgnoreQueryString', 'QueryStringCachingBehaviorBypassCaching', 'QueryStringCachingBehaviorUseQueryString', 'QueryStringCachingBehaviorNotSet'
4328	QueryStringCachingBehavior QueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"`
4329	// OptimizationType - Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization. Possible values include: 'GeneralWebDelivery', 'GeneralMediaStreaming', 'VideoOnDemandMediaStreaming', 'LargeFileDownload', 'DynamicSiteAcceleration'
4330	OptimizationType OptimizationType `json:"optimizationType,omitempty"`
4331	// ProbePath - Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.
4332	ProbePath *string `json:"probePath,omitempty"`
4333	// GeoFilters - List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/
4334	GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"`
4335	// DefaultOriginGroup - A reference to the origin group.
4336	DefaultOriginGroup *ResourceReference `json:"defaultOriginGroup,omitempty"`
4337	// URLSigningKeys - List of keys used to validate the signed URL hashes.
4338	URLSigningKeys *URLSigningKey `json:"urlSigningKeys,omitempty"`
4339	// DeliveryPolicy - A policy that specifies the delivery rules to be used for an endpoint.
4340	DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy `json:"deliveryPolicy,omitempty"`
4341	// WebApplicationFirewallPolicyLink - Defines the Web Application Firewall policy for the endpoint (if applicable)
4342	WebApplicationFirewallPolicyLink *EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink `json:"webApplicationFirewallPolicyLink,omitempty"`
4343}
4344
4345// EndpointPropertiesUpdateParametersDeliveryPolicy a policy that specifies the delivery rules to be used
4346// for an endpoint.
4347type EndpointPropertiesUpdateParametersDeliveryPolicy struct {
4348	// Description - User-friendly description of the policy.
4349	Description *string `json:"description,omitempty"`
4350	// Rules - A list of the delivery rules.
4351	Rules *[]DeliveryRule `json:"rules,omitempty"`
4352}
4353
4354// EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink defines the Web Application Firewall
4355// policy for the endpoint (if applicable)
4356type EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink struct {
4357	// ID - Resource ID.
4358	ID *string `json:"id,omitempty"`
4359}
4360
4361// EndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
4362// operation.
4363type EndpointsCreateFuture struct {
4364	azure.Future
4365}
4366
4367// Result returns the result of the asynchronous operation.
4368// If the operation has not completed it will return an error.
4369func (future *EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
4370	var done bool
4371	done, err = future.DoneWithContext(context.Background(), client)
4372	if err != nil {
4373		err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", future.Response(), "Polling failure")
4374		return
4375	}
4376	if !done {
4377		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsCreateFuture")
4378		return
4379	}
4380	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4381	if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
4382		e, err = client.CreateResponder(e.Response.Response)
4383		if err != nil {
4384			err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", e.Response.Response, "Failure responding to request")
4385		}
4386	}
4387	return
4388}
4389
4390// EndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
4391// operation.
4392type EndpointsDeleteFuture struct {
4393	azure.Future
4394}
4395
4396// Result returns the result of the asynchronous operation.
4397// If the operation has not completed it will return an error.
4398func (future *EndpointsDeleteFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
4399	var done bool
4400	done, err = future.DoneWithContext(context.Background(), client)
4401	if err != nil {
4402		err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
4403		return
4404	}
4405	if !done {
4406		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsDeleteFuture")
4407		return
4408	}
4409	ar.Response = future.Response()
4410	return
4411}
4412
4413// EndpointsLoadContentFuture an abstraction for monitoring and retrieving the results of a long-running
4414// operation.
4415type EndpointsLoadContentFuture struct {
4416	azure.Future
4417}
4418
4419// Result returns the result of the asynchronous operation.
4420// If the operation has not completed it will return an error.
4421func (future *EndpointsLoadContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
4422	var done bool
4423	done, err = future.DoneWithContext(context.Background(), client)
4424	if err != nil {
4425		err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", future.Response(), "Polling failure")
4426		return
4427	}
4428	if !done {
4429		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsLoadContentFuture")
4430		return
4431	}
4432	ar.Response = future.Response()
4433	return
4434}
4435
4436// EndpointsPurgeContentFuture an abstraction for monitoring and retrieving the results of a long-running
4437// operation.
4438type EndpointsPurgeContentFuture struct {
4439	azure.Future
4440}
4441
4442// Result returns the result of the asynchronous operation.
4443// If the operation has not completed it will return an error.
4444func (future *EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
4445	var done bool
4446	done, err = future.DoneWithContext(context.Background(), client)
4447	if err != nil {
4448		err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", future.Response(), "Polling failure")
4449		return
4450	}
4451	if !done {
4452		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsPurgeContentFuture")
4453		return
4454	}
4455	ar.Response = future.Response()
4456	return
4457}
4458
4459// EndpointsStartFuture an abstraction for monitoring and retrieving the results of a long-running
4460// operation.
4461type EndpointsStartFuture struct {
4462	azure.Future
4463}
4464
4465// Result returns the result of the asynchronous operation.
4466// If the operation has not completed it will return an error.
4467func (future *EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, err error) {
4468	var done bool
4469	done, err = future.DoneWithContext(context.Background(), client)
4470	if err != nil {
4471		err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", future.Response(), "Polling failure")
4472		return
4473	}
4474	if !done {
4475		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStartFuture")
4476		return
4477	}
4478	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4479	if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
4480		e, err = client.StartResponder(e.Response.Response)
4481		if err != nil {
4482			err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", e.Response.Response, "Failure responding to request")
4483		}
4484	}
4485	return
4486}
4487
4488// EndpointsStopFuture an abstraction for monitoring and retrieving the results of a long-running
4489// operation.
4490type EndpointsStopFuture struct {
4491	azure.Future
4492}
4493
4494// Result returns the result of the asynchronous operation.
4495// If the operation has not completed it will return an error.
4496func (future *EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, err error) {
4497	var done bool
4498	done, err = future.DoneWithContext(context.Background(), client)
4499	if err != nil {
4500		err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", future.Response(), "Polling failure")
4501		return
4502	}
4503	if !done {
4504		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStopFuture")
4505		return
4506	}
4507	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4508	if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
4509		e, err = client.StopResponder(e.Response.Response)
4510		if err != nil {
4511			err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", e.Response.Response, "Failure responding to request")
4512		}
4513	}
4514	return
4515}
4516
4517// EndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
4518// operation.
4519type EndpointsUpdateFuture struct {
4520	azure.Future
4521}
4522
4523// Result returns the result of the asynchronous operation.
4524// If the operation has not completed it will return an error.
4525func (future *EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
4526	var done bool
4527	done, err = future.DoneWithContext(context.Background(), client)
4528	if err != nil {
4529		err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", future.Response(), "Polling failure")
4530		return
4531	}
4532	if !done {
4533		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsUpdateFuture")
4534		return
4535	}
4536	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4537	if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
4538		e, err = client.UpdateResponder(e.Response.Response)
4539		if err != nil {
4540			err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", e.Response.Response, "Failure responding to request")
4541		}
4542	}
4543	return
4544}
4545
4546// EndpointType defines the ARM Resource ID for the linked endpoints
4547type EndpointType struct {
4548	// ID - ARM Resource ID string.
4549	ID *string `json:"id,omitempty"`
4550}
4551
4552// EndpointUpdateParameters properties required to create or update an endpoint.
4553type EndpointUpdateParameters struct {
4554	// Tags - Endpoint tags.
4555	Tags                                map[string]*string `json:"tags"`
4556	*EndpointPropertiesUpdateParameters `json:"properties,omitempty"`
4557}
4558
4559// MarshalJSON is the custom marshaler for EndpointUpdateParameters.
4560func (eup EndpointUpdateParameters) MarshalJSON() ([]byte, error) {
4561	objectMap := make(map[string]interface{})
4562	if eup.Tags != nil {
4563		objectMap["tags"] = eup.Tags
4564	}
4565	if eup.EndpointPropertiesUpdateParameters != nil {
4566		objectMap["properties"] = eup.EndpointPropertiesUpdateParameters
4567	}
4568	return json.Marshal(objectMap)
4569}
4570
4571// UnmarshalJSON is the custom unmarshaler for EndpointUpdateParameters struct.
4572func (eup *EndpointUpdateParameters) UnmarshalJSON(body []byte) error {
4573	var m map[string]*json.RawMessage
4574	err := json.Unmarshal(body, &m)
4575	if err != nil {
4576		return err
4577	}
4578	for k, v := range m {
4579		switch k {
4580		case "tags":
4581			if v != nil {
4582				var tags map[string]*string
4583				err = json.Unmarshal(*v, &tags)
4584				if err != nil {
4585					return err
4586				}
4587				eup.Tags = tags
4588			}
4589		case "properties":
4590			if v != nil {
4591				var endpointPropertiesUpdateParameters EndpointPropertiesUpdateParameters
4592				err = json.Unmarshal(*v, &endpointPropertiesUpdateParameters)
4593				if err != nil {
4594					return err
4595				}
4596				eup.EndpointPropertiesUpdateParameters = &endpointPropertiesUpdateParameters
4597			}
4598		}
4599	}
4600
4601	return nil
4602}
4603
4604// ErrorResponse error response indicates CDN service is not able to process the incoming request. The
4605// reason is provided in the error message.
4606type ErrorResponse struct {
4607	// Code - READ-ONLY; Error code.
4608	Code *string `json:"code,omitempty"`
4609	// Message - READ-ONLY; Error message indicating why the operation failed.
4610	Message *string `json:"message,omitempty"`
4611}
4612
4613// GeoFilter rules defining user's geo access within a CDN endpoint.
4614type GeoFilter struct {
4615	// RelativePath - Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.)
4616	RelativePath *string `json:"relativePath,omitempty"`
4617	// Action - Action of the geo filter, i.e. allow or block access. Possible values include: 'GeoFilterActionsBlock', 'GeoFilterActionsAllow'
4618	Action GeoFilterActions `json:"action,omitempty"`
4619	// CountryCodes - Two letter country codes defining user country access in a geo filter, e.g. AU, MX, US.
4620	CountryCodes *[]string `json:"countryCodes,omitempty"`
4621}
4622
4623// HeaderActionParameters defines the parameters for the request header action.
4624type HeaderActionParameters struct {
4625	OdataType *string `json:"@odata.type,omitempty"`
4626	// HeaderAction - Action to perform. Possible values include: 'Append', 'Overwrite', 'Delete'
4627	HeaderAction HeaderAction `json:"headerAction,omitempty"`
4628	// HeaderName - Name of the header to modify
4629	HeaderName *string `json:"headerName,omitempty"`
4630	// Value - Value for the specified action
4631	Value *string `json:"value,omitempty"`
4632}
4633
4634// HealthProbeParameters the JSON object that contains the properties to send health probes to origin.
4635type HealthProbeParameters struct {
4636	// ProbePath - The path relative to the origin that is used to determine the health of the origin.
4637	ProbePath *string `json:"probePath,omitempty"`
4638	// ProbeRequestType - The type of health probe request that is made. Possible values include: 'NotSet', 'GET', 'HEAD'
4639	ProbeRequestType HealthProbeRequestType `json:"probeRequestType,omitempty"`
4640	// ProbeProtocol - Protocol to use for health probe. Possible values include: 'ProbeProtocolNotSet', 'ProbeProtocolHTTP', 'ProbeProtocolHTTPS'
4641	ProbeProtocol ProbeProtocol `json:"probeProtocol,omitempty"`
4642	// ProbeIntervalInSeconds - The number of seconds between health probes.Default is 240sec.
4643	ProbeIntervalInSeconds *int32 `json:"probeIntervalInSeconds,omitempty"`
4644}
4645
4646// HTTPErrorRangeParameters the JSON object that represents the range for http status codes
4647type HTTPErrorRangeParameters struct {
4648	// Begin - The inclusive start of the http status code range.
4649	Begin *int32 `json:"begin,omitempty"`
4650	// End - The inclusive end of the http status code range.
4651	End *int32 `json:"end,omitempty"`
4652}
4653
4654// HTTPVersionMatchConditionParameters defines the parameters for HttpVersion match conditions
4655type HTTPVersionMatchConditionParameters struct {
4656	OdataType *string `json:"@odata.type,omitempty"`
4657	// Operator - Describes operator to be matched
4658	Operator *string `json:"operator,omitempty"`
4659	// NegateCondition - Describes if this is negate condition or not
4660	NegateCondition *bool `json:"negateCondition,omitempty"`
4661	// MatchValues - The match value for the condition of the delivery rule
4662	MatchValues *[]string `json:"matchValues,omitempty"`
4663}
4664
4665// IPAddressGroup CDN Ip address group
4666type IPAddressGroup struct {
4667	// DeliveryRegion - The delivery region of the ip address group
4668	DeliveryRegion *string `json:"deliveryRegion,omitempty"`
4669	// Ipv4Addresses - The list of ip v4 addresses.
4670	Ipv4Addresses *[]CidrIPAddress `json:"ipv4Addresses,omitempty"`
4671	// Ipv6Addresses - The list of ip v6 addresses.
4672	Ipv6Addresses *[]CidrIPAddress `json:"ipv6Addresses,omitempty"`
4673}
4674
4675// IsDeviceMatchConditionParameters defines the parameters for IsDevice match conditions
4676type IsDeviceMatchConditionParameters struct {
4677	OdataType *string `json:"@odata.type,omitempty"`
4678	// Operator - Describes operator to be matched
4679	Operator *string `json:"operator,omitempty"`
4680	// NegateCondition - Describes if this is negate condition or not
4681	NegateCondition *bool `json:"negateCondition,omitempty"`
4682	// MatchValues - The match value for the condition of the delivery rule
4683	MatchValues *[]string `json:"matchValues,omitempty"`
4684	// Transforms - List of transforms
4685	Transforms *[]Transform `json:"transforms,omitempty"`
4686}
4687
4688// KeyVaultCertificateSourceParameters describes the parameters for using a user's KeyVault certificate for
4689// securing custom domain.
4690type KeyVaultCertificateSourceParameters struct {
4691	OdataType *string `json:"@odata.type,omitempty"`
4692	// SubscriptionID - Subscription Id of the user's Key Vault containing the SSL certificate
4693	SubscriptionID *string `json:"subscriptionId,omitempty"`
4694	// ResourceGroupName - Resource group of the user's Key Vault containing the SSL certificate
4695	ResourceGroupName *string `json:"resourceGroupName,omitempty"`
4696	// VaultName - The name of the user's Key Vault containing the SSL certificate
4697	VaultName *string `json:"vaultName,omitempty"`
4698	// SecretName - The name of Key Vault Secret (representing the full certificate PFX) in Key Vault.
4699	SecretName *string `json:"secretName,omitempty"`
4700	// SecretVersion - The version(GUID) of Key Vault Secret in Key Vault.
4701	SecretVersion *string `json:"secretVersion,omitempty"`
4702	// UpdateRule - Describes the action that shall be taken when the certificate is updated in Key Vault.
4703	UpdateRule *string `json:"updateRule,omitempty"`
4704	// DeleteRule - Describes the action that shall be taken when the certificate is removed from Key Vault.
4705	DeleteRule *string `json:"deleteRule,omitempty"`
4706}
4707
4708// KeyVaultSigningKeyParameters describes the parameters for using a user's KeyVault for URL Signing Key.
4709type KeyVaultSigningKeyParameters struct {
4710	OdataType *string `json:"@odata.type,omitempty"`
4711	// SubscriptionID - Subscription Id of the user's Key Vault containing the secret
4712	SubscriptionID *string `json:"subscriptionId,omitempty"`
4713	// ResourceGroupName - Resource group of the user's Key Vault containing the secret
4714	ResourceGroupName *string `json:"resourceGroupName,omitempty"`
4715	// VaultName - The name of the user's Key Vault containing the secret
4716	VaultName *string `json:"vaultName,omitempty"`
4717	// SecretName - The name of secret in Key Vault.
4718	SecretName *string `json:"secretName,omitempty"`
4719	// SecretVersion - The version(GUID) of secret in Key Vault.
4720	SecretVersion *string `json:"secretVersion,omitempty"`
4721}
4722
4723// LoadParameters parameters required for content load.
4724type LoadParameters struct {
4725	// ContentPaths - The path to the content to be loaded. Path should be a relative file URL of the origin.
4726	ContentPaths *[]string `json:"contentPaths,omitempty"`
4727}
4728
4729// ManagedHTTPSParameters defines the certificate source parameters using CDN managed certificate for
4730// enabling SSL.
4731type ManagedHTTPSParameters struct {
4732	// CertificateSourceParameters - Defines the certificate source parameters using CDN managed certificate for enabling SSL.
4733	CertificateSourceParameters *CertificateSourceParameters `json:"certificateSourceParameters,omitempty"`
4734	// ProtocolType - Defines the TLS extension protocol that is used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased'
4735	ProtocolType ProtocolType `json:"protocolType,omitempty"`
4736	// MinimumTLSVersion - TLS protocol version that will be used for Https. Possible values include: 'None', 'TLS10', 'TLS12'
4737	MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"`
4738	// CertificateSource - Possible values include: 'CertificateSourceCustomDomainHTTPSParameters', 'CertificateSourceCdn', 'CertificateSourceAzureKeyVault'
4739	CertificateSource CertificateSource `json:"certificateSource,omitempty"`
4740}
4741
4742// MarshalJSON is the custom marshaler for ManagedHTTPSParameters.
4743func (mhp ManagedHTTPSParameters) MarshalJSON() ([]byte, error) {
4744	mhp.CertificateSource = CertificateSourceCdn
4745	objectMap := make(map[string]interface{})
4746	if mhp.CertificateSourceParameters != nil {
4747		objectMap["certificateSourceParameters"] = mhp.CertificateSourceParameters
4748	}
4749	if mhp.ProtocolType != "" {
4750		objectMap["protocolType"] = mhp.ProtocolType
4751	}
4752	if mhp.MinimumTLSVersion != "" {
4753		objectMap["minimumTlsVersion"] = mhp.MinimumTLSVersion
4754	}
4755	if mhp.CertificateSource != "" {
4756		objectMap["certificateSource"] = mhp.CertificateSource
4757	}
4758	return json.Marshal(objectMap)
4759}
4760
4761// AsManagedHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for ManagedHTTPSParameters.
4762func (mhp ManagedHTTPSParameters) AsManagedHTTPSParameters() (*ManagedHTTPSParameters, bool) {
4763	return &mhp, true
4764}
4765
4766// AsUserManagedHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for ManagedHTTPSParameters.
4767func (mhp ManagedHTTPSParameters) AsUserManagedHTTPSParameters() (*UserManagedHTTPSParameters, bool) {
4768	return nil, false
4769}
4770
4771// AsCustomDomainHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for ManagedHTTPSParameters.
4772func (mhp ManagedHTTPSParameters) AsCustomDomainHTTPSParameters() (*CustomDomainHTTPSParameters, bool) {
4773	return nil, false
4774}
4775
4776// AsBasicCustomDomainHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for ManagedHTTPSParameters.
4777func (mhp ManagedHTTPSParameters) AsBasicCustomDomainHTTPSParameters() (BasicCustomDomainHTTPSParameters, bool) {
4778	return &mhp, true
4779}
4780
4781// ManagedRuleDefinition describes a managed rule definition.
4782type ManagedRuleDefinition struct {
4783	// RuleID - READ-ONLY; Identifier for the managed rule.
4784	RuleID *string `json:"ruleId,omitempty"`
4785	// Description - READ-ONLY; Describes the functionality of the managed rule.
4786	Description *string `json:"description,omitempty"`
4787}
4788
4789// ManagedRuleGroupDefinition describes a managed rule group.
4790type ManagedRuleGroupDefinition struct {
4791	// RuleGroupName - READ-ONLY; Name of the managed rule group.
4792	RuleGroupName *string `json:"ruleGroupName,omitempty"`
4793	// Description - READ-ONLY; Description of the managed rule group.
4794	Description *string `json:"description,omitempty"`
4795	// Rules - READ-ONLY; List of rules within the managed rule group.
4796	Rules *[]ManagedRuleDefinition `json:"rules,omitempty"`
4797}
4798
4799// ManagedRuleGroupOverride defines a managed rule group override setting.
4800type ManagedRuleGroupOverride struct {
4801	// RuleGroupName - Describes the managed rule group within the rule set to override
4802	RuleGroupName *string `json:"ruleGroupName,omitempty"`
4803	// Rules - List of rules that will be disabled. If none specified, all rules in the group will be disabled.
4804	Rules *[]ManagedRuleOverride `json:"rules,omitempty"`
4805}
4806
4807// ManagedRuleOverride defines a managed rule group override setting.
4808type ManagedRuleOverride struct {
4809	// RuleID - Identifier for the managed rule.
4810	RuleID *string `json:"ruleId,omitempty"`
4811	// EnabledState - Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. Possible values include: 'ManagedRuleEnabledStateDisabled', 'ManagedRuleEnabledStateEnabled'
4812	EnabledState ManagedRuleEnabledState `json:"enabledState,omitempty"`
4813	// Action - Describes the override action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect'
4814	Action ActionType `json:"action,omitempty"`
4815}
4816
4817// ManagedRuleSet defines a managed rule set.
4818type ManagedRuleSet struct {
4819	// RuleSetType - Defines the rule set type to use.
4820	RuleSetType *string `json:"ruleSetType,omitempty"`
4821	// RuleSetVersion - Defines the version of the rule set to use.
4822	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
4823	// AnomalyScore - Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests.
4824	AnomalyScore *int32 `json:"anomalyScore,omitempty"`
4825	// RuleGroupOverrides - Defines the rule overrides to apply to the rule set.
4826	RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"`
4827}
4828
4829// ManagedRuleSetDefinition describes a managed rule set definition.
4830type ManagedRuleSetDefinition struct {
4831	// ManagedRuleSetDefinitionProperties - Describes managed rule set definition properties.
4832	*ManagedRuleSetDefinitionProperties `json:"properties,omitempty"`
4833	// Sku - The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy.
4834	Sku *Sku `json:"sku,omitempty"`
4835	// ID - READ-ONLY; Resource ID.
4836	ID *string `json:"id,omitempty"`
4837	// Name - READ-ONLY; Resource name.
4838	Name *string `json:"name,omitempty"`
4839	// Type - READ-ONLY; Resource type.
4840	Type *string `json:"type,omitempty"`
4841}
4842
4843// MarshalJSON is the custom marshaler for ManagedRuleSetDefinition.
4844func (mrsd ManagedRuleSetDefinition) MarshalJSON() ([]byte, error) {
4845	objectMap := make(map[string]interface{})
4846	if mrsd.ManagedRuleSetDefinitionProperties != nil {
4847		objectMap["properties"] = mrsd.ManagedRuleSetDefinitionProperties
4848	}
4849	if mrsd.Sku != nil {
4850		objectMap["sku"] = mrsd.Sku
4851	}
4852	return json.Marshal(objectMap)
4853}
4854
4855// UnmarshalJSON is the custom unmarshaler for ManagedRuleSetDefinition struct.
4856func (mrsd *ManagedRuleSetDefinition) UnmarshalJSON(body []byte) error {
4857	var m map[string]*json.RawMessage
4858	err := json.Unmarshal(body, &m)
4859	if err != nil {
4860		return err
4861	}
4862	for k, v := range m {
4863		switch k {
4864		case "properties":
4865			if v != nil {
4866				var managedRuleSetDefinitionProperties ManagedRuleSetDefinitionProperties
4867				err = json.Unmarshal(*v, &managedRuleSetDefinitionProperties)
4868				if err != nil {
4869					return err
4870				}
4871				mrsd.ManagedRuleSetDefinitionProperties = &managedRuleSetDefinitionProperties
4872			}
4873		case "sku":
4874			if v != nil {
4875				var sku Sku
4876				err = json.Unmarshal(*v, &sku)
4877				if err != nil {
4878					return err
4879				}
4880				mrsd.Sku = &sku
4881			}
4882		case "id":
4883			if v != nil {
4884				var ID string
4885				err = json.Unmarshal(*v, &ID)
4886				if err != nil {
4887					return err
4888				}
4889				mrsd.ID = &ID
4890			}
4891		case "name":
4892			if v != nil {
4893				var name string
4894				err = json.Unmarshal(*v, &name)
4895				if err != nil {
4896					return err
4897				}
4898				mrsd.Name = &name
4899			}
4900		case "type":
4901			if v != nil {
4902				var typeVar string
4903				err = json.Unmarshal(*v, &typeVar)
4904				if err != nil {
4905					return err
4906				}
4907				mrsd.Type = &typeVar
4908			}
4909		}
4910	}
4911
4912	return nil
4913}
4914
4915// ManagedRuleSetDefinitionList list of managed rule set definitions available for use in a policy.
4916type ManagedRuleSetDefinitionList struct {
4917	autorest.Response `json:"-"`
4918	// Value - READ-ONLY; List of managed rule set definitions.
4919	Value *[]ManagedRuleSetDefinition `json:"value,omitempty"`
4920	// NextLink - URL to retrieve next set of managed rule set definitions.
4921	NextLink *string `json:"nextLink,omitempty"`
4922}
4923
4924// ManagedRuleSetDefinitionListIterator provides access to a complete listing of ManagedRuleSetDefinition
4925// values.
4926type ManagedRuleSetDefinitionListIterator struct {
4927	i    int
4928	page ManagedRuleSetDefinitionListPage
4929}
4930
4931// NextWithContext advances to the next value.  If there was an error making
4932// the request the iterator does not advance and the error is returned.
4933func (iter *ManagedRuleSetDefinitionListIterator) NextWithContext(ctx context.Context) (err error) {
4934	if tracing.IsEnabled() {
4935		ctx = tracing.StartSpan(ctx, fqdn+"/ManagedRuleSetDefinitionListIterator.NextWithContext")
4936		defer func() {
4937			sc := -1
4938			if iter.Response().Response.Response != nil {
4939				sc = iter.Response().Response.Response.StatusCode
4940			}
4941			tracing.EndSpan(ctx, sc, err)
4942		}()
4943	}
4944	iter.i++
4945	if iter.i < len(iter.page.Values()) {
4946		return nil
4947	}
4948	err = iter.page.NextWithContext(ctx)
4949	if err != nil {
4950		iter.i--
4951		return err
4952	}
4953	iter.i = 0
4954	return nil
4955}
4956
4957// Next advances to the next value.  If there was an error making
4958// the request the iterator does not advance and the error is returned.
4959// Deprecated: Use NextWithContext() instead.
4960func (iter *ManagedRuleSetDefinitionListIterator) Next() error {
4961	return iter.NextWithContext(context.Background())
4962}
4963
4964// NotDone returns true if the enumeration should be started or is not yet complete.
4965func (iter ManagedRuleSetDefinitionListIterator) NotDone() bool {
4966	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4967}
4968
4969// Response returns the raw server response from the last page request.
4970func (iter ManagedRuleSetDefinitionListIterator) Response() ManagedRuleSetDefinitionList {
4971	return iter.page.Response()
4972}
4973
4974// Value returns the current value or a zero-initialized value if the
4975// iterator has advanced beyond the end of the collection.
4976func (iter ManagedRuleSetDefinitionListIterator) Value() ManagedRuleSetDefinition {
4977	if !iter.page.NotDone() {
4978		return ManagedRuleSetDefinition{}
4979	}
4980	return iter.page.Values()[iter.i]
4981}
4982
4983// Creates a new instance of the ManagedRuleSetDefinitionListIterator type.
4984func NewManagedRuleSetDefinitionListIterator(page ManagedRuleSetDefinitionListPage) ManagedRuleSetDefinitionListIterator {
4985	return ManagedRuleSetDefinitionListIterator{page: page}
4986}
4987
4988// IsEmpty returns true if the ListResult contains no values.
4989func (mrsdl ManagedRuleSetDefinitionList) IsEmpty() bool {
4990	return mrsdl.Value == nil || len(*mrsdl.Value) == 0
4991}
4992
4993// managedRuleSetDefinitionListPreparer prepares a request to retrieve the next set of results.
4994// It returns nil if no more results exist.
4995func (mrsdl ManagedRuleSetDefinitionList) managedRuleSetDefinitionListPreparer(ctx context.Context) (*http.Request, error) {
4996	if mrsdl.NextLink == nil || len(to.String(mrsdl.NextLink)) < 1 {
4997		return nil, nil
4998	}
4999	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5000		autorest.AsJSON(),
5001		autorest.AsGet(),
5002		autorest.WithBaseURL(to.String(mrsdl.NextLink)))
5003}
5004
5005// ManagedRuleSetDefinitionListPage contains a page of ManagedRuleSetDefinition values.
5006type ManagedRuleSetDefinitionListPage struct {
5007	fn    func(context.Context, ManagedRuleSetDefinitionList) (ManagedRuleSetDefinitionList, error)
5008	mrsdl ManagedRuleSetDefinitionList
5009}
5010
5011// NextWithContext advances to the next page of values.  If there was an error making
5012// the request the page does not advance and the error is returned.
5013func (page *ManagedRuleSetDefinitionListPage) NextWithContext(ctx context.Context) (err error) {
5014	if tracing.IsEnabled() {
5015		ctx = tracing.StartSpan(ctx, fqdn+"/ManagedRuleSetDefinitionListPage.NextWithContext")
5016		defer func() {
5017			sc := -1
5018			if page.Response().Response.Response != nil {
5019				sc = page.Response().Response.Response.StatusCode
5020			}
5021			tracing.EndSpan(ctx, sc, err)
5022		}()
5023	}
5024	next, err := page.fn(ctx, page.mrsdl)
5025	if err != nil {
5026		return err
5027	}
5028	page.mrsdl = next
5029	return nil
5030}
5031
5032// Next advances to the next page of values.  If there was an error making
5033// the request the page does not advance and the error is returned.
5034// Deprecated: Use NextWithContext() instead.
5035func (page *ManagedRuleSetDefinitionListPage) Next() error {
5036	return page.NextWithContext(context.Background())
5037}
5038
5039// NotDone returns true if the page enumeration should be started or is not yet complete.
5040func (page ManagedRuleSetDefinitionListPage) NotDone() bool {
5041	return !page.mrsdl.IsEmpty()
5042}
5043
5044// Response returns the raw server response from the last page request.
5045func (page ManagedRuleSetDefinitionListPage) Response() ManagedRuleSetDefinitionList {
5046	return page.mrsdl
5047}
5048
5049// Values returns the slice of values for the current page or nil if there are no values.
5050func (page ManagedRuleSetDefinitionListPage) Values() []ManagedRuleSetDefinition {
5051	if page.mrsdl.IsEmpty() {
5052		return nil
5053	}
5054	return *page.mrsdl.Value
5055}
5056
5057// Creates a new instance of the ManagedRuleSetDefinitionListPage type.
5058func NewManagedRuleSetDefinitionListPage(getNextPage func(context.Context, ManagedRuleSetDefinitionList) (ManagedRuleSetDefinitionList, error)) ManagedRuleSetDefinitionListPage {
5059	return ManagedRuleSetDefinitionListPage{fn: getNextPage}
5060}
5061
5062// ManagedRuleSetDefinitionProperties properties for a managed rule set definition.
5063type ManagedRuleSetDefinitionProperties struct {
5064	// ProvisioningState - READ-ONLY; Provisioning state of the managed rule set.
5065	ProvisioningState *string `json:"provisioningState,omitempty"`
5066	// RuleSetType - READ-ONLY; Type of the managed rule set.
5067	RuleSetType *string `json:"ruleSetType,omitempty"`
5068	// RuleSetVersion - READ-ONLY; Version of the managed rule set type.
5069	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
5070	// RuleGroups - READ-ONLY; Rule groups of the managed rule set.
5071	RuleGroups *[]ManagedRuleGroupDefinition `json:"ruleGroups,omitempty"`
5072}
5073
5074// ManagedRuleSetList defines the list of managed rule sets for the policy.
5075type ManagedRuleSetList struct {
5076	// ManagedRuleSets - List of rule sets.
5077	ManagedRuleSets *[]ManagedRuleSet `json:"managedRuleSets,omitempty"`
5078}
5079
5080// MatchCondition define match conditions
5081type MatchCondition struct {
5082	// MatchVariable - Match variable to compare against. Possible values include: 'RemoteAddr', 'SocketAddr', 'RequestMethod', 'RequestHeader', 'RequestURI', 'QueryString', 'RequestBody', 'Cookies', 'PostArgs'
5083	MatchVariable MatchVariable `json:"matchVariable,omitempty"`
5084	// Selector - Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.
5085	Selector *string `json:"selector,omitempty"`
5086	// Operator - Describes operator to be matched. Possible values include: 'OperatorAny', 'OperatorIPMatch', 'OperatorGeoMatch', 'OperatorEqual', 'OperatorContains', 'OperatorLessThan', 'OperatorGreaterThan', 'OperatorLessThanOrEqual', 'OperatorGreaterThanOrEqual', 'OperatorBeginsWith', 'OperatorEndsWith', 'OperatorRegEx'
5087	Operator Operator `json:"operator,omitempty"`
5088	// NegateCondition - Describes if the result of this condition should be negated.
5089	NegateCondition *bool `json:"negateCondition,omitempty"`
5090	// MatchValue - List of possible match values.
5091	MatchValue *[]string `json:"matchValue,omitempty"`
5092	// Transforms - List of transforms.
5093	Transforms *[]TransformType `json:"transforms,omitempty"`
5094}
5095
5096// Operation CDN REST API operation
5097type Operation struct {
5098	// Name - READ-ONLY; Operation name: {provider}/{resource}/{operation}
5099	Name *string `json:"name,omitempty"`
5100	// Display - The object that represents the operation.
5101	Display *OperationDisplay `json:"display,omitempty"`
5102}
5103
5104// OperationDisplay the object that represents the operation.
5105type OperationDisplay struct {
5106	// Provider - READ-ONLY; Service provider: Microsoft.Cdn
5107	Provider *string `json:"provider,omitempty"`
5108	// Resource - READ-ONLY; Resource on which the operation is performed: Profile, endpoint, etc.
5109	Resource *string `json:"resource,omitempty"`
5110	// Operation - READ-ONLY; Operation type: Read, write, delete, etc.
5111	Operation *string `json:"operation,omitempty"`
5112}
5113
5114// OperationsListResult result of the request to list CDN operations. It contains a list of operations and
5115// a URL link to get the next set of results.
5116type OperationsListResult struct {
5117	autorest.Response `json:"-"`
5118	// Value - READ-ONLY; List of CDN operations supported by the CDN resource provider.
5119	Value *[]Operation `json:"value,omitempty"`
5120	// NextLink - URL to get the next set of operation list results if there are any.
5121	NextLink *string `json:"nextLink,omitempty"`
5122}
5123
5124// OperationsListResultIterator provides access to a complete listing of Operation values.
5125type OperationsListResultIterator struct {
5126	i    int
5127	page OperationsListResultPage
5128}
5129
5130// NextWithContext advances to the next value.  If there was an error making
5131// the request the iterator does not advance and the error is returned.
5132func (iter *OperationsListResultIterator) NextWithContext(ctx context.Context) (err error) {
5133	if tracing.IsEnabled() {
5134		ctx = tracing.StartSpan(ctx, fqdn+"/OperationsListResultIterator.NextWithContext")
5135		defer func() {
5136			sc := -1
5137			if iter.Response().Response.Response != nil {
5138				sc = iter.Response().Response.Response.StatusCode
5139			}
5140			tracing.EndSpan(ctx, sc, err)
5141		}()
5142	}
5143	iter.i++
5144	if iter.i < len(iter.page.Values()) {
5145		return nil
5146	}
5147	err = iter.page.NextWithContext(ctx)
5148	if err != nil {
5149		iter.i--
5150		return err
5151	}
5152	iter.i = 0
5153	return nil
5154}
5155
5156// Next advances to the next value.  If there was an error making
5157// the request the iterator does not advance and the error is returned.
5158// Deprecated: Use NextWithContext() instead.
5159func (iter *OperationsListResultIterator) Next() error {
5160	return iter.NextWithContext(context.Background())
5161}
5162
5163// NotDone returns true if the enumeration should be started or is not yet complete.
5164func (iter OperationsListResultIterator) NotDone() bool {
5165	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5166}
5167
5168// Response returns the raw server response from the last page request.
5169func (iter OperationsListResultIterator) Response() OperationsListResult {
5170	return iter.page.Response()
5171}
5172
5173// Value returns the current value or a zero-initialized value if the
5174// iterator has advanced beyond the end of the collection.
5175func (iter OperationsListResultIterator) Value() Operation {
5176	if !iter.page.NotDone() {
5177		return Operation{}
5178	}
5179	return iter.page.Values()[iter.i]
5180}
5181
5182// Creates a new instance of the OperationsListResultIterator type.
5183func NewOperationsListResultIterator(page OperationsListResultPage) OperationsListResultIterator {
5184	return OperationsListResultIterator{page: page}
5185}
5186
5187// IsEmpty returns true if the ListResult contains no values.
5188func (olr OperationsListResult) IsEmpty() bool {
5189	return olr.Value == nil || len(*olr.Value) == 0
5190}
5191
5192// operationsListResultPreparer prepares a request to retrieve the next set of results.
5193// It returns nil if no more results exist.
5194func (olr OperationsListResult) operationsListResultPreparer(ctx context.Context) (*http.Request, error) {
5195	if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
5196		return nil, nil
5197	}
5198	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5199		autorest.AsJSON(),
5200		autorest.AsGet(),
5201		autorest.WithBaseURL(to.String(olr.NextLink)))
5202}
5203
5204// OperationsListResultPage contains a page of Operation values.
5205type OperationsListResultPage struct {
5206	fn  func(context.Context, OperationsListResult) (OperationsListResult, error)
5207	olr OperationsListResult
5208}
5209
5210// NextWithContext advances to the next page of values.  If there was an error making
5211// the request the page does not advance and the error is returned.
5212func (page *OperationsListResultPage) NextWithContext(ctx context.Context) (err error) {
5213	if tracing.IsEnabled() {
5214		ctx = tracing.StartSpan(ctx, fqdn+"/OperationsListResultPage.NextWithContext")
5215		defer func() {
5216			sc := -1
5217			if page.Response().Response.Response != nil {
5218				sc = page.Response().Response.Response.StatusCode
5219			}
5220			tracing.EndSpan(ctx, sc, err)
5221		}()
5222	}
5223	next, err := page.fn(ctx, page.olr)
5224	if err != nil {
5225		return err
5226	}
5227	page.olr = next
5228	return nil
5229}
5230
5231// Next advances to the next page of values.  If there was an error making
5232// the request the page does not advance and the error is returned.
5233// Deprecated: Use NextWithContext() instead.
5234func (page *OperationsListResultPage) Next() error {
5235	return page.NextWithContext(context.Background())
5236}
5237
5238// NotDone returns true if the page enumeration should be started or is not yet complete.
5239func (page OperationsListResultPage) NotDone() bool {
5240	return !page.olr.IsEmpty()
5241}
5242
5243// Response returns the raw server response from the last page request.
5244func (page OperationsListResultPage) Response() OperationsListResult {
5245	return page.olr
5246}
5247
5248// Values returns the slice of values for the current page or nil if there are no values.
5249func (page OperationsListResultPage) Values() []Operation {
5250	if page.olr.IsEmpty() {
5251		return nil
5252	}
5253	return *page.olr.Value
5254}
5255
5256// Creates a new instance of the OperationsListResultPage type.
5257func NewOperationsListResultPage(getNextPage func(context.Context, OperationsListResult) (OperationsListResult, error)) OperationsListResultPage {
5258	return OperationsListResultPage{fn: getNextPage}
5259}
5260
5261// Origin CDN origin is the source of the content being delivered via CDN. When the edge nodes represented
5262// by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of
5263// the configured origins.
5264type Origin struct {
5265	autorest.Response `json:"-"`
5266	*OriginProperties `json:"properties,omitempty"`
5267	// Location - Resource location.
5268	Location *string `json:"location,omitempty"`
5269	// Tags - Resource tags.
5270	Tags map[string]*string `json:"tags"`
5271	// ID - READ-ONLY; Resource ID.
5272	ID *string `json:"id,omitempty"`
5273	// Name - READ-ONLY; Resource name.
5274	Name *string `json:"name,omitempty"`
5275	// Type - READ-ONLY; Resource type.
5276	Type *string `json:"type,omitempty"`
5277}
5278
5279// MarshalJSON is the custom marshaler for Origin.
5280func (o Origin) MarshalJSON() ([]byte, error) {
5281	objectMap := make(map[string]interface{})
5282	if o.OriginProperties != nil {
5283		objectMap["properties"] = o.OriginProperties
5284	}
5285	if o.Location != nil {
5286		objectMap["location"] = o.Location
5287	}
5288	if o.Tags != nil {
5289		objectMap["tags"] = o.Tags
5290	}
5291	return json.Marshal(objectMap)
5292}
5293
5294// UnmarshalJSON is the custom unmarshaler for Origin struct.
5295func (o *Origin) UnmarshalJSON(body []byte) error {
5296	var m map[string]*json.RawMessage
5297	err := json.Unmarshal(body, &m)
5298	if err != nil {
5299		return err
5300	}
5301	for k, v := range m {
5302		switch k {
5303		case "properties":
5304			if v != nil {
5305				var originProperties OriginProperties
5306				err = json.Unmarshal(*v, &originProperties)
5307				if err != nil {
5308					return err
5309				}
5310				o.OriginProperties = &originProperties
5311			}
5312		case "location":
5313			if v != nil {
5314				var location string
5315				err = json.Unmarshal(*v, &location)
5316				if err != nil {
5317					return err
5318				}
5319				o.Location = &location
5320			}
5321		case "tags":
5322			if v != nil {
5323				var tags map[string]*string
5324				err = json.Unmarshal(*v, &tags)
5325				if err != nil {
5326					return err
5327				}
5328				o.Tags = tags
5329			}
5330		case "id":
5331			if v != nil {
5332				var ID string
5333				err = json.Unmarshal(*v, &ID)
5334				if err != nil {
5335					return err
5336				}
5337				o.ID = &ID
5338			}
5339		case "name":
5340			if v != nil {
5341				var name string
5342				err = json.Unmarshal(*v, &name)
5343				if err != nil {
5344					return err
5345				}
5346				o.Name = &name
5347			}
5348		case "type":
5349			if v != nil {
5350				var typeVar string
5351				err = json.Unmarshal(*v, &typeVar)
5352				if err != nil {
5353					return err
5354				}
5355				o.Type = &typeVar
5356			}
5357		}
5358	}
5359
5360	return nil
5361}
5362
5363// OriginGroup origin group comprising of origins is used for load balancing to origins when the content
5364// cannot be served from CDN.
5365type OriginGroup struct {
5366	autorest.Response      `json:"-"`
5367	*OriginGroupProperties `json:"properties,omitempty"`
5368	// ID - READ-ONLY; Resource ID.
5369	ID *string `json:"id,omitempty"`
5370	// Name - READ-ONLY; Resource name.
5371	Name *string `json:"name,omitempty"`
5372	// Type - READ-ONLY; Resource type.
5373	Type *string `json:"type,omitempty"`
5374}
5375
5376// MarshalJSON is the custom marshaler for OriginGroup.
5377func (og OriginGroup) MarshalJSON() ([]byte, error) {
5378	objectMap := make(map[string]interface{})
5379	if og.OriginGroupProperties != nil {
5380		objectMap["properties"] = og.OriginGroupProperties
5381	}
5382	return json.Marshal(objectMap)
5383}
5384
5385// UnmarshalJSON is the custom unmarshaler for OriginGroup struct.
5386func (og *OriginGroup) UnmarshalJSON(body []byte) error {
5387	var m map[string]*json.RawMessage
5388	err := json.Unmarshal(body, &m)
5389	if err != nil {
5390		return err
5391	}
5392	for k, v := range m {
5393		switch k {
5394		case "properties":
5395			if v != nil {
5396				var originGroupProperties OriginGroupProperties
5397				err = json.Unmarshal(*v, &originGroupProperties)
5398				if err != nil {
5399					return err
5400				}
5401				og.OriginGroupProperties = &originGroupProperties
5402			}
5403		case "id":
5404			if v != nil {
5405				var ID string
5406				err = json.Unmarshal(*v, &ID)
5407				if err != nil {
5408					return err
5409				}
5410				og.ID = &ID
5411			}
5412		case "name":
5413			if v != nil {
5414				var name string
5415				err = json.Unmarshal(*v, &name)
5416				if err != nil {
5417					return err
5418				}
5419				og.Name = &name
5420			}
5421		case "type":
5422			if v != nil {
5423				var typeVar string
5424				err = json.Unmarshal(*v, &typeVar)
5425				if err != nil {
5426					return err
5427				}
5428				og.Type = &typeVar
5429			}
5430		}
5431	}
5432
5433	return nil
5434}
5435
5436// OriginGroupListResult result of the request to list origin groups. It contains a list of origin groups
5437// objects and a URL link to get the next set of results.
5438type OriginGroupListResult struct {
5439	autorest.Response `json:"-"`
5440	// Value - READ-ONLY; List of CDN origin groups within an endpoint
5441	Value *[]OriginGroup `json:"value,omitempty"`
5442	// NextLink - URL to get the next set of origin objects if there are any.
5443	NextLink *string `json:"nextLink,omitempty"`
5444}
5445
5446// OriginGroupListResultIterator provides access to a complete listing of OriginGroup values.
5447type OriginGroupListResultIterator struct {
5448	i    int
5449	page OriginGroupListResultPage
5450}
5451
5452// NextWithContext advances to the next value.  If there was an error making
5453// the request the iterator does not advance and the error is returned.
5454func (iter *OriginGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
5455	if tracing.IsEnabled() {
5456		ctx = tracing.StartSpan(ctx, fqdn+"/OriginGroupListResultIterator.NextWithContext")
5457		defer func() {
5458			sc := -1
5459			if iter.Response().Response.Response != nil {
5460				sc = iter.Response().Response.Response.StatusCode
5461			}
5462			tracing.EndSpan(ctx, sc, err)
5463		}()
5464	}
5465	iter.i++
5466	if iter.i < len(iter.page.Values()) {
5467		return nil
5468	}
5469	err = iter.page.NextWithContext(ctx)
5470	if err != nil {
5471		iter.i--
5472		return err
5473	}
5474	iter.i = 0
5475	return nil
5476}
5477
5478// Next advances to the next value.  If there was an error making
5479// the request the iterator does not advance and the error is returned.
5480// Deprecated: Use NextWithContext() instead.
5481func (iter *OriginGroupListResultIterator) Next() error {
5482	return iter.NextWithContext(context.Background())
5483}
5484
5485// NotDone returns true if the enumeration should be started or is not yet complete.
5486func (iter OriginGroupListResultIterator) NotDone() bool {
5487	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5488}
5489
5490// Response returns the raw server response from the last page request.
5491func (iter OriginGroupListResultIterator) Response() OriginGroupListResult {
5492	return iter.page.Response()
5493}
5494
5495// Value returns the current value or a zero-initialized value if the
5496// iterator has advanced beyond the end of the collection.
5497func (iter OriginGroupListResultIterator) Value() OriginGroup {
5498	if !iter.page.NotDone() {
5499		return OriginGroup{}
5500	}
5501	return iter.page.Values()[iter.i]
5502}
5503
5504// Creates a new instance of the OriginGroupListResultIterator type.
5505func NewOriginGroupListResultIterator(page OriginGroupListResultPage) OriginGroupListResultIterator {
5506	return OriginGroupListResultIterator{page: page}
5507}
5508
5509// IsEmpty returns true if the ListResult contains no values.
5510func (oglr OriginGroupListResult) IsEmpty() bool {
5511	return oglr.Value == nil || len(*oglr.Value) == 0
5512}
5513
5514// originGroupListResultPreparer prepares a request to retrieve the next set of results.
5515// It returns nil if no more results exist.
5516func (oglr OriginGroupListResult) originGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
5517	if oglr.NextLink == nil || len(to.String(oglr.NextLink)) < 1 {
5518		return nil, nil
5519	}
5520	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5521		autorest.AsJSON(),
5522		autorest.AsGet(),
5523		autorest.WithBaseURL(to.String(oglr.NextLink)))
5524}
5525
5526// OriginGroupListResultPage contains a page of OriginGroup values.
5527type OriginGroupListResultPage struct {
5528	fn   func(context.Context, OriginGroupListResult) (OriginGroupListResult, error)
5529	oglr OriginGroupListResult
5530}
5531
5532// NextWithContext advances to the next page of values.  If there was an error making
5533// the request the page does not advance and the error is returned.
5534func (page *OriginGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
5535	if tracing.IsEnabled() {
5536		ctx = tracing.StartSpan(ctx, fqdn+"/OriginGroupListResultPage.NextWithContext")
5537		defer func() {
5538			sc := -1
5539			if page.Response().Response.Response != nil {
5540				sc = page.Response().Response.Response.StatusCode
5541			}
5542			tracing.EndSpan(ctx, sc, err)
5543		}()
5544	}
5545	next, err := page.fn(ctx, page.oglr)
5546	if err != nil {
5547		return err
5548	}
5549	page.oglr = next
5550	return nil
5551}
5552
5553// Next advances to the next page of values.  If there was an error making
5554// the request the page does not advance and the error is returned.
5555// Deprecated: Use NextWithContext() instead.
5556func (page *OriginGroupListResultPage) Next() error {
5557	return page.NextWithContext(context.Background())
5558}
5559
5560// NotDone returns true if the page enumeration should be started or is not yet complete.
5561func (page OriginGroupListResultPage) NotDone() bool {
5562	return !page.oglr.IsEmpty()
5563}
5564
5565// Response returns the raw server response from the last page request.
5566func (page OriginGroupListResultPage) Response() OriginGroupListResult {
5567	return page.oglr
5568}
5569
5570// Values returns the slice of values for the current page or nil if there are no values.
5571func (page OriginGroupListResultPage) Values() []OriginGroup {
5572	if page.oglr.IsEmpty() {
5573		return nil
5574	}
5575	return *page.oglr.Value
5576}
5577
5578// Creates a new instance of the OriginGroupListResultPage type.
5579func NewOriginGroupListResultPage(getNextPage func(context.Context, OriginGroupListResult) (OriginGroupListResult, error)) OriginGroupListResultPage {
5580	return OriginGroupListResultPage{fn: getNextPage}
5581}
5582
5583// OriginGroupProperties the JSON object that contains the properties of the origin group.
5584type OriginGroupProperties struct {
5585	// ResourceState - READ-ONLY; Resource status of the origin group. Possible values include: 'OriginGroupResourceStateCreating', 'OriginGroupResourceStateActive', 'OriginGroupResourceStateDeleting'
5586	ResourceState OriginGroupResourceState `json:"resourceState,omitempty"`
5587	// ProvisioningState - READ-ONLY; Provisioning status of the origin group.
5588	ProvisioningState *string `json:"provisioningState,omitempty"`
5589	// HealthProbeSettings - Health probe settings to the origin that is used to determine the health of the origin.
5590	HealthProbeSettings *HealthProbeParameters `json:"healthProbeSettings,omitempty"`
5591	// Origins - The source of the content being delivered via CDN within given origin group.
5592	Origins *[]ResourceReference `json:"origins,omitempty"`
5593	// TrafficRestorationTimeToHealedOrNewEndpointsInMinutes - Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.
5594	TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32 `json:"trafficRestorationTimeToHealedOrNewEndpointsInMinutes,omitempty"`
5595	// ResponseBasedOriginErrorDetectionSettings - The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported.
5596	ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters `json:"responseBasedOriginErrorDetectionSettings,omitempty"`
5597}
5598
5599// OriginGroupsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
5600// operation.
5601type OriginGroupsCreateFuture struct {
5602	azure.Future
5603}
5604
5605// Result returns the result of the asynchronous operation.
5606// If the operation has not completed it will return an error.
5607func (future *OriginGroupsCreateFuture) Result(client OriginGroupsClient) (og OriginGroup, err error) {
5608	var done bool
5609	done, err = future.DoneWithContext(context.Background(), client)
5610	if err != nil {
5611		err = autorest.NewErrorWithError(err, "cdn.OriginGroupsCreateFuture", "Result", future.Response(), "Polling failure")
5612		return
5613	}
5614	if !done {
5615		err = azure.NewAsyncOpIncompleteError("cdn.OriginGroupsCreateFuture")
5616		return
5617	}
5618	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5619	if og.Response.Response, err = future.GetResult(sender); err == nil && og.Response.Response.StatusCode != http.StatusNoContent {
5620		og, err = client.CreateResponder(og.Response.Response)
5621		if err != nil {
5622			err = autorest.NewErrorWithError(err, "cdn.OriginGroupsCreateFuture", "Result", og.Response.Response, "Failure responding to request")
5623		}
5624	}
5625	return
5626}
5627
5628// OriginGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5629// operation.
5630type OriginGroupsDeleteFuture struct {
5631	azure.Future
5632}
5633
5634// Result returns the result of the asynchronous operation.
5635// If the operation has not completed it will return an error.
5636func (future *OriginGroupsDeleteFuture) Result(client OriginGroupsClient) (ar autorest.Response, err error) {
5637	var done bool
5638	done, err = future.DoneWithContext(context.Background(), client)
5639	if err != nil {
5640		err = autorest.NewErrorWithError(err, "cdn.OriginGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
5641		return
5642	}
5643	if !done {
5644		err = azure.NewAsyncOpIncompleteError("cdn.OriginGroupsDeleteFuture")
5645		return
5646	}
5647	ar.Response = future.Response()
5648	return
5649}
5650
5651// OriginGroupsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
5652// operation.
5653type OriginGroupsUpdateFuture struct {
5654	azure.Future
5655}
5656
5657// Result returns the result of the asynchronous operation.
5658// If the operation has not completed it will return an error.
5659func (future *OriginGroupsUpdateFuture) Result(client OriginGroupsClient) (og OriginGroup, err error) {
5660	var done bool
5661	done, err = future.DoneWithContext(context.Background(), client)
5662	if err != nil {
5663		err = autorest.NewErrorWithError(err, "cdn.OriginGroupsUpdateFuture", "Result", future.Response(), "Polling failure")
5664		return
5665	}
5666	if !done {
5667		err = azure.NewAsyncOpIncompleteError("cdn.OriginGroupsUpdateFuture")
5668		return
5669	}
5670	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5671	if og.Response.Response, err = future.GetResult(sender); err == nil && og.Response.Response.StatusCode != http.StatusNoContent {
5672		og, err = client.UpdateResponder(og.Response.Response)
5673		if err != nil {
5674			err = autorest.NewErrorWithError(err, "cdn.OriginGroupsUpdateFuture", "Result", og.Response.Response, "Failure responding to request")
5675		}
5676	}
5677	return
5678}
5679
5680// OriginGroupUpdateParameters origin group properties needed for origin group creation or update.
5681type OriginGroupUpdateParameters struct {
5682	*OriginGroupUpdatePropertiesParameters `json:"properties,omitempty"`
5683}
5684
5685// MarshalJSON is the custom marshaler for OriginGroupUpdateParameters.
5686func (ogup OriginGroupUpdateParameters) MarshalJSON() ([]byte, error) {
5687	objectMap := make(map[string]interface{})
5688	if ogup.OriginGroupUpdatePropertiesParameters != nil {
5689		objectMap["properties"] = ogup.OriginGroupUpdatePropertiesParameters
5690	}
5691	return json.Marshal(objectMap)
5692}
5693
5694// UnmarshalJSON is the custom unmarshaler for OriginGroupUpdateParameters struct.
5695func (ogup *OriginGroupUpdateParameters) UnmarshalJSON(body []byte) error {
5696	var m map[string]*json.RawMessage
5697	err := json.Unmarshal(body, &m)
5698	if err != nil {
5699		return err
5700	}
5701	for k, v := range m {
5702		switch k {
5703		case "properties":
5704			if v != nil {
5705				var originGroupUpdatePropertiesParameters OriginGroupUpdatePropertiesParameters
5706				err = json.Unmarshal(*v, &originGroupUpdatePropertiesParameters)
5707				if err != nil {
5708					return err
5709				}
5710				ogup.OriginGroupUpdatePropertiesParameters = &originGroupUpdatePropertiesParameters
5711			}
5712		}
5713	}
5714
5715	return nil
5716}
5717
5718// OriginGroupUpdatePropertiesParameters the JSON object that contains the properties of the origin group.
5719type OriginGroupUpdatePropertiesParameters struct {
5720	// HealthProbeSettings - Health probe settings to the origin that is used to determine the health of the origin.
5721	HealthProbeSettings *HealthProbeParameters `json:"healthProbeSettings,omitempty"`
5722	// Origins - The source of the content being delivered via CDN within given origin group.
5723	Origins *[]ResourceReference `json:"origins,omitempty"`
5724	// TrafficRestorationTimeToHealedOrNewEndpointsInMinutes - Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.
5725	TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32 `json:"trafficRestorationTimeToHealedOrNewEndpointsInMinutes,omitempty"`
5726	// ResponseBasedOriginErrorDetectionSettings - The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported.
5727	ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters `json:"responseBasedOriginErrorDetectionSettings,omitempty"`
5728}
5729
5730// OriginListResult result of the request to list origins. It contains a list of origin objects and a URL
5731// link to get the next set of results.
5732type OriginListResult struct {
5733	autorest.Response `json:"-"`
5734	// Value - READ-ONLY; List of CDN origins within an endpoint
5735	Value *[]Origin `json:"value,omitempty"`
5736	// NextLink - URL to get the next set of origin objects if there are any.
5737	NextLink *string `json:"nextLink,omitempty"`
5738}
5739
5740// OriginListResultIterator provides access to a complete listing of Origin values.
5741type OriginListResultIterator struct {
5742	i    int
5743	page OriginListResultPage
5744}
5745
5746// NextWithContext advances to the next value.  If there was an error making
5747// the request the iterator does not advance and the error is returned.
5748func (iter *OriginListResultIterator) NextWithContext(ctx context.Context) (err error) {
5749	if tracing.IsEnabled() {
5750		ctx = tracing.StartSpan(ctx, fqdn+"/OriginListResultIterator.NextWithContext")
5751		defer func() {
5752			sc := -1
5753			if iter.Response().Response.Response != nil {
5754				sc = iter.Response().Response.Response.StatusCode
5755			}
5756			tracing.EndSpan(ctx, sc, err)
5757		}()
5758	}
5759	iter.i++
5760	if iter.i < len(iter.page.Values()) {
5761		return nil
5762	}
5763	err = iter.page.NextWithContext(ctx)
5764	if err != nil {
5765		iter.i--
5766		return err
5767	}
5768	iter.i = 0
5769	return nil
5770}
5771
5772// Next advances to the next value.  If there was an error making
5773// the request the iterator does not advance and the error is returned.
5774// Deprecated: Use NextWithContext() instead.
5775func (iter *OriginListResultIterator) Next() error {
5776	return iter.NextWithContext(context.Background())
5777}
5778
5779// NotDone returns true if the enumeration should be started or is not yet complete.
5780func (iter OriginListResultIterator) NotDone() bool {
5781	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5782}
5783
5784// Response returns the raw server response from the last page request.
5785func (iter OriginListResultIterator) Response() OriginListResult {
5786	return iter.page.Response()
5787}
5788
5789// Value returns the current value or a zero-initialized value if the
5790// iterator has advanced beyond the end of the collection.
5791func (iter OriginListResultIterator) Value() Origin {
5792	if !iter.page.NotDone() {
5793		return Origin{}
5794	}
5795	return iter.page.Values()[iter.i]
5796}
5797
5798// Creates a new instance of the OriginListResultIterator type.
5799func NewOriginListResultIterator(page OriginListResultPage) OriginListResultIterator {
5800	return OriginListResultIterator{page: page}
5801}
5802
5803// IsEmpty returns true if the ListResult contains no values.
5804func (olr OriginListResult) IsEmpty() bool {
5805	return olr.Value == nil || len(*olr.Value) == 0
5806}
5807
5808// originListResultPreparer prepares a request to retrieve the next set of results.
5809// It returns nil if no more results exist.
5810func (olr OriginListResult) originListResultPreparer(ctx context.Context) (*http.Request, error) {
5811	if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
5812		return nil, nil
5813	}
5814	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5815		autorest.AsJSON(),
5816		autorest.AsGet(),
5817		autorest.WithBaseURL(to.String(olr.NextLink)))
5818}
5819
5820// OriginListResultPage contains a page of Origin values.
5821type OriginListResultPage struct {
5822	fn  func(context.Context, OriginListResult) (OriginListResult, error)
5823	olr OriginListResult
5824}
5825
5826// NextWithContext advances to the next page of values.  If there was an error making
5827// the request the page does not advance and the error is returned.
5828func (page *OriginListResultPage) NextWithContext(ctx context.Context) (err error) {
5829	if tracing.IsEnabled() {
5830		ctx = tracing.StartSpan(ctx, fqdn+"/OriginListResultPage.NextWithContext")
5831		defer func() {
5832			sc := -1
5833			if page.Response().Response.Response != nil {
5834				sc = page.Response().Response.Response.StatusCode
5835			}
5836			tracing.EndSpan(ctx, sc, err)
5837		}()
5838	}
5839	next, err := page.fn(ctx, page.olr)
5840	if err != nil {
5841		return err
5842	}
5843	page.olr = next
5844	return nil
5845}
5846
5847// Next advances to the next page of values.  If there was an error making
5848// the request the page does not advance and the error is returned.
5849// Deprecated: Use NextWithContext() instead.
5850func (page *OriginListResultPage) Next() error {
5851	return page.NextWithContext(context.Background())
5852}
5853
5854// NotDone returns true if the page enumeration should be started or is not yet complete.
5855func (page OriginListResultPage) NotDone() bool {
5856	return !page.olr.IsEmpty()
5857}
5858
5859// Response returns the raw server response from the last page request.
5860func (page OriginListResultPage) Response() OriginListResult {
5861	return page.olr
5862}
5863
5864// Values returns the slice of values for the current page or nil if there are no values.
5865func (page OriginListResultPage) Values() []Origin {
5866	if page.olr.IsEmpty() {
5867		return nil
5868	}
5869	return *page.olr.Value
5870}
5871
5872// Creates a new instance of the OriginListResultPage type.
5873func NewOriginListResultPage(getNextPage func(context.Context, OriginListResult) (OriginListResult, error)) OriginListResultPage {
5874	return OriginListResultPage{fn: getNextPage}
5875}
5876
5877// OriginProperties the JSON object that contains the properties of the origin.
5878type OriginProperties struct {
5879	// ResourceState - READ-ONLY; Resource status of the origin. Possible values include: 'OriginResourceStateCreating', 'OriginResourceStateActive', 'OriginResourceStateDeleting'
5880	ResourceState OriginResourceState `json:"resourceState,omitempty"`
5881	// ProvisioningState - READ-ONLY; Provisioning status of the origin.
5882	ProvisioningState *string `json:"provisioningState,omitempty"`
5883	// PrivateEndpointStatus - READ-ONLY; The approval status for the connection to the Private Link. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout'
5884	PrivateEndpointStatus PrivateEndpointStatus `json:"privateEndpointStatus,omitempty"`
5885	// HostName - The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.
5886	HostName *string `json:"hostName,omitempty"`
5887	// HTTPPort - The value of the HTTP port. Must be between 1 and 65535.
5888	HTTPPort *int32 `json:"httpPort,omitempty"`
5889	// HTTPSPort - The value of the HTTPS port. Must be between 1 and 65535.
5890	HTTPSPort *int32 `json:"httpsPort,omitempty"`
5891	// OriginHostHeader - The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint
5892	OriginHostHeader *string `json:"originHostHeader,omitempty"`
5893	// Priority - Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5
5894	Priority *int32 `json:"priority,omitempty"`
5895	// Weight - Weight of the origin in given origin group for load balancing. Must be between 1 and 1000
5896	Weight *int32 `json:"weight,omitempty"`
5897	// Enabled - Origin is enabled for load balancing or not
5898	Enabled *bool `json:"enabled,omitempty"`
5899	// PrivateLinkAlias - The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'
5900	PrivateLinkAlias *string `json:"privateLinkAlias,omitempty"`
5901	// PrivateLinkResourceID - The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'
5902	PrivateLinkResourceID *string `json:"privateLinkResourceId,omitempty"`
5903	// PrivateLinkLocation - The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated
5904	PrivateLinkLocation *string `json:"privateLinkLocation,omitempty"`
5905	// PrivateLinkApprovalMessage - A custom message to be included in the approval request to connect to the Private Link.
5906	PrivateLinkApprovalMessage *string `json:"privateLinkApprovalMessage,omitempty"`
5907}
5908
5909// OriginsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
5910// operation.
5911type OriginsCreateFuture struct {
5912	azure.Future
5913}
5914
5915// Result returns the result of the asynchronous operation.
5916// If the operation has not completed it will return an error.
5917func (future *OriginsCreateFuture) Result(client OriginsClient) (o Origin, err error) {
5918	var done bool
5919	done, err = future.DoneWithContext(context.Background(), client)
5920	if err != nil {
5921		err = autorest.NewErrorWithError(err, "cdn.OriginsCreateFuture", "Result", future.Response(), "Polling failure")
5922		return
5923	}
5924	if !done {
5925		err = azure.NewAsyncOpIncompleteError("cdn.OriginsCreateFuture")
5926		return
5927	}
5928	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5929	if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
5930		o, err = client.CreateResponder(o.Response.Response)
5931		if err != nil {
5932			err = autorest.NewErrorWithError(err, "cdn.OriginsCreateFuture", "Result", o.Response.Response, "Failure responding to request")
5933		}
5934	}
5935	return
5936}
5937
5938// OriginsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5939// operation.
5940type OriginsDeleteFuture struct {
5941	azure.Future
5942}
5943
5944// Result returns the result of the asynchronous operation.
5945// If the operation has not completed it will return an error.
5946func (future *OriginsDeleteFuture) Result(client OriginsClient) (ar autorest.Response, err error) {
5947	var done bool
5948	done, err = future.DoneWithContext(context.Background(), client)
5949	if err != nil {
5950		err = autorest.NewErrorWithError(err, "cdn.OriginsDeleteFuture", "Result", future.Response(), "Polling failure")
5951		return
5952	}
5953	if !done {
5954		err = azure.NewAsyncOpIncompleteError("cdn.OriginsDeleteFuture")
5955		return
5956	}
5957	ar.Response = future.Response()
5958	return
5959}
5960
5961// OriginsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
5962// operation.
5963type OriginsUpdateFuture struct {
5964	azure.Future
5965}
5966
5967// Result returns the result of the asynchronous operation.
5968// If the operation has not completed it will return an error.
5969func (future *OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err error) {
5970	var done bool
5971	done, err = future.DoneWithContext(context.Background(), client)
5972	if err != nil {
5973		err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", future.Response(), "Polling failure")
5974		return
5975	}
5976	if !done {
5977		err = azure.NewAsyncOpIncompleteError("cdn.OriginsUpdateFuture")
5978		return
5979	}
5980	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5981	if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
5982		o, err = client.UpdateResponder(o.Response.Response)
5983		if err != nil {
5984			err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", o.Response.Response, "Failure responding to request")
5985		}
5986	}
5987	return
5988}
5989
5990// OriginUpdateParameters origin properties needed for origin update.
5991type OriginUpdateParameters struct {
5992	// Tags - Origin tags.
5993	Tags                              map[string]*string `json:"tags"`
5994	*OriginUpdatePropertiesParameters `json:"properties,omitempty"`
5995}
5996
5997// MarshalJSON is the custom marshaler for OriginUpdateParameters.
5998func (oup OriginUpdateParameters) MarshalJSON() ([]byte, error) {
5999	objectMap := make(map[string]interface{})
6000	if oup.Tags != nil {
6001		objectMap["tags"] = oup.Tags
6002	}
6003	if oup.OriginUpdatePropertiesParameters != nil {
6004		objectMap["properties"] = oup.OriginUpdatePropertiesParameters
6005	}
6006	return json.Marshal(objectMap)
6007}
6008
6009// UnmarshalJSON is the custom unmarshaler for OriginUpdateParameters struct.
6010func (oup *OriginUpdateParameters) UnmarshalJSON(body []byte) error {
6011	var m map[string]*json.RawMessage
6012	err := json.Unmarshal(body, &m)
6013	if err != nil {
6014		return err
6015	}
6016	for k, v := range m {
6017		switch k {
6018		case "tags":
6019			if v != nil {
6020				var tags map[string]*string
6021				err = json.Unmarshal(*v, &tags)
6022				if err != nil {
6023					return err
6024				}
6025				oup.Tags = tags
6026			}
6027		case "properties":
6028			if v != nil {
6029				var originUpdatePropertiesParameters OriginUpdatePropertiesParameters
6030				err = json.Unmarshal(*v, &originUpdatePropertiesParameters)
6031				if err != nil {
6032					return err
6033				}
6034				oup.OriginUpdatePropertiesParameters = &originUpdatePropertiesParameters
6035			}
6036		}
6037	}
6038
6039	return nil
6040}
6041
6042// OriginUpdatePropertiesParameters the JSON object that contains the properties of the origin.
6043type OriginUpdatePropertiesParameters struct {
6044	// HostName - The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.
6045	HostName *string `json:"hostName,omitempty"`
6046	// HTTPPort - The value of the HTTP port. Must be between 1 and 65535.
6047	HTTPPort *int32 `json:"httpPort,omitempty"`
6048	// HTTPSPort - The value of the HTTPS port. Must be between 1 and 65535.
6049	HTTPSPort *int32 `json:"httpsPort,omitempty"`
6050	// OriginHostHeader - The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint
6051	OriginHostHeader *string `json:"originHostHeader,omitempty"`
6052	// Priority - Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5
6053	Priority *int32 `json:"priority,omitempty"`
6054	// Weight - Weight of the origin in given origin group for load balancing. Must be between 1 and 1000
6055	Weight *int32 `json:"weight,omitempty"`
6056	// Enabled - Origin is enabled for load balancing or not
6057	Enabled *bool `json:"enabled,omitempty"`
6058	// PrivateLinkAlias - The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'
6059	PrivateLinkAlias *string `json:"privateLinkAlias,omitempty"`
6060	// PrivateLinkResourceID - The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'
6061	PrivateLinkResourceID *string `json:"privateLinkResourceId,omitempty"`
6062	// PrivateLinkLocation - The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated
6063	PrivateLinkLocation *string `json:"privateLinkLocation,omitempty"`
6064	// PrivateLinkApprovalMessage - A custom message to be included in the approval request to connect to the Private Link.
6065	PrivateLinkApprovalMessage *string `json:"privateLinkApprovalMessage,omitempty"`
6066}
6067
6068// PoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
6069// operation.
6070type PoliciesCreateOrUpdateFuture struct {
6071	azure.Future
6072}
6073
6074// Result returns the result of the asynchronous operation.
6075// If the operation has not completed it will return an error.
6076func (future *PoliciesCreateOrUpdateFuture) Result(client PoliciesClient) (wafp WebApplicationFirewallPolicy, err error) {
6077	var done bool
6078	done, err = future.DoneWithContext(context.Background(), client)
6079	if err != nil {
6080		err = autorest.NewErrorWithError(err, "cdn.PoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6081		return
6082	}
6083	if !done {
6084		err = azure.NewAsyncOpIncompleteError("cdn.PoliciesCreateOrUpdateFuture")
6085		return
6086	}
6087	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6088	if wafp.Response.Response, err = future.GetResult(sender); err == nil && wafp.Response.Response.StatusCode != http.StatusNoContent {
6089		wafp, err = client.CreateOrUpdateResponder(wafp.Response.Response)
6090		if err != nil {
6091			err = autorest.NewErrorWithError(err, "cdn.PoliciesCreateOrUpdateFuture", "Result", wafp.Response.Response, "Failure responding to request")
6092		}
6093	}
6094	return
6095}
6096
6097// PoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
6098// operation.
6099type PoliciesUpdateFuture struct {
6100	azure.Future
6101}
6102
6103// Result returns the result of the asynchronous operation.
6104// If the operation has not completed it will return an error.
6105func (future *PoliciesUpdateFuture) Result(client PoliciesClient) (wafp WebApplicationFirewallPolicy, err error) {
6106	var done bool
6107	done, err = future.DoneWithContext(context.Background(), client)
6108	if err != nil {
6109		err = autorest.NewErrorWithError(err, "cdn.PoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
6110		return
6111	}
6112	if !done {
6113		err = azure.NewAsyncOpIncompleteError("cdn.PoliciesUpdateFuture")
6114		return
6115	}
6116	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6117	if wafp.Response.Response, err = future.GetResult(sender); err == nil && wafp.Response.Response.StatusCode != http.StatusNoContent {
6118		wafp, err = client.UpdateResponder(wafp.Response.Response)
6119		if err != nil {
6120			err = autorest.NewErrorWithError(err, "cdn.PoliciesUpdateFuture", "Result", wafp.Response.Response, "Failure responding to request")
6121		}
6122	}
6123	return
6124}
6125
6126// PolicySettings defines contents of a web application firewall global configuration
6127type PolicySettings struct {
6128	// EnabledState - describes if the policy is in enabled state or disabled state. Possible values include: 'PolicyEnabledStateDisabled', 'PolicyEnabledStateEnabled'
6129	EnabledState PolicyEnabledState `json:"enabledState,omitempty"`
6130	// Mode - Describes if it is in detection mode or prevention mode at policy level. Possible values include: 'Prevention', 'Detection'
6131	Mode PolicyMode `json:"mode,omitempty"`
6132	// DefaultRedirectURL - If action type is redirect, this field represents the default redirect URL for the client.
6133	DefaultRedirectURL *string `json:"defaultRedirectUrl,omitempty"`
6134	// DefaultCustomBlockResponseStatusCode - If the action type is block, this field defines the default customer overridable http response status code.
6135	DefaultCustomBlockResponseStatusCode *int32 `json:"defaultCustomBlockResponseStatusCode,omitempty"`
6136	// DefaultCustomBlockResponseBody - If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
6137	DefaultCustomBlockResponseBody *string `json:"defaultCustomBlockResponseBody,omitempty"`
6138}
6139
6140// PostArgsMatchConditionParameters defines the parameters for PostArgs match conditions
6141type PostArgsMatchConditionParameters struct {
6142	OdataType *string `json:"@odata.type,omitempty"`
6143	// Selector - Name of PostArg to be matched
6144	Selector *string `json:"selector,omitempty"`
6145	// Operator - Describes operator to be matched. Possible values include: 'PostArgsOperatorAny', 'PostArgsOperatorEqual', 'PostArgsOperatorContains', 'PostArgsOperatorBeginsWith', 'PostArgsOperatorEndsWith', 'PostArgsOperatorLessThan', 'PostArgsOperatorLessThanOrEqual', 'PostArgsOperatorGreaterThan', 'PostArgsOperatorGreaterThanOrEqual'
6146	Operator PostArgsOperator `json:"operator,omitempty"`
6147	// NegateCondition - Describes if this is negate condition or not
6148	NegateCondition *bool `json:"negateCondition,omitempty"`
6149	// MatchValues - The match value for the condition of the delivery rule
6150	MatchValues *[]string `json:"matchValues,omitempty"`
6151	// Transforms - List of transforms
6152	Transforms *[]Transform `json:"transforms,omitempty"`
6153}
6154
6155// Profile CDN profile is a logical grouping of endpoints that share the same settings, such as CDN
6156// provider and pricing tier.
6157type Profile struct {
6158	autorest.Response `json:"-"`
6159	// Sku - The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile.
6160	Sku                *Sku `json:"sku,omitempty"`
6161	*ProfileProperties `json:"properties,omitempty"`
6162	// Location - Resource location.
6163	Location *string `json:"location,omitempty"`
6164	// Tags - Resource tags.
6165	Tags map[string]*string `json:"tags"`
6166	// ID - READ-ONLY; Resource ID.
6167	ID *string `json:"id,omitempty"`
6168	// Name - READ-ONLY; Resource name.
6169	Name *string `json:"name,omitempty"`
6170	// Type - READ-ONLY; Resource type.
6171	Type *string `json:"type,omitempty"`
6172}
6173
6174// MarshalJSON is the custom marshaler for Profile.
6175func (p Profile) MarshalJSON() ([]byte, error) {
6176	objectMap := make(map[string]interface{})
6177	if p.Sku != nil {
6178		objectMap["sku"] = p.Sku
6179	}
6180	if p.ProfileProperties != nil {
6181		objectMap["properties"] = p.ProfileProperties
6182	}
6183	if p.Location != nil {
6184		objectMap["location"] = p.Location
6185	}
6186	if p.Tags != nil {
6187		objectMap["tags"] = p.Tags
6188	}
6189	return json.Marshal(objectMap)
6190}
6191
6192// UnmarshalJSON is the custom unmarshaler for Profile struct.
6193func (p *Profile) UnmarshalJSON(body []byte) error {
6194	var m map[string]*json.RawMessage
6195	err := json.Unmarshal(body, &m)
6196	if err != nil {
6197		return err
6198	}
6199	for k, v := range m {
6200		switch k {
6201		case "sku":
6202			if v != nil {
6203				var sku Sku
6204				err = json.Unmarshal(*v, &sku)
6205				if err != nil {
6206					return err
6207				}
6208				p.Sku = &sku
6209			}
6210		case "properties":
6211			if v != nil {
6212				var profileProperties ProfileProperties
6213				err = json.Unmarshal(*v, &profileProperties)
6214				if err != nil {
6215					return err
6216				}
6217				p.ProfileProperties = &profileProperties
6218			}
6219		case "location":
6220			if v != nil {
6221				var location string
6222				err = json.Unmarshal(*v, &location)
6223				if err != nil {
6224					return err
6225				}
6226				p.Location = &location
6227			}
6228		case "tags":
6229			if v != nil {
6230				var tags map[string]*string
6231				err = json.Unmarshal(*v, &tags)
6232				if err != nil {
6233					return err
6234				}
6235				p.Tags = tags
6236			}
6237		case "id":
6238			if v != nil {
6239				var ID string
6240				err = json.Unmarshal(*v, &ID)
6241				if err != nil {
6242					return err
6243				}
6244				p.ID = &ID
6245			}
6246		case "name":
6247			if v != nil {
6248				var name string
6249				err = json.Unmarshal(*v, &name)
6250				if err != nil {
6251					return err
6252				}
6253				p.Name = &name
6254			}
6255		case "type":
6256			if v != nil {
6257				var typeVar string
6258				err = json.Unmarshal(*v, &typeVar)
6259				if err != nil {
6260					return err
6261				}
6262				p.Type = &typeVar
6263			}
6264		}
6265	}
6266
6267	return nil
6268}
6269
6270// ProfileListResult result of the request to list profiles. It contains a list of profile objects and a
6271// URL link to get the next set of results.
6272type ProfileListResult struct {
6273	autorest.Response `json:"-"`
6274	// Value - READ-ONLY; List of CDN profiles within a resource group.
6275	Value *[]Profile `json:"value,omitempty"`
6276	// NextLink - URL to get the next set of profile objects if there are any.
6277	NextLink *string `json:"nextLink,omitempty"`
6278}
6279
6280// ProfileListResultIterator provides access to a complete listing of Profile values.
6281type ProfileListResultIterator struct {
6282	i    int
6283	page ProfileListResultPage
6284}
6285
6286// NextWithContext advances to the next value.  If there was an error making
6287// the request the iterator does not advance and the error is returned.
6288func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
6289	if tracing.IsEnabled() {
6290		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
6291		defer func() {
6292			sc := -1
6293			if iter.Response().Response.Response != nil {
6294				sc = iter.Response().Response.Response.StatusCode
6295			}
6296			tracing.EndSpan(ctx, sc, err)
6297		}()
6298	}
6299	iter.i++
6300	if iter.i < len(iter.page.Values()) {
6301		return nil
6302	}
6303	err = iter.page.NextWithContext(ctx)
6304	if err != nil {
6305		iter.i--
6306		return err
6307	}
6308	iter.i = 0
6309	return nil
6310}
6311
6312// Next advances to the next value.  If there was an error making
6313// the request the iterator does not advance and the error is returned.
6314// Deprecated: Use NextWithContext() instead.
6315func (iter *ProfileListResultIterator) Next() error {
6316	return iter.NextWithContext(context.Background())
6317}
6318
6319// NotDone returns true if the enumeration should be started or is not yet complete.
6320func (iter ProfileListResultIterator) NotDone() bool {
6321	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6322}
6323
6324// Response returns the raw server response from the last page request.
6325func (iter ProfileListResultIterator) Response() ProfileListResult {
6326	return iter.page.Response()
6327}
6328
6329// Value returns the current value or a zero-initialized value if the
6330// iterator has advanced beyond the end of the collection.
6331func (iter ProfileListResultIterator) Value() Profile {
6332	if !iter.page.NotDone() {
6333		return Profile{}
6334	}
6335	return iter.page.Values()[iter.i]
6336}
6337
6338// Creates a new instance of the ProfileListResultIterator type.
6339func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
6340	return ProfileListResultIterator{page: page}
6341}
6342
6343// IsEmpty returns true if the ListResult contains no values.
6344func (plr ProfileListResult) IsEmpty() bool {
6345	return plr.Value == nil || len(*plr.Value) == 0
6346}
6347
6348// profileListResultPreparer prepares a request to retrieve the next set of results.
6349// It returns nil if no more results exist.
6350func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
6351	if plr.NextLink == nil || len(to.String(plr.NextLink)) < 1 {
6352		return nil, nil
6353	}
6354	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6355		autorest.AsJSON(),
6356		autorest.AsGet(),
6357		autorest.WithBaseURL(to.String(plr.NextLink)))
6358}
6359
6360// ProfileListResultPage contains a page of Profile values.
6361type ProfileListResultPage struct {
6362	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
6363	plr ProfileListResult
6364}
6365
6366// NextWithContext advances to the next page of values.  If there was an error making
6367// the request the page does not advance and the error is returned.
6368func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
6369	if tracing.IsEnabled() {
6370		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
6371		defer func() {
6372			sc := -1
6373			if page.Response().Response.Response != nil {
6374				sc = page.Response().Response.Response.StatusCode
6375			}
6376			tracing.EndSpan(ctx, sc, err)
6377		}()
6378	}
6379	next, err := page.fn(ctx, page.plr)
6380	if err != nil {
6381		return err
6382	}
6383	page.plr = next
6384	return nil
6385}
6386
6387// Next advances to the next page of values.  If there was an error making
6388// the request the page does not advance and the error is returned.
6389// Deprecated: Use NextWithContext() instead.
6390func (page *ProfileListResultPage) Next() error {
6391	return page.NextWithContext(context.Background())
6392}
6393
6394// NotDone returns true if the page enumeration should be started or is not yet complete.
6395func (page ProfileListResultPage) NotDone() bool {
6396	return !page.plr.IsEmpty()
6397}
6398
6399// Response returns the raw server response from the last page request.
6400func (page ProfileListResultPage) Response() ProfileListResult {
6401	return page.plr
6402}
6403
6404// Values returns the slice of values for the current page or nil if there are no values.
6405func (page ProfileListResultPage) Values() []Profile {
6406	if page.plr.IsEmpty() {
6407		return nil
6408	}
6409	return *page.plr.Value
6410}
6411
6412// Creates a new instance of the ProfileListResultPage type.
6413func NewProfileListResultPage(getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
6414	return ProfileListResultPage{fn: getNextPage}
6415}
6416
6417// ProfileProperties the JSON object that contains the properties required to create a profile.
6418type ProfileProperties struct {
6419	// ResourceState - READ-ONLY; Resource status of the profile. Possible values include: 'ProfileResourceStateCreating', 'ProfileResourceStateActive', 'ProfileResourceStateDeleting', 'ProfileResourceStateDisabled'
6420	ResourceState ProfileResourceState `json:"resourceState,omitempty"`
6421	// ProvisioningState - READ-ONLY; Provisioning status of the profile.
6422	ProvisioningState *string `json:"provisioningState,omitempty"`
6423}
6424
6425// ProfilesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
6426// operation.
6427type ProfilesCreateFuture struct {
6428	azure.Future
6429}
6430
6431// Result returns the result of the asynchronous operation.
6432// If the operation has not completed it will return an error.
6433func (future *ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err error) {
6434	var done bool
6435	done, err = future.DoneWithContext(context.Background(), client)
6436	if err != nil {
6437		err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", future.Response(), "Polling failure")
6438		return
6439	}
6440	if !done {
6441		err = azure.NewAsyncOpIncompleteError("cdn.ProfilesCreateFuture")
6442		return
6443	}
6444	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6445	if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
6446		p, err = client.CreateResponder(p.Response.Response)
6447		if err != nil {
6448			err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", p.Response.Response, "Failure responding to request")
6449		}
6450	}
6451	return
6452}
6453
6454// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6455// operation.
6456type ProfilesDeleteFuture struct {
6457	azure.Future
6458}
6459
6460// Result returns the result of the asynchronous operation.
6461// If the operation has not completed it will return an error.
6462func (future *ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
6463	var done bool
6464	done, err = future.DoneWithContext(context.Background(), client)
6465	if err != nil {
6466		err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
6467		return
6468	}
6469	if !done {
6470		err = azure.NewAsyncOpIncompleteError("cdn.ProfilesDeleteFuture")
6471		return
6472	}
6473	ar.Response = future.Response()
6474	return
6475}
6476
6477// ProfilesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
6478// operation.
6479type ProfilesUpdateFuture struct {
6480	azure.Future
6481}
6482
6483// Result returns the result of the asynchronous operation.
6484// If the operation has not completed it will return an error.
6485func (future *ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err error) {
6486	var done bool
6487	done, err = future.DoneWithContext(context.Background(), client)
6488	if err != nil {
6489		err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", future.Response(), "Polling failure")
6490		return
6491	}
6492	if !done {
6493		err = azure.NewAsyncOpIncompleteError("cdn.ProfilesUpdateFuture")
6494		return
6495	}
6496	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6497	if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
6498		p, err = client.UpdateResponder(p.Response.Response)
6499		if err != nil {
6500			err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", p.Response.Response, "Failure responding to request")
6501		}
6502	}
6503	return
6504}
6505
6506// ProfileUpdateParameters properties required to update a profile.
6507type ProfileUpdateParameters struct {
6508	// Tags - Profile tags
6509	Tags map[string]*string `json:"tags"`
6510}
6511
6512// MarshalJSON is the custom marshaler for ProfileUpdateParameters.
6513func (pup ProfileUpdateParameters) MarshalJSON() ([]byte, error) {
6514	objectMap := make(map[string]interface{})
6515	if pup.Tags != nil {
6516		objectMap["tags"] = pup.Tags
6517	}
6518	return json.Marshal(objectMap)
6519}
6520
6521// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than
6522// required location and tags
6523type ProxyResource struct {
6524	// ID - READ-ONLY; Resource ID.
6525	ID *string `json:"id,omitempty"`
6526	// Name - READ-ONLY; Resource name.
6527	Name *string `json:"name,omitempty"`
6528	// Type - READ-ONLY; Resource type.
6529	Type *string `json:"type,omitempty"`
6530}
6531
6532// PurgeParameters parameters required for content purge.
6533type PurgeParameters struct {
6534	// ContentPaths - The path to the content to be purged. Can describe a file path or a wild card directory.
6535	ContentPaths *[]string `json:"contentPaths,omitempty"`
6536}
6537
6538// QueryStringMatchConditionParameters defines the parameters for QueryString match conditions
6539type QueryStringMatchConditionParameters struct {
6540	OdataType *string `json:"@odata.type,omitempty"`
6541	// Operator - Describes operator to be matched. Possible values include: 'QueryStringOperatorAny', 'QueryStringOperatorEqual', 'QueryStringOperatorContains', 'QueryStringOperatorBeginsWith', 'QueryStringOperatorEndsWith', 'QueryStringOperatorLessThan', 'QueryStringOperatorLessThanOrEqual', 'QueryStringOperatorGreaterThan', 'QueryStringOperatorGreaterThanOrEqual'
6542	Operator QueryStringOperator `json:"operator,omitempty"`
6543	// NegateCondition - Describes if this is negate condition or not
6544	NegateCondition *bool `json:"negateCondition,omitempty"`
6545	// MatchValues - The match value for the condition of the delivery rule
6546	MatchValues *[]string `json:"matchValues,omitempty"`
6547	// Transforms - List of transforms
6548	Transforms *[]Transform `json:"transforms,omitempty"`
6549}
6550
6551// RateLimitRule defines a rate limiting rule that can be included in a waf policy
6552type RateLimitRule struct {
6553	// RateLimitThreshold - Defines rate limit threshold.
6554	RateLimitThreshold *int32 `json:"rateLimitThreshold,omitempty"`
6555	// RateLimitDurationInMinutes - Defines rate limit duration. Default is 1 minute.
6556	RateLimitDurationInMinutes *int32 `json:"rateLimitDurationInMinutes,omitempty"`
6557	// Name - Defines the name of the custom rule
6558	Name *string `json:"name,omitempty"`
6559	// EnabledState - Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. Possible values include: 'CustomRuleEnabledStateDisabled', 'CustomRuleEnabledStateEnabled'
6560	EnabledState CustomRuleEnabledState `json:"enabledState,omitempty"`
6561	// Priority - Defines in what order this rule be evaluated in the overall list of custom rules
6562	Priority *int32 `json:"priority,omitempty"`
6563	// MatchConditions - List of match conditions.
6564	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
6565	// Action - Describes what action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect'
6566	Action ActionType `json:"action,omitempty"`
6567}
6568
6569// RateLimitRuleList defines contents of rate limit rules
6570type RateLimitRuleList struct {
6571	// Rules - List of rules
6572	Rules *[]RateLimitRule `json:"rules,omitempty"`
6573}
6574
6575// RemoteAddressMatchConditionParameters defines the parameters for RemoteAddress match conditions
6576type RemoteAddressMatchConditionParameters struct {
6577	OdataType *string `json:"@odata.type,omitempty"`
6578	// Operator - Describes operator to be matched. Possible values include: 'RemoteAddressOperatorAny', 'RemoteAddressOperatorIPMatch', 'RemoteAddressOperatorGeoMatch'
6579	Operator RemoteAddressOperator `json:"operator,omitempty"`
6580	// NegateCondition - Describes if this is negate condition or not
6581	NegateCondition *bool `json:"negateCondition,omitempty"`
6582	// MatchValues - Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the variable with the given operator this match condition is considered a match.
6583	MatchValues *[]string `json:"matchValues,omitempty"`
6584	// Transforms - List of transforms
6585	Transforms *[]Transform `json:"transforms,omitempty"`
6586}
6587
6588// RequestBodyMatchConditionParameters defines the parameters for RequestBody match conditions
6589type RequestBodyMatchConditionParameters struct {
6590	OdataType *string `json:"@odata.type,omitempty"`
6591	// Operator - Describes operator to be matched. Possible values include: 'RequestBodyOperatorAny', 'RequestBodyOperatorEqual', 'RequestBodyOperatorContains', 'RequestBodyOperatorBeginsWith', 'RequestBodyOperatorEndsWith', 'RequestBodyOperatorLessThan', 'RequestBodyOperatorLessThanOrEqual', 'RequestBodyOperatorGreaterThan', 'RequestBodyOperatorGreaterThanOrEqual'
6592	Operator RequestBodyOperator `json:"operator,omitempty"`
6593	// NegateCondition - Describes if this is negate condition or not
6594	NegateCondition *bool `json:"negateCondition,omitempty"`
6595	// MatchValues - The match value for the condition of the delivery rule
6596	MatchValues *[]string `json:"matchValues,omitempty"`
6597	// Transforms - List of transforms
6598	Transforms *[]Transform `json:"transforms,omitempty"`
6599}
6600
6601// RequestHeaderMatchConditionParameters defines the parameters for RequestHeader match conditions
6602type RequestHeaderMatchConditionParameters struct {
6603	OdataType *string `json:"@odata.type,omitempty"`
6604	// Selector - Name of Header to be matched
6605	Selector *string `json:"selector,omitempty"`
6606	// Operator - Describes operator to be matched. Possible values include: 'RequestHeaderOperatorAny', 'RequestHeaderOperatorEqual', 'RequestHeaderOperatorContains', 'RequestHeaderOperatorBeginsWith', 'RequestHeaderOperatorEndsWith', 'RequestHeaderOperatorLessThan', 'RequestHeaderOperatorLessThanOrEqual', 'RequestHeaderOperatorGreaterThan', 'RequestHeaderOperatorGreaterThanOrEqual'
6607	Operator RequestHeaderOperator `json:"operator,omitempty"`
6608	// NegateCondition - Describes if this is negate condition or not
6609	NegateCondition *bool `json:"negateCondition,omitempty"`
6610	// MatchValues - The match value for the condition of the delivery rule
6611	MatchValues *[]string `json:"matchValues,omitempty"`
6612	// Transforms - List of transforms
6613	Transforms *[]Transform `json:"transforms,omitempty"`
6614}
6615
6616// RequestMethodMatchConditionParameters defines the parameters for RequestMethod match conditions
6617type RequestMethodMatchConditionParameters struct {
6618	OdataType *string `json:"@odata.type,omitempty"`
6619	// Operator - Describes operator to be matched
6620	Operator *string `json:"operator,omitempty"`
6621	// NegateCondition - Describes if this is negate condition or not
6622	NegateCondition *bool `json:"negateCondition,omitempty"`
6623	// MatchValues - The match value for the condition of the delivery rule
6624	MatchValues *[]string `json:"matchValues,omitempty"`
6625}
6626
6627// RequestSchemeMatchConditionParameters defines the parameters for RequestScheme match conditions
6628type RequestSchemeMatchConditionParameters struct {
6629	OdataType *string `json:"@odata.type,omitempty"`
6630	// Operator - Describes operator to be matched
6631	Operator *string `json:"operator,omitempty"`
6632	// NegateCondition - Describes if this is negate condition or not
6633	NegateCondition *bool `json:"negateCondition,omitempty"`
6634	// MatchValues - The match value for the condition of the delivery rule
6635	MatchValues *[]string `json:"matchValues,omitempty"`
6636}
6637
6638// RequestURIMatchConditionParameters defines the parameters for RequestUri match conditions
6639type RequestURIMatchConditionParameters struct {
6640	OdataType *string `json:"@odata.type,omitempty"`
6641	// Operator - Describes operator to be matched. Possible values include: 'RequestURIOperatorAny', 'RequestURIOperatorEqual', 'RequestURIOperatorContains', 'RequestURIOperatorBeginsWith', 'RequestURIOperatorEndsWith', 'RequestURIOperatorLessThan', 'RequestURIOperatorLessThanOrEqual', 'RequestURIOperatorGreaterThan', 'RequestURIOperatorGreaterThanOrEqual'
6642	Operator RequestURIOperator `json:"operator,omitempty"`
6643	// NegateCondition - Describes if this is negate condition or not
6644	NegateCondition *bool `json:"negateCondition,omitempty"`
6645	// MatchValues - The match value for the condition of the delivery rule
6646	MatchValues *[]string `json:"matchValues,omitempty"`
6647	// Transforms - List of transforms
6648	Transforms *[]Transform `json:"transforms,omitempty"`
6649}
6650
6651// Resource the core properties of ARM resources
6652type Resource struct {
6653	// ID - READ-ONLY; Resource ID.
6654	ID *string `json:"id,omitempty"`
6655	// Name - READ-ONLY; Resource name.
6656	Name *string `json:"name,omitempty"`
6657	// Type - READ-ONLY; Resource type.
6658	Type *string `json:"type,omitempty"`
6659}
6660
6661// ResourceReference reference to another resource.
6662type ResourceReference struct {
6663	// ID - Resource ID.
6664	ID *string `json:"id,omitempty"`
6665}
6666
6667// ResourceUsage output of check resource usage API.
6668type ResourceUsage struct {
6669	// ResourceType - READ-ONLY; Resource type for which the usage is provided.
6670	ResourceType *string `json:"resourceType,omitempty"`
6671	// Unit - READ-ONLY; Unit of the usage. e.g. Count.
6672	Unit *string `json:"unit,omitempty"`
6673	// CurrentValue - READ-ONLY; Actual value of usage on the specified resource type.
6674	CurrentValue *int32 `json:"currentValue,omitempty"`
6675	// Limit - READ-ONLY; Quota of the specified resource type.
6676	Limit *int32 `json:"limit,omitempty"`
6677}
6678
6679// ResourceUsageListResult output of check resource usage API.
6680type ResourceUsageListResult struct {
6681	autorest.Response `json:"-"`
6682	// Value - READ-ONLY; List of resource usages.
6683	Value *[]ResourceUsage `json:"value,omitempty"`
6684	// NextLink - URL to get the next set of custom domain objects if there are any.
6685	NextLink *string `json:"nextLink,omitempty"`
6686}
6687
6688// ResourceUsageListResultIterator provides access to a complete listing of ResourceUsage values.
6689type ResourceUsageListResultIterator struct {
6690	i    int
6691	page ResourceUsageListResultPage
6692}
6693
6694// NextWithContext advances to the next value.  If there was an error making
6695// the request the iterator does not advance and the error is returned.
6696func (iter *ResourceUsageListResultIterator) NextWithContext(ctx context.Context) (err error) {
6697	if tracing.IsEnabled() {
6698		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceUsageListResultIterator.NextWithContext")
6699		defer func() {
6700			sc := -1
6701			if iter.Response().Response.Response != nil {
6702				sc = iter.Response().Response.Response.StatusCode
6703			}
6704			tracing.EndSpan(ctx, sc, err)
6705		}()
6706	}
6707	iter.i++
6708	if iter.i < len(iter.page.Values()) {
6709		return nil
6710	}
6711	err = iter.page.NextWithContext(ctx)
6712	if err != nil {
6713		iter.i--
6714		return err
6715	}
6716	iter.i = 0
6717	return nil
6718}
6719
6720// Next advances to the next value.  If there was an error making
6721// the request the iterator does not advance and the error is returned.
6722// Deprecated: Use NextWithContext() instead.
6723func (iter *ResourceUsageListResultIterator) Next() error {
6724	return iter.NextWithContext(context.Background())
6725}
6726
6727// NotDone returns true if the enumeration should be started or is not yet complete.
6728func (iter ResourceUsageListResultIterator) NotDone() bool {
6729	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6730}
6731
6732// Response returns the raw server response from the last page request.
6733func (iter ResourceUsageListResultIterator) Response() ResourceUsageListResult {
6734	return iter.page.Response()
6735}
6736
6737// Value returns the current value or a zero-initialized value if the
6738// iterator has advanced beyond the end of the collection.
6739func (iter ResourceUsageListResultIterator) Value() ResourceUsage {
6740	if !iter.page.NotDone() {
6741		return ResourceUsage{}
6742	}
6743	return iter.page.Values()[iter.i]
6744}
6745
6746// Creates a new instance of the ResourceUsageListResultIterator type.
6747func NewResourceUsageListResultIterator(page ResourceUsageListResultPage) ResourceUsageListResultIterator {
6748	return ResourceUsageListResultIterator{page: page}
6749}
6750
6751// IsEmpty returns true if the ListResult contains no values.
6752func (rulr ResourceUsageListResult) IsEmpty() bool {
6753	return rulr.Value == nil || len(*rulr.Value) == 0
6754}
6755
6756// resourceUsageListResultPreparer prepares a request to retrieve the next set of results.
6757// It returns nil if no more results exist.
6758func (rulr ResourceUsageListResult) resourceUsageListResultPreparer(ctx context.Context) (*http.Request, error) {
6759	if rulr.NextLink == nil || len(to.String(rulr.NextLink)) < 1 {
6760		return nil, nil
6761	}
6762	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6763		autorest.AsJSON(),
6764		autorest.AsGet(),
6765		autorest.WithBaseURL(to.String(rulr.NextLink)))
6766}
6767
6768// ResourceUsageListResultPage contains a page of ResourceUsage values.
6769type ResourceUsageListResultPage struct {
6770	fn   func(context.Context, ResourceUsageListResult) (ResourceUsageListResult, error)
6771	rulr ResourceUsageListResult
6772}
6773
6774// NextWithContext advances to the next page of values.  If there was an error making
6775// the request the page does not advance and the error is returned.
6776func (page *ResourceUsageListResultPage) NextWithContext(ctx context.Context) (err error) {
6777	if tracing.IsEnabled() {
6778		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceUsageListResultPage.NextWithContext")
6779		defer func() {
6780			sc := -1
6781			if page.Response().Response.Response != nil {
6782				sc = page.Response().Response.Response.StatusCode
6783			}
6784			tracing.EndSpan(ctx, sc, err)
6785		}()
6786	}
6787	next, err := page.fn(ctx, page.rulr)
6788	if err != nil {
6789		return err
6790	}
6791	page.rulr = next
6792	return nil
6793}
6794
6795// Next advances to the next page of values.  If there was an error making
6796// the request the page does not advance and the error is returned.
6797// Deprecated: Use NextWithContext() instead.
6798func (page *ResourceUsageListResultPage) Next() error {
6799	return page.NextWithContext(context.Background())
6800}
6801
6802// NotDone returns true if the page enumeration should be started or is not yet complete.
6803func (page ResourceUsageListResultPage) NotDone() bool {
6804	return !page.rulr.IsEmpty()
6805}
6806
6807// Response returns the raw server response from the last page request.
6808func (page ResourceUsageListResultPage) Response() ResourceUsageListResult {
6809	return page.rulr
6810}
6811
6812// Values returns the slice of values for the current page or nil if there are no values.
6813func (page ResourceUsageListResultPage) Values() []ResourceUsage {
6814	if page.rulr.IsEmpty() {
6815		return nil
6816	}
6817	return *page.rulr.Value
6818}
6819
6820// Creates a new instance of the ResourceUsageListResultPage type.
6821func NewResourceUsageListResultPage(getNextPage func(context.Context, ResourceUsageListResult) (ResourceUsageListResult, error)) ResourceUsageListResultPage {
6822	return ResourceUsageListResultPage{fn: getNextPage}
6823}
6824
6825// ResponseBasedOriginErrorDetectionParameters the JSON object that contains the properties to determine
6826// origin health using real requests/responses.
6827type ResponseBasedOriginErrorDetectionParameters struct {
6828	// ResponseBasedDetectedErrorTypes - Type of response errors for real user requests for which origin will be deemed unhealthy. Possible values include: 'ResponseBasedDetectedErrorTypesNone', 'ResponseBasedDetectedErrorTypesTCPErrorsOnly', 'ResponseBasedDetectedErrorTypesTCPAndHTTPErrors'
6829	ResponseBasedDetectedErrorTypes ResponseBasedDetectedErrorTypes `json:"responseBasedDetectedErrorTypes,omitempty"`
6830	// ResponseBasedFailoverThresholdPercentage - The percentage of failed requests in the sample where failover should trigger.
6831	ResponseBasedFailoverThresholdPercentage *int32 `json:"responseBasedFailoverThresholdPercentage,omitempty"`
6832	// HTTPErrorRanges - The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy.
6833	HTTPErrorRanges *[]HTTPErrorRangeParameters `json:"httpErrorRanges,omitempty"`
6834}
6835
6836// Sku the pricing tier (defines a CDN provider, feature list and rate) of the CDN profile.
6837type Sku struct {
6838	// Name - Name of the pricing tier. Possible values include: 'StandardVerizon', 'PremiumVerizon', 'CustomVerizon', 'StandardAkamai', 'StandardChinaCdn', 'StandardMicrosoft', 'PremiumChinaCdn'
6839	Name SkuName `json:"name,omitempty"`
6840}
6841
6842// SsoURI the URI required to login to the supplemental portal from the Azure portal.
6843type SsoURI struct {
6844	autorest.Response `json:"-"`
6845	// SsoURIValue - READ-ONLY; The URI used to login to the supplemental portal.
6846	SsoURIValue *string `json:"ssoUriValue,omitempty"`
6847}
6848
6849// SupportedOptimizationTypesListResult the result of the GetSupportedOptimizationTypes API
6850type SupportedOptimizationTypesListResult struct {
6851	autorest.Response `json:"-"`
6852	// SupportedOptimizationTypes - READ-ONLY; Supported optimization types for a profile.
6853	SupportedOptimizationTypes *[]OptimizationType `json:"supportedOptimizationTypes,omitempty"`
6854}
6855
6856// TrackedResource the resource model definition for a ARM tracked top level resource.
6857type TrackedResource struct {
6858	// Location - Resource location.
6859	Location *string `json:"location,omitempty"`
6860	// Tags - Resource tags.
6861	Tags map[string]*string `json:"tags"`
6862	// ID - READ-ONLY; Resource ID.
6863	ID *string `json:"id,omitempty"`
6864	// Name - READ-ONLY; Resource name.
6865	Name *string `json:"name,omitempty"`
6866	// Type - READ-ONLY; Resource type.
6867	Type *string `json:"type,omitempty"`
6868}
6869
6870// MarshalJSON is the custom marshaler for TrackedResource.
6871func (tr TrackedResource) MarshalJSON() ([]byte, error) {
6872	objectMap := make(map[string]interface{})
6873	if tr.Location != nil {
6874		objectMap["location"] = tr.Location
6875	}
6876	if tr.Tags != nil {
6877		objectMap["tags"] = tr.Tags
6878	}
6879	return json.Marshal(objectMap)
6880}
6881
6882// URLFileExtensionMatchConditionParameters defines the parameters for UrlFileExtension match conditions
6883type URLFileExtensionMatchConditionParameters struct {
6884	OdataType *string `json:"@odata.type,omitempty"`
6885	// Operator - Describes operator to be matched. Possible values include: 'URLFileExtensionOperatorAny', 'URLFileExtensionOperatorEqual', 'URLFileExtensionOperatorContains', 'URLFileExtensionOperatorBeginsWith', 'URLFileExtensionOperatorEndsWith', 'URLFileExtensionOperatorLessThan', 'URLFileExtensionOperatorLessThanOrEqual', 'URLFileExtensionOperatorGreaterThan', 'URLFileExtensionOperatorGreaterThanOrEqual'
6886	Operator URLFileExtensionOperator `json:"operator,omitempty"`
6887	// NegateCondition - Describes if this is negate condition or not
6888	NegateCondition *bool `json:"negateCondition,omitempty"`
6889	// MatchValues - The match value for the condition of the delivery rule
6890	MatchValues *[]string `json:"matchValues,omitempty"`
6891	// Transforms - List of transforms
6892	Transforms *[]Transform `json:"transforms,omitempty"`
6893}
6894
6895// URLFileNameMatchConditionParameters defines the parameters for UrlFilename match conditions
6896type URLFileNameMatchConditionParameters struct {
6897	OdataType *string `json:"@odata.type,omitempty"`
6898	// Operator - Describes operator to be matched. Possible values include: 'URLFileNameOperatorAny', 'URLFileNameOperatorEqual', 'URLFileNameOperatorContains', 'URLFileNameOperatorBeginsWith', 'URLFileNameOperatorEndsWith', 'URLFileNameOperatorLessThan', 'URLFileNameOperatorLessThanOrEqual', 'URLFileNameOperatorGreaterThan', 'URLFileNameOperatorGreaterThanOrEqual'
6899	Operator URLFileNameOperator `json:"operator,omitempty"`
6900	// NegateCondition - Describes if this is negate condition or not
6901	NegateCondition *bool `json:"negateCondition,omitempty"`
6902	// MatchValues - The match value for the condition of the delivery rule
6903	MatchValues *[]string `json:"matchValues,omitempty"`
6904	// Transforms - List of transforms
6905	Transforms *[]Transform `json:"transforms,omitempty"`
6906}
6907
6908// URLPathMatchConditionParameters defines the parameters for UrlPath match conditions
6909type URLPathMatchConditionParameters struct {
6910	OdataType *string `json:"@odata.type,omitempty"`
6911	// Operator - Describes operator to be matched. Possible values include: 'URLPathOperatorAny', 'URLPathOperatorEqual', 'URLPathOperatorContains', 'URLPathOperatorBeginsWith', 'URLPathOperatorEndsWith', 'URLPathOperatorLessThan', 'URLPathOperatorLessThanOrEqual', 'URLPathOperatorGreaterThan', 'URLPathOperatorGreaterThanOrEqual', 'URLPathOperatorWildcard'
6912	Operator URLPathOperator `json:"operator,omitempty"`
6913	// NegateCondition - Describes if this is negate condition or not
6914	NegateCondition *bool `json:"negateCondition,omitempty"`
6915	// MatchValues - The match value for the condition of the delivery rule
6916	MatchValues *[]string `json:"matchValues,omitempty"`
6917	// Transforms - List of transforms
6918	Transforms *[]Transform `json:"transforms,omitempty"`
6919}
6920
6921// URLRedirectAction defines the url redirect action for the delivery rule.
6922type URLRedirectAction struct {
6923	// Parameters - Defines the parameters for the action.
6924	Parameters *URLRedirectActionParameters `json:"parameters,omitempty"`
6925	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
6926	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
6927}
6928
6929// MarshalJSON is the custom marshaler for URLRedirectAction.
6930func (ura URLRedirectAction) MarshalJSON() ([]byte, error) {
6931	ura.Name = NameURLRedirect
6932	objectMap := make(map[string]interface{})
6933	if ura.Parameters != nil {
6934		objectMap["parameters"] = ura.Parameters
6935	}
6936	if ura.Name != "" {
6937		objectMap["name"] = ura.Name
6938	}
6939	return json.Marshal(objectMap)
6940}
6941
6942// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
6943func (ura URLRedirectAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
6944	return &ura, true
6945}
6946
6947// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
6948func (ura URLRedirectAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
6949	return nil, false
6950}
6951
6952// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
6953func (ura URLRedirectAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
6954	return nil, false
6955}
6956
6957// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
6958func (ura URLRedirectAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
6959	return nil, false
6960}
6961
6962// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
6963func (ura URLRedirectAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
6964	return nil, false
6965}
6966
6967// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
6968func (ura URLRedirectAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
6969	return nil, false
6970}
6971
6972// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
6973func (ura URLRedirectAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
6974	return nil, false
6975}
6976
6977// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
6978func (ura URLRedirectAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
6979	return &ura, true
6980}
6981
6982// URLRedirectActionParameters defines the parameters for the url redirect action.
6983type URLRedirectActionParameters struct {
6984	OdataType *string `json:"@odata.type,omitempty"`
6985	// RedirectType - The redirect type the rule will use when redirecting traffic. Possible values include: 'Moved', 'Found', 'TemporaryRedirect', 'PermanentRedirect'
6986	RedirectType RedirectType `json:"redirectType,omitempty"`
6987	// DestinationProtocol - Protocol to use for the redirect. The default value is MatchRequest. Possible values include: 'MatchRequest', 'HTTP', 'HTTPS'
6988	DestinationProtocol DestinationProtocol `json:"destinationProtocol,omitempty"`
6989	// CustomPath - The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.
6990	CustomPath *string `json:"customPath,omitempty"`
6991	// CustomHostname - Host to redirect. Leave empty to use the incoming host as the destination host.
6992	CustomHostname *string `json:"customHostname,omitempty"`
6993	// CustomQueryString - The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in <key>=<value> format. ? and & will be added automatically so do not include them.
6994	CustomQueryString *string `json:"customQueryString,omitempty"`
6995	// CustomFragment - Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.
6996	CustomFragment *string `json:"customFragment,omitempty"`
6997}
6998
6999// URLRewriteAction defines the url rewrite action for the delivery rule.
7000type URLRewriteAction struct {
7001	// Parameters - Defines the parameters for the action.
7002	Parameters *URLRewriteActionParameters `json:"parameters,omitempty"`
7003	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
7004	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
7005}
7006
7007// MarshalJSON is the custom marshaler for URLRewriteAction.
7008func (ura URLRewriteAction) MarshalJSON() ([]byte, error) {
7009	ura.Name = NameURLRewrite
7010	objectMap := make(map[string]interface{})
7011	if ura.Parameters != nil {
7012		objectMap["parameters"] = ura.Parameters
7013	}
7014	if ura.Name != "" {
7015		objectMap["name"] = ura.Name
7016	}
7017	return json.Marshal(objectMap)
7018}
7019
7020// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
7021func (ura URLRewriteAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
7022	return nil, false
7023}
7024
7025// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
7026func (ura URLRewriteAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
7027	return &ura, true
7028}
7029
7030// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
7031func (ura URLRewriteAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
7032	return nil, false
7033}
7034
7035// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
7036func (ura URLRewriteAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
7037	return nil, false
7038}
7039
7040// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
7041func (ura URLRewriteAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
7042	return nil, false
7043}
7044
7045// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
7046func (ura URLRewriteAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
7047	return nil, false
7048}
7049
7050// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
7051func (ura URLRewriteAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
7052	return nil, false
7053}
7054
7055// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
7056func (ura URLRewriteAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
7057	return &ura, true
7058}
7059
7060// URLRewriteActionParameters defines the parameters for the url rewrite action.
7061type URLRewriteActionParameters struct {
7062	OdataType *string `json:"@odata.type,omitempty"`
7063	// SourcePattern - define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched.
7064	SourcePattern *string `json:"sourcePattern,omitempty"`
7065	// Destination - Define the relative URL to which the above requests will be rewritten by.
7066	Destination *string `json:"destination,omitempty"`
7067	// PreserveUnmatchedPath - Whether to preserve unmatched path. Default value is true.
7068	PreserveUnmatchedPath *bool `json:"preserveUnmatchedPath,omitempty"`
7069}
7070
7071// URLSigningActionParameters defines the parameters for the Url Signing action.
7072type URLSigningActionParameters struct {
7073	// KeyID - Id reference of the key to be used to verify the hash and should be defined in UrlSigningKeys
7074	KeyID *string `json:"keyId,omitempty"`
7075	// Algorithm - Algorithm to use for URL signing. Possible values include: 'SHA256'
7076	Algorithm Algorithm `json:"algorithm,omitempty"`
7077	// ParameterNameOverride - Defines which query string parameters in the url to be considered for expires, key id etc.
7078	ParameterNameOverride *[]URLSigningParamIdentifier `json:"parameterNameOverride,omitempty"`
7079	// IPSubnets - Match values to match against. Supports CIDR ranges (both IPv4 and IPv6).
7080	IPSubnets *[]string `json:"ipSubnets,omitempty"`
7081}
7082
7083// URLSigningKey url signing key
7084type URLSigningKey struct {
7085	// KeyID - Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.
7086	KeyID *string `json:"keyId,omitempty"`
7087	// KeySourceParameters - Defines the parameters for using customer key vault for Url Signing Key.
7088	KeySourceParameters *KeyVaultSigningKeyParameters `json:"keySourceParameters,omitempty"`
7089}
7090
7091// URLSigningParamIdentifier defines how to identify a parameter for a specific purpose e.g. expires
7092type URLSigningParamIdentifier struct {
7093	// ParamIndicator - Indicates the purpose of the parameter. Possible values include: 'Expires', 'KeyID', 'Signature'
7094	ParamIndicator ParamIndicator `json:"paramIndicator,omitempty"`
7095	// ParamName - Parameter name
7096	ParamName *string `json:"paramName,omitempty"`
7097}
7098
7099// UserManagedHTTPSParameters defines the certificate source parameters using user's keyvault certificate
7100// for enabling SSL.
7101type UserManagedHTTPSParameters struct {
7102	// CertificateSourceParameters - Defines the certificate source parameters using user's keyvault certificate for enabling SSL.
7103	CertificateSourceParameters *KeyVaultCertificateSourceParameters `json:"certificateSourceParameters,omitempty"`
7104	// ProtocolType - Defines the TLS extension protocol that is used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased'
7105	ProtocolType ProtocolType `json:"protocolType,omitempty"`
7106	// MinimumTLSVersion - TLS protocol version that will be used for Https. Possible values include: 'None', 'TLS10', 'TLS12'
7107	MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"`
7108	// CertificateSource - Possible values include: 'CertificateSourceCustomDomainHTTPSParameters', 'CertificateSourceCdn', 'CertificateSourceAzureKeyVault'
7109	CertificateSource CertificateSource `json:"certificateSource,omitempty"`
7110}
7111
7112// MarshalJSON is the custom marshaler for UserManagedHTTPSParameters.
7113func (umhp UserManagedHTTPSParameters) MarshalJSON() ([]byte, error) {
7114	umhp.CertificateSource = CertificateSourceAzureKeyVault
7115	objectMap := make(map[string]interface{})
7116	if umhp.CertificateSourceParameters != nil {
7117		objectMap["certificateSourceParameters"] = umhp.CertificateSourceParameters
7118	}
7119	if umhp.ProtocolType != "" {
7120		objectMap["protocolType"] = umhp.ProtocolType
7121	}
7122	if umhp.MinimumTLSVersion != "" {
7123		objectMap["minimumTlsVersion"] = umhp.MinimumTLSVersion
7124	}
7125	if umhp.CertificateSource != "" {
7126		objectMap["certificateSource"] = umhp.CertificateSource
7127	}
7128	return json.Marshal(objectMap)
7129}
7130
7131// AsManagedHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for UserManagedHTTPSParameters.
7132func (umhp UserManagedHTTPSParameters) AsManagedHTTPSParameters() (*ManagedHTTPSParameters, bool) {
7133	return nil, false
7134}
7135
7136// AsUserManagedHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for UserManagedHTTPSParameters.
7137func (umhp UserManagedHTTPSParameters) AsUserManagedHTTPSParameters() (*UserManagedHTTPSParameters, bool) {
7138	return &umhp, true
7139}
7140
7141// AsCustomDomainHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for UserManagedHTTPSParameters.
7142func (umhp UserManagedHTTPSParameters) AsCustomDomainHTTPSParameters() (*CustomDomainHTTPSParameters, bool) {
7143	return nil, false
7144}
7145
7146// AsBasicCustomDomainHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for UserManagedHTTPSParameters.
7147func (umhp UserManagedHTTPSParameters) AsBasicCustomDomainHTTPSParameters() (BasicCustomDomainHTTPSParameters, bool) {
7148	return &umhp, true
7149}
7150
7151// ValidateCustomDomainInput input of the custom domain to be validated for DNS mapping.
7152type ValidateCustomDomainInput struct {
7153	// HostName - The host name of the custom domain. Must be a domain name.
7154	HostName *string `json:"hostName,omitempty"`
7155}
7156
7157// ValidateCustomDomainOutput output of custom domain validation.
7158type ValidateCustomDomainOutput struct {
7159	autorest.Response `json:"-"`
7160	// CustomDomainValidated - READ-ONLY; Indicates whether the custom domain is valid or not.
7161	CustomDomainValidated *bool `json:"customDomainValidated,omitempty"`
7162	// Reason - READ-ONLY; The reason why the custom domain is not valid.
7163	Reason *string `json:"reason,omitempty"`
7164	// Message - READ-ONLY; Error message describing why the custom domain is not valid.
7165	Message *string `json:"message,omitempty"`
7166}
7167
7168// ValidateProbeInput input of the validate probe API.
7169type ValidateProbeInput struct {
7170	// ProbeURL - The probe URL to validate.
7171	ProbeURL *string `json:"probeURL,omitempty"`
7172}
7173
7174// ValidateProbeOutput output of the validate probe API.
7175type ValidateProbeOutput struct {
7176	autorest.Response `json:"-"`
7177	// IsValid - READ-ONLY; Indicates whether the probe URL is accepted or not.
7178	IsValid *bool `json:"isValid,omitempty"`
7179	// ErrorCode - READ-ONLY; Specifies the error code when the probe url is not accepted.
7180	ErrorCode *string `json:"errorCode,omitempty"`
7181	// Message - READ-ONLY; The detailed error message describing why the probe URL is not accepted.
7182	Message *string `json:"message,omitempty"`
7183}
7184
7185// WebApplicationFirewallPolicy defines web application firewall policy for Azure CDN.
7186type WebApplicationFirewallPolicy struct {
7187	autorest.Response `json:"-"`
7188	// WebApplicationFirewallPolicyProperties - Properties of the web application firewall policy.
7189	*WebApplicationFirewallPolicyProperties `json:"properties,omitempty"`
7190	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
7191	Etag *string `json:"etag,omitempty"`
7192	// Sku - The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy.
7193	Sku *Sku `json:"sku,omitempty"`
7194	// Location - Resource location.
7195	Location *string `json:"location,omitempty"`
7196	// Tags - Resource tags.
7197	Tags map[string]*string `json:"tags"`
7198	// ID - READ-ONLY; Resource ID.
7199	ID *string `json:"id,omitempty"`
7200	// Name - READ-ONLY; Resource name.
7201	Name *string `json:"name,omitempty"`
7202	// Type - READ-ONLY; Resource type.
7203	Type *string `json:"type,omitempty"`
7204}
7205
7206// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
7207func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
7208	objectMap := make(map[string]interface{})
7209	if wafp.WebApplicationFirewallPolicyProperties != nil {
7210		objectMap["properties"] = wafp.WebApplicationFirewallPolicyProperties
7211	}
7212	if wafp.Etag != nil {
7213		objectMap["etag"] = wafp.Etag
7214	}
7215	if wafp.Sku != nil {
7216		objectMap["sku"] = wafp.Sku
7217	}
7218	if wafp.Location != nil {
7219		objectMap["location"] = wafp.Location
7220	}
7221	if wafp.Tags != nil {
7222		objectMap["tags"] = wafp.Tags
7223	}
7224	return json.Marshal(objectMap)
7225}
7226
7227// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
7228func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
7229	var m map[string]*json.RawMessage
7230	err := json.Unmarshal(body, &m)
7231	if err != nil {
7232		return err
7233	}
7234	for k, v := range m {
7235		switch k {
7236		case "properties":
7237			if v != nil {
7238				var webApplicationFirewallPolicyProperties WebApplicationFirewallPolicyProperties
7239				err = json.Unmarshal(*v, &webApplicationFirewallPolicyProperties)
7240				if err != nil {
7241					return err
7242				}
7243				wafp.WebApplicationFirewallPolicyProperties = &webApplicationFirewallPolicyProperties
7244			}
7245		case "etag":
7246			if v != nil {
7247				var etag string
7248				err = json.Unmarshal(*v, &etag)
7249				if err != nil {
7250					return err
7251				}
7252				wafp.Etag = &etag
7253			}
7254		case "sku":
7255			if v != nil {
7256				var sku Sku
7257				err = json.Unmarshal(*v, &sku)
7258				if err != nil {
7259					return err
7260				}
7261				wafp.Sku = &sku
7262			}
7263		case "location":
7264			if v != nil {
7265				var location string
7266				err = json.Unmarshal(*v, &location)
7267				if err != nil {
7268					return err
7269				}
7270				wafp.Location = &location
7271			}
7272		case "tags":
7273			if v != nil {
7274				var tags map[string]*string
7275				err = json.Unmarshal(*v, &tags)
7276				if err != nil {
7277					return err
7278				}
7279				wafp.Tags = tags
7280			}
7281		case "id":
7282			if v != nil {
7283				var ID string
7284				err = json.Unmarshal(*v, &ID)
7285				if err != nil {
7286					return err
7287				}
7288				wafp.ID = &ID
7289			}
7290		case "name":
7291			if v != nil {
7292				var name string
7293				err = json.Unmarshal(*v, &name)
7294				if err != nil {
7295					return err
7296				}
7297				wafp.Name = &name
7298			}
7299		case "type":
7300			if v != nil {
7301				var typeVar string
7302				err = json.Unmarshal(*v, &typeVar)
7303				if err != nil {
7304					return err
7305				}
7306				wafp.Type = &typeVar
7307			}
7308		}
7309	}
7310
7311	return nil
7312}
7313
7314// WebApplicationFirewallPolicyList defines a list of WebApplicationFirewallPolicies for Azure CDN. It
7315// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
7316type WebApplicationFirewallPolicyList struct {
7317	autorest.Response `json:"-"`
7318	// Value - READ-ONLY; List of Azure CDN WebApplicationFirewallPolicies within a resource group.
7319	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
7320	// NextLink - URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
7321	NextLink *string `json:"nextLink,omitempty"`
7322}
7323
7324// WebApplicationFirewallPolicyListIterator provides access to a complete listing of
7325// WebApplicationFirewallPolicy values.
7326type WebApplicationFirewallPolicyListIterator struct {
7327	i    int
7328	page WebApplicationFirewallPolicyListPage
7329}
7330
7331// NextWithContext advances to the next value.  If there was an error making
7332// the request the iterator does not advance and the error is returned.
7333func (iter *WebApplicationFirewallPolicyListIterator) NextWithContext(ctx context.Context) (err error) {
7334	if tracing.IsEnabled() {
7335		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListIterator.NextWithContext")
7336		defer func() {
7337			sc := -1
7338			if iter.Response().Response.Response != nil {
7339				sc = iter.Response().Response.Response.StatusCode
7340			}
7341			tracing.EndSpan(ctx, sc, err)
7342		}()
7343	}
7344	iter.i++
7345	if iter.i < len(iter.page.Values()) {
7346		return nil
7347	}
7348	err = iter.page.NextWithContext(ctx)
7349	if err != nil {
7350		iter.i--
7351		return err
7352	}
7353	iter.i = 0
7354	return nil
7355}
7356
7357// Next advances to the next value.  If there was an error making
7358// the request the iterator does not advance and the error is returned.
7359// Deprecated: Use NextWithContext() instead.
7360func (iter *WebApplicationFirewallPolicyListIterator) Next() error {
7361	return iter.NextWithContext(context.Background())
7362}
7363
7364// NotDone returns true if the enumeration should be started or is not yet complete.
7365func (iter WebApplicationFirewallPolicyListIterator) NotDone() bool {
7366	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7367}
7368
7369// Response returns the raw server response from the last page request.
7370func (iter WebApplicationFirewallPolicyListIterator) Response() WebApplicationFirewallPolicyList {
7371	return iter.page.Response()
7372}
7373
7374// Value returns the current value or a zero-initialized value if the
7375// iterator has advanced beyond the end of the collection.
7376func (iter WebApplicationFirewallPolicyListIterator) Value() WebApplicationFirewallPolicy {
7377	if !iter.page.NotDone() {
7378		return WebApplicationFirewallPolicy{}
7379	}
7380	return iter.page.Values()[iter.i]
7381}
7382
7383// Creates a new instance of the WebApplicationFirewallPolicyListIterator type.
7384func NewWebApplicationFirewallPolicyListIterator(page WebApplicationFirewallPolicyListPage) WebApplicationFirewallPolicyListIterator {
7385	return WebApplicationFirewallPolicyListIterator{page: page}
7386}
7387
7388// IsEmpty returns true if the ListResult contains no values.
7389func (wafpl WebApplicationFirewallPolicyList) IsEmpty() bool {
7390	return wafpl.Value == nil || len(*wafpl.Value) == 0
7391}
7392
7393// webApplicationFirewallPolicyListPreparer prepares a request to retrieve the next set of results.
7394// It returns nil if no more results exist.
7395func (wafpl WebApplicationFirewallPolicyList) webApplicationFirewallPolicyListPreparer(ctx context.Context) (*http.Request, error) {
7396	if wafpl.NextLink == nil || len(to.String(wafpl.NextLink)) < 1 {
7397		return nil, nil
7398	}
7399	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7400		autorest.AsJSON(),
7401		autorest.AsGet(),
7402		autorest.WithBaseURL(to.String(wafpl.NextLink)))
7403}
7404
7405// WebApplicationFirewallPolicyListPage contains a page of WebApplicationFirewallPolicy values.
7406type WebApplicationFirewallPolicyListPage struct {
7407	fn    func(context.Context, WebApplicationFirewallPolicyList) (WebApplicationFirewallPolicyList, error)
7408	wafpl WebApplicationFirewallPolicyList
7409}
7410
7411// NextWithContext advances to the next page of values.  If there was an error making
7412// the request the page does not advance and the error is returned.
7413func (page *WebApplicationFirewallPolicyListPage) NextWithContext(ctx context.Context) (err error) {
7414	if tracing.IsEnabled() {
7415		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListPage.NextWithContext")
7416		defer func() {
7417			sc := -1
7418			if page.Response().Response.Response != nil {
7419				sc = page.Response().Response.Response.StatusCode
7420			}
7421			tracing.EndSpan(ctx, sc, err)
7422		}()
7423	}
7424	next, err := page.fn(ctx, page.wafpl)
7425	if err != nil {
7426		return err
7427	}
7428	page.wafpl = next
7429	return nil
7430}
7431
7432// Next advances to the next page of values.  If there was an error making
7433// the request the page does not advance and the error is returned.
7434// Deprecated: Use NextWithContext() instead.
7435func (page *WebApplicationFirewallPolicyListPage) Next() error {
7436	return page.NextWithContext(context.Background())
7437}
7438
7439// NotDone returns true if the page enumeration should be started or is not yet complete.
7440func (page WebApplicationFirewallPolicyListPage) NotDone() bool {
7441	return !page.wafpl.IsEmpty()
7442}
7443
7444// Response returns the raw server response from the last page request.
7445func (page WebApplicationFirewallPolicyListPage) Response() WebApplicationFirewallPolicyList {
7446	return page.wafpl
7447}
7448
7449// Values returns the slice of values for the current page or nil if there are no values.
7450func (page WebApplicationFirewallPolicyListPage) Values() []WebApplicationFirewallPolicy {
7451	if page.wafpl.IsEmpty() {
7452		return nil
7453	}
7454	return *page.wafpl.Value
7455}
7456
7457// Creates a new instance of the WebApplicationFirewallPolicyListPage type.
7458func NewWebApplicationFirewallPolicyListPage(getNextPage func(context.Context, WebApplicationFirewallPolicyList) (WebApplicationFirewallPolicyList, error)) WebApplicationFirewallPolicyListPage {
7459	return WebApplicationFirewallPolicyListPage{fn: getNextPage}
7460}
7461
7462// WebApplicationFirewallPolicyPatchParameters properties required to update a
7463// CdnWebApplicationFirewallPolicy.
7464type WebApplicationFirewallPolicyPatchParameters struct {
7465	// Tags - CdnWebApplicationFirewallPolicy tags
7466	Tags map[string]*string `json:"tags"`
7467}
7468
7469// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPatchParameters.
7470func (wafppp WebApplicationFirewallPolicyPatchParameters) MarshalJSON() ([]byte, error) {
7471	objectMap := make(map[string]interface{})
7472	if wafppp.Tags != nil {
7473		objectMap["tags"] = wafppp.Tags
7474	}
7475	return json.Marshal(objectMap)
7476}
7477
7478// WebApplicationFirewallPolicyProperties defines CDN web application firewall policy properties.
7479type WebApplicationFirewallPolicyProperties struct {
7480	// PolicySettings - Describes  policySettings for policy
7481	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
7482	// RateLimitRules - Describes rate limit rules inside the policy.
7483	RateLimitRules *RateLimitRuleList `json:"rateLimitRules,omitempty"`
7484	// CustomRules - Describes custom rules inside the policy.
7485	CustomRules *CustomRuleList `json:"customRules,omitempty"`
7486	// ManagedRules - Describes managed rules inside the policy.
7487	ManagedRules *ManagedRuleSetList `json:"managedRules,omitempty"`
7488	// EndpointLinks - READ-ONLY; Describes Azure CDN endpoints associated with this Web Application Firewall policy.
7489	EndpointLinks *[]EndpointType `json:"endpointLinks,omitempty"`
7490	// ProvisioningState - READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed'
7491	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7492	// ResourceState - READ-ONLY; Possible values include: 'PolicyResourceStateCreating', 'PolicyResourceStateEnabling', 'PolicyResourceStateEnabled', 'PolicyResourceStateDisabling', 'PolicyResourceStateDisabled', 'PolicyResourceStateDeleting'
7493	ResourceState PolicyResourceState `json:"resourceState,omitempty"`
7494}
7495