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