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