1package automation
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"github.com/gofrs/uuid"
18	"io"
19	"net/http"
20)
21
22// The package's fully qualified name.
23const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/automation/mgmt/2018-01-15-preview/automation"
24
25// Account definition of the automation account type.
26type Account struct {
27	autorest.Response `json:"-"`
28	// AccountProperties - Gets or sets the automation account properties.
29	*AccountProperties `json:"properties,omitempty"`
30	// Etag - Gets or sets the etag of the resource.
31	Etag *string `json:"etag,omitempty"`
32	// Tags - Resource tags.
33	Tags map[string]*string `json:"tags"`
34	// Location - The Azure Region where the resource lives
35	Location *string `json:"location,omitempty"`
36	// ID - READ-ONLY; Fully qualified resource Id for the resource
37	ID *string `json:"id,omitempty"`
38	// Name - READ-ONLY; The name of the resource
39	Name *string `json:"name,omitempty"`
40	// Type - READ-ONLY; The type of the resource.
41	Type *string `json:"type,omitempty"`
42}
43
44// MarshalJSON is the custom marshaler for Account.
45func (a Account) MarshalJSON() ([]byte, error) {
46	objectMap := make(map[string]interface{})
47	if a.AccountProperties != nil {
48		objectMap["properties"] = a.AccountProperties
49	}
50	if a.Etag != nil {
51		objectMap["etag"] = a.Etag
52	}
53	if a.Tags != nil {
54		objectMap["tags"] = a.Tags
55	}
56	if a.Location != nil {
57		objectMap["location"] = a.Location
58	}
59	return json.Marshal(objectMap)
60}
61
62// UnmarshalJSON is the custom unmarshaler for Account struct.
63func (a *Account) UnmarshalJSON(body []byte) error {
64	var m map[string]*json.RawMessage
65	err := json.Unmarshal(body, &m)
66	if err != nil {
67		return err
68	}
69	for k, v := range m {
70		switch k {
71		case "properties":
72			if v != nil {
73				var accountProperties AccountProperties
74				err = json.Unmarshal(*v, &accountProperties)
75				if err != nil {
76					return err
77				}
78				a.AccountProperties = &accountProperties
79			}
80		case "etag":
81			if v != nil {
82				var etag string
83				err = json.Unmarshal(*v, &etag)
84				if err != nil {
85					return err
86				}
87				a.Etag = &etag
88			}
89		case "tags":
90			if v != nil {
91				var tags map[string]*string
92				err = json.Unmarshal(*v, &tags)
93				if err != nil {
94					return err
95				}
96				a.Tags = tags
97			}
98		case "location":
99			if v != nil {
100				var location string
101				err = json.Unmarshal(*v, &location)
102				if err != nil {
103					return err
104				}
105				a.Location = &location
106			}
107		case "id":
108			if v != nil {
109				var ID string
110				err = json.Unmarshal(*v, &ID)
111				if err != nil {
112					return err
113				}
114				a.ID = &ID
115			}
116		case "name":
117			if v != nil {
118				var name string
119				err = json.Unmarshal(*v, &name)
120				if err != nil {
121					return err
122				}
123				a.Name = &name
124			}
125		case "type":
126			if v != nil {
127				var typeVar string
128				err = json.Unmarshal(*v, &typeVar)
129				if err != nil {
130					return err
131				}
132				a.Type = &typeVar
133			}
134		}
135	}
136
137	return nil
138}
139
140// AccountCreateOrUpdateParameters the parameters supplied to the create or update automation account
141// operation.
142type AccountCreateOrUpdateParameters struct {
143	// AccountCreateOrUpdateProperties - Gets or sets account create or update properties.
144	*AccountCreateOrUpdateProperties `json:"properties,omitempty"`
145	// Name - Gets or sets name of the resource.
146	Name *string `json:"name,omitempty"`
147	// Location - Gets or sets the location of the resource.
148	Location *string `json:"location,omitempty"`
149	// Tags - Gets or sets the tags attached to the resource.
150	Tags map[string]*string `json:"tags"`
151}
152
153// MarshalJSON is the custom marshaler for AccountCreateOrUpdateParameters.
154func (acoup AccountCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
155	objectMap := make(map[string]interface{})
156	if acoup.AccountCreateOrUpdateProperties != nil {
157		objectMap["properties"] = acoup.AccountCreateOrUpdateProperties
158	}
159	if acoup.Name != nil {
160		objectMap["name"] = acoup.Name
161	}
162	if acoup.Location != nil {
163		objectMap["location"] = acoup.Location
164	}
165	if acoup.Tags != nil {
166		objectMap["tags"] = acoup.Tags
167	}
168	return json.Marshal(objectMap)
169}
170
171// UnmarshalJSON is the custom unmarshaler for AccountCreateOrUpdateParameters struct.
172func (acoup *AccountCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
173	var m map[string]*json.RawMessage
174	err := json.Unmarshal(body, &m)
175	if err != nil {
176		return err
177	}
178	for k, v := range m {
179		switch k {
180		case "properties":
181			if v != nil {
182				var accountCreateOrUpdateProperties AccountCreateOrUpdateProperties
183				err = json.Unmarshal(*v, &accountCreateOrUpdateProperties)
184				if err != nil {
185					return err
186				}
187				acoup.AccountCreateOrUpdateProperties = &accountCreateOrUpdateProperties
188			}
189		case "name":
190			if v != nil {
191				var name string
192				err = json.Unmarshal(*v, &name)
193				if err != nil {
194					return err
195				}
196				acoup.Name = &name
197			}
198		case "location":
199			if v != nil {
200				var location string
201				err = json.Unmarshal(*v, &location)
202				if err != nil {
203					return err
204				}
205				acoup.Location = &location
206			}
207		case "tags":
208			if v != nil {
209				var tags map[string]*string
210				err = json.Unmarshal(*v, &tags)
211				if err != nil {
212					return err
213				}
214				acoup.Tags = tags
215			}
216		}
217	}
218
219	return nil
220}
221
222// AccountCreateOrUpdateProperties the parameters supplied to the create or update account properties.
223type AccountCreateOrUpdateProperties struct {
224	// Sku - Gets or sets account SKU.
225	Sku *Sku `json:"sku,omitempty"`
226}
227
228// AccountListResult the response model for the list account operation.
229type AccountListResult struct {
230	autorest.Response `json:"-"`
231	// Value - Gets or sets list of accounts.
232	Value *[]Account `json:"value,omitempty"`
233	// NextLink - Gets or sets the next link.
234	NextLink *string `json:"nextLink,omitempty"`
235}
236
237// AccountListResultIterator provides access to a complete listing of Account values.
238type AccountListResultIterator struct {
239	i    int
240	page AccountListResultPage
241}
242
243// NextWithContext advances to the next value.  If there was an error making
244// the request the iterator does not advance and the error is returned.
245func (iter *AccountListResultIterator) NextWithContext(ctx context.Context) (err error) {
246	if tracing.IsEnabled() {
247		ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultIterator.NextWithContext")
248		defer func() {
249			sc := -1
250			if iter.Response().Response.Response != nil {
251				sc = iter.Response().Response.Response.StatusCode
252			}
253			tracing.EndSpan(ctx, sc, err)
254		}()
255	}
256	iter.i++
257	if iter.i < len(iter.page.Values()) {
258		return nil
259	}
260	err = iter.page.NextWithContext(ctx)
261	if err != nil {
262		iter.i--
263		return err
264	}
265	iter.i = 0
266	return nil
267}
268
269// Next advances to the next value.  If there was an error making
270// the request the iterator does not advance and the error is returned.
271// Deprecated: Use NextWithContext() instead.
272func (iter *AccountListResultIterator) Next() error {
273	return iter.NextWithContext(context.Background())
274}
275
276// NotDone returns true if the enumeration should be started or is not yet complete.
277func (iter AccountListResultIterator) NotDone() bool {
278	return iter.page.NotDone() && iter.i < len(iter.page.Values())
279}
280
281// Response returns the raw server response from the last page request.
282func (iter AccountListResultIterator) Response() AccountListResult {
283	return iter.page.Response()
284}
285
286// Value returns the current value or a zero-initialized value if the
287// iterator has advanced beyond the end of the collection.
288func (iter AccountListResultIterator) Value() Account {
289	if !iter.page.NotDone() {
290		return Account{}
291	}
292	return iter.page.Values()[iter.i]
293}
294
295// Creates a new instance of the AccountListResultIterator type.
296func NewAccountListResultIterator(page AccountListResultPage) AccountListResultIterator {
297	return AccountListResultIterator{page: page}
298}
299
300// IsEmpty returns true if the ListResult contains no values.
301func (alr AccountListResult) IsEmpty() bool {
302	return alr.Value == nil || len(*alr.Value) == 0
303}
304
305// hasNextLink returns true if the NextLink is not empty.
306func (alr AccountListResult) hasNextLink() bool {
307	return alr.NextLink != nil && len(*alr.NextLink) != 0
308}
309
310// accountListResultPreparer prepares a request to retrieve the next set of results.
311// It returns nil if no more results exist.
312func (alr AccountListResult) accountListResultPreparer(ctx context.Context) (*http.Request, error) {
313	if !alr.hasNextLink() {
314		return nil, nil
315	}
316	return autorest.Prepare((&http.Request{}).WithContext(ctx),
317		autorest.AsJSON(),
318		autorest.AsGet(),
319		autorest.WithBaseURL(to.String(alr.NextLink)))
320}
321
322// AccountListResultPage contains a page of Account values.
323type AccountListResultPage struct {
324	fn  func(context.Context, AccountListResult) (AccountListResult, error)
325	alr AccountListResult
326}
327
328// NextWithContext advances to the next page of values.  If there was an error making
329// the request the page does not advance and the error is returned.
330func (page *AccountListResultPage) NextWithContext(ctx context.Context) (err error) {
331	if tracing.IsEnabled() {
332		ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultPage.NextWithContext")
333		defer func() {
334			sc := -1
335			if page.Response().Response.Response != nil {
336				sc = page.Response().Response.Response.StatusCode
337			}
338			tracing.EndSpan(ctx, sc, err)
339		}()
340	}
341	for {
342		next, err := page.fn(ctx, page.alr)
343		if err != nil {
344			return err
345		}
346		page.alr = next
347		if !next.hasNextLink() || !next.IsEmpty() {
348			break
349		}
350	}
351	return nil
352}
353
354// Next advances to the next page of values.  If there was an error making
355// the request the page does not advance and the error is returned.
356// Deprecated: Use NextWithContext() instead.
357func (page *AccountListResultPage) Next() error {
358	return page.NextWithContext(context.Background())
359}
360
361// NotDone returns true if the page enumeration should be started or is not yet complete.
362func (page AccountListResultPage) NotDone() bool {
363	return !page.alr.IsEmpty()
364}
365
366// Response returns the raw server response from the last page request.
367func (page AccountListResultPage) Response() AccountListResult {
368	return page.alr
369}
370
371// Values returns the slice of values for the current page or nil if there are no values.
372func (page AccountListResultPage) Values() []Account {
373	if page.alr.IsEmpty() {
374		return nil
375	}
376	return *page.alr.Value
377}
378
379// Creates a new instance of the AccountListResultPage type.
380func NewAccountListResultPage(cur AccountListResult, getNextPage func(context.Context, AccountListResult) (AccountListResult, error)) AccountListResultPage {
381	return AccountListResultPage{
382		fn:  getNextPage,
383		alr: cur,
384	}
385}
386
387// AccountProperties definition of the account property.
388type AccountProperties struct {
389	// Sku - Gets or sets the SKU of account.
390	Sku *Sku `json:"sku,omitempty"`
391	// LastModifiedBy - Gets or sets the last modified by.
392	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
393	// State - READ-ONLY; Gets status of account. Possible values include: 'Ok', 'Unavailable', 'Suspended'
394	State AccountState `json:"state,omitempty"`
395	// CreationTime - READ-ONLY; Gets the creation time.
396	CreationTime *date.Time `json:"creationTime,omitempty"`
397	// LastModifiedTime - READ-ONLY; Gets the last modified time.
398	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
399	// Description - Gets or sets the description.
400	Description *string `json:"description,omitempty"`
401}
402
403// MarshalJSON is the custom marshaler for AccountProperties.
404func (ap AccountProperties) MarshalJSON() ([]byte, error) {
405	objectMap := make(map[string]interface{})
406	if ap.Sku != nil {
407		objectMap["sku"] = ap.Sku
408	}
409	if ap.LastModifiedBy != nil {
410		objectMap["lastModifiedBy"] = ap.LastModifiedBy
411	}
412	if ap.Description != nil {
413		objectMap["description"] = ap.Description
414	}
415	return json.Marshal(objectMap)
416}
417
418// AccountUpdateParameters the parameters supplied to the update automation account operation.
419type AccountUpdateParameters struct {
420	// AccountUpdateProperties - Gets or sets account update properties.
421	*AccountUpdateProperties `json:"properties,omitempty"`
422	// Name - Gets or sets the name of the resource.
423	Name *string `json:"name,omitempty"`
424	// Location - Gets or sets the location of the resource.
425	Location *string `json:"location,omitempty"`
426	// Tags - Gets or sets the tags attached to the resource.
427	Tags map[string]*string `json:"tags"`
428}
429
430// MarshalJSON is the custom marshaler for AccountUpdateParameters.
431func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error) {
432	objectMap := make(map[string]interface{})
433	if aup.AccountUpdateProperties != nil {
434		objectMap["properties"] = aup.AccountUpdateProperties
435	}
436	if aup.Name != nil {
437		objectMap["name"] = aup.Name
438	}
439	if aup.Location != nil {
440		objectMap["location"] = aup.Location
441	}
442	if aup.Tags != nil {
443		objectMap["tags"] = aup.Tags
444	}
445	return json.Marshal(objectMap)
446}
447
448// UnmarshalJSON is the custom unmarshaler for AccountUpdateParameters struct.
449func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error {
450	var m map[string]*json.RawMessage
451	err := json.Unmarshal(body, &m)
452	if err != nil {
453		return err
454	}
455	for k, v := range m {
456		switch k {
457		case "properties":
458			if v != nil {
459				var accountUpdateProperties AccountUpdateProperties
460				err = json.Unmarshal(*v, &accountUpdateProperties)
461				if err != nil {
462					return err
463				}
464				aup.AccountUpdateProperties = &accountUpdateProperties
465			}
466		case "name":
467			if v != nil {
468				var name string
469				err = json.Unmarshal(*v, &name)
470				if err != nil {
471					return err
472				}
473				aup.Name = &name
474			}
475		case "location":
476			if v != nil {
477				var location string
478				err = json.Unmarshal(*v, &location)
479				if err != nil {
480					return err
481				}
482				aup.Location = &location
483			}
484		case "tags":
485			if v != nil {
486				var tags map[string]*string
487				err = json.Unmarshal(*v, &tags)
488				if err != nil {
489					return err
490				}
491				aup.Tags = tags
492			}
493		}
494	}
495
496	return nil
497}
498
499// AccountUpdateProperties the parameters supplied to the update account properties.
500type AccountUpdateProperties struct {
501	// Sku - Gets or sets account SKU.
502	Sku *Sku `json:"sku,omitempty"`
503}
504
505// Activity definition of the activity.
506type Activity struct {
507	autorest.Response `json:"-"`
508	// ID - Gets or sets the id of the resource.
509	ID *string `json:"id,omitempty"`
510	// Name - READ-ONLY; Gets the name of the activity.
511	Name *string `json:"name,omitempty"`
512	// ActivityProperties - Gets or sets the properties of the activity.
513	*ActivityProperties `json:"properties,omitempty"`
514}
515
516// MarshalJSON is the custom marshaler for Activity.
517func (a Activity) MarshalJSON() ([]byte, error) {
518	objectMap := make(map[string]interface{})
519	if a.ID != nil {
520		objectMap["id"] = a.ID
521	}
522	if a.ActivityProperties != nil {
523		objectMap["properties"] = a.ActivityProperties
524	}
525	return json.Marshal(objectMap)
526}
527
528// UnmarshalJSON is the custom unmarshaler for Activity struct.
529func (a *Activity) UnmarshalJSON(body []byte) error {
530	var m map[string]*json.RawMessage
531	err := json.Unmarshal(body, &m)
532	if err != nil {
533		return err
534	}
535	for k, v := range m {
536		switch k {
537		case "id":
538			if v != nil {
539				var ID string
540				err = json.Unmarshal(*v, &ID)
541				if err != nil {
542					return err
543				}
544				a.ID = &ID
545			}
546		case "name":
547			if v != nil {
548				var name string
549				err = json.Unmarshal(*v, &name)
550				if err != nil {
551					return err
552				}
553				a.Name = &name
554			}
555		case "properties":
556			if v != nil {
557				var activityProperties ActivityProperties
558				err = json.Unmarshal(*v, &activityProperties)
559				if err != nil {
560					return err
561				}
562				a.ActivityProperties = &activityProperties
563			}
564		}
565	}
566
567	return nil
568}
569
570// ActivityListResult the response model for the list activity operation.
571type ActivityListResult struct {
572	autorest.Response `json:"-"`
573	// Value - Gets or sets a list of activities.
574	Value *[]Activity `json:"value,omitempty"`
575	// NextLink - Gets or sets the next link.
576	NextLink *string `json:"nextLink,omitempty"`
577}
578
579// ActivityListResultIterator provides access to a complete listing of Activity values.
580type ActivityListResultIterator struct {
581	i    int
582	page ActivityListResultPage
583}
584
585// NextWithContext advances to the next value.  If there was an error making
586// the request the iterator does not advance and the error is returned.
587func (iter *ActivityListResultIterator) NextWithContext(ctx context.Context) (err error) {
588	if tracing.IsEnabled() {
589		ctx = tracing.StartSpan(ctx, fqdn+"/ActivityListResultIterator.NextWithContext")
590		defer func() {
591			sc := -1
592			if iter.Response().Response.Response != nil {
593				sc = iter.Response().Response.Response.StatusCode
594			}
595			tracing.EndSpan(ctx, sc, err)
596		}()
597	}
598	iter.i++
599	if iter.i < len(iter.page.Values()) {
600		return nil
601	}
602	err = iter.page.NextWithContext(ctx)
603	if err != nil {
604		iter.i--
605		return err
606	}
607	iter.i = 0
608	return nil
609}
610
611// Next advances to the next value.  If there was an error making
612// the request the iterator does not advance and the error is returned.
613// Deprecated: Use NextWithContext() instead.
614func (iter *ActivityListResultIterator) Next() error {
615	return iter.NextWithContext(context.Background())
616}
617
618// NotDone returns true if the enumeration should be started or is not yet complete.
619func (iter ActivityListResultIterator) NotDone() bool {
620	return iter.page.NotDone() && iter.i < len(iter.page.Values())
621}
622
623// Response returns the raw server response from the last page request.
624func (iter ActivityListResultIterator) Response() ActivityListResult {
625	return iter.page.Response()
626}
627
628// Value returns the current value or a zero-initialized value if the
629// iterator has advanced beyond the end of the collection.
630func (iter ActivityListResultIterator) Value() Activity {
631	if !iter.page.NotDone() {
632		return Activity{}
633	}
634	return iter.page.Values()[iter.i]
635}
636
637// Creates a new instance of the ActivityListResultIterator type.
638func NewActivityListResultIterator(page ActivityListResultPage) ActivityListResultIterator {
639	return ActivityListResultIterator{page: page}
640}
641
642// IsEmpty returns true if the ListResult contains no values.
643func (alr ActivityListResult) IsEmpty() bool {
644	return alr.Value == nil || len(*alr.Value) == 0
645}
646
647// hasNextLink returns true if the NextLink is not empty.
648func (alr ActivityListResult) hasNextLink() bool {
649	return alr.NextLink != nil && len(*alr.NextLink) != 0
650}
651
652// activityListResultPreparer prepares a request to retrieve the next set of results.
653// It returns nil if no more results exist.
654func (alr ActivityListResult) activityListResultPreparer(ctx context.Context) (*http.Request, error) {
655	if !alr.hasNextLink() {
656		return nil, nil
657	}
658	return autorest.Prepare((&http.Request{}).WithContext(ctx),
659		autorest.AsJSON(),
660		autorest.AsGet(),
661		autorest.WithBaseURL(to.String(alr.NextLink)))
662}
663
664// ActivityListResultPage contains a page of Activity values.
665type ActivityListResultPage struct {
666	fn  func(context.Context, ActivityListResult) (ActivityListResult, error)
667	alr ActivityListResult
668}
669
670// NextWithContext advances to the next page of values.  If there was an error making
671// the request the page does not advance and the error is returned.
672func (page *ActivityListResultPage) NextWithContext(ctx context.Context) (err error) {
673	if tracing.IsEnabled() {
674		ctx = tracing.StartSpan(ctx, fqdn+"/ActivityListResultPage.NextWithContext")
675		defer func() {
676			sc := -1
677			if page.Response().Response.Response != nil {
678				sc = page.Response().Response.Response.StatusCode
679			}
680			tracing.EndSpan(ctx, sc, err)
681		}()
682	}
683	for {
684		next, err := page.fn(ctx, page.alr)
685		if err != nil {
686			return err
687		}
688		page.alr = next
689		if !next.hasNextLink() || !next.IsEmpty() {
690			break
691		}
692	}
693	return nil
694}
695
696// Next advances to the next page of values.  If there was an error making
697// the request the page does not advance and the error is returned.
698// Deprecated: Use NextWithContext() instead.
699func (page *ActivityListResultPage) Next() error {
700	return page.NextWithContext(context.Background())
701}
702
703// NotDone returns true if the page enumeration should be started or is not yet complete.
704func (page ActivityListResultPage) NotDone() bool {
705	return !page.alr.IsEmpty()
706}
707
708// Response returns the raw server response from the last page request.
709func (page ActivityListResultPage) Response() ActivityListResult {
710	return page.alr
711}
712
713// Values returns the slice of values for the current page or nil if there are no values.
714func (page ActivityListResultPage) Values() []Activity {
715	if page.alr.IsEmpty() {
716		return nil
717	}
718	return *page.alr.Value
719}
720
721// Creates a new instance of the ActivityListResultPage type.
722func NewActivityListResultPage(cur ActivityListResult, getNextPage func(context.Context, ActivityListResult) (ActivityListResult, error)) ActivityListResultPage {
723	return ActivityListResultPage{
724		fn:  getNextPage,
725		alr: cur,
726	}
727}
728
729// ActivityOutputType definition of the activity output type.
730type ActivityOutputType struct {
731	// Name - Gets or sets the name of the activity output type.
732	Name *string `json:"name,omitempty"`
733	// Type - Gets or sets the type of the activity output type.
734	Type *string `json:"type,omitempty"`
735}
736
737// ActivityParameter definition of the activity parameter.
738type ActivityParameter struct {
739	// Name - Gets or sets the name of the activity parameter.
740	Name *string `json:"name,omitempty"`
741	// Type - Gets or sets the type of the activity parameter.
742	Type *string `json:"type,omitempty"`
743	// IsMandatory - Gets or sets a Boolean value that indicates true if the parameter is required. If the value is false, the parameter is optional.
744	IsMandatory *bool `json:"isMandatory,omitempty"`
745	// IsDynamic - Gets or sets a Boolean value that indicates true if the parameter is dynamic.
746	IsDynamic *bool `json:"isDynamic,omitempty"`
747	// Position - Gets or sets the position of the activity parameter.
748	Position *int64 `json:"position,omitempty"`
749	// ValueFromPipeline - Gets or sets a Boolean value that indicates true if the parameter can take values from the incoming pipeline objects. This setting is used if the cmdlet must access the complete input object. false indicates that the parameter cannot take values from the complete input object.
750	ValueFromPipeline *bool `json:"valueFromPipeline,omitempty"`
751	// ValueFromPipelineByPropertyName - Gets or sets a Boolean value that indicates true if the parameter can be filled from a property of the incoming pipeline object that has the same name as this parameter. false indicates that the parameter cannot be filled from the incoming pipeline object property with the same name.
752	ValueFromPipelineByPropertyName *bool `json:"valueFromPipelineByPropertyName,omitempty"`
753	// ValueFromRemainingArguments - Gets or sets a Boolean value that indicates true if the cmdlet parameter accepts all the remaining command-line arguments that are associated with this parameter in the form of an array. false if the cmdlet parameter does not accept all the remaining argument values.
754	ValueFromRemainingArguments *bool `json:"valueFromRemainingArguments,omitempty"`
755	// Description - Gets or sets the description of the activity parameter.
756	Description *string `json:"description,omitempty"`
757	// ValidationSet - Gets or sets the validation set of activity parameter.
758	ValidationSet *[]ActivityParameterValidationSet `json:"validationSet,omitempty"`
759}
760
761// ActivityParameterSet definition of the activity parameter set.
762type ActivityParameterSet struct {
763	// Name - Gets or sets the name of the activity parameter set.
764	Name *string `json:"name,omitempty"`
765	// Parameters - Gets or sets the parameters of the activity parameter set.
766	Parameters *[]ActivityParameter `json:"parameters,omitempty"`
767}
768
769// ActivityParameterValidationSet definition of the activity parameter validation set.
770type ActivityParameterValidationSet struct {
771	// MemberValue - Gets or sets the name of the activity parameter validation set member.
772	MemberValue *string `json:"memberValue,omitempty"`
773}
774
775// ActivityProperties properties of the activity.
776type ActivityProperties struct {
777	// Definition - Gets or sets the user name of the activity.
778	Definition *string `json:"definition,omitempty"`
779	// ParameterSets - Gets or sets the parameter sets of the activity.
780	ParameterSets *[]ActivityParameterSet `json:"parameterSets,omitempty"`
781	// OutputTypes - Gets or sets the output types of the activity.
782	OutputTypes *[]ActivityOutputType `json:"outputTypes,omitempty"`
783	// CreationTime - Gets or sets the creation time.
784	CreationTime *date.Time `json:"creationTime,omitempty"`
785	// LastModifiedTime - Gets or sets the last modified time.
786	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
787	// Description - Gets or sets the description.
788	Description *string `json:"description,omitempty"`
789}
790
791// AdvancedSchedule the properties of the create Advanced Schedule.
792type AdvancedSchedule struct {
793	// WeekDays - Days of the week that the job should execute on.
794	WeekDays *[]string `json:"weekDays,omitempty"`
795	// MonthDays - Days of the month that the job should execute on. Must be between 1 and 31.
796	MonthDays *[]int32 `json:"monthDays,omitempty"`
797	// MonthlyOccurrences - Occurrences of days within a month.
798	MonthlyOccurrences *[]AdvancedScheduleMonthlyOccurrence `json:"monthlyOccurrences,omitempty"`
799}
800
801// AdvancedScheduleMonthlyOccurrence the properties of the create advanced schedule monthly occurrence.
802type AdvancedScheduleMonthlyOccurrence struct {
803	// Occurrence - Occurrence of the week within the month. Must be between 1 and 5
804	Occurrence *int32 `json:"occurrence,omitempty"`
805	// Day - Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday. Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'
806	Day ScheduleDay `json:"day,omitempty"`
807}
808
809// AgentRegistration definition of the agent registration information type.
810type AgentRegistration struct {
811	autorest.Response `json:"-"`
812	// DscMetaConfiguration - Gets or sets the dsc meta configuration.
813	DscMetaConfiguration *string `json:"dscMetaConfiguration,omitempty"`
814	// Endpoint - Gets or sets the dsc server endpoint.
815	Endpoint *string `json:"endpoint,omitempty"`
816	// Keys - Gets or sets the agent registration keys.
817	Keys *AgentRegistrationKeys `json:"keys,omitempty"`
818	// ID - Gets or sets the id.
819	ID *string `json:"id,omitempty"`
820}
821
822// AgentRegistrationKeys definition of the agent registration keys.
823type AgentRegistrationKeys struct {
824	// Primary - Gets or sets the primary key.
825	Primary *string `json:"primary,omitempty"`
826	// Secondary - Gets or sets the secondary key.
827	Secondary *string `json:"secondary,omitempty"`
828}
829
830// AgentRegistrationRegenerateKeyParameter the parameters supplied to the regenerate keys operation.
831type AgentRegistrationRegenerateKeyParameter struct {
832	// KeyName - Gets or sets the agent registration key name - primary or secondary. Possible values include: 'Primary', 'Secondary'
833	KeyName AgentRegistrationKeyName `json:"keyName,omitempty"`
834}
835
836// AzureQueryProperties azure query for the update configuration.
837type AzureQueryProperties struct {
838	// Scope - List of Subscription or Resource Group ARM Ids.
839	Scope *[]string `json:"scope,omitempty"`
840	// Locations - List of locations to scope the query to.
841	Locations *[]string `json:"locations,omitempty"`
842	// TagSettings - Tag settings for the VM.
843	TagSettings *TagSettingsProperties `json:"tagSettings,omitempty"`
844}
845
846// Certificate definition of the certificate.
847type Certificate struct {
848	autorest.Response `json:"-"`
849	// CertificateProperties - Gets or sets the properties of the certificate.
850	*CertificateProperties `json:"properties,omitempty"`
851	// ID - READ-ONLY; Fully qualified resource Id for the resource
852	ID *string `json:"id,omitempty"`
853	// Name - READ-ONLY; The name of the resource
854	Name *string `json:"name,omitempty"`
855	// Type - READ-ONLY; The type of the resource.
856	Type *string `json:"type,omitempty"`
857}
858
859// MarshalJSON is the custom marshaler for Certificate.
860func (c Certificate) MarshalJSON() ([]byte, error) {
861	objectMap := make(map[string]interface{})
862	if c.CertificateProperties != nil {
863		objectMap["properties"] = c.CertificateProperties
864	}
865	return json.Marshal(objectMap)
866}
867
868// UnmarshalJSON is the custom unmarshaler for Certificate struct.
869func (c *Certificate) UnmarshalJSON(body []byte) error {
870	var m map[string]*json.RawMessage
871	err := json.Unmarshal(body, &m)
872	if err != nil {
873		return err
874	}
875	for k, v := range m {
876		switch k {
877		case "properties":
878			if v != nil {
879				var certificateProperties CertificateProperties
880				err = json.Unmarshal(*v, &certificateProperties)
881				if err != nil {
882					return err
883				}
884				c.CertificateProperties = &certificateProperties
885			}
886		case "id":
887			if v != nil {
888				var ID string
889				err = json.Unmarshal(*v, &ID)
890				if err != nil {
891					return err
892				}
893				c.ID = &ID
894			}
895		case "name":
896			if v != nil {
897				var name string
898				err = json.Unmarshal(*v, &name)
899				if err != nil {
900					return err
901				}
902				c.Name = &name
903			}
904		case "type":
905			if v != nil {
906				var typeVar string
907				err = json.Unmarshal(*v, &typeVar)
908				if err != nil {
909					return err
910				}
911				c.Type = &typeVar
912			}
913		}
914	}
915
916	return nil
917}
918
919// CertificateCreateOrUpdateParameters the parameters supplied to the create or update or replace
920// certificate operation.
921type CertificateCreateOrUpdateParameters struct {
922	// Name - Gets or sets the name of the certificate.
923	Name *string `json:"name,omitempty"`
924	// CertificateCreateOrUpdateProperties - Gets or sets the properties of the certificate.
925	*CertificateCreateOrUpdateProperties `json:"properties,omitempty"`
926}
927
928// MarshalJSON is the custom marshaler for CertificateCreateOrUpdateParameters.
929func (ccoup CertificateCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
930	objectMap := make(map[string]interface{})
931	if ccoup.Name != nil {
932		objectMap["name"] = ccoup.Name
933	}
934	if ccoup.CertificateCreateOrUpdateProperties != nil {
935		objectMap["properties"] = ccoup.CertificateCreateOrUpdateProperties
936	}
937	return json.Marshal(objectMap)
938}
939
940// UnmarshalJSON is the custom unmarshaler for CertificateCreateOrUpdateParameters struct.
941func (ccoup *CertificateCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
942	var m map[string]*json.RawMessage
943	err := json.Unmarshal(body, &m)
944	if err != nil {
945		return err
946	}
947	for k, v := range m {
948		switch k {
949		case "name":
950			if v != nil {
951				var name string
952				err = json.Unmarshal(*v, &name)
953				if err != nil {
954					return err
955				}
956				ccoup.Name = &name
957			}
958		case "properties":
959			if v != nil {
960				var certificateCreateOrUpdateProperties CertificateCreateOrUpdateProperties
961				err = json.Unmarshal(*v, &certificateCreateOrUpdateProperties)
962				if err != nil {
963					return err
964				}
965				ccoup.CertificateCreateOrUpdateProperties = &certificateCreateOrUpdateProperties
966			}
967		}
968	}
969
970	return nil
971}
972
973// CertificateCreateOrUpdateProperties the properties of the create certificate operation.
974type CertificateCreateOrUpdateProperties struct {
975	// Base64Value - Gets or sets the base64 encoded value of the certificate.
976	Base64Value *string `json:"base64Value,omitempty"`
977	// Description - Gets or sets the description of the certificate.
978	Description *string `json:"description,omitempty"`
979	// Thumbprint - Gets or sets the thumbprint of the certificate.
980	Thumbprint *string `json:"thumbprint,omitempty"`
981	// IsExportable - Gets or sets the is exportable flag of the certificate.
982	IsExportable *bool `json:"isExportable,omitempty"`
983}
984
985// CertificateListResult the response model for the list certificate operation.
986type CertificateListResult struct {
987	autorest.Response `json:"-"`
988	// Value - Gets or sets a list of certificates.
989	Value *[]Certificate `json:"value,omitempty"`
990	// NextLink - Gets or sets the next link.
991	NextLink *string `json:"nextLink,omitempty"`
992}
993
994// CertificateListResultIterator provides access to a complete listing of Certificate values.
995type CertificateListResultIterator struct {
996	i    int
997	page CertificateListResultPage
998}
999
1000// NextWithContext advances to the next value.  If there was an error making
1001// the request the iterator does not advance and the error is returned.
1002func (iter *CertificateListResultIterator) NextWithContext(ctx context.Context) (err error) {
1003	if tracing.IsEnabled() {
1004		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateListResultIterator.NextWithContext")
1005		defer func() {
1006			sc := -1
1007			if iter.Response().Response.Response != nil {
1008				sc = iter.Response().Response.Response.StatusCode
1009			}
1010			tracing.EndSpan(ctx, sc, err)
1011		}()
1012	}
1013	iter.i++
1014	if iter.i < len(iter.page.Values()) {
1015		return nil
1016	}
1017	err = iter.page.NextWithContext(ctx)
1018	if err != nil {
1019		iter.i--
1020		return err
1021	}
1022	iter.i = 0
1023	return nil
1024}
1025
1026// Next advances to the next value.  If there was an error making
1027// the request the iterator does not advance and the error is returned.
1028// Deprecated: Use NextWithContext() instead.
1029func (iter *CertificateListResultIterator) Next() error {
1030	return iter.NextWithContext(context.Background())
1031}
1032
1033// NotDone returns true if the enumeration should be started or is not yet complete.
1034func (iter CertificateListResultIterator) NotDone() bool {
1035	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1036}
1037
1038// Response returns the raw server response from the last page request.
1039func (iter CertificateListResultIterator) Response() CertificateListResult {
1040	return iter.page.Response()
1041}
1042
1043// Value returns the current value or a zero-initialized value if the
1044// iterator has advanced beyond the end of the collection.
1045func (iter CertificateListResultIterator) Value() Certificate {
1046	if !iter.page.NotDone() {
1047		return Certificate{}
1048	}
1049	return iter.page.Values()[iter.i]
1050}
1051
1052// Creates a new instance of the CertificateListResultIterator type.
1053func NewCertificateListResultIterator(page CertificateListResultPage) CertificateListResultIterator {
1054	return CertificateListResultIterator{page: page}
1055}
1056
1057// IsEmpty returns true if the ListResult contains no values.
1058func (clr CertificateListResult) IsEmpty() bool {
1059	return clr.Value == nil || len(*clr.Value) == 0
1060}
1061
1062// hasNextLink returns true if the NextLink is not empty.
1063func (clr CertificateListResult) hasNextLink() bool {
1064	return clr.NextLink != nil && len(*clr.NextLink) != 0
1065}
1066
1067// certificateListResultPreparer prepares a request to retrieve the next set of results.
1068// It returns nil if no more results exist.
1069func (clr CertificateListResult) certificateListResultPreparer(ctx context.Context) (*http.Request, error) {
1070	if !clr.hasNextLink() {
1071		return nil, nil
1072	}
1073	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1074		autorest.AsJSON(),
1075		autorest.AsGet(),
1076		autorest.WithBaseURL(to.String(clr.NextLink)))
1077}
1078
1079// CertificateListResultPage contains a page of Certificate values.
1080type CertificateListResultPage struct {
1081	fn  func(context.Context, CertificateListResult) (CertificateListResult, error)
1082	clr CertificateListResult
1083}
1084
1085// NextWithContext advances to the next page of values.  If there was an error making
1086// the request the page does not advance and the error is returned.
1087func (page *CertificateListResultPage) NextWithContext(ctx context.Context) (err error) {
1088	if tracing.IsEnabled() {
1089		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateListResultPage.NextWithContext")
1090		defer func() {
1091			sc := -1
1092			if page.Response().Response.Response != nil {
1093				sc = page.Response().Response.Response.StatusCode
1094			}
1095			tracing.EndSpan(ctx, sc, err)
1096		}()
1097	}
1098	for {
1099		next, err := page.fn(ctx, page.clr)
1100		if err != nil {
1101			return err
1102		}
1103		page.clr = next
1104		if !next.hasNextLink() || !next.IsEmpty() {
1105			break
1106		}
1107	}
1108	return nil
1109}
1110
1111// Next advances to the next page of values.  If there was an error making
1112// the request the page does not advance and the error is returned.
1113// Deprecated: Use NextWithContext() instead.
1114func (page *CertificateListResultPage) Next() error {
1115	return page.NextWithContext(context.Background())
1116}
1117
1118// NotDone returns true if the page enumeration should be started or is not yet complete.
1119func (page CertificateListResultPage) NotDone() bool {
1120	return !page.clr.IsEmpty()
1121}
1122
1123// Response returns the raw server response from the last page request.
1124func (page CertificateListResultPage) Response() CertificateListResult {
1125	return page.clr
1126}
1127
1128// Values returns the slice of values for the current page or nil if there are no values.
1129func (page CertificateListResultPage) Values() []Certificate {
1130	if page.clr.IsEmpty() {
1131		return nil
1132	}
1133	return *page.clr.Value
1134}
1135
1136// Creates a new instance of the CertificateListResultPage type.
1137func NewCertificateListResultPage(cur CertificateListResult, getNextPage func(context.Context, CertificateListResult) (CertificateListResult, error)) CertificateListResultPage {
1138	return CertificateListResultPage{
1139		fn:  getNextPage,
1140		clr: cur,
1141	}
1142}
1143
1144// CertificateProperties properties of the certificate.
1145type CertificateProperties struct {
1146	// Thumbprint - READ-ONLY; Gets the thumbprint of the certificate.
1147	Thumbprint *string `json:"thumbprint,omitempty"`
1148	// ExpiryTime - READ-ONLY; Gets the expiry time of the certificate.
1149	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
1150	// IsExportable - READ-ONLY; Gets the is exportable flag of the certificate.
1151	IsExportable *bool `json:"isExportable,omitempty"`
1152	// CreationTime - READ-ONLY; Gets the creation time.
1153	CreationTime *date.Time `json:"creationTime,omitempty"`
1154	// LastModifiedTime - READ-ONLY; Gets the last modified time.
1155	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
1156	// Description - Gets or sets the description.
1157	Description *string `json:"description,omitempty"`
1158}
1159
1160// MarshalJSON is the custom marshaler for CertificateProperties.
1161func (cp CertificateProperties) MarshalJSON() ([]byte, error) {
1162	objectMap := make(map[string]interface{})
1163	if cp.Description != nil {
1164		objectMap["description"] = cp.Description
1165	}
1166	return json.Marshal(objectMap)
1167}
1168
1169// CertificateUpdateParameters the parameters supplied to the update certificate operation.
1170type CertificateUpdateParameters struct {
1171	// Name - Gets or sets the name of the certificate.
1172	Name *string `json:"name,omitempty"`
1173	// CertificateUpdateProperties - Gets or sets the properties of the certificate.
1174	*CertificateUpdateProperties `json:"properties,omitempty"`
1175}
1176
1177// MarshalJSON is the custom marshaler for CertificateUpdateParameters.
1178func (cup CertificateUpdateParameters) MarshalJSON() ([]byte, error) {
1179	objectMap := make(map[string]interface{})
1180	if cup.Name != nil {
1181		objectMap["name"] = cup.Name
1182	}
1183	if cup.CertificateUpdateProperties != nil {
1184		objectMap["properties"] = cup.CertificateUpdateProperties
1185	}
1186	return json.Marshal(objectMap)
1187}
1188
1189// UnmarshalJSON is the custom unmarshaler for CertificateUpdateParameters struct.
1190func (cup *CertificateUpdateParameters) UnmarshalJSON(body []byte) error {
1191	var m map[string]*json.RawMessage
1192	err := json.Unmarshal(body, &m)
1193	if err != nil {
1194		return err
1195	}
1196	for k, v := range m {
1197		switch k {
1198		case "name":
1199			if v != nil {
1200				var name string
1201				err = json.Unmarshal(*v, &name)
1202				if err != nil {
1203					return err
1204				}
1205				cup.Name = &name
1206			}
1207		case "properties":
1208			if v != nil {
1209				var certificateUpdateProperties CertificateUpdateProperties
1210				err = json.Unmarshal(*v, &certificateUpdateProperties)
1211				if err != nil {
1212					return err
1213				}
1214				cup.CertificateUpdateProperties = &certificateUpdateProperties
1215			}
1216		}
1217	}
1218
1219	return nil
1220}
1221
1222// CertificateUpdateProperties the properties of the update certificate operation
1223type CertificateUpdateProperties struct {
1224	// Description - Gets or sets the description of the certificate.
1225	Description *string `json:"description,omitempty"`
1226}
1227
1228// CollectionItemUpdateConfiguration object returned when requesting a collection of software update
1229// configuration
1230type CollectionItemUpdateConfiguration struct {
1231	// AzureVirtualMachines - List of azure resource Ids for azure virtual machines targeted by the software update configuration.
1232	AzureVirtualMachines *[]string `json:"azureVirtualMachines,omitempty"`
1233	// Duration - Maximum time allowed for the software update configuration run. Duration needs to be specified using the format PT[n]H[n]M[n]S as per ISO8601
1234	Duration *string `json:"duration,omitempty"`
1235}
1236
1237// Connection definition of the connection.
1238type Connection struct {
1239	autorest.Response `json:"-"`
1240	// ConnectionProperties - Gets or sets the properties of the connection.
1241	*ConnectionProperties `json:"properties,omitempty"`
1242	// ID - READ-ONLY; Fully qualified resource Id for the resource
1243	ID *string `json:"id,omitempty"`
1244	// Name - READ-ONLY; The name of the resource
1245	Name *string `json:"name,omitempty"`
1246	// Type - READ-ONLY; The type of the resource.
1247	Type *string `json:"type,omitempty"`
1248}
1249
1250// MarshalJSON is the custom marshaler for Connection.
1251func (c Connection) MarshalJSON() ([]byte, error) {
1252	objectMap := make(map[string]interface{})
1253	if c.ConnectionProperties != nil {
1254		objectMap["properties"] = c.ConnectionProperties
1255	}
1256	return json.Marshal(objectMap)
1257}
1258
1259// UnmarshalJSON is the custom unmarshaler for Connection struct.
1260func (c *Connection) UnmarshalJSON(body []byte) error {
1261	var m map[string]*json.RawMessage
1262	err := json.Unmarshal(body, &m)
1263	if err != nil {
1264		return err
1265	}
1266	for k, v := range m {
1267		switch k {
1268		case "properties":
1269			if v != nil {
1270				var connectionProperties ConnectionProperties
1271				err = json.Unmarshal(*v, &connectionProperties)
1272				if err != nil {
1273					return err
1274				}
1275				c.ConnectionProperties = &connectionProperties
1276			}
1277		case "id":
1278			if v != nil {
1279				var ID string
1280				err = json.Unmarshal(*v, &ID)
1281				if err != nil {
1282					return err
1283				}
1284				c.ID = &ID
1285			}
1286		case "name":
1287			if v != nil {
1288				var name string
1289				err = json.Unmarshal(*v, &name)
1290				if err != nil {
1291					return err
1292				}
1293				c.Name = &name
1294			}
1295		case "type":
1296			if v != nil {
1297				var typeVar string
1298				err = json.Unmarshal(*v, &typeVar)
1299				if err != nil {
1300					return err
1301				}
1302				c.Type = &typeVar
1303			}
1304		}
1305	}
1306
1307	return nil
1308}
1309
1310// ConnectionCreateOrUpdateParameters the parameters supplied to the create or update connection operation.
1311type ConnectionCreateOrUpdateParameters struct {
1312	// Name - Gets or sets the name of the connection.
1313	Name *string `json:"name,omitempty"`
1314	// ConnectionCreateOrUpdateProperties - Gets or sets the properties of the connection.
1315	*ConnectionCreateOrUpdateProperties `json:"properties,omitempty"`
1316}
1317
1318// MarshalJSON is the custom marshaler for ConnectionCreateOrUpdateParameters.
1319func (ccoup ConnectionCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
1320	objectMap := make(map[string]interface{})
1321	if ccoup.Name != nil {
1322		objectMap["name"] = ccoup.Name
1323	}
1324	if ccoup.ConnectionCreateOrUpdateProperties != nil {
1325		objectMap["properties"] = ccoup.ConnectionCreateOrUpdateProperties
1326	}
1327	return json.Marshal(objectMap)
1328}
1329
1330// UnmarshalJSON is the custom unmarshaler for ConnectionCreateOrUpdateParameters struct.
1331func (ccoup *ConnectionCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
1332	var m map[string]*json.RawMessage
1333	err := json.Unmarshal(body, &m)
1334	if err != nil {
1335		return err
1336	}
1337	for k, v := range m {
1338		switch k {
1339		case "name":
1340			if v != nil {
1341				var name string
1342				err = json.Unmarshal(*v, &name)
1343				if err != nil {
1344					return err
1345				}
1346				ccoup.Name = &name
1347			}
1348		case "properties":
1349			if v != nil {
1350				var connectionCreateOrUpdateProperties ConnectionCreateOrUpdateProperties
1351				err = json.Unmarshal(*v, &connectionCreateOrUpdateProperties)
1352				if err != nil {
1353					return err
1354				}
1355				ccoup.ConnectionCreateOrUpdateProperties = &connectionCreateOrUpdateProperties
1356			}
1357		}
1358	}
1359
1360	return nil
1361}
1362
1363// ConnectionCreateOrUpdateProperties the properties of the create connection properties
1364type ConnectionCreateOrUpdateProperties struct {
1365	// Description - Gets or sets the description of the connection.
1366	Description *string `json:"description,omitempty"`
1367	// ConnectionType - Gets or sets the connectionType of the connection.
1368	ConnectionType *ConnectionTypeAssociationProperty `json:"connectionType,omitempty"`
1369	// FieldDefinitionValues - Gets or sets the field definition properties of the connection.
1370	FieldDefinitionValues map[string]*string `json:"fieldDefinitionValues"`
1371}
1372
1373// MarshalJSON is the custom marshaler for ConnectionCreateOrUpdateProperties.
1374func (ccoup ConnectionCreateOrUpdateProperties) MarshalJSON() ([]byte, error) {
1375	objectMap := make(map[string]interface{})
1376	if ccoup.Description != nil {
1377		objectMap["description"] = ccoup.Description
1378	}
1379	if ccoup.ConnectionType != nil {
1380		objectMap["connectionType"] = ccoup.ConnectionType
1381	}
1382	if ccoup.FieldDefinitionValues != nil {
1383		objectMap["fieldDefinitionValues"] = ccoup.FieldDefinitionValues
1384	}
1385	return json.Marshal(objectMap)
1386}
1387
1388// ConnectionListResult the response model for the list connection operation.
1389type ConnectionListResult struct {
1390	autorest.Response `json:"-"`
1391	// Value - Gets or sets a list of connection.
1392	Value *[]Connection `json:"value,omitempty"`
1393	// NextLink - Gets or sets the next link.
1394	NextLink *string `json:"nextLink,omitempty"`
1395}
1396
1397// ConnectionListResultIterator provides access to a complete listing of Connection values.
1398type ConnectionListResultIterator struct {
1399	i    int
1400	page ConnectionListResultPage
1401}
1402
1403// NextWithContext advances to the next value.  If there was an error making
1404// the request the iterator does not advance and the error is returned.
1405func (iter *ConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
1406	if tracing.IsEnabled() {
1407		ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionListResultIterator.NextWithContext")
1408		defer func() {
1409			sc := -1
1410			if iter.Response().Response.Response != nil {
1411				sc = iter.Response().Response.Response.StatusCode
1412			}
1413			tracing.EndSpan(ctx, sc, err)
1414		}()
1415	}
1416	iter.i++
1417	if iter.i < len(iter.page.Values()) {
1418		return nil
1419	}
1420	err = iter.page.NextWithContext(ctx)
1421	if err != nil {
1422		iter.i--
1423		return err
1424	}
1425	iter.i = 0
1426	return nil
1427}
1428
1429// Next advances to the next value.  If there was an error making
1430// the request the iterator does not advance and the error is returned.
1431// Deprecated: Use NextWithContext() instead.
1432func (iter *ConnectionListResultIterator) Next() error {
1433	return iter.NextWithContext(context.Background())
1434}
1435
1436// NotDone returns true if the enumeration should be started or is not yet complete.
1437func (iter ConnectionListResultIterator) NotDone() bool {
1438	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1439}
1440
1441// Response returns the raw server response from the last page request.
1442func (iter ConnectionListResultIterator) Response() ConnectionListResult {
1443	return iter.page.Response()
1444}
1445
1446// Value returns the current value or a zero-initialized value if the
1447// iterator has advanced beyond the end of the collection.
1448func (iter ConnectionListResultIterator) Value() Connection {
1449	if !iter.page.NotDone() {
1450		return Connection{}
1451	}
1452	return iter.page.Values()[iter.i]
1453}
1454
1455// Creates a new instance of the ConnectionListResultIterator type.
1456func NewConnectionListResultIterator(page ConnectionListResultPage) ConnectionListResultIterator {
1457	return ConnectionListResultIterator{page: page}
1458}
1459
1460// IsEmpty returns true if the ListResult contains no values.
1461func (clr ConnectionListResult) IsEmpty() bool {
1462	return clr.Value == nil || len(*clr.Value) == 0
1463}
1464
1465// hasNextLink returns true if the NextLink is not empty.
1466func (clr ConnectionListResult) hasNextLink() bool {
1467	return clr.NextLink != nil && len(*clr.NextLink) != 0
1468}
1469
1470// connectionListResultPreparer prepares a request to retrieve the next set of results.
1471// It returns nil if no more results exist.
1472func (clr ConnectionListResult) connectionListResultPreparer(ctx context.Context) (*http.Request, error) {
1473	if !clr.hasNextLink() {
1474		return nil, nil
1475	}
1476	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1477		autorest.AsJSON(),
1478		autorest.AsGet(),
1479		autorest.WithBaseURL(to.String(clr.NextLink)))
1480}
1481
1482// ConnectionListResultPage contains a page of Connection values.
1483type ConnectionListResultPage struct {
1484	fn  func(context.Context, ConnectionListResult) (ConnectionListResult, error)
1485	clr ConnectionListResult
1486}
1487
1488// NextWithContext advances to the next page of values.  If there was an error making
1489// the request the page does not advance and the error is returned.
1490func (page *ConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
1491	if tracing.IsEnabled() {
1492		ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionListResultPage.NextWithContext")
1493		defer func() {
1494			sc := -1
1495			if page.Response().Response.Response != nil {
1496				sc = page.Response().Response.Response.StatusCode
1497			}
1498			tracing.EndSpan(ctx, sc, err)
1499		}()
1500	}
1501	for {
1502		next, err := page.fn(ctx, page.clr)
1503		if err != nil {
1504			return err
1505		}
1506		page.clr = next
1507		if !next.hasNextLink() || !next.IsEmpty() {
1508			break
1509		}
1510	}
1511	return nil
1512}
1513
1514// Next advances to the next page of values.  If there was an error making
1515// the request the page does not advance and the error is returned.
1516// Deprecated: Use NextWithContext() instead.
1517func (page *ConnectionListResultPage) Next() error {
1518	return page.NextWithContext(context.Background())
1519}
1520
1521// NotDone returns true if the page enumeration should be started or is not yet complete.
1522func (page ConnectionListResultPage) NotDone() bool {
1523	return !page.clr.IsEmpty()
1524}
1525
1526// Response returns the raw server response from the last page request.
1527func (page ConnectionListResultPage) Response() ConnectionListResult {
1528	return page.clr
1529}
1530
1531// Values returns the slice of values for the current page or nil if there are no values.
1532func (page ConnectionListResultPage) Values() []Connection {
1533	if page.clr.IsEmpty() {
1534		return nil
1535	}
1536	return *page.clr.Value
1537}
1538
1539// Creates a new instance of the ConnectionListResultPage type.
1540func NewConnectionListResultPage(cur ConnectionListResult, getNextPage func(context.Context, ConnectionListResult) (ConnectionListResult, error)) ConnectionListResultPage {
1541	return ConnectionListResultPage{
1542		fn:  getNextPage,
1543		clr: cur,
1544	}
1545}
1546
1547// ConnectionProperties definition of the connection properties.
1548type ConnectionProperties struct {
1549	// ConnectionType - Gets or sets the connectionType of the connection.
1550	ConnectionType *ConnectionTypeAssociationProperty `json:"connectionType,omitempty"`
1551	// FieldDefinitionValues - READ-ONLY; Gets the field definition values of the connection.
1552	FieldDefinitionValues map[string]*string `json:"fieldDefinitionValues"`
1553	// CreationTime - READ-ONLY; Gets the creation time.
1554	CreationTime *date.Time `json:"creationTime,omitempty"`
1555	// LastModifiedTime - READ-ONLY; Gets the last modified time.
1556	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
1557	// Description - Gets or sets the description.
1558	Description *string `json:"description,omitempty"`
1559}
1560
1561// MarshalJSON is the custom marshaler for ConnectionProperties.
1562func (cp ConnectionProperties) MarshalJSON() ([]byte, error) {
1563	objectMap := make(map[string]interface{})
1564	if cp.ConnectionType != nil {
1565		objectMap["connectionType"] = cp.ConnectionType
1566	}
1567	if cp.Description != nil {
1568		objectMap["description"] = cp.Description
1569	}
1570	return json.Marshal(objectMap)
1571}
1572
1573// ConnectionType definition of the connection type.
1574type ConnectionType struct {
1575	autorest.Response `json:"-"`
1576	// ID - READ-ONLY; Gets the id of the resource.
1577	ID *string `json:"id,omitempty"`
1578	// Name - READ-ONLY; Gets the name of the connection type.
1579	Name *string `json:"name,omitempty"`
1580	// Type - READ-ONLY; Resource type
1581	Type *string `json:"type,omitempty"`
1582	// ConnectionTypeProperties - Gets or sets the properties of the connection type.
1583	*ConnectionTypeProperties `json:"properties,omitempty"`
1584}
1585
1586// MarshalJSON is the custom marshaler for ConnectionType.
1587func (ct ConnectionType) MarshalJSON() ([]byte, error) {
1588	objectMap := make(map[string]interface{})
1589	if ct.ConnectionTypeProperties != nil {
1590		objectMap["properties"] = ct.ConnectionTypeProperties
1591	}
1592	return json.Marshal(objectMap)
1593}
1594
1595// UnmarshalJSON is the custom unmarshaler for ConnectionType struct.
1596func (ct *ConnectionType) UnmarshalJSON(body []byte) error {
1597	var m map[string]*json.RawMessage
1598	err := json.Unmarshal(body, &m)
1599	if err != nil {
1600		return err
1601	}
1602	for k, v := range m {
1603		switch k {
1604		case "id":
1605			if v != nil {
1606				var ID string
1607				err = json.Unmarshal(*v, &ID)
1608				if err != nil {
1609					return err
1610				}
1611				ct.ID = &ID
1612			}
1613		case "name":
1614			if v != nil {
1615				var name string
1616				err = json.Unmarshal(*v, &name)
1617				if err != nil {
1618					return err
1619				}
1620				ct.Name = &name
1621			}
1622		case "type":
1623			if v != nil {
1624				var typeVar string
1625				err = json.Unmarshal(*v, &typeVar)
1626				if err != nil {
1627					return err
1628				}
1629				ct.Type = &typeVar
1630			}
1631		case "properties":
1632			if v != nil {
1633				var connectionTypeProperties ConnectionTypeProperties
1634				err = json.Unmarshal(*v, &connectionTypeProperties)
1635				if err != nil {
1636					return err
1637				}
1638				ct.ConnectionTypeProperties = &connectionTypeProperties
1639			}
1640		}
1641	}
1642
1643	return nil
1644}
1645
1646// ConnectionTypeAssociationProperty the connection type property associated with the entity.
1647type ConnectionTypeAssociationProperty struct {
1648	// Name - Gets or sets the name of the connection type.
1649	Name *string `json:"name,omitempty"`
1650}
1651
1652// ConnectionTypeCreateOrUpdateParameters the parameters supplied to the create or update connection type
1653// operation.
1654type ConnectionTypeCreateOrUpdateParameters struct {
1655	// Name - Gets or sets the name of the connection type.
1656	Name *string `json:"name,omitempty"`
1657	// ConnectionTypeCreateOrUpdateProperties - Gets or sets the value of the connection type.
1658	*ConnectionTypeCreateOrUpdateProperties `json:"properties,omitempty"`
1659}
1660
1661// MarshalJSON is the custom marshaler for ConnectionTypeCreateOrUpdateParameters.
1662func (ctcoup ConnectionTypeCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
1663	objectMap := make(map[string]interface{})
1664	if ctcoup.Name != nil {
1665		objectMap["name"] = ctcoup.Name
1666	}
1667	if ctcoup.ConnectionTypeCreateOrUpdateProperties != nil {
1668		objectMap["properties"] = ctcoup.ConnectionTypeCreateOrUpdateProperties
1669	}
1670	return json.Marshal(objectMap)
1671}
1672
1673// UnmarshalJSON is the custom unmarshaler for ConnectionTypeCreateOrUpdateParameters struct.
1674func (ctcoup *ConnectionTypeCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
1675	var m map[string]*json.RawMessage
1676	err := json.Unmarshal(body, &m)
1677	if err != nil {
1678		return err
1679	}
1680	for k, v := range m {
1681		switch k {
1682		case "name":
1683			if v != nil {
1684				var name string
1685				err = json.Unmarshal(*v, &name)
1686				if err != nil {
1687					return err
1688				}
1689				ctcoup.Name = &name
1690			}
1691		case "properties":
1692			if v != nil {
1693				var connectionTypeCreateOrUpdateProperties ConnectionTypeCreateOrUpdateProperties
1694				err = json.Unmarshal(*v, &connectionTypeCreateOrUpdateProperties)
1695				if err != nil {
1696					return err
1697				}
1698				ctcoup.ConnectionTypeCreateOrUpdateProperties = &connectionTypeCreateOrUpdateProperties
1699			}
1700		}
1701	}
1702
1703	return nil
1704}
1705
1706// ConnectionTypeCreateOrUpdateProperties the properties of the create connection type.
1707type ConnectionTypeCreateOrUpdateProperties struct {
1708	// IsGlobal - Gets or sets a Boolean value to indicate if the connection type is global.
1709	IsGlobal *bool `json:"isGlobal,omitempty"`
1710	// FieldDefinitions - Gets or sets the field definitions of the connection type.
1711	FieldDefinitions map[string]*FieldDefinition `json:"fieldDefinitions"`
1712}
1713
1714// MarshalJSON is the custom marshaler for ConnectionTypeCreateOrUpdateProperties.
1715func (ctcoup ConnectionTypeCreateOrUpdateProperties) MarshalJSON() ([]byte, error) {
1716	objectMap := make(map[string]interface{})
1717	if ctcoup.IsGlobal != nil {
1718		objectMap["isGlobal"] = ctcoup.IsGlobal
1719	}
1720	if ctcoup.FieldDefinitions != nil {
1721		objectMap["fieldDefinitions"] = ctcoup.FieldDefinitions
1722	}
1723	return json.Marshal(objectMap)
1724}
1725
1726// ConnectionTypeListResult the response model for the list connection type operation.
1727type ConnectionTypeListResult struct {
1728	autorest.Response `json:"-"`
1729	// Value - Gets or sets a list of connection types.
1730	Value *[]ConnectionType `json:"value,omitempty"`
1731	// NextLink - Gets or sets the next link.
1732	NextLink *string `json:"nextLink,omitempty"`
1733}
1734
1735// ConnectionTypeListResultIterator provides access to a complete listing of ConnectionType values.
1736type ConnectionTypeListResultIterator struct {
1737	i    int
1738	page ConnectionTypeListResultPage
1739}
1740
1741// NextWithContext advances to the next value.  If there was an error making
1742// the request the iterator does not advance and the error is returned.
1743func (iter *ConnectionTypeListResultIterator) NextWithContext(ctx context.Context) (err error) {
1744	if tracing.IsEnabled() {
1745		ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionTypeListResultIterator.NextWithContext")
1746		defer func() {
1747			sc := -1
1748			if iter.Response().Response.Response != nil {
1749				sc = iter.Response().Response.Response.StatusCode
1750			}
1751			tracing.EndSpan(ctx, sc, err)
1752		}()
1753	}
1754	iter.i++
1755	if iter.i < len(iter.page.Values()) {
1756		return nil
1757	}
1758	err = iter.page.NextWithContext(ctx)
1759	if err != nil {
1760		iter.i--
1761		return err
1762	}
1763	iter.i = 0
1764	return nil
1765}
1766
1767// Next advances to the next value.  If there was an error making
1768// the request the iterator does not advance and the error is returned.
1769// Deprecated: Use NextWithContext() instead.
1770func (iter *ConnectionTypeListResultIterator) Next() error {
1771	return iter.NextWithContext(context.Background())
1772}
1773
1774// NotDone returns true if the enumeration should be started or is not yet complete.
1775func (iter ConnectionTypeListResultIterator) NotDone() bool {
1776	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1777}
1778
1779// Response returns the raw server response from the last page request.
1780func (iter ConnectionTypeListResultIterator) Response() ConnectionTypeListResult {
1781	return iter.page.Response()
1782}
1783
1784// Value returns the current value or a zero-initialized value if the
1785// iterator has advanced beyond the end of the collection.
1786func (iter ConnectionTypeListResultIterator) Value() ConnectionType {
1787	if !iter.page.NotDone() {
1788		return ConnectionType{}
1789	}
1790	return iter.page.Values()[iter.i]
1791}
1792
1793// Creates a new instance of the ConnectionTypeListResultIterator type.
1794func NewConnectionTypeListResultIterator(page ConnectionTypeListResultPage) ConnectionTypeListResultIterator {
1795	return ConnectionTypeListResultIterator{page: page}
1796}
1797
1798// IsEmpty returns true if the ListResult contains no values.
1799func (ctlr ConnectionTypeListResult) IsEmpty() bool {
1800	return ctlr.Value == nil || len(*ctlr.Value) == 0
1801}
1802
1803// hasNextLink returns true if the NextLink is not empty.
1804func (ctlr ConnectionTypeListResult) hasNextLink() bool {
1805	return ctlr.NextLink != nil && len(*ctlr.NextLink) != 0
1806}
1807
1808// connectionTypeListResultPreparer prepares a request to retrieve the next set of results.
1809// It returns nil if no more results exist.
1810func (ctlr ConnectionTypeListResult) connectionTypeListResultPreparer(ctx context.Context) (*http.Request, error) {
1811	if !ctlr.hasNextLink() {
1812		return nil, nil
1813	}
1814	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1815		autorest.AsJSON(),
1816		autorest.AsGet(),
1817		autorest.WithBaseURL(to.String(ctlr.NextLink)))
1818}
1819
1820// ConnectionTypeListResultPage contains a page of ConnectionType values.
1821type ConnectionTypeListResultPage struct {
1822	fn   func(context.Context, ConnectionTypeListResult) (ConnectionTypeListResult, error)
1823	ctlr ConnectionTypeListResult
1824}
1825
1826// NextWithContext advances to the next page of values.  If there was an error making
1827// the request the page does not advance and the error is returned.
1828func (page *ConnectionTypeListResultPage) NextWithContext(ctx context.Context) (err error) {
1829	if tracing.IsEnabled() {
1830		ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionTypeListResultPage.NextWithContext")
1831		defer func() {
1832			sc := -1
1833			if page.Response().Response.Response != nil {
1834				sc = page.Response().Response.Response.StatusCode
1835			}
1836			tracing.EndSpan(ctx, sc, err)
1837		}()
1838	}
1839	for {
1840		next, err := page.fn(ctx, page.ctlr)
1841		if err != nil {
1842			return err
1843		}
1844		page.ctlr = next
1845		if !next.hasNextLink() || !next.IsEmpty() {
1846			break
1847		}
1848	}
1849	return nil
1850}
1851
1852// Next advances to the next page of values.  If there was an error making
1853// the request the page does not advance and the error is returned.
1854// Deprecated: Use NextWithContext() instead.
1855func (page *ConnectionTypeListResultPage) Next() error {
1856	return page.NextWithContext(context.Background())
1857}
1858
1859// NotDone returns true if the page enumeration should be started or is not yet complete.
1860func (page ConnectionTypeListResultPage) NotDone() bool {
1861	return !page.ctlr.IsEmpty()
1862}
1863
1864// Response returns the raw server response from the last page request.
1865func (page ConnectionTypeListResultPage) Response() ConnectionTypeListResult {
1866	return page.ctlr
1867}
1868
1869// Values returns the slice of values for the current page or nil if there are no values.
1870func (page ConnectionTypeListResultPage) Values() []ConnectionType {
1871	if page.ctlr.IsEmpty() {
1872		return nil
1873	}
1874	return *page.ctlr.Value
1875}
1876
1877// Creates a new instance of the ConnectionTypeListResultPage type.
1878func NewConnectionTypeListResultPage(cur ConnectionTypeListResult, getNextPage func(context.Context, ConnectionTypeListResult) (ConnectionTypeListResult, error)) ConnectionTypeListResultPage {
1879	return ConnectionTypeListResultPage{
1880		fn:   getNextPage,
1881		ctlr: cur,
1882	}
1883}
1884
1885// ConnectionTypeProperties properties of the connection type.
1886type ConnectionTypeProperties struct {
1887	// IsGlobal - Gets or sets a Boolean value to indicate if the connection type is global.
1888	IsGlobal *bool `json:"isGlobal,omitempty"`
1889	// FieldDefinitions - READ-ONLY; Gets the field definitions of the connection type.
1890	FieldDefinitions map[string]*FieldDefinition `json:"fieldDefinitions"`
1891	// CreationTime - READ-ONLY; Gets the creation time.
1892	CreationTime *date.Time `json:"creationTime,omitempty"`
1893	// LastModifiedTime - Gets or sets the last modified time.
1894	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
1895	// Description - Gets or sets the description.
1896	Description *string `json:"description,omitempty"`
1897}
1898
1899// MarshalJSON is the custom marshaler for ConnectionTypeProperties.
1900func (ctp ConnectionTypeProperties) MarshalJSON() ([]byte, error) {
1901	objectMap := make(map[string]interface{})
1902	if ctp.IsGlobal != nil {
1903		objectMap["isGlobal"] = ctp.IsGlobal
1904	}
1905	if ctp.LastModifiedTime != nil {
1906		objectMap["lastModifiedTime"] = ctp.LastModifiedTime
1907	}
1908	if ctp.Description != nil {
1909		objectMap["description"] = ctp.Description
1910	}
1911	return json.Marshal(objectMap)
1912}
1913
1914// ConnectionUpdateParameters the parameters supplied to the update connection operation.
1915type ConnectionUpdateParameters struct {
1916	// Name - Gets or sets the name of the connection.
1917	Name *string `json:"name,omitempty"`
1918	// ConnectionUpdateProperties - Gets or sets the properties of the connection.
1919	*ConnectionUpdateProperties `json:"properties,omitempty"`
1920}
1921
1922// MarshalJSON is the custom marshaler for ConnectionUpdateParameters.
1923func (cup ConnectionUpdateParameters) MarshalJSON() ([]byte, error) {
1924	objectMap := make(map[string]interface{})
1925	if cup.Name != nil {
1926		objectMap["name"] = cup.Name
1927	}
1928	if cup.ConnectionUpdateProperties != nil {
1929		objectMap["properties"] = cup.ConnectionUpdateProperties
1930	}
1931	return json.Marshal(objectMap)
1932}
1933
1934// UnmarshalJSON is the custom unmarshaler for ConnectionUpdateParameters struct.
1935func (cup *ConnectionUpdateParameters) UnmarshalJSON(body []byte) error {
1936	var m map[string]*json.RawMessage
1937	err := json.Unmarshal(body, &m)
1938	if err != nil {
1939		return err
1940	}
1941	for k, v := range m {
1942		switch k {
1943		case "name":
1944			if v != nil {
1945				var name string
1946				err = json.Unmarshal(*v, &name)
1947				if err != nil {
1948					return err
1949				}
1950				cup.Name = &name
1951			}
1952		case "properties":
1953			if v != nil {
1954				var connectionUpdateProperties ConnectionUpdateProperties
1955				err = json.Unmarshal(*v, &connectionUpdateProperties)
1956				if err != nil {
1957					return err
1958				}
1959				cup.ConnectionUpdateProperties = &connectionUpdateProperties
1960			}
1961		}
1962	}
1963
1964	return nil
1965}
1966
1967// ConnectionUpdateProperties the properties of the update connection operation.
1968type ConnectionUpdateProperties struct {
1969	// Description - Gets or sets the description of the connection.
1970	Description *string `json:"description,omitempty"`
1971	// FieldDefinitionValues - Gets or sets the field definition values of the connection.
1972	FieldDefinitionValues map[string]*string `json:"fieldDefinitionValues"`
1973}
1974
1975// MarshalJSON is the custom marshaler for ConnectionUpdateProperties.
1976func (cup ConnectionUpdateProperties) MarshalJSON() ([]byte, error) {
1977	objectMap := make(map[string]interface{})
1978	if cup.Description != nil {
1979		objectMap["description"] = cup.Description
1980	}
1981	if cup.FieldDefinitionValues != nil {
1982		objectMap["fieldDefinitionValues"] = cup.FieldDefinitionValues
1983	}
1984	return json.Marshal(objectMap)
1985}
1986
1987// ContentHash definition of the runbook property type.
1988type ContentHash struct {
1989	// Algorithm - Gets or sets the content hash algorithm used to hash the content.
1990	Algorithm *string `json:"algorithm,omitempty"`
1991	// Value - Gets or sets expected hash value of the content.
1992	Value *string `json:"value,omitempty"`
1993}
1994
1995// ContentLink definition of the content link.
1996type ContentLink struct {
1997	// URI - Gets or sets the uri of the runbook content.
1998	URI *string `json:"uri,omitempty"`
1999	// ContentHash - Gets or sets the hash.
2000	ContentHash *ContentHash `json:"contentHash,omitempty"`
2001	// Version - Gets or sets the version of the content.
2002	Version *string `json:"version,omitempty"`
2003}
2004
2005// ContentSource definition of the content source.
2006type ContentSource struct {
2007	// Hash - Gets or sets the hash.
2008	Hash *ContentHash `json:"hash,omitempty"`
2009	// Type - Gets or sets the content source type. Possible values include: 'EmbeddedContent', 'URI'
2010	Type ContentSourceType `json:"type,omitempty"`
2011	// Value - Gets or sets the value of the content. This is based on the content source type.
2012	Value *string `json:"value,omitempty"`
2013	// Version - Gets or sets the version of the content.
2014	Version *string `json:"version,omitempty"`
2015}
2016
2017// Credential definition of the credential.
2018type Credential struct {
2019	autorest.Response `json:"-"`
2020	// CredentialProperties - Gets or sets the properties of the credential.
2021	*CredentialProperties `json:"properties,omitempty"`
2022	// ID - READ-ONLY; Fully qualified resource Id for the resource
2023	ID *string `json:"id,omitempty"`
2024	// Name - READ-ONLY; The name of the resource
2025	Name *string `json:"name,omitempty"`
2026	// Type - READ-ONLY; The type of the resource.
2027	Type *string `json:"type,omitempty"`
2028}
2029
2030// MarshalJSON is the custom marshaler for Credential.
2031func (c Credential) MarshalJSON() ([]byte, error) {
2032	objectMap := make(map[string]interface{})
2033	if c.CredentialProperties != nil {
2034		objectMap["properties"] = c.CredentialProperties
2035	}
2036	return json.Marshal(objectMap)
2037}
2038
2039// UnmarshalJSON is the custom unmarshaler for Credential struct.
2040func (c *Credential) UnmarshalJSON(body []byte) error {
2041	var m map[string]*json.RawMessage
2042	err := json.Unmarshal(body, &m)
2043	if err != nil {
2044		return err
2045	}
2046	for k, v := range m {
2047		switch k {
2048		case "properties":
2049			if v != nil {
2050				var credentialProperties CredentialProperties
2051				err = json.Unmarshal(*v, &credentialProperties)
2052				if err != nil {
2053					return err
2054				}
2055				c.CredentialProperties = &credentialProperties
2056			}
2057		case "id":
2058			if v != nil {
2059				var ID string
2060				err = json.Unmarshal(*v, &ID)
2061				if err != nil {
2062					return err
2063				}
2064				c.ID = &ID
2065			}
2066		case "name":
2067			if v != nil {
2068				var name string
2069				err = json.Unmarshal(*v, &name)
2070				if err != nil {
2071					return err
2072				}
2073				c.Name = &name
2074			}
2075		case "type":
2076			if v != nil {
2077				var typeVar string
2078				err = json.Unmarshal(*v, &typeVar)
2079				if err != nil {
2080					return err
2081				}
2082				c.Type = &typeVar
2083			}
2084		}
2085	}
2086
2087	return nil
2088}
2089
2090// CredentialCreateOrUpdateParameters the parameters supplied to the create or update credential operation.
2091type CredentialCreateOrUpdateParameters struct {
2092	// Name - Gets or sets the name of the credential.
2093	Name *string `json:"name,omitempty"`
2094	// CredentialCreateOrUpdateProperties - Gets or sets the properties of the credential.
2095	*CredentialCreateOrUpdateProperties `json:"properties,omitempty"`
2096}
2097
2098// MarshalJSON is the custom marshaler for CredentialCreateOrUpdateParameters.
2099func (ccoup CredentialCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
2100	objectMap := make(map[string]interface{})
2101	if ccoup.Name != nil {
2102		objectMap["name"] = ccoup.Name
2103	}
2104	if ccoup.CredentialCreateOrUpdateProperties != nil {
2105		objectMap["properties"] = ccoup.CredentialCreateOrUpdateProperties
2106	}
2107	return json.Marshal(objectMap)
2108}
2109
2110// UnmarshalJSON is the custom unmarshaler for CredentialCreateOrUpdateParameters struct.
2111func (ccoup *CredentialCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
2112	var m map[string]*json.RawMessage
2113	err := json.Unmarshal(body, &m)
2114	if err != nil {
2115		return err
2116	}
2117	for k, v := range m {
2118		switch k {
2119		case "name":
2120			if v != nil {
2121				var name string
2122				err = json.Unmarshal(*v, &name)
2123				if err != nil {
2124					return err
2125				}
2126				ccoup.Name = &name
2127			}
2128		case "properties":
2129			if v != nil {
2130				var credentialCreateOrUpdateProperties CredentialCreateOrUpdateProperties
2131				err = json.Unmarshal(*v, &credentialCreateOrUpdateProperties)
2132				if err != nil {
2133					return err
2134				}
2135				ccoup.CredentialCreateOrUpdateProperties = &credentialCreateOrUpdateProperties
2136			}
2137		}
2138	}
2139
2140	return nil
2141}
2142
2143// CredentialCreateOrUpdateProperties the properties of the create credential operation.
2144type CredentialCreateOrUpdateProperties struct {
2145	// UserName - Gets or sets the user name of the credential.
2146	UserName *string `json:"userName,omitempty"`
2147	// Password - Gets or sets the password of the credential.
2148	Password *string `json:"password,omitempty"`
2149	// Description - Gets or sets the description of the credential.
2150	Description *string `json:"description,omitempty"`
2151}
2152
2153// CredentialListResult the response model for the list credential operation.
2154type CredentialListResult struct {
2155	autorest.Response `json:"-"`
2156	// Value - Gets or sets a list of credentials.
2157	Value *[]Credential `json:"value,omitempty"`
2158	// NextLink - Gets or sets the next link.
2159	NextLink *string `json:"nextLink,omitempty"`
2160}
2161
2162// CredentialListResultIterator provides access to a complete listing of Credential values.
2163type CredentialListResultIterator struct {
2164	i    int
2165	page CredentialListResultPage
2166}
2167
2168// NextWithContext advances to the next value.  If there was an error making
2169// the request the iterator does not advance and the error is returned.
2170func (iter *CredentialListResultIterator) NextWithContext(ctx context.Context) (err error) {
2171	if tracing.IsEnabled() {
2172		ctx = tracing.StartSpan(ctx, fqdn+"/CredentialListResultIterator.NextWithContext")
2173		defer func() {
2174			sc := -1
2175			if iter.Response().Response.Response != nil {
2176				sc = iter.Response().Response.Response.StatusCode
2177			}
2178			tracing.EndSpan(ctx, sc, err)
2179		}()
2180	}
2181	iter.i++
2182	if iter.i < len(iter.page.Values()) {
2183		return nil
2184	}
2185	err = iter.page.NextWithContext(ctx)
2186	if err != nil {
2187		iter.i--
2188		return err
2189	}
2190	iter.i = 0
2191	return nil
2192}
2193
2194// Next advances to the next value.  If there was an error making
2195// the request the iterator does not advance and the error is returned.
2196// Deprecated: Use NextWithContext() instead.
2197func (iter *CredentialListResultIterator) Next() error {
2198	return iter.NextWithContext(context.Background())
2199}
2200
2201// NotDone returns true if the enumeration should be started or is not yet complete.
2202func (iter CredentialListResultIterator) NotDone() bool {
2203	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2204}
2205
2206// Response returns the raw server response from the last page request.
2207func (iter CredentialListResultIterator) Response() CredentialListResult {
2208	return iter.page.Response()
2209}
2210
2211// Value returns the current value or a zero-initialized value if the
2212// iterator has advanced beyond the end of the collection.
2213func (iter CredentialListResultIterator) Value() Credential {
2214	if !iter.page.NotDone() {
2215		return Credential{}
2216	}
2217	return iter.page.Values()[iter.i]
2218}
2219
2220// Creates a new instance of the CredentialListResultIterator type.
2221func NewCredentialListResultIterator(page CredentialListResultPage) CredentialListResultIterator {
2222	return CredentialListResultIterator{page: page}
2223}
2224
2225// IsEmpty returns true if the ListResult contains no values.
2226func (clr CredentialListResult) IsEmpty() bool {
2227	return clr.Value == nil || len(*clr.Value) == 0
2228}
2229
2230// hasNextLink returns true if the NextLink is not empty.
2231func (clr CredentialListResult) hasNextLink() bool {
2232	return clr.NextLink != nil && len(*clr.NextLink) != 0
2233}
2234
2235// credentialListResultPreparer prepares a request to retrieve the next set of results.
2236// It returns nil if no more results exist.
2237func (clr CredentialListResult) credentialListResultPreparer(ctx context.Context) (*http.Request, error) {
2238	if !clr.hasNextLink() {
2239		return nil, nil
2240	}
2241	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2242		autorest.AsJSON(),
2243		autorest.AsGet(),
2244		autorest.WithBaseURL(to.String(clr.NextLink)))
2245}
2246
2247// CredentialListResultPage contains a page of Credential values.
2248type CredentialListResultPage struct {
2249	fn  func(context.Context, CredentialListResult) (CredentialListResult, error)
2250	clr CredentialListResult
2251}
2252
2253// NextWithContext advances to the next page of values.  If there was an error making
2254// the request the page does not advance and the error is returned.
2255func (page *CredentialListResultPage) NextWithContext(ctx context.Context) (err error) {
2256	if tracing.IsEnabled() {
2257		ctx = tracing.StartSpan(ctx, fqdn+"/CredentialListResultPage.NextWithContext")
2258		defer func() {
2259			sc := -1
2260			if page.Response().Response.Response != nil {
2261				sc = page.Response().Response.Response.StatusCode
2262			}
2263			tracing.EndSpan(ctx, sc, err)
2264		}()
2265	}
2266	for {
2267		next, err := page.fn(ctx, page.clr)
2268		if err != nil {
2269			return err
2270		}
2271		page.clr = next
2272		if !next.hasNextLink() || !next.IsEmpty() {
2273			break
2274		}
2275	}
2276	return nil
2277}
2278
2279// Next advances to the next page of values.  If there was an error making
2280// the request the page does not advance and the error is returned.
2281// Deprecated: Use NextWithContext() instead.
2282func (page *CredentialListResultPage) Next() error {
2283	return page.NextWithContext(context.Background())
2284}
2285
2286// NotDone returns true if the page enumeration should be started or is not yet complete.
2287func (page CredentialListResultPage) NotDone() bool {
2288	return !page.clr.IsEmpty()
2289}
2290
2291// Response returns the raw server response from the last page request.
2292func (page CredentialListResultPage) Response() CredentialListResult {
2293	return page.clr
2294}
2295
2296// Values returns the slice of values for the current page or nil if there are no values.
2297func (page CredentialListResultPage) Values() []Credential {
2298	if page.clr.IsEmpty() {
2299		return nil
2300	}
2301	return *page.clr.Value
2302}
2303
2304// Creates a new instance of the CredentialListResultPage type.
2305func NewCredentialListResultPage(cur CredentialListResult, getNextPage func(context.Context, CredentialListResult) (CredentialListResult, error)) CredentialListResultPage {
2306	return CredentialListResultPage{
2307		fn:  getNextPage,
2308		clr: cur,
2309	}
2310}
2311
2312// CredentialProperties definition of the credential properties
2313type CredentialProperties struct {
2314	// UserName - READ-ONLY; Gets the user name of the credential.
2315	UserName *string `json:"userName,omitempty"`
2316	// CreationTime - READ-ONLY; Gets the creation time.
2317	CreationTime *date.Time `json:"creationTime,omitempty"`
2318	// LastModifiedTime - READ-ONLY; Gets the last modified time.
2319	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
2320	// Description - Gets or sets the description.
2321	Description *string `json:"description,omitempty"`
2322}
2323
2324// MarshalJSON is the custom marshaler for CredentialProperties.
2325func (cp CredentialProperties) MarshalJSON() ([]byte, error) {
2326	objectMap := make(map[string]interface{})
2327	if cp.Description != nil {
2328		objectMap["description"] = cp.Description
2329	}
2330	return json.Marshal(objectMap)
2331}
2332
2333// CredentialUpdateParameters the parameters supplied to the Update credential operation.
2334type CredentialUpdateParameters struct {
2335	// Name - Gets or sets the name of the credential.
2336	Name *string `json:"name,omitempty"`
2337	// CredentialUpdateProperties - Gets or sets the properties of the variable.
2338	*CredentialUpdateProperties `json:"properties,omitempty"`
2339}
2340
2341// MarshalJSON is the custom marshaler for CredentialUpdateParameters.
2342func (cup CredentialUpdateParameters) MarshalJSON() ([]byte, error) {
2343	objectMap := make(map[string]interface{})
2344	if cup.Name != nil {
2345		objectMap["name"] = cup.Name
2346	}
2347	if cup.CredentialUpdateProperties != nil {
2348		objectMap["properties"] = cup.CredentialUpdateProperties
2349	}
2350	return json.Marshal(objectMap)
2351}
2352
2353// UnmarshalJSON is the custom unmarshaler for CredentialUpdateParameters struct.
2354func (cup *CredentialUpdateParameters) UnmarshalJSON(body []byte) error {
2355	var m map[string]*json.RawMessage
2356	err := json.Unmarshal(body, &m)
2357	if err != nil {
2358		return err
2359	}
2360	for k, v := range m {
2361		switch k {
2362		case "name":
2363			if v != nil {
2364				var name string
2365				err = json.Unmarshal(*v, &name)
2366				if err != nil {
2367					return err
2368				}
2369				cup.Name = &name
2370			}
2371		case "properties":
2372			if v != nil {
2373				var credentialUpdateProperties CredentialUpdateProperties
2374				err = json.Unmarshal(*v, &credentialUpdateProperties)
2375				if err != nil {
2376					return err
2377				}
2378				cup.CredentialUpdateProperties = &credentialUpdateProperties
2379			}
2380		}
2381	}
2382
2383	return nil
2384}
2385
2386// CredentialUpdateProperties the properties of the Update credential
2387type CredentialUpdateProperties struct {
2388	// UserName - Gets or sets the user name of the credential.
2389	UserName *string `json:"userName,omitempty"`
2390	// Password - Gets or sets the password of the credential.
2391	Password *string `json:"password,omitempty"`
2392	// Description - Gets or sets the description of the credential.
2393	Description *string `json:"description,omitempty"`
2394}
2395
2396// DscCompilationJob definition of the Dsc Compilation job.
2397type DscCompilationJob struct {
2398	autorest.Response `json:"-"`
2399	// DscCompilationJobProperties - Gets or sets the properties of the Dsc Compilation job.
2400	*DscCompilationJobProperties `json:"properties,omitempty"`
2401	// ID - READ-ONLY; Fully qualified resource Id for the resource
2402	ID *string `json:"id,omitempty"`
2403	// Name - READ-ONLY; The name of the resource
2404	Name *string `json:"name,omitempty"`
2405	// Type - READ-ONLY; The type of the resource.
2406	Type *string `json:"type,omitempty"`
2407}
2408
2409// MarshalJSON is the custom marshaler for DscCompilationJob.
2410func (dcj DscCompilationJob) MarshalJSON() ([]byte, error) {
2411	objectMap := make(map[string]interface{})
2412	if dcj.DscCompilationJobProperties != nil {
2413		objectMap["properties"] = dcj.DscCompilationJobProperties
2414	}
2415	return json.Marshal(objectMap)
2416}
2417
2418// UnmarshalJSON is the custom unmarshaler for DscCompilationJob struct.
2419func (dcj *DscCompilationJob) UnmarshalJSON(body []byte) error {
2420	var m map[string]*json.RawMessage
2421	err := json.Unmarshal(body, &m)
2422	if err != nil {
2423		return err
2424	}
2425	for k, v := range m {
2426		switch k {
2427		case "properties":
2428			if v != nil {
2429				var dscCompilationJobProperties DscCompilationJobProperties
2430				err = json.Unmarshal(*v, &dscCompilationJobProperties)
2431				if err != nil {
2432					return err
2433				}
2434				dcj.DscCompilationJobProperties = &dscCompilationJobProperties
2435			}
2436		case "id":
2437			if v != nil {
2438				var ID string
2439				err = json.Unmarshal(*v, &ID)
2440				if err != nil {
2441					return err
2442				}
2443				dcj.ID = &ID
2444			}
2445		case "name":
2446			if v != nil {
2447				var name string
2448				err = json.Unmarshal(*v, &name)
2449				if err != nil {
2450					return err
2451				}
2452				dcj.Name = &name
2453			}
2454		case "type":
2455			if v != nil {
2456				var typeVar string
2457				err = json.Unmarshal(*v, &typeVar)
2458				if err != nil {
2459					return err
2460				}
2461				dcj.Type = &typeVar
2462			}
2463		}
2464	}
2465
2466	return nil
2467}
2468
2469// DscCompilationJobCreateFuture an abstraction for monitoring and retrieving the results of a long-running
2470// operation.
2471type DscCompilationJobCreateFuture struct {
2472	azure.FutureAPI
2473	// Result returns the result of the asynchronous operation.
2474	// If the operation has not completed it will return an error.
2475	Result func(DscCompilationJobClient) (DscCompilationJob, error)
2476}
2477
2478// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2479func (future *DscCompilationJobCreateFuture) UnmarshalJSON(body []byte) error {
2480	var azFuture azure.Future
2481	if err := json.Unmarshal(body, &azFuture); err != nil {
2482		return err
2483	}
2484	future.FutureAPI = &azFuture
2485	future.Result = future.result
2486	return nil
2487}
2488
2489// result is the default implementation for DscCompilationJobCreateFuture.Result.
2490func (future *DscCompilationJobCreateFuture) result(client DscCompilationJobClient) (dcj DscCompilationJob, err error) {
2491	var done bool
2492	done, err = future.DoneWithContext(context.Background(), client)
2493	if err != nil {
2494		err = autorest.NewErrorWithError(err, "automation.DscCompilationJobCreateFuture", "Result", future.Response(), "Polling failure")
2495		return
2496	}
2497	if !done {
2498		dcj.Response.Response = future.Response()
2499		err = azure.NewAsyncOpIncompleteError("automation.DscCompilationJobCreateFuture")
2500		return
2501	}
2502	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2503	if dcj.Response.Response, err = future.GetResult(sender); err == nil && dcj.Response.Response.StatusCode != http.StatusNoContent {
2504		dcj, err = client.CreateResponder(dcj.Response.Response)
2505		if err != nil {
2506			err = autorest.NewErrorWithError(err, "automation.DscCompilationJobCreateFuture", "Result", dcj.Response.Response, "Failure responding to request")
2507		}
2508	}
2509	return
2510}
2511
2512// DscCompilationJobCreateParameters the parameters supplied to the create compilation job operation.
2513type DscCompilationJobCreateParameters struct {
2514	// DscCompilationJobCreateProperties - Gets or sets the list of compilation job properties.
2515	*DscCompilationJobCreateProperties `json:"properties,omitempty"`
2516	// Name - Gets or sets name of the resource.
2517	Name *string `json:"name,omitempty"`
2518	// Location - Gets or sets the location of the resource.
2519	Location *string `json:"location,omitempty"`
2520	// Tags - Gets or sets the tags attached to the resource.
2521	Tags map[string]*string `json:"tags"`
2522}
2523
2524// MarshalJSON is the custom marshaler for DscCompilationJobCreateParameters.
2525func (dcjcp DscCompilationJobCreateParameters) MarshalJSON() ([]byte, error) {
2526	objectMap := make(map[string]interface{})
2527	if dcjcp.DscCompilationJobCreateProperties != nil {
2528		objectMap["properties"] = dcjcp.DscCompilationJobCreateProperties
2529	}
2530	if dcjcp.Name != nil {
2531		objectMap["name"] = dcjcp.Name
2532	}
2533	if dcjcp.Location != nil {
2534		objectMap["location"] = dcjcp.Location
2535	}
2536	if dcjcp.Tags != nil {
2537		objectMap["tags"] = dcjcp.Tags
2538	}
2539	return json.Marshal(objectMap)
2540}
2541
2542// UnmarshalJSON is the custom unmarshaler for DscCompilationJobCreateParameters struct.
2543func (dcjcp *DscCompilationJobCreateParameters) UnmarshalJSON(body []byte) error {
2544	var m map[string]*json.RawMessage
2545	err := json.Unmarshal(body, &m)
2546	if err != nil {
2547		return err
2548	}
2549	for k, v := range m {
2550		switch k {
2551		case "properties":
2552			if v != nil {
2553				var dscCompilationJobCreateProperties DscCompilationJobCreateProperties
2554				err = json.Unmarshal(*v, &dscCompilationJobCreateProperties)
2555				if err != nil {
2556					return err
2557				}
2558				dcjcp.DscCompilationJobCreateProperties = &dscCompilationJobCreateProperties
2559			}
2560		case "name":
2561			if v != nil {
2562				var name string
2563				err = json.Unmarshal(*v, &name)
2564				if err != nil {
2565					return err
2566				}
2567				dcjcp.Name = &name
2568			}
2569		case "location":
2570			if v != nil {
2571				var location string
2572				err = json.Unmarshal(*v, &location)
2573				if err != nil {
2574					return err
2575				}
2576				dcjcp.Location = &location
2577			}
2578		case "tags":
2579			if v != nil {
2580				var tags map[string]*string
2581				err = json.Unmarshal(*v, &tags)
2582				if err != nil {
2583					return err
2584				}
2585				dcjcp.Tags = tags
2586			}
2587		}
2588	}
2589
2590	return nil
2591}
2592
2593// DscCompilationJobCreateProperties the parameters supplied to the create compilation job operation.
2594type DscCompilationJobCreateProperties struct {
2595	// Configuration - Gets or sets the configuration.
2596	Configuration *DscConfigurationAssociationProperty `json:"configuration,omitempty"`
2597	// Parameters - Gets or sets the parameters of the job.
2598	Parameters map[string]*string `json:"parameters"`
2599	// IncrementNodeConfigurationBuild - If a new build version of NodeConfiguration is required.
2600	IncrementNodeConfigurationBuild *bool `json:"incrementNodeConfigurationBuild,omitempty"`
2601}
2602
2603// MarshalJSON is the custom marshaler for DscCompilationJobCreateProperties.
2604func (dcjcp DscCompilationJobCreateProperties) MarshalJSON() ([]byte, error) {
2605	objectMap := make(map[string]interface{})
2606	if dcjcp.Configuration != nil {
2607		objectMap["configuration"] = dcjcp.Configuration
2608	}
2609	if dcjcp.Parameters != nil {
2610		objectMap["parameters"] = dcjcp.Parameters
2611	}
2612	if dcjcp.IncrementNodeConfigurationBuild != nil {
2613		objectMap["incrementNodeConfigurationBuild"] = dcjcp.IncrementNodeConfigurationBuild
2614	}
2615	return json.Marshal(objectMap)
2616}
2617
2618// DscCompilationJobListResult the response model for the list job operation.
2619type DscCompilationJobListResult struct {
2620	autorest.Response `json:"-"`
2621	// Value - Gets or sets a list of Dsc Compilation jobs.
2622	Value *[]DscCompilationJob `json:"value,omitempty"`
2623	// NextLink - Gets or sets the next link.
2624	NextLink *string `json:"nextLink,omitempty"`
2625}
2626
2627// DscCompilationJobListResultIterator provides access to a complete listing of DscCompilationJob values.
2628type DscCompilationJobListResultIterator struct {
2629	i    int
2630	page DscCompilationJobListResultPage
2631}
2632
2633// NextWithContext advances to the next value.  If there was an error making
2634// the request the iterator does not advance and the error is returned.
2635func (iter *DscCompilationJobListResultIterator) NextWithContext(ctx context.Context) (err error) {
2636	if tracing.IsEnabled() {
2637		ctx = tracing.StartSpan(ctx, fqdn+"/DscCompilationJobListResultIterator.NextWithContext")
2638		defer func() {
2639			sc := -1
2640			if iter.Response().Response.Response != nil {
2641				sc = iter.Response().Response.Response.StatusCode
2642			}
2643			tracing.EndSpan(ctx, sc, err)
2644		}()
2645	}
2646	iter.i++
2647	if iter.i < len(iter.page.Values()) {
2648		return nil
2649	}
2650	err = iter.page.NextWithContext(ctx)
2651	if err != nil {
2652		iter.i--
2653		return err
2654	}
2655	iter.i = 0
2656	return nil
2657}
2658
2659// Next advances to the next value.  If there was an error making
2660// the request the iterator does not advance and the error is returned.
2661// Deprecated: Use NextWithContext() instead.
2662func (iter *DscCompilationJobListResultIterator) Next() error {
2663	return iter.NextWithContext(context.Background())
2664}
2665
2666// NotDone returns true if the enumeration should be started or is not yet complete.
2667func (iter DscCompilationJobListResultIterator) NotDone() bool {
2668	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2669}
2670
2671// Response returns the raw server response from the last page request.
2672func (iter DscCompilationJobListResultIterator) Response() DscCompilationJobListResult {
2673	return iter.page.Response()
2674}
2675
2676// Value returns the current value or a zero-initialized value if the
2677// iterator has advanced beyond the end of the collection.
2678func (iter DscCompilationJobListResultIterator) Value() DscCompilationJob {
2679	if !iter.page.NotDone() {
2680		return DscCompilationJob{}
2681	}
2682	return iter.page.Values()[iter.i]
2683}
2684
2685// Creates a new instance of the DscCompilationJobListResultIterator type.
2686func NewDscCompilationJobListResultIterator(page DscCompilationJobListResultPage) DscCompilationJobListResultIterator {
2687	return DscCompilationJobListResultIterator{page: page}
2688}
2689
2690// IsEmpty returns true if the ListResult contains no values.
2691func (dcjlr DscCompilationJobListResult) IsEmpty() bool {
2692	return dcjlr.Value == nil || len(*dcjlr.Value) == 0
2693}
2694
2695// hasNextLink returns true if the NextLink is not empty.
2696func (dcjlr DscCompilationJobListResult) hasNextLink() bool {
2697	return dcjlr.NextLink != nil && len(*dcjlr.NextLink) != 0
2698}
2699
2700// dscCompilationJobListResultPreparer prepares a request to retrieve the next set of results.
2701// It returns nil if no more results exist.
2702func (dcjlr DscCompilationJobListResult) dscCompilationJobListResultPreparer(ctx context.Context) (*http.Request, error) {
2703	if !dcjlr.hasNextLink() {
2704		return nil, nil
2705	}
2706	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2707		autorest.AsJSON(),
2708		autorest.AsGet(),
2709		autorest.WithBaseURL(to.String(dcjlr.NextLink)))
2710}
2711
2712// DscCompilationJobListResultPage contains a page of DscCompilationJob values.
2713type DscCompilationJobListResultPage struct {
2714	fn    func(context.Context, DscCompilationJobListResult) (DscCompilationJobListResult, error)
2715	dcjlr DscCompilationJobListResult
2716}
2717
2718// NextWithContext advances to the next page of values.  If there was an error making
2719// the request the page does not advance and the error is returned.
2720func (page *DscCompilationJobListResultPage) NextWithContext(ctx context.Context) (err error) {
2721	if tracing.IsEnabled() {
2722		ctx = tracing.StartSpan(ctx, fqdn+"/DscCompilationJobListResultPage.NextWithContext")
2723		defer func() {
2724			sc := -1
2725			if page.Response().Response.Response != nil {
2726				sc = page.Response().Response.Response.StatusCode
2727			}
2728			tracing.EndSpan(ctx, sc, err)
2729		}()
2730	}
2731	for {
2732		next, err := page.fn(ctx, page.dcjlr)
2733		if err != nil {
2734			return err
2735		}
2736		page.dcjlr = next
2737		if !next.hasNextLink() || !next.IsEmpty() {
2738			break
2739		}
2740	}
2741	return nil
2742}
2743
2744// Next advances to the next page of values.  If there was an error making
2745// the request the page does not advance and the error is returned.
2746// Deprecated: Use NextWithContext() instead.
2747func (page *DscCompilationJobListResultPage) Next() error {
2748	return page.NextWithContext(context.Background())
2749}
2750
2751// NotDone returns true if the page enumeration should be started or is not yet complete.
2752func (page DscCompilationJobListResultPage) NotDone() bool {
2753	return !page.dcjlr.IsEmpty()
2754}
2755
2756// Response returns the raw server response from the last page request.
2757func (page DscCompilationJobListResultPage) Response() DscCompilationJobListResult {
2758	return page.dcjlr
2759}
2760
2761// Values returns the slice of values for the current page or nil if there are no values.
2762func (page DscCompilationJobListResultPage) Values() []DscCompilationJob {
2763	if page.dcjlr.IsEmpty() {
2764		return nil
2765	}
2766	return *page.dcjlr.Value
2767}
2768
2769// Creates a new instance of the DscCompilationJobListResultPage type.
2770func NewDscCompilationJobListResultPage(cur DscCompilationJobListResult, getNextPage func(context.Context, DscCompilationJobListResult) (DscCompilationJobListResult, error)) DscCompilationJobListResultPage {
2771	return DscCompilationJobListResultPage{
2772		fn:    getNextPage,
2773		dcjlr: cur,
2774	}
2775}
2776
2777// DscCompilationJobProperties definition of Dsc Compilation job properties.
2778type DscCompilationJobProperties struct {
2779	// Configuration - Gets or sets the configuration.
2780	Configuration *DscConfigurationAssociationProperty `json:"configuration,omitempty"`
2781	// StartedBy - READ-ONLY; Gets the compilation job started by.
2782	StartedBy *string `json:"startedBy,omitempty"`
2783	// JobID - READ-ONLY; Gets the id of the job.
2784	JobID *uuid.UUID `json:"jobId,omitempty"`
2785	// CreationTime - READ-ONLY; Gets the creation time of the job.
2786	CreationTime *date.Time `json:"creationTime,omitempty"`
2787	// ProvisioningState - The current provisioning state of the job. Possible values include: 'JobProvisioningStateFailed', 'JobProvisioningStateSucceeded', 'JobProvisioningStateSuspended', 'JobProvisioningStateProcessing'
2788	ProvisioningState JobProvisioningState `json:"provisioningState,omitempty"`
2789	// RunOn - Gets or sets the runOn which specifies the group name where the job is to be executed.
2790	RunOn *string `json:"runOn,omitempty"`
2791	// Status - Gets or sets the status of the job. Possible values include: 'JobStatusNew', 'JobStatusActivating', 'JobStatusRunning', 'JobStatusCompleted', 'JobStatusFailed', 'JobStatusStopped', 'JobStatusBlocked', 'JobStatusSuspended', 'JobStatusDisconnected', 'JobStatusSuspending', 'JobStatusStopping', 'JobStatusResuming', 'JobStatusRemoving'
2792	Status JobStatus `json:"status,omitempty"`
2793	// StatusDetails - Gets or sets the status details of the job.
2794	StatusDetails *string `json:"statusDetails,omitempty"`
2795	// StartTime - READ-ONLY; Gets the start time of the job.
2796	StartTime *date.Time `json:"startTime,omitempty"`
2797	// EndTime - READ-ONLY; Gets the end time of the job.
2798	EndTime *date.Time `json:"endTime,omitempty"`
2799	// Exception - READ-ONLY; Gets the exception of the job.
2800	Exception *string `json:"exception,omitempty"`
2801	// LastModifiedTime - READ-ONLY; Gets the last modified time of the job.
2802	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
2803	// LastStatusModifiedTime - READ-ONLY; Gets the last status modified time of the job.
2804	LastStatusModifiedTime *date.Time `json:"lastStatusModifiedTime,omitempty"`
2805	// Parameters - Gets or sets the parameters of the job.
2806	Parameters map[string]*string `json:"parameters"`
2807}
2808
2809// MarshalJSON is the custom marshaler for DscCompilationJobProperties.
2810func (dcjp DscCompilationJobProperties) MarshalJSON() ([]byte, error) {
2811	objectMap := make(map[string]interface{})
2812	if dcjp.Configuration != nil {
2813		objectMap["configuration"] = dcjp.Configuration
2814	}
2815	if dcjp.ProvisioningState != "" {
2816		objectMap["provisioningState"] = dcjp.ProvisioningState
2817	}
2818	if dcjp.RunOn != nil {
2819		objectMap["runOn"] = dcjp.RunOn
2820	}
2821	if dcjp.Status != "" {
2822		objectMap["status"] = dcjp.Status
2823	}
2824	if dcjp.StatusDetails != nil {
2825		objectMap["statusDetails"] = dcjp.StatusDetails
2826	}
2827	if dcjp.Parameters != nil {
2828		objectMap["parameters"] = dcjp.Parameters
2829	}
2830	return json.Marshal(objectMap)
2831}
2832
2833// DscConfiguration definition of the configuration type.
2834type DscConfiguration struct {
2835	autorest.Response `json:"-"`
2836	// DscConfigurationProperties - Gets or sets the configuration properties.
2837	*DscConfigurationProperties `json:"properties,omitempty"`
2838	// Etag - Gets or sets the etag of the resource.
2839	Etag *string `json:"etag,omitempty"`
2840	// Tags - Resource tags.
2841	Tags map[string]*string `json:"tags"`
2842	// Location - The Azure Region where the resource lives
2843	Location *string `json:"location,omitempty"`
2844	// ID - READ-ONLY; Fully qualified resource Id for the resource
2845	ID *string `json:"id,omitempty"`
2846	// Name - READ-ONLY; The name of the resource
2847	Name *string `json:"name,omitempty"`
2848	// Type - READ-ONLY; The type of the resource.
2849	Type *string `json:"type,omitempty"`
2850}
2851
2852// MarshalJSON is the custom marshaler for DscConfiguration.
2853func (dc DscConfiguration) MarshalJSON() ([]byte, error) {
2854	objectMap := make(map[string]interface{})
2855	if dc.DscConfigurationProperties != nil {
2856		objectMap["properties"] = dc.DscConfigurationProperties
2857	}
2858	if dc.Etag != nil {
2859		objectMap["etag"] = dc.Etag
2860	}
2861	if dc.Tags != nil {
2862		objectMap["tags"] = dc.Tags
2863	}
2864	if dc.Location != nil {
2865		objectMap["location"] = dc.Location
2866	}
2867	return json.Marshal(objectMap)
2868}
2869
2870// UnmarshalJSON is the custom unmarshaler for DscConfiguration struct.
2871func (dc *DscConfiguration) UnmarshalJSON(body []byte) error {
2872	var m map[string]*json.RawMessage
2873	err := json.Unmarshal(body, &m)
2874	if err != nil {
2875		return err
2876	}
2877	for k, v := range m {
2878		switch k {
2879		case "properties":
2880			if v != nil {
2881				var dscConfigurationProperties DscConfigurationProperties
2882				err = json.Unmarshal(*v, &dscConfigurationProperties)
2883				if err != nil {
2884					return err
2885				}
2886				dc.DscConfigurationProperties = &dscConfigurationProperties
2887			}
2888		case "etag":
2889			if v != nil {
2890				var etag string
2891				err = json.Unmarshal(*v, &etag)
2892				if err != nil {
2893					return err
2894				}
2895				dc.Etag = &etag
2896			}
2897		case "tags":
2898			if v != nil {
2899				var tags map[string]*string
2900				err = json.Unmarshal(*v, &tags)
2901				if err != nil {
2902					return err
2903				}
2904				dc.Tags = tags
2905			}
2906		case "location":
2907			if v != nil {
2908				var location string
2909				err = json.Unmarshal(*v, &location)
2910				if err != nil {
2911					return err
2912				}
2913				dc.Location = &location
2914			}
2915		case "id":
2916			if v != nil {
2917				var ID string
2918				err = json.Unmarshal(*v, &ID)
2919				if err != nil {
2920					return err
2921				}
2922				dc.ID = &ID
2923			}
2924		case "name":
2925			if v != nil {
2926				var name string
2927				err = json.Unmarshal(*v, &name)
2928				if err != nil {
2929					return err
2930				}
2931				dc.Name = &name
2932			}
2933		case "type":
2934			if v != nil {
2935				var typeVar string
2936				err = json.Unmarshal(*v, &typeVar)
2937				if err != nil {
2938					return err
2939				}
2940				dc.Type = &typeVar
2941			}
2942		}
2943	}
2944
2945	return nil
2946}
2947
2948// DscConfigurationAssociationProperty the Dsc configuration property associated with the entity.
2949type DscConfigurationAssociationProperty struct {
2950	// Name - Gets or sets the name of the Dsc configuration.
2951	Name *string `json:"name,omitempty"`
2952}
2953
2954// DscConfigurationCreateOrUpdateParameters the parameters supplied to the create or update configuration
2955// operation.
2956type DscConfigurationCreateOrUpdateParameters struct {
2957	// DscConfigurationCreateOrUpdateProperties - Gets or sets configuration create or update properties.
2958	*DscConfigurationCreateOrUpdateProperties `json:"properties,omitempty"`
2959	// Name - Gets or sets name of the resource.
2960	Name *string `json:"name,omitempty"`
2961	// Location - Gets or sets the location of the resource.
2962	Location *string `json:"location,omitempty"`
2963	// Tags - Gets or sets the tags attached to the resource.
2964	Tags map[string]*string `json:"tags"`
2965}
2966
2967// MarshalJSON is the custom marshaler for DscConfigurationCreateOrUpdateParameters.
2968func (dccoup DscConfigurationCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
2969	objectMap := make(map[string]interface{})
2970	if dccoup.DscConfigurationCreateOrUpdateProperties != nil {
2971		objectMap["properties"] = dccoup.DscConfigurationCreateOrUpdateProperties
2972	}
2973	if dccoup.Name != nil {
2974		objectMap["name"] = dccoup.Name
2975	}
2976	if dccoup.Location != nil {
2977		objectMap["location"] = dccoup.Location
2978	}
2979	if dccoup.Tags != nil {
2980		objectMap["tags"] = dccoup.Tags
2981	}
2982	return json.Marshal(objectMap)
2983}
2984
2985// UnmarshalJSON is the custom unmarshaler for DscConfigurationCreateOrUpdateParameters struct.
2986func (dccoup *DscConfigurationCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
2987	var m map[string]*json.RawMessage
2988	err := json.Unmarshal(body, &m)
2989	if err != nil {
2990		return err
2991	}
2992	for k, v := range m {
2993		switch k {
2994		case "properties":
2995			if v != nil {
2996				var dscConfigurationCreateOrUpdateProperties DscConfigurationCreateOrUpdateProperties
2997				err = json.Unmarshal(*v, &dscConfigurationCreateOrUpdateProperties)
2998				if err != nil {
2999					return err
3000				}
3001				dccoup.DscConfigurationCreateOrUpdateProperties = &dscConfigurationCreateOrUpdateProperties
3002			}
3003		case "name":
3004			if v != nil {
3005				var name string
3006				err = json.Unmarshal(*v, &name)
3007				if err != nil {
3008					return err
3009				}
3010				dccoup.Name = &name
3011			}
3012		case "location":
3013			if v != nil {
3014				var location string
3015				err = json.Unmarshal(*v, &location)
3016				if err != nil {
3017					return err
3018				}
3019				dccoup.Location = &location
3020			}
3021		case "tags":
3022			if v != nil {
3023				var tags map[string]*string
3024				err = json.Unmarshal(*v, &tags)
3025				if err != nil {
3026					return err
3027				}
3028				dccoup.Tags = tags
3029			}
3030		}
3031	}
3032
3033	return nil
3034}
3035
3036// DscConfigurationCreateOrUpdateProperties the properties to create or update configuration.
3037type DscConfigurationCreateOrUpdateProperties struct {
3038	// LogVerbose - Gets or sets verbose log option.
3039	LogVerbose *bool `json:"logVerbose,omitempty"`
3040	// LogProgress - Gets or sets progress log option.
3041	LogProgress *bool `json:"logProgress,omitempty"`
3042	// Source - Gets or sets the source.
3043	Source *ContentSource `json:"source,omitempty"`
3044	// Parameters - Gets or sets the configuration parameters.
3045	Parameters map[string]*DscConfigurationParameter `json:"parameters"`
3046	// Description - Gets or sets the description of the configuration.
3047	Description *string `json:"description,omitempty"`
3048}
3049
3050// MarshalJSON is the custom marshaler for DscConfigurationCreateOrUpdateProperties.
3051func (dccoup DscConfigurationCreateOrUpdateProperties) MarshalJSON() ([]byte, error) {
3052	objectMap := make(map[string]interface{})
3053	if dccoup.LogVerbose != nil {
3054		objectMap["logVerbose"] = dccoup.LogVerbose
3055	}
3056	if dccoup.LogProgress != nil {
3057		objectMap["logProgress"] = dccoup.LogProgress
3058	}
3059	if dccoup.Source != nil {
3060		objectMap["source"] = dccoup.Source
3061	}
3062	if dccoup.Parameters != nil {
3063		objectMap["parameters"] = dccoup.Parameters
3064	}
3065	if dccoup.Description != nil {
3066		objectMap["description"] = dccoup.Description
3067	}
3068	return json.Marshal(objectMap)
3069}
3070
3071// DscConfigurationListResult the response model for the list configuration operation.
3072type DscConfigurationListResult struct {
3073	autorest.Response `json:"-"`
3074	// Value - Gets or sets a list of configurations.
3075	Value *[]DscConfiguration `json:"value,omitempty"`
3076	// NextLink - Gets or sets the next link.
3077	NextLink *string `json:"nextLink,omitempty"`
3078	// TotalCount - Gets the total number of configurations matching filter criteria.
3079	TotalCount *int32 `json:"totalCount,omitempty"`
3080}
3081
3082// DscConfigurationListResultIterator provides access to a complete listing of DscConfiguration values.
3083type DscConfigurationListResultIterator struct {
3084	i    int
3085	page DscConfigurationListResultPage
3086}
3087
3088// NextWithContext advances to the next value.  If there was an error making
3089// the request the iterator does not advance and the error is returned.
3090func (iter *DscConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3091	if tracing.IsEnabled() {
3092		ctx = tracing.StartSpan(ctx, fqdn+"/DscConfigurationListResultIterator.NextWithContext")
3093		defer func() {
3094			sc := -1
3095			if iter.Response().Response.Response != nil {
3096				sc = iter.Response().Response.Response.StatusCode
3097			}
3098			tracing.EndSpan(ctx, sc, err)
3099		}()
3100	}
3101	iter.i++
3102	if iter.i < len(iter.page.Values()) {
3103		return nil
3104	}
3105	err = iter.page.NextWithContext(ctx)
3106	if err != nil {
3107		iter.i--
3108		return err
3109	}
3110	iter.i = 0
3111	return nil
3112}
3113
3114// Next advances to the next value.  If there was an error making
3115// the request the iterator does not advance and the error is returned.
3116// Deprecated: Use NextWithContext() instead.
3117func (iter *DscConfigurationListResultIterator) Next() error {
3118	return iter.NextWithContext(context.Background())
3119}
3120
3121// NotDone returns true if the enumeration should be started or is not yet complete.
3122func (iter DscConfigurationListResultIterator) NotDone() bool {
3123	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3124}
3125
3126// Response returns the raw server response from the last page request.
3127func (iter DscConfigurationListResultIterator) Response() DscConfigurationListResult {
3128	return iter.page.Response()
3129}
3130
3131// Value returns the current value or a zero-initialized value if the
3132// iterator has advanced beyond the end of the collection.
3133func (iter DscConfigurationListResultIterator) Value() DscConfiguration {
3134	if !iter.page.NotDone() {
3135		return DscConfiguration{}
3136	}
3137	return iter.page.Values()[iter.i]
3138}
3139
3140// Creates a new instance of the DscConfigurationListResultIterator type.
3141func NewDscConfigurationListResultIterator(page DscConfigurationListResultPage) DscConfigurationListResultIterator {
3142	return DscConfigurationListResultIterator{page: page}
3143}
3144
3145// IsEmpty returns true if the ListResult contains no values.
3146func (dclr DscConfigurationListResult) IsEmpty() bool {
3147	return dclr.Value == nil || len(*dclr.Value) == 0
3148}
3149
3150// hasNextLink returns true if the NextLink is not empty.
3151func (dclr DscConfigurationListResult) hasNextLink() bool {
3152	return dclr.NextLink != nil && len(*dclr.NextLink) != 0
3153}
3154
3155// dscConfigurationListResultPreparer prepares a request to retrieve the next set of results.
3156// It returns nil if no more results exist.
3157func (dclr DscConfigurationListResult) dscConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
3158	if !dclr.hasNextLink() {
3159		return nil, nil
3160	}
3161	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3162		autorest.AsJSON(),
3163		autorest.AsGet(),
3164		autorest.WithBaseURL(to.String(dclr.NextLink)))
3165}
3166
3167// DscConfigurationListResultPage contains a page of DscConfiguration values.
3168type DscConfigurationListResultPage struct {
3169	fn   func(context.Context, DscConfigurationListResult) (DscConfigurationListResult, error)
3170	dclr DscConfigurationListResult
3171}
3172
3173// NextWithContext advances to the next page of values.  If there was an error making
3174// the request the page does not advance and the error is returned.
3175func (page *DscConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
3176	if tracing.IsEnabled() {
3177		ctx = tracing.StartSpan(ctx, fqdn+"/DscConfigurationListResultPage.NextWithContext")
3178		defer func() {
3179			sc := -1
3180			if page.Response().Response.Response != nil {
3181				sc = page.Response().Response.Response.StatusCode
3182			}
3183			tracing.EndSpan(ctx, sc, err)
3184		}()
3185	}
3186	for {
3187		next, err := page.fn(ctx, page.dclr)
3188		if err != nil {
3189			return err
3190		}
3191		page.dclr = next
3192		if !next.hasNextLink() || !next.IsEmpty() {
3193			break
3194		}
3195	}
3196	return nil
3197}
3198
3199// Next advances to the next page of values.  If there was an error making
3200// the request the page does not advance and the error is returned.
3201// Deprecated: Use NextWithContext() instead.
3202func (page *DscConfigurationListResultPage) Next() error {
3203	return page.NextWithContext(context.Background())
3204}
3205
3206// NotDone returns true if the page enumeration should be started or is not yet complete.
3207func (page DscConfigurationListResultPage) NotDone() bool {
3208	return !page.dclr.IsEmpty()
3209}
3210
3211// Response returns the raw server response from the last page request.
3212func (page DscConfigurationListResultPage) Response() DscConfigurationListResult {
3213	return page.dclr
3214}
3215
3216// Values returns the slice of values for the current page or nil if there are no values.
3217func (page DscConfigurationListResultPage) Values() []DscConfiguration {
3218	if page.dclr.IsEmpty() {
3219		return nil
3220	}
3221	return *page.dclr.Value
3222}
3223
3224// Creates a new instance of the DscConfigurationListResultPage type.
3225func NewDscConfigurationListResultPage(cur DscConfigurationListResult, getNextPage func(context.Context, DscConfigurationListResult) (DscConfigurationListResult, error)) DscConfigurationListResultPage {
3226	return DscConfigurationListResultPage{
3227		fn:   getNextPage,
3228		dclr: cur,
3229	}
3230}
3231
3232// DscConfigurationParameter definition of the configuration parameter type.
3233type DscConfigurationParameter struct {
3234	// Type - Gets or sets the type of the parameter.
3235	Type *string `json:"type,omitempty"`
3236	// IsMandatory - Gets or sets a Boolean value to indicate whether the parameter is mandatory or not.
3237	IsMandatory *bool `json:"isMandatory,omitempty"`
3238	// Position - Get or sets the position of the parameter.
3239	Position *int32 `json:"position,omitempty"`
3240	// DefaultValue - Gets or sets the default value of parameter.
3241	DefaultValue *string `json:"defaultValue,omitempty"`
3242}
3243
3244// DscConfigurationProperties definition of the configuration property type.
3245type DscConfigurationProperties struct {
3246	// ProvisioningState - Gets or sets the provisioning state of the configuration. Possible values include: 'Succeeded'
3247	ProvisioningState DscConfigurationProvisioningState `json:"provisioningState,omitempty"`
3248	// JobCount - Gets or sets the job count of the configuration.
3249	JobCount *int32 `json:"jobCount,omitempty"`
3250	// Parameters - Gets or sets the configuration parameters.
3251	Parameters map[string]*DscConfigurationParameter `json:"parameters"`
3252	// Source - Gets or sets the source.
3253	Source *ContentSource `json:"source,omitempty"`
3254	// State - Gets or sets the state of the configuration. Possible values include: 'DscConfigurationStateNew', 'DscConfigurationStateEdit', 'DscConfigurationStatePublished'
3255	State DscConfigurationState `json:"state,omitempty"`
3256	// LogVerbose - Gets or sets verbose log option.
3257	LogVerbose *bool `json:"logVerbose,omitempty"`
3258	// CreationTime - Gets or sets the creation time.
3259	CreationTime *date.Time `json:"creationTime,omitempty"`
3260	// LastModifiedTime - Gets or sets the last modified time.
3261	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
3262	// NodeConfigurationCount - Gets the number of compiled node configurations.
3263	NodeConfigurationCount *int32 `json:"nodeConfigurationCount,omitempty"`
3264	// Description - Gets or sets the description.
3265	Description *string `json:"description,omitempty"`
3266}
3267
3268// MarshalJSON is the custom marshaler for DscConfigurationProperties.
3269func (dcp DscConfigurationProperties) MarshalJSON() ([]byte, error) {
3270	objectMap := make(map[string]interface{})
3271	if dcp.ProvisioningState != "" {
3272		objectMap["provisioningState"] = dcp.ProvisioningState
3273	}
3274	if dcp.JobCount != nil {
3275		objectMap["jobCount"] = dcp.JobCount
3276	}
3277	if dcp.Parameters != nil {
3278		objectMap["parameters"] = dcp.Parameters
3279	}
3280	if dcp.Source != nil {
3281		objectMap["source"] = dcp.Source
3282	}
3283	if dcp.State != "" {
3284		objectMap["state"] = dcp.State
3285	}
3286	if dcp.LogVerbose != nil {
3287		objectMap["logVerbose"] = dcp.LogVerbose
3288	}
3289	if dcp.CreationTime != nil {
3290		objectMap["creationTime"] = dcp.CreationTime
3291	}
3292	if dcp.LastModifiedTime != nil {
3293		objectMap["lastModifiedTime"] = dcp.LastModifiedTime
3294	}
3295	if dcp.NodeConfigurationCount != nil {
3296		objectMap["nodeConfigurationCount"] = dcp.NodeConfigurationCount
3297	}
3298	if dcp.Description != nil {
3299		objectMap["description"] = dcp.Description
3300	}
3301	return json.Marshal(objectMap)
3302}
3303
3304// DscConfigurationUpdateParameters the parameters supplied to the create or update configuration
3305// operation.
3306type DscConfigurationUpdateParameters struct {
3307	// DscConfigurationCreateOrUpdateProperties - Gets or sets configuration create or update properties.
3308	*DscConfigurationCreateOrUpdateProperties `json:"properties,omitempty"`
3309	// Name - Gets or sets name of the resource.
3310	Name *string `json:"name,omitempty"`
3311	// Tags - Gets or sets the tags attached to the resource.
3312	Tags map[string]*string `json:"tags"`
3313}
3314
3315// MarshalJSON is the custom marshaler for DscConfigurationUpdateParameters.
3316func (dcup DscConfigurationUpdateParameters) MarshalJSON() ([]byte, error) {
3317	objectMap := make(map[string]interface{})
3318	if dcup.DscConfigurationCreateOrUpdateProperties != nil {
3319		objectMap["properties"] = dcup.DscConfigurationCreateOrUpdateProperties
3320	}
3321	if dcup.Name != nil {
3322		objectMap["name"] = dcup.Name
3323	}
3324	if dcup.Tags != nil {
3325		objectMap["tags"] = dcup.Tags
3326	}
3327	return json.Marshal(objectMap)
3328}
3329
3330// UnmarshalJSON is the custom unmarshaler for DscConfigurationUpdateParameters struct.
3331func (dcup *DscConfigurationUpdateParameters) UnmarshalJSON(body []byte) error {
3332	var m map[string]*json.RawMessage
3333	err := json.Unmarshal(body, &m)
3334	if err != nil {
3335		return err
3336	}
3337	for k, v := range m {
3338		switch k {
3339		case "properties":
3340			if v != nil {
3341				var dscConfigurationCreateOrUpdateProperties DscConfigurationCreateOrUpdateProperties
3342				err = json.Unmarshal(*v, &dscConfigurationCreateOrUpdateProperties)
3343				if err != nil {
3344					return err
3345				}
3346				dcup.DscConfigurationCreateOrUpdateProperties = &dscConfigurationCreateOrUpdateProperties
3347			}
3348		case "name":
3349			if v != nil {
3350				var name string
3351				err = json.Unmarshal(*v, &name)
3352				if err != nil {
3353					return err
3354				}
3355				dcup.Name = &name
3356			}
3357		case "tags":
3358			if v != nil {
3359				var tags map[string]*string
3360				err = json.Unmarshal(*v, &tags)
3361				if err != nil {
3362					return err
3363				}
3364				dcup.Tags = tags
3365			}
3366		}
3367	}
3368
3369	return nil
3370}
3371
3372// DscMetaConfiguration definition of the DSC Meta Configuration.
3373type DscMetaConfiguration struct {
3374	// ConfigurationModeFrequencyMins - Gets or sets the ConfigurationModeFrequencyMins value of the meta configuration.
3375	ConfigurationModeFrequencyMins *int32 `json:"configurationModeFrequencyMins,omitempty"`
3376	// RebootNodeIfNeeded - Gets or sets the RebootNodeIfNeeded value of the meta configuration.
3377	RebootNodeIfNeeded *bool `json:"rebootNodeIfNeeded,omitempty"`
3378	// ConfigurationMode - Gets or sets the ConfigurationMode value of the meta configuration.
3379	ConfigurationMode *string `json:"configurationMode,omitempty"`
3380	// ActionAfterReboot - Gets or sets the ActionAfterReboot value of the meta configuration.
3381	ActionAfterReboot *string `json:"actionAfterReboot,omitempty"`
3382	// CertificateID - Gets or sets the CertificateId value of the meta configuration.
3383	CertificateID *string `json:"certificateId,omitempty"`
3384	// RefreshFrequencyMins - Gets or sets the RefreshFrequencyMins value of the meta configuration.
3385	RefreshFrequencyMins *int32 `json:"refreshFrequencyMins,omitempty"`
3386	// AllowModuleOverwrite - Gets or sets the AllowModuleOverwrite value of the meta configuration.
3387	AllowModuleOverwrite *bool `json:"allowModuleOverwrite,omitempty"`
3388}
3389
3390// DscNode definition of a DscNode
3391type DscNode struct {
3392	autorest.Response `json:"-"`
3393	// DscNodeProperties - The properties of a DscNode.
3394	*DscNodeProperties `json:"properties,omitempty"`
3395	// ID - READ-ONLY; Fully qualified resource Id for the resource
3396	ID *string `json:"id,omitempty"`
3397	// Name - READ-ONLY; The name of the resource
3398	Name *string `json:"name,omitempty"`
3399	// Type - READ-ONLY; The type of the resource.
3400	Type *string `json:"type,omitempty"`
3401}
3402
3403// MarshalJSON is the custom marshaler for DscNode.
3404func (dn DscNode) MarshalJSON() ([]byte, error) {
3405	objectMap := make(map[string]interface{})
3406	if dn.DscNodeProperties != nil {
3407		objectMap["properties"] = dn.DscNodeProperties
3408	}
3409	return json.Marshal(objectMap)
3410}
3411
3412// UnmarshalJSON is the custom unmarshaler for DscNode struct.
3413func (dn *DscNode) UnmarshalJSON(body []byte) error {
3414	var m map[string]*json.RawMessage
3415	err := json.Unmarshal(body, &m)
3416	if err != nil {
3417		return err
3418	}
3419	for k, v := range m {
3420		switch k {
3421		case "properties":
3422			if v != nil {
3423				var dscNodeProperties DscNodeProperties
3424				err = json.Unmarshal(*v, &dscNodeProperties)
3425				if err != nil {
3426					return err
3427				}
3428				dn.DscNodeProperties = &dscNodeProperties
3429			}
3430		case "id":
3431			if v != nil {
3432				var ID string
3433				err = json.Unmarshal(*v, &ID)
3434				if err != nil {
3435					return err
3436				}
3437				dn.ID = &ID
3438			}
3439		case "name":
3440			if v != nil {
3441				var name string
3442				err = json.Unmarshal(*v, &name)
3443				if err != nil {
3444					return err
3445				}
3446				dn.Name = &name
3447			}
3448		case "type":
3449			if v != nil {
3450				var typeVar string
3451				err = json.Unmarshal(*v, &typeVar)
3452				if err != nil {
3453					return err
3454				}
3455				dn.Type = &typeVar
3456			}
3457		}
3458	}
3459
3460	return nil
3461}
3462
3463// DscNodeConfiguration definition of the dsc node configuration.
3464type DscNodeConfiguration struct {
3465	autorest.Response `json:"-"`
3466	// DscNodeConfigurationProperties - Gets or sets the configuration properties.
3467	*DscNodeConfigurationProperties `json:"properties,omitempty"`
3468	// ID - READ-ONLY; Fully qualified resource Id for the resource
3469	ID *string `json:"id,omitempty"`
3470	// Name - READ-ONLY; The name of the resource
3471	Name *string `json:"name,omitempty"`
3472	// Type - READ-ONLY; The type of the resource.
3473	Type *string `json:"type,omitempty"`
3474}
3475
3476// MarshalJSON is the custom marshaler for DscNodeConfiguration.
3477func (dnc DscNodeConfiguration) MarshalJSON() ([]byte, error) {
3478	objectMap := make(map[string]interface{})
3479	if dnc.DscNodeConfigurationProperties != nil {
3480		objectMap["properties"] = dnc.DscNodeConfigurationProperties
3481	}
3482	return json.Marshal(objectMap)
3483}
3484
3485// UnmarshalJSON is the custom unmarshaler for DscNodeConfiguration struct.
3486func (dnc *DscNodeConfiguration) UnmarshalJSON(body []byte) error {
3487	var m map[string]*json.RawMessage
3488	err := json.Unmarshal(body, &m)
3489	if err != nil {
3490		return err
3491	}
3492	for k, v := range m {
3493		switch k {
3494		case "properties":
3495			if v != nil {
3496				var dscNodeConfigurationProperties DscNodeConfigurationProperties
3497				err = json.Unmarshal(*v, &dscNodeConfigurationProperties)
3498				if err != nil {
3499					return err
3500				}
3501				dnc.DscNodeConfigurationProperties = &dscNodeConfigurationProperties
3502			}
3503		case "id":
3504			if v != nil {
3505				var ID string
3506				err = json.Unmarshal(*v, &ID)
3507				if err != nil {
3508					return err
3509				}
3510				dnc.ID = &ID
3511			}
3512		case "name":
3513			if v != nil {
3514				var name string
3515				err = json.Unmarshal(*v, &name)
3516				if err != nil {
3517					return err
3518				}
3519				dnc.Name = &name
3520			}
3521		case "type":
3522			if v != nil {
3523				var typeVar string
3524				err = json.Unmarshal(*v, &typeVar)
3525				if err != nil {
3526					return err
3527				}
3528				dnc.Type = &typeVar
3529			}
3530		}
3531	}
3532
3533	return nil
3534}
3535
3536// DscNodeConfigurationAssociationProperty the dsc node configuration property associated with the entity.
3537type DscNodeConfigurationAssociationProperty struct {
3538	// Name - Gets or sets the name of the dsc node configuration.
3539	Name *string `json:"name,omitempty"`
3540}
3541
3542// DscNodeConfigurationCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3543// long-running operation.
3544type DscNodeConfigurationCreateOrUpdateFuture struct {
3545	azure.FutureAPI
3546	// Result returns the result of the asynchronous operation.
3547	// If the operation has not completed it will return an error.
3548	Result func(DscNodeConfigurationClient) (DscNodeConfiguration, error)
3549}
3550
3551// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3552func (future *DscNodeConfigurationCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3553	var azFuture azure.Future
3554	if err := json.Unmarshal(body, &azFuture); err != nil {
3555		return err
3556	}
3557	future.FutureAPI = &azFuture
3558	future.Result = future.result
3559	return nil
3560}
3561
3562// result is the default implementation for DscNodeConfigurationCreateOrUpdateFuture.Result.
3563func (future *DscNodeConfigurationCreateOrUpdateFuture) result(client DscNodeConfigurationClient) (dnc DscNodeConfiguration, err error) {
3564	var done bool
3565	done, err = future.DoneWithContext(context.Background(), client)
3566	if err != nil {
3567		err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3568		return
3569	}
3570	if !done {
3571		dnc.Response.Response = future.Response()
3572		err = azure.NewAsyncOpIncompleteError("automation.DscNodeConfigurationCreateOrUpdateFuture")
3573		return
3574	}
3575	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3576	if dnc.Response.Response, err = future.GetResult(sender); err == nil && dnc.Response.Response.StatusCode != http.StatusNoContent {
3577		dnc, err = client.CreateOrUpdateResponder(dnc.Response.Response)
3578		if err != nil {
3579			err = autorest.NewErrorWithError(err, "automation.DscNodeConfigurationCreateOrUpdateFuture", "Result", dnc.Response.Response, "Failure responding to request")
3580		}
3581	}
3582	return
3583}
3584
3585// DscNodeConfigurationCreateOrUpdateParameters the parameters supplied to the create or update node
3586// configuration operation.
3587type DscNodeConfigurationCreateOrUpdateParameters struct {
3588	// DscNodeConfigurationCreateOrUpdateParametersProperties - Node configuration properties
3589	*DscNodeConfigurationCreateOrUpdateParametersProperties `json:"properties,omitempty"`
3590	// Name - Name of the node configuration.
3591	Name *string `json:"name,omitempty"`
3592	// Tags - Gets or sets the tags attached to the resource.
3593	Tags map[string]*string `json:"tags"`
3594}
3595
3596// MarshalJSON is the custom marshaler for DscNodeConfigurationCreateOrUpdateParameters.
3597func (dnccoup DscNodeConfigurationCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
3598	objectMap := make(map[string]interface{})
3599	if dnccoup.DscNodeConfigurationCreateOrUpdateParametersProperties != nil {
3600		objectMap["properties"] = dnccoup.DscNodeConfigurationCreateOrUpdateParametersProperties
3601	}
3602	if dnccoup.Name != nil {
3603		objectMap["name"] = dnccoup.Name
3604	}
3605	if dnccoup.Tags != nil {
3606		objectMap["tags"] = dnccoup.Tags
3607	}
3608	return json.Marshal(objectMap)
3609}
3610
3611// UnmarshalJSON is the custom unmarshaler for DscNodeConfigurationCreateOrUpdateParameters struct.
3612func (dnccoup *DscNodeConfigurationCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
3613	var m map[string]*json.RawMessage
3614	err := json.Unmarshal(body, &m)
3615	if err != nil {
3616		return err
3617	}
3618	for k, v := range m {
3619		switch k {
3620		case "properties":
3621			if v != nil {
3622				var dscNodeConfigurationCreateOrUpdateParametersProperties DscNodeConfigurationCreateOrUpdateParametersProperties
3623				err = json.Unmarshal(*v, &dscNodeConfigurationCreateOrUpdateParametersProperties)
3624				if err != nil {
3625					return err
3626				}
3627				dnccoup.DscNodeConfigurationCreateOrUpdateParametersProperties = &dscNodeConfigurationCreateOrUpdateParametersProperties
3628			}
3629		case "name":
3630			if v != nil {
3631				var name string
3632				err = json.Unmarshal(*v, &name)
3633				if err != nil {
3634					return err
3635				}
3636				dnccoup.Name = &name
3637			}
3638		case "tags":
3639			if v != nil {
3640				var tags map[string]*string
3641				err = json.Unmarshal(*v, &tags)
3642				if err != nil {
3643					return err
3644				}
3645				dnccoup.Tags = tags
3646			}
3647		}
3648	}
3649
3650	return nil
3651}
3652
3653// DscNodeConfigurationCreateOrUpdateParametersProperties the parameter properties supplied to the create
3654// or update node configuration operation.
3655type DscNodeConfigurationCreateOrUpdateParametersProperties struct {
3656	// Source - Gets or sets the source.
3657	Source *ContentSource `json:"source,omitempty"`
3658	// Configuration - Gets or sets the configuration of the node.
3659	Configuration *DscConfigurationAssociationProperty `json:"configuration,omitempty"`
3660	// IncrementNodeConfigurationBuild - If a new build version of NodeConfiguration is required.
3661	IncrementNodeConfigurationBuild *bool `json:"incrementNodeConfigurationBuild,omitempty"`
3662}
3663
3664// DscNodeConfigurationListResult the response model for the list job operation.
3665type DscNodeConfigurationListResult struct {
3666	autorest.Response `json:"-"`
3667	// Value - Gets or sets a list of Dsc node configurations.
3668	Value *[]DscNodeConfiguration `json:"value,omitempty"`
3669	// NextLink - Gets or sets the next link.
3670	NextLink *string `json:"nextLink,omitempty"`
3671	// TotalCount - Gets or sets the total rows in query.
3672	TotalCount *int32 `json:"totalCount,omitempty"`
3673}
3674
3675// DscNodeConfigurationListResultIterator provides access to a complete listing of DscNodeConfiguration
3676// values.
3677type DscNodeConfigurationListResultIterator struct {
3678	i    int
3679	page DscNodeConfigurationListResultPage
3680}
3681
3682// NextWithContext advances to the next value.  If there was an error making
3683// the request the iterator does not advance and the error is returned.
3684func (iter *DscNodeConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3685	if tracing.IsEnabled() {
3686		ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeConfigurationListResultIterator.NextWithContext")
3687		defer func() {
3688			sc := -1
3689			if iter.Response().Response.Response != nil {
3690				sc = iter.Response().Response.Response.StatusCode
3691			}
3692			tracing.EndSpan(ctx, sc, err)
3693		}()
3694	}
3695	iter.i++
3696	if iter.i < len(iter.page.Values()) {
3697		return nil
3698	}
3699	err = iter.page.NextWithContext(ctx)
3700	if err != nil {
3701		iter.i--
3702		return err
3703	}
3704	iter.i = 0
3705	return nil
3706}
3707
3708// Next advances to the next value.  If there was an error making
3709// the request the iterator does not advance and the error is returned.
3710// Deprecated: Use NextWithContext() instead.
3711func (iter *DscNodeConfigurationListResultIterator) Next() error {
3712	return iter.NextWithContext(context.Background())
3713}
3714
3715// NotDone returns true if the enumeration should be started or is not yet complete.
3716func (iter DscNodeConfigurationListResultIterator) NotDone() bool {
3717	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3718}
3719
3720// Response returns the raw server response from the last page request.
3721func (iter DscNodeConfigurationListResultIterator) Response() DscNodeConfigurationListResult {
3722	return iter.page.Response()
3723}
3724
3725// Value returns the current value or a zero-initialized value if the
3726// iterator has advanced beyond the end of the collection.
3727func (iter DscNodeConfigurationListResultIterator) Value() DscNodeConfiguration {
3728	if !iter.page.NotDone() {
3729		return DscNodeConfiguration{}
3730	}
3731	return iter.page.Values()[iter.i]
3732}
3733
3734// Creates a new instance of the DscNodeConfigurationListResultIterator type.
3735func NewDscNodeConfigurationListResultIterator(page DscNodeConfigurationListResultPage) DscNodeConfigurationListResultIterator {
3736	return DscNodeConfigurationListResultIterator{page: page}
3737}
3738
3739// IsEmpty returns true if the ListResult contains no values.
3740func (dnclr DscNodeConfigurationListResult) IsEmpty() bool {
3741	return dnclr.Value == nil || len(*dnclr.Value) == 0
3742}
3743
3744// hasNextLink returns true if the NextLink is not empty.
3745func (dnclr DscNodeConfigurationListResult) hasNextLink() bool {
3746	return dnclr.NextLink != nil && len(*dnclr.NextLink) != 0
3747}
3748
3749// dscNodeConfigurationListResultPreparer prepares a request to retrieve the next set of results.
3750// It returns nil if no more results exist.
3751func (dnclr DscNodeConfigurationListResult) dscNodeConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
3752	if !dnclr.hasNextLink() {
3753		return nil, nil
3754	}
3755	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3756		autorest.AsJSON(),
3757		autorest.AsGet(),
3758		autorest.WithBaseURL(to.String(dnclr.NextLink)))
3759}
3760
3761// DscNodeConfigurationListResultPage contains a page of DscNodeConfiguration values.
3762type DscNodeConfigurationListResultPage struct {
3763	fn    func(context.Context, DscNodeConfigurationListResult) (DscNodeConfigurationListResult, error)
3764	dnclr DscNodeConfigurationListResult
3765}
3766
3767// NextWithContext 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.
3769func (page *DscNodeConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
3770	if tracing.IsEnabled() {
3771		ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeConfigurationListResultPage.NextWithContext")
3772		defer func() {
3773			sc := -1
3774			if page.Response().Response.Response != nil {
3775				sc = page.Response().Response.Response.StatusCode
3776			}
3777			tracing.EndSpan(ctx, sc, err)
3778		}()
3779	}
3780	for {
3781		next, err := page.fn(ctx, page.dnclr)
3782		if err != nil {
3783			return err
3784		}
3785		page.dnclr = next
3786		if !next.hasNextLink() || !next.IsEmpty() {
3787			break
3788		}
3789	}
3790	return nil
3791}
3792
3793// Next advances to the next page of values.  If there was an error making
3794// the request the page does not advance and the error is returned.
3795// Deprecated: Use NextWithContext() instead.
3796func (page *DscNodeConfigurationListResultPage) Next() error {
3797	return page.NextWithContext(context.Background())
3798}
3799
3800// NotDone returns true if the page enumeration should be started or is not yet complete.
3801func (page DscNodeConfigurationListResultPage) NotDone() bool {
3802	return !page.dnclr.IsEmpty()
3803}
3804
3805// Response returns the raw server response from the last page request.
3806func (page DscNodeConfigurationListResultPage) Response() DscNodeConfigurationListResult {
3807	return page.dnclr
3808}
3809
3810// Values returns the slice of values for the current page or nil if there are no values.
3811func (page DscNodeConfigurationListResultPage) Values() []DscNodeConfiguration {
3812	if page.dnclr.IsEmpty() {
3813		return nil
3814	}
3815	return *page.dnclr.Value
3816}
3817
3818// Creates a new instance of the DscNodeConfigurationListResultPage type.
3819func NewDscNodeConfigurationListResultPage(cur DscNodeConfigurationListResult, getNextPage func(context.Context, DscNodeConfigurationListResult) (DscNodeConfigurationListResult, error)) DscNodeConfigurationListResultPage {
3820	return DscNodeConfigurationListResultPage{
3821		fn:    getNextPage,
3822		dnclr: cur,
3823	}
3824}
3825
3826// DscNodeConfigurationProperties properties for the DscNodeConfiguration
3827type DscNodeConfigurationProperties struct {
3828	// LastModifiedTime - Gets or sets the last modified time.
3829	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
3830	// CreationTime - Gets or sets creation time.
3831	CreationTime *date.Time `json:"creationTime,omitempty"`
3832	// Configuration - Gets or sets the configuration of the node.
3833	Configuration *DscConfigurationAssociationProperty `json:"configuration,omitempty"`
3834	// Source - Source of node configuration.
3835	Source *string `json:"source,omitempty"`
3836	// NodeCount - Number of nodes with this node configuration assigned
3837	NodeCount *int64 `json:"nodeCount,omitempty"`
3838	// IncrementNodeConfigurationBuild - If a new build version of NodeConfiguration is required.
3839	IncrementNodeConfigurationBuild *bool `json:"incrementNodeConfigurationBuild,omitempty"`
3840}
3841
3842// DscNodeExtensionHandlerAssociationProperty the dsc extensionHandler property associated with the node
3843type DscNodeExtensionHandlerAssociationProperty struct {
3844	// Name - Gets or sets the name of the extension handler.
3845	Name *string `json:"name,omitempty"`
3846	// Version - Gets or sets the version of the extension handler.
3847	Version *string `json:"version,omitempty"`
3848}
3849
3850// DscNodeListResult the response model for the list dsc nodes operation.
3851type DscNodeListResult struct {
3852	autorest.Response `json:"-"`
3853	// Value - Gets or sets a list of dsc nodes.
3854	Value *[]DscNode `json:"value,omitempty"`
3855	// NextLink - Gets or sets the next link.
3856	NextLink *string `json:"nextLink,omitempty"`
3857	// TotalCount - Gets the total number of nodes matching filter criteria.
3858	TotalCount *int32 `json:"totalCount,omitempty"`
3859}
3860
3861// DscNodeListResultIterator provides access to a complete listing of DscNode values.
3862type DscNodeListResultIterator struct {
3863	i    int
3864	page DscNodeListResultPage
3865}
3866
3867// NextWithContext advances to the next value.  If there was an error making
3868// the request the iterator does not advance and the error is returned.
3869func (iter *DscNodeListResultIterator) NextWithContext(ctx context.Context) (err error) {
3870	if tracing.IsEnabled() {
3871		ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeListResultIterator.NextWithContext")
3872		defer func() {
3873			sc := -1
3874			if iter.Response().Response.Response != nil {
3875				sc = iter.Response().Response.Response.StatusCode
3876			}
3877			tracing.EndSpan(ctx, sc, err)
3878		}()
3879	}
3880	iter.i++
3881	if iter.i < len(iter.page.Values()) {
3882		return nil
3883	}
3884	err = iter.page.NextWithContext(ctx)
3885	if err != nil {
3886		iter.i--
3887		return err
3888	}
3889	iter.i = 0
3890	return nil
3891}
3892
3893// Next advances to the next value.  If there was an error making
3894// the request the iterator does not advance and the error is returned.
3895// Deprecated: Use NextWithContext() instead.
3896func (iter *DscNodeListResultIterator) Next() error {
3897	return iter.NextWithContext(context.Background())
3898}
3899
3900// NotDone returns true if the enumeration should be started or is not yet complete.
3901func (iter DscNodeListResultIterator) NotDone() bool {
3902	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3903}
3904
3905// Response returns the raw server response from the last page request.
3906func (iter DscNodeListResultIterator) Response() DscNodeListResult {
3907	return iter.page.Response()
3908}
3909
3910// Value returns the current value or a zero-initialized value if the
3911// iterator has advanced beyond the end of the collection.
3912func (iter DscNodeListResultIterator) Value() DscNode {
3913	if !iter.page.NotDone() {
3914		return DscNode{}
3915	}
3916	return iter.page.Values()[iter.i]
3917}
3918
3919// Creates a new instance of the DscNodeListResultIterator type.
3920func NewDscNodeListResultIterator(page DscNodeListResultPage) DscNodeListResultIterator {
3921	return DscNodeListResultIterator{page: page}
3922}
3923
3924// IsEmpty returns true if the ListResult contains no values.
3925func (dnlr DscNodeListResult) IsEmpty() bool {
3926	return dnlr.Value == nil || len(*dnlr.Value) == 0
3927}
3928
3929// hasNextLink returns true if the NextLink is not empty.
3930func (dnlr DscNodeListResult) hasNextLink() bool {
3931	return dnlr.NextLink != nil && len(*dnlr.NextLink) != 0
3932}
3933
3934// dscNodeListResultPreparer prepares a request to retrieve the next set of results.
3935// It returns nil if no more results exist.
3936func (dnlr DscNodeListResult) dscNodeListResultPreparer(ctx context.Context) (*http.Request, error) {
3937	if !dnlr.hasNextLink() {
3938		return nil, nil
3939	}
3940	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3941		autorest.AsJSON(),
3942		autorest.AsGet(),
3943		autorest.WithBaseURL(to.String(dnlr.NextLink)))
3944}
3945
3946// DscNodeListResultPage contains a page of DscNode values.
3947type DscNodeListResultPage struct {
3948	fn   func(context.Context, DscNodeListResult) (DscNodeListResult, error)
3949	dnlr DscNodeListResult
3950}
3951
3952// NextWithContext advances to the next page of values.  If there was an error making
3953// the request the page does not advance and the error is returned.
3954func (page *DscNodeListResultPage) NextWithContext(ctx context.Context) (err error) {
3955	if tracing.IsEnabled() {
3956		ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeListResultPage.NextWithContext")
3957		defer func() {
3958			sc := -1
3959			if page.Response().Response.Response != nil {
3960				sc = page.Response().Response.Response.StatusCode
3961			}
3962			tracing.EndSpan(ctx, sc, err)
3963		}()
3964	}
3965	for {
3966		next, err := page.fn(ctx, page.dnlr)
3967		if err != nil {
3968			return err
3969		}
3970		page.dnlr = next
3971		if !next.hasNextLink() || !next.IsEmpty() {
3972			break
3973		}
3974	}
3975	return nil
3976}
3977
3978// Next advances to the next page of values.  If there was an error making
3979// the request the page does not advance and the error is returned.
3980// Deprecated: Use NextWithContext() instead.
3981func (page *DscNodeListResultPage) Next() error {
3982	return page.NextWithContext(context.Background())
3983}
3984
3985// NotDone returns true if the page enumeration should be started or is not yet complete.
3986func (page DscNodeListResultPage) NotDone() bool {
3987	return !page.dnlr.IsEmpty()
3988}
3989
3990// Response returns the raw server response from the last page request.
3991func (page DscNodeListResultPage) Response() DscNodeListResult {
3992	return page.dnlr
3993}
3994
3995// Values returns the slice of values for the current page or nil if there are no values.
3996func (page DscNodeListResultPage) Values() []DscNode {
3997	if page.dnlr.IsEmpty() {
3998		return nil
3999	}
4000	return *page.dnlr.Value
4001}
4002
4003// Creates a new instance of the DscNodeListResultPage type.
4004func NewDscNodeListResultPage(cur DscNodeListResult, getNextPage func(context.Context, DscNodeListResult) (DscNodeListResult, error)) DscNodeListResultPage {
4005	return DscNodeListResultPage{
4006		fn:   getNextPage,
4007		dnlr: cur,
4008	}
4009}
4010
4011// DscNodeProperties the properties of a DscNode
4012type DscNodeProperties struct {
4013	// LastSeen - Gets or sets the last seen time of the node.
4014	LastSeen *date.Time `json:"lastSeen,omitempty"`
4015	// RegistrationTime - Gets or sets the registration time of the node.
4016	RegistrationTime *date.Time `json:"registrationTime,omitempty"`
4017	// IP - Gets or sets the ip of the node.
4018	IP *string `json:"ip,omitempty"`
4019	// AccountID - Gets or sets the account id of the node.
4020	AccountID *string `json:"accountId,omitempty"`
4021	// DscNodeConfigurationAssociationProperty - Gets or sets the configuration of the node.
4022	*DscNodeConfigurationAssociationProperty `json:"nodeConfiguration,omitempty"`
4023	// Status - Gets or sets the status of the node.
4024	Status *string `json:"status,omitempty"`
4025	// NodeID - Gets or sets the node id.
4026	NodeID *string `json:"nodeId,omitempty"`
4027	// Etag - Gets or sets the etag of the resource.
4028	Etag *string `json:"etag,omitempty"`
4029	// TotalCount - Gets the total number of records matching filter criteria.
4030	TotalCount *int32 `json:"totalCount,omitempty"`
4031	// ExtensionHandler - Gets or sets the list of extensionHandler properties for a Node.
4032	ExtensionHandler *[]DscNodeExtensionHandlerAssociationProperty `json:"extensionHandler,omitempty"`
4033}
4034
4035// MarshalJSON is the custom marshaler for DscNodeProperties.
4036func (dnp DscNodeProperties) MarshalJSON() ([]byte, error) {
4037	objectMap := make(map[string]interface{})
4038	if dnp.LastSeen != nil {
4039		objectMap["lastSeen"] = dnp.LastSeen
4040	}
4041	if dnp.RegistrationTime != nil {
4042		objectMap["registrationTime"] = dnp.RegistrationTime
4043	}
4044	if dnp.IP != nil {
4045		objectMap["ip"] = dnp.IP
4046	}
4047	if dnp.AccountID != nil {
4048		objectMap["accountId"] = dnp.AccountID
4049	}
4050	if dnp.DscNodeConfigurationAssociationProperty != nil {
4051		objectMap["nodeConfiguration"] = dnp.DscNodeConfigurationAssociationProperty
4052	}
4053	if dnp.Status != nil {
4054		objectMap["status"] = dnp.Status
4055	}
4056	if dnp.NodeID != nil {
4057		objectMap["nodeId"] = dnp.NodeID
4058	}
4059	if dnp.Etag != nil {
4060		objectMap["etag"] = dnp.Etag
4061	}
4062	if dnp.TotalCount != nil {
4063		objectMap["totalCount"] = dnp.TotalCount
4064	}
4065	if dnp.ExtensionHandler != nil {
4066		objectMap["extensionHandler"] = dnp.ExtensionHandler
4067	}
4068	return json.Marshal(objectMap)
4069}
4070
4071// UnmarshalJSON is the custom unmarshaler for DscNodeProperties struct.
4072func (dnp *DscNodeProperties) UnmarshalJSON(body []byte) error {
4073	var m map[string]*json.RawMessage
4074	err := json.Unmarshal(body, &m)
4075	if err != nil {
4076		return err
4077	}
4078	for k, v := range m {
4079		switch k {
4080		case "lastSeen":
4081			if v != nil {
4082				var lastSeen date.Time
4083				err = json.Unmarshal(*v, &lastSeen)
4084				if err != nil {
4085					return err
4086				}
4087				dnp.LastSeen = &lastSeen
4088			}
4089		case "registrationTime":
4090			if v != nil {
4091				var registrationTime date.Time
4092				err = json.Unmarshal(*v, &registrationTime)
4093				if err != nil {
4094					return err
4095				}
4096				dnp.RegistrationTime = &registrationTime
4097			}
4098		case "ip":
4099			if v != nil {
4100				var IP string
4101				err = json.Unmarshal(*v, &IP)
4102				if err != nil {
4103					return err
4104				}
4105				dnp.IP = &IP
4106			}
4107		case "accountId":
4108			if v != nil {
4109				var accountID string
4110				err = json.Unmarshal(*v, &accountID)
4111				if err != nil {
4112					return err
4113				}
4114				dnp.AccountID = &accountID
4115			}
4116		case "nodeConfiguration":
4117			if v != nil {
4118				var dscNodeConfigurationAssociationProperty DscNodeConfigurationAssociationProperty
4119				err = json.Unmarshal(*v, &dscNodeConfigurationAssociationProperty)
4120				if err != nil {
4121					return err
4122				}
4123				dnp.DscNodeConfigurationAssociationProperty = &dscNodeConfigurationAssociationProperty
4124			}
4125		case "status":
4126			if v != nil {
4127				var status string
4128				err = json.Unmarshal(*v, &status)
4129				if err != nil {
4130					return err
4131				}
4132				dnp.Status = &status
4133			}
4134		case "nodeId":
4135			if v != nil {
4136				var nodeID string
4137				err = json.Unmarshal(*v, &nodeID)
4138				if err != nil {
4139					return err
4140				}
4141				dnp.NodeID = &nodeID
4142			}
4143		case "etag":
4144			if v != nil {
4145				var etag string
4146				err = json.Unmarshal(*v, &etag)
4147				if err != nil {
4148					return err
4149				}
4150				dnp.Etag = &etag
4151			}
4152		case "totalCount":
4153			if v != nil {
4154				var totalCount int32
4155				err = json.Unmarshal(*v, &totalCount)
4156				if err != nil {
4157					return err
4158				}
4159				dnp.TotalCount = &totalCount
4160			}
4161		case "extensionHandler":
4162			if v != nil {
4163				var extensionHandler []DscNodeExtensionHandlerAssociationProperty
4164				err = json.Unmarshal(*v, &extensionHandler)
4165				if err != nil {
4166					return err
4167				}
4168				dnp.ExtensionHandler = &extensionHandler
4169			}
4170		}
4171	}
4172
4173	return nil
4174}
4175
4176// DscNodeReport definition of the dsc node report type.
4177type DscNodeReport struct {
4178	autorest.Response `json:"-"`
4179	// EndTime - Gets or sets the end time of the node report.
4180	EndTime *date.Time `json:"endTime,omitempty"`
4181	// LastModifiedTime - Gets or sets the lastModifiedTime of the node report.
4182	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
4183	// StartTime - Gets or sets the start time of the node report.
4184	StartTime *date.Time `json:"startTime,omitempty"`
4185	// Type - Gets or sets the type of the node report.
4186	Type *string `json:"type,omitempty"`
4187	// ReportID - Gets or sets the id of the node report.
4188	ReportID *string `json:"reportId,omitempty"`
4189	// Status - Gets or sets the status of the node report.
4190	Status *string `json:"status,omitempty"`
4191	// RefreshMode - Gets or sets the refreshMode of the node report.
4192	RefreshMode *string `json:"refreshMode,omitempty"`
4193	// RebootRequested - Gets or sets the rebootRequested of the node report.
4194	RebootRequested *string `json:"rebootRequested,omitempty"`
4195	// ReportFormatVersion - Gets or sets the reportFormatVersion of the node report.
4196	ReportFormatVersion *string `json:"reportFormatVersion,omitempty"`
4197	// ConfigurationVersion - Gets or sets the configurationVersion of the node report.
4198	ConfigurationVersion *string `json:"configurationVersion,omitempty"`
4199	// ID - Gets or sets the id.
4200	ID *string `json:"id,omitempty"`
4201	// Errors - Gets or sets the errors for the node report.
4202	Errors *[]DscReportError `json:"errors,omitempty"`
4203	// Resources - Gets or sets the resource for the node report.
4204	Resources *[]DscReportResource `json:"resources,omitempty"`
4205	// MetaConfiguration - Gets or sets the metaConfiguration of the node at the time of the report.
4206	MetaConfiguration *DscMetaConfiguration `json:"metaConfiguration,omitempty"`
4207	// HostName - Gets or sets the hostname of the node that sent the report.
4208	HostName *string `json:"hostName,omitempty"`
4209	// IPV4Addresses - Gets or sets the IPv4 address of the node that sent the report.
4210	IPV4Addresses *[]string `json:"iPV4Addresses,omitempty"`
4211	// IPV6Addresses - Gets or sets the IPv6 address of the node that sent the report.
4212	IPV6Addresses *[]string `json:"iPV6Addresses,omitempty"`
4213	// NumberOfResources - Gets or sets the number of resource in the node report.
4214	NumberOfResources *int32 `json:"numberOfResources,omitempty"`
4215	// RawErrors - Gets or sets the unparsed errors for the node report.
4216	RawErrors *string `json:"rawErrors,omitempty"`
4217}
4218
4219// DscNodeReportListResult the response model for the list dsc nodes operation.
4220type DscNodeReportListResult struct {
4221	autorest.Response `json:"-"`
4222	// Value - Gets or sets a list of dsc node reports.
4223	Value *[]DscNodeReport `json:"value,omitempty"`
4224	// NextLink - Gets or sets the next link.
4225	NextLink *string `json:"nextLink,omitempty"`
4226}
4227
4228// DscNodeReportListResultIterator provides access to a complete listing of DscNodeReport values.
4229type DscNodeReportListResultIterator struct {
4230	i    int
4231	page DscNodeReportListResultPage
4232}
4233
4234// NextWithContext advances to the next value.  If there was an error making
4235// the request the iterator does not advance and the error is returned.
4236func (iter *DscNodeReportListResultIterator) NextWithContext(ctx context.Context) (err error) {
4237	if tracing.IsEnabled() {
4238		ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeReportListResultIterator.NextWithContext")
4239		defer func() {
4240			sc := -1
4241			if iter.Response().Response.Response != nil {
4242				sc = iter.Response().Response.Response.StatusCode
4243			}
4244			tracing.EndSpan(ctx, sc, err)
4245		}()
4246	}
4247	iter.i++
4248	if iter.i < len(iter.page.Values()) {
4249		return nil
4250	}
4251	err = iter.page.NextWithContext(ctx)
4252	if err != nil {
4253		iter.i--
4254		return err
4255	}
4256	iter.i = 0
4257	return nil
4258}
4259
4260// Next advances to the next value.  If there was an error making
4261// the request the iterator does not advance and the error is returned.
4262// Deprecated: Use NextWithContext() instead.
4263func (iter *DscNodeReportListResultIterator) Next() error {
4264	return iter.NextWithContext(context.Background())
4265}
4266
4267// NotDone returns true if the enumeration should be started or is not yet complete.
4268func (iter DscNodeReportListResultIterator) NotDone() bool {
4269	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4270}
4271
4272// Response returns the raw server response from the last page request.
4273func (iter DscNodeReportListResultIterator) Response() DscNodeReportListResult {
4274	return iter.page.Response()
4275}
4276
4277// Value returns the current value or a zero-initialized value if the
4278// iterator has advanced beyond the end of the collection.
4279func (iter DscNodeReportListResultIterator) Value() DscNodeReport {
4280	if !iter.page.NotDone() {
4281		return DscNodeReport{}
4282	}
4283	return iter.page.Values()[iter.i]
4284}
4285
4286// Creates a new instance of the DscNodeReportListResultIterator type.
4287func NewDscNodeReportListResultIterator(page DscNodeReportListResultPage) DscNodeReportListResultIterator {
4288	return DscNodeReportListResultIterator{page: page}
4289}
4290
4291// IsEmpty returns true if the ListResult contains no values.
4292func (dnrlr DscNodeReportListResult) IsEmpty() bool {
4293	return dnrlr.Value == nil || len(*dnrlr.Value) == 0
4294}
4295
4296// hasNextLink returns true if the NextLink is not empty.
4297func (dnrlr DscNodeReportListResult) hasNextLink() bool {
4298	return dnrlr.NextLink != nil && len(*dnrlr.NextLink) != 0
4299}
4300
4301// dscNodeReportListResultPreparer prepares a request to retrieve the next set of results.
4302// It returns nil if no more results exist.
4303func (dnrlr DscNodeReportListResult) dscNodeReportListResultPreparer(ctx context.Context) (*http.Request, error) {
4304	if !dnrlr.hasNextLink() {
4305		return nil, nil
4306	}
4307	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4308		autorest.AsJSON(),
4309		autorest.AsGet(),
4310		autorest.WithBaseURL(to.String(dnrlr.NextLink)))
4311}
4312
4313// DscNodeReportListResultPage contains a page of DscNodeReport values.
4314type DscNodeReportListResultPage struct {
4315	fn    func(context.Context, DscNodeReportListResult) (DscNodeReportListResult, error)
4316	dnrlr DscNodeReportListResult
4317}
4318
4319// NextWithContext advances to the next page of values.  If there was an error making
4320// the request the page does not advance and the error is returned.
4321func (page *DscNodeReportListResultPage) NextWithContext(ctx context.Context) (err error) {
4322	if tracing.IsEnabled() {
4323		ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeReportListResultPage.NextWithContext")
4324		defer func() {
4325			sc := -1
4326			if page.Response().Response.Response != nil {
4327				sc = page.Response().Response.Response.StatusCode
4328			}
4329			tracing.EndSpan(ctx, sc, err)
4330		}()
4331	}
4332	for {
4333		next, err := page.fn(ctx, page.dnrlr)
4334		if err != nil {
4335			return err
4336		}
4337		page.dnrlr = next
4338		if !next.hasNextLink() || !next.IsEmpty() {
4339			break
4340		}
4341	}
4342	return nil
4343}
4344
4345// Next advances to the next page of values.  If there was an error making
4346// the request the page does not advance and the error is returned.
4347// Deprecated: Use NextWithContext() instead.
4348func (page *DscNodeReportListResultPage) Next() error {
4349	return page.NextWithContext(context.Background())
4350}
4351
4352// NotDone returns true if the page enumeration should be started or is not yet complete.
4353func (page DscNodeReportListResultPage) NotDone() bool {
4354	return !page.dnrlr.IsEmpty()
4355}
4356
4357// Response returns the raw server response from the last page request.
4358func (page DscNodeReportListResultPage) Response() DscNodeReportListResult {
4359	return page.dnrlr
4360}
4361
4362// Values returns the slice of values for the current page or nil if there are no values.
4363func (page DscNodeReportListResultPage) Values() []DscNodeReport {
4364	if page.dnrlr.IsEmpty() {
4365		return nil
4366	}
4367	return *page.dnrlr.Value
4368}
4369
4370// Creates a new instance of the DscNodeReportListResultPage type.
4371func NewDscNodeReportListResultPage(cur DscNodeReportListResult, getNextPage func(context.Context, DscNodeReportListResult) (DscNodeReportListResult, error)) DscNodeReportListResultPage {
4372	return DscNodeReportListResultPage{
4373		fn:    getNextPage,
4374		dnrlr: cur,
4375	}
4376}
4377
4378// DscNodeUpdateParameters the parameters supplied to the update dsc node operation.
4379type DscNodeUpdateParameters struct {
4380	// NodeID - Gets or sets the id of the dsc node.
4381	NodeID     *string                            `json:"nodeId,omitempty"`
4382	Properties *DscNodeUpdateParametersProperties `json:"properties,omitempty"`
4383}
4384
4385// DscNodeUpdateParametersProperties ...
4386type DscNodeUpdateParametersProperties struct {
4387	// DscNodeConfigurationAssociationProperty - Gets or sets the configuration of the node.
4388	*DscNodeConfigurationAssociationProperty `json:"nodeConfiguration,omitempty"`
4389}
4390
4391// MarshalJSON is the custom marshaler for DscNodeUpdateParametersProperties.
4392func (dnup DscNodeUpdateParametersProperties) MarshalJSON() ([]byte, error) {
4393	objectMap := make(map[string]interface{})
4394	if dnup.DscNodeConfigurationAssociationProperty != nil {
4395		objectMap["nodeConfiguration"] = dnup.DscNodeConfigurationAssociationProperty
4396	}
4397	return json.Marshal(objectMap)
4398}
4399
4400// UnmarshalJSON is the custom unmarshaler for DscNodeUpdateParametersProperties struct.
4401func (dnup *DscNodeUpdateParametersProperties) UnmarshalJSON(body []byte) error {
4402	var m map[string]*json.RawMessage
4403	err := json.Unmarshal(body, &m)
4404	if err != nil {
4405		return err
4406	}
4407	for k, v := range m {
4408		switch k {
4409		case "nodeConfiguration":
4410			if v != nil {
4411				var dscNodeConfigurationAssociationProperty DscNodeConfigurationAssociationProperty
4412				err = json.Unmarshal(*v, &dscNodeConfigurationAssociationProperty)
4413				if err != nil {
4414					return err
4415				}
4416				dnup.DscNodeConfigurationAssociationProperty = &dscNodeConfigurationAssociationProperty
4417			}
4418		}
4419	}
4420
4421	return nil
4422}
4423
4424// DscReportError definition of the dsc node report error type.
4425type DscReportError struct {
4426	// ErrorSource - Gets or sets the source of the error.
4427	ErrorSource *string `json:"errorSource,omitempty"`
4428	// ResourceID - Gets or sets the resource ID which generated the error.
4429	ResourceID *string `json:"resourceId,omitempty"`
4430	// ErrorCode - Gets or sets the error code.
4431	ErrorCode *string `json:"errorCode,omitempty"`
4432	// ErrorMessage - Gets or sets the error message.
4433	ErrorMessage *string `json:"errorMessage,omitempty"`
4434	// Locale - Gets or sets the locale of the error.
4435	Locale *string `json:"locale,omitempty"`
4436	// ErrorDetails - Gets or sets the error details.
4437	ErrorDetails *string `json:"errorDetails,omitempty"`
4438}
4439
4440// DscReportResource definition of the DSC Report Resource.
4441type DscReportResource struct {
4442	// ResourceID - Gets or sets the ID of the resource.
4443	ResourceID *string `json:"resourceId,omitempty"`
4444	// SourceInfo - Gets or sets the source info of the resource.
4445	SourceInfo *string `json:"sourceInfo,omitempty"`
4446	// DependsOn - Gets or sets the Resource Navigation values for resources the resource depends on.
4447	DependsOn *[]DscReportResourceNavigation `json:"dependsOn,omitempty"`
4448	// ModuleName - Gets or sets the module name of the resource.
4449	ModuleName *string `json:"moduleName,omitempty"`
4450	// ModuleVersion - Gets or sets the module version of the resource.
4451	ModuleVersion *string `json:"moduleVersion,omitempty"`
4452	// ResourceName - Gets or sets the name of the resource.
4453	ResourceName *string `json:"resourceName,omitempty"`
4454	// Error - Gets or sets the error of the resource.
4455	Error *string `json:"error,omitempty"`
4456	// Status - Gets or sets the status of the resource.
4457	Status *string `json:"status,omitempty"`
4458	// DurationInSeconds - Gets or sets the duration in seconds for the resource.
4459	DurationInSeconds *float64 `json:"durationInSeconds,omitempty"`
4460	// StartDate - Gets or sets the start date of the resource.
4461	StartDate *date.Time `json:"startDate,omitempty"`
4462}
4463
4464// DscReportResourceNavigation navigation for DSC Report Resource.
4465type DscReportResourceNavigation struct {
4466	// ResourceID - Gets or sets the ID of the resource to navigate to.
4467	ResourceID *string `json:"resourceId,omitempty"`
4468}
4469
4470// ErrorResponse error response of an operation failure
4471type ErrorResponse struct {
4472	// Code - Error code
4473	Code *string `json:"code,omitempty"`
4474	// Message - Error message indicating why the operation failed.
4475	Message *string `json:"message,omitempty"`
4476}
4477
4478// FieldDefinition definition of the connection fields.
4479type FieldDefinition struct {
4480	// IsEncrypted - Gets or sets the isEncrypted flag of the connection field definition.
4481	IsEncrypted *bool `json:"isEncrypted,omitempty"`
4482	// IsOptional - Gets or sets the isOptional flag of the connection field definition.
4483	IsOptional *bool `json:"isOptional,omitempty"`
4484	// Type - Gets or sets the type of the connection field definition.
4485	Type *string `json:"type,omitempty"`
4486}
4487
4488// HybridRunbookWorker definition of hybrid runbook worker.
4489type HybridRunbookWorker struct {
4490	// Name - Gets or sets the worker machine name.
4491	Name *string `json:"name,omitempty"`
4492	// IP - Gets or sets the assigned machine IP address.
4493	IP *string `json:"ip,omitempty"`
4494	// RegistrationTime - Gets or sets the registration time of the worker machine.
4495	RegistrationTime *date.Time `json:"registrationTime,omitempty"`
4496	// LastSeenDateTime - Last Heartbeat from the Worker
4497	LastSeenDateTime *date.Time `json:"lastSeenDateTime,omitempty"`
4498}
4499
4500// HybridRunbookWorkerGroup definition of hybrid runbook worker group.
4501type HybridRunbookWorkerGroup struct {
4502	autorest.Response `json:"-"`
4503	// ID - Gets or sets the id of the resource.
4504	ID *string `json:"id,omitempty"`
4505	// Name - Gets or sets the name of the group.
4506	Name *string `json:"name,omitempty"`
4507	// HybridRunbookWorkers - Gets or sets the list of hybrid runbook workers.
4508	HybridRunbookWorkers *[]HybridRunbookWorker `json:"hybridRunbookWorkers,omitempty"`
4509	// Credential - Sets the credential of a worker group.
4510	Credential *RunAsCredentialAssociationProperty `json:"credential,omitempty"`
4511	// GroupType - Type of the HybridWorkerGroup. Possible values include: 'User', 'System'
4512	GroupType GroupTypeEnum `json:"groupType,omitempty"`
4513}
4514
4515// HybridRunbookWorkerGroupsListResult the response model for the list hybrid runbook worker groups.
4516type HybridRunbookWorkerGroupsListResult struct {
4517	autorest.Response `json:"-"`
4518	// Value - Gets or sets a list of hybrid runbook worker groups.
4519	Value *[]HybridRunbookWorkerGroup `json:"value,omitempty"`
4520	// NextLink - Gets or sets the next link.
4521	NextLink *string `json:"nextLink,omitempty"`
4522}
4523
4524// HybridRunbookWorkerGroupsListResultIterator provides access to a complete listing of
4525// HybridRunbookWorkerGroup values.
4526type HybridRunbookWorkerGroupsListResultIterator struct {
4527	i    int
4528	page HybridRunbookWorkerGroupsListResultPage
4529}
4530
4531// NextWithContext advances to the next value.  If there was an error making
4532// the request the iterator does not advance and the error is returned.
4533func (iter *HybridRunbookWorkerGroupsListResultIterator) NextWithContext(ctx context.Context) (err error) {
4534	if tracing.IsEnabled() {
4535		ctx = tracing.StartSpan(ctx, fqdn+"/HybridRunbookWorkerGroupsListResultIterator.NextWithContext")
4536		defer func() {
4537			sc := -1
4538			if iter.Response().Response.Response != nil {
4539				sc = iter.Response().Response.Response.StatusCode
4540			}
4541			tracing.EndSpan(ctx, sc, err)
4542		}()
4543	}
4544	iter.i++
4545	if iter.i < len(iter.page.Values()) {
4546		return nil
4547	}
4548	err = iter.page.NextWithContext(ctx)
4549	if err != nil {
4550		iter.i--
4551		return err
4552	}
4553	iter.i = 0
4554	return nil
4555}
4556
4557// Next advances to the next value.  If there was an error making
4558// the request the iterator does not advance and the error is returned.
4559// Deprecated: Use NextWithContext() instead.
4560func (iter *HybridRunbookWorkerGroupsListResultIterator) Next() error {
4561	return iter.NextWithContext(context.Background())
4562}
4563
4564// NotDone returns true if the enumeration should be started or is not yet complete.
4565func (iter HybridRunbookWorkerGroupsListResultIterator) NotDone() bool {
4566	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4567}
4568
4569// Response returns the raw server response from the last page request.
4570func (iter HybridRunbookWorkerGroupsListResultIterator) Response() HybridRunbookWorkerGroupsListResult {
4571	return iter.page.Response()
4572}
4573
4574// Value returns the current value or a zero-initialized value if the
4575// iterator has advanced beyond the end of the collection.
4576func (iter HybridRunbookWorkerGroupsListResultIterator) Value() HybridRunbookWorkerGroup {
4577	if !iter.page.NotDone() {
4578		return HybridRunbookWorkerGroup{}
4579	}
4580	return iter.page.Values()[iter.i]
4581}
4582
4583// Creates a new instance of the HybridRunbookWorkerGroupsListResultIterator type.
4584func NewHybridRunbookWorkerGroupsListResultIterator(page HybridRunbookWorkerGroupsListResultPage) HybridRunbookWorkerGroupsListResultIterator {
4585	return HybridRunbookWorkerGroupsListResultIterator{page: page}
4586}
4587
4588// IsEmpty returns true if the ListResult contains no values.
4589func (hrwglr HybridRunbookWorkerGroupsListResult) IsEmpty() bool {
4590	return hrwglr.Value == nil || len(*hrwglr.Value) == 0
4591}
4592
4593// hasNextLink returns true if the NextLink is not empty.
4594func (hrwglr HybridRunbookWorkerGroupsListResult) hasNextLink() bool {
4595	return hrwglr.NextLink != nil && len(*hrwglr.NextLink) != 0
4596}
4597
4598// hybridRunbookWorkerGroupsListResultPreparer prepares a request to retrieve the next set of results.
4599// It returns nil if no more results exist.
4600func (hrwglr HybridRunbookWorkerGroupsListResult) hybridRunbookWorkerGroupsListResultPreparer(ctx context.Context) (*http.Request, error) {
4601	if !hrwglr.hasNextLink() {
4602		return nil, nil
4603	}
4604	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4605		autorest.AsJSON(),
4606		autorest.AsGet(),
4607		autorest.WithBaseURL(to.String(hrwglr.NextLink)))
4608}
4609
4610// HybridRunbookWorkerGroupsListResultPage contains a page of HybridRunbookWorkerGroup values.
4611type HybridRunbookWorkerGroupsListResultPage struct {
4612	fn     func(context.Context, HybridRunbookWorkerGroupsListResult) (HybridRunbookWorkerGroupsListResult, error)
4613	hrwglr HybridRunbookWorkerGroupsListResult
4614}
4615
4616// NextWithContext advances to the next page of values.  If there was an error making
4617// the request the page does not advance and the error is returned.
4618func (page *HybridRunbookWorkerGroupsListResultPage) NextWithContext(ctx context.Context) (err error) {
4619	if tracing.IsEnabled() {
4620		ctx = tracing.StartSpan(ctx, fqdn+"/HybridRunbookWorkerGroupsListResultPage.NextWithContext")
4621		defer func() {
4622			sc := -1
4623			if page.Response().Response.Response != nil {
4624				sc = page.Response().Response.Response.StatusCode
4625			}
4626			tracing.EndSpan(ctx, sc, err)
4627		}()
4628	}
4629	for {
4630		next, err := page.fn(ctx, page.hrwglr)
4631		if err != nil {
4632			return err
4633		}
4634		page.hrwglr = next
4635		if !next.hasNextLink() || !next.IsEmpty() {
4636			break
4637		}
4638	}
4639	return nil
4640}
4641
4642// Next advances to the next page of values.  If there was an error making
4643// the request the page does not advance and the error is returned.
4644// Deprecated: Use NextWithContext() instead.
4645func (page *HybridRunbookWorkerGroupsListResultPage) Next() error {
4646	return page.NextWithContext(context.Background())
4647}
4648
4649// NotDone returns true if the page enumeration should be started or is not yet complete.
4650func (page HybridRunbookWorkerGroupsListResultPage) NotDone() bool {
4651	return !page.hrwglr.IsEmpty()
4652}
4653
4654// Response returns the raw server response from the last page request.
4655func (page HybridRunbookWorkerGroupsListResultPage) Response() HybridRunbookWorkerGroupsListResult {
4656	return page.hrwglr
4657}
4658
4659// Values returns the slice of values for the current page or nil if there are no values.
4660func (page HybridRunbookWorkerGroupsListResultPage) Values() []HybridRunbookWorkerGroup {
4661	if page.hrwglr.IsEmpty() {
4662		return nil
4663	}
4664	return *page.hrwglr.Value
4665}
4666
4667// Creates a new instance of the HybridRunbookWorkerGroupsListResultPage type.
4668func NewHybridRunbookWorkerGroupsListResultPage(cur HybridRunbookWorkerGroupsListResult, getNextPage func(context.Context, HybridRunbookWorkerGroupsListResult) (HybridRunbookWorkerGroupsListResult, error)) HybridRunbookWorkerGroupsListResultPage {
4669	return HybridRunbookWorkerGroupsListResultPage{
4670		fn:     getNextPage,
4671		hrwglr: cur,
4672	}
4673}
4674
4675// HybridRunbookWorkerGroupUpdateParameters parameters supplied to the update operation.
4676type HybridRunbookWorkerGroupUpdateParameters struct {
4677	// Credential - Sets the credential of a worker group.
4678	Credential *RunAsCredentialAssociationProperty `json:"credential,omitempty"`
4679}
4680
4681// Job definition of the job.
4682type Job struct {
4683	autorest.Response `json:"-"`
4684	// JobProperties - The properties of the job.
4685	*JobProperties `json:"properties,omitempty"`
4686	// ID - READ-ONLY; Fully qualified resource Id for the resource
4687	ID *string `json:"id,omitempty"`
4688	// Name - READ-ONLY; The name of the resource
4689	Name *string `json:"name,omitempty"`
4690	// Type - READ-ONLY; The type of the resource.
4691	Type *string `json:"type,omitempty"`
4692}
4693
4694// MarshalJSON is the custom marshaler for Job.
4695func (j Job) MarshalJSON() ([]byte, error) {
4696	objectMap := make(map[string]interface{})
4697	if j.JobProperties != nil {
4698		objectMap["properties"] = j.JobProperties
4699	}
4700	return json.Marshal(objectMap)
4701}
4702
4703// UnmarshalJSON is the custom unmarshaler for Job struct.
4704func (j *Job) UnmarshalJSON(body []byte) error {
4705	var m map[string]*json.RawMessage
4706	err := json.Unmarshal(body, &m)
4707	if err != nil {
4708		return err
4709	}
4710	for k, v := range m {
4711		switch k {
4712		case "properties":
4713			if v != nil {
4714				var jobProperties JobProperties
4715				err = json.Unmarshal(*v, &jobProperties)
4716				if err != nil {
4717					return err
4718				}
4719				j.JobProperties = &jobProperties
4720			}
4721		case "id":
4722			if v != nil {
4723				var ID string
4724				err = json.Unmarshal(*v, &ID)
4725				if err != nil {
4726					return err
4727				}
4728				j.ID = &ID
4729			}
4730		case "name":
4731			if v != nil {
4732				var name string
4733				err = json.Unmarshal(*v, &name)
4734				if err != nil {
4735					return err
4736				}
4737				j.Name = &name
4738			}
4739		case "type":
4740			if v != nil {
4741				var typeVar string
4742				err = json.Unmarshal(*v, &typeVar)
4743				if err != nil {
4744					return err
4745				}
4746				j.Type = &typeVar
4747			}
4748		}
4749	}
4750
4751	return nil
4752}
4753
4754// JobCollectionItem job collection item properties.
4755type JobCollectionItem struct {
4756	// JobCollectionItemProperties - Job properties.
4757	*JobCollectionItemProperties `json:"properties,omitempty"`
4758	// ID - READ-ONLY; Fully qualified resource Id for the resource
4759	ID *string `json:"id,omitempty"`
4760	// Name - READ-ONLY; The name of the resource
4761	Name *string `json:"name,omitempty"`
4762	// Type - READ-ONLY; The type of the resource.
4763	Type *string `json:"type,omitempty"`
4764}
4765
4766// MarshalJSON is the custom marshaler for JobCollectionItem.
4767func (jci JobCollectionItem) MarshalJSON() ([]byte, error) {
4768	objectMap := make(map[string]interface{})
4769	if jci.JobCollectionItemProperties != nil {
4770		objectMap["properties"] = jci.JobCollectionItemProperties
4771	}
4772	return json.Marshal(objectMap)
4773}
4774
4775// UnmarshalJSON is the custom unmarshaler for JobCollectionItem struct.
4776func (jci *JobCollectionItem) UnmarshalJSON(body []byte) error {
4777	var m map[string]*json.RawMessage
4778	err := json.Unmarshal(body, &m)
4779	if err != nil {
4780		return err
4781	}
4782	for k, v := range m {
4783		switch k {
4784		case "properties":
4785			if v != nil {
4786				var jobCollectionItemProperties JobCollectionItemProperties
4787				err = json.Unmarshal(*v, &jobCollectionItemProperties)
4788				if err != nil {
4789					return err
4790				}
4791				jci.JobCollectionItemProperties = &jobCollectionItemProperties
4792			}
4793		case "id":
4794			if v != nil {
4795				var ID string
4796				err = json.Unmarshal(*v, &ID)
4797				if err != nil {
4798					return err
4799				}
4800				jci.ID = &ID
4801			}
4802		case "name":
4803			if v != nil {
4804				var name string
4805				err = json.Unmarshal(*v, &name)
4806				if err != nil {
4807					return err
4808				}
4809				jci.Name = &name
4810			}
4811		case "type":
4812			if v != nil {
4813				var typeVar string
4814				err = json.Unmarshal(*v, &typeVar)
4815				if err != nil {
4816					return err
4817				}
4818				jci.Type = &typeVar
4819			}
4820		}
4821	}
4822
4823	return nil
4824}
4825
4826// JobCollectionItemProperties job collection item properties.
4827type JobCollectionItemProperties struct {
4828	// Runbook - READ-ONLY; The runbook association.
4829	Runbook *RunbookAssociationProperty `json:"runbook,omitempty"`
4830	// JobID - READ-ONLY; The id of the job.
4831	JobID *uuid.UUID `json:"jobId,omitempty"`
4832	// CreationTime - READ-ONLY; The creation time of the job.
4833	CreationTime *date.Time `json:"creationTime,omitempty"`
4834	// Status - READ-ONLY; The status of the job. Possible values include: 'JobStatusNew', 'JobStatusActivating', 'JobStatusRunning', 'JobStatusCompleted', 'JobStatusFailed', 'JobStatusStopped', 'JobStatusBlocked', 'JobStatusSuspended', 'JobStatusDisconnected', 'JobStatusSuspending', 'JobStatusStopping', 'JobStatusResuming', 'JobStatusRemoving'
4835	Status JobStatus `json:"status,omitempty"`
4836	// StartTime - READ-ONLY; The start time of the job.
4837	StartTime *date.Time `json:"startTime,omitempty"`
4838	// EndTime - READ-ONLY; The end time of the job.
4839	EndTime *date.Time `json:"endTime,omitempty"`
4840	// LastModifiedTime - READ-ONLY; The last modified time of the job.
4841	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
4842	// ProvisioningState - READ-ONLY; The provisioning state of a resource.
4843	ProvisioningState *string `json:"provisioningState,omitempty"`
4844	// RunOn - Specifies the runOn group name where the job was executed.
4845	RunOn *string `json:"runOn,omitempty"`
4846}
4847
4848// MarshalJSON is the custom marshaler for JobCollectionItemProperties.
4849func (jcip JobCollectionItemProperties) MarshalJSON() ([]byte, error) {
4850	objectMap := make(map[string]interface{})
4851	if jcip.RunOn != nil {
4852		objectMap["runOn"] = jcip.RunOn
4853	}
4854	return json.Marshal(objectMap)
4855}
4856
4857// JobCreateParameters the parameters supplied to the create job operation.
4858type JobCreateParameters struct {
4859	// JobCreateProperties - Gets or sets the list of job properties.
4860	*JobCreateProperties `json:"properties,omitempty"`
4861}
4862
4863// MarshalJSON is the custom marshaler for JobCreateParameters.
4864func (jcp JobCreateParameters) MarshalJSON() ([]byte, error) {
4865	objectMap := make(map[string]interface{})
4866	if jcp.JobCreateProperties != nil {
4867		objectMap["properties"] = jcp.JobCreateProperties
4868	}
4869	return json.Marshal(objectMap)
4870}
4871
4872// UnmarshalJSON is the custom unmarshaler for JobCreateParameters struct.
4873func (jcp *JobCreateParameters) UnmarshalJSON(body []byte) error {
4874	var m map[string]*json.RawMessage
4875	err := json.Unmarshal(body, &m)
4876	if err != nil {
4877		return err
4878	}
4879	for k, v := range m {
4880		switch k {
4881		case "properties":
4882			if v != nil {
4883				var jobCreateProperties JobCreateProperties
4884				err = json.Unmarshal(*v, &jobCreateProperties)
4885				if err != nil {
4886					return err
4887				}
4888				jcp.JobCreateProperties = &jobCreateProperties
4889			}
4890		}
4891	}
4892
4893	return nil
4894}
4895
4896// JobCreateProperties ...
4897type JobCreateProperties struct {
4898	// Runbook - Gets or sets the runbook.
4899	Runbook *RunbookAssociationProperty `json:"runbook,omitempty"`
4900	// Parameters - Gets or sets the parameters of the job.
4901	Parameters map[string]*string `json:"parameters"`
4902	// RunOn - Gets or sets the runOn which specifies the group name where the job is to be executed.
4903	RunOn *string `json:"runOn,omitempty"`
4904}
4905
4906// MarshalJSON is the custom marshaler for JobCreateProperties.
4907func (jcp JobCreateProperties) MarshalJSON() ([]byte, error) {
4908	objectMap := make(map[string]interface{})
4909	if jcp.Runbook != nil {
4910		objectMap["runbook"] = jcp.Runbook
4911	}
4912	if jcp.Parameters != nil {
4913		objectMap["parameters"] = jcp.Parameters
4914	}
4915	if jcp.RunOn != nil {
4916		objectMap["runOn"] = jcp.RunOn
4917	}
4918	return json.Marshal(objectMap)
4919}
4920
4921// JobListResultV2 the response model for the list job operation.
4922type JobListResultV2 struct {
4923	autorest.Response `json:"-"`
4924	// Value - List of jobs.
4925	Value *[]JobCollectionItem `json:"value,omitempty"`
4926	// NextLink - READ-ONLY; The  link to the next page.
4927	NextLink *string `json:"nextLink,omitempty"`
4928}
4929
4930// MarshalJSON is the custom marshaler for JobListResultV2.
4931func (jlrv JobListResultV2) MarshalJSON() ([]byte, error) {
4932	objectMap := make(map[string]interface{})
4933	if jlrv.Value != nil {
4934		objectMap["value"] = jlrv.Value
4935	}
4936	return json.Marshal(objectMap)
4937}
4938
4939// JobListResultV2Iterator provides access to a complete listing of JobCollectionItem values.
4940type JobListResultV2Iterator struct {
4941	i    int
4942	page JobListResultV2Page
4943}
4944
4945// NextWithContext advances to the next value.  If there was an error making
4946// the request the iterator does not advance and the error is returned.
4947func (iter *JobListResultV2Iterator) NextWithContext(ctx context.Context) (err error) {
4948	if tracing.IsEnabled() {
4949		ctx = tracing.StartSpan(ctx, fqdn+"/JobListResultV2Iterator.NextWithContext")
4950		defer func() {
4951			sc := -1
4952			if iter.Response().Response.Response != nil {
4953				sc = iter.Response().Response.Response.StatusCode
4954			}
4955			tracing.EndSpan(ctx, sc, err)
4956		}()
4957	}
4958	iter.i++
4959	if iter.i < len(iter.page.Values()) {
4960		return nil
4961	}
4962	err = iter.page.NextWithContext(ctx)
4963	if err != nil {
4964		iter.i--
4965		return err
4966	}
4967	iter.i = 0
4968	return nil
4969}
4970
4971// Next advances to the next value.  If there was an error making
4972// the request the iterator does not advance and the error is returned.
4973// Deprecated: Use NextWithContext() instead.
4974func (iter *JobListResultV2Iterator) Next() error {
4975	return iter.NextWithContext(context.Background())
4976}
4977
4978// NotDone returns true if the enumeration should be started or is not yet complete.
4979func (iter JobListResultV2Iterator) NotDone() bool {
4980	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4981}
4982
4983// Response returns the raw server response from the last page request.
4984func (iter JobListResultV2Iterator) Response() JobListResultV2 {
4985	return iter.page.Response()
4986}
4987
4988// Value returns the current value or a zero-initialized value if the
4989// iterator has advanced beyond the end of the collection.
4990func (iter JobListResultV2Iterator) Value() JobCollectionItem {
4991	if !iter.page.NotDone() {
4992		return JobCollectionItem{}
4993	}
4994	return iter.page.Values()[iter.i]
4995}
4996
4997// Creates a new instance of the JobListResultV2Iterator type.
4998func NewJobListResultV2Iterator(page JobListResultV2Page) JobListResultV2Iterator {
4999	return JobListResultV2Iterator{page: page}
5000}
5001
5002// IsEmpty returns true if the ListResult contains no values.
5003func (jlrv JobListResultV2) IsEmpty() bool {
5004	return jlrv.Value == nil || len(*jlrv.Value) == 0
5005}
5006
5007// hasNextLink returns true if the NextLink is not empty.
5008func (jlrv JobListResultV2) hasNextLink() bool {
5009	return jlrv.NextLink != nil && len(*jlrv.NextLink) != 0
5010}
5011
5012// jobListResultV2Preparer prepares a request to retrieve the next set of results.
5013// It returns nil if no more results exist.
5014func (jlrv JobListResultV2) jobListResultV2Preparer(ctx context.Context) (*http.Request, error) {
5015	if !jlrv.hasNextLink() {
5016		return nil, nil
5017	}
5018	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5019		autorest.AsJSON(),
5020		autorest.AsGet(),
5021		autorest.WithBaseURL(to.String(jlrv.NextLink)))
5022}
5023
5024// JobListResultV2Page contains a page of JobCollectionItem values.
5025type JobListResultV2Page struct {
5026	fn   func(context.Context, JobListResultV2) (JobListResultV2, error)
5027	jlrv JobListResultV2
5028}
5029
5030// NextWithContext advances to the next page of values.  If there was an error making
5031// the request the page does not advance and the error is returned.
5032func (page *JobListResultV2Page) NextWithContext(ctx context.Context) (err error) {
5033	if tracing.IsEnabled() {
5034		ctx = tracing.StartSpan(ctx, fqdn+"/JobListResultV2Page.NextWithContext")
5035		defer func() {
5036			sc := -1
5037			if page.Response().Response.Response != nil {
5038				sc = page.Response().Response.Response.StatusCode
5039			}
5040			tracing.EndSpan(ctx, sc, err)
5041		}()
5042	}
5043	for {
5044		next, err := page.fn(ctx, page.jlrv)
5045		if err != nil {
5046			return err
5047		}
5048		page.jlrv = next
5049		if !next.hasNextLink() || !next.IsEmpty() {
5050			break
5051		}
5052	}
5053	return nil
5054}
5055
5056// Next advances to the next page of values.  If there was an error making
5057// the request the page does not advance and the error is returned.
5058// Deprecated: Use NextWithContext() instead.
5059func (page *JobListResultV2Page) Next() error {
5060	return page.NextWithContext(context.Background())
5061}
5062
5063// NotDone returns true if the page enumeration should be started or is not yet complete.
5064func (page JobListResultV2Page) NotDone() bool {
5065	return !page.jlrv.IsEmpty()
5066}
5067
5068// Response returns the raw server response from the last page request.
5069func (page JobListResultV2Page) Response() JobListResultV2 {
5070	return page.jlrv
5071}
5072
5073// Values returns the slice of values for the current page or nil if there are no values.
5074func (page JobListResultV2Page) Values() []JobCollectionItem {
5075	if page.jlrv.IsEmpty() {
5076		return nil
5077	}
5078	return *page.jlrv.Value
5079}
5080
5081// Creates a new instance of the JobListResultV2Page type.
5082func NewJobListResultV2Page(cur JobListResultV2, getNextPage func(context.Context, JobListResultV2) (JobListResultV2, error)) JobListResultV2Page {
5083	return JobListResultV2Page{
5084		fn:   getNextPage,
5085		jlrv: cur,
5086	}
5087}
5088
5089// JobNavigation software update configuration machine run job navigation properties.
5090type JobNavigation struct {
5091	// ID - READ-ONLY; Id of the job associated with the software update configuration run
5092	ID *string `json:"id,omitempty"`
5093}
5094
5095// MarshalJSON is the custom marshaler for JobNavigation.
5096func (jn JobNavigation) MarshalJSON() ([]byte, error) {
5097	objectMap := make(map[string]interface{})
5098	return json.Marshal(objectMap)
5099}
5100
5101// JobProperties definition of job properties.
5102type JobProperties struct {
5103	// Runbook - Gets or sets the runbook.
5104	Runbook *RunbookAssociationProperty `json:"runbook,omitempty"`
5105	// StartedBy - Gets or sets the job started by.
5106	StartedBy *string `json:"startedBy,omitempty"`
5107	// RunOn - Gets or sets the runOn which specifies the group name where the job is to be executed.
5108	RunOn *string `json:"runOn,omitempty"`
5109	// JobID - Gets or sets the id of the job.
5110	JobID *uuid.UUID `json:"jobId,omitempty"`
5111	// CreationTime - Gets or sets the creation time of the job.
5112	CreationTime *date.Time `json:"creationTime,omitempty"`
5113	// Status - Gets or sets the status of the job. Possible values include: 'JobStatusNew', 'JobStatusActivating', 'JobStatusRunning', 'JobStatusCompleted', 'JobStatusFailed', 'JobStatusStopped', 'JobStatusBlocked', 'JobStatusSuspended', 'JobStatusDisconnected', 'JobStatusSuspending', 'JobStatusStopping', 'JobStatusResuming', 'JobStatusRemoving'
5114	Status JobStatus `json:"status,omitempty"`
5115	// StatusDetails - Gets or sets the status details of the job.
5116	StatusDetails *string `json:"statusDetails,omitempty"`
5117	// StartTime - Gets or sets the start time of the job.
5118	StartTime *date.Time `json:"startTime,omitempty"`
5119	// EndTime - Gets or sets the end time of the job.
5120	EndTime *date.Time `json:"endTime,omitempty"`
5121	// Exception - Gets or sets the exception of the job.
5122	Exception *string `json:"exception,omitempty"`
5123	// LastModifiedTime - Gets or sets the last modified time of the job.
5124	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
5125	// LastStatusModifiedTime - Gets or sets the last status modified time of the job.
5126	LastStatusModifiedTime *date.Time `json:"lastStatusModifiedTime,omitempty"`
5127	// Parameters - Gets or sets the parameters of the job.
5128	Parameters map[string]*string `json:"parameters"`
5129	// ProvisioningState - The current provisioning state of the job. Possible values include: 'JobProvisioningStateFailed', 'JobProvisioningStateSucceeded', 'JobProvisioningStateSuspended', 'JobProvisioningStateProcessing'
5130	ProvisioningState JobProvisioningState `json:"provisioningState,omitempty"`
5131}
5132
5133// MarshalJSON is the custom marshaler for JobProperties.
5134func (jp JobProperties) MarshalJSON() ([]byte, error) {
5135	objectMap := make(map[string]interface{})
5136	if jp.Runbook != nil {
5137		objectMap["runbook"] = jp.Runbook
5138	}
5139	if jp.StartedBy != nil {
5140		objectMap["startedBy"] = jp.StartedBy
5141	}
5142	if jp.RunOn != nil {
5143		objectMap["runOn"] = jp.RunOn
5144	}
5145	if jp.JobID != nil {
5146		objectMap["jobId"] = jp.JobID
5147	}
5148	if jp.CreationTime != nil {
5149		objectMap["creationTime"] = jp.CreationTime
5150	}
5151	if jp.Status != "" {
5152		objectMap["status"] = jp.Status
5153	}
5154	if jp.StatusDetails != nil {
5155		objectMap["statusDetails"] = jp.StatusDetails
5156	}
5157	if jp.StartTime != nil {
5158		objectMap["startTime"] = jp.StartTime
5159	}
5160	if jp.EndTime != nil {
5161		objectMap["endTime"] = jp.EndTime
5162	}
5163	if jp.Exception != nil {
5164		objectMap["exception"] = jp.Exception
5165	}
5166	if jp.LastModifiedTime != nil {
5167		objectMap["lastModifiedTime"] = jp.LastModifiedTime
5168	}
5169	if jp.LastStatusModifiedTime != nil {
5170		objectMap["lastStatusModifiedTime"] = jp.LastStatusModifiedTime
5171	}
5172	if jp.Parameters != nil {
5173		objectMap["parameters"] = jp.Parameters
5174	}
5175	if jp.ProvisioningState != "" {
5176		objectMap["provisioningState"] = jp.ProvisioningState
5177	}
5178	return json.Marshal(objectMap)
5179}
5180
5181// JobSchedule definition of the job schedule.
5182type JobSchedule struct {
5183	autorest.Response `json:"-"`
5184	// ID - READ-ONLY; Gets the id of the resource.
5185	ID *string `json:"id,omitempty"`
5186	// Name - READ-ONLY; Gets the name of the variable.
5187	Name *string `json:"name,omitempty"`
5188	// Type - READ-ONLY; Resource type
5189	Type *string `json:"type,omitempty"`
5190	// JobScheduleProperties - Gets or sets the properties of the job schedule.
5191	*JobScheduleProperties `json:"properties,omitempty"`
5192}
5193
5194// MarshalJSON is the custom marshaler for JobSchedule.
5195func (js JobSchedule) MarshalJSON() ([]byte, error) {
5196	objectMap := make(map[string]interface{})
5197	if js.JobScheduleProperties != nil {
5198		objectMap["properties"] = js.JobScheduleProperties
5199	}
5200	return json.Marshal(objectMap)
5201}
5202
5203// UnmarshalJSON is the custom unmarshaler for JobSchedule struct.
5204func (js *JobSchedule) UnmarshalJSON(body []byte) error {
5205	var m map[string]*json.RawMessage
5206	err := json.Unmarshal(body, &m)
5207	if err != nil {
5208		return err
5209	}
5210	for k, v := range m {
5211		switch k {
5212		case "id":
5213			if v != nil {
5214				var ID string
5215				err = json.Unmarshal(*v, &ID)
5216				if err != nil {
5217					return err
5218				}
5219				js.ID = &ID
5220			}
5221		case "name":
5222			if v != nil {
5223				var name string
5224				err = json.Unmarshal(*v, &name)
5225				if err != nil {
5226					return err
5227				}
5228				js.Name = &name
5229			}
5230		case "type":
5231			if v != nil {
5232				var typeVar string
5233				err = json.Unmarshal(*v, &typeVar)
5234				if err != nil {
5235					return err
5236				}
5237				js.Type = &typeVar
5238			}
5239		case "properties":
5240			if v != nil {
5241				var jobScheduleProperties JobScheduleProperties
5242				err = json.Unmarshal(*v, &jobScheduleProperties)
5243				if err != nil {
5244					return err
5245				}
5246				js.JobScheduleProperties = &jobScheduleProperties
5247			}
5248		}
5249	}
5250
5251	return nil
5252}
5253
5254// JobScheduleCreateParameters the parameters supplied to the create job schedule operation.
5255type JobScheduleCreateParameters struct {
5256	// JobScheduleCreateProperties - Gets or sets the list of job schedule properties.
5257	*JobScheduleCreateProperties `json:"properties,omitempty"`
5258}
5259
5260// MarshalJSON is the custom marshaler for JobScheduleCreateParameters.
5261func (jscp JobScheduleCreateParameters) MarshalJSON() ([]byte, error) {
5262	objectMap := make(map[string]interface{})
5263	if jscp.JobScheduleCreateProperties != nil {
5264		objectMap["properties"] = jscp.JobScheduleCreateProperties
5265	}
5266	return json.Marshal(objectMap)
5267}
5268
5269// UnmarshalJSON is the custom unmarshaler for JobScheduleCreateParameters struct.
5270func (jscp *JobScheduleCreateParameters) UnmarshalJSON(body []byte) error {
5271	var m map[string]*json.RawMessage
5272	err := json.Unmarshal(body, &m)
5273	if err != nil {
5274		return err
5275	}
5276	for k, v := range m {
5277		switch k {
5278		case "properties":
5279			if v != nil {
5280				var jobScheduleCreateProperties JobScheduleCreateProperties
5281				err = json.Unmarshal(*v, &jobScheduleCreateProperties)
5282				if err != nil {
5283					return err
5284				}
5285				jscp.JobScheduleCreateProperties = &jobScheduleCreateProperties
5286			}
5287		}
5288	}
5289
5290	return nil
5291}
5292
5293// JobScheduleCreateProperties the parameters supplied to the create job schedule operation.
5294type JobScheduleCreateProperties struct {
5295	// Schedule - Gets or sets the schedule.
5296	Schedule *ScheduleAssociationProperty `json:"schedule,omitempty"`
5297	// Runbook - Gets or sets the runbook.
5298	Runbook *RunbookAssociationProperty `json:"runbook,omitempty"`
5299	// RunOn - Gets or sets the hybrid worker group that the scheduled job should run on.
5300	RunOn *string `json:"runOn,omitempty"`
5301	// Parameters - Gets or sets a list of job properties.
5302	Parameters map[string]*string `json:"parameters"`
5303}
5304
5305// MarshalJSON is the custom marshaler for JobScheduleCreateProperties.
5306func (jscp JobScheduleCreateProperties) MarshalJSON() ([]byte, error) {
5307	objectMap := make(map[string]interface{})
5308	if jscp.Schedule != nil {
5309		objectMap["schedule"] = jscp.Schedule
5310	}
5311	if jscp.Runbook != nil {
5312		objectMap["runbook"] = jscp.Runbook
5313	}
5314	if jscp.RunOn != nil {
5315		objectMap["runOn"] = jscp.RunOn
5316	}
5317	if jscp.Parameters != nil {
5318		objectMap["parameters"] = jscp.Parameters
5319	}
5320	return json.Marshal(objectMap)
5321}
5322
5323// JobScheduleListResult the response model for the list job schedule operation.
5324type JobScheduleListResult struct {
5325	autorest.Response `json:"-"`
5326	// Value - Gets or sets a list of job schedules.
5327	Value *[]JobSchedule `json:"value,omitempty"`
5328	// NextLink - Gets or sets the next link.
5329	NextLink *string `json:"nextLink,omitempty"`
5330}
5331
5332// JobScheduleListResultIterator provides access to a complete listing of JobSchedule values.
5333type JobScheduleListResultIterator struct {
5334	i    int
5335	page JobScheduleListResultPage
5336}
5337
5338// NextWithContext advances to the next value.  If there was an error making
5339// the request the iterator does not advance and the error is returned.
5340func (iter *JobScheduleListResultIterator) NextWithContext(ctx context.Context) (err error) {
5341	if tracing.IsEnabled() {
5342		ctx = tracing.StartSpan(ctx, fqdn+"/JobScheduleListResultIterator.NextWithContext")
5343		defer func() {
5344			sc := -1
5345			if iter.Response().Response.Response != nil {
5346				sc = iter.Response().Response.Response.StatusCode
5347			}
5348			tracing.EndSpan(ctx, sc, err)
5349		}()
5350	}
5351	iter.i++
5352	if iter.i < len(iter.page.Values()) {
5353		return nil
5354	}
5355	err = iter.page.NextWithContext(ctx)
5356	if err != nil {
5357		iter.i--
5358		return err
5359	}
5360	iter.i = 0
5361	return nil
5362}
5363
5364// Next advances to the next value.  If there was an error making
5365// the request the iterator does not advance and the error is returned.
5366// Deprecated: Use NextWithContext() instead.
5367func (iter *JobScheduleListResultIterator) Next() error {
5368	return iter.NextWithContext(context.Background())
5369}
5370
5371// NotDone returns true if the enumeration should be started or is not yet complete.
5372func (iter JobScheduleListResultIterator) NotDone() bool {
5373	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5374}
5375
5376// Response returns the raw server response from the last page request.
5377func (iter JobScheduleListResultIterator) Response() JobScheduleListResult {
5378	return iter.page.Response()
5379}
5380
5381// Value returns the current value or a zero-initialized value if the
5382// iterator has advanced beyond the end of the collection.
5383func (iter JobScheduleListResultIterator) Value() JobSchedule {
5384	if !iter.page.NotDone() {
5385		return JobSchedule{}
5386	}
5387	return iter.page.Values()[iter.i]
5388}
5389
5390// Creates a new instance of the JobScheduleListResultIterator type.
5391func NewJobScheduleListResultIterator(page JobScheduleListResultPage) JobScheduleListResultIterator {
5392	return JobScheduleListResultIterator{page: page}
5393}
5394
5395// IsEmpty returns true if the ListResult contains no values.
5396func (jslr JobScheduleListResult) IsEmpty() bool {
5397	return jslr.Value == nil || len(*jslr.Value) == 0
5398}
5399
5400// hasNextLink returns true if the NextLink is not empty.
5401func (jslr JobScheduleListResult) hasNextLink() bool {
5402	return jslr.NextLink != nil && len(*jslr.NextLink) != 0
5403}
5404
5405// jobScheduleListResultPreparer prepares a request to retrieve the next set of results.
5406// It returns nil if no more results exist.
5407func (jslr JobScheduleListResult) jobScheduleListResultPreparer(ctx context.Context) (*http.Request, error) {
5408	if !jslr.hasNextLink() {
5409		return nil, nil
5410	}
5411	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5412		autorest.AsJSON(),
5413		autorest.AsGet(),
5414		autorest.WithBaseURL(to.String(jslr.NextLink)))
5415}
5416
5417// JobScheduleListResultPage contains a page of JobSchedule values.
5418type JobScheduleListResultPage struct {
5419	fn   func(context.Context, JobScheduleListResult) (JobScheduleListResult, error)
5420	jslr JobScheduleListResult
5421}
5422
5423// NextWithContext advances to the next page of values.  If there was an error making
5424// the request the page does not advance and the error is returned.
5425func (page *JobScheduleListResultPage) NextWithContext(ctx context.Context) (err error) {
5426	if tracing.IsEnabled() {
5427		ctx = tracing.StartSpan(ctx, fqdn+"/JobScheduleListResultPage.NextWithContext")
5428		defer func() {
5429			sc := -1
5430			if page.Response().Response.Response != nil {
5431				sc = page.Response().Response.Response.StatusCode
5432			}
5433			tracing.EndSpan(ctx, sc, err)
5434		}()
5435	}
5436	for {
5437		next, err := page.fn(ctx, page.jslr)
5438		if err != nil {
5439			return err
5440		}
5441		page.jslr = next
5442		if !next.hasNextLink() || !next.IsEmpty() {
5443			break
5444		}
5445	}
5446	return nil
5447}
5448
5449// Next advances to the next page of values.  If there was an error making
5450// the request the page does not advance and the error is returned.
5451// Deprecated: Use NextWithContext() instead.
5452func (page *JobScheduleListResultPage) Next() error {
5453	return page.NextWithContext(context.Background())
5454}
5455
5456// NotDone returns true if the page enumeration should be started or is not yet complete.
5457func (page JobScheduleListResultPage) NotDone() bool {
5458	return !page.jslr.IsEmpty()
5459}
5460
5461// Response returns the raw server response from the last page request.
5462func (page JobScheduleListResultPage) Response() JobScheduleListResult {
5463	return page.jslr
5464}
5465
5466// Values returns the slice of values for the current page or nil if there are no values.
5467func (page JobScheduleListResultPage) Values() []JobSchedule {
5468	if page.jslr.IsEmpty() {
5469		return nil
5470	}
5471	return *page.jslr.Value
5472}
5473
5474// Creates a new instance of the JobScheduleListResultPage type.
5475func NewJobScheduleListResultPage(cur JobScheduleListResult, getNextPage func(context.Context, JobScheduleListResult) (JobScheduleListResult, error)) JobScheduleListResultPage {
5476	return JobScheduleListResultPage{
5477		fn:   getNextPage,
5478		jslr: cur,
5479	}
5480}
5481
5482// JobScheduleProperties definition of job schedule parameters.
5483type JobScheduleProperties struct {
5484	// JobScheduleID - Gets or sets the id of job schedule.
5485	JobScheduleID *string `json:"jobScheduleId,omitempty"`
5486	// Schedule - Gets or sets the schedule.
5487	Schedule *ScheduleAssociationProperty `json:"schedule,omitempty"`
5488	// Runbook - Gets or sets the runbook.
5489	Runbook *RunbookAssociationProperty `json:"runbook,omitempty"`
5490	// RunOn - Gets or sets the hybrid worker group that the scheduled job should run on.
5491	RunOn *string `json:"runOn,omitempty"`
5492	// Parameters - Gets or sets the parameters of the job schedule.
5493	Parameters map[string]*string `json:"parameters"`
5494}
5495
5496// MarshalJSON is the custom marshaler for JobScheduleProperties.
5497func (jsp JobScheduleProperties) MarshalJSON() ([]byte, error) {
5498	objectMap := make(map[string]interface{})
5499	if jsp.JobScheduleID != nil {
5500		objectMap["jobScheduleId"] = jsp.JobScheduleID
5501	}
5502	if jsp.Schedule != nil {
5503		objectMap["schedule"] = jsp.Schedule
5504	}
5505	if jsp.Runbook != nil {
5506		objectMap["runbook"] = jsp.Runbook
5507	}
5508	if jsp.RunOn != nil {
5509		objectMap["runOn"] = jsp.RunOn
5510	}
5511	if jsp.Parameters != nil {
5512		objectMap["parameters"] = jsp.Parameters
5513	}
5514	return json.Marshal(objectMap)
5515}
5516
5517// JobStream definition of the job stream.
5518type JobStream struct {
5519	autorest.Response `json:"-"`
5520	// ID - Gets or sets the id of the resource.
5521	ID *string `json:"id,omitempty"`
5522	// JobStreamProperties - Gets or sets the id of the job stream.
5523	*JobStreamProperties `json:"properties,omitempty"`
5524}
5525
5526// MarshalJSON is the custom marshaler for JobStream.
5527func (js JobStream) MarshalJSON() ([]byte, error) {
5528	objectMap := make(map[string]interface{})
5529	if js.ID != nil {
5530		objectMap["id"] = js.ID
5531	}
5532	if js.JobStreamProperties != nil {
5533		objectMap["properties"] = js.JobStreamProperties
5534	}
5535	return json.Marshal(objectMap)
5536}
5537
5538// UnmarshalJSON is the custom unmarshaler for JobStream struct.
5539func (js *JobStream) UnmarshalJSON(body []byte) error {
5540	var m map[string]*json.RawMessage
5541	err := json.Unmarshal(body, &m)
5542	if err != nil {
5543		return err
5544	}
5545	for k, v := range m {
5546		switch k {
5547		case "id":
5548			if v != nil {
5549				var ID string
5550				err = json.Unmarshal(*v, &ID)
5551				if err != nil {
5552					return err
5553				}
5554				js.ID = &ID
5555			}
5556		case "properties":
5557			if v != nil {
5558				var jobStreamProperties JobStreamProperties
5559				err = json.Unmarshal(*v, &jobStreamProperties)
5560				if err != nil {
5561					return err
5562				}
5563				js.JobStreamProperties = &jobStreamProperties
5564			}
5565		}
5566	}
5567
5568	return nil
5569}
5570
5571// JobStreamListResult the response model for the list job stream operation.
5572type JobStreamListResult struct {
5573	autorest.Response `json:"-"`
5574	// Value - A list of job streams.
5575	Value *[]JobStream `json:"value,omitempty"`
5576	// NextLink - Gets or sets the next link.
5577	NextLink *string `json:"nextLink,omitempty"`
5578}
5579
5580// JobStreamListResultIterator provides access to a complete listing of JobStream values.
5581type JobStreamListResultIterator struct {
5582	i    int
5583	page JobStreamListResultPage
5584}
5585
5586// NextWithContext advances to the next value.  If there was an error making
5587// the request the iterator does not advance and the error is returned.
5588func (iter *JobStreamListResultIterator) NextWithContext(ctx context.Context) (err error) {
5589	if tracing.IsEnabled() {
5590		ctx = tracing.StartSpan(ctx, fqdn+"/JobStreamListResultIterator.NextWithContext")
5591		defer func() {
5592			sc := -1
5593			if iter.Response().Response.Response != nil {
5594				sc = iter.Response().Response.Response.StatusCode
5595			}
5596			tracing.EndSpan(ctx, sc, err)
5597		}()
5598	}
5599	iter.i++
5600	if iter.i < len(iter.page.Values()) {
5601		return nil
5602	}
5603	err = iter.page.NextWithContext(ctx)
5604	if err != nil {
5605		iter.i--
5606		return err
5607	}
5608	iter.i = 0
5609	return nil
5610}
5611
5612// Next advances to the next value.  If there was an error making
5613// the request the iterator does not advance and the error is returned.
5614// Deprecated: Use NextWithContext() instead.
5615func (iter *JobStreamListResultIterator) Next() error {
5616	return iter.NextWithContext(context.Background())
5617}
5618
5619// NotDone returns true if the enumeration should be started or is not yet complete.
5620func (iter JobStreamListResultIterator) NotDone() bool {
5621	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5622}
5623
5624// Response returns the raw server response from the last page request.
5625func (iter JobStreamListResultIterator) Response() JobStreamListResult {
5626	return iter.page.Response()
5627}
5628
5629// Value returns the current value or a zero-initialized value if the
5630// iterator has advanced beyond the end of the collection.
5631func (iter JobStreamListResultIterator) Value() JobStream {
5632	if !iter.page.NotDone() {
5633		return JobStream{}
5634	}
5635	return iter.page.Values()[iter.i]
5636}
5637
5638// Creates a new instance of the JobStreamListResultIterator type.
5639func NewJobStreamListResultIterator(page JobStreamListResultPage) JobStreamListResultIterator {
5640	return JobStreamListResultIterator{page: page}
5641}
5642
5643// IsEmpty returns true if the ListResult contains no values.
5644func (jslr JobStreamListResult) IsEmpty() bool {
5645	return jslr.Value == nil || len(*jslr.Value) == 0
5646}
5647
5648// hasNextLink returns true if the NextLink is not empty.
5649func (jslr JobStreamListResult) hasNextLink() bool {
5650	return jslr.NextLink != nil && len(*jslr.NextLink) != 0
5651}
5652
5653// jobStreamListResultPreparer prepares a request to retrieve the next set of results.
5654// It returns nil if no more results exist.
5655func (jslr JobStreamListResult) jobStreamListResultPreparer(ctx context.Context) (*http.Request, error) {
5656	if !jslr.hasNextLink() {
5657		return nil, nil
5658	}
5659	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5660		autorest.AsJSON(),
5661		autorest.AsGet(),
5662		autorest.WithBaseURL(to.String(jslr.NextLink)))
5663}
5664
5665// JobStreamListResultPage contains a page of JobStream values.
5666type JobStreamListResultPage struct {
5667	fn   func(context.Context, JobStreamListResult) (JobStreamListResult, error)
5668	jslr JobStreamListResult
5669}
5670
5671// NextWithContext advances to the next page of values.  If there was an error making
5672// the request the page does not advance and the error is returned.
5673func (page *JobStreamListResultPage) NextWithContext(ctx context.Context) (err error) {
5674	if tracing.IsEnabled() {
5675		ctx = tracing.StartSpan(ctx, fqdn+"/JobStreamListResultPage.NextWithContext")
5676		defer func() {
5677			sc := -1
5678			if page.Response().Response.Response != nil {
5679				sc = page.Response().Response.Response.StatusCode
5680			}
5681			tracing.EndSpan(ctx, sc, err)
5682		}()
5683	}
5684	for {
5685		next, err := page.fn(ctx, page.jslr)
5686		if err != nil {
5687			return err
5688		}
5689		page.jslr = next
5690		if !next.hasNextLink() || !next.IsEmpty() {
5691			break
5692		}
5693	}
5694	return nil
5695}
5696
5697// Next advances to the next page of values.  If there was an error making
5698// the request the page does not advance and the error is returned.
5699// Deprecated: Use NextWithContext() instead.
5700func (page *JobStreamListResultPage) Next() error {
5701	return page.NextWithContext(context.Background())
5702}
5703
5704// NotDone returns true if the page enumeration should be started or is not yet complete.
5705func (page JobStreamListResultPage) NotDone() bool {
5706	return !page.jslr.IsEmpty()
5707}
5708
5709// Response returns the raw server response from the last page request.
5710func (page JobStreamListResultPage) Response() JobStreamListResult {
5711	return page.jslr
5712}
5713
5714// Values returns the slice of values for the current page or nil if there are no values.
5715func (page JobStreamListResultPage) Values() []JobStream {
5716	if page.jslr.IsEmpty() {
5717		return nil
5718	}
5719	return *page.jslr.Value
5720}
5721
5722// Creates a new instance of the JobStreamListResultPage type.
5723func NewJobStreamListResultPage(cur JobStreamListResult, getNextPage func(context.Context, JobStreamListResult) (JobStreamListResult, error)) JobStreamListResultPage {
5724	return JobStreamListResultPage{
5725		fn:   getNextPage,
5726		jslr: cur,
5727	}
5728}
5729
5730// JobStreamProperties definition of the job stream.
5731type JobStreamProperties struct {
5732	// JobStreamID - Gets or sets the id of the job stream.
5733	JobStreamID *string `json:"jobStreamId,omitempty"`
5734	// Time - Gets or sets the creation time of the job.
5735	Time *date.Time `json:"time,omitempty"`
5736	// StreamType - Gets or sets the stream type. Possible values include: 'Progress', 'Output', 'Warning', 'Error', 'Debug', 'Verbose', 'Any'
5737	StreamType JobStreamType `json:"streamType,omitempty"`
5738	// StreamText - Gets or sets the stream text.
5739	StreamText *string `json:"streamText,omitempty"`
5740	// Summary - Gets or sets the summary.
5741	Summary *string `json:"summary,omitempty"`
5742	// Value - Gets or sets the values of the job stream.
5743	Value map[string]interface{} `json:"value"`
5744}
5745
5746// MarshalJSON is the custom marshaler for JobStreamProperties.
5747func (jsp JobStreamProperties) MarshalJSON() ([]byte, error) {
5748	objectMap := make(map[string]interface{})
5749	if jsp.JobStreamID != nil {
5750		objectMap["jobStreamId"] = jsp.JobStreamID
5751	}
5752	if jsp.Time != nil {
5753		objectMap["time"] = jsp.Time
5754	}
5755	if jsp.StreamType != "" {
5756		objectMap["streamType"] = jsp.StreamType
5757	}
5758	if jsp.StreamText != nil {
5759		objectMap["streamText"] = jsp.StreamText
5760	}
5761	if jsp.Summary != nil {
5762		objectMap["summary"] = jsp.Summary
5763	}
5764	if jsp.Value != nil {
5765		objectMap["value"] = jsp.Value
5766	}
5767	return json.Marshal(objectMap)
5768}
5769
5770// Key automation key which is used to register a DSC Node
5771type Key struct {
5772	// KeyName - READ-ONLY; Automation key name. Possible values include: 'KeyNamePrimary', 'KeyNameSecondary'
5773	KeyName KeyName `json:"KeyName,omitempty"`
5774	// Permissions - READ-ONLY; Automation key permissions. Possible values include: 'Read', 'Full'
5775	Permissions KeyPermissions `json:"Permissions,omitempty"`
5776	// Value - READ-ONLY; Value of the Automation Key used for registration.
5777	Value *string `json:"Value,omitempty"`
5778}
5779
5780// MarshalJSON is the custom marshaler for Key.
5781func (kVar Key) MarshalJSON() ([]byte, error) {
5782	objectMap := make(map[string]interface{})
5783	return json.Marshal(objectMap)
5784}
5785
5786// KeyListResult ...
5787type KeyListResult struct {
5788	autorest.Response `json:"-"`
5789	// Keys - Lists the automation keys.
5790	Keys *[]Key `json:"keys,omitempty"`
5791}
5792
5793// LinkedWorkspace definition of the linked workspace.
5794type LinkedWorkspace struct {
5795	autorest.Response `json:"-"`
5796	// ID - READ-ONLY; Gets the id of the linked workspace.
5797	ID *string `json:"id,omitempty"`
5798}
5799
5800// MarshalJSON is the custom marshaler for LinkedWorkspace.
5801func (lw LinkedWorkspace) MarshalJSON() ([]byte, error) {
5802	objectMap := make(map[string]interface{})
5803	return json.Marshal(objectMap)
5804}
5805
5806// LinuxProperties linux specific update configuration.
5807type LinuxProperties struct {
5808	// IncludedPackageClassifications - Update classifications included in the software update configuration. Possible values include: 'Unclassified', 'Critical', 'Security', 'Other'
5809	IncludedPackageClassifications LinuxUpdateClasses `json:"includedPackageClassifications,omitempty"`
5810	// ExcludedPackageNameMasks - packages excluded from the software update configuration.
5811	ExcludedPackageNameMasks *[]string `json:"excludedPackageNameMasks,omitempty"`
5812	// IncludedPackageNameMasks - packages included from the software update configuration.
5813	IncludedPackageNameMasks *[]string `json:"includedPackageNameMasks,omitempty"`
5814	// RebootSetting - Reboot setting for the software update configuration.
5815	RebootSetting *string `json:"rebootSetting,omitempty"`
5816}
5817
5818// Module definition of the module type.
5819type Module struct {
5820	autorest.Response `json:"-"`
5821	// ModuleProperties - Gets or sets the module properties.
5822	*ModuleProperties `json:"properties,omitempty"`
5823	// Etag - Gets or sets the etag of the resource.
5824	Etag *string `json:"etag,omitempty"`
5825	// Tags - Resource tags.
5826	Tags map[string]*string `json:"tags"`
5827	// Location - The Azure Region where the resource lives
5828	Location *string `json:"location,omitempty"`
5829	// ID - READ-ONLY; Fully qualified resource Id for the resource
5830	ID *string `json:"id,omitempty"`
5831	// Name - READ-ONLY; The name of the resource
5832	Name *string `json:"name,omitempty"`
5833	// Type - READ-ONLY; The type of the resource.
5834	Type *string `json:"type,omitempty"`
5835}
5836
5837// MarshalJSON is the custom marshaler for Module.
5838func (mVar Module) MarshalJSON() ([]byte, error) {
5839	objectMap := make(map[string]interface{})
5840	if mVar.ModuleProperties != nil {
5841		objectMap["properties"] = mVar.ModuleProperties
5842	}
5843	if mVar.Etag != nil {
5844		objectMap["etag"] = mVar.Etag
5845	}
5846	if mVar.Tags != nil {
5847		objectMap["tags"] = mVar.Tags
5848	}
5849	if mVar.Location != nil {
5850		objectMap["location"] = mVar.Location
5851	}
5852	return json.Marshal(objectMap)
5853}
5854
5855// UnmarshalJSON is the custom unmarshaler for Module struct.
5856func (mVar *Module) UnmarshalJSON(body []byte) error {
5857	var m map[string]*json.RawMessage
5858	err := json.Unmarshal(body, &m)
5859	if err != nil {
5860		return err
5861	}
5862	for k, v := range m {
5863		switch k {
5864		case "properties":
5865			if v != nil {
5866				var moduleProperties ModuleProperties
5867				err = json.Unmarshal(*v, &moduleProperties)
5868				if err != nil {
5869					return err
5870				}
5871				mVar.ModuleProperties = &moduleProperties
5872			}
5873		case "etag":
5874			if v != nil {
5875				var etag string
5876				err = json.Unmarshal(*v, &etag)
5877				if err != nil {
5878					return err
5879				}
5880				mVar.Etag = &etag
5881			}
5882		case "tags":
5883			if v != nil {
5884				var tags map[string]*string
5885				err = json.Unmarshal(*v, &tags)
5886				if err != nil {
5887					return err
5888				}
5889				mVar.Tags = tags
5890			}
5891		case "location":
5892			if v != nil {
5893				var location string
5894				err = json.Unmarshal(*v, &location)
5895				if err != nil {
5896					return err
5897				}
5898				mVar.Location = &location
5899			}
5900		case "id":
5901			if v != nil {
5902				var ID string
5903				err = json.Unmarshal(*v, &ID)
5904				if err != nil {
5905					return err
5906				}
5907				mVar.ID = &ID
5908			}
5909		case "name":
5910			if v != nil {
5911				var name string
5912				err = json.Unmarshal(*v, &name)
5913				if err != nil {
5914					return err
5915				}
5916				mVar.Name = &name
5917			}
5918		case "type":
5919			if v != nil {
5920				var typeVar string
5921				err = json.Unmarshal(*v, &typeVar)
5922				if err != nil {
5923					return err
5924				}
5925				mVar.Type = &typeVar
5926			}
5927		}
5928	}
5929
5930	return nil
5931}
5932
5933// ModuleCreateOrUpdateParameters the parameters supplied to the create or update module operation.
5934type ModuleCreateOrUpdateParameters struct {
5935	// ModuleCreateOrUpdateProperties - Gets or sets the module create properties.
5936	*ModuleCreateOrUpdateProperties `json:"properties,omitempty"`
5937	// Name - Gets or sets name of the resource.
5938	Name *string `json:"name,omitempty"`
5939	// Location - Gets or sets the location of the resource.
5940	Location *string `json:"location,omitempty"`
5941	// Tags - Gets or sets the tags attached to the resource.
5942	Tags map[string]*string `json:"tags"`
5943}
5944
5945// MarshalJSON is the custom marshaler for ModuleCreateOrUpdateParameters.
5946func (mcoup ModuleCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
5947	objectMap := make(map[string]interface{})
5948	if mcoup.ModuleCreateOrUpdateProperties != nil {
5949		objectMap["properties"] = mcoup.ModuleCreateOrUpdateProperties
5950	}
5951	if mcoup.Name != nil {
5952		objectMap["name"] = mcoup.Name
5953	}
5954	if mcoup.Location != nil {
5955		objectMap["location"] = mcoup.Location
5956	}
5957	if mcoup.Tags != nil {
5958		objectMap["tags"] = mcoup.Tags
5959	}
5960	return json.Marshal(objectMap)
5961}
5962
5963// UnmarshalJSON is the custom unmarshaler for ModuleCreateOrUpdateParameters struct.
5964func (mcoup *ModuleCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
5965	var m map[string]*json.RawMessage
5966	err := json.Unmarshal(body, &m)
5967	if err != nil {
5968		return err
5969	}
5970	for k, v := range m {
5971		switch k {
5972		case "properties":
5973			if v != nil {
5974				var moduleCreateOrUpdateProperties ModuleCreateOrUpdateProperties
5975				err = json.Unmarshal(*v, &moduleCreateOrUpdateProperties)
5976				if err != nil {
5977					return err
5978				}
5979				mcoup.ModuleCreateOrUpdateProperties = &moduleCreateOrUpdateProperties
5980			}
5981		case "name":
5982			if v != nil {
5983				var name string
5984				err = json.Unmarshal(*v, &name)
5985				if err != nil {
5986					return err
5987				}
5988				mcoup.Name = &name
5989			}
5990		case "location":
5991			if v != nil {
5992				var location string
5993				err = json.Unmarshal(*v, &location)
5994				if err != nil {
5995					return err
5996				}
5997				mcoup.Location = &location
5998			}
5999		case "tags":
6000			if v != nil {
6001				var tags map[string]*string
6002				err = json.Unmarshal(*v, &tags)
6003				if err != nil {
6004					return err
6005				}
6006				mcoup.Tags = tags
6007			}
6008		}
6009	}
6010
6011	return nil
6012}
6013
6014// ModuleCreateOrUpdateProperties the parameters supplied to the create or update module properties.
6015type ModuleCreateOrUpdateProperties struct {
6016	// ContentLink - Gets or sets the module content link.
6017	ContentLink *ContentLink `json:"contentLink,omitempty"`
6018}
6019
6020// ModuleErrorInfo definition of the module error info type.
6021type ModuleErrorInfo struct {
6022	// Code - Gets or sets the error code.
6023	Code *string `json:"code,omitempty"`
6024	// Message - Gets or sets the error message.
6025	Message *string `json:"message,omitempty"`
6026}
6027
6028// ModuleListResult the response model for the list module operation.
6029type ModuleListResult struct {
6030	autorest.Response `json:"-"`
6031	// Value - Gets or sets a list of modules.
6032	Value *[]Module `json:"value,omitempty"`
6033	// NextLink - Gets or sets the next link.
6034	NextLink *string `json:"nextLink,omitempty"`
6035}
6036
6037// ModuleListResultIterator provides access to a complete listing of Module values.
6038type ModuleListResultIterator struct {
6039	i    int
6040	page ModuleListResultPage
6041}
6042
6043// NextWithContext advances to the next value.  If there was an error making
6044// the request the iterator does not advance and the error is returned.
6045func (iter *ModuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
6046	if tracing.IsEnabled() {
6047		ctx = tracing.StartSpan(ctx, fqdn+"/ModuleListResultIterator.NextWithContext")
6048		defer func() {
6049			sc := -1
6050			if iter.Response().Response.Response != nil {
6051				sc = iter.Response().Response.Response.StatusCode
6052			}
6053			tracing.EndSpan(ctx, sc, err)
6054		}()
6055	}
6056	iter.i++
6057	if iter.i < len(iter.page.Values()) {
6058		return nil
6059	}
6060	err = iter.page.NextWithContext(ctx)
6061	if err != nil {
6062		iter.i--
6063		return err
6064	}
6065	iter.i = 0
6066	return nil
6067}
6068
6069// Next advances to the next value.  If there was an error making
6070// the request the iterator does not advance and the error is returned.
6071// Deprecated: Use NextWithContext() instead.
6072func (iter *ModuleListResultIterator) Next() error {
6073	return iter.NextWithContext(context.Background())
6074}
6075
6076// NotDone returns true if the enumeration should be started or is not yet complete.
6077func (iter ModuleListResultIterator) NotDone() bool {
6078	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6079}
6080
6081// Response returns the raw server response from the last page request.
6082func (iter ModuleListResultIterator) Response() ModuleListResult {
6083	return iter.page.Response()
6084}
6085
6086// Value returns the current value or a zero-initialized value if the
6087// iterator has advanced beyond the end of the collection.
6088func (iter ModuleListResultIterator) Value() Module {
6089	if !iter.page.NotDone() {
6090		return Module{}
6091	}
6092	return iter.page.Values()[iter.i]
6093}
6094
6095// Creates a new instance of the ModuleListResultIterator type.
6096func NewModuleListResultIterator(page ModuleListResultPage) ModuleListResultIterator {
6097	return ModuleListResultIterator{page: page}
6098}
6099
6100// IsEmpty returns true if the ListResult contains no values.
6101func (mlr ModuleListResult) IsEmpty() bool {
6102	return mlr.Value == nil || len(*mlr.Value) == 0
6103}
6104
6105// hasNextLink returns true if the NextLink is not empty.
6106func (mlr ModuleListResult) hasNextLink() bool {
6107	return mlr.NextLink != nil && len(*mlr.NextLink) != 0
6108}
6109
6110// moduleListResultPreparer prepares a request to retrieve the next set of results.
6111// It returns nil if no more results exist.
6112func (mlr ModuleListResult) moduleListResultPreparer(ctx context.Context) (*http.Request, error) {
6113	if !mlr.hasNextLink() {
6114		return nil, nil
6115	}
6116	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6117		autorest.AsJSON(),
6118		autorest.AsGet(),
6119		autorest.WithBaseURL(to.String(mlr.NextLink)))
6120}
6121
6122// ModuleListResultPage contains a page of Module values.
6123type ModuleListResultPage struct {
6124	fn  func(context.Context, ModuleListResult) (ModuleListResult, error)
6125	mlr ModuleListResult
6126}
6127
6128// NextWithContext advances to the next page of values.  If there was an error making
6129// the request the page does not advance and the error is returned.
6130func (page *ModuleListResultPage) NextWithContext(ctx context.Context) (err error) {
6131	if tracing.IsEnabled() {
6132		ctx = tracing.StartSpan(ctx, fqdn+"/ModuleListResultPage.NextWithContext")
6133		defer func() {
6134			sc := -1
6135			if page.Response().Response.Response != nil {
6136				sc = page.Response().Response.Response.StatusCode
6137			}
6138			tracing.EndSpan(ctx, sc, err)
6139		}()
6140	}
6141	for {
6142		next, err := page.fn(ctx, page.mlr)
6143		if err != nil {
6144			return err
6145		}
6146		page.mlr = next
6147		if !next.hasNextLink() || !next.IsEmpty() {
6148			break
6149		}
6150	}
6151	return nil
6152}
6153
6154// Next advances to the next page of values.  If there was an error making
6155// the request the page does not advance and the error is returned.
6156// Deprecated: Use NextWithContext() instead.
6157func (page *ModuleListResultPage) Next() error {
6158	return page.NextWithContext(context.Background())
6159}
6160
6161// NotDone returns true if the page enumeration should be started or is not yet complete.
6162func (page ModuleListResultPage) NotDone() bool {
6163	return !page.mlr.IsEmpty()
6164}
6165
6166// Response returns the raw server response from the last page request.
6167func (page ModuleListResultPage) Response() ModuleListResult {
6168	return page.mlr
6169}
6170
6171// Values returns the slice of values for the current page or nil if there are no values.
6172func (page ModuleListResultPage) Values() []Module {
6173	if page.mlr.IsEmpty() {
6174		return nil
6175	}
6176	return *page.mlr.Value
6177}
6178
6179// Creates a new instance of the ModuleListResultPage type.
6180func NewModuleListResultPage(cur ModuleListResult, getNextPage func(context.Context, ModuleListResult) (ModuleListResult, error)) ModuleListResultPage {
6181	return ModuleListResultPage{
6182		fn:  getNextPage,
6183		mlr: cur,
6184	}
6185}
6186
6187// ModuleProperties definition of the module property type.
6188type ModuleProperties struct {
6189	// IsGlobal - Gets or sets the isGlobal flag of the module.
6190	IsGlobal *bool `json:"isGlobal,omitempty"`
6191	// Version - Gets or sets the version of the module.
6192	Version *string `json:"version,omitempty"`
6193	// SizeInBytes - Gets or sets the size in bytes of the module.
6194	SizeInBytes *int64 `json:"sizeInBytes,omitempty"`
6195	// ActivityCount - Gets or sets the activity count of the module.
6196	ActivityCount *int32 `json:"activityCount,omitempty"`
6197	// ProvisioningState - Gets or sets the provisioning state of the module. Possible values include: 'ModuleProvisioningStateCreated', 'ModuleProvisioningStateCreating', 'ModuleProvisioningStateStartingImportModuleRunbook', 'ModuleProvisioningStateRunningImportModuleRunbook', 'ModuleProvisioningStateContentRetrieved', 'ModuleProvisioningStateContentDownloaded', 'ModuleProvisioningStateContentValidated', 'ModuleProvisioningStateConnectionTypeImported', 'ModuleProvisioningStateContentStored', 'ModuleProvisioningStateModuleDataStored', 'ModuleProvisioningStateActivitiesStored', 'ModuleProvisioningStateModuleImportRunbookComplete', 'ModuleProvisioningStateSucceeded', 'ModuleProvisioningStateFailed', 'ModuleProvisioningStateCancelled', 'ModuleProvisioningStateUpdating'
6198	ProvisioningState ModuleProvisioningState `json:"provisioningState,omitempty"`
6199	// ContentLink - Gets or sets the contentLink of the module.
6200	ContentLink *ContentLink `json:"contentLink,omitempty"`
6201	// Error - Gets or sets the error info of the module.
6202	Error *ModuleErrorInfo `json:"error,omitempty"`
6203	// CreationTime - Gets or sets the creation time.
6204	CreationTime *date.Time `json:"creationTime,omitempty"`
6205	// LastModifiedTime - Gets or sets the last modified time.
6206	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
6207	// Description - Gets or sets the description.
6208	Description *string `json:"description,omitempty"`
6209	// IsComposite - Gets or sets type of module, if its composite or not.
6210	IsComposite *bool `json:"isComposite,omitempty"`
6211}
6212
6213// ModuleUpdateParameters the parameters supplied to the update module operation.
6214type ModuleUpdateParameters struct {
6215	// ModuleUpdateProperties - Gets or sets the module update properties.
6216	*ModuleUpdateProperties `json:"properties,omitempty"`
6217	// Name - Gets or sets name of the resource.
6218	Name *string `json:"name,omitempty"`
6219	// Location - Gets or sets the location of the resource.
6220	Location *string `json:"location,omitempty"`
6221	// Tags - Gets or sets the tags attached to the resource.
6222	Tags map[string]*string `json:"tags"`
6223}
6224
6225// MarshalJSON is the custom marshaler for ModuleUpdateParameters.
6226func (mup ModuleUpdateParameters) MarshalJSON() ([]byte, error) {
6227	objectMap := make(map[string]interface{})
6228	if mup.ModuleUpdateProperties != nil {
6229		objectMap["properties"] = mup.ModuleUpdateProperties
6230	}
6231	if mup.Name != nil {
6232		objectMap["name"] = mup.Name
6233	}
6234	if mup.Location != nil {
6235		objectMap["location"] = mup.Location
6236	}
6237	if mup.Tags != nil {
6238		objectMap["tags"] = mup.Tags
6239	}
6240	return json.Marshal(objectMap)
6241}
6242
6243// UnmarshalJSON is the custom unmarshaler for ModuleUpdateParameters struct.
6244func (mup *ModuleUpdateParameters) UnmarshalJSON(body []byte) error {
6245	var m map[string]*json.RawMessage
6246	err := json.Unmarshal(body, &m)
6247	if err != nil {
6248		return err
6249	}
6250	for k, v := range m {
6251		switch k {
6252		case "properties":
6253			if v != nil {
6254				var moduleUpdateProperties ModuleUpdateProperties
6255				err = json.Unmarshal(*v, &moduleUpdateProperties)
6256				if err != nil {
6257					return err
6258				}
6259				mup.ModuleUpdateProperties = &moduleUpdateProperties
6260			}
6261		case "name":
6262			if v != nil {
6263				var name string
6264				err = json.Unmarshal(*v, &name)
6265				if err != nil {
6266					return err
6267				}
6268				mup.Name = &name
6269			}
6270		case "location":
6271			if v != nil {
6272				var location string
6273				err = json.Unmarshal(*v, &location)
6274				if err != nil {
6275					return err
6276				}
6277				mup.Location = &location
6278			}
6279		case "tags":
6280			if v != nil {
6281				var tags map[string]*string
6282				err = json.Unmarshal(*v, &tags)
6283				if err != nil {
6284					return err
6285				}
6286				mup.Tags = tags
6287			}
6288		}
6289	}
6290
6291	return nil
6292}
6293
6294// ModuleUpdateProperties the parameters supplied to the update properties.
6295type ModuleUpdateProperties struct {
6296	// ContentLink - Gets or sets the module content link.
6297	ContentLink *ContentLink `json:"contentLink,omitempty"`
6298}
6299
6300// NodeCount number of nodes based on the Filter
6301type NodeCount struct {
6302	// Name - Gets the name of a count type
6303	Name       *string              `json:"name,omitempty"`
6304	Properties *NodeCountProperties `json:"properties,omitempty"`
6305}
6306
6307// NodeCountProperties ...
6308type NodeCountProperties struct {
6309	// Count - Gets the count for the name
6310	Count *int32 `json:"count,omitempty"`
6311}
6312
6313// NodeCounts gets the count of nodes by count type
6314type NodeCounts struct {
6315	autorest.Response `json:"-"`
6316	// Value - Gets an array of counts
6317	Value *[]NodeCount `json:"value,omitempty"`
6318	// TotalCount - Gets the total number of records matching countType criteria.
6319	TotalCount *int32 `json:"totalCount,omitempty"`
6320}
6321
6322// NonAzureQueryProperties non Azure query for the update configuration.
6323type NonAzureQueryProperties struct {
6324	// FunctionAlias - Log Analytics Saved Search name.
6325	FunctionAlias *string `json:"functionAlias,omitempty"`
6326	// WorkspaceID - Workspace Id for Log Analytics in which the saved Search is resided.
6327	WorkspaceID *string `json:"workspaceId,omitempty"`
6328}
6329
6330// Operation automation REST API operation
6331type Operation struct {
6332	// Name - Operation name: {provider}/{resource}/{operation}
6333	Name *string `json:"name,omitempty"`
6334	// Display - Provider, Resource and Operation values
6335	Display *OperationDisplay `json:"display,omitempty"`
6336}
6337
6338// OperationDisplay provider, Resource and Operation values
6339type OperationDisplay struct {
6340	// Provider - Service provider: Microsoft.Automation
6341	Provider *string `json:"provider,omitempty"`
6342	// Resource - Resource on which the operation is performed: Runbooks, Jobs etc.
6343	Resource *string `json:"resource,omitempty"`
6344	// Operation - Operation type: Read, write, delete, etc.
6345	Operation *string `json:"operation,omitempty"`
6346}
6347
6348// OperationListResult the response model for the list of Automation operations
6349type OperationListResult struct {
6350	autorest.Response `json:"-"`
6351	// Value - List of Automation operations supported by the Automation resource provider.
6352	Value *[]Operation `json:"value,omitempty"`
6353}
6354
6355// ProxyResource ARM proxy resource.
6356type ProxyResource struct {
6357	// ID - READ-ONLY; Fully qualified resource Id for the resource
6358	ID *string `json:"id,omitempty"`
6359	// Name - READ-ONLY; The name of the resource
6360	Name *string `json:"name,omitempty"`
6361	// Type - READ-ONLY; The type of the resource.
6362	Type *string `json:"type,omitempty"`
6363}
6364
6365// MarshalJSON is the custom marshaler for ProxyResource.
6366func (pr ProxyResource) MarshalJSON() ([]byte, error) {
6367	objectMap := make(map[string]interface{})
6368	return json.Marshal(objectMap)
6369}
6370
6371// ReadCloser ...
6372type ReadCloser struct {
6373	autorest.Response `json:"-"`
6374	Value             *io.ReadCloser `json:"value,omitempty"`
6375}
6376
6377// Resource the core properties of ARM resources
6378type Resource struct {
6379	// ID - READ-ONLY; Fully qualified resource Id for the resource
6380	ID *string `json:"id,omitempty"`
6381	// Name - READ-ONLY; The name of the resource
6382	Name *string `json:"name,omitempty"`
6383	// Type - READ-ONLY; The type of the resource.
6384	Type *string `json:"type,omitempty"`
6385}
6386
6387// MarshalJSON is the custom marshaler for Resource.
6388func (r Resource) MarshalJSON() ([]byte, error) {
6389	objectMap := make(map[string]interface{})
6390	return json.Marshal(objectMap)
6391}
6392
6393// RunAsCredentialAssociationProperty definition of RunAs credential to use for hybrid worker.
6394type RunAsCredentialAssociationProperty struct {
6395	// Name - Gets or sets the name of the credential.
6396	Name *string `json:"name,omitempty"`
6397}
6398
6399// Runbook definition of the runbook type.
6400type Runbook struct {
6401	autorest.Response `json:"-"`
6402	// RunbookProperties - Gets or sets the runbook properties.
6403	*RunbookProperties `json:"properties,omitempty"`
6404	// Etag - Gets or sets the etag of the resource.
6405	Etag *string `json:"etag,omitempty"`
6406	// Tags - Resource tags.
6407	Tags map[string]*string `json:"tags"`
6408	// Location - The Azure Region where the resource lives
6409	Location *string `json:"location,omitempty"`
6410	// ID - READ-ONLY; Fully qualified resource Id for the resource
6411	ID *string `json:"id,omitempty"`
6412	// Name - READ-ONLY; The name of the resource
6413	Name *string `json:"name,omitempty"`
6414	// Type - READ-ONLY; The type of the resource.
6415	Type *string `json:"type,omitempty"`
6416}
6417
6418// MarshalJSON is the custom marshaler for Runbook.
6419func (r Runbook) MarshalJSON() ([]byte, error) {
6420	objectMap := make(map[string]interface{})
6421	if r.RunbookProperties != nil {
6422		objectMap["properties"] = r.RunbookProperties
6423	}
6424	if r.Etag != nil {
6425		objectMap["etag"] = r.Etag
6426	}
6427	if r.Tags != nil {
6428		objectMap["tags"] = r.Tags
6429	}
6430	if r.Location != nil {
6431		objectMap["location"] = r.Location
6432	}
6433	return json.Marshal(objectMap)
6434}
6435
6436// UnmarshalJSON is the custom unmarshaler for Runbook struct.
6437func (r *Runbook) UnmarshalJSON(body []byte) error {
6438	var m map[string]*json.RawMessage
6439	err := json.Unmarshal(body, &m)
6440	if err != nil {
6441		return err
6442	}
6443	for k, v := range m {
6444		switch k {
6445		case "properties":
6446			if v != nil {
6447				var runbookProperties RunbookProperties
6448				err = json.Unmarshal(*v, &runbookProperties)
6449				if err != nil {
6450					return err
6451				}
6452				r.RunbookProperties = &runbookProperties
6453			}
6454		case "etag":
6455			if v != nil {
6456				var etag string
6457				err = json.Unmarshal(*v, &etag)
6458				if err != nil {
6459					return err
6460				}
6461				r.Etag = &etag
6462			}
6463		case "tags":
6464			if v != nil {
6465				var tags map[string]*string
6466				err = json.Unmarshal(*v, &tags)
6467				if err != nil {
6468					return err
6469				}
6470				r.Tags = tags
6471			}
6472		case "location":
6473			if v != nil {
6474				var location string
6475				err = json.Unmarshal(*v, &location)
6476				if err != nil {
6477					return err
6478				}
6479				r.Location = &location
6480			}
6481		case "id":
6482			if v != nil {
6483				var ID string
6484				err = json.Unmarshal(*v, &ID)
6485				if err != nil {
6486					return err
6487				}
6488				r.ID = &ID
6489			}
6490		case "name":
6491			if v != nil {
6492				var name string
6493				err = json.Unmarshal(*v, &name)
6494				if err != nil {
6495					return err
6496				}
6497				r.Name = &name
6498			}
6499		case "type":
6500			if v != nil {
6501				var typeVar string
6502				err = json.Unmarshal(*v, &typeVar)
6503				if err != nil {
6504					return err
6505				}
6506				r.Type = &typeVar
6507			}
6508		}
6509	}
6510
6511	return nil
6512}
6513
6514// RunbookAssociationProperty the runbook property associated with the entity.
6515type RunbookAssociationProperty struct {
6516	// Name - Gets or sets the name of the runbook.
6517	Name *string `json:"name,omitempty"`
6518}
6519
6520// RunbookCreateOrUpdateDraftParameters the parameters supplied to the create or update runbook operation.
6521type RunbookCreateOrUpdateDraftParameters struct {
6522	// RunbookContent - Content of the Runbook.
6523	RunbookContent *string `json:"runbookContent,omitempty"`
6524}
6525
6526// RunbookCreateOrUpdateDraftProperties the parameters supplied to the create or update draft runbook
6527// properties.
6528type RunbookCreateOrUpdateDraftProperties struct {
6529	// LogVerbose - Gets or sets verbose log option.
6530	LogVerbose *bool `json:"logVerbose,omitempty"`
6531	// LogProgress - Gets or sets progress log option.
6532	LogProgress *bool `json:"logProgress,omitempty"`
6533	// RunbookType - Gets or sets the type of the runbook. Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell'
6534	RunbookType RunbookTypeEnum `json:"runbookType,omitempty"`
6535	// Draft - Gets or sets the draft runbook properties.
6536	Draft *RunbookDraft `json:"draft,omitempty"`
6537	// Description - Gets or sets the description of the runbook.
6538	Description *string `json:"description,omitempty"`
6539	// LogActivityTrace - Gets or sets the activity-level tracing options of the runbook.
6540	LogActivityTrace *int32 `json:"logActivityTrace,omitempty"`
6541}
6542
6543// RunbookCreateOrUpdateParameters the parameters supplied to the create or update runbook operation.
6544type RunbookCreateOrUpdateParameters struct {
6545	// RunbookCreateOrUpdateProperties - Gets or sets runbook create or update properties.
6546	*RunbookCreateOrUpdateProperties `json:"properties,omitempty"`
6547	// Name - Gets or sets the name of the resource.
6548	Name *string `json:"name,omitempty"`
6549	// Location - Gets or sets the location of the resource.
6550	Location *string `json:"location,omitempty"`
6551	// Tags - Gets or sets the tags attached to the resource.
6552	Tags map[string]*string `json:"tags"`
6553}
6554
6555// MarshalJSON is the custom marshaler for RunbookCreateOrUpdateParameters.
6556func (rcoup RunbookCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
6557	objectMap := make(map[string]interface{})
6558	if rcoup.RunbookCreateOrUpdateProperties != nil {
6559		objectMap["properties"] = rcoup.RunbookCreateOrUpdateProperties
6560	}
6561	if rcoup.Name != nil {
6562		objectMap["name"] = rcoup.Name
6563	}
6564	if rcoup.Location != nil {
6565		objectMap["location"] = rcoup.Location
6566	}
6567	if rcoup.Tags != nil {
6568		objectMap["tags"] = rcoup.Tags
6569	}
6570	return json.Marshal(objectMap)
6571}
6572
6573// UnmarshalJSON is the custom unmarshaler for RunbookCreateOrUpdateParameters struct.
6574func (rcoup *RunbookCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
6575	var m map[string]*json.RawMessage
6576	err := json.Unmarshal(body, &m)
6577	if err != nil {
6578		return err
6579	}
6580	for k, v := range m {
6581		switch k {
6582		case "properties":
6583			if v != nil {
6584				var runbookCreateOrUpdateProperties RunbookCreateOrUpdateProperties
6585				err = json.Unmarshal(*v, &runbookCreateOrUpdateProperties)
6586				if err != nil {
6587					return err
6588				}
6589				rcoup.RunbookCreateOrUpdateProperties = &runbookCreateOrUpdateProperties
6590			}
6591		case "name":
6592			if v != nil {
6593				var name string
6594				err = json.Unmarshal(*v, &name)
6595				if err != nil {
6596					return err
6597				}
6598				rcoup.Name = &name
6599			}
6600		case "location":
6601			if v != nil {
6602				var location string
6603				err = json.Unmarshal(*v, &location)
6604				if err != nil {
6605					return err
6606				}
6607				rcoup.Location = &location
6608			}
6609		case "tags":
6610			if v != nil {
6611				var tags map[string]*string
6612				err = json.Unmarshal(*v, &tags)
6613				if err != nil {
6614					return err
6615				}
6616				rcoup.Tags = tags
6617			}
6618		}
6619	}
6620
6621	return nil
6622}
6623
6624// RunbookCreateOrUpdateProperties the parameters supplied to the create or update runbook properties.
6625type RunbookCreateOrUpdateProperties struct {
6626	// LogVerbose - Gets or sets verbose log option.
6627	LogVerbose *bool `json:"logVerbose,omitempty"`
6628	// LogProgress - Gets or sets progress log option.
6629	LogProgress *bool `json:"logProgress,omitempty"`
6630	// RunbookType - Gets or sets the type of the runbook. Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell'
6631	RunbookType RunbookTypeEnum `json:"runbookType,omitempty"`
6632	// Draft - Gets or sets the draft runbook properties.
6633	Draft *RunbookDraft `json:"draft,omitempty"`
6634	// PublishContentLink - Gets or sets the published runbook content link.
6635	PublishContentLink *ContentLink `json:"publishContentLink,omitempty"`
6636	// Description - Gets or sets the description of the runbook.
6637	Description *string `json:"description,omitempty"`
6638	// LogActivityTrace - Gets or sets the activity-level tracing options of the runbook.
6639	LogActivityTrace *int32 `json:"logActivityTrace,omitempty"`
6640}
6641
6642// RunbookDraft ...
6643type RunbookDraft struct {
6644	autorest.Response `json:"-"`
6645	// InEdit - Gets or sets whether runbook is in edit mode.
6646	InEdit *bool `json:"inEdit,omitempty"`
6647	// DraftContentLink - Gets or sets the draft runbook content link.
6648	DraftContentLink *ContentLink `json:"draftContentLink,omitempty"`
6649	// CreationTime - Gets or sets the creation time of the runbook draft.
6650	CreationTime *date.Time `json:"creationTime,omitempty"`
6651	// LastModifiedTime - Gets or sets the last modified time of the runbook draft.
6652	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
6653	// Parameters - Gets or sets the runbook draft parameters.
6654	Parameters map[string]*RunbookParameter `json:"parameters"`
6655	// OutputTypes - Gets or sets the runbook output types.
6656	OutputTypes *[]string `json:"outputTypes,omitempty"`
6657}
6658
6659// MarshalJSON is the custom marshaler for RunbookDraft.
6660func (rd RunbookDraft) MarshalJSON() ([]byte, error) {
6661	objectMap := make(map[string]interface{})
6662	if rd.InEdit != nil {
6663		objectMap["inEdit"] = rd.InEdit
6664	}
6665	if rd.DraftContentLink != nil {
6666		objectMap["draftContentLink"] = rd.DraftContentLink
6667	}
6668	if rd.CreationTime != nil {
6669		objectMap["creationTime"] = rd.CreationTime
6670	}
6671	if rd.LastModifiedTime != nil {
6672		objectMap["lastModifiedTime"] = rd.LastModifiedTime
6673	}
6674	if rd.Parameters != nil {
6675		objectMap["parameters"] = rd.Parameters
6676	}
6677	if rd.OutputTypes != nil {
6678		objectMap["outputTypes"] = rd.OutputTypes
6679	}
6680	return json.Marshal(objectMap)
6681}
6682
6683// RunbookDraftPublishFuture an abstraction for monitoring and retrieving the results of a long-running
6684// operation.
6685type RunbookDraftPublishFuture struct {
6686	azure.FutureAPI
6687	// Result returns the result of the asynchronous operation.
6688	// If the operation has not completed it will return an error.
6689	Result func(RunbookDraftClient) (autorest.Response, error)
6690}
6691
6692// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6693func (future *RunbookDraftPublishFuture) UnmarshalJSON(body []byte) error {
6694	var azFuture azure.Future
6695	if err := json.Unmarshal(body, &azFuture); err != nil {
6696		return err
6697	}
6698	future.FutureAPI = &azFuture
6699	future.Result = future.result
6700	return nil
6701}
6702
6703// result is the default implementation for RunbookDraftPublishFuture.Result.
6704func (future *RunbookDraftPublishFuture) result(client RunbookDraftClient) (ar autorest.Response, err error) {
6705	var done bool
6706	done, err = future.DoneWithContext(context.Background(), client)
6707	if err != nil {
6708		err = autorest.NewErrorWithError(err, "automation.RunbookDraftPublishFuture", "Result", future.Response(), "Polling failure")
6709		return
6710	}
6711	if !done {
6712		ar.Response = future.Response()
6713		err = azure.NewAsyncOpIncompleteError("automation.RunbookDraftPublishFuture")
6714		return
6715	}
6716	ar.Response = future.Response()
6717	return
6718}
6719
6720// RunbookDraftReplaceContentFuture an abstraction for monitoring and retrieving the results of a
6721// long-running operation.
6722type RunbookDraftReplaceContentFuture struct {
6723	azure.FutureAPI
6724	// Result returns the result of the asynchronous operation.
6725	// If the operation has not completed it will return an error.
6726	Result func(RunbookDraftClient) (ReadCloser, error)
6727}
6728
6729// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6730func (future *RunbookDraftReplaceContentFuture) UnmarshalJSON(body []byte) error {
6731	var azFuture azure.Future
6732	if err := json.Unmarshal(body, &azFuture); err != nil {
6733		return err
6734	}
6735	future.FutureAPI = &azFuture
6736	future.Result = future.result
6737	return nil
6738}
6739
6740// result is the default implementation for RunbookDraftReplaceContentFuture.Result.
6741func (future *RunbookDraftReplaceContentFuture) result(client RunbookDraftClient) (rc ReadCloser, err error) {
6742	var done bool
6743	done, err = future.DoneWithContext(context.Background(), client)
6744	if err != nil {
6745		err = autorest.NewErrorWithError(err, "automation.RunbookDraftReplaceContentFuture", "Result", future.Response(), "Polling failure")
6746		return
6747	}
6748	if !done {
6749		rc.Response.Response = future.Response()
6750		err = azure.NewAsyncOpIncompleteError("automation.RunbookDraftReplaceContentFuture")
6751		return
6752	}
6753	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6754	if rc.Response.Response, err = future.GetResult(sender); err == nil && rc.Response.Response.StatusCode != http.StatusNoContent {
6755		rc, err = client.ReplaceContentResponder(rc.Response.Response)
6756		if err != nil {
6757			err = autorest.NewErrorWithError(err, "automation.RunbookDraftReplaceContentFuture", "Result", rc.Response.Response, "Failure responding to request")
6758		}
6759	}
6760	return
6761}
6762
6763// RunbookDraftUndoEditResult the response model for the undo edit runbook operation.
6764type RunbookDraftUndoEditResult struct {
6765	autorest.Response `json:"-"`
6766	// StatusCode - Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestURITooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HTTPVersionNotSupported'
6767	StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
6768	RequestID  *string        `json:"requestId,omitempty"`
6769}
6770
6771// RunbookListResult the response model for the list runbook operation.
6772type RunbookListResult struct {
6773	autorest.Response `json:"-"`
6774	// Value - Gets or sets a list of runbooks.
6775	Value *[]Runbook `json:"value,omitempty"`
6776	// NextLink - Gets or sets the next link.
6777	NextLink *string `json:"nextLink,omitempty"`
6778}
6779
6780// RunbookListResultIterator provides access to a complete listing of Runbook values.
6781type RunbookListResultIterator struct {
6782	i    int
6783	page RunbookListResultPage
6784}
6785
6786// NextWithContext advances to the next value.  If there was an error making
6787// the request the iterator does not advance and the error is returned.
6788func (iter *RunbookListResultIterator) NextWithContext(ctx context.Context) (err error) {
6789	if tracing.IsEnabled() {
6790		ctx = tracing.StartSpan(ctx, fqdn+"/RunbookListResultIterator.NextWithContext")
6791		defer func() {
6792			sc := -1
6793			if iter.Response().Response.Response != nil {
6794				sc = iter.Response().Response.Response.StatusCode
6795			}
6796			tracing.EndSpan(ctx, sc, err)
6797		}()
6798	}
6799	iter.i++
6800	if iter.i < len(iter.page.Values()) {
6801		return nil
6802	}
6803	err = iter.page.NextWithContext(ctx)
6804	if err != nil {
6805		iter.i--
6806		return err
6807	}
6808	iter.i = 0
6809	return nil
6810}
6811
6812// Next advances to the next value.  If there was an error making
6813// the request the iterator does not advance and the error is returned.
6814// Deprecated: Use NextWithContext() instead.
6815func (iter *RunbookListResultIterator) Next() error {
6816	return iter.NextWithContext(context.Background())
6817}
6818
6819// NotDone returns true if the enumeration should be started or is not yet complete.
6820func (iter RunbookListResultIterator) NotDone() bool {
6821	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6822}
6823
6824// Response returns the raw server response from the last page request.
6825func (iter RunbookListResultIterator) Response() RunbookListResult {
6826	return iter.page.Response()
6827}
6828
6829// Value returns the current value or a zero-initialized value if the
6830// iterator has advanced beyond the end of the collection.
6831func (iter RunbookListResultIterator) Value() Runbook {
6832	if !iter.page.NotDone() {
6833		return Runbook{}
6834	}
6835	return iter.page.Values()[iter.i]
6836}
6837
6838// Creates a new instance of the RunbookListResultIterator type.
6839func NewRunbookListResultIterator(page RunbookListResultPage) RunbookListResultIterator {
6840	return RunbookListResultIterator{page: page}
6841}
6842
6843// IsEmpty returns true if the ListResult contains no values.
6844func (rlr RunbookListResult) IsEmpty() bool {
6845	return rlr.Value == nil || len(*rlr.Value) == 0
6846}
6847
6848// hasNextLink returns true if the NextLink is not empty.
6849func (rlr RunbookListResult) hasNextLink() bool {
6850	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
6851}
6852
6853// runbookListResultPreparer prepares a request to retrieve the next set of results.
6854// It returns nil if no more results exist.
6855func (rlr RunbookListResult) runbookListResultPreparer(ctx context.Context) (*http.Request, error) {
6856	if !rlr.hasNextLink() {
6857		return nil, nil
6858	}
6859	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6860		autorest.AsJSON(),
6861		autorest.AsGet(),
6862		autorest.WithBaseURL(to.String(rlr.NextLink)))
6863}
6864
6865// RunbookListResultPage contains a page of Runbook values.
6866type RunbookListResultPage struct {
6867	fn  func(context.Context, RunbookListResult) (RunbookListResult, error)
6868	rlr RunbookListResult
6869}
6870
6871// NextWithContext advances to the next page of values.  If there was an error making
6872// the request the page does not advance and the error is returned.
6873func (page *RunbookListResultPage) NextWithContext(ctx context.Context) (err error) {
6874	if tracing.IsEnabled() {
6875		ctx = tracing.StartSpan(ctx, fqdn+"/RunbookListResultPage.NextWithContext")
6876		defer func() {
6877			sc := -1
6878			if page.Response().Response.Response != nil {
6879				sc = page.Response().Response.Response.StatusCode
6880			}
6881			tracing.EndSpan(ctx, sc, err)
6882		}()
6883	}
6884	for {
6885		next, err := page.fn(ctx, page.rlr)
6886		if err != nil {
6887			return err
6888		}
6889		page.rlr = next
6890		if !next.hasNextLink() || !next.IsEmpty() {
6891			break
6892		}
6893	}
6894	return nil
6895}
6896
6897// Next advances to the next page of values.  If there was an error making
6898// the request the page does not advance and the error is returned.
6899// Deprecated: Use NextWithContext() instead.
6900func (page *RunbookListResultPage) Next() error {
6901	return page.NextWithContext(context.Background())
6902}
6903
6904// NotDone returns true if the page enumeration should be started or is not yet complete.
6905func (page RunbookListResultPage) NotDone() bool {
6906	return !page.rlr.IsEmpty()
6907}
6908
6909// Response returns the raw server response from the last page request.
6910func (page RunbookListResultPage) Response() RunbookListResult {
6911	return page.rlr
6912}
6913
6914// Values returns the slice of values for the current page or nil if there are no values.
6915func (page RunbookListResultPage) Values() []Runbook {
6916	if page.rlr.IsEmpty() {
6917		return nil
6918	}
6919	return *page.rlr.Value
6920}
6921
6922// Creates a new instance of the RunbookListResultPage type.
6923func NewRunbookListResultPage(cur RunbookListResult, getNextPage func(context.Context, RunbookListResult) (RunbookListResult, error)) RunbookListResultPage {
6924	return RunbookListResultPage{
6925		fn:  getNextPage,
6926		rlr: cur,
6927	}
6928}
6929
6930// RunbookParameter definition of the runbook parameter type.
6931type RunbookParameter struct {
6932	// Type - Gets or sets the type of the parameter.
6933	Type *string `json:"type,omitempty"`
6934	// IsMandatory - Gets or sets a Boolean value to indicate whether the parameter is mandatory or not.
6935	IsMandatory *bool `json:"isMandatory,omitempty"`
6936	// Position - Get or sets the position of the parameter.
6937	Position *int32 `json:"position,omitempty"`
6938	// DefaultValue - Gets or sets the default value of parameter.
6939	DefaultValue *string `json:"defaultValue,omitempty"`
6940}
6941
6942// RunbookProperties definition of the runbook property type.
6943type RunbookProperties struct {
6944	// RunbookType - Gets or sets the type of the runbook. Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell'
6945	RunbookType RunbookTypeEnum `json:"runbookType,omitempty"`
6946	// PublishContentLink - Gets or sets the published runbook content link.
6947	PublishContentLink *ContentLink `json:"publishContentLink,omitempty"`
6948	// State - Gets or sets the state of the runbook. Possible values include: 'RunbookStateNew', 'RunbookStateEdit', 'RunbookStatePublished'
6949	State RunbookState `json:"state,omitempty"`
6950	// LogVerbose - Gets or sets verbose log option.
6951	LogVerbose *bool `json:"logVerbose,omitempty"`
6952	// LogProgress - Gets or sets progress log option.
6953	LogProgress *bool `json:"logProgress,omitempty"`
6954	// LogActivityTrace - Gets or sets the option to log activity trace of the runbook.
6955	LogActivityTrace *int32 `json:"logActivityTrace,omitempty"`
6956	// JobCount - Gets or sets the job count of the runbook.
6957	JobCount *int32 `json:"jobCount,omitempty"`
6958	// Parameters - Gets or sets the runbook parameters.
6959	Parameters map[string]*RunbookParameter `json:"parameters"`
6960	// OutputTypes - Gets or sets the runbook output types.
6961	OutputTypes *[]string `json:"outputTypes,omitempty"`
6962	// Draft - Gets or sets the draft runbook properties.
6963	Draft *RunbookDraft `json:"draft,omitempty"`
6964	// ProvisioningState - Gets or sets the provisioning state of the runbook. Possible values include: 'RunbookProvisioningStateSucceeded'
6965	ProvisioningState RunbookProvisioningState `json:"provisioningState,omitempty"`
6966	// LastModifiedBy - Gets or sets the last modified by.
6967	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
6968	// CreationTime - Gets or sets the creation time.
6969	CreationTime *date.Time `json:"creationTime,omitempty"`
6970	// LastModifiedTime - Gets or sets the last modified time.
6971	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
6972	// Description - Gets or sets the description.
6973	Description *string `json:"description,omitempty"`
6974}
6975
6976// MarshalJSON is the custom marshaler for RunbookProperties.
6977func (rp RunbookProperties) MarshalJSON() ([]byte, error) {
6978	objectMap := make(map[string]interface{})
6979	if rp.RunbookType != "" {
6980		objectMap["runbookType"] = rp.RunbookType
6981	}
6982	if rp.PublishContentLink != nil {
6983		objectMap["publishContentLink"] = rp.PublishContentLink
6984	}
6985	if rp.State != "" {
6986		objectMap["state"] = rp.State
6987	}
6988	if rp.LogVerbose != nil {
6989		objectMap["logVerbose"] = rp.LogVerbose
6990	}
6991	if rp.LogProgress != nil {
6992		objectMap["logProgress"] = rp.LogProgress
6993	}
6994	if rp.LogActivityTrace != nil {
6995		objectMap["logActivityTrace"] = rp.LogActivityTrace
6996	}
6997	if rp.JobCount != nil {
6998		objectMap["jobCount"] = rp.JobCount
6999	}
7000	if rp.Parameters != nil {
7001		objectMap["parameters"] = rp.Parameters
7002	}
7003	if rp.OutputTypes != nil {
7004		objectMap["outputTypes"] = rp.OutputTypes
7005	}
7006	if rp.Draft != nil {
7007		objectMap["draft"] = rp.Draft
7008	}
7009	if rp.ProvisioningState != "" {
7010		objectMap["provisioningState"] = rp.ProvisioningState
7011	}
7012	if rp.LastModifiedBy != nil {
7013		objectMap["lastModifiedBy"] = rp.LastModifiedBy
7014	}
7015	if rp.CreationTime != nil {
7016		objectMap["creationTime"] = rp.CreationTime
7017	}
7018	if rp.LastModifiedTime != nil {
7019		objectMap["lastModifiedTime"] = rp.LastModifiedTime
7020	}
7021	if rp.Description != nil {
7022		objectMap["description"] = rp.Description
7023	}
7024	return json.Marshal(objectMap)
7025}
7026
7027// RunbookUpdateParameters the parameters supplied to the update runbook operation.
7028type RunbookUpdateParameters struct {
7029	// RunbookUpdateProperties - Gets or sets the runbook update properties.
7030	*RunbookUpdateProperties `json:"properties,omitempty"`
7031	// Name - Gets or sets the name of the resource.
7032	Name *string `json:"name,omitempty"`
7033	// Location - Gets or sets the location of the resource.
7034	Location *string `json:"location,omitempty"`
7035	// Tags - Gets or sets the tags attached to the resource.
7036	Tags map[string]*string `json:"tags"`
7037}
7038
7039// MarshalJSON is the custom marshaler for RunbookUpdateParameters.
7040func (rup RunbookUpdateParameters) MarshalJSON() ([]byte, error) {
7041	objectMap := make(map[string]interface{})
7042	if rup.RunbookUpdateProperties != nil {
7043		objectMap["properties"] = rup.RunbookUpdateProperties
7044	}
7045	if rup.Name != nil {
7046		objectMap["name"] = rup.Name
7047	}
7048	if rup.Location != nil {
7049		objectMap["location"] = rup.Location
7050	}
7051	if rup.Tags != nil {
7052		objectMap["tags"] = rup.Tags
7053	}
7054	return json.Marshal(objectMap)
7055}
7056
7057// UnmarshalJSON is the custom unmarshaler for RunbookUpdateParameters struct.
7058func (rup *RunbookUpdateParameters) UnmarshalJSON(body []byte) error {
7059	var m map[string]*json.RawMessage
7060	err := json.Unmarshal(body, &m)
7061	if err != nil {
7062		return err
7063	}
7064	for k, v := range m {
7065		switch k {
7066		case "properties":
7067			if v != nil {
7068				var runbookUpdateProperties RunbookUpdateProperties
7069				err = json.Unmarshal(*v, &runbookUpdateProperties)
7070				if err != nil {
7071					return err
7072				}
7073				rup.RunbookUpdateProperties = &runbookUpdateProperties
7074			}
7075		case "name":
7076			if v != nil {
7077				var name string
7078				err = json.Unmarshal(*v, &name)
7079				if err != nil {
7080					return err
7081				}
7082				rup.Name = &name
7083			}
7084		case "location":
7085			if v != nil {
7086				var location string
7087				err = json.Unmarshal(*v, &location)
7088				if err != nil {
7089					return err
7090				}
7091				rup.Location = &location
7092			}
7093		case "tags":
7094			if v != nil {
7095				var tags map[string]*string
7096				err = json.Unmarshal(*v, &tags)
7097				if err != nil {
7098					return err
7099				}
7100				rup.Tags = tags
7101			}
7102		}
7103	}
7104
7105	return nil
7106}
7107
7108// RunbookUpdateProperties the parameters supplied to the update runbook properties.
7109type RunbookUpdateProperties struct {
7110	// Description - Gets or sets the description of the runbook.
7111	Description *string `json:"description,omitempty"`
7112	// LogVerbose - Gets or sets verbose log option.
7113	LogVerbose *bool `json:"logVerbose,omitempty"`
7114	// LogProgress - Gets or sets progress log option.
7115	LogProgress *bool `json:"logProgress,omitempty"`
7116	// LogActivityTrace - Gets or sets the activity-level tracing options of the runbook.
7117	LogActivityTrace *int32 `json:"logActivityTrace,omitempty"`
7118}
7119
7120// Schedule definition of the schedule.
7121type Schedule struct {
7122	autorest.Response `json:"-"`
7123	// ScheduleProperties - Gets or sets the properties of the schedule.
7124	*ScheduleProperties `json:"properties,omitempty"`
7125	// ID - READ-ONLY; Fully qualified resource Id for the resource
7126	ID *string `json:"id,omitempty"`
7127	// Name - READ-ONLY; The name of the resource
7128	Name *string `json:"name,omitempty"`
7129	// Type - READ-ONLY; The type of the resource.
7130	Type *string `json:"type,omitempty"`
7131}
7132
7133// MarshalJSON is the custom marshaler for Schedule.
7134func (s Schedule) MarshalJSON() ([]byte, error) {
7135	objectMap := make(map[string]interface{})
7136	if s.ScheduleProperties != nil {
7137		objectMap["properties"] = s.ScheduleProperties
7138	}
7139	return json.Marshal(objectMap)
7140}
7141
7142// UnmarshalJSON is the custom unmarshaler for Schedule struct.
7143func (s *Schedule) UnmarshalJSON(body []byte) error {
7144	var m map[string]*json.RawMessage
7145	err := json.Unmarshal(body, &m)
7146	if err != nil {
7147		return err
7148	}
7149	for k, v := range m {
7150		switch k {
7151		case "properties":
7152			if v != nil {
7153				var scheduleProperties ScheduleProperties
7154				err = json.Unmarshal(*v, &scheduleProperties)
7155				if err != nil {
7156					return err
7157				}
7158				s.ScheduleProperties = &scheduleProperties
7159			}
7160		case "id":
7161			if v != nil {
7162				var ID string
7163				err = json.Unmarshal(*v, &ID)
7164				if err != nil {
7165					return err
7166				}
7167				s.ID = &ID
7168			}
7169		case "name":
7170			if v != nil {
7171				var name string
7172				err = json.Unmarshal(*v, &name)
7173				if err != nil {
7174					return err
7175				}
7176				s.Name = &name
7177			}
7178		case "type":
7179			if v != nil {
7180				var typeVar string
7181				err = json.Unmarshal(*v, &typeVar)
7182				if err != nil {
7183					return err
7184				}
7185				s.Type = &typeVar
7186			}
7187		}
7188	}
7189
7190	return nil
7191}
7192
7193// ScheduleAssociationProperty the schedule property associated with the entity.
7194type ScheduleAssociationProperty struct {
7195	// Name - Gets or sets the name of the Schedule.
7196	Name *string `json:"name,omitempty"`
7197}
7198
7199// ScheduleCreateOrUpdateParameters the parameters supplied to the create or update schedule operation.
7200type ScheduleCreateOrUpdateParameters struct {
7201	// Name - Gets or sets the name of the Schedule.
7202	Name *string `json:"name,omitempty"`
7203	// ScheduleCreateOrUpdateProperties - Gets or sets the list of schedule properties.
7204	*ScheduleCreateOrUpdateProperties `json:"properties,omitempty"`
7205}
7206
7207// MarshalJSON is the custom marshaler for ScheduleCreateOrUpdateParameters.
7208func (scoup ScheduleCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
7209	objectMap := make(map[string]interface{})
7210	if scoup.Name != nil {
7211		objectMap["name"] = scoup.Name
7212	}
7213	if scoup.ScheduleCreateOrUpdateProperties != nil {
7214		objectMap["properties"] = scoup.ScheduleCreateOrUpdateProperties
7215	}
7216	return json.Marshal(objectMap)
7217}
7218
7219// UnmarshalJSON is the custom unmarshaler for ScheduleCreateOrUpdateParameters struct.
7220func (scoup *ScheduleCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
7221	var m map[string]*json.RawMessage
7222	err := json.Unmarshal(body, &m)
7223	if err != nil {
7224		return err
7225	}
7226	for k, v := range m {
7227		switch k {
7228		case "name":
7229			if v != nil {
7230				var name string
7231				err = json.Unmarshal(*v, &name)
7232				if err != nil {
7233					return err
7234				}
7235				scoup.Name = &name
7236			}
7237		case "properties":
7238			if v != nil {
7239				var scheduleCreateOrUpdateProperties ScheduleCreateOrUpdateProperties
7240				err = json.Unmarshal(*v, &scheduleCreateOrUpdateProperties)
7241				if err != nil {
7242					return err
7243				}
7244				scoup.ScheduleCreateOrUpdateProperties = &scheduleCreateOrUpdateProperties
7245			}
7246		}
7247	}
7248
7249	return nil
7250}
7251
7252// ScheduleCreateOrUpdateProperties the parameters supplied to the create or update schedule operation.
7253type ScheduleCreateOrUpdateProperties struct {
7254	// Description - Gets or sets the description of the schedule.
7255	Description *string `json:"description,omitempty"`
7256	// StartTime - Gets or sets the start time of the schedule.
7257	StartTime *date.Time `json:"startTime,omitempty"`
7258	// ExpiryTime - Gets or sets the end time of the schedule.
7259	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
7260	// Interval - Gets or sets the interval of the schedule.
7261	Interval interface{} `json:"interval,omitempty"`
7262	// Frequency - Gets or sets the frequency of the schedule. Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month', 'Minute'
7263	Frequency ScheduleFrequency `json:"frequency,omitempty"`
7264	// TimeZone - Gets or sets the time zone of the schedule.
7265	TimeZone *string `json:"timeZone,omitempty"`
7266	// AdvancedSchedule - Gets or sets the AdvancedSchedule.
7267	AdvancedSchedule *AdvancedSchedule `json:"advancedSchedule,omitempty"`
7268}
7269
7270// ScheduleListResult the response model for the list schedule operation.
7271type ScheduleListResult struct {
7272	autorest.Response `json:"-"`
7273	// Value - Gets or sets a list of schedules.
7274	Value *[]Schedule `json:"value,omitempty"`
7275	// NextLink - Gets or sets the next link.
7276	NextLink *string `json:"nextLink,omitempty"`
7277}
7278
7279// ScheduleListResultIterator provides access to a complete listing of Schedule values.
7280type ScheduleListResultIterator struct {
7281	i    int
7282	page ScheduleListResultPage
7283}
7284
7285// NextWithContext advances to the next value.  If there was an error making
7286// the request the iterator does not advance and the error is returned.
7287func (iter *ScheduleListResultIterator) NextWithContext(ctx context.Context) (err error) {
7288	if tracing.IsEnabled() {
7289		ctx = tracing.StartSpan(ctx, fqdn+"/ScheduleListResultIterator.NextWithContext")
7290		defer func() {
7291			sc := -1
7292			if iter.Response().Response.Response != nil {
7293				sc = iter.Response().Response.Response.StatusCode
7294			}
7295			tracing.EndSpan(ctx, sc, err)
7296		}()
7297	}
7298	iter.i++
7299	if iter.i < len(iter.page.Values()) {
7300		return nil
7301	}
7302	err = iter.page.NextWithContext(ctx)
7303	if err != nil {
7304		iter.i--
7305		return err
7306	}
7307	iter.i = 0
7308	return nil
7309}
7310
7311// Next advances to the next value.  If there was an error making
7312// the request the iterator does not advance and the error is returned.
7313// Deprecated: Use NextWithContext() instead.
7314func (iter *ScheduleListResultIterator) Next() error {
7315	return iter.NextWithContext(context.Background())
7316}
7317
7318// NotDone returns true if the enumeration should be started or is not yet complete.
7319func (iter ScheduleListResultIterator) NotDone() bool {
7320	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7321}
7322
7323// Response returns the raw server response from the last page request.
7324func (iter ScheduleListResultIterator) Response() ScheduleListResult {
7325	return iter.page.Response()
7326}
7327
7328// Value returns the current value or a zero-initialized value if the
7329// iterator has advanced beyond the end of the collection.
7330func (iter ScheduleListResultIterator) Value() Schedule {
7331	if !iter.page.NotDone() {
7332		return Schedule{}
7333	}
7334	return iter.page.Values()[iter.i]
7335}
7336
7337// Creates a new instance of the ScheduleListResultIterator type.
7338func NewScheduleListResultIterator(page ScheduleListResultPage) ScheduleListResultIterator {
7339	return ScheduleListResultIterator{page: page}
7340}
7341
7342// IsEmpty returns true if the ListResult contains no values.
7343func (slr ScheduleListResult) IsEmpty() bool {
7344	return slr.Value == nil || len(*slr.Value) == 0
7345}
7346
7347// hasNextLink returns true if the NextLink is not empty.
7348func (slr ScheduleListResult) hasNextLink() bool {
7349	return slr.NextLink != nil && len(*slr.NextLink) != 0
7350}
7351
7352// scheduleListResultPreparer prepares a request to retrieve the next set of results.
7353// It returns nil if no more results exist.
7354func (slr ScheduleListResult) scheduleListResultPreparer(ctx context.Context) (*http.Request, error) {
7355	if !slr.hasNextLink() {
7356		return nil, nil
7357	}
7358	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7359		autorest.AsJSON(),
7360		autorest.AsGet(),
7361		autorest.WithBaseURL(to.String(slr.NextLink)))
7362}
7363
7364// ScheduleListResultPage contains a page of Schedule values.
7365type ScheduleListResultPage struct {
7366	fn  func(context.Context, ScheduleListResult) (ScheduleListResult, error)
7367	slr ScheduleListResult
7368}
7369
7370// NextWithContext advances to the next page of values.  If there was an error making
7371// the request the page does not advance and the error is returned.
7372func (page *ScheduleListResultPage) NextWithContext(ctx context.Context) (err error) {
7373	if tracing.IsEnabled() {
7374		ctx = tracing.StartSpan(ctx, fqdn+"/ScheduleListResultPage.NextWithContext")
7375		defer func() {
7376			sc := -1
7377			if page.Response().Response.Response != nil {
7378				sc = page.Response().Response.Response.StatusCode
7379			}
7380			tracing.EndSpan(ctx, sc, err)
7381		}()
7382	}
7383	for {
7384		next, err := page.fn(ctx, page.slr)
7385		if err != nil {
7386			return err
7387		}
7388		page.slr = next
7389		if !next.hasNextLink() || !next.IsEmpty() {
7390			break
7391		}
7392	}
7393	return nil
7394}
7395
7396// Next advances to the next page of values.  If there was an error making
7397// the request the page does not advance and the error is returned.
7398// Deprecated: Use NextWithContext() instead.
7399func (page *ScheduleListResultPage) Next() error {
7400	return page.NextWithContext(context.Background())
7401}
7402
7403// NotDone returns true if the page enumeration should be started or is not yet complete.
7404func (page ScheduleListResultPage) NotDone() bool {
7405	return !page.slr.IsEmpty()
7406}
7407
7408// Response returns the raw server response from the last page request.
7409func (page ScheduleListResultPage) Response() ScheduleListResult {
7410	return page.slr
7411}
7412
7413// Values returns the slice of values for the current page or nil if there are no values.
7414func (page ScheduleListResultPage) Values() []Schedule {
7415	if page.slr.IsEmpty() {
7416		return nil
7417	}
7418	return *page.slr.Value
7419}
7420
7421// Creates a new instance of the ScheduleListResultPage type.
7422func NewScheduleListResultPage(cur ScheduleListResult, getNextPage func(context.Context, ScheduleListResult) (ScheduleListResult, error)) ScheduleListResultPage {
7423	return ScheduleListResultPage{
7424		fn:  getNextPage,
7425		slr: cur,
7426	}
7427}
7428
7429// ScheduleProperties definition of schedule parameters.
7430type ScheduleProperties struct {
7431	// StartTime - Gets or sets the start time of the schedule.
7432	StartTime *date.Time `json:"startTime,omitempty"`
7433	// StartTimeOffsetMinutes - READ-ONLY; Gets the start time's offset in minutes.
7434	StartTimeOffsetMinutes *float64 `json:"startTimeOffsetMinutes,omitempty"`
7435	// ExpiryTime - Gets or sets the end time of the schedule.
7436	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
7437	// ExpiryTimeOffsetMinutes - Gets or sets the expiry time's offset in minutes.
7438	ExpiryTimeOffsetMinutes *float64 `json:"expiryTimeOffsetMinutes,omitempty"`
7439	// IsEnabled - Gets or sets a value indicating whether this schedule is enabled.
7440	IsEnabled *bool `json:"isEnabled,omitempty"`
7441	// NextRun - Gets or sets the next run time of the schedule.
7442	NextRun *date.Time `json:"nextRun,omitempty"`
7443	// NextRunOffsetMinutes - Gets or sets the next run time's offset in minutes.
7444	NextRunOffsetMinutes *float64 `json:"nextRunOffsetMinutes,omitempty"`
7445	// Interval - Gets or sets the interval of the schedule.
7446	Interval *int32 `json:"interval,omitempty"`
7447	// Frequency - Gets or sets the frequency of the schedule. Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month', 'Minute'
7448	Frequency ScheduleFrequency `json:"frequency,omitempty"`
7449	// TimeZone - Gets or sets the time zone of the schedule.
7450	TimeZone *string `json:"timeZone,omitempty"`
7451	// AdvancedSchedule - Gets or sets the advanced schedule.
7452	AdvancedSchedule *AdvancedSchedule `json:"advancedSchedule,omitempty"`
7453	// CreationTime - Gets or sets the creation time.
7454	CreationTime *date.Time `json:"creationTime,omitempty"`
7455	// LastModifiedTime - Gets or sets the last modified time.
7456	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
7457	// Description - Gets or sets the description.
7458	Description *string `json:"description,omitempty"`
7459}
7460
7461// MarshalJSON is the custom marshaler for ScheduleProperties.
7462func (sp ScheduleProperties) MarshalJSON() ([]byte, error) {
7463	objectMap := make(map[string]interface{})
7464	if sp.StartTime != nil {
7465		objectMap["startTime"] = sp.StartTime
7466	}
7467	if sp.ExpiryTime != nil {
7468		objectMap["expiryTime"] = sp.ExpiryTime
7469	}
7470	if sp.ExpiryTimeOffsetMinutes != nil {
7471		objectMap["expiryTimeOffsetMinutes"] = sp.ExpiryTimeOffsetMinutes
7472	}
7473	if sp.IsEnabled != nil {
7474		objectMap["isEnabled"] = sp.IsEnabled
7475	}
7476	if sp.NextRun != nil {
7477		objectMap["nextRun"] = sp.NextRun
7478	}
7479	if sp.NextRunOffsetMinutes != nil {
7480		objectMap["nextRunOffsetMinutes"] = sp.NextRunOffsetMinutes
7481	}
7482	if sp.Interval != nil {
7483		objectMap["interval"] = sp.Interval
7484	}
7485	if sp.Frequency != "" {
7486		objectMap["frequency"] = sp.Frequency
7487	}
7488	if sp.TimeZone != nil {
7489		objectMap["timeZone"] = sp.TimeZone
7490	}
7491	if sp.AdvancedSchedule != nil {
7492		objectMap["advancedSchedule"] = sp.AdvancedSchedule
7493	}
7494	if sp.CreationTime != nil {
7495		objectMap["creationTime"] = sp.CreationTime
7496	}
7497	if sp.LastModifiedTime != nil {
7498		objectMap["lastModifiedTime"] = sp.LastModifiedTime
7499	}
7500	if sp.Description != nil {
7501		objectMap["description"] = sp.Description
7502	}
7503	return json.Marshal(objectMap)
7504}
7505
7506// ScheduleUpdateParameters the parameters supplied to the update schedule operation.
7507type ScheduleUpdateParameters struct {
7508	// Name - Gets or sets the name of the Schedule.
7509	Name *string `json:"name,omitempty"`
7510	// ScheduleUpdateProperties - Gets or sets the list of schedule properties.
7511	*ScheduleUpdateProperties `json:"properties,omitempty"`
7512}
7513
7514// MarshalJSON is the custom marshaler for ScheduleUpdateParameters.
7515func (sup ScheduleUpdateParameters) MarshalJSON() ([]byte, error) {
7516	objectMap := make(map[string]interface{})
7517	if sup.Name != nil {
7518		objectMap["name"] = sup.Name
7519	}
7520	if sup.ScheduleUpdateProperties != nil {
7521		objectMap["properties"] = sup.ScheduleUpdateProperties
7522	}
7523	return json.Marshal(objectMap)
7524}
7525
7526// UnmarshalJSON is the custom unmarshaler for ScheduleUpdateParameters struct.
7527func (sup *ScheduleUpdateParameters) UnmarshalJSON(body []byte) error {
7528	var m map[string]*json.RawMessage
7529	err := json.Unmarshal(body, &m)
7530	if err != nil {
7531		return err
7532	}
7533	for k, v := range m {
7534		switch k {
7535		case "name":
7536			if v != nil {
7537				var name string
7538				err = json.Unmarshal(*v, &name)
7539				if err != nil {
7540					return err
7541				}
7542				sup.Name = &name
7543			}
7544		case "properties":
7545			if v != nil {
7546				var scheduleUpdateProperties ScheduleUpdateProperties
7547				err = json.Unmarshal(*v, &scheduleUpdateProperties)
7548				if err != nil {
7549					return err
7550				}
7551				sup.ScheduleUpdateProperties = &scheduleUpdateProperties
7552			}
7553		}
7554	}
7555
7556	return nil
7557}
7558
7559// ScheduleUpdateProperties the parameters supplied to the update schedule operation.
7560type ScheduleUpdateProperties struct {
7561	// Description - Gets or sets the description of the schedule.
7562	Description *string `json:"description,omitempty"`
7563	// IsEnabled - Gets or sets a value indicating whether this schedule is enabled.
7564	IsEnabled *bool `json:"isEnabled,omitempty"`
7565}
7566
7567// SetObject ...
7568type SetObject struct {
7569	autorest.Response `json:"-"`
7570	Value             interface{} `json:"value,omitempty"`
7571}
7572
7573// Sku the account SKU.
7574type Sku struct {
7575	// Name - Gets or sets the SKU name of the account. Possible values include: 'Free', 'Basic'
7576	Name SkuNameEnum `json:"name,omitempty"`
7577	// Family - Gets or sets the SKU family.
7578	Family *string `json:"family,omitempty"`
7579	// Capacity - Gets or sets the SKU capacity.
7580	Capacity *int32 `json:"capacity,omitempty"`
7581}
7582
7583// SoftareUpdateConfigurationRunTaskProperties task properties of the software update configuration.
7584type SoftareUpdateConfigurationRunTaskProperties struct {
7585	// Status - The status of the task.
7586	Status *string `json:"status,omitempty"`
7587	// Source - The name of the source of the task.
7588	Source *string `json:"source,omitempty"`
7589	// JobID - The job id of the task.
7590	JobID *string `json:"jobId,omitempty"`
7591}
7592
7593// SoftareUpdateConfigurationRunTasks software update configuration run tasks model.
7594type SoftareUpdateConfigurationRunTasks struct {
7595	// PreTask - Pre task properties.
7596	PreTask *SoftareUpdateConfigurationRunTaskProperties `json:"preTask,omitempty"`
7597	// PostTask - Post task properties.
7598	PostTask *SoftareUpdateConfigurationRunTaskProperties `json:"postTask,omitempty"`
7599}
7600
7601// SoftwareUpdateConfiguration software update configuration properties.
7602type SoftwareUpdateConfiguration struct {
7603	autorest.Response `json:"-"`
7604	// Name - READ-ONLY; Resource name.
7605	Name *string `json:"name,omitempty"`
7606	// ID - READ-ONLY; Resource Id.
7607	ID *string `json:"id,omitempty"`
7608	// Type - READ-ONLY; Resource type
7609	Type *string `json:"type,omitempty"`
7610	// SoftwareUpdateConfigurationProperties - Software update configuration properties.
7611	*SoftwareUpdateConfigurationProperties `json:"properties,omitempty"`
7612}
7613
7614// MarshalJSON is the custom marshaler for SoftwareUpdateConfiguration.
7615func (suc SoftwareUpdateConfiguration) MarshalJSON() ([]byte, error) {
7616	objectMap := make(map[string]interface{})
7617	if suc.SoftwareUpdateConfigurationProperties != nil {
7618		objectMap["properties"] = suc.SoftwareUpdateConfigurationProperties
7619	}
7620	return json.Marshal(objectMap)
7621}
7622
7623// UnmarshalJSON is the custom unmarshaler for SoftwareUpdateConfiguration struct.
7624func (suc *SoftwareUpdateConfiguration) UnmarshalJSON(body []byte) error {
7625	var m map[string]*json.RawMessage
7626	err := json.Unmarshal(body, &m)
7627	if err != nil {
7628		return err
7629	}
7630	for k, v := range m {
7631		switch k {
7632		case "name":
7633			if v != nil {
7634				var name string
7635				err = json.Unmarshal(*v, &name)
7636				if err != nil {
7637					return err
7638				}
7639				suc.Name = &name
7640			}
7641		case "id":
7642			if v != nil {
7643				var ID string
7644				err = json.Unmarshal(*v, &ID)
7645				if err != nil {
7646					return err
7647				}
7648				suc.ID = &ID
7649			}
7650		case "type":
7651			if v != nil {
7652				var typeVar string
7653				err = json.Unmarshal(*v, &typeVar)
7654				if err != nil {
7655					return err
7656				}
7657				suc.Type = &typeVar
7658			}
7659		case "properties":
7660			if v != nil {
7661				var softwareUpdateConfigurationProperties SoftwareUpdateConfigurationProperties
7662				err = json.Unmarshal(*v, &softwareUpdateConfigurationProperties)
7663				if err != nil {
7664					return err
7665				}
7666				suc.SoftwareUpdateConfigurationProperties = &softwareUpdateConfigurationProperties
7667			}
7668		}
7669	}
7670
7671	return nil
7672}
7673
7674// SoftwareUpdateConfigurationCollectionItem software update configuration collection item properties.
7675type SoftwareUpdateConfigurationCollectionItem struct {
7676	// Name - READ-ONLY; Name of the software update configuration.
7677	Name *string `json:"name,omitempty"`
7678	// ID - READ-ONLY; Resource Id of the software update configuration
7679	ID *string `json:"id,omitempty"`
7680	// SoftwareUpdateConfigurationCollectionItemProperties - Software update configuration properties.
7681	*SoftwareUpdateConfigurationCollectionItemProperties `json:"properties,omitempty"`
7682}
7683
7684// MarshalJSON is the custom marshaler for SoftwareUpdateConfigurationCollectionItem.
7685func (succi SoftwareUpdateConfigurationCollectionItem) MarshalJSON() ([]byte, error) {
7686	objectMap := make(map[string]interface{})
7687	if succi.SoftwareUpdateConfigurationCollectionItemProperties != nil {
7688		objectMap["properties"] = succi.SoftwareUpdateConfigurationCollectionItemProperties
7689	}
7690	return json.Marshal(objectMap)
7691}
7692
7693// UnmarshalJSON is the custom unmarshaler for SoftwareUpdateConfigurationCollectionItem struct.
7694func (succi *SoftwareUpdateConfigurationCollectionItem) UnmarshalJSON(body []byte) error {
7695	var m map[string]*json.RawMessage
7696	err := json.Unmarshal(body, &m)
7697	if err != nil {
7698		return err
7699	}
7700	for k, v := range m {
7701		switch k {
7702		case "name":
7703			if v != nil {
7704				var name string
7705				err = json.Unmarshal(*v, &name)
7706				if err != nil {
7707					return err
7708				}
7709				succi.Name = &name
7710			}
7711		case "id":
7712			if v != nil {
7713				var ID string
7714				err = json.Unmarshal(*v, &ID)
7715				if err != nil {
7716					return err
7717				}
7718				succi.ID = &ID
7719			}
7720		case "properties":
7721			if v != nil {
7722				var softwareUpdateConfigurationCollectionItemProperties SoftwareUpdateConfigurationCollectionItemProperties
7723				err = json.Unmarshal(*v, &softwareUpdateConfigurationCollectionItemProperties)
7724				if err != nil {
7725					return err
7726				}
7727				succi.SoftwareUpdateConfigurationCollectionItemProperties = &softwareUpdateConfigurationCollectionItemProperties
7728			}
7729		}
7730	}
7731
7732	return nil
7733}
7734
7735// SoftwareUpdateConfigurationCollectionItemProperties software update configuration collection item
7736// properties.
7737type SoftwareUpdateConfigurationCollectionItemProperties struct {
7738	// UpdateConfiguration - Update specific properties of the software update configuration.
7739	UpdateConfiguration *CollectionItemUpdateConfiguration `json:"updateConfiguration,omitempty"`
7740	// Frequency - execution frequency of the schedule associated with the software update configuration. Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month', 'Minute'
7741	Frequency ScheduleFrequency `json:"frequency,omitempty"`
7742	// StartTime - the start time of the update.
7743	StartTime *date.Time `json:"startTime,omitempty"`
7744	// CreationTime - READ-ONLY; Creation time of the software update configuration, which only appears in the response.
7745	CreationTime *date.Time `json:"creationTime,omitempty"`
7746	// LastModifiedTime - READ-ONLY; Last time software update configuration was modified, which only appears in the response.
7747	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
7748	// ProvisioningState - READ-ONLY; Provisioning state for the software update configuration, which only appears in the response.
7749	ProvisioningState *string `json:"provisioningState,omitempty"`
7750	// NextRun - ext run time of the update.
7751	NextRun *date.Time `json:"nextRun,omitempty"`
7752}
7753
7754// MarshalJSON is the custom marshaler for SoftwareUpdateConfigurationCollectionItemProperties.
7755func (succip SoftwareUpdateConfigurationCollectionItemProperties) MarshalJSON() ([]byte, error) {
7756	objectMap := make(map[string]interface{})
7757	if succip.UpdateConfiguration != nil {
7758		objectMap["updateConfiguration"] = succip.UpdateConfiguration
7759	}
7760	if succip.Frequency != "" {
7761		objectMap["frequency"] = succip.Frequency
7762	}
7763	if succip.StartTime != nil {
7764		objectMap["startTime"] = succip.StartTime
7765	}
7766	if succip.NextRun != nil {
7767		objectMap["nextRun"] = succip.NextRun
7768	}
7769	return json.Marshal(objectMap)
7770}
7771
7772// SoftwareUpdateConfigurationListResult result of listing all software update configuration
7773type SoftwareUpdateConfigurationListResult struct {
7774	autorest.Response `json:"-"`
7775	// Value - outer object returned when listing all software update configurations
7776	Value *[]SoftwareUpdateConfigurationCollectionItem `json:"value,omitempty"`
7777}
7778
7779// SoftwareUpdateConfigurationMachineRun software update configuration machine run model.
7780type SoftwareUpdateConfigurationMachineRun struct {
7781	autorest.Response `json:"-"`
7782	// Name - READ-ONLY; Name of the software update configuration machine run
7783	Name *string `json:"name,omitempty"`
7784	// ID - READ-ONLY; Resource Id of the software update configuration machine run
7785	ID *string `json:"id,omitempty"`
7786	// UpdateConfigurationMachineRunProperties - Software update configuration machine run properties.
7787	*UpdateConfigurationMachineRunProperties `json:"properties,omitempty"`
7788}
7789
7790// MarshalJSON is the custom marshaler for SoftwareUpdateConfigurationMachineRun.
7791func (sucmr SoftwareUpdateConfigurationMachineRun) MarshalJSON() ([]byte, error) {
7792	objectMap := make(map[string]interface{})
7793	if sucmr.UpdateConfigurationMachineRunProperties != nil {
7794		objectMap["properties"] = sucmr.UpdateConfigurationMachineRunProperties
7795	}
7796	return json.Marshal(objectMap)
7797}
7798
7799// UnmarshalJSON is the custom unmarshaler for SoftwareUpdateConfigurationMachineRun struct.
7800func (sucmr *SoftwareUpdateConfigurationMachineRun) UnmarshalJSON(body []byte) error {
7801	var m map[string]*json.RawMessage
7802	err := json.Unmarshal(body, &m)
7803	if err != nil {
7804		return err
7805	}
7806	for k, v := range m {
7807		switch k {
7808		case "name":
7809			if v != nil {
7810				var name string
7811				err = json.Unmarshal(*v, &name)
7812				if err != nil {
7813					return err
7814				}
7815				sucmr.Name = &name
7816			}
7817		case "id":
7818			if v != nil {
7819				var ID string
7820				err = json.Unmarshal(*v, &ID)
7821				if err != nil {
7822					return err
7823				}
7824				sucmr.ID = &ID
7825			}
7826		case "properties":
7827			if v != nil {
7828				var updateConfigurationMachineRunProperties UpdateConfigurationMachineRunProperties
7829				err = json.Unmarshal(*v, &updateConfigurationMachineRunProperties)
7830				if err != nil {
7831					return err
7832				}
7833				sucmr.UpdateConfigurationMachineRunProperties = &updateConfigurationMachineRunProperties
7834			}
7835		}
7836	}
7837
7838	return nil
7839}
7840
7841// SoftwareUpdateConfigurationMachineRunListResult result of listing all software update configuration
7842// machine runs
7843type SoftwareUpdateConfigurationMachineRunListResult struct {
7844	autorest.Response `json:"-"`
7845	// Value - outer object returned when listing all software update configuration machine runs
7846	Value *[]SoftwareUpdateConfigurationMachineRun `json:"value,omitempty"`
7847	// NextLink - link to next page of results.
7848	NextLink *string `json:"nextLink,omitempty"`
7849}
7850
7851// SoftwareUpdateConfigurationProperties software update configuration properties.
7852type SoftwareUpdateConfigurationProperties struct {
7853	// UpdateConfiguration - update specific properties for the Software update configuration
7854	UpdateConfiguration *UpdateConfiguration `json:"updateConfiguration,omitempty"`
7855	// ScheduleInfo - Schedule information for the Software update configuration
7856	ScheduleInfo *ScheduleProperties `json:"scheduleInfo,omitempty"`
7857	// ProvisioningState - READ-ONLY; Provisioning state for the software update configuration, which only appears in the response.
7858	ProvisioningState *string `json:"provisioningState,omitempty"`
7859	// Error - Details of provisioning error
7860	Error *ErrorResponse `json:"error,omitempty"`
7861	// CreationTime - READ-ONLY; Creation time of the resource, which only appears in the response.
7862	CreationTime *date.Time `json:"creationTime,omitempty"`
7863	// CreatedBy - READ-ONLY; CreatedBy property, which only appears in the response.
7864	CreatedBy *string `json:"createdBy,omitempty"`
7865	// LastModifiedTime - READ-ONLY; Last time resource was modified, which only appears in the response.
7866	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
7867	// LastModifiedBy - READ-ONLY; LastModifiedBy property, which only appears in the response.
7868	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
7869	// Tasks - Tasks information for the Software update configuration.
7870	Tasks *SoftwareUpdateConfigurationTasks `json:"tasks,omitempty"`
7871}
7872
7873// MarshalJSON is the custom marshaler for SoftwareUpdateConfigurationProperties.
7874func (sucp SoftwareUpdateConfigurationProperties) MarshalJSON() ([]byte, error) {
7875	objectMap := make(map[string]interface{})
7876	if sucp.UpdateConfiguration != nil {
7877		objectMap["updateConfiguration"] = sucp.UpdateConfiguration
7878	}
7879	if sucp.ScheduleInfo != nil {
7880		objectMap["scheduleInfo"] = sucp.ScheduleInfo
7881	}
7882	if sucp.Error != nil {
7883		objectMap["error"] = sucp.Error
7884	}
7885	if sucp.Tasks != nil {
7886		objectMap["tasks"] = sucp.Tasks
7887	}
7888	return json.Marshal(objectMap)
7889}
7890
7891// SoftwareUpdateConfigurationRun software update configuration Run properties.
7892type SoftwareUpdateConfigurationRun struct {
7893	autorest.Response `json:"-"`
7894	// Name - READ-ONLY; Name of the software update configuration run.
7895	Name *string `json:"name,omitempty"`
7896	// ID - READ-ONLY; Resource Id of the software update configuration run
7897	ID *string `json:"id,omitempty"`
7898	// SoftwareUpdateConfigurationRunProperties - Software update configuration Run properties.
7899	*SoftwareUpdateConfigurationRunProperties `json:"properties,omitempty"`
7900}
7901
7902// MarshalJSON is the custom marshaler for SoftwareUpdateConfigurationRun.
7903func (sucr SoftwareUpdateConfigurationRun) MarshalJSON() ([]byte, error) {
7904	objectMap := make(map[string]interface{})
7905	if sucr.SoftwareUpdateConfigurationRunProperties != nil {
7906		objectMap["properties"] = sucr.SoftwareUpdateConfigurationRunProperties
7907	}
7908	return json.Marshal(objectMap)
7909}
7910
7911// UnmarshalJSON is the custom unmarshaler for SoftwareUpdateConfigurationRun struct.
7912func (sucr *SoftwareUpdateConfigurationRun) UnmarshalJSON(body []byte) error {
7913	var m map[string]*json.RawMessage
7914	err := json.Unmarshal(body, &m)
7915	if err != nil {
7916		return err
7917	}
7918	for k, v := range m {
7919		switch k {
7920		case "name":
7921			if v != nil {
7922				var name string
7923				err = json.Unmarshal(*v, &name)
7924				if err != nil {
7925					return err
7926				}
7927				sucr.Name = &name
7928			}
7929		case "id":
7930			if v != nil {
7931				var ID string
7932				err = json.Unmarshal(*v, &ID)
7933				if err != nil {
7934					return err
7935				}
7936				sucr.ID = &ID
7937			}
7938		case "properties":
7939			if v != nil {
7940				var softwareUpdateConfigurationRunProperties SoftwareUpdateConfigurationRunProperties
7941				err = json.Unmarshal(*v, &softwareUpdateConfigurationRunProperties)
7942				if err != nil {
7943					return err
7944				}
7945				sucr.SoftwareUpdateConfigurationRunProperties = &softwareUpdateConfigurationRunProperties
7946			}
7947		}
7948	}
7949
7950	return nil
7951}
7952
7953// SoftwareUpdateConfigurationRunListResult result of listing all software update configuration runs
7954type SoftwareUpdateConfigurationRunListResult struct {
7955	autorest.Response `json:"-"`
7956	// Value - outer object returned when listing all software update configuration runs
7957	Value *[]SoftwareUpdateConfigurationRun `json:"value,omitempty"`
7958	// NextLink - link to next page of results.
7959	NextLink *string `json:"nextLink,omitempty"`
7960}
7961
7962// SoftwareUpdateConfigurationRunProperties software update configuration properties.
7963type SoftwareUpdateConfigurationRunProperties struct {
7964	// SoftwareUpdateConfiguration - software update configuration triggered this run
7965	SoftwareUpdateConfiguration *UpdateConfigurationNavigation `json:"softwareUpdateConfiguration,omitempty"`
7966	// Status - READ-ONLY; Status of the software update configuration run.
7967	Status *string `json:"status,omitempty"`
7968	// ConfiguredDuration - READ-ONLY; Configured duration for the software update configuration run.
7969	ConfiguredDuration *string `json:"configuredDuration,omitempty"`
7970	// OsType - READ-ONLY; Operating system target of the software update configuration triggered this run
7971	OsType *string `json:"osType,omitempty"`
7972	// StartTime - READ-ONLY; Start time of the software update configuration run.
7973	StartTime *date.Time `json:"startTime,omitempty"`
7974	// EndTime - READ-ONLY; End time of the software update configuration run.
7975	EndTime *date.Time `json:"endTime,omitempty"`
7976	// ComputerCount - READ-ONLY; Number of computers in the software update configuration run.
7977	ComputerCount *int32 `json:"computerCount,omitempty"`
7978	// FailedCount - READ-ONLY; Number of computers with failed status.
7979	FailedCount *int32 `json:"failedCount,omitempty"`
7980	// CreationTime - READ-ONLY; Creation time of the resource, which only appears in the response.
7981	CreationTime *date.Time `json:"creationTime,omitempty"`
7982	// CreatedBy - READ-ONLY; CreatedBy property, which only appears in the response.
7983	CreatedBy *string `json:"createdBy,omitempty"`
7984	// LastModifiedTime - READ-ONLY; Last time resource was modified, which only appears in the response.
7985	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
7986	// LastModifiedBy - READ-ONLY; LastModifiedBy property, which only appears in the response.
7987	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
7988	// Tasks - Software update configuration tasks triggered in this run
7989	Tasks *SoftareUpdateConfigurationRunTasks `json:"tasks,omitempty"`
7990}
7991
7992// MarshalJSON is the custom marshaler for SoftwareUpdateConfigurationRunProperties.
7993func (sucrp SoftwareUpdateConfigurationRunProperties) MarshalJSON() ([]byte, error) {
7994	objectMap := make(map[string]interface{})
7995	if sucrp.SoftwareUpdateConfiguration != nil {
7996		objectMap["softwareUpdateConfiguration"] = sucrp.SoftwareUpdateConfiguration
7997	}
7998	if sucrp.Tasks != nil {
7999		objectMap["tasks"] = sucrp.Tasks
8000	}
8001	return json.Marshal(objectMap)
8002}
8003
8004// SoftwareUpdateConfigurationTasks task properties of the software update configuration.
8005type SoftwareUpdateConfigurationTasks struct {
8006	// PreTask - Pre task properties.
8007	PreTask *TaskProperties `json:"preTask,omitempty"`
8008	// PostTask - Post task properties.
8009	PostTask *TaskProperties `json:"postTask,omitempty"`
8010}
8011
8012// SourceControl definition of the source control.
8013type SourceControl struct {
8014	autorest.Response `json:"-"`
8015	// SourceControlProperties - The properties of the source control.
8016	*SourceControlProperties `json:"properties,omitempty"`
8017	// ID - READ-ONLY; Fully qualified resource Id for the resource
8018	ID *string `json:"id,omitempty"`
8019	// Name - READ-ONLY; The name of the resource
8020	Name *string `json:"name,omitempty"`
8021	// Type - READ-ONLY; The type of the resource.
8022	Type *string `json:"type,omitempty"`
8023}
8024
8025// MarshalJSON is the custom marshaler for SourceControl.
8026func (sc SourceControl) MarshalJSON() ([]byte, error) {
8027	objectMap := make(map[string]interface{})
8028	if sc.SourceControlProperties != nil {
8029		objectMap["properties"] = sc.SourceControlProperties
8030	}
8031	return json.Marshal(objectMap)
8032}
8033
8034// UnmarshalJSON is the custom unmarshaler for SourceControl struct.
8035func (sc *SourceControl) UnmarshalJSON(body []byte) error {
8036	var m map[string]*json.RawMessage
8037	err := json.Unmarshal(body, &m)
8038	if err != nil {
8039		return err
8040	}
8041	for k, v := range m {
8042		switch k {
8043		case "properties":
8044			if v != nil {
8045				var sourceControlProperties SourceControlProperties
8046				err = json.Unmarshal(*v, &sourceControlProperties)
8047				if err != nil {
8048					return err
8049				}
8050				sc.SourceControlProperties = &sourceControlProperties
8051			}
8052		case "id":
8053			if v != nil {
8054				var ID string
8055				err = json.Unmarshal(*v, &ID)
8056				if err != nil {
8057					return err
8058				}
8059				sc.ID = &ID
8060			}
8061		case "name":
8062			if v != nil {
8063				var name string
8064				err = json.Unmarshal(*v, &name)
8065				if err != nil {
8066					return err
8067				}
8068				sc.Name = &name
8069			}
8070		case "type":
8071			if v != nil {
8072				var typeVar string
8073				err = json.Unmarshal(*v, &typeVar)
8074				if err != nil {
8075					return err
8076				}
8077				sc.Type = &typeVar
8078			}
8079		}
8080	}
8081
8082	return nil
8083}
8084
8085// SourceControlCreateOrUpdateParameters the parameters supplied to the create or update source control
8086// operation.
8087type SourceControlCreateOrUpdateParameters struct {
8088	// SourceControlCreateOrUpdateProperties - The properties of the source control.
8089	*SourceControlCreateOrUpdateProperties `json:"properties,omitempty"`
8090}
8091
8092// MarshalJSON is the custom marshaler for SourceControlCreateOrUpdateParameters.
8093func (sccoup SourceControlCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
8094	objectMap := make(map[string]interface{})
8095	if sccoup.SourceControlCreateOrUpdateProperties != nil {
8096		objectMap["properties"] = sccoup.SourceControlCreateOrUpdateProperties
8097	}
8098	return json.Marshal(objectMap)
8099}
8100
8101// UnmarshalJSON is the custom unmarshaler for SourceControlCreateOrUpdateParameters struct.
8102func (sccoup *SourceControlCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
8103	var m map[string]*json.RawMessage
8104	err := json.Unmarshal(body, &m)
8105	if err != nil {
8106		return err
8107	}
8108	for k, v := range m {
8109		switch k {
8110		case "properties":
8111			if v != nil {
8112				var sourceControlCreateOrUpdateProperties SourceControlCreateOrUpdateProperties
8113				err = json.Unmarshal(*v, &sourceControlCreateOrUpdateProperties)
8114				if err != nil {
8115					return err
8116				}
8117				sccoup.SourceControlCreateOrUpdateProperties = &sourceControlCreateOrUpdateProperties
8118			}
8119		}
8120	}
8121
8122	return nil
8123}
8124
8125// SourceControlCreateOrUpdateProperties the properties of the create source control operation.
8126type SourceControlCreateOrUpdateProperties struct {
8127	// RepoURL - The repo url of the source control.
8128	RepoURL *string `json:"repoUrl,omitempty"`
8129	// Branch - The repo branch of the source control. Include branch as empty string for VsoTfvc.
8130	Branch *string `json:"branch,omitempty"`
8131	// FolderPath - The folder path of the source control. Path must be relative.
8132	FolderPath *string `json:"folderPath,omitempty"`
8133	// AutoSync - The auto async of the source control. Default is false.
8134	AutoSync *bool `json:"autoSync,omitempty"`
8135	// PublishRunbook - The auto publish of the source control. Default is true.
8136	PublishRunbook *bool `json:"publishRunbook,omitempty"`
8137	// SourceType - The source type. Must be one of VsoGit, VsoTfvc, GitHub, case sensitive. Possible values include: 'VsoGit', 'VsoTfvc', 'GitHub'
8138	SourceType SourceType `json:"sourceType,omitempty"`
8139	// SecurityToken - The authorization token for the repo of the source control.
8140	SecurityToken *SourceControlSecurityTokenProperties `json:"securityToken,omitempty"`
8141	// Description - The user description of the source control.
8142	Description *string `json:"description,omitempty"`
8143}
8144
8145// SourceControlListResult the response model for the list source controls operation.
8146type SourceControlListResult struct {
8147	autorest.Response `json:"-"`
8148	// Value - The list of source controls.
8149	Value *[]SourceControl `json:"value,omitempty"`
8150	// NextLink - The next link.
8151	NextLink *string `json:"nextLink,omitempty"`
8152}
8153
8154// SourceControlListResultIterator provides access to a complete listing of SourceControl values.
8155type SourceControlListResultIterator struct {
8156	i    int
8157	page SourceControlListResultPage
8158}
8159
8160// NextWithContext advances to the next value.  If there was an error making
8161// the request the iterator does not advance and the error is returned.
8162func (iter *SourceControlListResultIterator) NextWithContext(ctx context.Context) (err error) {
8163	if tracing.IsEnabled() {
8164		ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlListResultIterator.NextWithContext")
8165		defer func() {
8166			sc := -1
8167			if iter.Response().Response.Response != nil {
8168				sc = iter.Response().Response.Response.StatusCode
8169			}
8170			tracing.EndSpan(ctx, sc, err)
8171		}()
8172	}
8173	iter.i++
8174	if iter.i < len(iter.page.Values()) {
8175		return nil
8176	}
8177	err = iter.page.NextWithContext(ctx)
8178	if err != nil {
8179		iter.i--
8180		return err
8181	}
8182	iter.i = 0
8183	return nil
8184}
8185
8186// Next advances to the next value.  If there was an error making
8187// the request the iterator does not advance and the error is returned.
8188// Deprecated: Use NextWithContext() instead.
8189func (iter *SourceControlListResultIterator) Next() error {
8190	return iter.NextWithContext(context.Background())
8191}
8192
8193// NotDone returns true if the enumeration should be started or is not yet complete.
8194func (iter SourceControlListResultIterator) NotDone() bool {
8195	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8196}
8197
8198// Response returns the raw server response from the last page request.
8199func (iter SourceControlListResultIterator) Response() SourceControlListResult {
8200	return iter.page.Response()
8201}
8202
8203// Value returns the current value or a zero-initialized value if the
8204// iterator has advanced beyond the end of the collection.
8205func (iter SourceControlListResultIterator) Value() SourceControl {
8206	if !iter.page.NotDone() {
8207		return SourceControl{}
8208	}
8209	return iter.page.Values()[iter.i]
8210}
8211
8212// Creates a new instance of the SourceControlListResultIterator type.
8213func NewSourceControlListResultIterator(page SourceControlListResultPage) SourceControlListResultIterator {
8214	return SourceControlListResultIterator{page: page}
8215}
8216
8217// IsEmpty returns true if the ListResult contains no values.
8218func (sclr SourceControlListResult) IsEmpty() bool {
8219	return sclr.Value == nil || len(*sclr.Value) == 0
8220}
8221
8222// hasNextLink returns true if the NextLink is not empty.
8223func (sclr SourceControlListResult) hasNextLink() bool {
8224	return sclr.NextLink != nil && len(*sclr.NextLink) != 0
8225}
8226
8227// sourceControlListResultPreparer prepares a request to retrieve the next set of results.
8228// It returns nil if no more results exist.
8229func (sclr SourceControlListResult) sourceControlListResultPreparer(ctx context.Context) (*http.Request, error) {
8230	if !sclr.hasNextLink() {
8231		return nil, nil
8232	}
8233	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8234		autorest.AsJSON(),
8235		autorest.AsGet(),
8236		autorest.WithBaseURL(to.String(sclr.NextLink)))
8237}
8238
8239// SourceControlListResultPage contains a page of SourceControl values.
8240type SourceControlListResultPage struct {
8241	fn   func(context.Context, SourceControlListResult) (SourceControlListResult, error)
8242	sclr SourceControlListResult
8243}
8244
8245// NextWithContext advances to the next page of values.  If there was an error making
8246// the request the page does not advance and the error is returned.
8247func (page *SourceControlListResultPage) NextWithContext(ctx context.Context) (err error) {
8248	if tracing.IsEnabled() {
8249		ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlListResultPage.NextWithContext")
8250		defer func() {
8251			sc := -1
8252			if page.Response().Response.Response != nil {
8253				sc = page.Response().Response.Response.StatusCode
8254			}
8255			tracing.EndSpan(ctx, sc, err)
8256		}()
8257	}
8258	for {
8259		next, err := page.fn(ctx, page.sclr)
8260		if err != nil {
8261			return err
8262		}
8263		page.sclr = next
8264		if !next.hasNextLink() || !next.IsEmpty() {
8265			break
8266		}
8267	}
8268	return nil
8269}
8270
8271// Next advances to the next page of values.  If there was an error making
8272// the request the page does not advance and the error is returned.
8273// Deprecated: Use NextWithContext() instead.
8274func (page *SourceControlListResultPage) Next() error {
8275	return page.NextWithContext(context.Background())
8276}
8277
8278// NotDone returns true if the page enumeration should be started or is not yet complete.
8279func (page SourceControlListResultPage) NotDone() bool {
8280	return !page.sclr.IsEmpty()
8281}
8282
8283// Response returns the raw server response from the last page request.
8284func (page SourceControlListResultPage) Response() SourceControlListResult {
8285	return page.sclr
8286}
8287
8288// Values returns the slice of values for the current page or nil if there are no values.
8289func (page SourceControlListResultPage) Values() []SourceControl {
8290	if page.sclr.IsEmpty() {
8291		return nil
8292	}
8293	return *page.sclr.Value
8294}
8295
8296// Creates a new instance of the SourceControlListResultPage type.
8297func NewSourceControlListResultPage(cur SourceControlListResult, getNextPage func(context.Context, SourceControlListResult) (SourceControlListResult, error)) SourceControlListResultPage {
8298	return SourceControlListResultPage{
8299		fn:   getNextPage,
8300		sclr: cur,
8301	}
8302}
8303
8304// SourceControlProperties definition of the source control properties
8305type SourceControlProperties struct {
8306	// RepoURL - The repo url of the source control.
8307	RepoURL *string `json:"repoUrl,omitempty"`
8308	// Branch - The repo branch of the source control. Include branch as empty string for VsoTfvc.
8309	Branch *string `json:"branch,omitempty"`
8310	// FolderPath - The folder path of the source control.
8311	FolderPath *string `json:"folderPath,omitempty"`
8312	// AutoSync - The auto sync of the source control. Default is false.
8313	AutoSync *bool `json:"autoSync,omitempty"`
8314	// PublishRunbook - The auto publish of the source control. Default is true.
8315	PublishRunbook *bool `json:"publishRunbook,omitempty"`
8316	// SourceType - The source type. Must be one of VsoGit, VsoTfvc, GitHub. Possible values include: 'VsoGit', 'VsoTfvc', 'GitHub'
8317	SourceType SourceType `json:"sourceType,omitempty"`
8318	// Description - The description.
8319	Description *string `json:"description,omitempty"`
8320	// CreationTime - The creation time.
8321	CreationTime *date.Time `json:"creationTime,omitempty"`
8322	// LastModifiedTime - The last modified time.
8323	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
8324}
8325
8326// SourceControlSecurityTokenProperties ...
8327type SourceControlSecurityTokenProperties struct {
8328	// AccessToken - The access token.
8329	AccessToken *string `json:"accessToken,omitempty"`
8330	// RefreshToken - The refresh token.
8331	RefreshToken *string `json:"refreshToken,omitempty"`
8332	// TokenType - The token type. Must be either PersonalAccessToken or Oauth. Possible values include: 'PersonalAccessToken', 'Oauth'
8333	TokenType TokenType `json:"tokenType,omitempty"`
8334}
8335
8336// SourceControlSyncJob definition of the source control sync job.
8337type SourceControlSyncJob struct {
8338	autorest.Response `json:"-"`
8339	// Name - READ-ONLY; Resource name.
8340	Name *string `json:"name,omitempty"`
8341	// Type - READ-ONLY; Resource type.
8342	Type *string `json:"type,omitempty"`
8343	// ID - READ-ONLY; Resource id.
8344	ID *string `json:"id,omitempty"`
8345	// SourceControlSyncJobProperties - The properties of the source control sync job.
8346	*SourceControlSyncJobProperties `json:"properties,omitempty"`
8347}
8348
8349// MarshalJSON is the custom marshaler for SourceControlSyncJob.
8350func (scsj SourceControlSyncJob) MarshalJSON() ([]byte, error) {
8351	objectMap := make(map[string]interface{})
8352	if scsj.SourceControlSyncJobProperties != nil {
8353		objectMap["properties"] = scsj.SourceControlSyncJobProperties
8354	}
8355	return json.Marshal(objectMap)
8356}
8357
8358// UnmarshalJSON is the custom unmarshaler for SourceControlSyncJob struct.
8359func (scsj *SourceControlSyncJob) UnmarshalJSON(body []byte) error {
8360	var m map[string]*json.RawMessage
8361	err := json.Unmarshal(body, &m)
8362	if err != nil {
8363		return err
8364	}
8365	for k, v := range m {
8366		switch k {
8367		case "name":
8368			if v != nil {
8369				var name string
8370				err = json.Unmarshal(*v, &name)
8371				if err != nil {
8372					return err
8373				}
8374				scsj.Name = &name
8375			}
8376		case "type":
8377			if v != nil {
8378				var typeVar string
8379				err = json.Unmarshal(*v, &typeVar)
8380				if err != nil {
8381					return err
8382				}
8383				scsj.Type = &typeVar
8384			}
8385		case "id":
8386			if v != nil {
8387				var ID string
8388				err = json.Unmarshal(*v, &ID)
8389				if err != nil {
8390					return err
8391				}
8392				scsj.ID = &ID
8393			}
8394		case "properties":
8395			if v != nil {
8396				var sourceControlSyncJobProperties SourceControlSyncJobProperties
8397				err = json.Unmarshal(*v, &sourceControlSyncJobProperties)
8398				if err != nil {
8399					return err
8400				}
8401				scsj.SourceControlSyncJobProperties = &sourceControlSyncJobProperties
8402			}
8403		}
8404	}
8405
8406	return nil
8407}
8408
8409// SourceControlSyncJobByID definition of the source control sync job.
8410type SourceControlSyncJobByID struct {
8411	autorest.Response `json:"-"`
8412	// ID - The id of the job.
8413	ID *string `json:"id,omitempty"`
8414	// SourceControlSyncJobByIDProperties - The properties of the source control sync job.
8415	*SourceControlSyncJobByIDProperties `json:"properties,omitempty"`
8416}
8417
8418// MarshalJSON is the custom marshaler for SourceControlSyncJobByID.
8419func (scsjbi SourceControlSyncJobByID) MarshalJSON() ([]byte, error) {
8420	objectMap := make(map[string]interface{})
8421	if scsjbi.ID != nil {
8422		objectMap["id"] = scsjbi.ID
8423	}
8424	if scsjbi.SourceControlSyncJobByIDProperties != nil {
8425		objectMap["properties"] = scsjbi.SourceControlSyncJobByIDProperties
8426	}
8427	return json.Marshal(objectMap)
8428}
8429
8430// UnmarshalJSON is the custom unmarshaler for SourceControlSyncJobByID struct.
8431func (scsjbi *SourceControlSyncJobByID) UnmarshalJSON(body []byte) error {
8432	var m map[string]*json.RawMessage
8433	err := json.Unmarshal(body, &m)
8434	if err != nil {
8435		return err
8436	}
8437	for k, v := range m {
8438		switch k {
8439		case "id":
8440			if v != nil {
8441				var ID string
8442				err = json.Unmarshal(*v, &ID)
8443				if err != nil {
8444					return err
8445				}
8446				scsjbi.ID = &ID
8447			}
8448		case "properties":
8449			if v != nil {
8450				var sourceControlSyncJobByIDProperties SourceControlSyncJobByIDProperties
8451				err = json.Unmarshal(*v, &sourceControlSyncJobByIDProperties)
8452				if err != nil {
8453					return err
8454				}
8455				scsjbi.SourceControlSyncJobByIDProperties = &sourceControlSyncJobByIDProperties
8456			}
8457		}
8458	}
8459
8460	return nil
8461}
8462
8463// SourceControlSyncJobByIDProperties definition of source control sync job properties.
8464type SourceControlSyncJobByIDProperties struct {
8465	// SourceControlSyncJobID - The source control sync job id.
8466	SourceControlSyncJobID *string `json:"sourceControlSyncJobId,omitempty"`
8467	// CreationTime - READ-ONLY; The creation time of the job.
8468	CreationTime *date.Time `json:"creationTime,omitempty"`
8469	// ProvisioningState - The provisioning state of the job. Possible values include: 'Completed', 'Failed', 'Running'
8470	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8471	// StartTime - READ-ONLY; The start time of the job.
8472	StartTime *date.Time `json:"startTime,omitempty"`
8473	// EndTime - READ-ONLY; The end time of the job.
8474	EndTime *date.Time `json:"endTime,omitempty"`
8475	// SyncType - The sync type. Possible values include: 'PartialSync', 'FullSync'
8476	SyncType SyncType `json:"syncType,omitempty"`
8477	// Exception - The exceptions that occurred while running the sync job.
8478	Exception *string `json:"exception,omitempty"`
8479}
8480
8481// MarshalJSON is the custom marshaler for SourceControlSyncJobByIDProperties.
8482func (scsjbip SourceControlSyncJobByIDProperties) MarshalJSON() ([]byte, error) {
8483	objectMap := make(map[string]interface{})
8484	if scsjbip.SourceControlSyncJobID != nil {
8485		objectMap["sourceControlSyncJobId"] = scsjbip.SourceControlSyncJobID
8486	}
8487	if scsjbip.ProvisioningState != "" {
8488		objectMap["provisioningState"] = scsjbip.ProvisioningState
8489	}
8490	if scsjbip.SyncType != "" {
8491		objectMap["syncType"] = scsjbip.SyncType
8492	}
8493	if scsjbip.Exception != nil {
8494		objectMap["exception"] = scsjbip.Exception
8495	}
8496	return json.Marshal(objectMap)
8497}
8498
8499// SourceControlSyncJobCreateParameters the parameters supplied to the create source control sync job
8500// operation.
8501type SourceControlSyncJobCreateParameters struct {
8502	// SourceControlSyncJobCreateProperties - The properties of the source control sync job.
8503	*SourceControlSyncJobCreateProperties `json:"properties,omitempty"`
8504}
8505
8506// MarshalJSON is the custom marshaler for SourceControlSyncJobCreateParameters.
8507func (scsjcp SourceControlSyncJobCreateParameters) MarshalJSON() ([]byte, error) {
8508	objectMap := make(map[string]interface{})
8509	if scsjcp.SourceControlSyncJobCreateProperties != nil {
8510		objectMap["properties"] = scsjcp.SourceControlSyncJobCreateProperties
8511	}
8512	return json.Marshal(objectMap)
8513}
8514
8515// UnmarshalJSON is the custom unmarshaler for SourceControlSyncJobCreateParameters struct.
8516func (scsjcp *SourceControlSyncJobCreateParameters) UnmarshalJSON(body []byte) error {
8517	var m map[string]*json.RawMessage
8518	err := json.Unmarshal(body, &m)
8519	if err != nil {
8520		return err
8521	}
8522	for k, v := range m {
8523		switch k {
8524		case "properties":
8525			if v != nil {
8526				var sourceControlSyncJobCreateProperties SourceControlSyncJobCreateProperties
8527				err = json.Unmarshal(*v, &sourceControlSyncJobCreateProperties)
8528				if err != nil {
8529					return err
8530				}
8531				scsjcp.SourceControlSyncJobCreateProperties = &sourceControlSyncJobCreateProperties
8532			}
8533		}
8534	}
8535
8536	return nil
8537}
8538
8539// SourceControlSyncJobCreateProperties definition of create source control sync job properties.
8540type SourceControlSyncJobCreateProperties struct {
8541	// CommitID - The commit id of the source control sync job. If not syncing to a commitId, enter an empty string.
8542	CommitID *string `json:"commitId,omitempty"`
8543}
8544
8545// SourceControlSyncJobListResult the response model for the list source control sync jobs operation.
8546type SourceControlSyncJobListResult struct {
8547	autorest.Response `json:"-"`
8548	// Value - The list of source control sync jobs.
8549	Value *[]SourceControlSyncJob `json:"value,omitempty"`
8550	// NextLink - The next link.
8551	NextLink *string `json:"nextLink,omitempty"`
8552}
8553
8554// SourceControlSyncJobListResultIterator provides access to a complete listing of SourceControlSyncJob
8555// values.
8556type SourceControlSyncJobListResultIterator struct {
8557	i    int
8558	page SourceControlSyncJobListResultPage
8559}
8560
8561// NextWithContext advances to the next value.  If there was an error making
8562// the request the iterator does not advance and the error is returned.
8563func (iter *SourceControlSyncJobListResultIterator) NextWithContext(ctx context.Context) (err error) {
8564	if tracing.IsEnabled() {
8565		ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlSyncJobListResultIterator.NextWithContext")
8566		defer func() {
8567			sc := -1
8568			if iter.Response().Response.Response != nil {
8569				sc = iter.Response().Response.Response.StatusCode
8570			}
8571			tracing.EndSpan(ctx, sc, err)
8572		}()
8573	}
8574	iter.i++
8575	if iter.i < len(iter.page.Values()) {
8576		return nil
8577	}
8578	err = iter.page.NextWithContext(ctx)
8579	if err != nil {
8580		iter.i--
8581		return err
8582	}
8583	iter.i = 0
8584	return nil
8585}
8586
8587// Next advances to the next value.  If there was an error making
8588// the request the iterator does not advance and the error is returned.
8589// Deprecated: Use NextWithContext() instead.
8590func (iter *SourceControlSyncJobListResultIterator) Next() error {
8591	return iter.NextWithContext(context.Background())
8592}
8593
8594// NotDone returns true if the enumeration should be started or is not yet complete.
8595func (iter SourceControlSyncJobListResultIterator) NotDone() bool {
8596	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8597}
8598
8599// Response returns the raw server response from the last page request.
8600func (iter SourceControlSyncJobListResultIterator) Response() SourceControlSyncJobListResult {
8601	return iter.page.Response()
8602}
8603
8604// Value returns the current value or a zero-initialized value if the
8605// iterator has advanced beyond the end of the collection.
8606func (iter SourceControlSyncJobListResultIterator) Value() SourceControlSyncJob {
8607	if !iter.page.NotDone() {
8608		return SourceControlSyncJob{}
8609	}
8610	return iter.page.Values()[iter.i]
8611}
8612
8613// Creates a new instance of the SourceControlSyncJobListResultIterator type.
8614func NewSourceControlSyncJobListResultIterator(page SourceControlSyncJobListResultPage) SourceControlSyncJobListResultIterator {
8615	return SourceControlSyncJobListResultIterator{page: page}
8616}
8617
8618// IsEmpty returns true if the ListResult contains no values.
8619func (scsjlr SourceControlSyncJobListResult) IsEmpty() bool {
8620	return scsjlr.Value == nil || len(*scsjlr.Value) == 0
8621}
8622
8623// hasNextLink returns true if the NextLink is not empty.
8624func (scsjlr SourceControlSyncJobListResult) hasNextLink() bool {
8625	return scsjlr.NextLink != nil && len(*scsjlr.NextLink) != 0
8626}
8627
8628// sourceControlSyncJobListResultPreparer prepares a request to retrieve the next set of results.
8629// It returns nil if no more results exist.
8630func (scsjlr SourceControlSyncJobListResult) sourceControlSyncJobListResultPreparer(ctx context.Context) (*http.Request, error) {
8631	if !scsjlr.hasNextLink() {
8632		return nil, nil
8633	}
8634	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8635		autorest.AsJSON(),
8636		autorest.AsGet(),
8637		autorest.WithBaseURL(to.String(scsjlr.NextLink)))
8638}
8639
8640// SourceControlSyncJobListResultPage contains a page of SourceControlSyncJob values.
8641type SourceControlSyncJobListResultPage struct {
8642	fn     func(context.Context, SourceControlSyncJobListResult) (SourceControlSyncJobListResult, error)
8643	scsjlr SourceControlSyncJobListResult
8644}
8645
8646// NextWithContext advances to the next page of values.  If there was an error making
8647// the request the page does not advance and the error is returned.
8648func (page *SourceControlSyncJobListResultPage) NextWithContext(ctx context.Context) (err error) {
8649	if tracing.IsEnabled() {
8650		ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlSyncJobListResultPage.NextWithContext")
8651		defer func() {
8652			sc := -1
8653			if page.Response().Response.Response != nil {
8654				sc = page.Response().Response.Response.StatusCode
8655			}
8656			tracing.EndSpan(ctx, sc, err)
8657		}()
8658	}
8659	for {
8660		next, err := page.fn(ctx, page.scsjlr)
8661		if err != nil {
8662			return err
8663		}
8664		page.scsjlr = next
8665		if !next.hasNextLink() || !next.IsEmpty() {
8666			break
8667		}
8668	}
8669	return nil
8670}
8671
8672// Next advances to the next page of values.  If there was an error making
8673// the request the page does not advance and the error is returned.
8674// Deprecated: Use NextWithContext() instead.
8675func (page *SourceControlSyncJobListResultPage) Next() error {
8676	return page.NextWithContext(context.Background())
8677}
8678
8679// NotDone returns true if the page enumeration should be started or is not yet complete.
8680func (page SourceControlSyncJobListResultPage) NotDone() bool {
8681	return !page.scsjlr.IsEmpty()
8682}
8683
8684// Response returns the raw server response from the last page request.
8685func (page SourceControlSyncJobListResultPage) Response() SourceControlSyncJobListResult {
8686	return page.scsjlr
8687}
8688
8689// Values returns the slice of values for the current page or nil if there are no values.
8690func (page SourceControlSyncJobListResultPage) Values() []SourceControlSyncJob {
8691	if page.scsjlr.IsEmpty() {
8692		return nil
8693	}
8694	return *page.scsjlr.Value
8695}
8696
8697// Creates a new instance of the SourceControlSyncJobListResultPage type.
8698func NewSourceControlSyncJobListResultPage(cur SourceControlSyncJobListResult, getNextPage func(context.Context, SourceControlSyncJobListResult) (SourceControlSyncJobListResult, error)) SourceControlSyncJobListResultPage {
8699	return SourceControlSyncJobListResultPage{
8700		fn:     getNextPage,
8701		scsjlr: cur,
8702	}
8703}
8704
8705// SourceControlSyncJobProperties definition of source control sync job properties.
8706type SourceControlSyncJobProperties struct {
8707	// SourceControlSyncJobID - The source control sync job id.
8708	SourceControlSyncJobID *string `json:"sourceControlSyncJobId,omitempty"`
8709	// CreationTime - READ-ONLY; The creation time of the job.
8710	CreationTime *date.Time `json:"creationTime,omitempty"`
8711	// ProvisioningState - The provisioning state of the job. Possible values include: 'Completed', 'Failed', 'Running'
8712	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8713	// StartTime - READ-ONLY; The start time of the job.
8714	StartTime *date.Time `json:"startTime,omitempty"`
8715	// EndTime - READ-ONLY; The end time of the job.
8716	EndTime *date.Time `json:"endTime,omitempty"`
8717	// SyncType - The sync type. Possible values include: 'PartialSync', 'FullSync'
8718	SyncType SyncType `json:"syncType,omitempty"`
8719}
8720
8721// MarshalJSON is the custom marshaler for SourceControlSyncJobProperties.
8722func (scsjp SourceControlSyncJobProperties) MarshalJSON() ([]byte, error) {
8723	objectMap := make(map[string]interface{})
8724	if scsjp.SourceControlSyncJobID != nil {
8725		objectMap["sourceControlSyncJobId"] = scsjp.SourceControlSyncJobID
8726	}
8727	if scsjp.ProvisioningState != "" {
8728		objectMap["provisioningState"] = scsjp.ProvisioningState
8729	}
8730	if scsjp.SyncType != "" {
8731		objectMap["syncType"] = scsjp.SyncType
8732	}
8733	return json.Marshal(objectMap)
8734}
8735
8736// SourceControlSyncJobStream definition of the source control sync job stream.
8737type SourceControlSyncJobStream struct {
8738	// ID - READ-ONLY; Resource id.
8739	ID *string `json:"id,omitempty"`
8740	// SourceControlSyncJobStreamProperties - The properties of the source control sync job stream.
8741	*SourceControlSyncJobStreamProperties `json:"properties,omitempty"`
8742}
8743
8744// MarshalJSON is the custom marshaler for SourceControlSyncJobStream.
8745func (scsjs SourceControlSyncJobStream) MarshalJSON() ([]byte, error) {
8746	objectMap := make(map[string]interface{})
8747	if scsjs.SourceControlSyncJobStreamProperties != nil {
8748		objectMap["properties"] = scsjs.SourceControlSyncJobStreamProperties
8749	}
8750	return json.Marshal(objectMap)
8751}
8752
8753// UnmarshalJSON is the custom unmarshaler for SourceControlSyncJobStream struct.
8754func (scsjs *SourceControlSyncJobStream) UnmarshalJSON(body []byte) error {
8755	var m map[string]*json.RawMessage
8756	err := json.Unmarshal(body, &m)
8757	if err != nil {
8758		return err
8759	}
8760	for k, v := range m {
8761		switch k {
8762		case "id":
8763			if v != nil {
8764				var ID string
8765				err = json.Unmarshal(*v, &ID)
8766				if err != nil {
8767					return err
8768				}
8769				scsjs.ID = &ID
8770			}
8771		case "properties":
8772			if v != nil {
8773				var sourceControlSyncJobStreamProperties SourceControlSyncJobStreamProperties
8774				err = json.Unmarshal(*v, &sourceControlSyncJobStreamProperties)
8775				if err != nil {
8776					return err
8777				}
8778				scsjs.SourceControlSyncJobStreamProperties = &sourceControlSyncJobStreamProperties
8779			}
8780		}
8781	}
8782
8783	return nil
8784}
8785
8786// SourceControlSyncJobStreamByID definition of the source control sync job stream by id.
8787type SourceControlSyncJobStreamByID struct {
8788	autorest.Response `json:"-"`
8789	// ID - READ-ONLY; Resource id.
8790	ID *string `json:"id,omitempty"`
8791	// SourceControlSyncJobStreamByIDProperties - The properties of the source control sync job stream.
8792	*SourceControlSyncJobStreamByIDProperties `json:"properties,omitempty"`
8793}
8794
8795// MarshalJSON is the custom marshaler for SourceControlSyncJobStreamByID.
8796func (scsjsbi SourceControlSyncJobStreamByID) MarshalJSON() ([]byte, error) {
8797	objectMap := make(map[string]interface{})
8798	if scsjsbi.SourceControlSyncJobStreamByIDProperties != nil {
8799		objectMap["properties"] = scsjsbi.SourceControlSyncJobStreamByIDProperties
8800	}
8801	return json.Marshal(objectMap)
8802}
8803
8804// UnmarshalJSON is the custom unmarshaler for SourceControlSyncJobStreamByID struct.
8805func (scsjsbi *SourceControlSyncJobStreamByID) UnmarshalJSON(body []byte) error {
8806	var m map[string]*json.RawMessage
8807	err := json.Unmarshal(body, &m)
8808	if err != nil {
8809		return err
8810	}
8811	for k, v := range m {
8812		switch k {
8813		case "id":
8814			if v != nil {
8815				var ID string
8816				err = json.Unmarshal(*v, &ID)
8817				if err != nil {
8818					return err
8819				}
8820				scsjsbi.ID = &ID
8821			}
8822		case "properties":
8823			if v != nil {
8824				var sourceControlSyncJobStreamByIDProperties SourceControlSyncJobStreamByIDProperties
8825				err = json.Unmarshal(*v, &sourceControlSyncJobStreamByIDProperties)
8826				if err != nil {
8827					return err
8828				}
8829				scsjsbi.SourceControlSyncJobStreamByIDProperties = &sourceControlSyncJobStreamByIDProperties
8830			}
8831		}
8832	}
8833
8834	return nil
8835}
8836
8837// SourceControlSyncJobStreamByIDProperties definition of source control sync job stream by id properties.
8838type SourceControlSyncJobStreamByIDProperties struct {
8839	// SourceControlSyncJobStreamID - The sync job stream id.
8840	SourceControlSyncJobStreamID *string `json:"sourceControlSyncJobStreamId,omitempty"`
8841	// Summary - The summary of the sync job stream.
8842	Summary *string `json:"summary,omitempty"`
8843	// Time - READ-ONLY; The time of the sync job stream.
8844	Time *date.Time `json:"time,omitempty"`
8845	// StreamType - The type of the sync job stream. Possible values include: 'StreamTypeError', 'StreamTypeOutput'
8846	StreamType StreamType `json:"streamType,omitempty"`
8847	// StreamText - The text of the sync job stream.
8848	StreamText *string `json:"streamText,omitempty"`
8849	// Value - The values of the job stream.
8850	Value map[string]interface{} `json:"value"`
8851}
8852
8853// MarshalJSON is the custom marshaler for SourceControlSyncJobStreamByIDProperties.
8854func (scsjsbip SourceControlSyncJobStreamByIDProperties) MarshalJSON() ([]byte, error) {
8855	objectMap := make(map[string]interface{})
8856	if scsjsbip.SourceControlSyncJobStreamID != nil {
8857		objectMap["sourceControlSyncJobStreamId"] = scsjsbip.SourceControlSyncJobStreamID
8858	}
8859	if scsjsbip.Summary != nil {
8860		objectMap["summary"] = scsjsbip.Summary
8861	}
8862	if scsjsbip.StreamType != "" {
8863		objectMap["streamType"] = scsjsbip.StreamType
8864	}
8865	if scsjsbip.StreamText != nil {
8866		objectMap["streamText"] = scsjsbip.StreamText
8867	}
8868	if scsjsbip.Value != nil {
8869		objectMap["value"] = scsjsbip.Value
8870	}
8871	return json.Marshal(objectMap)
8872}
8873
8874// SourceControlSyncJobStreamProperties definition of source control sync job stream properties.
8875type SourceControlSyncJobStreamProperties struct {
8876	// SourceControlSyncJobStreamID - The sync job stream id.
8877	SourceControlSyncJobStreamID *string `json:"sourceControlSyncJobStreamId,omitempty"`
8878	// Summary - The summary of the sync job stream.
8879	Summary *string `json:"summary,omitempty"`
8880	// Time - READ-ONLY; The time of the sync job stream.
8881	Time *date.Time `json:"time,omitempty"`
8882	// StreamType - The type of the sync job stream. Possible values include: 'StreamTypeError', 'StreamTypeOutput'
8883	StreamType StreamType `json:"streamType,omitempty"`
8884}
8885
8886// MarshalJSON is the custom marshaler for SourceControlSyncJobStreamProperties.
8887func (scsjsp SourceControlSyncJobStreamProperties) MarshalJSON() ([]byte, error) {
8888	objectMap := make(map[string]interface{})
8889	if scsjsp.SourceControlSyncJobStreamID != nil {
8890		objectMap["sourceControlSyncJobStreamId"] = scsjsp.SourceControlSyncJobStreamID
8891	}
8892	if scsjsp.Summary != nil {
8893		objectMap["summary"] = scsjsp.Summary
8894	}
8895	if scsjsp.StreamType != "" {
8896		objectMap["streamType"] = scsjsp.StreamType
8897	}
8898	return json.Marshal(objectMap)
8899}
8900
8901// SourceControlSyncJobStreamsListBySyncJob the response model for the list source control sync job streams
8902// operation.
8903type SourceControlSyncJobStreamsListBySyncJob struct {
8904	autorest.Response `json:"-"`
8905	// Value - The list of source control sync job streams.
8906	Value *[]SourceControlSyncJobStream `json:"value,omitempty"`
8907	// NextLink - READ-ONLY; The next link.
8908	NextLink *string `json:"nextLink,omitempty"`
8909}
8910
8911// MarshalJSON is the custom marshaler for SourceControlSyncJobStreamsListBySyncJob.
8912func (scsjslbsj SourceControlSyncJobStreamsListBySyncJob) MarshalJSON() ([]byte, error) {
8913	objectMap := make(map[string]interface{})
8914	if scsjslbsj.Value != nil {
8915		objectMap["value"] = scsjslbsj.Value
8916	}
8917	return json.Marshal(objectMap)
8918}
8919
8920// SourceControlSyncJobStreamsListBySyncJobIterator provides access to a complete listing of
8921// SourceControlSyncJobStream values.
8922type SourceControlSyncJobStreamsListBySyncJobIterator struct {
8923	i    int
8924	page SourceControlSyncJobStreamsListBySyncJobPage
8925}
8926
8927// NextWithContext advances to the next value.  If there was an error making
8928// the request the iterator does not advance and the error is returned.
8929func (iter *SourceControlSyncJobStreamsListBySyncJobIterator) NextWithContext(ctx context.Context) (err error) {
8930	if tracing.IsEnabled() {
8931		ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlSyncJobStreamsListBySyncJobIterator.NextWithContext")
8932		defer func() {
8933			sc := -1
8934			if iter.Response().Response.Response != nil {
8935				sc = iter.Response().Response.Response.StatusCode
8936			}
8937			tracing.EndSpan(ctx, sc, err)
8938		}()
8939	}
8940	iter.i++
8941	if iter.i < len(iter.page.Values()) {
8942		return nil
8943	}
8944	err = iter.page.NextWithContext(ctx)
8945	if err != nil {
8946		iter.i--
8947		return err
8948	}
8949	iter.i = 0
8950	return nil
8951}
8952
8953// Next advances to the next value.  If there was an error making
8954// the request the iterator does not advance and the error is returned.
8955// Deprecated: Use NextWithContext() instead.
8956func (iter *SourceControlSyncJobStreamsListBySyncJobIterator) Next() error {
8957	return iter.NextWithContext(context.Background())
8958}
8959
8960// NotDone returns true if the enumeration should be started or is not yet complete.
8961func (iter SourceControlSyncJobStreamsListBySyncJobIterator) NotDone() bool {
8962	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8963}
8964
8965// Response returns the raw server response from the last page request.
8966func (iter SourceControlSyncJobStreamsListBySyncJobIterator) Response() SourceControlSyncJobStreamsListBySyncJob {
8967	return iter.page.Response()
8968}
8969
8970// Value returns the current value or a zero-initialized value if the
8971// iterator has advanced beyond the end of the collection.
8972func (iter SourceControlSyncJobStreamsListBySyncJobIterator) Value() SourceControlSyncJobStream {
8973	if !iter.page.NotDone() {
8974		return SourceControlSyncJobStream{}
8975	}
8976	return iter.page.Values()[iter.i]
8977}
8978
8979// Creates a new instance of the SourceControlSyncJobStreamsListBySyncJobIterator type.
8980func NewSourceControlSyncJobStreamsListBySyncJobIterator(page SourceControlSyncJobStreamsListBySyncJobPage) SourceControlSyncJobStreamsListBySyncJobIterator {
8981	return SourceControlSyncJobStreamsListBySyncJobIterator{page: page}
8982}
8983
8984// IsEmpty returns true if the ListResult contains no values.
8985func (scsjslbsj SourceControlSyncJobStreamsListBySyncJob) IsEmpty() bool {
8986	return scsjslbsj.Value == nil || len(*scsjslbsj.Value) == 0
8987}
8988
8989// hasNextLink returns true if the NextLink is not empty.
8990func (scsjslbsj SourceControlSyncJobStreamsListBySyncJob) hasNextLink() bool {
8991	return scsjslbsj.NextLink != nil && len(*scsjslbsj.NextLink) != 0
8992}
8993
8994// sourceControlSyncJobStreamsListBySyncJobPreparer prepares a request to retrieve the next set of results.
8995// It returns nil if no more results exist.
8996func (scsjslbsj SourceControlSyncJobStreamsListBySyncJob) sourceControlSyncJobStreamsListBySyncJobPreparer(ctx context.Context) (*http.Request, error) {
8997	if !scsjslbsj.hasNextLink() {
8998		return nil, nil
8999	}
9000	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9001		autorest.AsJSON(),
9002		autorest.AsGet(),
9003		autorest.WithBaseURL(to.String(scsjslbsj.NextLink)))
9004}
9005
9006// SourceControlSyncJobStreamsListBySyncJobPage contains a page of SourceControlSyncJobStream values.
9007type SourceControlSyncJobStreamsListBySyncJobPage struct {
9008	fn        func(context.Context, SourceControlSyncJobStreamsListBySyncJob) (SourceControlSyncJobStreamsListBySyncJob, error)
9009	scsjslbsj SourceControlSyncJobStreamsListBySyncJob
9010}
9011
9012// NextWithContext advances to the next page of values.  If there was an error making
9013// the request the page does not advance and the error is returned.
9014func (page *SourceControlSyncJobStreamsListBySyncJobPage) NextWithContext(ctx context.Context) (err error) {
9015	if tracing.IsEnabled() {
9016		ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlSyncJobStreamsListBySyncJobPage.NextWithContext")
9017		defer func() {
9018			sc := -1
9019			if page.Response().Response.Response != nil {
9020				sc = page.Response().Response.Response.StatusCode
9021			}
9022			tracing.EndSpan(ctx, sc, err)
9023		}()
9024	}
9025	for {
9026		next, err := page.fn(ctx, page.scsjslbsj)
9027		if err != nil {
9028			return err
9029		}
9030		page.scsjslbsj = next
9031		if !next.hasNextLink() || !next.IsEmpty() {
9032			break
9033		}
9034	}
9035	return nil
9036}
9037
9038// Next advances to the next page of values.  If there was an error making
9039// the request the page does not advance and the error is returned.
9040// Deprecated: Use NextWithContext() instead.
9041func (page *SourceControlSyncJobStreamsListBySyncJobPage) Next() error {
9042	return page.NextWithContext(context.Background())
9043}
9044
9045// NotDone returns true if the page enumeration should be started or is not yet complete.
9046func (page SourceControlSyncJobStreamsListBySyncJobPage) NotDone() bool {
9047	return !page.scsjslbsj.IsEmpty()
9048}
9049
9050// Response returns the raw server response from the last page request.
9051func (page SourceControlSyncJobStreamsListBySyncJobPage) Response() SourceControlSyncJobStreamsListBySyncJob {
9052	return page.scsjslbsj
9053}
9054
9055// Values returns the slice of values for the current page or nil if there are no values.
9056func (page SourceControlSyncJobStreamsListBySyncJobPage) Values() []SourceControlSyncJobStream {
9057	if page.scsjslbsj.IsEmpty() {
9058		return nil
9059	}
9060	return *page.scsjslbsj.Value
9061}
9062
9063// Creates a new instance of the SourceControlSyncJobStreamsListBySyncJobPage type.
9064func NewSourceControlSyncJobStreamsListBySyncJobPage(cur SourceControlSyncJobStreamsListBySyncJob, getNextPage func(context.Context, SourceControlSyncJobStreamsListBySyncJob) (SourceControlSyncJobStreamsListBySyncJob, error)) SourceControlSyncJobStreamsListBySyncJobPage {
9065	return SourceControlSyncJobStreamsListBySyncJobPage{
9066		fn:        getNextPage,
9067		scsjslbsj: cur,
9068	}
9069}
9070
9071// SourceControlUpdateParameters the parameters supplied to the update source control operation.
9072type SourceControlUpdateParameters struct {
9073	// SourceControlUpdateProperties - The value of the source control.
9074	*SourceControlUpdateProperties `json:"properties,omitempty"`
9075}
9076
9077// MarshalJSON is the custom marshaler for SourceControlUpdateParameters.
9078func (scup SourceControlUpdateParameters) MarshalJSON() ([]byte, error) {
9079	objectMap := make(map[string]interface{})
9080	if scup.SourceControlUpdateProperties != nil {
9081		objectMap["properties"] = scup.SourceControlUpdateProperties
9082	}
9083	return json.Marshal(objectMap)
9084}
9085
9086// UnmarshalJSON is the custom unmarshaler for SourceControlUpdateParameters struct.
9087func (scup *SourceControlUpdateParameters) UnmarshalJSON(body []byte) error {
9088	var m map[string]*json.RawMessage
9089	err := json.Unmarshal(body, &m)
9090	if err != nil {
9091		return err
9092	}
9093	for k, v := range m {
9094		switch k {
9095		case "properties":
9096			if v != nil {
9097				var sourceControlUpdateProperties SourceControlUpdateProperties
9098				err = json.Unmarshal(*v, &sourceControlUpdateProperties)
9099				if err != nil {
9100					return err
9101				}
9102				scup.SourceControlUpdateProperties = &sourceControlUpdateProperties
9103			}
9104		}
9105	}
9106
9107	return nil
9108}
9109
9110// SourceControlUpdateProperties the properties of the update source control
9111type SourceControlUpdateProperties struct {
9112	// Branch - The repo branch of the source control.
9113	Branch *string `json:"branch,omitempty"`
9114	// FolderPath - The folder path of the source control. Path must be relative.
9115	FolderPath *string `json:"folderPath,omitempty"`
9116	// AutoSync - The auto sync of the source control. Default is false.
9117	AutoSync *bool `json:"autoSync,omitempty"`
9118	// PublishRunbook - The auto publish of the source control. Default is true.
9119	PublishRunbook *bool `json:"publishRunbook,omitempty"`
9120	// SecurityToken - The authorization token for the repo of the source control.
9121	SecurityToken *SourceControlSecurityTokenProperties `json:"securityToken,omitempty"`
9122	// Description - The user description of the source control.
9123	Description *string `json:"description,omitempty"`
9124}
9125
9126// Statistics definition of the statistic.
9127type Statistics struct {
9128	// CounterProperty - READ-ONLY; Gets the property value of the statistic.
9129	CounterProperty *string `json:"counterProperty,omitempty"`
9130	// CounterValue - READ-ONLY; Gets the value of the statistic.
9131	CounterValue *int64 `json:"counterValue,omitempty"`
9132	// StartTime - READ-ONLY; Gets the startTime of the statistic.
9133	StartTime *date.Time `json:"startTime,omitempty"`
9134	// EndTime - READ-ONLY; Gets the endTime of the statistic.
9135	EndTime *date.Time `json:"endTime,omitempty"`
9136	// ID - READ-ONLY; Gets the id.
9137	ID *string `json:"id,omitempty"`
9138}
9139
9140// MarshalJSON is the custom marshaler for Statistics.
9141func (s Statistics) MarshalJSON() ([]byte, error) {
9142	objectMap := make(map[string]interface{})
9143	return json.Marshal(objectMap)
9144}
9145
9146// StatisticsListResult the response model for the list statistics operation.
9147type StatisticsListResult struct {
9148	autorest.Response `json:"-"`
9149	// Value - Gets or sets a list of statistics.
9150	Value *[]Statistics `json:"value,omitempty"`
9151}
9152
9153// String ...
9154type String struct {
9155	autorest.Response `json:"-"`
9156	Value             *string `json:"value,omitempty"`
9157}
9158
9159// TagSettingsProperties tag filter information for the VM.
9160type TagSettingsProperties struct {
9161	// Tags - Dictionary of tags with its list of values.
9162	Tags map[string][]string `json:"tags"`
9163	// FilterOperator - Filter VMs by Any or All specified tags. Possible values include: 'TagOperatorsAll', 'TagOperatorsAny'
9164	FilterOperator TagOperators `json:"filterOperator,omitempty"`
9165}
9166
9167// MarshalJSON is the custom marshaler for TagSettingsProperties.
9168func (tsp TagSettingsProperties) MarshalJSON() ([]byte, error) {
9169	objectMap := make(map[string]interface{})
9170	if tsp.Tags != nil {
9171		objectMap["tags"] = tsp.Tags
9172	}
9173	if tsp.FilterOperator != "" {
9174		objectMap["filterOperator"] = tsp.FilterOperator
9175	}
9176	return json.Marshal(objectMap)
9177}
9178
9179// TargetProperties group specific to the update configuration.
9180type TargetProperties struct {
9181	// AzureQueries - List of Azure queries in the software update configuration.
9182	AzureQueries *[]AzureQueryProperties `json:"azureQueries,omitempty"`
9183	// NonAzureQueries - List of non Azure queries in the software update configuration.
9184	NonAzureQueries *[]NonAzureQueryProperties `json:"nonAzureQueries,omitempty"`
9185}
9186
9187// TaskProperties task properties of the software update configuration.
9188type TaskProperties struct {
9189	// Parameters - Gets or sets the parameters of the task.
9190	Parameters map[string]*string `json:"parameters"`
9191	// Source - Gets or sets the name of the runbook.
9192	Source *string `json:"source,omitempty"`
9193}
9194
9195// MarshalJSON is the custom marshaler for TaskProperties.
9196func (tp TaskProperties) MarshalJSON() ([]byte, error) {
9197	objectMap := make(map[string]interface{})
9198	if tp.Parameters != nil {
9199		objectMap["parameters"] = tp.Parameters
9200	}
9201	if tp.Source != nil {
9202		objectMap["source"] = tp.Source
9203	}
9204	return json.Marshal(objectMap)
9205}
9206
9207// TestJob definition of the test job.
9208type TestJob struct {
9209	autorest.Response `json:"-"`
9210	// CreationTime - Gets or sets the creation time of the test job.
9211	CreationTime *date.Time `json:"creationTime,omitempty"`
9212	// Status - Gets or sets the status of the test job.
9213	Status *string `json:"status,omitempty"`
9214	// StatusDetails - Gets or sets the status details of the test job.
9215	StatusDetails *string `json:"statusDetails,omitempty"`
9216	// RunOn - Gets or sets the runOn which specifies the group name where the job is to be executed.
9217	RunOn *string `json:"runOn,omitempty"`
9218	// StartTime - Gets or sets the start time of the test job.
9219	StartTime *date.Time `json:"startTime,omitempty"`
9220	// EndTime - Gets or sets the end time of the test job.
9221	EndTime *date.Time `json:"endTime,omitempty"`
9222	// Exception - Gets or sets the exception of the test job.
9223	Exception *string `json:"exception,omitempty"`
9224	// LastModifiedTime - Gets or sets the last modified time of the test job.
9225	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
9226	// LastStatusModifiedTime - Gets or sets the last status modified time of the test job.
9227	LastStatusModifiedTime *date.Time `json:"lastStatusModifiedTime,omitempty"`
9228	// Parameters - Gets or sets the parameters of the test job.
9229	Parameters map[string]*string `json:"parameters"`
9230	// LogActivityTrace - The activity-level tracing options of the runbook.
9231	LogActivityTrace *int32 `json:"logActivityTrace,omitempty"`
9232}
9233
9234// MarshalJSON is the custom marshaler for TestJob.
9235func (tj TestJob) MarshalJSON() ([]byte, error) {
9236	objectMap := make(map[string]interface{})
9237	if tj.CreationTime != nil {
9238		objectMap["creationTime"] = tj.CreationTime
9239	}
9240	if tj.Status != nil {
9241		objectMap["status"] = tj.Status
9242	}
9243	if tj.StatusDetails != nil {
9244		objectMap["statusDetails"] = tj.StatusDetails
9245	}
9246	if tj.RunOn != nil {
9247		objectMap["runOn"] = tj.RunOn
9248	}
9249	if tj.StartTime != nil {
9250		objectMap["startTime"] = tj.StartTime
9251	}
9252	if tj.EndTime != nil {
9253		objectMap["endTime"] = tj.EndTime
9254	}
9255	if tj.Exception != nil {
9256		objectMap["exception"] = tj.Exception
9257	}
9258	if tj.LastModifiedTime != nil {
9259		objectMap["lastModifiedTime"] = tj.LastModifiedTime
9260	}
9261	if tj.LastStatusModifiedTime != nil {
9262		objectMap["lastStatusModifiedTime"] = tj.LastStatusModifiedTime
9263	}
9264	if tj.Parameters != nil {
9265		objectMap["parameters"] = tj.Parameters
9266	}
9267	if tj.LogActivityTrace != nil {
9268		objectMap["logActivityTrace"] = tj.LogActivityTrace
9269	}
9270	return json.Marshal(objectMap)
9271}
9272
9273// TestJobCreateParameters the parameters supplied to the create test job operation.
9274type TestJobCreateParameters struct {
9275	// Parameters - Gets or sets the parameters of the test job.
9276	Parameters map[string]*string `json:"parameters"`
9277	// RunOn - Gets or sets the runOn which specifies the group name where the job is to be executed.
9278	RunOn *string `json:"runOn,omitempty"`
9279}
9280
9281// MarshalJSON is the custom marshaler for TestJobCreateParameters.
9282func (tjcp TestJobCreateParameters) MarshalJSON() ([]byte, error) {
9283	objectMap := make(map[string]interface{})
9284	if tjcp.Parameters != nil {
9285		objectMap["parameters"] = tjcp.Parameters
9286	}
9287	if tjcp.RunOn != nil {
9288		objectMap["runOn"] = tjcp.RunOn
9289	}
9290	return json.Marshal(objectMap)
9291}
9292
9293// TrackedResource the resource model definition for a ARM tracked top level resource
9294type TrackedResource struct {
9295	// Tags - Resource tags.
9296	Tags map[string]*string `json:"tags"`
9297	// Location - The Azure Region where the resource lives
9298	Location *string `json:"location,omitempty"`
9299	// ID - READ-ONLY; Fully qualified resource Id for the resource
9300	ID *string `json:"id,omitempty"`
9301	// Name - READ-ONLY; The name of the resource
9302	Name *string `json:"name,omitempty"`
9303	// Type - READ-ONLY; The type of the resource.
9304	Type *string `json:"type,omitempty"`
9305}
9306
9307// MarshalJSON is the custom marshaler for TrackedResource.
9308func (tr TrackedResource) MarshalJSON() ([]byte, error) {
9309	objectMap := make(map[string]interface{})
9310	if tr.Tags != nil {
9311		objectMap["tags"] = tr.Tags
9312	}
9313	if tr.Location != nil {
9314		objectMap["location"] = tr.Location
9315	}
9316	return json.Marshal(objectMap)
9317}
9318
9319// TypeField information about a field of a type.
9320type TypeField struct {
9321	// Name - Gets or sets the name of the field.
9322	Name *string `json:"name,omitempty"`
9323	// Type - Gets or sets the type of the field.
9324	Type *string `json:"type,omitempty"`
9325}
9326
9327// TypeFieldListResult the response model for the list fields operation.
9328type TypeFieldListResult struct {
9329	autorest.Response `json:"-"`
9330	// Value - Gets or sets a list of fields.
9331	Value *[]TypeField `json:"value,omitempty"`
9332}
9333
9334// UpdateConfiguration update specific properties of the software update configuration.
9335type UpdateConfiguration struct {
9336	// OperatingSystem - operating system of target machines. Possible values include: 'Windows', 'Linux'
9337	OperatingSystem OperatingSystemType `json:"operatingSystem,omitempty"`
9338	// Windows - Windows specific update configuration.
9339	Windows *WindowsProperties `json:"windows,omitempty"`
9340	// Linux - Linux specific update configuration.
9341	Linux *LinuxProperties `json:"linux,omitempty"`
9342	// Duration - Maximum time allowed for the software update configuration run. Duration needs to be specified using the format PT[n]H[n]M[n]S as per ISO8601
9343	Duration *string `json:"duration,omitempty"`
9344	// AzureVirtualMachines - List of azure resource Ids for azure virtual machines targeted by the software update configuration.
9345	AzureVirtualMachines *[]string `json:"azureVirtualMachines,omitempty"`
9346	// NonAzureComputerNames - List of names of non-azure machines targeted by the software update configuration.
9347	NonAzureComputerNames *[]string `json:"nonAzureComputerNames,omitempty"`
9348	// Targets - Group targets for the software update configuration.
9349	Targets *TargetProperties `json:"targets,omitempty"`
9350}
9351
9352// UpdateConfigurationMachineRunProperties software update configuration machine run properties.
9353type UpdateConfigurationMachineRunProperties struct {
9354	// TargetComputer - READ-ONLY; name of the updated computer
9355	TargetComputer *string `json:"targetComputer,omitempty"`
9356	// TargetComputerType - READ-ONLY; type of the updated computer.
9357	TargetComputerType *string `json:"targetComputerType,omitempty"`
9358	// SoftwareUpdateConfiguration - software update configuration triggered this run
9359	SoftwareUpdateConfiguration *UpdateConfigurationNavigation `json:"softwareUpdateConfiguration,omitempty"`
9360	// Status - READ-ONLY; Status of the software update configuration machine run.
9361	Status *string `json:"status,omitempty"`
9362	// OsType - READ-ONLY; Operating system target of the software update configuration triggered this run
9363	OsType *string `json:"osType,omitempty"`
9364	// CorrelationID - READ-ONLY; correlation id of the software update configuration machine run
9365	CorrelationID *uuid.UUID `json:"correlationId,omitempty"`
9366	// SourceComputerID - READ-ONLY; source computer id of the software update configuration machine run
9367	SourceComputerID *uuid.UUID `json:"sourceComputerId,omitempty"`
9368	// StartTime - READ-ONLY; Start time of the software update configuration machine run.
9369	StartTime *date.Time `json:"startTime,omitempty"`
9370	// EndTime - READ-ONLY; End time of the software update configuration machine run.
9371	EndTime *date.Time `json:"endTime,omitempty"`
9372	// ConfiguredDuration - READ-ONLY; configured duration for the software update configuration run.
9373	ConfiguredDuration *string `json:"configuredDuration,omitempty"`
9374	// Job - Job associated with the software update configuration machine run
9375	Job *JobNavigation `json:"job,omitempty"`
9376	// CreationTime - READ-ONLY; Creation time of the resource, which only appears in the response.
9377	CreationTime *date.Time `json:"creationTime,omitempty"`
9378	// CreatedBy - READ-ONLY; createdBy property, which only appears in the response.
9379	CreatedBy *string `json:"createdBy,omitempty"`
9380	// LastModifiedTime - READ-ONLY; Last time resource was modified, which only appears in the response.
9381	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
9382	// LastModifiedBy - READ-ONLY; lastModifiedBy property, which only appears in the response.
9383	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
9384	// Error - Details of provisioning error
9385	Error *ErrorResponse `json:"error,omitempty"`
9386}
9387
9388// MarshalJSON is the custom marshaler for UpdateConfigurationMachineRunProperties.
9389func (ucmrp UpdateConfigurationMachineRunProperties) MarshalJSON() ([]byte, error) {
9390	objectMap := make(map[string]interface{})
9391	if ucmrp.SoftwareUpdateConfiguration != nil {
9392		objectMap["softwareUpdateConfiguration"] = ucmrp.SoftwareUpdateConfiguration
9393	}
9394	if ucmrp.Job != nil {
9395		objectMap["job"] = ucmrp.Job
9396	}
9397	if ucmrp.Error != nil {
9398		objectMap["error"] = ucmrp.Error
9399	}
9400	return json.Marshal(objectMap)
9401}
9402
9403// UpdateConfigurationNavigation software update configuration Run Navigation model.
9404type UpdateConfigurationNavigation struct {
9405	// Name - READ-ONLY; Name of the software update configuration triggered the software update configuration run
9406	Name *string `json:"name,omitempty"`
9407}
9408
9409// MarshalJSON is the custom marshaler for UpdateConfigurationNavigation.
9410func (ucn UpdateConfigurationNavigation) MarshalJSON() ([]byte, error) {
9411	objectMap := make(map[string]interface{})
9412	return json.Marshal(objectMap)
9413}
9414
9415// Usage definition of Usage.
9416type Usage struct {
9417	// ID - Gets or sets the id of the resource.
9418	ID *string `json:"id,omitempty"`
9419	// Name - Gets or sets the usage counter name.
9420	Name *UsageCounterName `json:"name,omitempty"`
9421	// Unit - Gets or sets the usage unit name.
9422	Unit *string `json:"unit,omitempty"`
9423	// CurrentValue - Gets or sets the current usage value.
9424	CurrentValue *float64 `json:"currentValue,omitempty"`
9425	// Limit - Gets or sets max limit. -1 for unlimited
9426	Limit *int64 `json:"limit,omitempty"`
9427	// ThrottleStatus - Gets or sets the throttle status.
9428	ThrottleStatus *string `json:"throttleStatus,omitempty"`
9429}
9430
9431// UsageCounterName definition of usage counter name.
9432type UsageCounterName struct {
9433	// Value - Gets or sets the usage counter name.
9434	Value *string `json:"value,omitempty"`
9435	// LocalizedValue - Gets or sets the localized usage counter name.
9436	LocalizedValue *string `json:"localizedValue,omitempty"`
9437}
9438
9439// UsageListResult the response model for the get usage operation.
9440type UsageListResult struct {
9441	autorest.Response `json:"-"`
9442	// Value - Gets or sets usage.
9443	Value *[]Usage `json:"value,omitempty"`
9444}
9445
9446// Variable definition of the variable.
9447type Variable struct {
9448	autorest.Response `json:"-"`
9449	// VariableProperties - Gets or sets the properties of the variable.
9450	*VariableProperties `json:"properties,omitempty"`
9451	// ID - READ-ONLY; Fully qualified resource Id for the resource
9452	ID *string `json:"id,omitempty"`
9453	// Name - READ-ONLY; The name of the resource
9454	Name *string `json:"name,omitempty"`
9455	// Type - READ-ONLY; The type of the resource.
9456	Type *string `json:"type,omitempty"`
9457}
9458
9459// MarshalJSON is the custom marshaler for Variable.
9460func (vVar Variable) MarshalJSON() ([]byte, error) {
9461	objectMap := make(map[string]interface{})
9462	if vVar.VariableProperties != nil {
9463		objectMap["properties"] = vVar.VariableProperties
9464	}
9465	return json.Marshal(objectMap)
9466}
9467
9468// UnmarshalJSON is the custom unmarshaler for Variable struct.
9469func (vVar *Variable) UnmarshalJSON(body []byte) error {
9470	var m map[string]*json.RawMessage
9471	err := json.Unmarshal(body, &m)
9472	if err != nil {
9473		return err
9474	}
9475	for k, v := range m {
9476		switch k {
9477		case "properties":
9478			if v != nil {
9479				var variableProperties VariableProperties
9480				err = json.Unmarshal(*v, &variableProperties)
9481				if err != nil {
9482					return err
9483				}
9484				vVar.VariableProperties = &variableProperties
9485			}
9486		case "id":
9487			if v != nil {
9488				var ID string
9489				err = json.Unmarshal(*v, &ID)
9490				if err != nil {
9491					return err
9492				}
9493				vVar.ID = &ID
9494			}
9495		case "name":
9496			if v != nil {
9497				var name string
9498				err = json.Unmarshal(*v, &name)
9499				if err != nil {
9500					return err
9501				}
9502				vVar.Name = &name
9503			}
9504		case "type":
9505			if v != nil {
9506				var typeVar string
9507				err = json.Unmarshal(*v, &typeVar)
9508				if err != nil {
9509					return err
9510				}
9511				vVar.Type = &typeVar
9512			}
9513		}
9514	}
9515
9516	return nil
9517}
9518
9519// VariableCreateOrUpdateParameters the parameters supplied to the create or update variable operation.
9520type VariableCreateOrUpdateParameters struct {
9521	// Name - Gets or sets the name of the variable.
9522	Name *string `json:"name,omitempty"`
9523	// VariableCreateOrUpdateProperties - Gets or sets the properties of the variable.
9524	*VariableCreateOrUpdateProperties `json:"properties,omitempty"`
9525}
9526
9527// MarshalJSON is the custom marshaler for VariableCreateOrUpdateParameters.
9528func (vcoup VariableCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
9529	objectMap := make(map[string]interface{})
9530	if vcoup.Name != nil {
9531		objectMap["name"] = vcoup.Name
9532	}
9533	if vcoup.VariableCreateOrUpdateProperties != nil {
9534		objectMap["properties"] = vcoup.VariableCreateOrUpdateProperties
9535	}
9536	return json.Marshal(objectMap)
9537}
9538
9539// UnmarshalJSON is the custom unmarshaler for VariableCreateOrUpdateParameters struct.
9540func (vcoup *VariableCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
9541	var m map[string]*json.RawMessage
9542	err := json.Unmarshal(body, &m)
9543	if err != nil {
9544		return err
9545	}
9546	for k, v := range m {
9547		switch k {
9548		case "name":
9549			if v != nil {
9550				var name string
9551				err = json.Unmarshal(*v, &name)
9552				if err != nil {
9553					return err
9554				}
9555				vcoup.Name = &name
9556			}
9557		case "properties":
9558			if v != nil {
9559				var variableCreateOrUpdateProperties VariableCreateOrUpdateProperties
9560				err = json.Unmarshal(*v, &variableCreateOrUpdateProperties)
9561				if err != nil {
9562					return err
9563				}
9564				vcoup.VariableCreateOrUpdateProperties = &variableCreateOrUpdateProperties
9565			}
9566		}
9567	}
9568
9569	return nil
9570}
9571
9572// VariableCreateOrUpdateProperties the properties of the create variable operation.
9573type VariableCreateOrUpdateProperties struct {
9574	// Value - Gets or sets the value of the variable.
9575	Value *string `json:"value,omitempty"`
9576	// Description - Gets or sets the description of the variable.
9577	Description *string `json:"description,omitempty"`
9578	// IsEncrypted - Gets or sets the encrypted flag of the variable.
9579	IsEncrypted *bool `json:"isEncrypted,omitempty"`
9580}
9581
9582// VariableListResult the response model for the list variables operation.
9583type VariableListResult struct {
9584	autorest.Response `json:"-"`
9585	// Value - Gets or sets a list of variables.
9586	Value *[]Variable `json:"value,omitempty"`
9587	// NextLink - Gets or sets the next link.
9588	NextLink *string `json:"nextLink,omitempty"`
9589}
9590
9591// VariableListResultIterator provides access to a complete listing of Variable values.
9592type VariableListResultIterator struct {
9593	i    int
9594	page VariableListResultPage
9595}
9596
9597// NextWithContext advances to the next value.  If there was an error making
9598// the request the iterator does not advance and the error is returned.
9599func (iter *VariableListResultIterator) NextWithContext(ctx context.Context) (err error) {
9600	if tracing.IsEnabled() {
9601		ctx = tracing.StartSpan(ctx, fqdn+"/VariableListResultIterator.NextWithContext")
9602		defer func() {
9603			sc := -1
9604			if iter.Response().Response.Response != nil {
9605				sc = iter.Response().Response.Response.StatusCode
9606			}
9607			tracing.EndSpan(ctx, sc, err)
9608		}()
9609	}
9610	iter.i++
9611	if iter.i < len(iter.page.Values()) {
9612		return nil
9613	}
9614	err = iter.page.NextWithContext(ctx)
9615	if err != nil {
9616		iter.i--
9617		return err
9618	}
9619	iter.i = 0
9620	return nil
9621}
9622
9623// Next advances to the next value.  If there was an error making
9624// the request the iterator does not advance and the error is returned.
9625// Deprecated: Use NextWithContext() instead.
9626func (iter *VariableListResultIterator) Next() error {
9627	return iter.NextWithContext(context.Background())
9628}
9629
9630// NotDone returns true if the enumeration should be started or is not yet complete.
9631func (iter VariableListResultIterator) NotDone() bool {
9632	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9633}
9634
9635// Response returns the raw server response from the last page request.
9636func (iter VariableListResultIterator) Response() VariableListResult {
9637	return iter.page.Response()
9638}
9639
9640// Value returns the current value or a zero-initialized value if the
9641// iterator has advanced beyond the end of the collection.
9642func (iter VariableListResultIterator) Value() Variable {
9643	if !iter.page.NotDone() {
9644		return Variable{}
9645	}
9646	return iter.page.Values()[iter.i]
9647}
9648
9649// Creates a new instance of the VariableListResultIterator type.
9650func NewVariableListResultIterator(page VariableListResultPage) VariableListResultIterator {
9651	return VariableListResultIterator{page: page}
9652}
9653
9654// IsEmpty returns true if the ListResult contains no values.
9655func (vlr VariableListResult) IsEmpty() bool {
9656	return vlr.Value == nil || len(*vlr.Value) == 0
9657}
9658
9659// hasNextLink returns true if the NextLink is not empty.
9660func (vlr VariableListResult) hasNextLink() bool {
9661	return vlr.NextLink != nil && len(*vlr.NextLink) != 0
9662}
9663
9664// variableListResultPreparer prepares a request to retrieve the next set of results.
9665// It returns nil if no more results exist.
9666func (vlr VariableListResult) variableListResultPreparer(ctx context.Context) (*http.Request, error) {
9667	if !vlr.hasNextLink() {
9668		return nil, nil
9669	}
9670	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9671		autorest.AsJSON(),
9672		autorest.AsGet(),
9673		autorest.WithBaseURL(to.String(vlr.NextLink)))
9674}
9675
9676// VariableListResultPage contains a page of Variable values.
9677type VariableListResultPage struct {
9678	fn  func(context.Context, VariableListResult) (VariableListResult, error)
9679	vlr VariableListResult
9680}
9681
9682// NextWithContext advances to the next page of values.  If there was an error making
9683// the request the page does not advance and the error is returned.
9684func (page *VariableListResultPage) NextWithContext(ctx context.Context) (err error) {
9685	if tracing.IsEnabled() {
9686		ctx = tracing.StartSpan(ctx, fqdn+"/VariableListResultPage.NextWithContext")
9687		defer func() {
9688			sc := -1
9689			if page.Response().Response.Response != nil {
9690				sc = page.Response().Response.Response.StatusCode
9691			}
9692			tracing.EndSpan(ctx, sc, err)
9693		}()
9694	}
9695	for {
9696		next, err := page.fn(ctx, page.vlr)
9697		if err != nil {
9698			return err
9699		}
9700		page.vlr = next
9701		if !next.hasNextLink() || !next.IsEmpty() {
9702			break
9703		}
9704	}
9705	return nil
9706}
9707
9708// Next advances to the next page of values.  If there was an error making
9709// the request the page does not advance and the error is returned.
9710// Deprecated: Use NextWithContext() instead.
9711func (page *VariableListResultPage) Next() error {
9712	return page.NextWithContext(context.Background())
9713}
9714
9715// NotDone returns true if the page enumeration should be started or is not yet complete.
9716func (page VariableListResultPage) NotDone() bool {
9717	return !page.vlr.IsEmpty()
9718}
9719
9720// Response returns the raw server response from the last page request.
9721func (page VariableListResultPage) Response() VariableListResult {
9722	return page.vlr
9723}
9724
9725// Values returns the slice of values for the current page or nil if there are no values.
9726func (page VariableListResultPage) Values() []Variable {
9727	if page.vlr.IsEmpty() {
9728		return nil
9729	}
9730	return *page.vlr.Value
9731}
9732
9733// Creates a new instance of the VariableListResultPage type.
9734func NewVariableListResultPage(cur VariableListResult, getNextPage func(context.Context, VariableListResult) (VariableListResult, error)) VariableListResultPage {
9735	return VariableListResultPage{
9736		fn:  getNextPage,
9737		vlr: cur,
9738	}
9739}
9740
9741// VariableProperties definition of the variable properties
9742type VariableProperties struct {
9743	// Value - Gets or sets the value of the variable.
9744	Value *string `json:"value,omitempty"`
9745	// IsEncrypted - Gets or sets the encrypted flag of the variable.
9746	IsEncrypted *bool `json:"isEncrypted,omitempty"`
9747	// CreationTime - Gets or sets the creation time.
9748	CreationTime *date.Time `json:"creationTime,omitempty"`
9749	// LastModifiedTime - Gets or sets the last modified time.
9750	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
9751	// Description - Gets or sets the description.
9752	Description *string `json:"description,omitempty"`
9753}
9754
9755// VariableUpdateParameters the parameters supplied to the update variable operation.
9756type VariableUpdateParameters struct {
9757	// Name - Gets or sets the name of the variable.
9758	Name *string `json:"name,omitempty"`
9759	// VariableUpdateProperties - Gets or sets the value of the variable.
9760	*VariableUpdateProperties `json:"properties,omitempty"`
9761}
9762
9763// MarshalJSON is the custom marshaler for VariableUpdateParameters.
9764func (vup VariableUpdateParameters) MarshalJSON() ([]byte, error) {
9765	objectMap := make(map[string]interface{})
9766	if vup.Name != nil {
9767		objectMap["name"] = vup.Name
9768	}
9769	if vup.VariableUpdateProperties != nil {
9770		objectMap["properties"] = vup.VariableUpdateProperties
9771	}
9772	return json.Marshal(objectMap)
9773}
9774
9775// UnmarshalJSON is the custom unmarshaler for VariableUpdateParameters struct.
9776func (vup *VariableUpdateParameters) UnmarshalJSON(body []byte) error {
9777	var m map[string]*json.RawMessage
9778	err := json.Unmarshal(body, &m)
9779	if err != nil {
9780		return err
9781	}
9782	for k, v := range m {
9783		switch k {
9784		case "name":
9785			if v != nil {
9786				var name string
9787				err = json.Unmarshal(*v, &name)
9788				if err != nil {
9789					return err
9790				}
9791				vup.Name = &name
9792			}
9793		case "properties":
9794			if v != nil {
9795				var variableUpdateProperties VariableUpdateProperties
9796				err = json.Unmarshal(*v, &variableUpdateProperties)
9797				if err != nil {
9798					return err
9799				}
9800				vup.VariableUpdateProperties = &variableUpdateProperties
9801			}
9802		}
9803	}
9804
9805	return nil
9806}
9807
9808// VariableUpdateProperties the properties of the update variable
9809type VariableUpdateProperties struct {
9810	// Value - Gets or sets the value of the variable.
9811	Value *string `json:"value,omitempty"`
9812	// Description - Gets or sets the description of the variable.
9813	Description *string `json:"description,omitempty"`
9814}
9815
9816// Watcher definition of the watcher type.
9817type Watcher struct {
9818	autorest.Response `json:"-"`
9819	// WatcherProperties - Gets or sets the watcher properties.
9820	*WatcherProperties `json:"properties,omitempty"`
9821	// Etag - Gets or sets the etag of the resource.
9822	Etag *string `json:"etag,omitempty"`
9823	// Tags - Resource tags.
9824	Tags map[string]*string `json:"tags"`
9825	// Location - The Azure Region where the resource lives
9826	Location *string `json:"location,omitempty"`
9827	// ID - READ-ONLY; Fully qualified resource Id for the resource
9828	ID *string `json:"id,omitempty"`
9829	// Name - READ-ONLY; The name of the resource
9830	Name *string `json:"name,omitempty"`
9831	// Type - READ-ONLY; The type of the resource.
9832	Type *string `json:"type,omitempty"`
9833}
9834
9835// MarshalJSON is the custom marshaler for Watcher.
9836func (w Watcher) MarshalJSON() ([]byte, error) {
9837	objectMap := make(map[string]interface{})
9838	if w.WatcherProperties != nil {
9839		objectMap["properties"] = w.WatcherProperties
9840	}
9841	if w.Etag != nil {
9842		objectMap["etag"] = w.Etag
9843	}
9844	if w.Tags != nil {
9845		objectMap["tags"] = w.Tags
9846	}
9847	if w.Location != nil {
9848		objectMap["location"] = w.Location
9849	}
9850	return json.Marshal(objectMap)
9851}
9852
9853// UnmarshalJSON is the custom unmarshaler for Watcher struct.
9854func (w *Watcher) UnmarshalJSON(body []byte) error {
9855	var m map[string]*json.RawMessage
9856	err := json.Unmarshal(body, &m)
9857	if err != nil {
9858		return err
9859	}
9860	for k, v := range m {
9861		switch k {
9862		case "properties":
9863			if v != nil {
9864				var watcherProperties WatcherProperties
9865				err = json.Unmarshal(*v, &watcherProperties)
9866				if err != nil {
9867					return err
9868				}
9869				w.WatcherProperties = &watcherProperties
9870			}
9871		case "etag":
9872			if v != nil {
9873				var etag string
9874				err = json.Unmarshal(*v, &etag)
9875				if err != nil {
9876					return err
9877				}
9878				w.Etag = &etag
9879			}
9880		case "tags":
9881			if v != nil {
9882				var tags map[string]*string
9883				err = json.Unmarshal(*v, &tags)
9884				if err != nil {
9885					return err
9886				}
9887				w.Tags = tags
9888			}
9889		case "location":
9890			if v != nil {
9891				var location string
9892				err = json.Unmarshal(*v, &location)
9893				if err != nil {
9894					return err
9895				}
9896				w.Location = &location
9897			}
9898		case "id":
9899			if v != nil {
9900				var ID string
9901				err = json.Unmarshal(*v, &ID)
9902				if err != nil {
9903					return err
9904				}
9905				w.ID = &ID
9906			}
9907		case "name":
9908			if v != nil {
9909				var name string
9910				err = json.Unmarshal(*v, &name)
9911				if err != nil {
9912					return err
9913				}
9914				w.Name = &name
9915			}
9916		case "type":
9917			if v != nil {
9918				var typeVar string
9919				err = json.Unmarshal(*v, &typeVar)
9920				if err != nil {
9921					return err
9922				}
9923				w.Type = &typeVar
9924			}
9925		}
9926	}
9927
9928	return nil
9929}
9930
9931// WatcherListResult the response model for the list watcher operation.
9932type WatcherListResult struct {
9933	autorest.Response `json:"-"`
9934	// Value - Gets or sets a list of watchers.
9935	Value *[]Watcher `json:"value,omitempty"`
9936	// NextLink - Gets or sets the next link.
9937	NextLink *string `json:"nextLink,omitempty"`
9938}
9939
9940// WatcherListResultIterator provides access to a complete listing of Watcher values.
9941type WatcherListResultIterator struct {
9942	i    int
9943	page WatcherListResultPage
9944}
9945
9946// NextWithContext advances to the next value.  If there was an error making
9947// the request the iterator does not advance and the error is returned.
9948func (iter *WatcherListResultIterator) NextWithContext(ctx context.Context) (err error) {
9949	if tracing.IsEnabled() {
9950		ctx = tracing.StartSpan(ctx, fqdn+"/WatcherListResultIterator.NextWithContext")
9951		defer func() {
9952			sc := -1
9953			if iter.Response().Response.Response != nil {
9954				sc = iter.Response().Response.Response.StatusCode
9955			}
9956			tracing.EndSpan(ctx, sc, err)
9957		}()
9958	}
9959	iter.i++
9960	if iter.i < len(iter.page.Values()) {
9961		return nil
9962	}
9963	err = iter.page.NextWithContext(ctx)
9964	if err != nil {
9965		iter.i--
9966		return err
9967	}
9968	iter.i = 0
9969	return nil
9970}
9971
9972// Next advances to the next value.  If there was an error making
9973// the request the iterator does not advance and the error is returned.
9974// Deprecated: Use NextWithContext() instead.
9975func (iter *WatcherListResultIterator) Next() error {
9976	return iter.NextWithContext(context.Background())
9977}
9978
9979// NotDone returns true if the enumeration should be started or is not yet complete.
9980func (iter WatcherListResultIterator) NotDone() bool {
9981	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9982}
9983
9984// Response returns the raw server response from the last page request.
9985func (iter WatcherListResultIterator) Response() WatcherListResult {
9986	return iter.page.Response()
9987}
9988
9989// Value returns the current value or a zero-initialized value if the
9990// iterator has advanced beyond the end of the collection.
9991func (iter WatcherListResultIterator) Value() Watcher {
9992	if !iter.page.NotDone() {
9993		return Watcher{}
9994	}
9995	return iter.page.Values()[iter.i]
9996}
9997
9998// Creates a new instance of the WatcherListResultIterator type.
9999func NewWatcherListResultIterator(page WatcherListResultPage) WatcherListResultIterator {
10000	return WatcherListResultIterator{page: page}
10001}
10002
10003// IsEmpty returns true if the ListResult contains no values.
10004func (wlr WatcherListResult) IsEmpty() bool {
10005	return wlr.Value == nil || len(*wlr.Value) == 0
10006}
10007
10008// hasNextLink returns true if the NextLink is not empty.
10009func (wlr WatcherListResult) hasNextLink() bool {
10010	return wlr.NextLink != nil && len(*wlr.NextLink) != 0
10011}
10012
10013// watcherListResultPreparer prepares a request to retrieve the next set of results.
10014// It returns nil if no more results exist.
10015func (wlr WatcherListResult) watcherListResultPreparer(ctx context.Context) (*http.Request, error) {
10016	if !wlr.hasNextLink() {
10017		return nil, nil
10018	}
10019	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10020		autorest.AsJSON(),
10021		autorest.AsGet(),
10022		autorest.WithBaseURL(to.String(wlr.NextLink)))
10023}
10024
10025// WatcherListResultPage contains a page of Watcher values.
10026type WatcherListResultPage struct {
10027	fn  func(context.Context, WatcherListResult) (WatcherListResult, error)
10028	wlr WatcherListResult
10029}
10030
10031// NextWithContext advances to the next page of values.  If there was an error making
10032// the request the page does not advance and the error is returned.
10033func (page *WatcherListResultPage) NextWithContext(ctx context.Context) (err error) {
10034	if tracing.IsEnabled() {
10035		ctx = tracing.StartSpan(ctx, fqdn+"/WatcherListResultPage.NextWithContext")
10036		defer func() {
10037			sc := -1
10038			if page.Response().Response.Response != nil {
10039				sc = page.Response().Response.Response.StatusCode
10040			}
10041			tracing.EndSpan(ctx, sc, err)
10042		}()
10043	}
10044	for {
10045		next, err := page.fn(ctx, page.wlr)
10046		if err != nil {
10047			return err
10048		}
10049		page.wlr = next
10050		if !next.hasNextLink() || !next.IsEmpty() {
10051			break
10052		}
10053	}
10054	return nil
10055}
10056
10057// Next advances to the next page of values.  If there was an error making
10058// the request the page does not advance and the error is returned.
10059// Deprecated: Use NextWithContext() instead.
10060func (page *WatcherListResultPage) Next() error {
10061	return page.NextWithContext(context.Background())
10062}
10063
10064// NotDone returns true if the page enumeration should be started or is not yet complete.
10065func (page WatcherListResultPage) NotDone() bool {
10066	return !page.wlr.IsEmpty()
10067}
10068
10069// Response returns the raw server response from the last page request.
10070func (page WatcherListResultPage) Response() WatcherListResult {
10071	return page.wlr
10072}
10073
10074// Values returns the slice of values for the current page or nil if there are no values.
10075func (page WatcherListResultPage) Values() []Watcher {
10076	if page.wlr.IsEmpty() {
10077		return nil
10078	}
10079	return *page.wlr.Value
10080}
10081
10082// Creates a new instance of the WatcherListResultPage type.
10083func NewWatcherListResultPage(cur WatcherListResult, getNextPage func(context.Context, WatcherListResult) (WatcherListResult, error)) WatcherListResultPage {
10084	return WatcherListResultPage{
10085		fn:  getNextPage,
10086		wlr: cur,
10087	}
10088}
10089
10090// WatcherProperties definition of the watcher properties
10091type WatcherProperties struct {
10092	// ExecutionFrequencyInSeconds - Gets or sets the frequency at which the watcher is invoked.
10093	ExecutionFrequencyInSeconds *int64 `json:"executionFrequencyInSeconds,omitempty"`
10094	// ScriptName - Gets or sets the name of the script the watcher is attached to, i.e. the name of an existing runbook.
10095	ScriptName *string `json:"scriptName,omitempty"`
10096	// ScriptParameters - Gets or sets the parameters of the script.
10097	ScriptParameters map[string]*string `json:"scriptParameters"`
10098	// ScriptRunOn - Gets or sets the name of the hybrid worker group the watcher will run on.
10099	ScriptRunOn *string `json:"scriptRunOn,omitempty"`
10100	// Status - READ-ONLY; Gets the current status of the watcher.
10101	Status *string `json:"status,omitempty"`
10102	// CreationTime - READ-ONLY; Gets or sets the creation time.
10103	CreationTime *date.Time `json:"creationTime,omitempty"`
10104	// LastModifiedTime - READ-ONLY; Gets or sets the last modified time.
10105	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
10106	// LastModifiedBy - READ-ONLY; Details of the user who last modified the watcher.
10107	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
10108	// Description - Gets or sets the description.
10109	Description *string `json:"description,omitempty"`
10110}
10111
10112// MarshalJSON is the custom marshaler for WatcherProperties.
10113func (wp WatcherProperties) MarshalJSON() ([]byte, error) {
10114	objectMap := make(map[string]interface{})
10115	if wp.ExecutionFrequencyInSeconds != nil {
10116		objectMap["executionFrequencyInSeconds"] = wp.ExecutionFrequencyInSeconds
10117	}
10118	if wp.ScriptName != nil {
10119		objectMap["scriptName"] = wp.ScriptName
10120	}
10121	if wp.ScriptParameters != nil {
10122		objectMap["scriptParameters"] = wp.ScriptParameters
10123	}
10124	if wp.ScriptRunOn != nil {
10125		objectMap["scriptRunOn"] = wp.ScriptRunOn
10126	}
10127	if wp.Description != nil {
10128		objectMap["description"] = wp.Description
10129	}
10130	return json.Marshal(objectMap)
10131}
10132
10133// WatcherUpdateParameters ...
10134type WatcherUpdateParameters struct {
10135	// WatcherUpdateProperties - Gets or sets the watcher update properties.
10136	*WatcherUpdateProperties `json:"properties,omitempty"`
10137	// Name - Gets or sets the name of the resource.
10138	Name *string `json:"name,omitempty"`
10139}
10140
10141// MarshalJSON is the custom marshaler for WatcherUpdateParameters.
10142func (wup WatcherUpdateParameters) MarshalJSON() ([]byte, error) {
10143	objectMap := make(map[string]interface{})
10144	if wup.WatcherUpdateProperties != nil {
10145		objectMap["properties"] = wup.WatcherUpdateProperties
10146	}
10147	if wup.Name != nil {
10148		objectMap["name"] = wup.Name
10149	}
10150	return json.Marshal(objectMap)
10151}
10152
10153// UnmarshalJSON is the custom unmarshaler for WatcherUpdateParameters struct.
10154func (wup *WatcherUpdateParameters) UnmarshalJSON(body []byte) error {
10155	var m map[string]*json.RawMessage
10156	err := json.Unmarshal(body, &m)
10157	if err != nil {
10158		return err
10159	}
10160	for k, v := range m {
10161		switch k {
10162		case "properties":
10163			if v != nil {
10164				var watcherUpdateProperties WatcherUpdateProperties
10165				err = json.Unmarshal(*v, &watcherUpdateProperties)
10166				if err != nil {
10167					return err
10168				}
10169				wup.WatcherUpdateProperties = &watcherUpdateProperties
10170			}
10171		case "name":
10172			if v != nil {
10173				var name string
10174				err = json.Unmarshal(*v, &name)
10175				if err != nil {
10176					return err
10177				}
10178				wup.Name = &name
10179			}
10180		}
10181	}
10182
10183	return nil
10184}
10185
10186// WatcherUpdateProperties the properties of the update watcher operation.
10187type WatcherUpdateProperties struct {
10188	// ExecutionFrequencyInSeconds - Gets or sets the frequency at which the watcher is invoked.
10189	ExecutionFrequencyInSeconds *int64 `json:"executionFrequencyInSeconds,omitempty"`
10190}
10191
10192// Webhook definition of the webhook type.
10193type Webhook struct {
10194	autorest.Response `json:"-"`
10195	// WebhookProperties - Gets or sets the webhook properties.
10196	*WebhookProperties `json:"properties,omitempty"`
10197	// ID - READ-ONLY; Fully qualified resource Id for the resource
10198	ID *string `json:"id,omitempty"`
10199	// Name - READ-ONLY; The name of the resource
10200	Name *string `json:"name,omitempty"`
10201	// Type - READ-ONLY; The type of the resource.
10202	Type *string `json:"type,omitempty"`
10203}
10204
10205// MarshalJSON is the custom marshaler for Webhook.
10206func (w Webhook) MarshalJSON() ([]byte, error) {
10207	objectMap := make(map[string]interface{})
10208	if w.WebhookProperties != nil {
10209		objectMap["properties"] = w.WebhookProperties
10210	}
10211	return json.Marshal(objectMap)
10212}
10213
10214// UnmarshalJSON is the custom unmarshaler for Webhook struct.
10215func (w *Webhook) UnmarshalJSON(body []byte) error {
10216	var m map[string]*json.RawMessage
10217	err := json.Unmarshal(body, &m)
10218	if err != nil {
10219		return err
10220	}
10221	for k, v := range m {
10222		switch k {
10223		case "properties":
10224			if v != nil {
10225				var webhookProperties WebhookProperties
10226				err = json.Unmarshal(*v, &webhookProperties)
10227				if err != nil {
10228					return err
10229				}
10230				w.WebhookProperties = &webhookProperties
10231			}
10232		case "id":
10233			if v != nil {
10234				var ID string
10235				err = json.Unmarshal(*v, &ID)
10236				if err != nil {
10237					return err
10238				}
10239				w.ID = &ID
10240			}
10241		case "name":
10242			if v != nil {
10243				var name string
10244				err = json.Unmarshal(*v, &name)
10245				if err != nil {
10246					return err
10247				}
10248				w.Name = &name
10249			}
10250		case "type":
10251			if v != nil {
10252				var typeVar string
10253				err = json.Unmarshal(*v, &typeVar)
10254				if err != nil {
10255					return err
10256				}
10257				w.Type = &typeVar
10258			}
10259		}
10260	}
10261
10262	return nil
10263}
10264
10265// WebhookCreateOrUpdateParameters the parameters supplied to the create or update webhook operation.
10266type WebhookCreateOrUpdateParameters struct {
10267	// Name - Gets or sets the name of the webhook.
10268	Name *string `json:"name,omitempty"`
10269	// WebhookCreateOrUpdateProperties - Gets or sets the properties of the webhook.
10270	*WebhookCreateOrUpdateProperties `json:"properties,omitempty"`
10271}
10272
10273// MarshalJSON is the custom marshaler for WebhookCreateOrUpdateParameters.
10274func (wcoup WebhookCreateOrUpdateParameters) MarshalJSON() ([]byte, error) {
10275	objectMap := make(map[string]interface{})
10276	if wcoup.Name != nil {
10277		objectMap["name"] = wcoup.Name
10278	}
10279	if wcoup.WebhookCreateOrUpdateProperties != nil {
10280		objectMap["properties"] = wcoup.WebhookCreateOrUpdateProperties
10281	}
10282	return json.Marshal(objectMap)
10283}
10284
10285// UnmarshalJSON is the custom unmarshaler for WebhookCreateOrUpdateParameters struct.
10286func (wcoup *WebhookCreateOrUpdateParameters) UnmarshalJSON(body []byte) error {
10287	var m map[string]*json.RawMessage
10288	err := json.Unmarshal(body, &m)
10289	if err != nil {
10290		return err
10291	}
10292	for k, v := range m {
10293		switch k {
10294		case "name":
10295			if v != nil {
10296				var name string
10297				err = json.Unmarshal(*v, &name)
10298				if err != nil {
10299					return err
10300				}
10301				wcoup.Name = &name
10302			}
10303		case "properties":
10304			if v != nil {
10305				var webhookCreateOrUpdateProperties WebhookCreateOrUpdateProperties
10306				err = json.Unmarshal(*v, &webhookCreateOrUpdateProperties)
10307				if err != nil {
10308					return err
10309				}
10310				wcoup.WebhookCreateOrUpdateProperties = &webhookCreateOrUpdateProperties
10311			}
10312		}
10313	}
10314
10315	return nil
10316}
10317
10318// WebhookCreateOrUpdateProperties the properties of the create webhook operation.
10319type WebhookCreateOrUpdateProperties struct {
10320	// IsEnabled - Gets or sets the value of the enabled flag of webhook.
10321	IsEnabled *bool `json:"isEnabled,omitempty"`
10322	// URI - Gets or sets the uri.
10323	URI *string `json:"uri,omitempty"`
10324	// ExpiryTime - Gets or sets the expiry time.
10325	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
10326	// Parameters - Gets or sets the parameters of the job.
10327	Parameters map[string]*string `json:"parameters"`
10328	// Runbook - Gets or sets the runbook.
10329	Runbook *RunbookAssociationProperty `json:"runbook,omitempty"`
10330	// RunOn - Gets or sets the name of the hybrid worker group the webhook job will run on.
10331	RunOn *string `json:"runOn,omitempty"`
10332}
10333
10334// MarshalJSON is the custom marshaler for WebhookCreateOrUpdateProperties.
10335func (wcoup WebhookCreateOrUpdateProperties) MarshalJSON() ([]byte, error) {
10336	objectMap := make(map[string]interface{})
10337	if wcoup.IsEnabled != nil {
10338		objectMap["isEnabled"] = wcoup.IsEnabled
10339	}
10340	if wcoup.URI != nil {
10341		objectMap["uri"] = wcoup.URI
10342	}
10343	if wcoup.ExpiryTime != nil {
10344		objectMap["expiryTime"] = wcoup.ExpiryTime
10345	}
10346	if wcoup.Parameters != nil {
10347		objectMap["parameters"] = wcoup.Parameters
10348	}
10349	if wcoup.Runbook != nil {
10350		objectMap["runbook"] = wcoup.Runbook
10351	}
10352	if wcoup.RunOn != nil {
10353		objectMap["runOn"] = wcoup.RunOn
10354	}
10355	return json.Marshal(objectMap)
10356}
10357
10358// WebhookListResult the response model for the list webhook operation.
10359type WebhookListResult struct {
10360	autorest.Response `json:"-"`
10361	// Value - Gets or sets a list of webhooks.
10362	Value *[]Webhook `json:"value,omitempty"`
10363	// NextLink - Gets or sets the next link.
10364	NextLink *string `json:"nextLink,omitempty"`
10365}
10366
10367// WebhookListResultIterator provides access to a complete listing of Webhook values.
10368type WebhookListResultIterator struct {
10369	i    int
10370	page WebhookListResultPage
10371}
10372
10373// NextWithContext advances to the next value.  If there was an error making
10374// the request the iterator does not advance and the error is returned.
10375func (iter *WebhookListResultIterator) NextWithContext(ctx context.Context) (err error) {
10376	if tracing.IsEnabled() {
10377		ctx = tracing.StartSpan(ctx, fqdn+"/WebhookListResultIterator.NextWithContext")
10378		defer func() {
10379			sc := -1
10380			if iter.Response().Response.Response != nil {
10381				sc = iter.Response().Response.Response.StatusCode
10382			}
10383			tracing.EndSpan(ctx, sc, err)
10384		}()
10385	}
10386	iter.i++
10387	if iter.i < len(iter.page.Values()) {
10388		return nil
10389	}
10390	err = iter.page.NextWithContext(ctx)
10391	if err != nil {
10392		iter.i--
10393		return err
10394	}
10395	iter.i = 0
10396	return nil
10397}
10398
10399// Next advances to the next value.  If there was an error making
10400// the request the iterator does not advance and the error is returned.
10401// Deprecated: Use NextWithContext() instead.
10402func (iter *WebhookListResultIterator) Next() error {
10403	return iter.NextWithContext(context.Background())
10404}
10405
10406// NotDone returns true if the enumeration should be started or is not yet complete.
10407func (iter WebhookListResultIterator) NotDone() bool {
10408	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10409}
10410
10411// Response returns the raw server response from the last page request.
10412func (iter WebhookListResultIterator) Response() WebhookListResult {
10413	return iter.page.Response()
10414}
10415
10416// Value returns the current value or a zero-initialized value if the
10417// iterator has advanced beyond the end of the collection.
10418func (iter WebhookListResultIterator) Value() Webhook {
10419	if !iter.page.NotDone() {
10420		return Webhook{}
10421	}
10422	return iter.page.Values()[iter.i]
10423}
10424
10425// Creates a new instance of the WebhookListResultIterator type.
10426func NewWebhookListResultIterator(page WebhookListResultPage) WebhookListResultIterator {
10427	return WebhookListResultIterator{page: page}
10428}
10429
10430// IsEmpty returns true if the ListResult contains no values.
10431func (wlr WebhookListResult) IsEmpty() bool {
10432	return wlr.Value == nil || len(*wlr.Value) == 0
10433}
10434
10435// hasNextLink returns true if the NextLink is not empty.
10436func (wlr WebhookListResult) hasNextLink() bool {
10437	return wlr.NextLink != nil && len(*wlr.NextLink) != 0
10438}
10439
10440// webhookListResultPreparer prepares a request to retrieve the next set of results.
10441// It returns nil if no more results exist.
10442func (wlr WebhookListResult) webhookListResultPreparer(ctx context.Context) (*http.Request, error) {
10443	if !wlr.hasNextLink() {
10444		return nil, nil
10445	}
10446	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10447		autorest.AsJSON(),
10448		autorest.AsGet(),
10449		autorest.WithBaseURL(to.String(wlr.NextLink)))
10450}
10451
10452// WebhookListResultPage contains a page of Webhook values.
10453type WebhookListResultPage struct {
10454	fn  func(context.Context, WebhookListResult) (WebhookListResult, error)
10455	wlr WebhookListResult
10456}
10457
10458// NextWithContext advances to the next page of values.  If there was an error making
10459// the request the page does not advance and the error is returned.
10460func (page *WebhookListResultPage) NextWithContext(ctx context.Context) (err error) {
10461	if tracing.IsEnabled() {
10462		ctx = tracing.StartSpan(ctx, fqdn+"/WebhookListResultPage.NextWithContext")
10463		defer func() {
10464			sc := -1
10465			if page.Response().Response.Response != nil {
10466				sc = page.Response().Response.Response.StatusCode
10467			}
10468			tracing.EndSpan(ctx, sc, err)
10469		}()
10470	}
10471	for {
10472		next, err := page.fn(ctx, page.wlr)
10473		if err != nil {
10474			return err
10475		}
10476		page.wlr = next
10477		if !next.hasNextLink() || !next.IsEmpty() {
10478			break
10479		}
10480	}
10481	return nil
10482}
10483
10484// Next advances to the next page of values.  If there was an error making
10485// the request the page does not advance and the error is returned.
10486// Deprecated: Use NextWithContext() instead.
10487func (page *WebhookListResultPage) Next() error {
10488	return page.NextWithContext(context.Background())
10489}
10490
10491// NotDone returns true if the page enumeration should be started or is not yet complete.
10492func (page WebhookListResultPage) NotDone() bool {
10493	return !page.wlr.IsEmpty()
10494}
10495
10496// Response returns the raw server response from the last page request.
10497func (page WebhookListResultPage) Response() WebhookListResult {
10498	return page.wlr
10499}
10500
10501// Values returns the slice of values for the current page or nil if there are no values.
10502func (page WebhookListResultPage) Values() []Webhook {
10503	if page.wlr.IsEmpty() {
10504		return nil
10505	}
10506	return *page.wlr.Value
10507}
10508
10509// Creates a new instance of the WebhookListResultPage type.
10510func NewWebhookListResultPage(cur WebhookListResult, getNextPage func(context.Context, WebhookListResult) (WebhookListResult, error)) WebhookListResultPage {
10511	return WebhookListResultPage{
10512		fn:  getNextPage,
10513		wlr: cur,
10514	}
10515}
10516
10517// WebhookProperties definition of the webhook properties
10518type WebhookProperties struct {
10519	// IsEnabled - Gets or sets the value of the enabled flag of the webhook.
10520	IsEnabled *bool `json:"isEnabled,omitempty"`
10521	// URI - Gets or sets the webhook uri.
10522	URI *string `json:"uri,omitempty"`
10523	// ExpiryTime - Gets or sets the expiry time.
10524	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
10525	// LastInvokedTime - Gets or sets the last invoked time.
10526	LastInvokedTime *date.Time `json:"lastInvokedTime,omitempty"`
10527	// Parameters - Gets or sets the parameters of the job that is created when the webhook calls the runbook it is associated with.
10528	Parameters map[string]*string `json:"parameters"`
10529	// Runbook - Gets or sets the runbook the webhook is associated with.
10530	Runbook *RunbookAssociationProperty `json:"runbook,omitempty"`
10531	// RunOn - Gets or sets the name of the hybrid worker group the webhook job will run on.
10532	RunOn *string `json:"runOn,omitempty"`
10533	// CreationTime - Gets or sets the creation time.
10534	CreationTime *date.Time `json:"creationTime,omitempty"`
10535	// LastModifiedTime - Gets or sets the last modified time.
10536	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
10537	// LastModifiedBy - Details of the user who last modified the Webhook
10538	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
10539	// Description - Gets or sets the description.
10540	Description *string `json:"description,omitempty"`
10541}
10542
10543// MarshalJSON is the custom marshaler for WebhookProperties.
10544func (wp WebhookProperties) MarshalJSON() ([]byte, error) {
10545	objectMap := make(map[string]interface{})
10546	if wp.IsEnabled != nil {
10547		objectMap["isEnabled"] = wp.IsEnabled
10548	}
10549	if wp.URI != nil {
10550		objectMap["uri"] = wp.URI
10551	}
10552	if wp.ExpiryTime != nil {
10553		objectMap["expiryTime"] = wp.ExpiryTime
10554	}
10555	if wp.LastInvokedTime != nil {
10556		objectMap["lastInvokedTime"] = wp.LastInvokedTime
10557	}
10558	if wp.Parameters != nil {
10559		objectMap["parameters"] = wp.Parameters
10560	}
10561	if wp.Runbook != nil {
10562		objectMap["runbook"] = wp.Runbook
10563	}
10564	if wp.RunOn != nil {
10565		objectMap["runOn"] = wp.RunOn
10566	}
10567	if wp.CreationTime != nil {
10568		objectMap["creationTime"] = wp.CreationTime
10569	}
10570	if wp.LastModifiedTime != nil {
10571		objectMap["lastModifiedTime"] = wp.LastModifiedTime
10572	}
10573	if wp.LastModifiedBy != nil {
10574		objectMap["lastModifiedBy"] = wp.LastModifiedBy
10575	}
10576	if wp.Description != nil {
10577		objectMap["description"] = wp.Description
10578	}
10579	return json.Marshal(objectMap)
10580}
10581
10582// WebhookUpdateParameters the parameters supplied to the update webhook operation.
10583type WebhookUpdateParameters struct {
10584	// Name - Gets or sets the name of the webhook.
10585	Name *string `json:"name,omitempty"`
10586	// WebhookUpdateProperties - Gets or sets the value of the webhook.
10587	*WebhookUpdateProperties `json:"properties,omitempty"`
10588}
10589
10590// MarshalJSON is the custom marshaler for WebhookUpdateParameters.
10591func (wup WebhookUpdateParameters) MarshalJSON() ([]byte, error) {
10592	objectMap := make(map[string]interface{})
10593	if wup.Name != nil {
10594		objectMap["name"] = wup.Name
10595	}
10596	if wup.WebhookUpdateProperties != nil {
10597		objectMap["properties"] = wup.WebhookUpdateProperties
10598	}
10599	return json.Marshal(objectMap)
10600}
10601
10602// UnmarshalJSON is the custom unmarshaler for WebhookUpdateParameters struct.
10603func (wup *WebhookUpdateParameters) UnmarshalJSON(body []byte) error {
10604	var m map[string]*json.RawMessage
10605	err := json.Unmarshal(body, &m)
10606	if err != nil {
10607		return err
10608	}
10609	for k, v := range m {
10610		switch k {
10611		case "name":
10612			if v != nil {
10613				var name string
10614				err = json.Unmarshal(*v, &name)
10615				if err != nil {
10616					return err
10617				}
10618				wup.Name = &name
10619			}
10620		case "properties":
10621			if v != nil {
10622				var webhookUpdateProperties WebhookUpdateProperties
10623				err = json.Unmarshal(*v, &webhookUpdateProperties)
10624				if err != nil {
10625					return err
10626				}
10627				wup.WebhookUpdateProperties = &webhookUpdateProperties
10628			}
10629		}
10630	}
10631
10632	return nil
10633}
10634
10635// WebhookUpdateProperties the properties of the update webhook.
10636type WebhookUpdateProperties struct {
10637	// IsEnabled - Gets or sets the value of the enabled flag of webhook.
10638	IsEnabled *bool `json:"isEnabled,omitempty"`
10639	// RunOn - Gets or sets the name of the hybrid worker group the webhook job will run on.
10640	RunOn *string `json:"runOn,omitempty"`
10641	// Parameters - Gets or sets the parameters of the job.
10642	Parameters map[string]*string `json:"parameters"`
10643	// Description - Gets or sets the description of the webhook.
10644	Description *string `json:"description,omitempty"`
10645}
10646
10647// MarshalJSON is the custom marshaler for WebhookUpdateProperties.
10648func (wup WebhookUpdateProperties) MarshalJSON() ([]byte, error) {
10649	objectMap := make(map[string]interface{})
10650	if wup.IsEnabled != nil {
10651		objectMap["isEnabled"] = wup.IsEnabled
10652	}
10653	if wup.RunOn != nil {
10654		objectMap["runOn"] = wup.RunOn
10655	}
10656	if wup.Parameters != nil {
10657		objectMap["parameters"] = wup.Parameters
10658	}
10659	if wup.Description != nil {
10660		objectMap["description"] = wup.Description
10661	}
10662	return json.Marshal(objectMap)
10663}
10664
10665// WindowsProperties windows specific update configuration.
10666type WindowsProperties struct {
10667	// IncludedUpdateClassifications - Update classification included in the software update configuration. A comma separated string with required values. Possible values include: 'WindowsUpdateClassesUnclassified', 'WindowsUpdateClassesCritical', 'WindowsUpdateClassesSecurity', 'WindowsUpdateClassesUpdateRollup', 'WindowsUpdateClassesFeaturePack', 'WindowsUpdateClassesServicePack', 'WindowsUpdateClassesDefinition', 'WindowsUpdateClassesTools', 'WindowsUpdateClassesUpdates'
10668	IncludedUpdateClassifications WindowsUpdateClasses `json:"includedUpdateClassifications,omitempty"`
10669	// ExcludedKbNumbers - KB numbers excluded from the software update configuration.
10670	ExcludedKbNumbers *[]string `json:"excludedKbNumbers,omitempty"`
10671	// IncludedKbNumbers - KB numbers included from the software update configuration.
10672	IncludedKbNumbers *[]string `json:"includedKbNumbers,omitempty"`
10673	// RebootSetting - Reboot setting for the software update configuration.
10674	RebootSetting *string `json:"rebootSetting,omitempty"`
10675}
10676