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/cdn/mgmt/2019-04-15/cdn"
32
33// CacheBehavior enumerates the values for cache behavior.
34type CacheBehavior string
35
36const (
37	// BypassCache ...
38	BypassCache CacheBehavior = "BypassCache"
39	// Override ...
40	Override CacheBehavior = "Override"
41	// SetIfMissing ...
42	SetIfMissing CacheBehavior = "SetIfMissing"
43)
44
45// PossibleCacheBehaviorValues returns an array of possible values for the CacheBehavior const type.
46func PossibleCacheBehaviorValues() []CacheBehavior {
47	return []CacheBehavior{BypassCache, Override, SetIfMissing}
48}
49
50// CertificateSource enumerates the values for certificate source.
51type CertificateSource string
52
53const (
54	// CertificateSourceAzureKeyVault ...
55	CertificateSourceAzureKeyVault CertificateSource = "AzureKeyVault"
56	// CertificateSourceCdn ...
57	CertificateSourceCdn CertificateSource = "Cdn"
58	// CertificateSourceCustomDomainHTTPSParameters ...
59	CertificateSourceCustomDomainHTTPSParameters CertificateSource = "CustomDomainHttpsParameters"
60)
61
62// PossibleCertificateSourceValues returns an array of possible values for the CertificateSource const type.
63func PossibleCertificateSourceValues() []CertificateSource {
64	return []CertificateSource{CertificateSourceAzureKeyVault, CertificateSourceCdn, CertificateSourceCustomDomainHTTPSParameters}
65}
66
67// CertificateType enumerates the values for certificate type.
68type CertificateType string
69
70const (
71	// Dedicated ...
72	Dedicated CertificateType = "Dedicated"
73	// Shared ...
74	Shared CertificateType = "Shared"
75)
76
77// PossibleCertificateTypeValues returns an array of possible values for the CertificateType const type.
78func PossibleCertificateTypeValues() []CertificateType {
79	return []CertificateType{Dedicated, Shared}
80}
81
82// CustomDomainResourceState enumerates the values for custom domain resource state.
83type CustomDomainResourceState string
84
85const (
86	// Active ...
87	Active CustomDomainResourceState = "Active"
88	// Creating ...
89	Creating CustomDomainResourceState = "Creating"
90	// Deleting ...
91	Deleting CustomDomainResourceState = "Deleting"
92)
93
94// PossibleCustomDomainResourceStateValues returns an array of possible values for the CustomDomainResourceState const type.
95func PossibleCustomDomainResourceStateValues() []CustomDomainResourceState {
96	return []CustomDomainResourceState{Active, Creating, Deleting}
97}
98
99// CustomHTTPSProvisioningState enumerates the values for custom https provisioning state.
100type CustomHTTPSProvisioningState string
101
102const (
103	// Disabled ...
104	Disabled CustomHTTPSProvisioningState = "Disabled"
105	// Disabling ...
106	Disabling CustomHTTPSProvisioningState = "Disabling"
107	// Enabled ...
108	Enabled CustomHTTPSProvisioningState = "Enabled"
109	// Enabling ...
110	Enabling CustomHTTPSProvisioningState = "Enabling"
111	// Failed ...
112	Failed CustomHTTPSProvisioningState = "Failed"
113)
114
115// PossibleCustomHTTPSProvisioningStateValues returns an array of possible values for the CustomHTTPSProvisioningState const type.
116func PossibleCustomHTTPSProvisioningStateValues() []CustomHTTPSProvisioningState {
117	return []CustomHTTPSProvisioningState{Disabled, Disabling, Enabled, Enabling, Failed}
118}
119
120// CustomHTTPSProvisioningSubstate enumerates the values for custom https provisioning substate.
121type CustomHTTPSProvisioningSubstate string
122
123const (
124	// CertificateDeleted ...
125	CertificateDeleted CustomHTTPSProvisioningSubstate = "CertificateDeleted"
126	// CertificateDeployed ...
127	CertificateDeployed CustomHTTPSProvisioningSubstate = "CertificateDeployed"
128	// DeletingCertificate ...
129	DeletingCertificate CustomHTTPSProvisioningSubstate = "DeletingCertificate"
130	// DeployingCertificate ...
131	DeployingCertificate CustomHTTPSProvisioningSubstate = "DeployingCertificate"
132	// DomainControlValidationRequestApproved ...
133	DomainControlValidationRequestApproved CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestApproved"
134	// DomainControlValidationRequestRejected ...
135	DomainControlValidationRequestRejected CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestRejected"
136	// DomainControlValidationRequestTimedOut ...
137	DomainControlValidationRequestTimedOut CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestTimedOut"
138	// IssuingCertificate ...
139	IssuingCertificate CustomHTTPSProvisioningSubstate = "IssuingCertificate"
140	// PendingDomainControlValidationREquestApproval ...
141	PendingDomainControlValidationREquestApproval CustomHTTPSProvisioningSubstate = "PendingDomainControlValidationREquestApproval"
142	// SubmittingDomainControlValidationRequest ...
143	SubmittingDomainControlValidationRequest CustomHTTPSProvisioningSubstate = "SubmittingDomainControlValidationRequest"
144)
145
146// PossibleCustomHTTPSProvisioningSubstateValues returns an array of possible values for the CustomHTTPSProvisioningSubstate const type.
147func PossibleCustomHTTPSProvisioningSubstateValues() []CustomHTTPSProvisioningSubstate {
148	return []CustomHTTPSProvisioningSubstate{CertificateDeleted, CertificateDeployed, DeletingCertificate, DeployingCertificate, DomainControlValidationRequestApproved, DomainControlValidationRequestRejected, DomainControlValidationRequestTimedOut, IssuingCertificate, PendingDomainControlValidationREquestApproval, SubmittingDomainControlValidationRequest}
149}
150
151// DestinationProtocol enumerates the values for destination protocol.
152type DestinationProtocol string
153
154const (
155	// HTTP ...
156	HTTP DestinationProtocol = "Http"
157	// HTTPS ...
158	HTTPS DestinationProtocol = "Https"
159	// MatchRequest ...
160	MatchRequest DestinationProtocol = "MatchRequest"
161)
162
163// PossibleDestinationProtocolValues returns an array of possible values for the DestinationProtocol const type.
164func PossibleDestinationProtocolValues() []DestinationProtocol {
165	return []DestinationProtocol{HTTP, HTTPS, MatchRequest}
166}
167
168// EndpointResourceState enumerates the values for endpoint resource state.
169type EndpointResourceState string
170
171const (
172	// EndpointResourceStateCreating ...
173	EndpointResourceStateCreating EndpointResourceState = "Creating"
174	// EndpointResourceStateDeleting ...
175	EndpointResourceStateDeleting EndpointResourceState = "Deleting"
176	// EndpointResourceStateRunning ...
177	EndpointResourceStateRunning EndpointResourceState = "Running"
178	// EndpointResourceStateStarting ...
179	EndpointResourceStateStarting EndpointResourceState = "Starting"
180	// EndpointResourceStateStopped ...
181	EndpointResourceStateStopped EndpointResourceState = "Stopped"
182	// EndpointResourceStateStopping ...
183	EndpointResourceStateStopping EndpointResourceState = "Stopping"
184)
185
186// PossibleEndpointResourceStateValues returns an array of possible values for the EndpointResourceState const type.
187func PossibleEndpointResourceStateValues() []EndpointResourceState {
188	return []EndpointResourceState{EndpointResourceStateCreating, EndpointResourceStateDeleting, EndpointResourceStateRunning, EndpointResourceStateStarting, EndpointResourceStateStopped, EndpointResourceStateStopping}
189}
190
191// GeoFilterActions enumerates the values for geo filter actions.
192type GeoFilterActions string
193
194const (
195	// Allow ...
196	Allow GeoFilterActions = "Allow"
197	// Block ...
198	Block GeoFilterActions = "Block"
199)
200
201// PossibleGeoFilterActionsValues returns an array of possible values for the GeoFilterActions const type.
202func PossibleGeoFilterActionsValues() []GeoFilterActions {
203	return []GeoFilterActions{Allow, Block}
204}
205
206// HeaderAction enumerates the values for header action.
207type HeaderAction string
208
209const (
210	// Append ...
211	Append HeaderAction = "Append"
212	// Delete ...
213	Delete HeaderAction = "Delete"
214	// Overwrite ...
215	Overwrite HeaderAction = "Overwrite"
216)
217
218// PossibleHeaderActionValues returns an array of possible values for the HeaderAction const type.
219func PossibleHeaderActionValues() []HeaderAction {
220	return []HeaderAction{Append, Delete, Overwrite}
221}
222
223// Name enumerates the values for name.
224type Name string
225
226const (
227	// NameDeliveryRuleCondition ...
228	NameDeliveryRuleCondition Name = "DeliveryRuleCondition"
229	// NameIsDevice ...
230	NameIsDevice Name = "IsDevice"
231	// NamePostArgs ...
232	NamePostArgs Name = "PostArgs"
233	// NameQueryString ...
234	NameQueryString Name = "QueryString"
235	// NameRemoteAddress ...
236	NameRemoteAddress Name = "RemoteAddress"
237	// NameRequestBody ...
238	NameRequestBody Name = "RequestBody"
239	// NameRequestHeader ...
240	NameRequestHeader Name = "RequestHeader"
241	// NameRequestMethod ...
242	NameRequestMethod Name = "RequestMethod"
243	// NameRequestScheme ...
244	NameRequestScheme Name = "RequestScheme"
245	// NameRequestURI ...
246	NameRequestURI Name = "RequestUri"
247	// NameURLFileExtension ...
248	NameURLFileExtension Name = "UrlFileExtension"
249	// NameURLFileName ...
250	NameURLFileName Name = "UrlFileName"
251	// NameURLPath ...
252	NameURLPath Name = "UrlPath"
253)
254
255// PossibleNameValues returns an array of possible values for the Name const type.
256func PossibleNameValues() []Name {
257	return []Name{NameDeliveryRuleCondition, NameIsDevice, NamePostArgs, NameQueryString, NameRemoteAddress, NameRequestBody, NameRequestHeader, NameRequestMethod, NameRequestScheme, NameRequestURI, NameURLFileExtension, NameURLFileName, NameURLPath}
258}
259
260// NameBasicDeliveryRuleAction enumerates the values for name basic delivery rule action.
261type NameBasicDeliveryRuleAction string
262
263const (
264	// NameCacheExpiration ...
265	NameCacheExpiration NameBasicDeliveryRuleAction = "CacheExpiration"
266	// NameCacheKeyQueryString ...
267	NameCacheKeyQueryString NameBasicDeliveryRuleAction = "CacheKeyQueryString"
268	// NameDeliveryRuleAction ...
269	NameDeliveryRuleAction NameBasicDeliveryRuleAction = "DeliveryRuleAction"
270	// NameModifyRequestHeader ...
271	NameModifyRequestHeader NameBasicDeliveryRuleAction = "ModifyRequestHeader"
272	// NameModifyResponseHeader ...
273	NameModifyResponseHeader NameBasicDeliveryRuleAction = "ModifyResponseHeader"
274	// NameURLRedirect ...
275	NameURLRedirect NameBasicDeliveryRuleAction = "UrlRedirect"
276	// NameURLRewrite ...
277	NameURLRewrite NameBasicDeliveryRuleAction = "UrlRewrite"
278)
279
280// PossibleNameBasicDeliveryRuleActionValues returns an array of possible values for the NameBasicDeliveryRuleAction const type.
281func PossibleNameBasicDeliveryRuleActionValues() []NameBasicDeliveryRuleAction {
282	return []NameBasicDeliveryRuleAction{NameCacheExpiration, NameCacheKeyQueryString, NameDeliveryRuleAction, NameModifyRequestHeader, NameModifyResponseHeader, NameURLRedirect, NameURLRewrite}
283}
284
285// OptimizationType enumerates the values for optimization type.
286type OptimizationType string
287
288const (
289	// DynamicSiteAcceleration ...
290	DynamicSiteAcceleration OptimizationType = "DynamicSiteAcceleration"
291	// GeneralMediaStreaming ...
292	GeneralMediaStreaming OptimizationType = "GeneralMediaStreaming"
293	// GeneralWebDelivery ...
294	GeneralWebDelivery OptimizationType = "GeneralWebDelivery"
295	// LargeFileDownload ...
296	LargeFileDownload OptimizationType = "LargeFileDownload"
297	// VideoOnDemandMediaStreaming ...
298	VideoOnDemandMediaStreaming OptimizationType = "VideoOnDemandMediaStreaming"
299)
300
301// PossibleOptimizationTypeValues returns an array of possible values for the OptimizationType const type.
302func PossibleOptimizationTypeValues() []OptimizationType {
303	return []OptimizationType{DynamicSiteAcceleration, GeneralMediaStreaming, GeneralWebDelivery, LargeFileDownload, VideoOnDemandMediaStreaming}
304}
305
306// OriginResourceState enumerates the values for origin resource state.
307type OriginResourceState string
308
309const (
310	// OriginResourceStateActive ...
311	OriginResourceStateActive OriginResourceState = "Active"
312	// OriginResourceStateCreating ...
313	OriginResourceStateCreating OriginResourceState = "Creating"
314	// OriginResourceStateDeleting ...
315	OriginResourceStateDeleting OriginResourceState = "Deleting"
316)
317
318// PossibleOriginResourceStateValues returns an array of possible values for the OriginResourceState const type.
319func PossibleOriginResourceStateValues() []OriginResourceState {
320	return []OriginResourceState{OriginResourceStateActive, OriginResourceStateCreating, OriginResourceStateDeleting}
321}
322
323// PostArgsOperator enumerates the values for post args operator.
324type PostArgsOperator string
325
326const (
327	// Any ...
328	Any PostArgsOperator = "Any"
329	// BeginsWith ...
330	BeginsWith PostArgsOperator = "BeginsWith"
331	// Contains ...
332	Contains PostArgsOperator = "Contains"
333	// EndsWith ...
334	EndsWith PostArgsOperator = "EndsWith"
335	// Equal ...
336	Equal PostArgsOperator = "Equal"
337	// GreaterThan ...
338	GreaterThan PostArgsOperator = "GreaterThan"
339	// GreaterThanOrEqual ...
340	GreaterThanOrEqual PostArgsOperator = "GreaterThanOrEqual"
341	// LessThan ...
342	LessThan PostArgsOperator = "LessThan"
343	// LessThanOrEqual ...
344	LessThanOrEqual PostArgsOperator = "LessThanOrEqual"
345)
346
347// PossiblePostArgsOperatorValues returns an array of possible values for the PostArgsOperator const type.
348func PossiblePostArgsOperatorValues() []PostArgsOperator {
349	return []PostArgsOperator{Any, BeginsWith, Contains, EndsWith, Equal, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual}
350}
351
352// ProfileResourceState enumerates the values for profile resource state.
353type ProfileResourceState string
354
355const (
356	// ProfileResourceStateActive ...
357	ProfileResourceStateActive ProfileResourceState = "Active"
358	// ProfileResourceStateCreating ...
359	ProfileResourceStateCreating ProfileResourceState = "Creating"
360	// ProfileResourceStateDeleting ...
361	ProfileResourceStateDeleting ProfileResourceState = "Deleting"
362	// ProfileResourceStateDisabled ...
363	ProfileResourceStateDisabled ProfileResourceState = "Disabled"
364)
365
366// PossibleProfileResourceStateValues returns an array of possible values for the ProfileResourceState const type.
367func PossibleProfileResourceStateValues() []ProfileResourceState {
368	return []ProfileResourceState{ProfileResourceStateActive, ProfileResourceStateCreating, ProfileResourceStateDeleting, ProfileResourceStateDisabled}
369}
370
371// ProtocolType enumerates the values for protocol type.
372type ProtocolType string
373
374const (
375	// IPBased ...
376	IPBased ProtocolType = "IPBased"
377	// ServerNameIndication ...
378	ServerNameIndication ProtocolType = "ServerNameIndication"
379)
380
381// PossibleProtocolTypeValues returns an array of possible values for the ProtocolType const type.
382func PossibleProtocolTypeValues() []ProtocolType {
383	return []ProtocolType{IPBased, ServerNameIndication}
384}
385
386// QueryStringBehavior enumerates the values for query string behavior.
387type QueryStringBehavior string
388
389const (
390	// Exclude ...
391	Exclude QueryStringBehavior = "Exclude"
392	// ExcludeAll ...
393	ExcludeAll QueryStringBehavior = "ExcludeAll"
394	// Include ...
395	Include QueryStringBehavior = "Include"
396	// IncludeAll ...
397	IncludeAll QueryStringBehavior = "IncludeAll"
398)
399
400// PossibleQueryStringBehaviorValues returns an array of possible values for the QueryStringBehavior const type.
401func PossibleQueryStringBehaviorValues() []QueryStringBehavior {
402	return []QueryStringBehavior{Exclude, ExcludeAll, Include, IncludeAll}
403}
404
405// QueryStringCachingBehavior enumerates the values for query string caching behavior.
406type QueryStringCachingBehavior string
407
408const (
409	// BypassCaching ...
410	BypassCaching QueryStringCachingBehavior = "BypassCaching"
411	// IgnoreQueryString ...
412	IgnoreQueryString QueryStringCachingBehavior = "IgnoreQueryString"
413	// NotSet ...
414	NotSet QueryStringCachingBehavior = "NotSet"
415	// UseQueryString ...
416	UseQueryString QueryStringCachingBehavior = "UseQueryString"
417)
418
419// PossibleQueryStringCachingBehaviorValues returns an array of possible values for the QueryStringCachingBehavior const type.
420func PossibleQueryStringCachingBehaviorValues() []QueryStringCachingBehavior {
421	return []QueryStringCachingBehavior{BypassCaching, IgnoreQueryString, NotSet, UseQueryString}
422}
423
424// QueryStringOperator enumerates the values for query string operator.
425type QueryStringOperator string
426
427const (
428	// QueryStringOperatorAny ...
429	QueryStringOperatorAny QueryStringOperator = "Any"
430	// QueryStringOperatorBeginsWith ...
431	QueryStringOperatorBeginsWith QueryStringOperator = "BeginsWith"
432	// QueryStringOperatorContains ...
433	QueryStringOperatorContains QueryStringOperator = "Contains"
434	// QueryStringOperatorEndsWith ...
435	QueryStringOperatorEndsWith QueryStringOperator = "EndsWith"
436	// QueryStringOperatorEqual ...
437	QueryStringOperatorEqual QueryStringOperator = "Equal"
438	// QueryStringOperatorGreaterThan ...
439	QueryStringOperatorGreaterThan QueryStringOperator = "GreaterThan"
440	// QueryStringOperatorGreaterThanOrEqual ...
441	QueryStringOperatorGreaterThanOrEqual QueryStringOperator = "GreaterThanOrEqual"
442	// QueryStringOperatorLessThan ...
443	QueryStringOperatorLessThan QueryStringOperator = "LessThan"
444	// QueryStringOperatorLessThanOrEqual ...
445	QueryStringOperatorLessThanOrEqual QueryStringOperator = "LessThanOrEqual"
446)
447
448// PossibleQueryStringOperatorValues returns an array of possible values for the QueryStringOperator const type.
449func PossibleQueryStringOperatorValues() []QueryStringOperator {
450	return []QueryStringOperator{QueryStringOperatorAny, QueryStringOperatorBeginsWith, QueryStringOperatorContains, QueryStringOperatorEndsWith, QueryStringOperatorEqual, QueryStringOperatorGreaterThan, QueryStringOperatorGreaterThanOrEqual, QueryStringOperatorLessThan, QueryStringOperatorLessThanOrEqual}
451}
452
453// RedirectType enumerates the values for redirect type.
454type RedirectType string
455
456const (
457	// Found ...
458	Found RedirectType = "Found"
459	// Moved ...
460	Moved RedirectType = "Moved"
461	// PermanentRedirect ...
462	PermanentRedirect RedirectType = "PermanentRedirect"
463	// TemporaryRedirect ...
464	TemporaryRedirect RedirectType = "TemporaryRedirect"
465)
466
467// PossibleRedirectTypeValues returns an array of possible values for the RedirectType const type.
468func PossibleRedirectTypeValues() []RedirectType {
469	return []RedirectType{Found, Moved, PermanentRedirect, TemporaryRedirect}
470}
471
472// RemoteAddressOperator enumerates the values for remote address operator.
473type RemoteAddressOperator string
474
475const (
476	// RemoteAddressOperatorAny ...
477	RemoteAddressOperatorAny RemoteAddressOperator = "Any"
478	// RemoteAddressOperatorGeoMatch ...
479	RemoteAddressOperatorGeoMatch RemoteAddressOperator = "GeoMatch"
480	// RemoteAddressOperatorIPMatch ...
481	RemoteAddressOperatorIPMatch RemoteAddressOperator = "IPMatch"
482)
483
484// PossibleRemoteAddressOperatorValues returns an array of possible values for the RemoteAddressOperator const type.
485func PossibleRemoteAddressOperatorValues() []RemoteAddressOperator {
486	return []RemoteAddressOperator{RemoteAddressOperatorAny, RemoteAddressOperatorGeoMatch, RemoteAddressOperatorIPMatch}
487}
488
489// RequestBodyOperator enumerates the values for request body operator.
490type RequestBodyOperator string
491
492const (
493	// RequestBodyOperatorAny ...
494	RequestBodyOperatorAny RequestBodyOperator = "Any"
495	// RequestBodyOperatorBeginsWith ...
496	RequestBodyOperatorBeginsWith RequestBodyOperator = "BeginsWith"
497	// RequestBodyOperatorContains ...
498	RequestBodyOperatorContains RequestBodyOperator = "Contains"
499	// RequestBodyOperatorEndsWith ...
500	RequestBodyOperatorEndsWith RequestBodyOperator = "EndsWith"
501	// RequestBodyOperatorEqual ...
502	RequestBodyOperatorEqual RequestBodyOperator = "Equal"
503	// RequestBodyOperatorGreaterThan ...
504	RequestBodyOperatorGreaterThan RequestBodyOperator = "GreaterThan"
505	// RequestBodyOperatorGreaterThanOrEqual ...
506	RequestBodyOperatorGreaterThanOrEqual RequestBodyOperator = "GreaterThanOrEqual"
507	// RequestBodyOperatorLessThan ...
508	RequestBodyOperatorLessThan RequestBodyOperator = "LessThan"
509	// RequestBodyOperatorLessThanOrEqual ...
510	RequestBodyOperatorLessThanOrEqual RequestBodyOperator = "LessThanOrEqual"
511)
512
513// PossibleRequestBodyOperatorValues returns an array of possible values for the RequestBodyOperator const type.
514func PossibleRequestBodyOperatorValues() []RequestBodyOperator {
515	return []RequestBodyOperator{RequestBodyOperatorAny, RequestBodyOperatorBeginsWith, RequestBodyOperatorContains, RequestBodyOperatorEndsWith, RequestBodyOperatorEqual, RequestBodyOperatorGreaterThan, RequestBodyOperatorGreaterThanOrEqual, RequestBodyOperatorLessThan, RequestBodyOperatorLessThanOrEqual}
516}
517
518// RequestHeaderOperator enumerates the values for request header operator.
519type RequestHeaderOperator string
520
521const (
522	// RequestHeaderOperatorAny ...
523	RequestHeaderOperatorAny RequestHeaderOperator = "Any"
524	// RequestHeaderOperatorBeginsWith ...
525	RequestHeaderOperatorBeginsWith RequestHeaderOperator = "BeginsWith"
526	// RequestHeaderOperatorContains ...
527	RequestHeaderOperatorContains RequestHeaderOperator = "Contains"
528	// RequestHeaderOperatorEndsWith ...
529	RequestHeaderOperatorEndsWith RequestHeaderOperator = "EndsWith"
530	// RequestHeaderOperatorEqual ...
531	RequestHeaderOperatorEqual RequestHeaderOperator = "Equal"
532	// RequestHeaderOperatorGreaterThan ...
533	RequestHeaderOperatorGreaterThan RequestHeaderOperator = "GreaterThan"
534	// RequestHeaderOperatorGreaterThanOrEqual ...
535	RequestHeaderOperatorGreaterThanOrEqual RequestHeaderOperator = "GreaterThanOrEqual"
536	// RequestHeaderOperatorLessThan ...
537	RequestHeaderOperatorLessThan RequestHeaderOperator = "LessThan"
538	// RequestHeaderOperatorLessThanOrEqual ...
539	RequestHeaderOperatorLessThanOrEqual RequestHeaderOperator = "LessThanOrEqual"
540)
541
542// PossibleRequestHeaderOperatorValues returns an array of possible values for the RequestHeaderOperator const type.
543func PossibleRequestHeaderOperatorValues() []RequestHeaderOperator {
544	return []RequestHeaderOperator{RequestHeaderOperatorAny, RequestHeaderOperatorBeginsWith, RequestHeaderOperatorContains, RequestHeaderOperatorEndsWith, RequestHeaderOperatorEqual, RequestHeaderOperatorGreaterThan, RequestHeaderOperatorGreaterThanOrEqual, RequestHeaderOperatorLessThan, RequestHeaderOperatorLessThanOrEqual}
545}
546
547// RequestURIOperator enumerates the values for request uri operator.
548type RequestURIOperator string
549
550const (
551	// RequestURIOperatorAny ...
552	RequestURIOperatorAny RequestURIOperator = "Any"
553	// RequestURIOperatorBeginsWith ...
554	RequestURIOperatorBeginsWith RequestURIOperator = "BeginsWith"
555	// RequestURIOperatorContains ...
556	RequestURIOperatorContains RequestURIOperator = "Contains"
557	// RequestURIOperatorEndsWith ...
558	RequestURIOperatorEndsWith RequestURIOperator = "EndsWith"
559	// RequestURIOperatorEqual ...
560	RequestURIOperatorEqual RequestURIOperator = "Equal"
561	// RequestURIOperatorGreaterThan ...
562	RequestURIOperatorGreaterThan RequestURIOperator = "GreaterThan"
563	// RequestURIOperatorGreaterThanOrEqual ...
564	RequestURIOperatorGreaterThanOrEqual RequestURIOperator = "GreaterThanOrEqual"
565	// RequestURIOperatorLessThan ...
566	RequestURIOperatorLessThan RequestURIOperator = "LessThan"
567	// RequestURIOperatorLessThanOrEqual ...
568	RequestURIOperatorLessThanOrEqual RequestURIOperator = "LessThanOrEqual"
569)
570
571// PossibleRequestURIOperatorValues returns an array of possible values for the RequestURIOperator const type.
572func PossibleRequestURIOperatorValues() []RequestURIOperator {
573	return []RequestURIOperator{RequestURIOperatorAny, RequestURIOperatorBeginsWith, RequestURIOperatorContains, RequestURIOperatorEndsWith, RequestURIOperatorEqual, RequestURIOperatorGreaterThan, RequestURIOperatorGreaterThanOrEqual, RequestURIOperatorLessThan, RequestURIOperatorLessThanOrEqual}
574}
575
576// ResourceType enumerates the values for resource type.
577type ResourceType string
578
579const (
580	// MicrosoftCdnProfilesEndpoints ...
581	MicrosoftCdnProfilesEndpoints ResourceType = "Microsoft.Cdn/Profiles/Endpoints"
582)
583
584// PossibleResourceTypeValues returns an array of possible values for the ResourceType const type.
585func PossibleResourceTypeValues() []ResourceType {
586	return []ResourceType{MicrosoftCdnProfilesEndpoints}
587}
588
589// SkuName enumerates the values for sku name.
590type SkuName string
591
592const (
593	// CustomVerizon ...
594	CustomVerizon SkuName = "Custom_Verizon"
595	// PremiumChinaCdn ...
596	PremiumChinaCdn SkuName = "Premium_ChinaCdn"
597	// PremiumVerizon ...
598	PremiumVerizon SkuName = "Premium_Verizon"
599	// StandardAkamai ...
600	StandardAkamai SkuName = "Standard_Akamai"
601	// StandardChinaCdn ...
602	StandardChinaCdn SkuName = "Standard_ChinaCdn"
603	// StandardMicrosoft ...
604	StandardMicrosoft SkuName = "Standard_Microsoft"
605	// StandardVerizon ...
606	StandardVerizon SkuName = "Standard_Verizon"
607)
608
609// PossibleSkuNameValues returns an array of possible values for the SkuName const type.
610func PossibleSkuNameValues() []SkuName {
611	return []SkuName{CustomVerizon, PremiumChinaCdn, PremiumVerizon, StandardAkamai, StandardChinaCdn, StandardMicrosoft, StandardVerizon}
612}
613
614// Transform enumerates the values for transform.
615type Transform string
616
617const (
618	// Lowercase ...
619	Lowercase Transform = "Lowercase"
620	// Uppercase ...
621	Uppercase Transform = "Uppercase"
622)
623
624// PossibleTransformValues returns an array of possible values for the Transform const type.
625func PossibleTransformValues() []Transform {
626	return []Transform{Lowercase, Uppercase}
627}
628
629// URLFileExtensionOperator enumerates the values for url file extension operator.
630type URLFileExtensionOperator string
631
632const (
633	// URLFileExtensionOperatorAny ...
634	URLFileExtensionOperatorAny URLFileExtensionOperator = "Any"
635	// URLFileExtensionOperatorBeginsWith ...
636	URLFileExtensionOperatorBeginsWith URLFileExtensionOperator = "BeginsWith"
637	// URLFileExtensionOperatorContains ...
638	URLFileExtensionOperatorContains URLFileExtensionOperator = "Contains"
639	// URLFileExtensionOperatorEndsWith ...
640	URLFileExtensionOperatorEndsWith URLFileExtensionOperator = "EndsWith"
641	// URLFileExtensionOperatorEqual ...
642	URLFileExtensionOperatorEqual URLFileExtensionOperator = "Equal"
643	// URLFileExtensionOperatorGreaterThan ...
644	URLFileExtensionOperatorGreaterThan URLFileExtensionOperator = "GreaterThan"
645	// URLFileExtensionOperatorGreaterThanOrEqual ...
646	URLFileExtensionOperatorGreaterThanOrEqual URLFileExtensionOperator = "GreaterThanOrEqual"
647	// URLFileExtensionOperatorLessThan ...
648	URLFileExtensionOperatorLessThan URLFileExtensionOperator = "LessThan"
649	// URLFileExtensionOperatorLessThanOrEqual ...
650	URLFileExtensionOperatorLessThanOrEqual URLFileExtensionOperator = "LessThanOrEqual"
651)
652
653// PossibleURLFileExtensionOperatorValues returns an array of possible values for the URLFileExtensionOperator const type.
654func PossibleURLFileExtensionOperatorValues() []URLFileExtensionOperator {
655	return []URLFileExtensionOperator{URLFileExtensionOperatorAny, URLFileExtensionOperatorBeginsWith, URLFileExtensionOperatorContains, URLFileExtensionOperatorEndsWith, URLFileExtensionOperatorEqual, URLFileExtensionOperatorGreaterThan, URLFileExtensionOperatorGreaterThanOrEqual, URLFileExtensionOperatorLessThan, URLFileExtensionOperatorLessThanOrEqual}
656}
657
658// URLFileNameOperator enumerates the values for url file name operator.
659type URLFileNameOperator string
660
661const (
662	// URLFileNameOperatorAny ...
663	URLFileNameOperatorAny URLFileNameOperator = "Any"
664	// URLFileNameOperatorBeginsWith ...
665	URLFileNameOperatorBeginsWith URLFileNameOperator = "BeginsWith"
666	// URLFileNameOperatorContains ...
667	URLFileNameOperatorContains URLFileNameOperator = "Contains"
668	// URLFileNameOperatorEndsWith ...
669	URLFileNameOperatorEndsWith URLFileNameOperator = "EndsWith"
670	// URLFileNameOperatorEqual ...
671	URLFileNameOperatorEqual URLFileNameOperator = "Equal"
672	// URLFileNameOperatorGreaterThan ...
673	URLFileNameOperatorGreaterThan URLFileNameOperator = "GreaterThan"
674	// URLFileNameOperatorGreaterThanOrEqual ...
675	URLFileNameOperatorGreaterThanOrEqual URLFileNameOperator = "GreaterThanOrEqual"
676	// URLFileNameOperatorLessThan ...
677	URLFileNameOperatorLessThan URLFileNameOperator = "LessThan"
678	// URLFileNameOperatorLessThanOrEqual ...
679	URLFileNameOperatorLessThanOrEqual URLFileNameOperator = "LessThanOrEqual"
680)
681
682// PossibleURLFileNameOperatorValues returns an array of possible values for the URLFileNameOperator const type.
683func PossibleURLFileNameOperatorValues() []URLFileNameOperator {
684	return []URLFileNameOperator{URLFileNameOperatorAny, URLFileNameOperatorBeginsWith, URLFileNameOperatorContains, URLFileNameOperatorEndsWith, URLFileNameOperatorEqual, URLFileNameOperatorGreaterThan, URLFileNameOperatorGreaterThanOrEqual, URLFileNameOperatorLessThan, URLFileNameOperatorLessThanOrEqual}
685}
686
687// URLPathOperator enumerates the values for url path operator.
688type URLPathOperator string
689
690const (
691	// URLPathOperatorAny ...
692	URLPathOperatorAny URLPathOperator = "Any"
693	// URLPathOperatorBeginsWith ...
694	URLPathOperatorBeginsWith URLPathOperator = "BeginsWith"
695	// URLPathOperatorContains ...
696	URLPathOperatorContains URLPathOperator = "Contains"
697	// URLPathOperatorEndsWith ...
698	URLPathOperatorEndsWith URLPathOperator = "EndsWith"
699	// URLPathOperatorEqual ...
700	URLPathOperatorEqual URLPathOperator = "Equal"
701	// URLPathOperatorGreaterThan ...
702	URLPathOperatorGreaterThan URLPathOperator = "GreaterThan"
703	// URLPathOperatorGreaterThanOrEqual ...
704	URLPathOperatorGreaterThanOrEqual URLPathOperator = "GreaterThanOrEqual"
705	// URLPathOperatorLessThan ...
706	URLPathOperatorLessThan URLPathOperator = "LessThan"
707	// URLPathOperatorLessThanOrEqual ...
708	URLPathOperatorLessThanOrEqual URLPathOperator = "LessThanOrEqual"
709	// URLPathOperatorWildcard ...
710	URLPathOperatorWildcard URLPathOperator = "Wildcard"
711)
712
713// PossibleURLPathOperatorValues returns an array of possible values for the URLPathOperator const type.
714func PossibleURLPathOperatorValues() []URLPathOperator {
715	return []URLPathOperator{URLPathOperatorAny, URLPathOperatorBeginsWith, URLPathOperatorContains, URLPathOperatorEndsWith, URLPathOperatorEqual, URLPathOperatorGreaterThan, URLPathOperatorGreaterThanOrEqual, URLPathOperatorLessThan, URLPathOperatorLessThanOrEqual, URLPathOperatorWildcard}
716}
717
718// CacheExpirationActionParameters defines the parameters for the cache expiration action.
719type CacheExpirationActionParameters struct {
720	OdataType *string `json:"@odata.type,omitempty"`
721	// CacheBehavior - Caching behavior for the requests. Possible values include: 'BypassCache', 'Override', 'SetIfMissing'
722	CacheBehavior CacheBehavior `json:"cacheBehavior,omitempty"`
723	// CacheType - The level at which the content needs to be cached.
724	CacheType *string `json:"cacheType,omitempty"`
725	// CacheDuration - The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss
726	CacheDuration *string `json:"cacheDuration,omitempty"`
727}
728
729// CacheKeyQueryStringActionParameters defines the parameters for the cache-key query string action.
730type CacheKeyQueryStringActionParameters struct {
731	OdataType *string `json:"@odata.type,omitempty"`
732	// QueryStringBehavior - Caching behavior for the requests. Possible values include: 'Include', 'IncludeAll', 'Exclude', 'ExcludeAll'
733	QueryStringBehavior QueryStringBehavior `json:"queryStringBehavior,omitempty"`
734	// QueryParameters - query parameters to include or exclude (comma separated).
735	QueryParameters *string `json:"queryParameters,omitempty"`
736}
737
738// CertificateSourceParameters defines the parameters for using CDN managed certificate for securing custom
739// domain.
740type CertificateSourceParameters struct {
741	OdataType *string `json:"@odata.type,omitempty"`
742	// CertificateType - Type of certificate used. Possible values include: 'Shared', 'Dedicated'
743	CertificateType CertificateType `json:"certificateType,omitempty"`
744}
745
746// CheckNameAvailabilityInput input of CheckNameAvailability API.
747type CheckNameAvailabilityInput struct {
748	// Name - The resource name to validate.
749	Name *string `json:"name,omitempty"`
750	// Type - The type of the resource whose name is to be validated.
751	Type *string `json:"type,omitempty"`
752}
753
754// CheckNameAvailabilityOutput output of check name availability API.
755type CheckNameAvailabilityOutput struct {
756	autorest.Response `json:"-"`
757	// NameAvailable - READ-ONLY; Indicates whether the name is available.
758	NameAvailable *bool `json:"nameAvailable,omitempty"`
759	// Reason - READ-ONLY; The reason why the name is not available.
760	Reason *string `json:"reason,omitempty"`
761	// Message - READ-ONLY; The detailed error message describing why the name is not available.
762	Message *string `json:"message,omitempty"`
763}
764
765// CidrIPAddress CIDR Ip address
766type CidrIPAddress struct {
767	// BaseIPAddress - Ip address itself.
768	BaseIPAddress *string `json:"baseIpAddress,omitempty"`
769	// PrefixLength - The length of the prefix of the ip address.
770	PrefixLength *int32 `json:"prefixLength,omitempty"`
771}
772
773// CustomDomain friendly domain name mapping to the endpoint hostname that the customer provides for
774// branding purposes, e.g. www.contoso.com.
775type CustomDomain struct {
776	autorest.Response       `json:"-"`
777	*CustomDomainProperties `json:"properties,omitempty"`
778	// ID - READ-ONLY; Resource ID.
779	ID *string `json:"id,omitempty"`
780	// Name - READ-ONLY; Resource name.
781	Name *string `json:"name,omitempty"`
782	// Type - READ-ONLY; Resource type.
783	Type *string `json:"type,omitempty"`
784}
785
786// MarshalJSON is the custom marshaler for CustomDomain.
787func (cd CustomDomain) MarshalJSON() ([]byte, error) {
788	objectMap := make(map[string]interface{})
789	if cd.CustomDomainProperties != nil {
790		objectMap["properties"] = cd.CustomDomainProperties
791	}
792	return json.Marshal(objectMap)
793}
794
795// UnmarshalJSON is the custom unmarshaler for CustomDomain struct.
796func (cd *CustomDomain) UnmarshalJSON(body []byte) error {
797	var m map[string]*json.RawMessage
798	err := json.Unmarshal(body, &m)
799	if err != nil {
800		return err
801	}
802	for k, v := range m {
803		switch k {
804		case "properties":
805			if v != nil {
806				var customDomainProperties CustomDomainProperties
807				err = json.Unmarshal(*v, &customDomainProperties)
808				if err != nil {
809					return err
810				}
811				cd.CustomDomainProperties = &customDomainProperties
812			}
813		case "id":
814			if v != nil {
815				var ID string
816				err = json.Unmarshal(*v, &ID)
817				if err != nil {
818					return err
819				}
820				cd.ID = &ID
821			}
822		case "name":
823			if v != nil {
824				var name string
825				err = json.Unmarshal(*v, &name)
826				if err != nil {
827					return err
828				}
829				cd.Name = &name
830			}
831		case "type":
832			if v != nil {
833				var typeVar string
834				err = json.Unmarshal(*v, &typeVar)
835				if err != nil {
836					return err
837				}
838				cd.Type = &typeVar
839			}
840		}
841	}
842
843	return nil
844}
845
846// BasicCustomDomainHTTPSParameters the JSON object that contains the properties to secure a custom domain.
847type BasicCustomDomainHTTPSParameters interface {
848	AsManagedHTTPSParameters() (*ManagedHTTPSParameters, bool)
849	AsUserManagedHTTPSParameters() (*UserManagedHTTPSParameters, bool)
850	AsCustomDomainHTTPSParameters() (*CustomDomainHTTPSParameters, bool)
851}
852
853// CustomDomainHTTPSParameters the JSON object that contains the properties to secure a custom domain.
854type CustomDomainHTTPSParameters struct {
855	// ProtocolType - Defines the TLS extension protocol that is used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased'
856	ProtocolType ProtocolType `json:"protocolType,omitempty"`
857	// CertificateSource - Possible values include: 'CertificateSourceCustomDomainHTTPSParameters', 'CertificateSourceCdn', 'CertificateSourceAzureKeyVault'
858	CertificateSource CertificateSource `json:"certificateSource,omitempty"`
859}
860
861func unmarshalBasicCustomDomainHTTPSParameters(body []byte) (BasicCustomDomainHTTPSParameters, error) {
862	var m map[string]interface{}
863	err := json.Unmarshal(body, &m)
864	if err != nil {
865		return nil, err
866	}
867
868	switch m["certificateSource"] {
869	case string(CertificateSourceCdn):
870		var mhp ManagedHTTPSParameters
871		err := json.Unmarshal(body, &mhp)
872		return mhp, err
873	case string(CertificateSourceAzureKeyVault):
874		var umhp UserManagedHTTPSParameters
875		err := json.Unmarshal(body, &umhp)
876		return umhp, err
877	default:
878		var cdhp CustomDomainHTTPSParameters
879		err := json.Unmarshal(body, &cdhp)
880		return cdhp, err
881	}
882}
883func unmarshalBasicCustomDomainHTTPSParametersArray(body []byte) ([]BasicCustomDomainHTTPSParameters, error) {
884	var rawMessages []*json.RawMessage
885	err := json.Unmarshal(body, &rawMessages)
886	if err != nil {
887		return nil, err
888	}
889
890	cdhpArray := make([]BasicCustomDomainHTTPSParameters, len(rawMessages))
891
892	for index, rawMessage := range rawMessages {
893		cdhp, err := unmarshalBasicCustomDomainHTTPSParameters(*rawMessage)
894		if err != nil {
895			return nil, err
896		}
897		cdhpArray[index] = cdhp
898	}
899	return cdhpArray, nil
900}
901
902// MarshalJSON is the custom marshaler for CustomDomainHTTPSParameters.
903func (cdhp CustomDomainHTTPSParameters) MarshalJSON() ([]byte, error) {
904	cdhp.CertificateSource = CertificateSourceCustomDomainHTTPSParameters
905	objectMap := make(map[string]interface{})
906	if cdhp.ProtocolType != "" {
907		objectMap["protocolType"] = cdhp.ProtocolType
908	}
909	if cdhp.CertificateSource != "" {
910		objectMap["certificateSource"] = cdhp.CertificateSource
911	}
912	return json.Marshal(objectMap)
913}
914
915// AsManagedHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for CustomDomainHTTPSParameters.
916func (cdhp CustomDomainHTTPSParameters) AsManagedHTTPSParameters() (*ManagedHTTPSParameters, bool) {
917	return nil, false
918}
919
920// AsUserManagedHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for CustomDomainHTTPSParameters.
921func (cdhp CustomDomainHTTPSParameters) AsUserManagedHTTPSParameters() (*UserManagedHTTPSParameters, bool) {
922	return nil, false
923}
924
925// AsCustomDomainHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for CustomDomainHTTPSParameters.
926func (cdhp CustomDomainHTTPSParameters) AsCustomDomainHTTPSParameters() (*CustomDomainHTTPSParameters, bool) {
927	return &cdhp, true
928}
929
930// AsBasicCustomDomainHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for CustomDomainHTTPSParameters.
931func (cdhp CustomDomainHTTPSParameters) AsBasicCustomDomainHTTPSParameters() (BasicCustomDomainHTTPSParameters, bool) {
932	return &cdhp, true
933}
934
935// CustomDomainListResult result of the request to list custom domains. It contains a list of custom domain
936// objects and a URL link to get the next set of results.
937type CustomDomainListResult struct {
938	autorest.Response `json:"-"`
939	// Value - READ-ONLY; List of CDN CustomDomains within an endpoint.
940	Value *[]CustomDomain `json:"value,omitempty"`
941	// NextLink - URL to get the next set of custom domain objects if there are any.
942	NextLink *string `json:"nextLink,omitempty"`
943}
944
945// CustomDomainListResultIterator provides access to a complete listing of CustomDomain values.
946type CustomDomainListResultIterator struct {
947	i    int
948	page CustomDomainListResultPage
949}
950
951// NextWithContext advances to the next value.  If there was an error making
952// the request the iterator does not advance and the error is returned.
953func (iter *CustomDomainListResultIterator) NextWithContext(ctx context.Context) (err error) {
954	if tracing.IsEnabled() {
955		ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainListResultIterator.NextWithContext")
956		defer func() {
957			sc := -1
958			if iter.Response().Response.Response != nil {
959				sc = iter.Response().Response.Response.StatusCode
960			}
961			tracing.EndSpan(ctx, sc, err)
962		}()
963	}
964	iter.i++
965	if iter.i < len(iter.page.Values()) {
966		return nil
967	}
968	err = iter.page.NextWithContext(ctx)
969	if err != nil {
970		iter.i--
971		return err
972	}
973	iter.i = 0
974	return nil
975}
976
977// Next advances to the next value.  If there was an error making
978// the request the iterator does not advance and the error is returned.
979// Deprecated: Use NextWithContext() instead.
980func (iter *CustomDomainListResultIterator) Next() error {
981	return iter.NextWithContext(context.Background())
982}
983
984// NotDone returns true if the enumeration should be started or is not yet complete.
985func (iter CustomDomainListResultIterator) NotDone() bool {
986	return iter.page.NotDone() && iter.i < len(iter.page.Values())
987}
988
989// Response returns the raw server response from the last page request.
990func (iter CustomDomainListResultIterator) Response() CustomDomainListResult {
991	return iter.page.Response()
992}
993
994// Value returns the current value or a zero-initialized value if the
995// iterator has advanced beyond the end of the collection.
996func (iter CustomDomainListResultIterator) Value() CustomDomain {
997	if !iter.page.NotDone() {
998		return CustomDomain{}
999	}
1000	return iter.page.Values()[iter.i]
1001}
1002
1003// Creates a new instance of the CustomDomainListResultIterator type.
1004func NewCustomDomainListResultIterator(page CustomDomainListResultPage) CustomDomainListResultIterator {
1005	return CustomDomainListResultIterator{page: page}
1006}
1007
1008// IsEmpty returns true if the ListResult contains no values.
1009func (cdlr CustomDomainListResult) IsEmpty() bool {
1010	return cdlr.Value == nil || len(*cdlr.Value) == 0
1011}
1012
1013// customDomainListResultPreparer prepares a request to retrieve the next set of results.
1014// It returns nil if no more results exist.
1015func (cdlr CustomDomainListResult) customDomainListResultPreparer(ctx context.Context) (*http.Request, error) {
1016	if cdlr.NextLink == nil || len(to.String(cdlr.NextLink)) < 1 {
1017		return nil, nil
1018	}
1019	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1020		autorest.AsJSON(),
1021		autorest.AsGet(),
1022		autorest.WithBaseURL(to.String(cdlr.NextLink)))
1023}
1024
1025// CustomDomainListResultPage contains a page of CustomDomain values.
1026type CustomDomainListResultPage struct {
1027	fn   func(context.Context, CustomDomainListResult) (CustomDomainListResult, error)
1028	cdlr CustomDomainListResult
1029}
1030
1031// NextWithContext advances to the next page of values.  If there was an error making
1032// the request the page does not advance and the error is returned.
1033func (page *CustomDomainListResultPage) NextWithContext(ctx context.Context) (err error) {
1034	if tracing.IsEnabled() {
1035		ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainListResultPage.NextWithContext")
1036		defer func() {
1037			sc := -1
1038			if page.Response().Response.Response != nil {
1039				sc = page.Response().Response.Response.StatusCode
1040			}
1041			tracing.EndSpan(ctx, sc, err)
1042		}()
1043	}
1044	next, err := page.fn(ctx, page.cdlr)
1045	if err != nil {
1046		return err
1047	}
1048	page.cdlr = next
1049	return nil
1050}
1051
1052// Next advances to the next page of values.  If there was an error making
1053// the request the page does not advance and the error is returned.
1054// Deprecated: Use NextWithContext() instead.
1055func (page *CustomDomainListResultPage) Next() error {
1056	return page.NextWithContext(context.Background())
1057}
1058
1059// NotDone returns true if the page enumeration should be started or is not yet complete.
1060func (page CustomDomainListResultPage) NotDone() bool {
1061	return !page.cdlr.IsEmpty()
1062}
1063
1064// Response returns the raw server response from the last page request.
1065func (page CustomDomainListResultPage) Response() CustomDomainListResult {
1066	return page.cdlr
1067}
1068
1069// Values returns the slice of values for the current page or nil if there are no values.
1070func (page CustomDomainListResultPage) Values() []CustomDomain {
1071	if page.cdlr.IsEmpty() {
1072		return nil
1073	}
1074	return *page.cdlr.Value
1075}
1076
1077// Creates a new instance of the CustomDomainListResultPage type.
1078func NewCustomDomainListResultPage(getNextPage func(context.Context, CustomDomainListResult) (CustomDomainListResult, error)) CustomDomainListResultPage {
1079	return CustomDomainListResultPage{fn: getNextPage}
1080}
1081
1082// CustomDomainParameters the customDomain JSON object required for custom domain creation or update.
1083type CustomDomainParameters struct {
1084	*CustomDomainPropertiesParameters `json:"properties,omitempty"`
1085}
1086
1087// MarshalJSON is the custom marshaler for CustomDomainParameters.
1088func (cdp CustomDomainParameters) MarshalJSON() ([]byte, error) {
1089	objectMap := make(map[string]interface{})
1090	if cdp.CustomDomainPropertiesParameters != nil {
1091		objectMap["properties"] = cdp.CustomDomainPropertiesParameters
1092	}
1093	return json.Marshal(objectMap)
1094}
1095
1096// UnmarshalJSON is the custom unmarshaler for CustomDomainParameters struct.
1097func (cdp *CustomDomainParameters) UnmarshalJSON(body []byte) error {
1098	var m map[string]*json.RawMessage
1099	err := json.Unmarshal(body, &m)
1100	if err != nil {
1101		return err
1102	}
1103	for k, v := range m {
1104		switch k {
1105		case "properties":
1106			if v != nil {
1107				var customDomainPropertiesParameters CustomDomainPropertiesParameters
1108				err = json.Unmarshal(*v, &customDomainPropertiesParameters)
1109				if err != nil {
1110					return err
1111				}
1112				cdp.CustomDomainPropertiesParameters = &customDomainPropertiesParameters
1113			}
1114		}
1115	}
1116
1117	return nil
1118}
1119
1120// CustomDomainProperties the JSON object that contains the properties of the custom domain to create.
1121type CustomDomainProperties struct {
1122	// HostName - The host name of the custom domain. Must be a domain name.
1123	HostName *string `json:"hostName,omitempty"`
1124	// ResourceState - READ-ONLY; Resource status of the custom domain. Possible values include: 'Creating', 'Active', 'Deleting'
1125	ResourceState CustomDomainResourceState `json:"resourceState,omitempty"`
1126	// CustomHTTPSProvisioningState - READ-ONLY; Provisioning status of Custom Https of the custom domain. Possible values include: 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Failed'
1127	CustomHTTPSProvisioningState CustomHTTPSProvisioningState `json:"customHttpsProvisioningState,omitempty"`
1128	// 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'
1129	CustomHTTPSProvisioningSubstate CustomHTTPSProvisioningSubstate `json:"customHttpsProvisioningSubstate,omitempty"`
1130	// 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.
1131	ValidationData *string `json:"validationData,omitempty"`
1132	// ProvisioningState - READ-ONLY; Provisioning status of the custom domain.
1133	ProvisioningState *string `json:"provisioningState,omitempty"`
1134}
1135
1136// CustomDomainPropertiesParameters the JSON object that contains the properties of the custom domain to
1137// create.
1138type CustomDomainPropertiesParameters struct {
1139	// HostName - The host name of the custom domain. Must be a domain name.
1140	HostName *string `json:"hostName,omitempty"`
1141}
1142
1143// CustomDomainsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
1144// operation.
1145type CustomDomainsCreateFuture struct {
1146	azure.Future
1147}
1148
1149// Result returns the result of the asynchronous operation.
1150// If the operation has not completed it will return an error.
1151func (future *CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
1152	var done bool
1153	done, err = future.DoneWithContext(context.Background(), client)
1154	if err != nil {
1155		err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", future.Response(), "Polling failure")
1156		return
1157	}
1158	if !done {
1159		err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsCreateFuture")
1160		return
1161	}
1162	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1163	if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
1164		cd, err = client.CreateResponder(cd.Response.Response)
1165		if err != nil {
1166			err = autorest.NewErrorWithError(err, "cdn.CustomDomainsCreateFuture", "Result", cd.Response.Response, "Failure responding to request")
1167		}
1168	}
1169	return
1170}
1171
1172// CustomDomainsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1173// operation.
1174type CustomDomainsDeleteFuture struct {
1175	azure.Future
1176}
1177
1178// Result returns the result of the asynchronous operation.
1179// If the operation has not completed it will return an error.
1180func (future *CustomDomainsDeleteFuture) Result(client CustomDomainsClient) (cd CustomDomain, err error) {
1181	var done bool
1182	done, err = future.DoneWithContext(context.Background(), client)
1183	if err != nil {
1184		err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", future.Response(), "Polling failure")
1185		return
1186	}
1187	if !done {
1188		err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDeleteFuture")
1189		return
1190	}
1191	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1192	if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent {
1193		cd, err = client.DeleteResponder(cd.Response.Response)
1194		if err != nil {
1195			err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDeleteFuture", "Result", cd.Response.Response, "Failure responding to request")
1196		}
1197	}
1198	return
1199}
1200
1201// DeepCreatedOrigin the main origin of CDN content which is added when creating a CDN endpoint.
1202type DeepCreatedOrigin struct {
1203	// Name - Origin name
1204	Name                         *string `json:"name,omitempty"`
1205	*DeepCreatedOriginProperties `json:"properties,omitempty"`
1206}
1207
1208// MarshalJSON is the custom marshaler for DeepCreatedOrigin.
1209func (dco DeepCreatedOrigin) MarshalJSON() ([]byte, error) {
1210	objectMap := make(map[string]interface{})
1211	if dco.Name != nil {
1212		objectMap["name"] = dco.Name
1213	}
1214	if dco.DeepCreatedOriginProperties != nil {
1215		objectMap["properties"] = dco.DeepCreatedOriginProperties
1216	}
1217	return json.Marshal(objectMap)
1218}
1219
1220// UnmarshalJSON is the custom unmarshaler for DeepCreatedOrigin struct.
1221func (dco *DeepCreatedOrigin) UnmarshalJSON(body []byte) error {
1222	var m map[string]*json.RawMessage
1223	err := json.Unmarshal(body, &m)
1224	if err != nil {
1225		return err
1226	}
1227	for k, v := range m {
1228		switch k {
1229		case "name":
1230			if v != nil {
1231				var name string
1232				err = json.Unmarshal(*v, &name)
1233				if err != nil {
1234					return err
1235				}
1236				dco.Name = &name
1237			}
1238		case "properties":
1239			if v != nil {
1240				var deepCreatedOriginProperties DeepCreatedOriginProperties
1241				err = json.Unmarshal(*v, &deepCreatedOriginProperties)
1242				if err != nil {
1243					return err
1244				}
1245				dco.DeepCreatedOriginProperties = &deepCreatedOriginProperties
1246			}
1247		}
1248	}
1249
1250	return nil
1251}
1252
1253// DeepCreatedOriginProperties properties of the origin created on the CDN endpoint.
1254type DeepCreatedOriginProperties struct {
1255	// HostName - The address of the origin. It can be a domain name, IPv4 address, or IPv6 address.
1256	HostName *string `json:"hostName,omitempty"`
1257	// HTTPPort - The value of the HTTP port. Must be between 1 and 65535
1258	HTTPPort *int32 `json:"httpPort,omitempty"`
1259	// HTTPSPort - The value of the HTTPS port. Must be between 1 and 65535
1260	HTTPSPort *int32 `json:"httpsPort,omitempty"`
1261}
1262
1263// DeliveryRule a rule that specifies a set of actions and conditions
1264type DeliveryRule struct {
1265	// Name - Name of the rule
1266	Name *string `json:"name,omitempty"`
1267	// 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.
1268	Order *int32 `json:"order,omitempty"`
1269	// Conditions - A list of conditions that must be matched for the actions to be executed
1270	Conditions *[]BasicDeliveryRuleCondition `json:"conditions,omitempty"`
1271	// Actions - A list of actions that are executed when all the conditions of a rule are satisfied.
1272	Actions *[]BasicDeliveryRuleAction `json:"actions,omitempty"`
1273}
1274
1275// UnmarshalJSON is the custom unmarshaler for DeliveryRule struct.
1276func (dr *DeliveryRule) UnmarshalJSON(body []byte) error {
1277	var m map[string]*json.RawMessage
1278	err := json.Unmarshal(body, &m)
1279	if err != nil {
1280		return err
1281	}
1282	for k, v := range m {
1283		switch k {
1284		case "name":
1285			if v != nil {
1286				var name string
1287				err = json.Unmarshal(*v, &name)
1288				if err != nil {
1289					return err
1290				}
1291				dr.Name = &name
1292			}
1293		case "order":
1294			if v != nil {
1295				var order int32
1296				err = json.Unmarshal(*v, &order)
1297				if err != nil {
1298					return err
1299				}
1300				dr.Order = &order
1301			}
1302		case "conditions":
1303			if v != nil {
1304				conditions, err := unmarshalBasicDeliveryRuleConditionArray(*v)
1305				if err != nil {
1306					return err
1307				}
1308				dr.Conditions = &conditions
1309			}
1310		case "actions":
1311			if v != nil {
1312				actions, err := unmarshalBasicDeliveryRuleActionArray(*v)
1313				if err != nil {
1314					return err
1315				}
1316				dr.Actions = &actions
1317			}
1318		}
1319	}
1320
1321	return nil
1322}
1323
1324// BasicDeliveryRuleAction an action for the delivery rule.
1325type BasicDeliveryRuleAction interface {
1326	AsURLRedirectAction() (*URLRedirectAction, bool)
1327	AsURLRewriteAction() (*URLRewriteAction, bool)
1328	AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool)
1329	AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool)
1330	AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool)
1331	AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool)
1332	AsDeliveryRuleAction() (*DeliveryRuleAction, bool)
1333}
1334
1335// DeliveryRuleAction an action for the delivery rule.
1336type DeliveryRuleAction struct {
1337	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
1338	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
1339}
1340
1341func unmarshalBasicDeliveryRuleAction(body []byte) (BasicDeliveryRuleAction, error) {
1342	var m map[string]interface{}
1343	err := json.Unmarshal(body, &m)
1344	if err != nil {
1345		return nil, err
1346	}
1347
1348	switch m["name"] {
1349	case string(NameURLRedirect):
1350		var ura URLRedirectAction
1351		err := json.Unmarshal(body, &ura)
1352		return ura, err
1353	case string(NameURLRewrite):
1354		var ura URLRewriteAction
1355		err := json.Unmarshal(body, &ura)
1356		return ura, err
1357	case string(NameModifyRequestHeader):
1358		var drrha DeliveryRuleRequestHeaderAction
1359		err := json.Unmarshal(body, &drrha)
1360		return drrha, err
1361	case string(NameModifyResponseHeader):
1362		var drrha DeliveryRuleResponseHeaderAction
1363		err := json.Unmarshal(body, &drrha)
1364		return drrha, err
1365	case string(NameCacheExpiration):
1366		var drcea DeliveryRuleCacheExpirationAction
1367		err := json.Unmarshal(body, &drcea)
1368		return drcea, err
1369	case string(NameCacheKeyQueryString):
1370		var drckqsa DeliveryRuleCacheKeyQueryStringAction
1371		err := json.Unmarshal(body, &drckqsa)
1372		return drckqsa, err
1373	default:
1374		var dra DeliveryRuleAction
1375		err := json.Unmarshal(body, &dra)
1376		return dra, err
1377	}
1378}
1379func unmarshalBasicDeliveryRuleActionArray(body []byte) ([]BasicDeliveryRuleAction, error) {
1380	var rawMessages []*json.RawMessage
1381	err := json.Unmarshal(body, &rawMessages)
1382	if err != nil {
1383		return nil, err
1384	}
1385
1386	draArray := make([]BasicDeliveryRuleAction, len(rawMessages))
1387
1388	for index, rawMessage := range rawMessages {
1389		dra, err := unmarshalBasicDeliveryRuleAction(*rawMessage)
1390		if err != nil {
1391			return nil, err
1392		}
1393		draArray[index] = dra
1394	}
1395	return draArray, nil
1396}
1397
1398// MarshalJSON is the custom marshaler for DeliveryRuleAction.
1399func (dra DeliveryRuleAction) MarshalJSON() ([]byte, error) {
1400	dra.Name = NameDeliveryRuleAction
1401	objectMap := make(map[string]interface{})
1402	if dra.Name != "" {
1403		objectMap["name"] = dra.Name
1404	}
1405	return json.Marshal(objectMap)
1406}
1407
1408// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1409func (dra DeliveryRuleAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
1410	return nil, false
1411}
1412
1413// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1414func (dra DeliveryRuleAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
1415	return nil, false
1416}
1417
1418// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1419func (dra DeliveryRuleAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
1420	return nil, false
1421}
1422
1423// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1424func (dra DeliveryRuleAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
1425	return nil, false
1426}
1427
1428// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1429func (dra DeliveryRuleAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
1430	return nil, false
1431}
1432
1433// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1434func (dra DeliveryRuleAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
1435	return nil, false
1436}
1437
1438// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1439func (dra DeliveryRuleAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
1440	return &dra, true
1441}
1442
1443// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction.
1444func (dra DeliveryRuleAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
1445	return &dra, true
1446}
1447
1448// DeliveryRuleCacheExpirationAction defines the cache expiration action for the delivery rule.
1449type DeliveryRuleCacheExpirationAction struct {
1450	// Parameters - Defines the parameters for the action.
1451	Parameters *CacheExpirationActionParameters `json:"parameters,omitempty"`
1452	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
1453	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
1454}
1455
1456// MarshalJSON is the custom marshaler for DeliveryRuleCacheExpirationAction.
1457func (drcea DeliveryRuleCacheExpirationAction) MarshalJSON() ([]byte, error) {
1458	drcea.Name = NameCacheExpiration
1459	objectMap := make(map[string]interface{})
1460	if drcea.Parameters != nil {
1461		objectMap["parameters"] = drcea.Parameters
1462	}
1463	if drcea.Name != "" {
1464		objectMap["name"] = drcea.Name
1465	}
1466	return json.Marshal(objectMap)
1467}
1468
1469// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1470func (drcea DeliveryRuleCacheExpirationAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
1471	return nil, false
1472}
1473
1474// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1475func (drcea DeliveryRuleCacheExpirationAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
1476	return nil, false
1477}
1478
1479// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1480func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
1481	return nil, false
1482}
1483
1484// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1485func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
1486	return nil, false
1487}
1488
1489// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1490func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
1491	return &drcea, true
1492}
1493
1494// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1495func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
1496	return nil, false
1497}
1498
1499// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1500func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
1501	return nil, false
1502}
1503
1504// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction.
1505func (drcea DeliveryRuleCacheExpirationAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
1506	return &drcea, true
1507}
1508
1509// DeliveryRuleCacheKeyQueryStringAction defines the cache-key query string action for the delivery rule.
1510type DeliveryRuleCacheKeyQueryStringAction struct {
1511	// Parameters - Defines the parameters for the action.
1512	Parameters *CacheKeyQueryStringActionParameters `json:"parameters,omitempty"`
1513	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
1514	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
1515}
1516
1517// MarshalJSON is the custom marshaler for DeliveryRuleCacheKeyQueryStringAction.
1518func (drckqsa DeliveryRuleCacheKeyQueryStringAction) MarshalJSON() ([]byte, error) {
1519	drckqsa.Name = NameCacheKeyQueryString
1520	objectMap := make(map[string]interface{})
1521	if drckqsa.Parameters != nil {
1522		objectMap["parameters"] = drckqsa.Parameters
1523	}
1524	if drckqsa.Name != "" {
1525		objectMap["name"] = drckqsa.Name
1526	}
1527	return json.Marshal(objectMap)
1528}
1529
1530// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
1531func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
1532	return nil, false
1533}
1534
1535// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
1536func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
1537	return nil, false
1538}
1539
1540// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
1541func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
1542	return nil, false
1543}
1544
1545// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
1546func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
1547	return nil, false
1548}
1549
1550// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
1551func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
1552	return nil, false
1553}
1554
1555// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
1556func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
1557	return &drckqsa, true
1558}
1559
1560// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
1561func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
1562	return nil, false
1563}
1564
1565// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction.
1566func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
1567	return &drckqsa, true
1568}
1569
1570// BasicDeliveryRuleCondition a condition for the delivery rule.
1571type BasicDeliveryRuleCondition interface {
1572	AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool)
1573	AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool)
1574	AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool)
1575	AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool)
1576	AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool)
1577	AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool)
1578	AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool)
1579	AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool)
1580	AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool)
1581	AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool)
1582	AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool)
1583	AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool)
1584	AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool)
1585}
1586
1587// DeliveryRuleCondition a condition for the delivery rule.
1588type DeliveryRuleCondition struct {
1589	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice'
1590	Name Name `json:"name,omitempty"`
1591}
1592
1593func unmarshalBasicDeliveryRuleCondition(body []byte) (BasicDeliveryRuleCondition, error) {
1594	var m map[string]interface{}
1595	err := json.Unmarshal(body, &m)
1596	if err != nil {
1597		return nil, err
1598	}
1599
1600	switch m["name"] {
1601	case string(NameRemoteAddress):
1602		var drrac DeliveryRuleRemoteAddressCondition
1603		err := json.Unmarshal(body, &drrac)
1604		return drrac, err
1605	case string(NameRequestMethod):
1606		var drrmc DeliveryRuleRequestMethodCondition
1607		err := json.Unmarshal(body, &drrmc)
1608		return drrmc, err
1609	case string(NameQueryString):
1610		var drqsc DeliveryRuleQueryStringCondition
1611		err := json.Unmarshal(body, &drqsc)
1612		return drqsc, err
1613	case string(NamePostArgs):
1614		var drpac DeliveryRulePostArgsCondition
1615		err := json.Unmarshal(body, &drpac)
1616		return drpac, err
1617	case string(NameRequestURI):
1618		var drruc DeliveryRuleRequestURICondition
1619		err := json.Unmarshal(body, &drruc)
1620		return drruc, err
1621	case string(NameRequestHeader):
1622		var drrhc DeliveryRuleRequestHeaderCondition
1623		err := json.Unmarshal(body, &drrhc)
1624		return drrhc, err
1625	case string(NameRequestBody):
1626		var drrbc DeliveryRuleRequestBodyCondition
1627		err := json.Unmarshal(body, &drrbc)
1628		return drrbc, err
1629	case string(NameRequestScheme):
1630		var drrsc DeliveryRuleRequestSchemeCondition
1631		err := json.Unmarshal(body, &drrsc)
1632		return drrsc, err
1633	case string(NameURLPath):
1634		var drupc DeliveryRuleURLPathCondition
1635		err := json.Unmarshal(body, &drupc)
1636		return drupc, err
1637	case string(NameURLFileExtension):
1638		var drufec DeliveryRuleURLFileExtensionCondition
1639		err := json.Unmarshal(body, &drufec)
1640		return drufec, err
1641	case string(NameURLFileName):
1642		var drufnc DeliveryRuleURLFileNameCondition
1643		err := json.Unmarshal(body, &drufnc)
1644		return drufnc, err
1645	case string(NameIsDevice):
1646		var dridc DeliveryRuleIsDeviceCondition
1647		err := json.Unmarshal(body, &dridc)
1648		return dridc, err
1649	default:
1650		var drc DeliveryRuleCondition
1651		err := json.Unmarshal(body, &drc)
1652		return drc, err
1653	}
1654}
1655func unmarshalBasicDeliveryRuleConditionArray(body []byte) ([]BasicDeliveryRuleCondition, error) {
1656	var rawMessages []*json.RawMessage
1657	err := json.Unmarshal(body, &rawMessages)
1658	if err != nil {
1659		return nil, err
1660	}
1661
1662	drcArray := make([]BasicDeliveryRuleCondition, len(rawMessages))
1663
1664	for index, rawMessage := range rawMessages {
1665		drc, err := unmarshalBasicDeliveryRuleCondition(*rawMessage)
1666		if err != nil {
1667			return nil, err
1668		}
1669		drcArray[index] = drc
1670	}
1671	return drcArray, nil
1672}
1673
1674// MarshalJSON is the custom marshaler for DeliveryRuleCondition.
1675func (drc DeliveryRuleCondition) MarshalJSON() ([]byte, error) {
1676	drc.Name = NameDeliveryRuleCondition
1677	objectMap := make(map[string]interface{})
1678	if drc.Name != "" {
1679		objectMap["name"] = drc.Name
1680	}
1681	return json.Marshal(objectMap)
1682}
1683
1684// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1685func (drc DeliveryRuleCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
1686	return nil, false
1687}
1688
1689// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1690func (drc DeliveryRuleCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
1691	return nil, false
1692}
1693
1694// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1695func (drc DeliveryRuleCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
1696	return nil, false
1697}
1698
1699// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1700func (drc DeliveryRuleCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
1701	return nil, false
1702}
1703
1704// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1705func (drc DeliveryRuleCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
1706	return nil, false
1707}
1708
1709// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1710func (drc DeliveryRuleCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
1711	return nil, false
1712}
1713
1714// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1715func (drc DeliveryRuleCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
1716	return nil, false
1717}
1718
1719// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1720func (drc DeliveryRuleCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
1721	return nil, false
1722}
1723
1724// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1725func (drc DeliveryRuleCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
1726	return nil, false
1727}
1728
1729// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1730func (drc DeliveryRuleCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
1731	return nil, false
1732}
1733
1734// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1735func (drc DeliveryRuleCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
1736	return nil, false
1737}
1738
1739// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1740func (drc DeliveryRuleCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
1741	return nil, false
1742}
1743
1744// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1745func (drc DeliveryRuleCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
1746	return &drc, true
1747}
1748
1749// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition.
1750func (drc DeliveryRuleCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
1751	return &drc, true
1752}
1753
1754// DeliveryRuleIsDeviceCondition defines the IsDevice condition for the delivery rule.
1755type DeliveryRuleIsDeviceCondition struct {
1756	// Parameters - Defines the parameters for the condition.
1757	Parameters *IsDeviceMatchConditionParameters `json:"parameters,omitempty"`
1758	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice'
1759	Name Name `json:"name,omitempty"`
1760}
1761
1762// MarshalJSON is the custom marshaler for DeliveryRuleIsDeviceCondition.
1763func (dridc DeliveryRuleIsDeviceCondition) MarshalJSON() ([]byte, error) {
1764	dridc.Name = NameIsDevice
1765	objectMap := make(map[string]interface{})
1766	if dridc.Parameters != nil {
1767		objectMap["parameters"] = dridc.Parameters
1768	}
1769	if dridc.Name != "" {
1770		objectMap["name"] = dridc.Name
1771	}
1772	return json.Marshal(objectMap)
1773}
1774
1775// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1776func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
1777	return nil, false
1778}
1779
1780// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1781func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
1782	return nil, false
1783}
1784
1785// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1786func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
1787	return nil, false
1788}
1789
1790// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1791func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
1792	return nil, false
1793}
1794
1795// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1796func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
1797	return nil, false
1798}
1799
1800// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1801func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
1802	return nil, false
1803}
1804
1805// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1806func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
1807	return nil, false
1808}
1809
1810// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1811func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
1812	return nil, false
1813}
1814
1815// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1816func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
1817	return nil, false
1818}
1819
1820// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1821func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
1822	return nil, false
1823}
1824
1825// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1826func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
1827	return nil, false
1828}
1829
1830// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1831func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
1832	return &dridc, true
1833}
1834
1835// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1836func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
1837	return nil, false
1838}
1839
1840// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition.
1841func (dridc DeliveryRuleIsDeviceCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
1842	return &dridc, true
1843}
1844
1845// DeliveryRulePostArgsCondition defines the PostArgs condition for the delivery rule.
1846type DeliveryRulePostArgsCondition struct {
1847	// Parameters - Defines the parameters for the condition.
1848	Parameters *PostArgsMatchConditionParameters `json:"parameters,omitempty"`
1849	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice'
1850	Name Name `json:"name,omitempty"`
1851}
1852
1853// MarshalJSON is the custom marshaler for DeliveryRulePostArgsCondition.
1854func (drpac DeliveryRulePostArgsCondition) MarshalJSON() ([]byte, error) {
1855	drpac.Name = NamePostArgs
1856	objectMap := make(map[string]interface{})
1857	if drpac.Parameters != nil {
1858		objectMap["parameters"] = drpac.Parameters
1859	}
1860	if drpac.Name != "" {
1861		objectMap["name"] = drpac.Name
1862	}
1863	return json.Marshal(objectMap)
1864}
1865
1866// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1867func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
1868	return nil, false
1869}
1870
1871// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1872func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
1873	return nil, false
1874}
1875
1876// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1877func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
1878	return nil, false
1879}
1880
1881// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1882func (drpac DeliveryRulePostArgsCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
1883	return &drpac, true
1884}
1885
1886// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1887func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
1888	return nil, false
1889}
1890
1891// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1892func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
1893	return nil, false
1894}
1895
1896// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1897func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
1898	return nil, false
1899}
1900
1901// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1902func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
1903	return nil, false
1904}
1905
1906// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1907func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
1908	return nil, false
1909}
1910
1911// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1912func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
1913	return nil, false
1914}
1915
1916// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1917func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
1918	return nil, false
1919}
1920
1921// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1922func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
1923	return nil, false
1924}
1925
1926// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1927func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
1928	return nil, false
1929}
1930
1931// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition.
1932func (drpac DeliveryRulePostArgsCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
1933	return &drpac, true
1934}
1935
1936// DeliveryRuleQueryStringCondition defines the QueryString condition for the delivery rule.
1937type DeliveryRuleQueryStringCondition struct {
1938	// Parameters - Defines the parameters for the condition.
1939	Parameters *QueryStringMatchConditionParameters `json:"parameters,omitempty"`
1940	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice'
1941	Name Name `json:"name,omitempty"`
1942}
1943
1944// MarshalJSON is the custom marshaler for DeliveryRuleQueryStringCondition.
1945func (drqsc DeliveryRuleQueryStringCondition) MarshalJSON() ([]byte, error) {
1946	drqsc.Name = NameQueryString
1947	objectMap := make(map[string]interface{})
1948	if drqsc.Parameters != nil {
1949		objectMap["parameters"] = drqsc.Parameters
1950	}
1951	if drqsc.Name != "" {
1952		objectMap["name"] = drqsc.Name
1953	}
1954	return json.Marshal(objectMap)
1955}
1956
1957// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
1958func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
1959	return nil, false
1960}
1961
1962// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
1963func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
1964	return nil, false
1965}
1966
1967// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
1968func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
1969	return &drqsc, true
1970}
1971
1972// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
1973func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
1974	return nil, false
1975}
1976
1977// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
1978func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
1979	return nil, false
1980}
1981
1982// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
1983func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
1984	return nil, false
1985}
1986
1987// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
1988func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
1989	return nil, false
1990}
1991
1992// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
1993func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
1994	return nil, false
1995}
1996
1997// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
1998func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
1999	return nil, false
2000}
2001
2002// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2003func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2004	return nil, false
2005}
2006
2007// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2008func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2009	return nil, false
2010}
2011
2012// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2013func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2014	return nil, false
2015}
2016
2017// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2018func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2019	return nil, false
2020}
2021
2022// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition.
2023func (drqsc DeliveryRuleQueryStringCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2024	return &drqsc, true
2025}
2026
2027// DeliveryRuleRemoteAddressCondition defines the RemoteAddress condition for the delivery rule.
2028type DeliveryRuleRemoteAddressCondition struct {
2029	// Parameters - Defines the parameters for the condition.
2030	Parameters *RemoteAddressMatchConditionParameters `json:"parameters,omitempty"`
2031	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice'
2032	Name Name `json:"name,omitempty"`
2033}
2034
2035// MarshalJSON is the custom marshaler for DeliveryRuleRemoteAddressCondition.
2036func (drrac DeliveryRuleRemoteAddressCondition) MarshalJSON() ([]byte, error) {
2037	drrac.Name = NameRemoteAddress
2038	objectMap := make(map[string]interface{})
2039	if drrac.Parameters != nil {
2040		objectMap["parameters"] = drrac.Parameters
2041	}
2042	if drrac.Name != "" {
2043		objectMap["name"] = drrac.Name
2044	}
2045	return json.Marshal(objectMap)
2046}
2047
2048// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2049func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2050	return &drrac, true
2051}
2052
2053// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2054func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2055	return nil, false
2056}
2057
2058// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2059func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2060	return nil, false
2061}
2062
2063// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2064func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2065	return nil, false
2066}
2067
2068// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2069func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2070	return nil, false
2071}
2072
2073// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2074func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2075	return nil, false
2076}
2077
2078// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2079func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2080	return nil, false
2081}
2082
2083// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2084func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2085	return nil, false
2086}
2087
2088// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2089func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2090	return nil, false
2091}
2092
2093// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2094func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2095	return nil, false
2096}
2097
2098// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2099func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2100	return nil, false
2101}
2102
2103// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2104func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2105	return nil, false
2106}
2107
2108// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2109func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2110	return nil, false
2111}
2112
2113// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition.
2114func (drrac DeliveryRuleRemoteAddressCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2115	return &drrac, true
2116}
2117
2118// DeliveryRuleRequestBodyCondition defines the RequestBody condition for the delivery rule.
2119type DeliveryRuleRequestBodyCondition struct {
2120	// Parameters - Defines the parameters for the condition.
2121	Parameters *RequestBodyMatchConditionParameters `json:"parameters,omitempty"`
2122	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice'
2123	Name Name `json:"name,omitempty"`
2124}
2125
2126// MarshalJSON is the custom marshaler for DeliveryRuleRequestBodyCondition.
2127func (drrbc DeliveryRuleRequestBodyCondition) MarshalJSON() ([]byte, error) {
2128	drrbc.Name = NameRequestBody
2129	objectMap := make(map[string]interface{})
2130	if drrbc.Parameters != nil {
2131		objectMap["parameters"] = drrbc.Parameters
2132	}
2133	if drrbc.Name != "" {
2134		objectMap["name"] = drrbc.Name
2135	}
2136	return json.Marshal(objectMap)
2137}
2138
2139// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2140func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2141	return nil, false
2142}
2143
2144// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2145func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2146	return nil, false
2147}
2148
2149// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2150func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2151	return nil, false
2152}
2153
2154// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2155func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2156	return nil, false
2157}
2158
2159// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2160func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2161	return nil, false
2162}
2163
2164// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2165func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2166	return nil, false
2167}
2168
2169// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2170func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2171	return &drrbc, true
2172}
2173
2174// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2175func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2176	return nil, false
2177}
2178
2179// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2180func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2181	return nil, false
2182}
2183
2184// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2185func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2186	return nil, false
2187}
2188
2189// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2190func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2191	return nil, false
2192}
2193
2194// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2195func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2196	return nil, false
2197}
2198
2199// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2200func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2201	return nil, false
2202}
2203
2204// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition.
2205func (drrbc DeliveryRuleRequestBodyCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2206	return &drrbc, true
2207}
2208
2209// DeliveryRuleRequestHeaderAction defines the request header action for the delivery rule.
2210type DeliveryRuleRequestHeaderAction struct {
2211	// Parameters - Defines the parameters for the action.
2212	Parameters *HeaderActionParameters `json:"parameters,omitempty"`
2213	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
2214	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
2215}
2216
2217// MarshalJSON is the custom marshaler for DeliveryRuleRequestHeaderAction.
2218func (drrha DeliveryRuleRequestHeaderAction) MarshalJSON() ([]byte, error) {
2219	drrha.Name = NameModifyRequestHeader
2220	objectMap := make(map[string]interface{})
2221	if drrha.Parameters != nil {
2222		objectMap["parameters"] = drrha.Parameters
2223	}
2224	if drrha.Name != "" {
2225		objectMap["name"] = drrha.Name
2226	}
2227	return json.Marshal(objectMap)
2228}
2229
2230// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
2231func (drrha DeliveryRuleRequestHeaderAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
2232	return nil, false
2233}
2234
2235// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
2236func (drrha DeliveryRuleRequestHeaderAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
2237	return nil, false
2238}
2239
2240// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
2241func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
2242	return &drrha, true
2243}
2244
2245// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
2246func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
2247	return nil, false
2248}
2249
2250// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
2251func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
2252	return nil, false
2253}
2254
2255// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
2256func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
2257	return nil, false
2258}
2259
2260// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
2261func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
2262	return nil, false
2263}
2264
2265// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction.
2266func (drrha DeliveryRuleRequestHeaderAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
2267	return &drrha, true
2268}
2269
2270// DeliveryRuleRequestHeaderCondition defines the RequestHeader condition for the delivery rule.
2271type DeliveryRuleRequestHeaderCondition struct {
2272	// Parameters - Defines the parameters for the condition.
2273	Parameters *RequestHeaderMatchConditionParameters `json:"parameters,omitempty"`
2274	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice'
2275	Name Name `json:"name,omitempty"`
2276}
2277
2278// MarshalJSON is the custom marshaler for DeliveryRuleRequestHeaderCondition.
2279func (drrhc DeliveryRuleRequestHeaderCondition) MarshalJSON() ([]byte, error) {
2280	drrhc.Name = NameRequestHeader
2281	objectMap := make(map[string]interface{})
2282	if drrhc.Parameters != nil {
2283		objectMap["parameters"] = drrhc.Parameters
2284	}
2285	if drrhc.Name != "" {
2286		objectMap["name"] = drrhc.Name
2287	}
2288	return json.Marshal(objectMap)
2289}
2290
2291// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2292func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2293	return nil, false
2294}
2295
2296// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2297func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2298	return nil, false
2299}
2300
2301// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2302func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2303	return nil, false
2304}
2305
2306// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2307func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2308	return nil, false
2309}
2310
2311// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2312func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2313	return nil, false
2314}
2315
2316// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2317func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2318	return &drrhc, true
2319}
2320
2321// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2322func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2323	return nil, false
2324}
2325
2326// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2327func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2328	return nil, false
2329}
2330
2331// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2332func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2333	return nil, false
2334}
2335
2336// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2337func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2338	return nil, false
2339}
2340
2341// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2342func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2343	return nil, false
2344}
2345
2346// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2347func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2348	return nil, false
2349}
2350
2351// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2352func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2353	return nil, false
2354}
2355
2356// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition.
2357func (drrhc DeliveryRuleRequestHeaderCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2358	return &drrhc, true
2359}
2360
2361// DeliveryRuleRequestMethodCondition defines the RequestMethod condition for the delivery rule.
2362type DeliveryRuleRequestMethodCondition struct {
2363	// Parameters - Defines the parameters for the condition.
2364	Parameters *RequestMethodMatchConditionParameters `json:"parameters,omitempty"`
2365	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice'
2366	Name Name `json:"name,omitempty"`
2367}
2368
2369// MarshalJSON is the custom marshaler for DeliveryRuleRequestMethodCondition.
2370func (drrmc DeliveryRuleRequestMethodCondition) MarshalJSON() ([]byte, error) {
2371	drrmc.Name = NameRequestMethod
2372	objectMap := make(map[string]interface{})
2373	if drrmc.Parameters != nil {
2374		objectMap["parameters"] = drrmc.Parameters
2375	}
2376	if drrmc.Name != "" {
2377		objectMap["name"] = drrmc.Name
2378	}
2379	return json.Marshal(objectMap)
2380}
2381
2382// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2383func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2384	return nil, false
2385}
2386
2387// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2388func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2389	return &drrmc, true
2390}
2391
2392// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2393func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2394	return nil, false
2395}
2396
2397// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2398func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2399	return nil, false
2400}
2401
2402// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2403func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2404	return nil, false
2405}
2406
2407// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2408func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2409	return nil, false
2410}
2411
2412// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2413func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2414	return nil, false
2415}
2416
2417// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2418func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2419	return nil, false
2420}
2421
2422// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2423func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2424	return nil, false
2425}
2426
2427// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2428func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2429	return nil, false
2430}
2431
2432// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2433func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2434	return nil, false
2435}
2436
2437// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2438func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2439	return nil, false
2440}
2441
2442// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2443func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2444	return nil, false
2445}
2446
2447// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition.
2448func (drrmc DeliveryRuleRequestMethodCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2449	return &drrmc, true
2450}
2451
2452// DeliveryRuleRequestSchemeCondition defines the RequestScheme condition for the delivery rule.
2453type DeliveryRuleRequestSchemeCondition struct {
2454	// Parameters - Defines the parameters for the condition.
2455	Parameters *RequestSchemeMatchConditionParameters `json:"parameters,omitempty"`
2456	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice'
2457	Name Name `json:"name,omitempty"`
2458}
2459
2460// MarshalJSON is the custom marshaler for DeliveryRuleRequestSchemeCondition.
2461func (drrsc DeliveryRuleRequestSchemeCondition) MarshalJSON() ([]byte, error) {
2462	drrsc.Name = NameRequestScheme
2463	objectMap := make(map[string]interface{})
2464	if drrsc.Parameters != nil {
2465		objectMap["parameters"] = drrsc.Parameters
2466	}
2467	if drrsc.Name != "" {
2468		objectMap["name"] = drrsc.Name
2469	}
2470	return json.Marshal(objectMap)
2471}
2472
2473// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2474func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2475	return nil, false
2476}
2477
2478// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2479func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2480	return nil, false
2481}
2482
2483// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2484func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2485	return nil, false
2486}
2487
2488// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2489func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2490	return nil, false
2491}
2492
2493// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2494func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2495	return nil, false
2496}
2497
2498// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2499func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2500	return nil, false
2501}
2502
2503// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2504func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2505	return nil, false
2506}
2507
2508// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2509func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2510	return &drrsc, true
2511}
2512
2513// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2514func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2515	return nil, false
2516}
2517
2518// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2519func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2520	return nil, false
2521}
2522
2523// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2524func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2525	return nil, false
2526}
2527
2528// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2529func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2530	return nil, false
2531}
2532
2533// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2534func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2535	return nil, false
2536}
2537
2538// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition.
2539func (drrsc DeliveryRuleRequestSchemeCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2540	return &drrsc, true
2541}
2542
2543// DeliveryRuleRequestURICondition defines the RequestUri condition for the delivery rule.
2544type DeliveryRuleRequestURICondition struct {
2545	// Parameters - Defines the parameters for the condition.
2546	Parameters *RequestURIMatchConditionParameters `json:"parameters,omitempty"`
2547	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice'
2548	Name Name `json:"name,omitempty"`
2549}
2550
2551// MarshalJSON is the custom marshaler for DeliveryRuleRequestURICondition.
2552func (drruc DeliveryRuleRequestURICondition) MarshalJSON() ([]byte, error) {
2553	drruc.Name = NameRequestURI
2554	objectMap := make(map[string]interface{})
2555	if drruc.Parameters != nil {
2556		objectMap["parameters"] = drruc.Parameters
2557	}
2558	if drruc.Name != "" {
2559		objectMap["name"] = drruc.Name
2560	}
2561	return json.Marshal(objectMap)
2562}
2563
2564// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2565func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2566	return nil, false
2567}
2568
2569// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2570func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2571	return nil, false
2572}
2573
2574// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2575func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2576	return nil, false
2577}
2578
2579// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2580func (drruc DeliveryRuleRequestURICondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2581	return nil, false
2582}
2583
2584// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2585func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2586	return &drruc, true
2587}
2588
2589// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2590func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2591	return nil, false
2592}
2593
2594// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2595func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2596	return nil, false
2597}
2598
2599// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2600func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2601	return nil, false
2602}
2603
2604// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2605func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2606	return nil, false
2607}
2608
2609// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2610func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2611	return nil, false
2612}
2613
2614// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2615func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2616	return nil, false
2617}
2618
2619// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2620func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2621	return nil, false
2622}
2623
2624// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2625func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2626	return nil, false
2627}
2628
2629// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition.
2630func (drruc DeliveryRuleRequestURICondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2631	return &drruc, true
2632}
2633
2634// DeliveryRuleResponseHeaderAction defines the response header action for the delivery rule.
2635type DeliveryRuleResponseHeaderAction struct {
2636	// Parameters - Defines the parameters for the action.
2637	Parameters *HeaderActionParameters `json:"parameters,omitempty"`
2638	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
2639	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
2640}
2641
2642// MarshalJSON is the custom marshaler for DeliveryRuleResponseHeaderAction.
2643func (drrha DeliveryRuleResponseHeaderAction) MarshalJSON() ([]byte, error) {
2644	drrha.Name = NameModifyResponseHeader
2645	objectMap := make(map[string]interface{})
2646	if drrha.Parameters != nil {
2647		objectMap["parameters"] = drrha.Parameters
2648	}
2649	if drrha.Name != "" {
2650		objectMap["name"] = drrha.Name
2651	}
2652	return json.Marshal(objectMap)
2653}
2654
2655// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
2656func (drrha DeliveryRuleResponseHeaderAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
2657	return nil, false
2658}
2659
2660// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
2661func (drrha DeliveryRuleResponseHeaderAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
2662	return nil, false
2663}
2664
2665// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
2666func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
2667	return nil, false
2668}
2669
2670// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
2671func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
2672	return &drrha, true
2673}
2674
2675// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
2676func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
2677	return nil, false
2678}
2679
2680// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
2681func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
2682	return nil, false
2683}
2684
2685// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
2686func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
2687	return nil, false
2688}
2689
2690// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction.
2691func (drrha DeliveryRuleResponseHeaderAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
2692	return &drrha, true
2693}
2694
2695// DeliveryRuleURLFileExtensionCondition defines the UrlFileExtension condition for the delivery rule.
2696type DeliveryRuleURLFileExtensionCondition struct {
2697	// Parameters - Defines the parameters for the condition.
2698	Parameters *URLFileExtensionMatchConditionParameters `json:"parameters,omitempty"`
2699	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice'
2700	Name Name `json:"name,omitempty"`
2701}
2702
2703// MarshalJSON is the custom marshaler for DeliveryRuleURLFileExtensionCondition.
2704func (drufec DeliveryRuleURLFileExtensionCondition) MarshalJSON() ([]byte, error) {
2705	drufec.Name = NameURLFileExtension
2706	objectMap := make(map[string]interface{})
2707	if drufec.Parameters != nil {
2708		objectMap["parameters"] = drufec.Parameters
2709	}
2710	if drufec.Name != "" {
2711		objectMap["name"] = drufec.Name
2712	}
2713	return json.Marshal(objectMap)
2714}
2715
2716// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2717func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2718	return nil, false
2719}
2720
2721// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2722func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2723	return nil, false
2724}
2725
2726// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2727func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2728	return nil, false
2729}
2730
2731// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2732func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2733	return nil, false
2734}
2735
2736// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2737func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2738	return nil, false
2739}
2740
2741// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2742func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2743	return nil, false
2744}
2745
2746// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2747func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2748	return nil, false
2749}
2750
2751// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2752func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2753	return nil, false
2754}
2755
2756// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2757func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2758	return nil, false
2759}
2760
2761// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2762func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2763	return &drufec, true
2764}
2765
2766// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2767func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2768	return nil, false
2769}
2770
2771// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2772func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2773	return nil, false
2774}
2775
2776// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2777func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2778	return nil, false
2779}
2780
2781// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition.
2782func (drufec DeliveryRuleURLFileExtensionCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2783	return &drufec, true
2784}
2785
2786// DeliveryRuleURLFileNameCondition defines the UrlFileName condition for the delivery rule.
2787type DeliveryRuleURLFileNameCondition struct {
2788	// Parameters - Defines the parameters for the condition.
2789	Parameters *URLFileNameMatchConditionParameters `json:"parameters,omitempty"`
2790	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice'
2791	Name Name `json:"name,omitempty"`
2792}
2793
2794// MarshalJSON is the custom marshaler for DeliveryRuleURLFileNameCondition.
2795func (drufnc DeliveryRuleURLFileNameCondition) MarshalJSON() ([]byte, error) {
2796	drufnc.Name = NameURLFileName
2797	objectMap := make(map[string]interface{})
2798	if drufnc.Parameters != nil {
2799		objectMap["parameters"] = drufnc.Parameters
2800	}
2801	if drufnc.Name != "" {
2802		objectMap["name"] = drufnc.Name
2803	}
2804	return json.Marshal(objectMap)
2805}
2806
2807// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2808func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2809	return nil, false
2810}
2811
2812// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2813func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2814	return nil, false
2815}
2816
2817// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2818func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2819	return nil, false
2820}
2821
2822// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2823func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2824	return nil, false
2825}
2826
2827// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2828func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2829	return nil, false
2830}
2831
2832// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2833func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2834	return nil, false
2835}
2836
2837// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2838func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2839	return nil, false
2840}
2841
2842// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2843func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2844	return nil, false
2845}
2846
2847// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2848func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2849	return nil, false
2850}
2851
2852// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2853func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2854	return nil, false
2855}
2856
2857// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2858func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2859	return &drufnc, true
2860}
2861
2862// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2863func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2864	return nil, false
2865}
2866
2867// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2868func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2869	return nil, false
2870}
2871
2872// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition.
2873func (drufnc DeliveryRuleURLFileNameCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2874	return &drufnc, true
2875}
2876
2877// DeliveryRuleURLPathCondition defines the UrlPath condition for the delivery rule.
2878type DeliveryRuleURLPathCondition struct {
2879	// Parameters - Defines the parameters for the condition.
2880	Parameters *URLPathMatchConditionParameters `json:"parameters,omitempty"`
2881	// Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice'
2882	Name Name `json:"name,omitempty"`
2883}
2884
2885// MarshalJSON is the custom marshaler for DeliveryRuleURLPathCondition.
2886func (drupc DeliveryRuleURLPathCondition) MarshalJSON() ([]byte, error) {
2887	drupc.Name = NameURLPath
2888	objectMap := make(map[string]interface{})
2889	if drupc.Parameters != nil {
2890		objectMap["parameters"] = drupc.Parameters
2891	}
2892	if drupc.Name != "" {
2893		objectMap["name"] = drupc.Name
2894	}
2895	return json.Marshal(objectMap)
2896}
2897
2898// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2899func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) {
2900	return nil, false
2901}
2902
2903// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2904func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) {
2905	return nil, false
2906}
2907
2908// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2909func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) {
2910	return nil, false
2911}
2912
2913// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2914func (drupc DeliveryRuleURLPathCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) {
2915	return nil, false
2916}
2917
2918// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2919func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) {
2920	return nil, false
2921}
2922
2923// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2924func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) {
2925	return nil, false
2926}
2927
2928// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2929func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) {
2930	return nil, false
2931}
2932
2933// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2934func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) {
2935	return nil, false
2936}
2937
2938// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2939func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) {
2940	return &drupc, true
2941}
2942
2943// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2944func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) {
2945	return nil, false
2946}
2947
2948// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2949func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) {
2950	return nil, false
2951}
2952
2953// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2954func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) {
2955	return nil, false
2956}
2957
2958// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2959func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) {
2960	return nil, false
2961}
2962
2963// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition.
2964func (drupc DeliveryRuleURLPathCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) {
2965	return &drupc, true
2966}
2967
2968// EdgeNode edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users.
2969type EdgeNode struct {
2970	*EdgeNodeProperties `json:"properties,omitempty"`
2971	// ID - READ-ONLY; Resource ID.
2972	ID *string `json:"id,omitempty"`
2973	// Name - READ-ONLY; Resource name.
2974	Name *string `json:"name,omitempty"`
2975	// Type - READ-ONLY; Resource type.
2976	Type *string `json:"type,omitempty"`
2977}
2978
2979// MarshalJSON is the custom marshaler for EdgeNode.
2980func (en EdgeNode) MarshalJSON() ([]byte, error) {
2981	objectMap := make(map[string]interface{})
2982	if en.EdgeNodeProperties != nil {
2983		objectMap["properties"] = en.EdgeNodeProperties
2984	}
2985	return json.Marshal(objectMap)
2986}
2987
2988// UnmarshalJSON is the custom unmarshaler for EdgeNode struct.
2989func (en *EdgeNode) UnmarshalJSON(body []byte) error {
2990	var m map[string]*json.RawMessage
2991	err := json.Unmarshal(body, &m)
2992	if err != nil {
2993		return err
2994	}
2995	for k, v := range m {
2996		switch k {
2997		case "properties":
2998			if v != nil {
2999				var edgeNodeProperties EdgeNodeProperties
3000				err = json.Unmarshal(*v, &edgeNodeProperties)
3001				if err != nil {
3002					return err
3003				}
3004				en.EdgeNodeProperties = &edgeNodeProperties
3005			}
3006		case "id":
3007			if v != nil {
3008				var ID string
3009				err = json.Unmarshal(*v, &ID)
3010				if err != nil {
3011					return err
3012				}
3013				en.ID = &ID
3014			}
3015		case "name":
3016			if v != nil {
3017				var name string
3018				err = json.Unmarshal(*v, &name)
3019				if err != nil {
3020					return err
3021				}
3022				en.Name = &name
3023			}
3024		case "type":
3025			if v != nil {
3026				var typeVar string
3027				err = json.Unmarshal(*v, &typeVar)
3028				if err != nil {
3029					return err
3030				}
3031				en.Type = &typeVar
3032			}
3033		}
3034	}
3035
3036	return nil
3037}
3038
3039// EdgeNodeProperties the JSON object that contains the properties required to create an edgenode.
3040type EdgeNodeProperties struct {
3041	// IPAddressGroups - List of ip address groups.
3042	IPAddressGroups *[]IPAddressGroup `json:"ipAddressGroups,omitempty"`
3043}
3044
3045// EdgenodeResult result of the request to list CDN edgenodes. It contains a list of ip address group and a
3046// URL link to get the next set of results.
3047type EdgenodeResult struct {
3048	autorest.Response `json:"-"`
3049	// Value - READ-ONLY; Edge node of CDN service.
3050	Value *[]EdgeNode `json:"value,omitempty"`
3051	// NextLink - URL to get the next set of edgenode list results if there are any.
3052	NextLink *string `json:"nextLink,omitempty"`
3053}
3054
3055// EdgenodeResultIterator provides access to a complete listing of EdgeNode values.
3056type EdgenodeResultIterator struct {
3057	i    int
3058	page EdgenodeResultPage
3059}
3060
3061// NextWithContext advances to the next value.  If there was an error making
3062// the request the iterator does not advance and the error is returned.
3063func (iter *EdgenodeResultIterator) NextWithContext(ctx context.Context) (err error) {
3064	if tracing.IsEnabled() {
3065		ctx = tracing.StartSpan(ctx, fqdn+"/EdgenodeResultIterator.NextWithContext")
3066		defer func() {
3067			sc := -1
3068			if iter.Response().Response.Response != nil {
3069				sc = iter.Response().Response.Response.StatusCode
3070			}
3071			tracing.EndSpan(ctx, sc, err)
3072		}()
3073	}
3074	iter.i++
3075	if iter.i < len(iter.page.Values()) {
3076		return nil
3077	}
3078	err = iter.page.NextWithContext(ctx)
3079	if err != nil {
3080		iter.i--
3081		return err
3082	}
3083	iter.i = 0
3084	return nil
3085}
3086
3087// Next advances to the next value.  If there was an error making
3088// the request the iterator does not advance and the error is returned.
3089// Deprecated: Use NextWithContext() instead.
3090func (iter *EdgenodeResultIterator) Next() error {
3091	return iter.NextWithContext(context.Background())
3092}
3093
3094// NotDone returns true if the enumeration should be started or is not yet complete.
3095func (iter EdgenodeResultIterator) NotDone() bool {
3096	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3097}
3098
3099// Response returns the raw server response from the last page request.
3100func (iter EdgenodeResultIterator) Response() EdgenodeResult {
3101	return iter.page.Response()
3102}
3103
3104// Value returns the current value or a zero-initialized value if the
3105// iterator has advanced beyond the end of the collection.
3106func (iter EdgenodeResultIterator) Value() EdgeNode {
3107	if !iter.page.NotDone() {
3108		return EdgeNode{}
3109	}
3110	return iter.page.Values()[iter.i]
3111}
3112
3113// Creates a new instance of the EdgenodeResultIterator type.
3114func NewEdgenodeResultIterator(page EdgenodeResultPage) EdgenodeResultIterator {
3115	return EdgenodeResultIterator{page: page}
3116}
3117
3118// IsEmpty returns true if the ListResult contains no values.
3119func (er EdgenodeResult) IsEmpty() bool {
3120	return er.Value == nil || len(*er.Value) == 0
3121}
3122
3123// edgenodeResultPreparer prepares a request to retrieve the next set of results.
3124// It returns nil if no more results exist.
3125func (er EdgenodeResult) edgenodeResultPreparer(ctx context.Context) (*http.Request, error) {
3126	if er.NextLink == nil || len(to.String(er.NextLink)) < 1 {
3127		return nil, nil
3128	}
3129	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3130		autorest.AsJSON(),
3131		autorest.AsGet(),
3132		autorest.WithBaseURL(to.String(er.NextLink)))
3133}
3134
3135// EdgenodeResultPage contains a page of EdgeNode values.
3136type EdgenodeResultPage struct {
3137	fn func(context.Context, EdgenodeResult) (EdgenodeResult, error)
3138	er EdgenodeResult
3139}
3140
3141// NextWithContext advances to the next page of values.  If there was an error making
3142// the request the page does not advance and the error is returned.
3143func (page *EdgenodeResultPage) NextWithContext(ctx context.Context) (err error) {
3144	if tracing.IsEnabled() {
3145		ctx = tracing.StartSpan(ctx, fqdn+"/EdgenodeResultPage.NextWithContext")
3146		defer func() {
3147			sc := -1
3148			if page.Response().Response.Response != nil {
3149				sc = page.Response().Response.Response.StatusCode
3150			}
3151			tracing.EndSpan(ctx, sc, err)
3152		}()
3153	}
3154	next, err := page.fn(ctx, page.er)
3155	if err != nil {
3156		return err
3157	}
3158	page.er = next
3159	return nil
3160}
3161
3162// Next advances to the next page of values.  If there was an error making
3163// the request the page does not advance and the error is returned.
3164// Deprecated: Use NextWithContext() instead.
3165func (page *EdgenodeResultPage) Next() error {
3166	return page.NextWithContext(context.Background())
3167}
3168
3169// NotDone returns true if the page enumeration should be started or is not yet complete.
3170func (page EdgenodeResultPage) NotDone() bool {
3171	return !page.er.IsEmpty()
3172}
3173
3174// Response returns the raw server response from the last page request.
3175func (page EdgenodeResultPage) Response() EdgenodeResult {
3176	return page.er
3177}
3178
3179// Values returns the slice of values for the current page or nil if there are no values.
3180func (page EdgenodeResultPage) Values() []EdgeNode {
3181	if page.er.IsEmpty() {
3182		return nil
3183	}
3184	return *page.er.Value
3185}
3186
3187// Creates a new instance of the EdgenodeResultPage type.
3188func NewEdgenodeResultPage(getNextPage func(context.Context, EdgenodeResult) (EdgenodeResult, error)) EdgenodeResultPage {
3189	return EdgenodeResultPage{fn: getNextPage}
3190}
3191
3192// Endpoint CDN endpoint is the entity within a CDN profile containing configuration information such as
3193// origin, protocol, content caching and delivery behavior. The CDN endpoint uses the URL format
3194// <endpointname>.azureedge.net.
3195type Endpoint struct {
3196	autorest.Response   `json:"-"`
3197	*EndpointProperties `json:"properties,omitempty"`
3198	// Location - Resource location.
3199	Location *string `json:"location,omitempty"`
3200	// Tags - Resource tags.
3201	Tags map[string]*string `json:"tags"`
3202	// ID - READ-ONLY; Resource ID.
3203	ID *string `json:"id,omitempty"`
3204	// Name - READ-ONLY; Resource name.
3205	Name *string `json:"name,omitempty"`
3206	// Type - READ-ONLY; Resource type.
3207	Type *string `json:"type,omitempty"`
3208}
3209
3210// MarshalJSON is the custom marshaler for Endpoint.
3211func (e Endpoint) MarshalJSON() ([]byte, error) {
3212	objectMap := make(map[string]interface{})
3213	if e.EndpointProperties != nil {
3214		objectMap["properties"] = e.EndpointProperties
3215	}
3216	if e.Location != nil {
3217		objectMap["location"] = e.Location
3218	}
3219	if e.Tags != nil {
3220		objectMap["tags"] = e.Tags
3221	}
3222	return json.Marshal(objectMap)
3223}
3224
3225// UnmarshalJSON is the custom unmarshaler for Endpoint struct.
3226func (e *Endpoint) UnmarshalJSON(body []byte) error {
3227	var m map[string]*json.RawMessage
3228	err := json.Unmarshal(body, &m)
3229	if err != nil {
3230		return err
3231	}
3232	for k, v := range m {
3233		switch k {
3234		case "properties":
3235			if v != nil {
3236				var endpointProperties EndpointProperties
3237				err = json.Unmarshal(*v, &endpointProperties)
3238				if err != nil {
3239					return err
3240				}
3241				e.EndpointProperties = &endpointProperties
3242			}
3243		case "location":
3244			if v != nil {
3245				var location string
3246				err = json.Unmarshal(*v, &location)
3247				if err != nil {
3248					return err
3249				}
3250				e.Location = &location
3251			}
3252		case "tags":
3253			if v != nil {
3254				var tags map[string]*string
3255				err = json.Unmarshal(*v, &tags)
3256				if err != nil {
3257					return err
3258				}
3259				e.Tags = tags
3260			}
3261		case "id":
3262			if v != nil {
3263				var ID string
3264				err = json.Unmarshal(*v, &ID)
3265				if err != nil {
3266					return err
3267				}
3268				e.ID = &ID
3269			}
3270		case "name":
3271			if v != nil {
3272				var name string
3273				err = json.Unmarshal(*v, &name)
3274				if err != nil {
3275					return err
3276				}
3277				e.Name = &name
3278			}
3279		case "type":
3280			if v != nil {
3281				var typeVar string
3282				err = json.Unmarshal(*v, &typeVar)
3283				if err != nil {
3284					return err
3285				}
3286				e.Type = &typeVar
3287			}
3288		}
3289	}
3290
3291	return nil
3292}
3293
3294// EndpointListResult result of the request to list endpoints. It contains a list of endpoint objects and a
3295// URL link to get the next set of results.
3296type EndpointListResult struct {
3297	autorest.Response `json:"-"`
3298	// Value - READ-ONLY; List of CDN endpoints within a profile
3299	Value *[]Endpoint `json:"value,omitempty"`
3300	// NextLink - URL to get the next set of endpoint objects if there is any.
3301	NextLink *string `json:"nextLink,omitempty"`
3302}
3303
3304// EndpointListResultIterator provides access to a complete listing of Endpoint values.
3305type EndpointListResultIterator struct {
3306	i    int
3307	page EndpointListResultPage
3308}
3309
3310// NextWithContext advances to the next value.  If there was an error making
3311// the request the iterator does not advance and the error is returned.
3312func (iter *EndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
3313	if tracing.IsEnabled() {
3314		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointListResultIterator.NextWithContext")
3315		defer func() {
3316			sc := -1
3317			if iter.Response().Response.Response != nil {
3318				sc = iter.Response().Response.Response.StatusCode
3319			}
3320			tracing.EndSpan(ctx, sc, err)
3321		}()
3322	}
3323	iter.i++
3324	if iter.i < len(iter.page.Values()) {
3325		return nil
3326	}
3327	err = iter.page.NextWithContext(ctx)
3328	if err != nil {
3329		iter.i--
3330		return err
3331	}
3332	iter.i = 0
3333	return nil
3334}
3335
3336// Next advances to the next value.  If there was an error making
3337// the request the iterator does not advance and the error is returned.
3338// Deprecated: Use NextWithContext() instead.
3339func (iter *EndpointListResultIterator) Next() error {
3340	return iter.NextWithContext(context.Background())
3341}
3342
3343// NotDone returns true if the enumeration should be started or is not yet complete.
3344func (iter EndpointListResultIterator) NotDone() bool {
3345	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3346}
3347
3348// Response returns the raw server response from the last page request.
3349func (iter EndpointListResultIterator) Response() EndpointListResult {
3350	return iter.page.Response()
3351}
3352
3353// Value returns the current value or a zero-initialized value if the
3354// iterator has advanced beyond the end of the collection.
3355func (iter EndpointListResultIterator) Value() Endpoint {
3356	if !iter.page.NotDone() {
3357		return Endpoint{}
3358	}
3359	return iter.page.Values()[iter.i]
3360}
3361
3362// Creates a new instance of the EndpointListResultIterator type.
3363func NewEndpointListResultIterator(page EndpointListResultPage) EndpointListResultIterator {
3364	return EndpointListResultIterator{page: page}
3365}
3366
3367// IsEmpty returns true if the ListResult contains no values.
3368func (elr EndpointListResult) IsEmpty() bool {
3369	return elr.Value == nil || len(*elr.Value) == 0
3370}
3371
3372// endpointListResultPreparer prepares a request to retrieve the next set of results.
3373// It returns nil if no more results exist.
3374func (elr EndpointListResult) endpointListResultPreparer(ctx context.Context) (*http.Request, error) {
3375	if elr.NextLink == nil || len(to.String(elr.NextLink)) < 1 {
3376		return nil, nil
3377	}
3378	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3379		autorest.AsJSON(),
3380		autorest.AsGet(),
3381		autorest.WithBaseURL(to.String(elr.NextLink)))
3382}
3383
3384// EndpointListResultPage contains a page of Endpoint values.
3385type EndpointListResultPage struct {
3386	fn  func(context.Context, EndpointListResult) (EndpointListResult, error)
3387	elr EndpointListResult
3388}
3389
3390// NextWithContext advances to the next page of values.  If there was an error making
3391// the request the page does not advance and the error is returned.
3392func (page *EndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
3393	if tracing.IsEnabled() {
3394		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointListResultPage.NextWithContext")
3395		defer func() {
3396			sc := -1
3397			if page.Response().Response.Response != nil {
3398				sc = page.Response().Response.Response.StatusCode
3399			}
3400			tracing.EndSpan(ctx, sc, err)
3401		}()
3402	}
3403	next, err := page.fn(ctx, page.elr)
3404	if err != nil {
3405		return err
3406	}
3407	page.elr = next
3408	return nil
3409}
3410
3411// Next advances to the next page of values.  If there was an error making
3412// the request the page does not advance and the error is returned.
3413// Deprecated: Use NextWithContext() instead.
3414func (page *EndpointListResultPage) Next() error {
3415	return page.NextWithContext(context.Background())
3416}
3417
3418// NotDone returns true if the page enumeration should be started or is not yet complete.
3419func (page EndpointListResultPage) NotDone() bool {
3420	return !page.elr.IsEmpty()
3421}
3422
3423// Response returns the raw server response from the last page request.
3424func (page EndpointListResultPage) Response() EndpointListResult {
3425	return page.elr
3426}
3427
3428// Values returns the slice of values for the current page or nil if there are no values.
3429func (page EndpointListResultPage) Values() []Endpoint {
3430	if page.elr.IsEmpty() {
3431		return nil
3432	}
3433	return *page.elr.Value
3434}
3435
3436// Creates a new instance of the EndpointListResultPage type.
3437func NewEndpointListResultPage(getNextPage func(context.Context, EndpointListResult) (EndpointListResult, error)) EndpointListResultPage {
3438	return EndpointListResultPage{fn: getNextPage}
3439}
3440
3441// EndpointProperties the JSON object that contains the properties required to create an endpoint.
3442type EndpointProperties struct {
3443	// HostName - READ-ONLY; The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net
3444	HostName *string `json:"hostName,omitempty"`
3445	// Origins - The source of the content being delivered via CDN.
3446	Origins *[]DeepCreatedOrigin `json:"origins,omitempty"`
3447	// ResourceState - READ-ONLY; Resource status of the endpoint. Possible values include: 'EndpointResourceStateCreating', 'EndpointResourceStateDeleting', 'EndpointResourceStateRunning', 'EndpointResourceStateStarting', 'EndpointResourceStateStopped', 'EndpointResourceStateStopping'
3448	ResourceState EndpointResourceState `json:"resourceState,omitempty"`
3449	// ProvisioningState - READ-ONLY; Provisioning status of the endpoint.
3450	ProvisioningState *string `json:"provisioningState,omitempty"`
3451	// 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.
3452	OriginHostHeader *string `json:"originHostHeader,omitempty"`
3453	// OriginPath - A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
3454	OriginPath *string `json:"originPath,omitempty"`
3455	// ContentTypesToCompress - List of content types on which compression applies. The value should be a valid MIME type.
3456	ContentTypesToCompress *[]string `json:"contentTypesToCompress,omitempty"`
3457	// 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.
3458	IsCompressionEnabled *bool `json:"isCompressionEnabled,omitempty"`
3459	// IsHTTPAllowed - Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
3460	IsHTTPAllowed *bool `json:"isHttpAllowed,omitempty"`
3461	// IsHTTPSAllowed - Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
3462	IsHTTPSAllowed *bool `json:"isHttpsAllowed,omitempty"`
3463	// 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: 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet'
3464	QueryStringCachingBehavior QueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"`
3465	// 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'
3466	OptimizationType OptimizationType `json:"optimizationType,omitempty"`
3467	// 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.
3468	ProbePath *string `json:"probePath,omitempty"`
3469	// 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/
3470	GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"`
3471	// DeliveryPolicy - A policy that specifies the delivery rules to be used for an endpoint.
3472	DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy `json:"deliveryPolicy,omitempty"`
3473}
3474
3475// EndpointPropertiesUpdateParameters the JSON object containing endpoint update parameters.
3476type EndpointPropertiesUpdateParameters struct {
3477	// 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.
3478	OriginHostHeader *string `json:"originHostHeader,omitempty"`
3479	// OriginPath - A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
3480	OriginPath *string `json:"originPath,omitempty"`
3481	// ContentTypesToCompress - List of content types on which compression applies. The value should be a valid MIME type.
3482	ContentTypesToCompress *[]string `json:"contentTypesToCompress,omitempty"`
3483	// 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.
3484	IsCompressionEnabled *bool `json:"isCompressionEnabled,omitempty"`
3485	// IsHTTPAllowed - Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
3486	IsHTTPAllowed *bool `json:"isHttpAllowed,omitempty"`
3487	// IsHTTPSAllowed - Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
3488	IsHTTPSAllowed *bool `json:"isHttpsAllowed,omitempty"`
3489	// 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: 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet'
3490	QueryStringCachingBehavior QueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"`
3491	// 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'
3492	OptimizationType OptimizationType `json:"optimizationType,omitempty"`
3493	// 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.
3494	ProbePath *string `json:"probePath,omitempty"`
3495	// 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/
3496	GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"`
3497	// DeliveryPolicy - A policy that specifies the delivery rules to be used for an endpoint.
3498	DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy `json:"deliveryPolicy,omitempty"`
3499}
3500
3501// EndpointPropertiesUpdateParametersDeliveryPolicy a policy that specifies the delivery rules to be used
3502// for an endpoint.
3503type EndpointPropertiesUpdateParametersDeliveryPolicy struct {
3504	// Description - User-friendly description of the policy.
3505	Description *string `json:"description,omitempty"`
3506	// Rules - A list of the delivery rules.
3507	Rules *[]DeliveryRule `json:"rules,omitempty"`
3508}
3509
3510// EndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
3511// operation.
3512type EndpointsCreateFuture struct {
3513	azure.Future
3514}
3515
3516// Result returns the result of the asynchronous operation.
3517// If the operation has not completed it will return an error.
3518func (future *EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
3519	var done bool
3520	done, err = future.DoneWithContext(context.Background(), client)
3521	if err != nil {
3522		err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", future.Response(), "Polling failure")
3523		return
3524	}
3525	if !done {
3526		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsCreateFuture")
3527		return
3528	}
3529	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3530	if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
3531		e, err = client.CreateResponder(e.Response.Response)
3532		if err != nil {
3533			err = autorest.NewErrorWithError(err, "cdn.EndpointsCreateFuture", "Result", e.Response.Response, "Failure responding to request")
3534		}
3535	}
3536	return
3537}
3538
3539// EndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
3540// operation.
3541type EndpointsDeleteFuture struct {
3542	azure.Future
3543}
3544
3545// Result returns the result of the asynchronous operation.
3546// If the operation has not completed it will return an error.
3547func (future *EndpointsDeleteFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
3548	var done bool
3549	done, err = future.DoneWithContext(context.Background(), client)
3550	if err != nil {
3551		err = autorest.NewErrorWithError(err, "cdn.EndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
3552		return
3553	}
3554	if !done {
3555		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsDeleteFuture")
3556		return
3557	}
3558	ar.Response = future.Response()
3559	return
3560}
3561
3562// EndpointsLoadContentFuture an abstraction for monitoring and retrieving the results of a long-running
3563// operation.
3564type EndpointsLoadContentFuture struct {
3565	azure.Future
3566}
3567
3568// Result returns the result of the asynchronous operation.
3569// If the operation has not completed it will return an error.
3570func (future *EndpointsLoadContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
3571	var done bool
3572	done, err = future.DoneWithContext(context.Background(), client)
3573	if err != nil {
3574		err = autorest.NewErrorWithError(err, "cdn.EndpointsLoadContentFuture", "Result", future.Response(), "Polling failure")
3575		return
3576	}
3577	if !done {
3578		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsLoadContentFuture")
3579		return
3580	}
3581	ar.Response = future.Response()
3582	return
3583}
3584
3585// EndpointsPurgeContentFuture an abstraction for monitoring and retrieving the results of a long-running
3586// operation.
3587type EndpointsPurgeContentFuture struct {
3588	azure.Future
3589}
3590
3591// Result returns the result of the asynchronous operation.
3592// If the operation has not completed it will return an error.
3593func (future *EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) {
3594	var done bool
3595	done, err = future.DoneWithContext(context.Background(), client)
3596	if err != nil {
3597		err = autorest.NewErrorWithError(err, "cdn.EndpointsPurgeContentFuture", "Result", future.Response(), "Polling failure")
3598		return
3599	}
3600	if !done {
3601		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsPurgeContentFuture")
3602		return
3603	}
3604	ar.Response = future.Response()
3605	return
3606}
3607
3608// EndpointsStartFuture an abstraction for monitoring and retrieving the results of a long-running
3609// operation.
3610type EndpointsStartFuture struct {
3611	azure.Future
3612}
3613
3614// Result returns the result of the asynchronous operation.
3615// If the operation has not completed it will return an error.
3616func (future *EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint, err error) {
3617	var done bool
3618	done, err = future.DoneWithContext(context.Background(), client)
3619	if err != nil {
3620		err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", future.Response(), "Polling failure")
3621		return
3622	}
3623	if !done {
3624		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStartFuture")
3625		return
3626	}
3627	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3628	if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
3629		e, err = client.StartResponder(e.Response.Response)
3630		if err != nil {
3631			err = autorest.NewErrorWithError(err, "cdn.EndpointsStartFuture", "Result", e.Response.Response, "Failure responding to request")
3632		}
3633	}
3634	return
3635}
3636
3637// EndpointsStopFuture an abstraction for monitoring and retrieving the results of a long-running
3638// operation.
3639type EndpointsStopFuture struct {
3640	azure.Future
3641}
3642
3643// Result returns the result of the asynchronous operation.
3644// If the operation has not completed it will return an error.
3645func (future *EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, err error) {
3646	var done bool
3647	done, err = future.DoneWithContext(context.Background(), client)
3648	if err != nil {
3649		err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", future.Response(), "Polling failure")
3650		return
3651	}
3652	if !done {
3653		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsStopFuture")
3654		return
3655	}
3656	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3657	if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
3658		e, err = client.StopResponder(e.Response.Response)
3659		if err != nil {
3660			err = autorest.NewErrorWithError(err, "cdn.EndpointsStopFuture", "Result", e.Response.Response, "Failure responding to request")
3661		}
3662	}
3663	return
3664}
3665
3666// EndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
3667// operation.
3668type EndpointsUpdateFuture struct {
3669	azure.Future
3670}
3671
3672// Result returns the result of the asynchronous operation.
3673// If the operation has not completed it will return an error.
3674func (future *EndpointsUpdateFuture) Result(client EndpointsClient) (e Endpoint, err error) {
3675	var done bool
3676	done, err = future.DoneWithContext(context.Background(), client)
3677	if err != nil {
3678		err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", future.Response(), "Polling failure")
3679		return
3680	}
3681	if !done {
3682		err = azure.NewAsyncOpIncompleteError("cdn.EndpointsUpdateFuture")
3683		return
3684	}
3685	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3686	if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
3687		e, err = client.UpdateResponder(e.Response.Response)
3688		if err != nil {
3689			err = autorest.NewErrorWithError(err, "cdn.EndpointsUpdateFuture", "Result", e.Response.Response, "Failure responding to request")
3690		}
3691	}
3692	return
3693}
3694
3695// EndpointUpdateParameters properties required to create or update an endpoint.
3696type EndpointUpdateParameters struct {
3697	// Tags - Endpoint tags.
3698	Tags                                map[string]*string `json:"tags"`
3699	*EndpointPropertiesUpdateParameters `json:"properties,omitempty"`
3700}
3701
3702// MarshalJSON is the custom marshaler for EndpointUpdateParameters.
3703func (eup EndpointUpdateParameters) MarshalJSON() ([]byte, error) {
3704	objectMap := make(map[string]interface{})
3705	if eup.Tags != nil {
3706		objectMap["tags"] = eup.Tags
3707	}
3708	if eup.EndpointPropertiesUpdateParameters != nil {
3709		objectMap["properties"] = eup.EndpointPropertiesUpdateParameters
3710	}
3711	return json.Marshal(objectMap)
3712}
3713
3714// UnmarshalJSON is the custom unmarshaler for EndpointUpdateParameters struct.
3715func (eup *EndpointUpdateParameters) UnmarshalJSON(body []byte) error {
3716	var m map[string]*json.RawMessage
3717	err := json.Unmarshal(body, &m)
3718	if err != nil {
3719		return err
3720	}
3721	for k, v := range m {
3722		switch k {
3723		case "tags":
3724			if v != nil {
3725				var tags map[string]*string
3726				err = json.Unmarshal(*v, &tags)
3727				if err != nil {
3728					return err
3729				}
3730				eup.Tags = tags
3731			}
3732		case "properties":
3733			if v != nil {
3734				var endpointPropertiesUpdateParameters EndpointPropertiesUpdateParameters
3735				err = json.Unmarshal(*v, &endpointPropertiesUpdateParameters)
3736				if err != nil {
3737					return err
3738				}
3739				eup.EndpointPropertiesUpdateParameters = &endpointPropertiesUpdateParameters
3740			}
3741		}
3742	}
3743
3744	return nil
3745}
3746
3747// ErrorResponse error response indicates CDN service is not able to process the incoming request. The
3748// reason is provided in the error message.
3749type ErrorResponse struct {
3750	// Code - READ-ONLY; Error code.
3751	Code *string `json:"code,omitempty"`
3752	// Message - READ-ONLY; Error message indicating why the operation failed.
3753	Message *string `json:"message,omitempty"`
3754}
3755
3756// GeoFilter rules defining user's geo access within a CDN endpoint.
3757type GeoFilter struct {
3758	// RelativePath - Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.)
3759	RelativePath *string `json:"relativePath,omitempty"`
3760	// Action - Action of the geo filter, i.e. allow or block access. Possible values include: 'Block', 'Allow'
3761	Action GeoFilterActions `json:"action,omitempty"`
3762	// CountryCodes - Two letter country codes defining user country access in a geo filter, e.g. AU, MX, US.
3763	CountryCodes *[]string `json:"countryCodes,omitempty"`
3764}
3765
3766// HeaderActionParameters defines the parameters for the request header action.
3767type HeaderActionParameters struct {
3768	OdataType *string `json:"@odata.type,omitempty"`
3769	// HeaderAction - Action to perform. Possible values include: 'Append', 'Overwrite', 'Delete'
3770	HeaderAction HeaderAction `json:"headerAction,omitempty"`
3771	// HeaderName - Name of the header to modify
3772	HeaderName *string `json:"headerName,omitempty"`
3773	// Value - Value for the specified action
3774	Value *string `json:"value,omitempty"`
3775}
3776
3777// IPAddressGroup CDN Ip address group
3778type IPAddressGroup struct {
3779	// DeliveryRegion - The delivery region of the ip address group
3780	DeliveryRegion *string `json:"deliveryRegion,omitempty"`
3781	// Ipv4Addresses - The list of ip v4 addresses.
3782	Ipv4Addresses *[]CidrIPAddress `json:"ipv4Addresses,omitempty"`
3783	// Ipv6Addresses - The list of ip v6 addresses.
3784	Ipv6Addresses *[]CidrIPAddress `json:"ipv6Addresses,omitempty"`
3785}
3786
3787// IsDeviceMatchConditionParameters defines the parameters for IsDevice match conditions
3788type IsDeviceMatchConditionParameters struct {
3789	OdataType *string `json:"@odata.type,omitempty"`
3790	// Operator - Describes operator to be matched
3791	Operator *string `json:"operator,omitempty"`
3792	// NegateCondition - Describes if this is negate condition or not
3793	NegateCondition *bool `json:"negateCondition,omitempty"`
3794	// MatchValues - The match value for the condition of the delivery rule
3795	MatchValues *[]string `json:"matchValues,omitempty"`
3796	// Transforms - List of transforms
3797	Transforms *[]Transform `json:"transforms,omitempty"`
3798}
3799
3800// KeyVaultCertificateSourceParameters describes the parameters for using a user's KeyVault certificate for
3801// securing custom domain.
3802type KeyVaultCertificateSourceParameters struct {
3803	OdataType *string `json:"@odata.type,omitempty"`
3804	// SubscriptionID - Subscription Id of the user's Key Vault containing the SSL certificate
3805	SubscriptionID *string `json:"subscriptionId,omitempty"`
3806	// ResourceGroupName - Resource group of the user's Key Vault containing the SSL certificate
3807	ResourceGroupName *string `json:"resourceGroupName,omitempty"`
3808	// VaultName - The name of the user's Key Vault containing the SSL certificate
3809	VaultName *string `json:"vaultName,omitempty"`
3810	// SecretName - The name of Key Vault Secret (representing the full certificate PFX) in Key Vault.
3811	SecretName *string `json:"secretName,omitempty"`
3812	// SecretVersion - The version(GUID) of Key Vault Secret in Key Vault.
3813	SecretVersion *string `json:"secretVersion,omitempty"`
3814	// UpdateRule - Describes the action that shall be taken when the certificate is updated in Key Vault.
3815	UpdateRule *string `json:"updateRule,omitempty"`
3816	// DeleteRule - Describes the action that shall be taken when the certificate is removed from Key Vault.
3817	DeleteRule *string `json:"deleteRule,omitempty"`
3818}
3819
3820// LoadParameters parameters required for content load.
3821type LoadParameters struct {
3822	// ContentPaths - The path to the content to be loaded. Path should be a relative file URL of the origin.
3823	ContentPaths *[]string `json:"contentPaths,omitempty"`
3824}
3825
3826// ManagedHTTPSParameters defines the certificate source parameters using CDN managed certificate for
3827// enabling SSL.
3828type ManagedHTTPSParameters struct {
3829	// CertificateSourceParameters - Defines the certificate source parameters using CDN managed certificate for enabling SSL.
3830	CertificateSourceParameters *CertificateSourceParameters `json:"certificateSourceParameters,omitempty"`
3831	// ProtocolType - Defines the TLS extension protocol that is used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased'
3832	ProtocolType ProtocolType `json:"protocolType,omitempty"`
3833	// CertificateSource - Possible values include: 'CertificateSourceCustomDomainHTTPSParameters', 'CertificateSourceCdn', 'CertificateSourceAzureKeyVault'
3834	CertificateSource CertificateSource `json:"certificateSource,omitempty"`
3835}
3836
3837// MarshalJSON is the custom marshaler for ManagedHTTPSParameters.
3838func (mhp ManagedHTTPSParameters) MarshalJSON() ([]byte, error) {
3839	mhp.CertificateSource = CertificateSourceCdn
3840	objectMap := make(map[string]interface{})
3841	if mhp.CertificateSourceParameters != nil {
3842		objectMap["certificateSourceParameters"] = mhp.CertificateSourceParameters
3843	}
3844	if mhp.ProtocolType != "" {
3845		objectMap["protocolType"] = mhp.ProtocolType
3846	}
3847	if mhp.CertificateSource != "" {
3848		objectMap["certificateSource"] = mhp.CertificateSource
3849	}
3850	return json.Marshal(objectMap)
3851}
3852
3853// AsManagedHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for ManagedHTTPSParameters.
3854func (mhp ManagedHTTPSParameters) AsManagedHTTPSParameters() (*ManagedHTTPSParameters, bool) {
3855	return &mhp, true
3856}
3857
3858// AsUserManagedHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for ManagedHTTPSParameters.
3859func (mhp ManagedHTTPSParameters) AsUserManagedHTTPSParameters() (*UserManagedHTTPSParameters, bool) {
3860	return nil, false
3861}
3862
3863// AsCustomDomainHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for ManagedHTTPSParameters.
3864func (mhp ManagedHTTPSParameters) AsCustomDomainHTTPSParameters() (*CustomDomainHTTPSParameters, bool) {
3865	return nil, false
3866}
3867
3868// AsBasicCustomDomainHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for ManagedHTTPSParameters.
3869func (mhp ManagedHTTPSParameters) AsBasicCustomDomainHTTPSParameters() (BasicCustomDomainHTTPSParameters, bool) {
3870	return &mhp, true
3871}
3872
3873// Operation CDN REST API operation
3874type Operation struct {
3875	// Name - READ-ONLY; Operation name: {provider}/{resource}/{operation}
3876	Name *string `json:"name,omitempty"`
3877	// Display - The object that represents the operation.
3878	Display *OperationDisplay `json:"display,omitempty"`
3879}
3880
3881// OperationDisplay the object that represents the operation.
3882type OperationDisplay struct {
3883	// Provider - READ-ONLY; Service provider: Microsoft.Cdn
3884	Provider *string `json:"provider,omitempty"`
3885	// Resource - READ-ONLY; Resource on which the operation is performed: Profile, endpoint, etc.
3886	Resource *string `json:"resource,omitempty"`
3887	// Operation - READ-ONLY; Operation type: Read, write, delete, etc.
3888	Operation *string `json:"operation,omitempty"`
3889}
3890
3891// OperationsListResult result of the request to list CDN operations. It contains a list of operations and
3892// a URL link to get the next set of results.
3893type OperationsListResult struct {
3894	autorest.Response `json:"-"`
3895	// Value - READ-ONLY; List of CDN operations supported by the CDN resource provider.
3896	Value *[]Operation `json:"value,omitempty"`
3897	// NextLink - URL to get the next set of operation list results if there are any.
3898	NextLink *string `json:"nextLink,omitempty"`
3899}
3900
3901// OperationsListResultIterator provides access to a complete listing of Operation values.
3902type OperationsListResultIterator struct {
3903	i    int
3904	page OperationsListResultPage
3905}
3906
3907// NextWithContext advances to the next value.  If there was an error making
3908// the request the iterator does not advance and the error is returned.
3909func (iter *OperationsListResultIterator) NextWithContext(ctx context.Context) (err error) {
3910	if tracing.IsEnabled() {
3911		ctx = tracing.StartSpan(ctx, fqdn+"/OperationsListResultIterator.NextWithContext")
3912		defer func() {
3913			sc := -1
3914			if iter.Response().Response.Response != nil {
3915				sc = iter.Response().Response.Response.StatusCode
3916			}
3917			tracing.EndSpan(ctx, sc, err)
3918		}()
3919	}
3920	iter.i++
3921	if iter.i < len(iter.page.Values()) {
3922		return nil
3923	}
3924	err = iter.page.NextWithContext(ctx)
3925	if err != nil {
3926		iter.i--
3927		return err
3928	}
3929	iter.i = 0
3930	return nil
3931}
3932
3933// Next advances to the next value.  If there was an error making
3934// the request the iterator does not advance and the error is returned.
3935// Deprecated: Use NextWithContext() instead.
3936func (iter *OperationsListResultIterator) Next() error {
3937	return iter.NextWithContext(context.Background())
3938}
3939
3940// NotDone returns true if the enumeration should be started or is not yet complete.
3941func (iter OperationsListResultIterator) NotDone() bool {
3942	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3943}
3944
3945// Response returns the raw server response from the last page request.
3946func (iter OperationsListResultIterator) Response() OperationsListResult {
3947	return iter.page.Response()
3948}
3949
3950// Value returns the current value or a zero-initialized value if the
3951// iterator has advanced beyond the end of the collection.
3952func (iter OperationsListResultIterator) Value() Operation {
3953	if !iter.page.NotDone() {
3954		return Operation{}
3955	}
3956	return iter.page.Values()[iter.i]
3957}
3958
3959// Creates a new instance of the OperationsListResultIterator type.
3960func NewOperationsListResultIterator(page OperationsListResultPage) OperationsListResultIterator {
3961	return OperationsListResultIterator{page: page}
3962}
3963
3964// IsEmpty returns true if the ListResult contains no values.
3965func (olr OperationsListResult) IsEmpty() bool {
3966	return olr.Value == nil || len(*olr.Value) == 0
3967}
3968
3969// operationsListResultPreparer prepares a request to retrieve the next set of results.
3970// It returns nil if no more results exist.
3971func (olr OperationsListResult) operationsListResultPreparer(ctx context.Context) (*http.Request, error) {
3972	if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
3973		return nil, nil
3974	}
3975	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3976		autorest.AsJSON(),
3977		autorest.AsGet(),
3978		autorest.WithBaseURL(to.String(olr.NextLink)))
3979}
3980
3981// OperationsListResultPage contains a page of Operation values.
3982type OperationsListResultPage struct {
3983	fn  func(context.Context, OperationsListResult) (OperationsListResult, error)
3984	olr OperationsListResult
3985}
3986
3987// NextWithContext advances to the next page of values.  If there was an error making
3988// the request the page does not advance and the error is returned.
3989func (page *OperationsListResultPage) NextWithContext(ctx context.Context) (err error) {
3990	if tracing.IsEnabled() {
3991		ctx = tracing.StartSpan(ctx, fqdn+"/OperationsListResultPage.NextWithContext")
3992		defer func() {
3993			sc := -1
3994			if page.Response().Response.Response != nil {
3995				sc = page.Response().Response.Response.StatusCode
3996			}
3997			tracing.EndSpan(ctx, sc, err)
3998		}()
3999	}
4000	next, err := page.fn(ctx, page.olr)
4001	if err != nil {
4002		return err
4003	}
4004	page.olr = next
4005	return nil
4006}
4007
4008// Next advances to the next page of values.  If there was an error making
4009// the request the page does not advance and the error is returned.
4010// Deprecated: Use NextWithContext() instead.
4011func (page *OperationsListResultPage) Next() error {
4012	return page.NextWithContext(context.Background())
4013}
4014
4015// NotDone returns true if the page enumeration should be started or is not yet complete.
4016func (page OperationsListResultPage) NotDone() bool {
4017	return !page.olr.IsEmpty()
4018}
4019
4020// Response returns the raw server response from the last page request.
4021func (page OperationsListResultPage) Response() OperationsListResult {
4022	return page.olr
4023}
4024
4025// Values returns the slice of values for the current page or nil if there are no values.
4026func (page OperationsListResultPage) Values() []Operation {
4027	if page.olr.IsEmpty() {
4028		return nil
4029	}
4030	return *page.olr.Value
4031}
4032
4033// Creates a new instance of the OperationsListResultPage type.
4034func NewOperationsListResultPage(getNextPage func(context.Context, OperationsListResult) (OperationsListResult, error)) OperationsListResultPage {
4035	return OperationsListResultPage{fn: getNextPage}
4036}
4037
4038// Origin CDN origin is the source of the content being delivered via CDN. When the edge nodes represented
4039// by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of
4040// the configured origins.
4041type Origin struct {
4042	autorest.Response `json:"-"`
4043	*OriginProperties `json:"properties,omitempty"`
4044	// Location - Resource location.
4045	Location *string `json:"location,omitempty"`
4046	// Tags - Resource tags.
4047	Tags map[string]*string `json:"tags"`
4048	// ID - READ-ONLY; Resource ID.
4049	ID *string `json:"id,omitempty"`
4050	// Name - READ-ONLY; Resource name.
4051	Name *string `json:"name,omitempty"`
4052	// Type - READ-ONLY; Resource type.
4053	Type *string `json:"type,omitempty"`
4054}
4055
4056// MarshalJSON is the custom marshaler for Origin.
4057func (o Origin) MarshalJSON() ([]byte, error) {
4058	objectMap := make(map[string]interface{})
4059	if o.OriginProperties != nil {
4060		objectMap["properties"] = o.OriginProperties
4061	}
4062	if o.Location != nil {
4063		objectMap["location"] = o.Location
4064	}
4065	if o.Tags != nil {
4066		objectMap["tags"] = o.Tags
4067	}
4068	return json.Marshal(objectMap)
4069}
4070
4071// UnmarshalJSON is the custom unmarshaler for Origin struct.
4072func (o *Origin) UnmarshalJSON(body []byte) error {
4073	var m map[string]*json.RawMessage
4074	err := json.Unmarshal(body, &m)
4075	if err != nil {
4076		return err
4077	}
4078	for k, v := range m {
4079		switch k {
4080		case "properties":
4081			if v != nil {
4082				var originProperties OriginProperties
4083				err = json.Unmarshal(*v, &originProperties)
4084				if err != nil {
4085					return err
4086				}
4087				o.OriginProperties = &originProperties
4088			}
4089		case "location":
4090			if v != nil {
4091				var location string
4092				err = json.Unmarshal(*v, &location)
4093				if err != nil {
4094					return err
4095				}
4096				o.Location = &location
4097			}
4098		case "tags":
4099			if v != nil {
4100				var tags map[string]*string
4101				err = json.Unmarshal(*v, &tags)
4102				if err != nil {
4103					return err
4104				}
4105				o.Tags = tags
4106			}
4107		case "id":
4108			if v != nil {
4109				var ID string
4110				err = json.Unmarshal(*v, &ID)
4111				if err != nil {
4112					return err
4113				}
4114				o.ID = &ID
4115			}
4116		case "name":
4117			if v != nil {
4118				var name string
4119				err = json.Unmarshal(*v, &name)
4120				if err != nil {
4121					return err
4122				}
4123				o.Name = &name
4124			}
4125		case "type":
4126			if v != nil {
4127				var typeVar string
4128				err = json.Unmarshal(*v, &typeVar)
4129				if err != nil {
4130					return err
4131				}
4132				o.Type = &typeVar
4133			}
4134		}
4135	}
4136
4137	return nil
4138}
4139
4140// OriginListResult result of the request to list origins. It contains a list of origin objects and a URL
4141// link to get the next set of results.
4142type OriginListResult struct {
4143	autorest.Response `json:"-"`
4144	// Value - READ-ONLY; List of CDN origins within an endpoint
4145	Value *[]Origin `json:"value,omitempty"`
4146	// NextLink - URL to get the next set of origin objects if there are any.
4147	NextLink *string `json:"nextLink,omitempty"`
4148}
4149
4150// OriginListResultIterator provides access to a complete listing of Origin values.
4151type OriginListResultIterator struct {
4152	i    int
4153	page OriginListResultPage
4154}
4155
4156// NextWithContext advances to the next value.  If there was an error making
4157// the request the iterator does not advance and the error is returned.
4158func (iter *OriginListResultIterator) NextWithContext(ctx context.Context) (err error) {
4159	if tracing.IsEnabled() {
4160		ctx = tracing.StartSpan(ctx, fqdn+"/OriginListResultIterator.NextWithContext")
4161		defer func() {
4162			sc := -1
4163			if iter.Response().Response.Response != nil {
4164				sc = iter.Response().Response.Response.StatusCode
4165			}
4166			tracing.EndSpan(ctx, sc, err)
4167		}()
4168	}
4169	iter.i++
4170	if iter.i < len(iter.page.Values()) {
4171		return nil
4172	}
4173	err = iter.page.NextWithContext(ctx)
4174	if err != nil {
4175		iter.i--
4176		return err
4177	}
4178	iter.i = 0
4179	return nil
4180}
4181
4182// Next advances to the next value.  If there was an error making
4183// the request the iterator does not advance and the error is returned.
4184// Deprecated: Use NextWithContext() instead.
4185func (iter *OriginListResultIterator) Next() error {
4186	return iter.NextWithContext(context.Background())
4187}
4188
4189// NotDone returns true if the enumeration should be started or is not yet complete.
4190func (iter OriginListResultIterator) NotDone() bool {
4191	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4192}
4193
4194// Response returns the raw server response from the last page request.
4195func (iter OriginListResultIterator) Response() OriginListResult {
4196	return iter.page.Response()
4197}
4198
4199// Value returns the current value or a zero-initialized value if the
4200// iterator has advanced beyond the end of the collection.
4201func (iter OriginListResultIterator) Value() Origin {
4202	if !iter.page.NotDone() {
4203		return Origin{}
4204	}
4205	return iter.page.Values()[iter.i]
4206}
4207
4208// Creates a new instance of the OriginListResultIterator type.
4209func NewOriginListResultIterator(page OriginListResultPage) OriginListResultIterator {
4210	return OriginListResultIterator{page: page}
4211}
4212
4213// IsEmpty returns true if the ListResult contains no values.
4214func (olr OriginListResult) IsEmpty() bool {
4215	return olr.Value == nil || len(*olr.Value) == 0
4216}
4217
4218// originListResultPreparer prepares a request to retrieve the next set of results.
4219// It returns nil if no more results exist.
4220func (olr OriginListResult) originListResultPreparer(ctx context.Context) (*http.Request, error) {
4221	if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
4222		return nil, nil
4223	}
4224	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4225		autorest.AsJSON(),
4226		autorest.AsGet(),
4227		autorest.WithBaseURL(to.String(olr.NextLink)))
4228}
4229
4230// OriginListResultPage contains a page of Origin values.
4231type OriginListResultPage struct {
4232	fn  func(context.Context, OriginListResult) (OriginListResult, error)
4233	olr OriginListResult
4234}
4235
4236// NextWithContext advances to the next page of values.  If there was an error making
4237// the request the page does not advance and the error is returned.
4238func (page *OriginListResultPage) NextWithContext(ctx context.Context) (err error) {
4239	if tracing.IsEnabled() {
4240		ctx = tracing.StartSpan(ctx, fqdn+"/OriginListResultPage.NextWithContext")
4241		defer func() {
4242			sc := -1
4243			if page.Response().Response.Response != nil {
4244				sc = page.Response().Response.Response.StatusCode
4245			}
4246			tracing.EndSpan(ctx, sc, err)
4247		}()
4248	}
4249	next, err := page.fn(ctx, page.olr)
4250	if err != nil {
4251		return err
4252	}
4253	page.olr = next
4254	return nil
4255}
4256
4257// Next advances to the next page of values.  If there was an error making
4258// the request the page does not advance and the error is returned.
4259// Deprecated: Use NextWithContext() instead.
4260func (page *OriginListResultPage) Next() error {
4261	return page.NextWithContext(context.Background())
4262}
4263
4264// NotDone returns true if the page enumeration should be started or is not yet complete.
4265func (page OriginListResultPage) NotDone() bool {
4266	return !page.olr.IsEmpty()
4267}
4268
4269// Response returns the raw server response from the last page request.
4270func (page OriginListResultPage) Response() OriginListResult {
4271	return page.olr
4272}
4273
4274// Values returns the slice of values for the current page or nil if there are no values.
4275func (page OriginListResultPage) Values() []Origin {
4276	if page.olr.IsEmpty() {
4277		return nil
4278	}
4279	return *page.olr.Value
4280}
4281
4282// Creates a new instance of the OriginListResultPage type.
4283func NewOriginListResultPage(getNextPage func(context.Context, OriginListResult) (OriginListResult, error)) OriginListResultPage {
4284	return OriginListResultPage{fn: getNextPage}
4285}
4286
4287// OriginProperties the JSON object that contains the properties of the origin.
4288type OriginProperties struct {
4289	// HostName - The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.
4290	HostName *string `json:"hostName,omitempty"`
4291	// HTTPPort - The value of the HTTP port. Must be between 1 and 65535.
4292	HTTPPort *int32 `json:"httpPort,omitempty"`
4293	// HTTPSPort - The value of the https port. Must be between 1 and 65535.
4294	HTTPSPort *int32 `json:"httpsPort,omitempty"`
4295	// ResourceState - READ-ONLY; Resource status of the origin. Possible values include: 'OriginResourceStateCreating', 'OriginResourceStateActive', 'OriginResourceStateDeleting'
4296	ResourceState OriginResourceState `json:"resourceState,omitempty"`
4297	// ProvisioningState - READ-ONLY; Provisioning status of the origin.
4298	ProvisioningState *string `json:"provisioningState,omitempty"`
4299}
4300
4301// OriginPropertiesParameters the JSON object that contains the properties of the origin.
4302type OriginPropertiesParameters struct {
4303	// HostName - The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.
4304	HostName *string `json:"hostName,omitempty"`
4305	// HTTPPort - The value of the HTTP port. Must be between 1 and 65535.
4306	HTTPPort *int32 `json:"httpPort,omitempty"`
4307	// HTTPSPort - The value of the HTTPS port. Must be between 1 and 65535.
4308	HTTPSPort *int32 `json:"httpsPort,omitempty"`
4309}
4310
4311// OriginsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
4312// operation.
4313type OriginsUpdateFuture struct {
4314	azure.Future
4315}
4316
4317// Result returns the result of the asynchronous operation.
4318// If the operation has not completed it will return an error.
4319func (future *OriginsUpdateFuture) Result(client OriginsClient) (o Origin, err error) {
4320	var done bool
4321	done, err = future.DoneWithContext(context.Background(), client)
4322	if err != nil {
4323		err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", future.Response(), "Polling failure")
4324		return
4325	}
4326	if !done {
4327		err = azure.NewAsyncOpIncompleteError("cdn.OriginsUpdateFuture")
4328		return
4329	}
4330	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4331	if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
4332		o, err = client.UpdateResponder(o.Response.Response)
4333		if err != nil {
4334			err = autorest.NewErrorWithError(err, "cdn.OriginsUpdateFuture", "Result", o.Response.Response, "Failure responding to request")
4335		}
4336	}
4337	return
4338}
4339
4340// OriginUpdateParameters origin properties needed for origin creation or update.
4341type OriginUpdateParameters struct {
4342	*OriginPropertiesParameters `json:"properties,omitempty"`
4343}
4344
4345// MarshalJSON is the custom marshaler for OriginUpdateParameters.
4346func (oup OriginUpdateParameters) MarshalJSON() ([]byte, error) {
4347	objectMap := make(map[string]interface{})
4348	if oup.OriginPropertiesParameters != nil {
4349		objectMap["properties"] = oup.OriginPropertiesParameters
4350	}
4351	return json.Marshal(objectMap)
4352}
4353
4354// UnmarshalJSON is the custom unmarshaler for OriginUpdateParameters struct.
4355func (oup *OriginUpdateParameters) UnmarshalJSON(body []byte) error {
4356	var m map[string]*json.RawMessage
4357	err := json.Unmarshal(body, &m)
4358	if err != nil {
4359		return err
4360	}
4361	for k, v := range m {
4362		switch k {
4363		case "properties":
4364			if v != nil {
4365				var originPropertiesParameters OriginPropertiesParameters
4366				err = json.Unmarshal(*v, &originPropertiesParameters)
4367				if err != nil {
4368					return err
4369				}
4370				oup.OriginPropertiesParameters = &originPropertiesParameters
4371			}
4372		}
4373	}
4374
4375	return nil
4376}
4377
4378// PostArgsMatchConditionParameters defines the parameters for PostArgs match conditions
4379type PostArgsMatchConditionParameters struct {
4380	OdataType *string `json:"@odata.type,omitempty"`
4381	// Selector - Name of PostArg to be matched
4382	Selector *string `json:"selector,omitempty"`
4383	// Operator - Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual'
4384	Operator PostArgsOperator `json:"operator,omitempty"`
4385	// NegateCondition - Describes if this is negate condition or not
4386	NegateCondition *bool `json:"negateCondition,omitempty"`
4387	// MatchValues - The match value for the condition of the delivery rule
4388	MatchValues *[]string `json:"matchValues,omitempty"`
4389	// Transforms - List of transforms
4390	Transforms *[]Transform `json:"transforms,omitempty"`
4391}
4392
4393// Profile CDN profile is a logical grouping of endpoints that share the same settings, such as CDN
4394// provider and pricing tier.
4395type Profile struct {
4396	autorest.Response `json:"-"`
4397	// Sku - The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile.
4398	Sku                *Sku `json:"sku,omitempty"`
4399	*ProfileProperties `json:"properties,omitempty"`
4400	// Location - Resource location.
4401	Location *string `json:"location,omitempty"`
4402	// Tags - Resource tags.
4403	Tags map[string]*string `json:"tags"`
4404	// ID - READ-ONLY; Resource ID.
4405	ID *string `json:"id,omitempty"`
4406	// Name - READ-ONLY; Resource name.
4407	Name *string `json:"name,omitempty"`
4408	// Type - READ-ONLY; Resource type.
4409	Type *string `json:"type,omitempty"`
4410}
4411
4412// MarshalJSON is the custom marshaler for Profile.
4413func (p Profile) MarshalJSON() ([]byte, error) {
4414	objectMap := make(map[string]interface{})
4415	if p.Sku != nil {
4416		objectMap["sku"] = p.Sku
4417	}
4418	if p.ProfileProperties != nil {
4419		objectMap["properties"] = p.ProfileProperties
4420	}
4421	if p.Location != nil {
4422		objectMap["location"] = p.Location
4423	}
4424	if p.Tags != nil {
4425		objectMap["tags"] = p.Tags
4426	}
4427	return json.Marshal(objectMap)
4428}
4429
4430// UnmarshalJSON is the custom unmarshaler for Profile struct.
4431func (p *Profile) UnmarshalJSON(body []byte) error {
4432	var m map[string]*json.RawMessage
4433	err := json.Unmarshal(body, &m)
4434	if err != nil {
4435		return err
4436	}
4437	for k, v := range m {
4438		switch k {
4439		case "sku":
4440			if v != nil {
4441				var sku Sku
4442				err = json.Unmarshal(*v, &sku)
4443				if err != nil {
4444					return err
4445				}
4446				p.Sku = &sku
4447			}
4448		case "properties":
4449			if v != nil {
4450				var profileProperties ProfileProperties
4451				err = json.Unmarshal(*v, &profileProperties)
4452				if err != nil {
4453					return err
4454				}
4455				p.ProfileProperties = &profileProperties
4456			}
4457		case "location":
4458			if v != nil {
4459				var location string
4460				err = json.Unmarshal(*v, &location)
4461				if err != nil {
4462					return err
4463				}
4464				p.Location = &location
4465			}
4466		case "tags":
4467			if v != nil {
4468				var tags map[string]*string
4469				err = json.Unmarshal(*v, &tags)
4470				if err != nil {
4471					return err
4472				}
4473				p.Tags = tags
4474			}
4475		case "id":
4476			if v != nil {
4477				var ID string
4478				err = json.Unmarshal(*v, &ID)
4479				if err != nil {
4480					return err
4481				}
4482				p.ID = &ID
4483			}
4484		case "name":
4485			if v != nil {
4486				var name string
4487				err = json.Unmarshal(*v, &name)
4488				if err != nil {
4489					return err
4490				}
4491				p.Name = &name
4492			}
4493		case "type":
4494			if v != nil {
4495				var typeVar string
4496				err = json.Unmarshal(*v, &typeVar)
4497				if err != nil {
4498					return err
4499				}
4500				p.Type = &typeVar
4501			}
4502		}
4503	}
4504
4505	return nil
4506}
4507
4508// ProfileListResult result of the request to list profiles. It contains a list of profile objects and a
4509// URL link to get the next set of results.
4510type ProfileListResult struct {
4511	autorest.Response `json:"-"`
4512	// Value - READ-ONLY; List of CDN profiles within a resource group.
4513	Value *[]Profile `json:"value,omitempty"`
4514	// NextLink - URL to get the next set of profile objects if there are any.
4515	NextLink *string `json:"nextLink,omitempty"`
4516}
4517
4518// ProfileListResultIterator provides access to a complete listing of Profile values.
4519type ProfileListResultIterator struct {
4520	i    int
4521	page ProfileListResultPage
4522}
4523
4524// NextWithContext advances to the next value.  If there was an error making
4525// the request the iterator does not advance and the error is returned.
4526func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
4527	if tracing.IsEnabled() {
4528		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
4529		defer func() {
4530			sc := -1
4531			if iter.Response().Response.Response != nil {
4532				sc = iter.Response().Response.Response.StatusCode
4533			}
4534			tracing.EndSpan(ctx, sc, err)
4535		}()
4536	}
4537	iter.i++
4538	if iter.i < len(iter.page.Values()) {
4539		return nil
4540	}
4541	err = iter.page.NextWithContext(ctx)
4542	if err != nil {
4543		iter.i--
4544		return err
4545	}
4546	iter.i = 0
4547	return nil
4548}
4549
4550// Next advances to the next value.  If there was an error making
4551// the request the iterator does not advance and the error is returned.
4552// Deprecated: Use NextWithContext() instead.
4553func (iter *ProfileListResultIterator) Next() error {
4554	return iter.NextWithContext(context.Background())
4555}
4556
4557// NotDone returns true if the enumeration should be started or is not yet complete.
4558func (iter ProfileListResultIterator) NotDone() bool {
4559	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4560}
4561
4562// Response returns the raw server response from the last page request.
4563func (iter ProfileListResultIterator) Response() ProfileListResult {
4564	return iter.page.Response()
4565}
4566
4567// Value returns the current value or a zero-initialized value if the
4568// iterator has advanced beyond the end of the collection.
4569func (iter ProfileListResultIterator) Value() Profile {
4570	if !iter.page.NotDone() {
4571		return Profile{}
4572	}
4573	return iter.page.Values()[iter.i]
4574}
4575
4576// Creates a new instance of the ProfileListResultIterator type.
4577func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
4578	return ProfileListResultIterator{page: page}
4579}
4580
4581// IsEmpty returns true if the ListResult contains no values.
4582func (plr ProfileListResult) IsEmpty() bool {
4583	return plr.Value == nil || len(*plr.Value) == 0
4584}
4585
4586// profileListResultPreparer prepares a request to retrieve the next set of results.
4587// It returns nil if no more results exist.
4588func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
4589	if plr.NextLink == nil || len(to.String(plr.NextLink)) < 1 {
4590		return nil, nil
4591	}
4592	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4593		autorest.AsJSON(),
4594		autorest.AsGet(),
4595		autorest.WithBaseURL(to.String(plr.NextLink)))
4596}
4597
4598// ProfileListResultPage contains a page of Profile values.
4599type ProfileListResultPage struct {
4600	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
4601	plr ProfileListResult
4602}
4603
4604// NextWithContext advances to the next page of values.  If there was an error making
4605// the request the page does not advance and the error is returned.
4606func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
4607	if tracing.IsEnabled() {
4608		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
4609		defer func() {
4610			sc := -1
4611			if page.Response().Response.Response != nil {
4612				sc = page.Response().Response.Response.StatusCode
4613			}
4614			tracing.EndSpan(ctx, sc, err)
4615		}()
4616	}
4617	next, err := page.fn(ctx, page.plr)
4618	if err != nil {
4619		return err
4620	}
4621	page.plr = next
4622	return nil
4623}
4624
4625// Next advances to the next page of values.  If there was an error making
4626// the request the page does not advance and the error is returned.
4627// Deprecated: Use NextWithContext() instead.
4628func (page *ProfileListResultPage) Next() error {
4629	return page.NextWithContext(context.Background())
4630}
4631
4632// NotDone returns true if the page enumeration should be started or is not yet complete.
4633func (page ProfileListResultPage) NotDone() bool {
4634	return !page.plr.IsEmpty()
4635}
4636
4637// Response returns the raw server response from the last page request.
4638func (page ProfileListResultPage) Response() ProfileListResult {
4639	return page.plr
4640}
4641
4642// Values returns the slice of values for the current page or nil if there are no values.
4643func (page ProfileListResultPage) Values() []Profile {
4644	if page.plr.IsEmpty() {
4645		return nil
4646	}
4647	return *page.plr.Value
4648}
4649
4650// Creates a new instance of the ProfileListResultPage type.
4651func NewProfileListResultPage(getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
4652	return ProfileListResultPage{fn: getNextPage}
4653}
4654
4655// ProfileProperties the JSON object that contains the properties required to create a profile.
4656type ProfileProperties struct {
4657	// ResourceState - READ-ONLY; Resource status of the profile. Possible values include: 'ProfileResourceStateCreating', 'ProfileResourceStateActive', 'ProfileResourceStateDeleting', 'ProfileResourceStateDisabled'
4658	ResourceState ProfileResourceState `json:"resourceState,omitempty"`
4659	// ProvisioningState - READ-ONLY; Provisioning status of the profile.
4660	ProvisioningState *string `json:"provisioningState,omitempty"`
4661}
4662
4663// ProfilesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
4664// operation.
4665type ProfilesCreateFuture struct {
4666	azure.Future
4667}
4668
4669// Result returns the result of the asynchronous operation.
4670// If the operation has not completed it will return an error.
4671func (future *ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, err error) {
4672	var done bool
4673	done, err = future.DoneWithContext(context.Background(), client)
4674	if err != nil {
4675		err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", future.Response(), "Polling failure")
4676		return
4677	}
4678	if !done {
4679		err = azure.NewAsyncOpIncompleteError("cdn.ProfilesCreateFuture")
4680		return
4681	}
4682	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4683	if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
4684		p, err = client.CreateResponder(p.Response.Response)
4685		if err != nil {
4686			err = autorest.NewErrorWithError(err, "cdn.ProfilesCreateFuture", "Result", p.Response.Response, "Failure responding to request")
4687		}
4688	}
4689	return
4690}
4691
4692// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
4693// operation.
4694type ProfilesDeleteFuture struct {
4695	azure.Future
4696}
4697
4698// Result returns the result of the asynchronous operation.
4699// If the operation has not completed it will return an error.
4700func (future *ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
4701	var done bool
4702	done, err = future.DoneWithContext(context.Background(), client)
4703	if err != nil {
4704		err = autorest.NewErrorWithError(err, "cdn.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
4705		return
4706	}
4707	if !done {
4708		err = azure.NewAsyncOpIncompleteError("cdn.ProfilesDeleteFuture")
4709		return
4710	}
4711	ar.Response = future.Response()
4712	return
4713}
4714
4715// ProfilesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
4716// operation.
4717type ProfilesUpdateFuture struct {
4718	azure.Future
4719}
4720
4721// Result returns the result of the asynchronous operation.
4722// If the operation has not completed it will return an error.
4723func (future *ProfilesUpdateFuture) Result(client ProfilesClient) (p Profile, err error) {
4724	var done bool
4725	done, err = future.DoneWithContext(context.Background(), client)
4726	if err != nil {
4727		err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", future.Response(), "Polling failure")
4728		return
4729	}
4730	if !done {
4731		err = azure.NewAsyncOpIncompleteError("cdn.ProfilesUpdateFuture")
4732		return
4733	}
4734	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4735	if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent {
4736		p, err = client.UpdateResponder(p.Response.Response)
4737		if err != nil {
4738			err = autorest.NewErrorWithError(err, "cdn.ProfilesUpdateFuture", "Result", p.Response.Response, "Failure responding to request")
4739		}
4740	}
4741	return
4742}
4743
4744// ProfileUpdateParameters properties required to update a profile.
4745type ProfileUpdateParameters struct {
4746	// Tags - Profile tags
4747	Tags map[string]*string `json:"tags"`
4748}
4749
4750// MarshalJSON is the custom marshaler for ProfileUpdateParameters.
4751func (pup ProfileUpdateParameters) MarshalJSON() ([]byte, error) {
4752	objectMap := make(map[string]interface{})
4753	if pup.Tags != nil {
4754		objectMap["tags"] = pup.Tags
4755	}
4756	return json.Marshal(objectMap)
4757}
4758
4759// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than
4760// required location and tags
4761type ProxyResource struct {
4762	// ID - READ-ONLY; Resource ID.
4763	ID *string `json:"id,omitempty"`
4764	// Name - READ-ONLY; Resource name.
4765	Name *string `json:"name,omitempty"`
4766	// Type - READ-ONLY; Resource type.
4767	Type *string `json:"type,omitempty"`
4768}
4769
4770// PurgeParameters parameters required for content purge.
4771type PurgeParameters struct {
4772	// ContentPaths - The path to the content to be purged. Can describe a file path or a wild card directory.
4773	ContentPaths *[]string `json:"contentPaths,omitempty"`
4774}
4775
4776// QueryStringMatchConditionParameters defines the parameters for QueryString match conditions
4777type QueryStringMatchConditionParameters struct {
4778	OdataType *string `json:"@odata.type,omitempty"`
4779	// Operator - Describes operator to be matched. Possible values include: 'QueryStringOperatorAny', 'QueryStringOperatorEqual', 'QueryStringOperatorContains', 'QueryStringOperatorBeginsWith', 'QueryStringOperatorEndsWith', 'QueryStringOperatorLessThan', 'QueryStringOperatorLessThanOrEqual', 'QueryStringOperatorGreaterThan', 'QueryStringOperatorGreaterThanOrEqual'
4780	Operator QueryStringOperator `json:"operator,omitempty"`
4781	// NegateCondition - Describes if this is negate condition or not
4782	NegateCondition *bool `json:"negateCondition,omitempty"`
4783	// MatchValues - The match value for the condition of the delivery rule
4784	MatchValues *[]string `json:"matchValues,omitempty"`
4785	// Transforms - List of transforms
4786	Transforms *[]Transform `json:"transforms,omitempty"`
4787}
4788
4789// RemoteAddressMatchConditionParameters defines the parameters for RemoteAddress match conditions
4790type RemoteAddressMatchConditionParameters struct {
4791	OdataType *string `json:"@odata.type,omitempty"`
4792	// Operator - Describes operator to be matched. Possible values include: 'RemoteAddressOperatorAny', 'RemoteAddressOperatorIPMatch', 'RemoteAddressOperatorGeoMatch'
4793	Operator RemoteAddressOperator `json:"operator,omitempty"`
4794	// NegateCondition - Describes if this is negate condition or not
4795	NegateCondition *bool `json:"negateCondition,omitempty"`
4796	// 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.
4797	MatchValues *[]string `json:"matchValues,omitempty"`
4798	// Transforms - List of transforms
4799	Transforms *[]Transform `json:"transforms,omitempty"`
4800}
4801
4802// RequestBodyMatchConditionParameters defines the parameters for RequestBody match conditions
4803type RequestBodyMatchConditionParameters struct {
4804	OdataType *string `json:"@odata.type,omitempty"`
4805	// Operator - Describes operator to be matched. Possible values include: 'RequestBodyOperatorAny', 'RequestBodyOperatorEqual', 'RequestBodyOperatorContains', 'RequestBodyOperatorBeginsWith', 'RequestBodyOperatorEndsWith', 'RequestBodyOperatorLessThan', 'RequestBodyOperatorLessThanOrEqual', 'RequestBodyOperatorGreaterThan', 'RequestBodyOperatorGreaterThanOrEqual'
4806	Operator RequestBodyOperator `json:"operator,omitempty"`
4807	// NegateCondition - Describes if this is negate condition or not
4808	NegateCondition *bool `json:"negateCondition,omitempty"`
4809	// MatchValues - The match value for the condition of the delivery rule
4810	MatchValues *[]string `json:"matchValues,omitempty"`
4811	// Transforms - List of transforms
4812	Transforms *[]Transform `json:"transforms,omitempty"`
4813}
4814
4815// RequestHeaderMatchConditionParameters defines the parameters for RequestHeader match conditions
4816type RequestHeaderMatchConditionParameters struct {
4817	OdataType *string `json:"@odata.type,omitempty"`
4818	// Selector - Name of Header to be matched
4819	Selector *string `json:"selector,omitempty"`
4820	// Operator - Describes operator to be matched. Possible values include: 'RequestHeaderOperatorAny', 'RequestHeaderOperatorEqual', 'RequestHeaderOperatorContains', 'RequestHeaderOperatorBeginsWith', 'RequestHeaderOperatorEndsWith', 'RequestHeaderOperatorLessThan', 'RequestHeaderOperatorLessThanOrEqual', 'RequestHeaderOperatorGreaterThan', 'RequestHeaderOperatorGreaterThanOrEqual'
4821	Operator RequestHeaderOperator `json:"operator,omitempty"`
4822	// NegateCondition - Describes if this is negate condition or not
4823	NegateCondition *bool `json:"negateCondition,omitempty"`
4824	// MatchValues - The match value for the condition of the delivery rule
4825	MatchValues *[]string `json:"matchValues,omitempty"`
4826	// Transforms - List of transforms
4827	Transforms *[]Transform `json:"transforms,omitempty"`
4828}
4829
4830// RequestMethodMatchConditionParameters defines the parameters for RequestMethod match conditions
4831type RequestMethodMatchConditionParameters struct {
4832	OdataType *string `json:"@odata.type,omitempty"`
4833	// Operator - Describes operator to be matched
4834	Operator *string `json:"operator,omitempty"`
4835	// NegateCondition - Describes if this is negate condition or not
4836	NegateCondition *bool `json:"negateCondition,omitempty"`
4837	// MatchValues - The match value for the condition of the delivery rule
4838	MatchValues *[]string `json:"matchValues,omitempty"`
4839}
4840
4841// RequestSchemeMatchConditionParameters defines the parameters for RequestScheme match conditions
4842type RequestSchemeMatchConditionParameters struct {
4843	OdataType *string `json:"@odata.type,omitempty"`
4844	// Operator - Describes operator to be matched
4845	Operator *string `json:"operator,omitempty"`
4846	// NegateCondition - Describes if this is negate condition or not
4847	NegateCondition *bool `json:"negateCondition,omitempty"`
4848	// MatchValues - The match value for the condition of the delivery rule
4849	MatchValues *[]string `json:"matchValues,omitempty"`
4850}
4851
4852// RequestURIMatchConditionParameters defines the parameters for RequestUri match conditions
4853type RequestURIMatchConditionParameters struct {
4854	OdataType *string `json:"@odata.type,omitempty"`
4855	// Operator - Describes operator to be matched. Possible values include: 'RequestURIOperatorAny', 'RequestURIOperatorEqual', 'RequestURIOperatorContains', 'RequestURIOperatorBeginsWith', 'RequestURIOperatorEndsWith', 'RequestURIOperatorLessThan', 'RequestURIOperatorLessThanOrEqual', 'RequestURIOperatorGreaterThan', 'RequestURIOperatorGreaterThanOrEqual'
4856	Operator RequestURIOperator `json:"operator,omitempty"`
4857	// NegateCondition - Describes if this is negate condition or not
4858	NegateCondition *bool `json:"negateCondition,omitempty"`
4859	// MatchValues - The match value for the condition of the delivery rule
4860	MatchValues *[]string `json:"matchValues,omitempty"`
4861	// Transforms - List of transforms
4862	Transforms *[]Transform `json:"transforms,omitempty"`
4863}
4864
4865// Resource the core properties of ARM resources
4866type Resource struct {
4867	// ID - READ-ONLY; Resource ID.
4868	ID *string `json:"id,omitempty"`
4869	// Name - READ-ONLY; Resource name.
4870	Name *string `json:"name,omitempty"`
4871	// Type - READ-ONLY; Resource type.
4872	Type *string `json:"type,omitempty"`
4873}
4874
4875// ResourceUsage output of check resource usage API.
4876type ResourceUsage struct {
4877	// ResourceType - READ-ONLY; Resource type for which the usage is provided.
4878	ResourceType *string `json:"resourceType,omitempty"`
4879	// Unit - READ-ONLY; Unit of the usage. e.g. Count.
4880	Unit *string `json:"unit,omitempty"`
4881	// CurrentValue - READ-ONLY; Actual value of usage on the specified resource type.
4882	CurrentValue *int32 `json:"currentValue,omitempty"`
4883	// Limit - READ-ONLY; Quota of the specified resource type.
4884	Limit *int32 `json:"limit,omitempty"`
4885}
4886
4887// ResourceUsageListResult output of check resource usage API.
4888type ResourceUsageListResult struct {
4889	autorest.Response `json:"-"`
4890	// Value - READ-ONLY; List of resource usages.
4891	Value *[]ResourceUsage `json:"value,omitempty"`
4892	// NextLink - URL to get the next set of custom domain objects if there are any.
4893	NextLink *string `json:"nextLink,omitempty"`
4894}
4895
4896// ResourceUsageListResultIterator provides access to a complete listing of ResourceUsage values.
4897type ResourceUsageListResultIterator struct {
4898	i    int
4899	page ResourceUsageListResultPage
4900}
4901
4902// NextWithContext advances to the next value.  If there was an error making
4903// the request the iterator does not advance and the error is returned.
4904func (iter *ResourceUsageListResultIterator) NextWithContext(ctx context.Context) (err error) {
4905	if tracing.IsEnabled() {
4906		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceUsageListResultIterator.NextWithContext")
4907		defer func() {
4908			sc := -1
4909			if iter.Response().Response.Response != nil {
4910				sc = iter.Response().Response.Response.StatusCode
4911			}
4912			tracing.EndSpan(ctx, sc, err)
4913		}()
4914	}
4915	iter.i++
4916	if iter.i < len(iter.page.Values()) {
4917		return nil
4918	}
4919	err = iter.page.NextWithContext(ctx)
4920	if err != nil {
4921		iter.i--
4922		return err
4923	}
4924	iter.i = 0
4925	return nil
4926}
4927
4928// Next advances to the next value.  If there was an error making
4929// the request the iterator does not advance and the error is returned.
4930// Deprecated: Use NextWithContext() instead.
4931func (iter *ResourceUsageListResultIterator) Next() error {
4932	return iter.NextWithContext(context.Background())
4933}
4934
4935// NotDone returns true if the enumeration should be started or is not yet complete.
4936func (iter ResourceUsageListResultIterator) NotDone() bool {
4937	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4938}
4939
4940// Response returns the raw server response from the last page request.
4941func (iter ResourceUsageListResultIterator) Response() ResourceUsageListResult {
4942	return iter.page.Response()
4943}
4944
4945// Value returns the current value or a zero-initialized value if the
4946// iterator has advanced beyond the end of the collection.
4947func (iter ResourceUsageListResultIterator) Value() ResourceUsage {
4948	if !iter.page.NotDone() {
4949		return ResourceUsage{}
4950	}
4951	return iter.page.Values()[iter.i]
4952}
4953
4954// Creates a new instance of the ResourceUsageListResultIterator type.
4955func NewResourceUsageListResultIterator(page ResourceUsageListResultPage) ResourceUsageListResultIterator {
4956	return ResourceUsageListResultIterator{page: page}
4957}
4958
4959// IsEmpty returns true if the ListResult contains no values.
4960func (rulr ResourceUsageListResult) IsEmpty() bool {
4961	return rulr.Value == nil || len(*rulr.Value) == 0
4962}
4963
4964// resourceUsageListResultPreparer prepares a request to retrieve the next set of results.
4965// It returns nil if no more results exist.
4966func (rulr ResourceUsageListResult) resourceUsageListResultPreparer(ctx context.Context) (*http.Request, error) {
4967	if rulr.NextLink == nil || len(to.String(rulr.NextLink)) < 1 {
4968		return nil, nil
4969	}
4970	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4971		autorest.AsJSON(),
4972		autorest.AsGet(),
4973		autorest.WithBaseURL(to.String(rulr.NextLink)))
4974}
4975
4976// ResourceUsageListResultPage contains a page of ResourceUsage values.
4977type ResourceUsageListResultPage struct {
4978	fn   func(context.Context, ResourceUsageListResult) (ResourceUsageListResult, error)
4979	rulr ResourceUsageListResult
4980}
4981
4982// NextWithContext advances to the next page of values.  If there was an error making
4983// the request the page does not advance and the error is returned.
4984func (page *ResourceUsageListResultPage) NextWithContext(ctx context.Context) (err error) {
4985	if tracing.IsEnabled() {
4986		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceUsageListResultPage.NextWithContext")
4987		defer func() {
4988			sc := -1
4989			if page.Response().Response.Response != nil {
4990				sc = page.Response().Response.Response.StatusCode
4991			}
4992			tracing.EndSpan(ctx, sc, err)
4993		}()
4994	}
4995	next, err := page.fn(ctx, page.rulr)
4996	if err != nil {
4997		return err
4998	}
4999	page.rulr = next
5000	return nil
5001}
5002
5003// Next advances to the next page of values.  If there was an error making
5004// the request the page does not advance and the error is returned.
5005// Deprecated: Use NextWithContext() instead.
5006func (page *ResourceUsageListResultPage) Next() error {
5007	return page.NextWithContext(context.Background())
5008}
5009
5010// NotDone returns true if the page enumeration should be started or is not yet complete.
5011func (page ResourceUsageListResultPage) NotDone() bool {
5012	return !page.rulr.IsEmpty()
5013}
5014
5015// Response returns the raw server response from the last page request.
5016func (page ResourceUsageListResultPage) Response() ResourceUsageListResult {
5017	return page.rulr
5018}
5019
5020// Values returns the slice of values for the current page or nil if there are no values.
5021func (page ResourceUsageListResultPage) Values() []ResourceUsage {
5022	if page.rulr.IsEmpty() {
5023		return nil
5024	}
5025	return *page.rulr.Value
5026}
5027
5028// Creates a new instance of the ResourceUsageListResultPage type.
5029func NewResourceUsageListResultPage(getNextPage func(context.Context, ResourceUsageListResult) (ResourceUsageListResult, error)) ResourceUsageListResultPage {
5030	return ResourceUsageListResultPage{fn: getNextPage}
5031}
5032
5033// Sku the pricing tier (defines a CDN provider, feature list and rate) of the CDN profile.
5034type Sku struct {
5035	// Name - Name of the pricing tier. Possible values include: 'StandardVerizon', 'PremiumVerizon', 'CustomVerizon', 'StandardAkamai', 'StandardChinaCdn', 'StandardMicrosoft', 'PremiumChinaCdn'
5036	Name SkuName `json:"name,omitempty"`
5037}
5038
5039// SsoURI the URI required to login to the supplemental portal from the Azure portal.
5040type SsoURI struct {
5041	autorest.Response `json:"-"`
5042	// SsoURIValue - READ-ONLY; The URI used to login to the supplemental portal.
5043	SsoURIValue *string `json:"ssoUriValue,omitempty"`
5044}
5045
5046// SupportedOptimizationTypesListResult the result of the GetSupportedOptimizationTypes API
5047type SupportedOptimizationTypesListResult struct {
5048	autorest.Response `json:"-"`
5049	// SupportedOptimizationTypes - READ-ONLY; Supported optimization types for a profile.
5050	SupportedOptimizationTypes *[]OptimizationType `json:"supportedOptimizationTypes,omitempty"`
5051}
5052
5053// TrackedResource the resource model definition for a ARM tracked top level resource.
5054type TrackedResource struct {
5055	// Location - Resource location.
5056	Location *string `json:"location,omitempty"`
5057	// Tags - Resource tags.
5058	Tags map[string]*string `json:"tags"`
5059	// ID - READ-ONLY; Resource ID.
5060	ID *string `json:"id,omitempty"`
5061	// Name - READ-ONLY; Resource name.
5062	Name *string `json:"name,omitempty"`
5063	// Type - READ-ONLY; Resource type.
5064	Type *string `json:"type,omitempty"`
5065}
5066
5067// MarshalJSON is the custom marshaler for TrackedResource.
5068func (tr TrackedResource) MarshalJSON() ([]byte, error) {
5069	objectMap := make(map[string]interface{})
5070	if tr.Location != nil {
5071		objectMap["location"] = tr.Location
5072	}
5073	if tr.Tags != nil {
5074		objectMap["tags"] = tr.Tags
5075	}
5076	return json.Marshal(objectMap)
5077}
5078
5079// URLFileExtensionMatchConditionParameters defines the parameters for UrlFileExtension match conditions
5080type URLFileExtensionMatchConditionParameters struct {
5081	OdataType *string `json:"@odata.type,omitempty"`
5082	// Operator - Describes operator to be matched. Possible values include: 'URLFileExtensionOperatorAny', 'URLFileExtensionOperatorEqual', 'URLFileExtensionOperatorContains', 'URLFileExtensionOperatorBeginsWith', 'URLFileExtensionOperatorEndsWith', 'URLFileExtensionOperatorLessThan', 'URLFileExtensionOperatorLessThanOrEqual', 'URLFileExtensionOperatorGreaterThan', 'URLFileExtensionOperatorGreaterThanOrEqual'
5083	Operator URLFileExtensionOperator `json:"operator,omitempty"`
5084	// NegateCondition - Describes if this is negate condition or not
5085	NegateCondition *bool `json:"negateCondition,omitempty"`
5086	// MatchValues - The match value for the condition of the delivery rule
5087	MatchValues *[]string `json:"matchValues,omitempty"`
5088	// Transforms - List of transforms
5089	Transforms *[]Transform `json:"transforms,omitempty"`
5090}
5091
5092// URLFileNameMatchConditionParameters defines the parameters for UrlFilename match conditions
5093type URLFileNameMatchConditionParameters struct {
5094	OdataType *string `json:"@odata.type,omitempty"`
5095	// Operator - Describes operator to be matched. Possible values include: 'URLFileNameOperatorAny', 'URLFileNameOperatorEqual', 'URLFileNameOperatorContains', 'URLFileNameOperatorBeginsWith', 'URLFileNameOperatorEndsWith', 'URLFileNameOperatorLessThan', 'URLFileNameOperatorLessThanOrEqual', 'URLFileNameOperatorGreaterThan', 'URLFileNameOperatorGreaterThanOrEqual'
5096	Operator URLFileNameOperator `json:"operator,omitempty"`
5097	// NegateCondition - Describes if this is negate condition or not
5098	NegateCondition *bool `json:"negateCondition,omitempty"`
5099	// MatchValues - The match value for the condition of the delivery rule
5100	MatchValues *[]string `json:"matchValues,omitempty"`
5101	// Transforms - List of transforms
5102	Transforms *[]Transform `json:"transforms,omitempty"`
5103}
5104
5105// URLPathMatchConditionParameters defines the parameters for UrlPath match conditions
5106type URLPathMatchConditionParameters struct {
5107	OdataType *string `json:"@odata.type,omitempty"`
5108	// Operator - Describes operator to be matched. Possible values include: 'URLPathOperatorAny', 'URLPathOperatorEqual', 'URLPathOperatorContains', 'URLPathOperatorBeginsWith', 'URLPathOperatorEndsWith', 'URLPathOperatorLessThan', 'URLPathOperatorLessThanOrEqual', 'URLPathOperatorGreaterThan', 'URLPathOperatorGreaterThanOrEqual', 'URLPathOperatorWildcard'
5109	Operator URLPathOperator `json:"operator,omitempty"`
5110	// NegateCondition - Describes if this is negate condition or not
5111	NegateCondition *bool `json:"negateCondition,omitempty"`
5112	// MatchValues - The match value for the condition of the delivery rule
5113	MatchValues *[]string `json:"matchValues,omitempty"`
5114	// Transforms - List of transforms
5115	Transforms *[]Transform `json:"transforms,omitempty"`
5116}
5117
5118// URLRedirectAction defines the url redirect action for the delivery rule.
5119type URLRedirectAction struct {
5120	// Parameters - Defines the parameters for the action.
5121	Parameters *URLRedirectActionParameters `json:"parameters,omitempty"`
5122	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
5123	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
5124}
5125
5126// MarshalJSON is the custom marshaler for URLRedirectAction.
5127func (ura URLRedirectAction) MarshalJSON() ([]byte, error) {
5128	ura.Name = NameURLRedirect
5129	objectMap := make(map[string]interface{})
5130	if ura.Parameters != nil {
5131		objectMap["parameters"] = ura.Parameters
5132	}
5133	if ura.Name != "" {
5134		objectMap["name"] = ura.Name
5135	}
5136	return json.Marshal(objectMap)
5137}
5138
5139// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
5140func (ura URLRedirectAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
5141	return &ura, true
5142}
5143
5144// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
5145func (ura URLRedirectAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
5146	return nil, false
5147}
5148
5149// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
5150func (ura URLRedirectAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
5151	return nil, false
5152}
5153
5154// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
5155func (ura URLRedirectAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
5156	return nil, false
5157}
5158
5159// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
5160func (ura URLRedirectAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
5161	return nil, false
5162}
5163
5164// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
5165func (ura URLRedirectAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
5166	return nil, false
5167}
5168
5169// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
5170func (ura URLRedirectAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
5171	return nil, false
5172}
5173
5174// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for URLRedirectAction.
5175func (ura URLRedirectAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
5176	return &ura, true
5177}
5178
5179// URLRedirectActionParameters defines the parameters for the url redirect action.
5180type URLRedirectActionParameters struct {
5181	OdataType *string `json:"@odata.type,omitempty"`
5182	// RedirectType - The redirect type the rule will use when redirecting traffic. Possible values include: 'Moved', 'Found', 'TemporaryRedirect', 'PermanentRedirect'
5183	RedirectType RedirectType `json:"redirectType,omitempty"`
5184	// DestinationProtocol - Protocol to use for the redirect. The default value is MatchRequest. Possible values include: 'MatchRequest', 'HTTP', 'HTTPS'
5185	DestinationProtocol DestinationProtocol `json:"destinationProtocol,omitempty"`
5186	// CustomPath - The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.
5187	CustomPath *string `json:"customPath,omitempty"`
5188	// CustomHostname - Host to redirect. Leave empty to use the incoming host as the destination host.
5189	CustomHostname *string `json:"customHostname,omitempty"`
5190	// 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.
5191	CustomQueryString *string `json:"customQueryString,omitempty"`
5192	// CustomFragment - Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.
5193	CustomFragment *string `json:"customFragment,omitempty"`
5194}
5195
5196// URLRewriteAction defines the url rewrite action for the delivery rule.
5197type URLRewriteAction struct {
5198	// Parameters - Defines the parameters for the action.
5199	Parameters *URLRewriteActionParameters `json:"parameters,omitempty"`
5200	// Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString'
5201	Name NameBasicDeliveryRuleAction `json:"name,omitempty"`
5202}
5203
5204// MarshalJSON is the custom marshaler for URLRewriteAction.
5205func (ura URLRewriteAction) MarshalJSON() ([]byte, error) {
5206	ura.Name = NameURLRewrite
5207	objectMap := make(map[string]interface{})
5208	if ura.Parameters != nil {
5209		objectMap["parameters"] = ura.Parameters
5210	}
5211	if ura.Name != "" {
5212		objectMap["name"] = ura.Name
5213	}
5214	return json.Marshal(objectMap)
5215}
5216
5217// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
5218func (ura URLRewriteAction) AsURLRedirectAction() (*URLRedirectAction, bool) {
5219	return nil, false
5220}
5221
5222// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
5223func (ura URLRewriteAction) AsURLRewriteAction() (*URLRewriteAction, bool) {
5224	return &ura, true
5225}
5226
5227// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
5228func (ura URLRewriteAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) {
5229	return nil, false
5230}
5231
5232// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
5233func (ura URLRewriteAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) {
5234	return nil, false
5235}
5236
5237// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
5238func (ura URLRewriteAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) {
5239	return nil, false
5240}
5241
5242// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
5243func (ura URLRewriteAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) {
5244	return nil, false
5245}
5246
5247// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
5248func (ura URLRewriteAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) {
5249	return nil, false
5250}
5251
5252// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for URLRewriteAction.
5253func (ura URLRewriteAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) {
5254	return &ura, true
5255}
5256
5257// URLRewriteActionParameters defines the parameters for the url rewrite action.
5258type URLRewriteActionParameters struct {
5259	OdataType *string `json:"@odata.type,omitempty"`
5260	// SourcePattern - define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched.
5261	SourcePattern *string `json:"sourcePattern,omitempty"`
5262	// Destination - Define the relative URL to which the above requests will be rewritten by.
5263	Destination *string `json:"destination,omitempty"`
5264	// PreserveUnmatchedPath - Whether to preserve unmatched path. Default value is true.
5265	PreserveUnmatchedPath *bool `json:"preserveUnmatchedPath,omitempty"`
5266}
5267
5268// UserManagedHTTPSParameters defines the certificate source parameters using user's keyvault certificate
5269// for enabling SSL.
5270type UserManagedHTTPSParameters struct {
5271	// CertificateSourceParameters - Defines the certificate source parameters using user's keyvault certificate for enabling SSL.
5272	CertificateSourceParameters *KeyVaultCertificateSourceParameters `json:"certificateSourceParameters,omitempty"`
5273	// ProtocolType - Defines the TLS extension protocol that is used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased'
5274	ProtocolType ProtocolType `json:"protocolType,omitempty"`
5275	// CertificateSource - Possible values include: 'CertificateSourceCustomDomainHTTPSParameters', 'CertificateSourceCdn', 'CertificateSourceAzureKeyVault'
5276	CertificateSource CertificateSource `json:"certificateSource,omitempty"`
5277}
5278
5279// MarshalJSON is the custom marshaler for UserManagedHTTPSParameters.
5280func (umhp UserManagedHTTPSParameters) MarshalJSON() ([]byte, error) {
5281	umhp.CertificateSource = CertificateSourceAzureKeyVault
5282	objectMap := make(map[string]interface{})
5283	if umhp.CertificateSourceParameters != nil {
5284		objectMap["certificateSourceParameters"] = umhp.CertificateSourceParameters
5285	}
5286	if umhp.ProtocolType != "" {
5287		objectMap["protocolType"] = umhp.ProtocolType
5288	}
5289	if umhp.CertificateSource != "" {
5290		objectMap["certificateSource"] = umhp.CertificateSource
5291	}
5292	return json.Marshal(objectMap)
5293}
5294
5295// AsManagedHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for UserManagedHTTPSParameters.
5296func (umhp UserManagedHTTPSParameters) AsManagedHTTPSParameters() (*ManagedHTTPSParameters, bool) {
5297	return nil, false
5298}
5299
5300// AsUserManagedHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for UserManagedHTTPSParameters.
5301func (umhp UserManagedHTTPSParameters) AsUserManagedHTTPSParameters() (*UserManagedHTTPSParameters, bool) {
5302	return &umhp, true
5303}
5304
5305// AsCustomDomainHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for UserManagedHTTPSParameters.
5306func (umhp UserManagedHTTPSParameters) AsCustomDomainHTTPSParameters() (*CustomDomainHTTPSParameters, bool) {
5307	return nil, false
5308}
5309
5310// AsBasicCustomDomainHTTPSParameters is the BasicCustomDomainHTTPSParameters implementation for UserManagedHTTPSParameters.
5311func (umhp UserManagedHTTPSParameters) AsBasicCustomDomainHTTPSParameters() (BasicCustomDomainHTTPSParameters, bool) {
5312	return &umhp, true
5313}
5314
5315// ValidateCustomDomainInput input of the custom domain to be validated for DNS mapping.
5316type ValidateCustomDomainInput struct {
5317	// HostName - The host name of the custom domain. Must be a domain name.
5318	HostName *string `json:"hostName,omitempty"`
5319}
5320
5321// ValidateCustomDomainOutput output of custom domain validation.
5322type ValidateCustomDomainOutput struct {
5323	autorest.Response `json:"-"`
5324	// CustomDomainValidated - READ-ONLY; Indicates whether the custom domain is valid or not.
5325	CustomDomainValidated *bool `json:"customDomainValidated,omitempty"`
5326	// Reason - READ-ONLY; The reason why the custom domain is not valid.
5327	Reason *string `json:"reason,omitempty"`
5328	// Message - READ-ONLY; Error message describing why the custom domain is not valid.
5329	Message *string `json:"message,omitempty"`
5330}
5331
5332// ValidateProbeInput input of the validate probe API.
5333type ValidateProbeInput struct {
5334	// ProbeURL - The probe URL to validate.
5335	ProbeURL *string `json:"probeURL,omitempty"`
5336}
5337
5338// ValidateProbeOutput output of the validate probe API.
5339type ValidateProbeOutput struct {
5340	autorest.Response `json:"-"`
5341	// IsValid - READ-ONLY; Indicates whether the probe URL is accepted or not.
5342	IsValid *bool `json:"isValid,omitempty"`
5343	// ErrorCode - READ-ONLY; Specifies the error code when the probe url is not accepted.
5344	ErrorCode *string `json:"errorCode,omitempty"`
5345	// Message - READ-ONLY; The detailed error message describing why the probe URL is not accepted.
5346	Message *string `json:"message,omitempty"`
5347}
5348