1package sqlvirtualmachine
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/to"
15	"github.com/Azure/go-autorest/tracing"
16	"github.com/gofrs/uuid"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine"
22
23// AdditionalFeaturesServerConfigurations additional SQL Server feature settings.
24type AdditionalFeaturesServerConfigurations struct {
25	// IsRServicesEnabled - Enable or disable R services (SQL 2016 onwards).
26	IsRServicesEnabled *bool `json:"isRServicesEnabled,omitempty"`
27}
28
29// AutoBackupSettings configure backups for databases in your SQL virtual machine.
30type AutoBackupSettings struct {
31	// Enable - Enable or disable autobackup on SQL virtual machine.
32	Enable *bool `json:"enable,omitempty"`
33	// EnableEncryption - Enable or disable encryption for backup on SQL virtual machine.
34	EnableEncryption *bool `json:"enableEncryption,omitempty"`
35	// RetentionPeriod - Retention period of backup: 1-30 days.
36	RetentionPeriod *int32 `json:"retentionPeriod,omitempty"`
37	// StorageAccountURL - Storage account url where backup will be taken to.
38	StorageAccountURL *string `json:"storageAccountUrl,omitempty"`
39	// StorageAccessKey - Storage account key where backup will be taken to.
40	StorageAccessKey *string `json:"storageAccessKey,omitempty"`
41	// Password - Password for encryption on backup.
42	Password *string `json:"password,omitempty"`
43	// BackupSystemDbs - Include or exclude system databases from auto backup.
44	BackupSystemDbs *bool `json:"backupSystemDbs,omitempty"`
45	// BackupScheduleType - Backup schedule type. Possible values include: 'Manual', 'Automated'
46	BackupScheduleType BackupScheduleType `json:"backupScheduleType,omitempty"`
47	// FullBackupFrequency - Frequency of full backups. In both cases, full backups begin during the next scheduled time window. Possible values include: 'Daily', 'Weekly'
48	FullBackupFrequency FullBackupFrequencyType `json:"fullBackupFrequency,omitempty"`
49	// FullBackupStartTime - Start time of a given day during which full backups can take place. 0-23 hours.
50	FullBackupStartTime *int32 `json:"fullBackupStartTime,omitempty"`
51	// FullBackupWindowHours - Duration of the time window of a given day during which full backups can take place. 1-23 hours.
52	FullBackupWindowHours *int32 `json:"fullBackupWindowHours,omitempty"`
53	// LogBackupFrequency - Frequency of log backups. 5-60 minutes.
54	LogBackupFrequency *int32 `json:"logBackupFrequency,omitempty"`
55}
56
57// AutoPatchingSettings set a patching window during which Windows and SQL patches will be applied.
58type AutoPatchingSettings struct {
59	// Enable - Enable or disable autopatching on SQL virtual machine.
60	Enable *bool `json:"enable,omitempty"`
61	// DayOfWeek - Day of week to apply the patch on. Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'
62	DayOfWeek DayOfWeek `json:"dayOfWeek,omitempty"`
63	// MaintenanceWindowStartingHour - Hour of the day when patching is initiated. Local VM time.
64	MaintenanceWindowStartingHour *int32 `json:"maintenanceWindowStartingHour,omitempty"`
65	// MaintenanceWindowDuration - Duration of patching.
66	MaintenanceWindowDuration *int32 `json:"maintenanceWindowDuration,omitempty"`
67}
68
69// AvailabilityGroupListener a SQL Server availability group listener.
70type AvailabilityGroupListener struct {
71	autorest.Response `json:"-"`
72	// AvailabilityGroupListenerProperties - Resource properties.
73	*AvailabilityGroupListenerProperties `json:"properties,omitempty"`
74	// ID - READ-ONLY; Resource ID.
75	ID *string `json:"id,omitempty"`
76	// Name - READ-ONLY; Resource name.
77	Name *string `json:"name,omitempty"`
78	// Type - READ-ONLY; Resource type.
79	Type *string `json:"type,omitempty"`
80}
81
82// MarshalJSON is the custom marshaler for AvailabilityGroupListener.
83func (agl AvailabilityGroupListener) MarshalJSON() ([]byte, error) {
84	objectMap := make(map[string]interface{})
85	if agl.AvailabilityGroupListenerProperties != nil {
86		objectMap["properties"] = agl.AvailabilityGroupListenerProperties
87	}
88	return json.Marshal(objectMap)
89}
90
91// UnmarshalJSON is the custom unmarshaler for AvailabilityGroupListener struct.
92func (agl *AvailabilityGroupListener) UnmarshalJSON(body []byte) error {
93	var m map[string]*json.RawMessage
94	err := json.Unmarshal(body, &m)
95	if err != nil {
96		return err
97	}
98	for k, v := range m {
99		switch k {
100		case "properties":
101			if v != nil {
102				var availabilityGroupListenerProperties AvailabilityGroupListenerProperties
103				err = json.Unmarshal(*v, &availabilityGroupListenerProperties)
104				if err != nil {
105					return err
106				}
107				agl.AvailabilityGroupListenerProperties = &availabilityGroupListenerProperties
108			}
109		case "id":
110			if v != nil {
111				var ID string
112				err = json.Unmarshal(*v, &ID)
113				if err != nil {
114					return err
115				}
116				agl.ID = &ID
117			}
118		case "name":
119			if v != nil {
120				var name string
121				err = json.Unmarshal(*v, &name)
122				if err != nil {
123					return err
124				}
125				agl.Name = &name
126			}
127		case "type":
128			if v != nil {
129				var typeVar string
130				err = json.Unmarshal(*v, &typeVar)
131				if err != nil {
132					return err
133				}
134				agl.Type = &typeVar
135			}
136		}
137	}
138
139	return nil
140}
141
142// AvailabilityGroupListenerListResult a list of availability group listeners.
143type AvailabilityGroupListenerListResult struct {
144	autorest.Response `json:"-"`
145	// Value - READ-ONLY; Array of results.
146	Value *[]AvailabilityGroupListener `json:"value,omitempty"`
147	// NextLink - READ-ONLY; Link to retrieve next page of results.
148	NextLink *string `json:"nextLink,omitempty"`
149}
150
151// MarshalJSON is the custom marshaler for AvailabilityGroupListenerListResult.
152func (agllr AvailabilityGroupListenerListResult) MarshalJSON() ([]byte, error) {
153	objectMap := make(map[string]interface{})
154	return json.Marshal(objectMap)
155}
156
157// AvailabilityGroupListenerListResultIterator provides access to a complete listing of
158// AvailabilityGroupListener values.
159type AvailabilityGroupListenerListResultIterator struct {
160	i    int
161	page AvailabilityGroupListenerListResultPage
162}
163
164// NextWithContext advances to the next value.  If there was an error making
165// the request the iterator does not advance and the error is returned.
166func (iter *AvailabilityGroupListenerListResultIterator) NextWithContext(ctx context.Context) (err error) {
167	if tracing.IsEnabled() {
168		ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilityGroupListenerListResultIterator.NextWithContext")
169		defer func() {
170			sc := -1
171			if iter.Response().Response.Response != nil {
172				sc = iter.Response().Response.Response.StatusCode
173			}
174			tracing.EndSpan(ctx, sc, err)
175		}()
176	}
177	iter.i++
178	if iter.i < len(iter.page.Values()) {
179		return nil
180	}
181	err = iter.page.NextWithContext(ctx)
182	if err != nil {
183		iter.i--
184		return err
185	}
186	iter.i = 0
187	return nil
188}
189
190// Next advances to the next value.  If there was an error making
191// the request the iterator does not advance and the error is returned.
192// Deprecated: Use NextWithContext() instead.
193func (iter *AvailabilityGroupListenerListResultIterator) Next() error {
194	return iter.NextWithContext(context.Background())
195}
196
197// NotDone returns true if the enumeration should be started or is not yet complete.
198func (iter AvailabilityGroupListenerListResultIterator) NotDone() bool {
199	return iter.page.NotDone() && iter.i < len(iter.page.Values())
200}
201
202// Response returns the raw server response from the last page request.
203func (iter AvailabilityGroupListenerListResultIterator) Response() AvailabilityGroupListenerListResult {
204	return iter.page.Response()
205}
206
207// Value returns the current value or a zero-initialized value if the
208// iterator has advanced beyond the end of the collection.
209func (iter AvailabilityGroupListenerListResultIterator) Value() AvailabilityGroupListener {
210	if !iter.page.NotDone() {
211		return AvailabilityGroupListener{}
212	}
213	return iter.page.Values()[iter.i]
214}
215
216// Creates a new instance of the AvailabilityGroupListenerListResultIterator type.
217func NewAvailabilityGroupListenerListResultIterator(page AvailabilityGroupListenerListResultPage) AvailabilityGroupListenerListResultIterator {
218	return AvailabilityGroupListenerListResultIterator{page: page}
219}
220
221// IsEmpty returns true if the ListResult contains no values.
222func (agllr AvailabilityGroupListenerListResult) IsEmpty() bool {
223	return agllr.Value == nil || len(*agllr.Value) == 0
224}
225
226// hasNextLink returns true if the NextLink is not empty.
227func (agllr AvailabilityGroupListenerListResult) hasNextLink() bool {
228	return agllr.NextLink != nil && len(*agllr.NextLink) != 0
229}
230
231// availabilityGroupListenerListResultPreparer prepares a request to retrieve the next set of results.
232// It returns nil if no more results exist.
233func (agllr AvailabilityGroupListenerListResult) availabilityGroupListenerListResultPreparer(ctx context.Context) (*http.Request, error) {
234	if !agllr.hasNextLink() {
235		return nil, nil
236	}
237	return autorest.Prepare((&http.Request{}).WithContext(ctx),
238		autorest.AsJSON(),
239		autorest.AsGet(),
240		autorest.WithBaseURL(to.String(agllr.NextLink)))
241}
242
243// AvailabilityGroupListenerListResultPage contains a page of AvailabilityGroupListener values.
244type AvailabilityGroupListenerListResultPage struct {
245	fn    func(context.Context, AvailabilityGroupListenerListResult) (AvailabilityGroupListenerListResult, error)
246	agllr AvailabilityGroupListenerListResult
247}
248
249// NextWithContext advances to the next page of values.  If there was an error making
250// the request the page does not advance and the error is returned.
251func (page *AvailabilityGroupListenerListResultPage) NextWithContext(ctx context.Context) (err error) {
252	if tracing.IsEnabled() {
253		ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilityGroupListenerListResultPage.NextWithContext")
254		defer func() {
255			sc := -1
256			if page.Response().Response.Response != nil {
257				sc = page.Response().Response.Response.StatusCode
258			}
259			tracing.EndSpan(ctx, sc, err)
260		}()
261	}
262	for {
263		next, err := page.fn(ctx, page.agllr)
264		if err != nil {
265			return err
266		}
267		page.agllr = next
268		if !next.hasNextLink() || !next.IsEmpty() {
269			break
270		}
271	}
272	return nil
273}
274
275// Next advances to the next page of values.  If there was an error making
276// the request the page does not advance and the error is returned.
277// Deprecated: Use NextWithContext() instead.
278func (page *AvailabilityGroupListenerListResultPage) Next() error {
279	return page.NextWithContext(context.Background())
280}
281
282// NotDone returns true if the page enumeration should be started or is not yet complete.
283func (page AvailabilityGroupListenerListResultPage) NotDone() bool {
284	return !page.agllr.IsEmpty()
285}
286
287// Response returns the raw server response from the last page request.
288func (page AvailabilityGroupListenerListResultPage) Response() AvailabilityGroupListenerListResult {
289	return page.agllr
290}
291
292// Values returns the slice of values for the current page or nil if there are no values.
293func (page AvailabilityGroupListenerListResultPage) Values() []AvailabilityGroupListener {
294	if page.agllr.IsEmpty() {
295		return nil
296	}
297	return *page.agllr.Value
298}
299
300// Creates a new instance of the AvailabilityGroupListenerListResultPage type.
301func NewAvailabilityGroupListenerListResultPage(cur AvailabilityGroupListenerListResult, getNextPage func(context.Context, AvailabilityGroupListenerListResult) (AvailabilityGroupListenerListResult, error)) AvailabilityGroupListenerListResultPage {
302	return AvailabilityGroupListenerListResultPage{
303		fn:    getNextPage,
304		agllr: cur,
305	}
306}
307
308// AvailabilityGroupListenerProperties the properties of an availability group listener.
309type AvailabilityGroupListenerProperties struct {
310	// ProvisioningState - READ-ONLY; Provisioning state to track the async operation status.
311	ProvisioningState *string `json:"provisioningState,omitempty"`
312	// AvailabilityGroupName - Name of the availability group.
313	AvailabilityGroupName *string `json:"availabilityGroupName,omitempty"`
314	// LoadBalancerConfigurations - List of load balancer configurations for an availability group listener.
315	LoadBalancerConfigurations *[]LoadBalancerConfiguration `json:"loadBalancerConfigurations,omitempty"`
316	// CreateDefaultAvailabilityGroupIfNotExist - Create a default availability group if it does not exist.
317	CreateDefaultAvailabilityGroupIfNotExist *bool `json:"createDefaultAvailabilityGroupIfNotExist,omitempty"`
318	// Port - Listener port.
319	Port *int32 `json:"port,omitempty"`
320}
321
322// MarshalJSON is the custom marshaler for AvailabilityGroupListenerProperties.
323func (aglp AvailabilityGroupListenerProperties) MarshalJSON() ([]byte, error) {
324	objectMap := make(map[string]interface{})
325	if aglp.AvailabilityGroupName != nil {
326		objectMap["availabilityGroupName"] = aglp.AvailabilityGroupName
327	}
328	if aglp.LoadBalancerConfigurations != nil {
329		objectMap["loadBalancerConfigurations"] = aglp.LoadBalancerConfigurations
330	}
331	if aglp.CreateDefaultAvailabilityGroupIfNotExist != nil {
332		objectMap["createDefaultAvailabilityGroupIfNotExist"] = aglp.CreateDefaultAvailabilityGroupIfNotExist
333	}
334	if aglp.Port != nil {
335		objectMap["port"] = aglp.Port
336	}
337	return json.Marshal(objectMap)
338}
339
340// AvailabilityGroupListenersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
341// of a long-running operation.
342type AvailabilityGroupListenersCreateOrUpdateFuture struct {
343	azure.FutureAPI
344	// Result returns the result of the asynchronous operation.
345	// If the operation has not completed it will return an error.
346	Result func(AvailabilityGroupListenersClient) (AvailabilityGroupListener, error)
347}
348
349// UnmarshalJSON is the custom unmarshaller for CreateFuture.
350func (future *AvailabilityGroupListenersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
351	var azFuture azure.Future
352	if err := json.Unmarshal(body, &azFuture); err != nil {
353		return err
354	}
355	future.FutureAPI = &azFuture
356	future.Result = future.result
357	return nil
358}
359
360// result is the default implementation for AvailabilityGroupListenersCreateOrUpdateFuture.Result.
361func (future *AvailabilityGroupListenersCreateOrUpdateFuture) result(client AvailabilityGroupListenersClient) (agl AvailabilityGroupListener, err error) {
362	var done bool
363	done, err = future.DoneWithContext(context.Background(), client)
364	if err != nil {
365		err = autorest.NewErrorWithError(err, "sqlvirtualmachine.AvailabilityGroupListenersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
366		return
367	}
368	if !done {
369		agl.Response.Response = future.Response()
370		err = azure.NewAsyncOpIncompleteError("sqlvirtualmachine.AvailabilityGroupListenersCreateOrUpdateFuture")
371		return
372	}
373	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
374	if agl.Response.Response, err = future.GetResult(sender); err == nil && agl.Response.Response.StatusCode != http.StatusNoContent {
375		agl, err = client.CreateOrUpdateResponder(agl.Response.Response)
376		if err != nil {
377			err = autorest.NewErrorWithError(err, "sqlvirtualmachine.AvailabilityGroupListenersCreateOrUpdateFuture", "Result", agl.Response.Response, "Failure responding to request")
378		}
379	}
380	return
381}
382
383// AvailabilityGroupListenersDeleteFuture an abstraction for monitoring and retrieving the results of a
384// long-running operation.
385type AvailabilityGroupListenersDeleteFuture struct {
386	azure.FutureAPI
387	// Result returns the result of the asynchronous operation.
388	// If the operation has not completed it will return an error.
389	Result func(AvailabilityGroupListenersClient) (autorest.Response, error)
390}
391
392// UnmarshalJSON is the custom unmarshaller for CreateFuture.
393func (future *AvailabilityGroupListenersDeleteFuture) UnmarshalJSON(body []byte) error {
394	var azFuture azure.Future
395	if err := json.Unmarshal(body, &azFuture); err != nil {
396		return err
397	}
398	future.FutureAPI = &azFuture
399	future.Result = future.result
400	return nil
401}
402
403// result is the default implementation for AvailabilityGroupListenersDeleteFuture.Result.
404func (future *AvailabilityGroupListenersDeleteFuture) result(client AvailabilityGroupListenersClient) (ar autorest.Response, err error) {
405	var done bool
406	done, err = future.DoneWithContext(context.Background(), client)
407	if err != nil {
408		err = autorest.NewErrorWithError(err, "sqlvirtualmachine.AvailabilityGroupListenersDeleteFuture", "Result", future.Response(), "Polling failure")
409		return
410	}
411	if !done {
412		ar.Response = future.Response()
413		err = azure.NewAsyncOpIncompleteError("sqlvirtualmachine.AvailabilityGroupListenersDeleteFuture")
414		return
415	}
416	ar.Response = future.Response()
417	return
418}
419
420// Group a SQL virtual machine group.
421type Group struct {
422	autorest.Response `json:"-"`
423	// GroupProperties - Resource properties.
424	*GroupProperties `json:"properties,omitempty"`
425	// Location - Resource location.
426	Location *string `json:"location,omitempty"`
427	// Tags - Resource tags.
428	Tags map[string]*string `json:"tags"`
429	// ID - READ-ONLY; Resource ID.
430	ID *string `json:"id,omitempty"`
431	// Name - READ-ONLY; Resource name.
432	Name *string `json:"name,omitempty"`
433	// Type - READ-ONLY; Resource type.
434	Type *string `json:"type,omitempty"`
435}
436
437// MarshalJSON is the custom marshaler for Group.
438func (g Group) MarshalJSON() ([]byte, error) {
439	objectMap := make(map[string]interface{})
440	if g.GroupProperties != nil {
441		objectMap["properties"] = g.GroupProperties
442	}
443	if g.Location != nil {
444		objectMap["location"] = g.Location
445	}
446	if g.Tags != nil {
447		objectMap["tags"] = g.Tags
448	}
449	return json.Marshal(objectMap)
450}
451
452// UnmarshalJSON is the custom unmarshaler for Group struct.
453func (g *Group) UnmarshalJSON(body []byte) error {
454	var m map[string]*json.RawMessage
455	err := json.Unmarshal(body, &m)
456	if err != nil {
457		return err
458	}
459	for k, v := range m {
460		switch k {
461		case "properties":
462			if v != nil {
463				var groupProperties GroupProperties
464				err = json.Unmarshal(*v, &groupProperties)
465				if err != nil {
466					return err
467				}
468				g.GroupProperties = &groupProperties
469			}
470		case "location":
471			if v != nil {
472				var location string
473				err = json.Unmarshal(*v, &location)
474				if err != nil {
475					return err
476				}
477				g.Location = &location
478			}
479		case "tags":
480			if v != nil {
481				var tags map[string]*string
482				err = json.Unmarshal(*v, &tags)
483				if err != nil {
484					return err
485				}
486				g.Tags = tags
487			}
488		case "id":
489			if v != nil {
490				var ID string
491				err = json.Unmarshal(*v, &ID)
492				if err != nil {
493					return err
494				}
495				g.ID = &ID
496			}
497		case "name":
498			if v != nil {
499				var name string
500				err = json.Unmarshal(*v, &name)
501				if err != nil {
502					return err
503				}
504				g.Name = &name
505			}
506		case "type":
507			if v != nil {
508				var typeVar string
509				err = json.Unmarshal(*v, &typeVar)
510				if err != nil {
511					return err
512				}
513				g.Type = &typeVar
514			}
515		}
516	}
517
518	return nil
519}
520
521// GroupListResult a list of SQL virtual machine groups.
522type GroupListResult struct {
523	autorest.Response `json:"-"`
524	// Value - READ-ONLY; Array of results.
525	Value *[]Group `json:"value,omitempty"`
526	// NextLink - READ-ONLY; Link to retrieve next page of results.
527	NextLink *string `json:"nextLink,omitempty"`
528}
529
530// MarshalJSON is the custom marshaler for GroupListResult.
531func (glr GroupListResult) MarshalJSON() ([]byte, error) {
532	objectMap := make(map[string]interface{})
533	return json.Marshal(objectMap)
534}
535
536// GroupListResultIterator provides access to a complete listing of Group values.
537type GroupListResultIterator struct {
538	i    int
539	page GroupListResultPage
540}
541
542// NextWithContext advances to the next value.  If there was an error making
543// the request the iterator does not advance and the error is returned.
544func (iter *GroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
545	if tracing.IsEnabled() {
546		ctx = tracing.StartSpan(ctx, fqdn+"/GroupListResultIterator.NextWithContext")
547		defer func() {
548			sc := -1
549			if iter.Response().Response.Response != nil {
550				sc = iter.Response().Response.Response.StatusCode
551			}
552			tracing.EndSpan(ctx, sc, err)
553		}()
554	}
555	iter.i++
556	if iter.i < len(iter.page.Values()) {
557		return nil
558	}
559	err = iter.page.NextWithContext(ctx)
560	if err != nil {
561		iter.i--
562		return err
563	}
564	iter.i = 0
565	return nil
566}
567
568// Next advances to the next value.  If there was an error making
569// the request the iterator does not advance and the error is returned.
570// Deprecated: Use NextWithContext() instead.
571func (iter *GroupListResultIterator) Next() error {
572	return iter.NextWithContext(context.Background())
573}
574
575// NotDone returns true if the enumeration should be started or is not yet complete.
576func (iter GroupListResultIterator) NotDone() bool {
577	return iter.page.NotDone() && iter.i < len(iter.page.Values())
578}
579
580// Response returns the raw server response from the last page request.
581func (iter GroupListResultIterator) Response() GroupListResult {
582	return iter.page.Response()
583}
584
585// Value returns the current value or a zero-initialized value if the
586// iterator has advanced beyond the end of the collection.
587func (iter GroupListResultIterator) Value() Group {
588	if !iter.page.NotDone() {
589		return Group{}
590	}
591	return iter.page.Values()[iter.i]
592}
593
594// Creates a new instance of the GroupListResultIterator type.
595func NewGroupListResultIterator(page GroupListResultPage) GroupListResultIterator {
596	return GroupListResultIterator{page: page}
597}
598
599// IsEmpty returns true if the ListResult contains no values.
600func (glr GroupListResult) IsEmpty() bool {
601	return glr.Value == nil || len(*glr.Value) == 0
602}
603
604// hasNextLink returns true if the NextLink is not empty.
605func (glr GroupListResult) hasNextLink() bool {
606	return glr.NextLink != nil && len(*glr.NextLink) != 0
607}
608
609// groupListResultPreparer prepares a request to retrieve the next set of results.
610// It returns nil if no more results exist.
611func (glr GroupListResult) groupListResultPreparer(ctx context.Context) (*http.Request, error) {
612	if !glr.hasNextLink() {
613		return nil, nil
614	}
615	return autorest.Prepare((&http.Request{}).WithContext(ctx),
616		autorest.AsJSON(),
617		autorest.AsGet(),
618		autorest.WithBaseURL(to.String(glr.NextLink)))
619}
620
621// GroupListResultPage contains a page of Group values.
622type GroupListResultPage struct {
623	fn  func(context.Context, GroupListResult) (GroupListResult, error)
624	glr GroupListResult
625}
626
627// NextWithContext advances to the next page of values.  If there was an error making
628// the request the page does not advance and the error is returned.
629func (page *GroupListResultPage) NextWithContext(ctx context.Context) (err error) {
630	if tracing.IsEnabled() {
631		ctx = tracing.StartSpan(ctx, fqdn+"/GroupListResultPage.NextWithContext")
632		defer func() {
633			sc := -1
634			if page.Response().Response.Response != nil {
635				sc = page.Response().Response.Response.StatusCode
636			}
637			tracing.EndSpan(ctx, sc, err)
638		}()
639	}
640	for {
641		next, err := page.fn(ctx, page.glr)
642		if err != nil {
643			return err
644		}
645		page.glr = next
646		if !next.hasNextLink() || !next.IsEmpty() {
647			break
648		}
649	}
650	return nil
651}
652
653// Next advances to the next page of values.  If there was an error making
654// the request the page does not advance and the error is returned.
655// Deprecated: Use NextWithContext() instead.
656func (page *GroupListResultPage) Next() error {
657	return page.NextWithContext(context.Background())
658}
659
660// NotDone returns true if the page enumeration should be started or is not yet complete.
661func (page GroupListResultPage) NotDone() bool {
662	return !page.glr.IsEmpty()
663}
664
665// Response returns the raw server response from the last page request.
666func (page GroupListResultPage) Response() GroupListResult {
667	return page.glr
668}
669
670// Values returns the slice of values for the current page or nil if there are no values.
671func (page GroupListResultPage) Values() []Group {
672	if page.glr.IsEmpty() {
673		return nil
674	}
675	return *page.glr.Value
676}
677
678// Creates a new instance of the GroupListResultPage type.
679func NewGroupListResultPage(cur GroupListResult, getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage {
680	return GroupListResultPage{
681		fn:  getNextPage,
682		glr: cur,
683	}
684}
685
686// GroupProperties the properties of a SQL virtual machine group.
687type GroupProperties struct {
688	// ProvisioningState - READ-ONLY; Provisioning state to track the async operation status.
689	ProvisioningState *string `json:"provisioningState,omitempty"`
690	// SQLImageOffer - SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.
691	SQLImageOffer *string `json:"sqlImageOffer,omitempty"`
692	// SQLImageSku - SQL image sku. Possible values include: 'SQLVMGroupImageSkuDeveloper', 'SQLVMGroupImageSkuEnterprise'
693	SQLImageSku SQLVMGroupImageSku `json:"sqlImageSku,omitempty"`
694	// ScaleType - READ-ONLY; Scale type. Possible values include: 'HA'
695	ScaleType ScaleType `json:"scaleType,omitempty"`
696	// ClusterManagerType - READ-ONLY; Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the OS type. Possible values include: 'WSFC'
697	ClusterManagerType ClusterManagerType `json:"clusterManagerType,omitempty"`
698	// ClusterConfiguration - READ-ONLY; Cluster type. Possible values include: 'Domainful'
699	ClusterConfiguration ClusterConfiguration `json:"clusterConfiguration,omitempty"`
700	// WsfcDomainProfile - Cluster Active Directory domain profile.
701	WsfcDomainProfile *WsfcDomainProfile `json:"wsfcDomainProfile,omitempty"`
702}
703
704// MarshalJSON is the custom marshaler for GroupProperties.
705func (gp GroupProperties) MarshalJSON() ([]byte, error) {
706	objectMap := make(map[string]interface{})
707	if gp.SQLImageOffer != nil {
708		objectMap["sqlImageOffer"] = gp.SQLImageOffer
709	}
710	if gp.SQLImageSku != "" {
711		objectMap["sqlImageSku"] = gp.SQLImageSku
712	}
713	if gp.WsfcDomainProfile != nil {
714		objectMap["wsfcDomainProfile"] = gp.WsfcDomainProfile
715	}
716	return json.Marshal(objectMap)
717}
718
719// GroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
720// operation.
721type GroupsCreateOrUpdateFuture struct {
722	azure.FutureAPI
723	// Result returns the result of the asynchronous operation.
724	// If the operation has not completed it will return an error.
725	Result func(GroupsClient) (Group, error)
726}
727
728// UnmarshalJSON is the custom unmarshaller for CreateFuture.
729func (future *GroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
730	var azFuture azure.Future
731	if err := json.Unmarshal(body, &azFuture); err != nil {
732		return err
733	}
734	future.FutureAPI = &azFuture
735	future.Result = future.result
736	return nil
737}
738
739// result is the default implementation for GroupsCreateOrUpdateFuture.Result.
740func (future *GroupsCreateOrUpdateFuture) result(client GroupsClient) (g Group, err error) {
741	var done bool
742	done, err = future.DoneWithContext(context.Background(), client)
743	if err != nil {
744		err = autorest.NewErrorWithError(err, "sqlvirtualmachine.GroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
745		return
746	}
747	if !done {
748		g.Response.Response = future.Response()
749		err = azure.NewAsyncOpIncompleteError("sqlvirtualmachine.GroupsCreateOrUpdateFuture")
750		return
751	}
752	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
753	if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
754		g, err = client.CreateOrUpdateResponder(g.Response.Response)
755		if err != nil {
756			err = autorest.NewErrorWithError(err, "sqlvirtualmachine.GroupsCreateOrUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
757		}
758	}
759	return
760}
761
762// GroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
763type GroupsDeleteFuture struct {
764	azure.FutureAPI
765	// Result returns the result of the asynchronous operation.
766	// If the operation has not completed it will return an error.
767	Result func(GroupsClient) (autorest.Response, error)
768}
769
770// UnmarshalJSON is the custom unmarshaller for CreateFuture.
771func (future *GroupsDeleteFuture) UnmarshalJSON(body []byte) error {
772	var azFuture azure.Future
773	if err := json.Unmarshal(body, &azFuture); err != nil {
774		return err
775	}
776	future.FutureAPI = &azFuture
777	future.Result = future.result
778	return nil
779}
780
781// result is the default implementation for GroupsDeleteFuture.Result.
782func (future *GroupsDeleteFuture) result(client GroupsClient) (ar autorest.Response, err error) {
783	var done bool
784	done, err = future.DoneWithContext(context.Background(), client)
785	if err != nil {
786		err = autorest.NewErrorWithError(err, "sqlvirtualmachine.GroupsDeleteFuture", "Result", future.Response(), "Polling failure")
787		return
788	}
789	if !done {
790		ar.Response = future.Response()
791		err = azure.NewAsyncOpIncompleteError("sqlvirtualmachine.GroupsDeleteFuture")
792		return
793	}
794	ar.Response = future.Response()
795	return
796}
797
798// GroupsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
799type GroupsUpdateFuture struct {
800	azure.FutureAPI
801	// Result returns the result of the asynchronous operation.
802	// If the operation has not completed it will return an error.
803	Result func(GroupsClient) (Group, error)
804}
805
806// UnmarshalJSON is the custom unmarshaller for CreateFuture.
807func (future *GroupsUpdateFuture) UnmarshalJSON(body []byte) error {
808	var azFuture azure.Future
809	if err := json.Unmarshal(body, &azFuture); err != nil {
810		return err
811	}
812	future.FutureAPI = &azFuture
813	future.Result = future.result
814	return nil
815}
816
817// result is the default implementation for GroupsUpdateFuture.Result.
818func (future *GroupsUpdateFuture) result(client GroupsClient) (g Group, err error) {
819	var done bool
820	done, err = future.DoneWithContext(context.Background(), client)
821	if err != nil {
822		err = autorest.NewErrorWithError(err, "sqlvirtualmachine.GroupsUpdateFuture", "Result", future.Response(), "Polling failure")
823		return
824	}
825	if !done {
826		g.Response.Response = future.Response()
827		err = azure.NewAsyncOpIncompleteError("sqlvirtualmachine.GroupsUpdateFuture")
828		return
829	}
830	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
831	if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
832		g, err = client.UpdateResponder(g.Response.Response)
833		if err != nil {
834			err = autorest.NewErrorWithError(err, "sqlvirtualmachine.GroupsUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
835		}
836	}
837	return
838}
839
840// GroupUpdate an update to a SQL virtual machine group.
841type GroupUpdate struct {
842	// Tags - Resource tags.
843	Tags map[string]*string `json:"tags"`
844}
845
846// MarshalJSON is the custom marshaler for GroupUpdate.
847func (gu GroupUpdate) MarshalJSON() ([]byte, error) {
848	objectMap := make(map[string]interface{})
849	if gu.Tags != nil {
850		objectMap["tags"] = gu.Tags
851	}
852	return json.Marshal(objectMap)
853}
854
855// KeyVaultCredentialSettings configure your SQL virtual machine to be able to connect to the Azure Key
856// Vault service.
857type KeyVaultCredentialSettings struct {
858	// Enable - Enable or disable key vault credential setting.
859	Enable *bool `json:"enable,omitempty"`
860	// CredentialName - Credential name.
861	CredentialName *string `json:"credentialName,omitempty"`
862	// AzureKeyVaultURL - Azure Key Vault url.
863	AzureKeyVaultURL *string `json:"azureKeyVaultUrl,omitempty"`
864	// ServicePrincipalName - Service principal name to access key vault.
865	ServicePrincipalName *string `json:"servicePrincipalName,omitempty"`
866	// ServicePrincipalSecret - Service principal name secret to access key vault.
867	ServicePrincipalSecret *string `json:"servicePrincipalSecret,omitempty"`
868}
869
870// ListResult a list of SQL virtual machines.
871type ListResult struct {
872	autorest.Response `json:"-"`
873	// Value - READ-ONLY; Array of results.
874	Value *[]SQLVirtualMachine `json:"value,omitempty"`
875	// NextLink - READ-ONLY; Link to retrieve next page of results.
876	NextLink *string `json:"nextLink,omitempty"`
877}
878
879// MarshalJSON is the custom marshaler for ListResult.
880func (lr ListResult) MarshalJSON() ([]byte, error) {
881	objectMap := make(map[string]interface{})
882	return json.Marshal(objectMap)
883}
884
885// ListResultIterator provides access to a complete listing of SQLVirtualMachine values.
886type ListResultIterator struct {
887	i    int
888	page ListResultPage
889}
890
891// NextWithContext advances to the next value.  If there was an error making
892// the request the iterator does not advance and the error is returned.
893func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) {
894	if tracing.IsEnabled() {
895		ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext")
896		defer func() {
897			sc := -1
898			if iter.Response().Response.Response != nil {
899				sc = iter.Response().Response.Response.StatusCode
900			}
901			tracing.EndSpan(ctx, sc, err)
902		}()
903	}
904	iter.i++
905	if iter.i < len(iter.page.Values()) {
906		return nil
907	}
908	err = iter.page.NextWithContext(ctx)
909	if err != nil {
910		iter.i--
911		return err
912	}
913	iter.i = 0
914	return nil
915}
916
917// Next advances to the next value.  If there was an error making
918// the request the iterator does not advance and the error is returned.
919// Deprecated: Use NextWithContext() instead.
920func (iter *ListResultIterator) Next() error {
921	return iter.NextWithContext(context.Background())
922}
923
924// NotDone returns true if the enumeration should be started or is not yet complete.
925func (iter ListResultIterator) NotDone() bool {
926	return iter.page.NotDone() && iter.i < len(iter.page.Values())
927}
928
929// Response returns the raw server response from the last page request.
930func (iter ListResultIterator) Response() ListResult {
931	return iter.page.Response()
932}
933
934// Value returns the current value or a zero-initialized value if the
935// iterator has advanced beyond the end of the collection.
936func (iter ListResultIterator) Value() SQLVirtualMachine {
937	if !iter.page.NotDone() {
938		return SQLVirtualMachine{}
939	}
940	return iter.page.Values()[iter.i]
941}
942
943// Creates a new instance of the ListResultIterator type.
944func NewListResultIterator(page ListResultPage) ListResultIterator {
945	return ListResultIterator{page: page}
946}
947
948// IsEmpty returns true if the ListResult contains no values.
949func (lr ListResult) IsEmpty() bool {
950	return lr.Value == nil || len(*lr.Value) == 0
951}
952
953// hasNextLink returns true if the NextLink is not empty.
954func (lr ListResult) hasNextLink() bool {
955	return lr.NextLink != nil && len(*lr.NextLink) != 0
956}
957
958// listResultPreparer prepares a request to retrieve the next set of results.
959// It returns nil if no more results exist.
960func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) {
961	if !lr.hasNextLink() {
962		return nil, nil
963	}
964	return autorest.Prepare((&http.Request{}).WithContext(ctx),
965		autorest.AsJSON(),
966		autorest.AsGet(),
967		autorest.WithBaseURL(to.String(lr.NextLink)))
968}
969
970// ListResultPage contains a page of SQLVirtualMachine values.
971type ListResultPage struct {
972	fn func(context.Context, ListResult) (ListResult, error)
973	lr ListResult
974}
975
976// NextWithContext advances to the next page of values.  If there was an error making
977// the request the page does not advance and the error is returned.
978func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) {
979	if tracing.IsEnabled() {
980		ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext")
981		defer func() {
982			sc := -1
983			if page.Response().Response.Response != nil {
984				sc = page.Response().Response.Response.StatusCode
985			}
986			tracing.EndSpan(ctx, sc, err)
987		}()
988	}
989	for {
990		next, err := page.fn(ctx, page.lr)
991		if err != nil {
992			return err
993		}
994		page.lr = next
995		if !next.hasNextLink() || !next.IsEmpty() {
996			break
997		}
998	}
999	return nil
1000}
1001
1002// Next advances to the next page of values.  If there was an error making
1003// the request the page does not advance and the error is returned.
1004// Deprecated: Use NextWithContext() instead.
1005func (page *ListResultPage) Next() error {
1006	return page.NextWithContext(context.Background())
1007}
1008
1009// NotDone returns true if the page enumeration should be started or is not yet complete.
1010func (page ListResultPage) NotDone() bool {
1011	return !page.lr.IsEmpty()
1012}
1013
1014// Response returns the raw server response from the last page request.
1015func (page ListResultPage) Response() ListResult {
1016	return page.lr
1017}
1018
1019// Values returns the slice of values for the current page or nil if there are no values.
1020func (page ListResultPage) Values() []SQLVirtualMachine {
1021	if page.lr.IsEmpty() {
1022		return nil
1023	}
1024	return *page.lr.Value
1025}
1026
1027// Creates a new instance of the ListResultPage type.
1028func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
1029	return ListResultPage{
1030		fn: getNextPage,
1031		lr: cur,
1032	}
1033}
1034
1035// LoadBalancerConfiguration a load balancer configuration for an availability group listener.
1036type LoadBalancerConfiguration struct {
1037	// PrivateIPAddress - Private IP address.
1038	PrivateIPAddress *PrivateIPAddress `json:"privateIpAddress,omitempty"`
1039	// PublicIPAddressResourceID - Resource id of the public IP.
1040	PublicIPAddressResourceID *string `json:"publicIpAddressResourceId,omitempty"`
1041	// LoadBalancerResourceID - Resource id of the load balancer.
1042	LoadBalancerResourceID *string `json:"loadBalancerResourceId,omitempty"`
1043	// ProbePort - Probe port.
1044	ProbePort *int32 `json:"probePort,omitempty"`
1045	// SQLVirtualMachineInstances - List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.
1046	SQLVirtualMachineInstances *[]string `json:"sqlVirtualMachineInstances,omitempty"`
1047}
1048
1049// Operation SQL REST API operation definition.
1050type Operation struct {
1051	// Name - READ-ONLY; The name of the operation being performed on this particular object.
1052	Name *string `json:"name,omitempty"`
1053	// Display - READ-ONLY; The localized display information for this particular operation / action.
1054	Display *OperationDisplay `json:"display,omitempty"`
1055	// Origin - READ-ONLY; The intended executor of the operation. Possible values include: 'User', 'System'
1056	Origin OperationOrigin `json:"origin,omitempty"`
1057	// Properties - READ-ONLY; Additional descriptions for the operation.
1058	Properties map[string]interface{} `json:"properties"`
1059}
1060
1061// MarshalJSON is the custom marshaler for Operation.
1062func (o Operation) MarshalJSON() ([]byte, error) {
1063	objectMap := make(map[string]interface{})
1064	return json.Marshal(objectMap)
1065}
1066
1067// OperationDisplay display metadata associated with the operation.
1068type OperationDisplay struct {
1069	// Provider - READ-ONLY; The localized friendly form of the resource provider name.
1070	Provider *string `json:"provider,omitempty"`
1071	// Resource - READ-ONLY; The localized friendly form of the resource type related to this action/operation.
1072	Resource *string `json:"resource,omitempty"`
1073	// Operation - READ-ONLY; The localized friendly name for the operation.
1074	Operation *string `json:"operation,omitempty"`
1075	// Description - READ-ONLY; The localized friendly description for the operation.
1076	Description *string `json:"description,omitempty"`
1077}
1078
1079// MarshalJSON is the custom marshaler for OperationDisplay.
1080func (od OperationDisplay) MarshalJSON() ([]byte, error) {
1081	objectMap := make(map[string]interface{})
1082	return json.Marshal(objectMap)
1083}
1084
1085// OperationListResult result of the request to list SQL operations.
1086type OperationListResult struct {
1087	autorest.Response `json:"-"`
1088	// Value - READ-ONLY; Array of results.
1089	Value *[]Operation `json:"value,omitempty"`
1090	// NextLink - READ-ONLY; Link to retrieve next page of results.
1091	NextLink *string `json:"nextLink,omitempty"`
1092}
1093
1094// MarshalJSON is the custom marshaler for OperationListResult.
1095func (olr OperationListResult) MarshalJSON() ([]byte, error) {
1096	objectMap := make(map[string]interface{})
1097	return json.Marshal(objectMap)
1098}
1099
1100// OperationListResultIterator provides access to a complete listing of Operation values.
1101type OperationListResultIterator struct {
1102	i    int
1103	page OperationListResultPage
1104}
1105
1106// NextWithContext advances to the next value.  If there was an error making
1107// the request the iterator does not advance and the error is returned.
1108func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
1109	if tracing.IsEnabled() {
1110		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
1111		defer func() {
1112			sc := -1
1113			if iter.Response().Response.Response != nil {
1114				sc = iter.Response().Response.Response.StatusCode
1115			}
1116			tracing.EndSpan(ctx, sc, err)
1117		}()
1118	}
1119	iter.i++
1120	if iter.i < len(iter.page.Values()) {
1121		return nil
1122	}
1123	err = iter.page.NextWithContext(ctx)
1124	if err != nil {
1125		iter.i--
1126		return err
1127	}
1128	iter.i = 0
1129	return nil
1130}
1131
1132// Next advances to the next value.  If there was an error making
1133// the request the iterator does not advance and the error is returned.
1134// Deprecated: Use NextWithContext() instead.
1135func (iter *OperationListResultIterator) Next() error {
1136	return iter.NextWithContext(context.Background())
1137}
1138
1139// NotDone returns true if the enumeration should be started or is not yet complete.
1140func (iter OperationListResultIterator) NotDone() bool {
1141	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1142}
1143
1144// Response returns the raw server response from the last page request.
1145func (iter OperationListResultIterator) Response() OperationListResult {
1146	return iter.page.Response()
1147}
1148
1149// Value returns the current value or a zero-initialized value if the
1150// iterator has advanced beyond the end of the collection.
1151func (iter OperationListResultIterator) Value() Operation {
1152	if !iter.page.NotDone() {
1153		return Operation{}
1154	}
1155	return iter.page.Values()[iter.i]
1156}
1157
1158// Creates a new instance of the OperationListResultIterator type.
1159func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
1160	return OperationListResultIterator{page: page}
1161}
1162
1163// IsEmpty returns true if the ListResult contains no values.
1164func (olr OperationListResult) IsEmpty() bool {
1165	return olr.Value == nil || len(*olr.Value) == 0
1166}
1167
1168// hasNextLink returns true if the NextLink is not empty.
1169func (olr OperationListResult) hasNextLink() bool {
1170	return olr.NextLink != nil && len(*olr.NextLink) != 0
1171}
1172
1173// operationListResultPreparer prepares a request to retrieve the next set of results.
1174// It returns nil if no more results exist.
1175func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
1176	if !olr.hasNextLink() {
1177		return nil, nil
1178	}
1179	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1180		autorest.AsJSON(),
1181		autorest.AsGet(),
1182		autorest.WithBaseURL(to.String(olr.NextLink)))
1183}
1184
1185// OperationListResultPage contains a page of Operation values.
1186type OperationListResultPage struct {
1187	fn  func(context.Context, OperationListResult) (OperationListResult, error)
1188	olr OperationListResult
1189}
1190
1191// NextWithContext advances to the next page of values.  If there was an error making
1192// the request the page does not advance and the error is returned.
1193func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
1194	if tracing.IsEnabled() {
1195		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
1196		defer func() {
1197			sc := -1
1198			if page.Response().Response.Response != nil {
1199				sc = page.Response().Response.Response.StatusCode
1200			}
1201			tracing.EndSpan(ctx, sc, err)
1202		}()
1203	}
1204	for {
1205		next, err := page.fn(ctx, page.olr)
1206		if err != nil {
1207			return err
1208		}
1209		page.olr = next
1210		if !next.hasNextLink() || !next.IsEmpty() {
1211			break
1212		}
1213	}
1214	return nil
1215}
1216
1217// Next advances to the next page of values.  If there was an error making
1218// the request the page does not advance and the error is returned.
1219// Deprecated: Use NextWithContext() instead.
1220func (page *OperationListResultPage) Next() error {
1221	return page.NextWithContext(context.Background())
1222}
1223
1224// NotDone returns true if the page enumeration should be started or is not yet complete.
1225func (page OperationListResultPage) NotDone() bool {
1226	return !page.olr.IsEmpty()
1227}
1228
1229// Response returns the raw server response from the last page request.
1230func (page OperationListResultPage) Response() OperationListResult {
1231	return page.olr
1232}
1233
1234// Values returns the slice of values for the current page or nil if there are no values.
1235func (page OperationListResultPage) Values() []Operation {
1236	if page.olr.IsEmpty() {
1237		return nil
1238	}
1239	return *page.olr.Value
1240}
1241
1242// Creates a new instance of the OperationListResultPage type.
1243func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
1244	return OperationListResultPage{
1245		fn:  getNextPage,
1246		olr: cur,
1247	}
1248}
1249
1250// PrivateIPAddress a private IP address bound to the availability group listener.
1251type PrivateIPAddress struct {
1252	// IPAddress - Private IP address bound to the availability group listener.
1253	IPAddress *string `json:"ipAddress,omitempty"`
1254	// SubnetResourceID - Subnet used to include private IP.
1255	SubnetResourceID *string `json:"subnetResourceId,omitempty"`
1256}
1257
1258// Properties the SQL virtual machine properties.
1259type Properties struct {
1260	// VirtualMachineResourceID - ARM Resource id of underlying virtual machine created from SQL marketplace image.
1261	VirtualMachineResourceID *string `json:"virtualMachineResourceId,omitempty"`
1262	// ProvisioningState - READ-ONLY; Provisioning state to track the async operation status.
1263	ProvisioningState *string `json:"provisioningState,omitempty"`
1264	// SQLImageOffer - SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.
1265	SQLImageOffer *string `json:"sqlImageOffer,omitempty"`
1266	// SQLServerLicenseType - SQL Server license type. Possible values include: 'PAYG', 'AHUB', 'DR'
1267	SQLServerLicenseType SQLServerLicenseType `json:"sqlServerLicenseType,omitempty"`
1268	// SQLManagement - SQL Server Management type. Possible values include: 'Full', 'LightWeight', 'NoAgent'
1269	SQLManagement SQLManagementMode `json:"sqlManagement,omitempty"`
1270	// SQLImageSku - SQL Server edition type. Possible values include: 'Developer', 'Express', 'Standard', 'Enterprise', 'Web'
1271	SQLImageSku SQLImageSku `json:"sqlImageSku,omitempty"`
1272	// SQLVirtualMachineGroupResourceID - ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of.
1273	SQLVirtualMachineGroupResourceID *string `json:"sqlVirtualMachineGroupResourceId,omitempty"`
1274	// WsfcDomainCredentials - Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.
1275	WsfcDomainCredentials *WsfcDomainCredentials `json:"wsfcDomainCredentials,omitempty"`
1276	// AutoPatchingSettings - Auto patching settings for applying critical security updates to SQL virtual machine.
1277	AutoPatchingSettings *AutoPatchingSettings `json:"autoPatchingSettings,omitempty"`
1278	// AutoBackupSettings - Auto backup settings for SQL Server.
1279	AutoBackupSettings *AutoBackupSettings `json:"autoBackupSettings,omitempty"`
1280	// KeyVaultCredentialSettings - Key vault credential settings.
1281	KeyVaultCredentialSettings *KeyVaultCredentialSettings `json:"keyVaultCredentialSettings,omitempty"`
1282	// ServerConfigurationsManagementSettings - SQL Server configuration management settings.
1283	ServerConfigurationsManagementSettings *ServerConfigurationsManagementSettings `json:"serverConfigurationsManagementSettings,omitempty"`
1284	// StorageConfigurationSettings - Storage Configuration Settings.
1285	StorageConfigurationSettings *StorageConfigurationSettings `json:"storageConfigurationSettings,omitempty"`
1286}
1287
1288// MarshalJSON is the custom marshaler for Properties.
1289func (p Properties) MarshalJSON() ([]byte, error) {
1290	objectMap := make(map[string]interface{})
1291	if p.VirtualMachineResourceID != nil {
1292		objectMap["virtualMachineResourceId"] = p.VirtualMachineResourceID
1293	}
1294	if p.SQLImageOffer != nil {
1295		objectMap["sqlImageOffer"] = p.SQLImageOffer
1296	}
1297	if p.SQLServerLicenseType != "" {
1298		objectMap["sqlServerLicenseType"] = p.SQLServerLicenseType
1299	}
1300	if p.SQLManagement != "" {
1301		objectMap["sqlManagement"] = p.SQLManagement
1302	}
1303	if p.SQLImageSku != "" {
1304		objectMap["sqlImageSku"] = p.SQLImageSku
1305	}
1306	if p.SQLVirtualMachineGroupResourceID != nil {
1307		objectMap["sqlVirtualMachineGroupResourceId"] = p.SQLVirtualMachineGroupResourceID
1308	}
1309	if p.WsfcDomainCredentials != nil {
1310		objectMap["wsfcDomainCredentials"] = p.WsfcDomainCredentials
1311	}
1312	if p.AutoPatchingSettings != nil {
1313		objectMap["autoPatchingSettings"] = p.AutoPatchingSettings
1314	}
1315	if p.AutoBackupSettings != nil {
1316		objectMap["autoBackupSettings"] = p.AutoBackupSettings
1317	}
1318	if p.KeyVaultCredentialSettings != nil {
1319		objectMap["keyVaultCredentialSettings"] = p.KeyVaultCredentialSettings
1320	}
1321	if p.ServerConfigurationsManagementSettings != nil {
1322		objectMap["serverConfigurationsManagementSettings"] = p.ServerConfigurationsManagementSettings
1323	}
1324	if p.StorageConfigurationSettings != nil {
1325		objectMap["storageConfigurationSettings"] = p.StorageConfigurationSettings
1326	}
1327	return json.Marshal(objectMap)
1328}
1329
1330// ProxyResource ARM proxy resource.
1331type ProxyResource struct {
1332	// ID - READ-ONLY; Resource ID.
1333	ID *string `json:"id,omitempty"`
1334	// Name - READ-ONLY; Resource name.
1335	Name *string `json:"name,omitempty"`
1336	// Type - READ-ONLY; Resource type.
1337	Type *string `json:"type,omitempty"`
1338}
1339
1340// MarshalJSON is the custom marshaler for ProxyResource.
1341func (pr ProxyResource) MarshalJSON() ([]byte, error) {
1342	objectMap := make(map[string]interface{})
1343	return json.Marshal(objectMap)
1344}
1345
1346// Resource ARM resource.
1347type Resource struct {
1348	// ID - READ-ONLY; Resource ID.
1349	ID *string `json:"id,omitempty"`
1350	// Name - READ-ONLY; Resource name.
1351	Name *string `json:"name,omitempty"`
1352	// Type - READ-ONLY; Resource type.
1353	Type *string `json:"type,omitempty"`
1354}
1355
1356// MarshalJSON is the custom marshaler for Resource.
1357func (r Resource) MarshalJSON() ([]byte, error) {
1358	objectMap := make(map[string]interface{})
1359	return json.Marshal(objectMap)
1360}
1361
1362// ResourceIdentity azure Active Directory identity configuration for a resource.
1363type ResourceIdentity struct {
1364	// PrincipalID - READ-ONLY; The Azure Active Directory principal id.
1365	PrincipalID *uuid.UUID `json:"principalId,omitempty"`
1366	// Type - The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned'
1367	Type IdentityType `json:"type,omitempty"`
1368	// TenantID - READ-ONLY; The Azure Active Directory tenant id.
1369	TenantID *uuid.UUID `json:"tenantId,omitempty"`
1370}
1371
1372// MarshalJSON is the custom marshaler for ResourceIdentity.
1373func (ri ResourceIdentity) MarshalJSON() ([]byte, error) {
1374	objectMap := make(map[string]interface{})
1375	if ri.Type != "" {
1376		objectMap["type"] = ri.Type
1377	}
1378	return json.Marshal(objectMap)
1379}
1380
1381// ServerConfigurationsManagementSettings set the connectivity, storage and workload settings.
1382type ServerConfigurationsManagementSettings struct {
1383	// SQLConnectivityUpdateSettings - SQL connectivity type settings.
1384	SQLConnectivityUpdateSettings *SQLConnectivityUpdateSettings `json:"sqlConnectivityUpdateSettings,omitempty"`
1385	// SQLWorkloadTypeUpdateSettings - SQL workload type settings.
1386	SQLWorkloadTypeUpdateSettings *SQLWorkloadTypeUpdateSettings `json:"sqlWorkloadTypeUpdateSettings,omitempty"`
1387	// SQLStorageUpdateSettings - SQL storage update settings.
1388	SQLStorageUpdateSettings *SQLStorageUpdateSettings `json:"sqlStorageUpdateSettings,omitempty"`
1389	// AdditionalFeaturesServerConfigurations - Additional SQL feature settings.
1390	AdditionalFeaturesServerConfigurations *AdditionalFeaturesServerConfigurations `json:"additionalFeaturesServerConfigurations,omitempty"`
1391}
1392
1393// SQLConnectivityUpdateSettings set the access level and network port settings for SQL Server.
1394type SQLConnectivityUpdateSettings struct {
1395	// ConnectivityType - SQL Server connectivity option. Possible values include: 'LOCAL', 'PRIVATE', 'PUBLIC'
1396	ConnectivityType ConnectivityType `json:"connectivityType,omitempty"`
1397	// Port - SQL Server port.
1398	Port *int32 `json:"port,omitempty"`
1399	// SQLAuthUpdateUserName - SQL Server sysadmin login to create.
1400	SQLAuthUpdateUserName *string `json:"sqlAuthUpdateUserName,omitempty"`
1401	// SQLAuthUpdatePassword - SQL Server sysadmin login password.
1402	SQLAuthUpdatePassword *string `json:"sqlAuthUpdatePassword,omitempty"`
1403}
1404
1405// SQLStorageSettings set disk storage settings for SQL Server.
1406type SQLStorageSettings struct {
1407	// Luns - Logical Unit Numbers for the disks.
1408	Luns *[]int32 `json:"luns,omitempty"`
1409	// DefaultFilePath - SQL Server default file path
1410	DefaultFilePath *string `json:"defaultFilePath,omitempty"`
1411}
1412
1413// SQLStorageUpdateSettings set disk storage settings for SQL Server.
1414type SQLStorageUpdateSettings struct {
1415	// DiskCount - Virtual machine disk count.
1416	DiskCount *int32 `json:"diskCount,omitempty"`
1417	// StartingDeviceID - Device id of the first disk to be updated.
1418	StartingDeviceID *int32 `json:"startingDeviceId,omitempty"`
1419	// DiskConfigurationType - Disk configuration to apply to SQL Server. Possible values include: 'NEW', 'EXTEND', 'ADD'
1420	DiskConfigurationType DiskConfigurationType `json:"diskConfigurationType,omitempty"`
1421}
1422
1423// SQLVirtualMachine a SQL virtual machine.
1424type SQLVirtualMachine struct {
1425	autorest.Response `json:"-"`
1426	// Identity - Azure Active Directory identity of the server.
1427	Identity *ResourceIdentity `json:"identity,omitempty"`
1428	// Properties - Resource properties.
1429	*Properties `json:"properties,omitempty"`
1430	// Location - Resource location.
1431	Location *string `json:"location,omitempty"`
1432	// Tags - Resource tags.
1433	Tags map[string]*string `json:"tags"`
1434	// ID - READ-ONLY; Resource ID.
1435	ID *string `json:"id,omitempty"`
1436	// Name - READ-ONLY; Resource name.
1437	Name *string `json:"name,omitempty"`
1438	// Type - READ-ONLY; Resource type.
1439	Type *string `json:"type,omitempty"`
1440}
1441
1442// MarshalJSON is the custom marshaler for SQLVirtualMachine.
1443func (svm SQLVirtualMachine) MarshalJSON() ([]byte, error) {
1444	objectMap := make(map[string]interface{})
1445	if svm.Identity != nil {
1446		objectMap["identity"] = svm.Identity
1447	}
1448	if svm.Properties != nil {
1449		objectMap["properties"] = svm.Properties
1450	}
1451	if svm.Location != nil {
1452		objectMap["location"] = svm.Location
1453	}
1454	if svm.Tags != nil {
1455		objectMap["tags"] = svm.Tags
1456	}
1457	return json.Marshal(objectMap)
1458}
1459
1460// UnmarshalJSON is the custom unmarshaler for SQLVirtualMachine struct.
1461func (svm *SQLVirtualMachine) UnmarshalJSON(body []byte) error {
1462	var m map[string]*json.RawMessage
1463	err := json.Unmarshal(body, &m)
1464	if err != nil {
1465		return err
1466	}
1467	for k, v := range m {
1468		switch k {
1469		case "identity":
1470			if v != nil {
1471				var identity ResourceIdentity
1472				err = json.Unmarshal(*v, &identity)
1473				if err != nil {
1474					return err
1475				}
1476				svm.Identity = &identity
1477			}
1478		case "properties":
1479			if v != nil {
1480				var properties Properties
1481				err = json.Unmarshal(*v, &properties)
1482				if err != nil {
1483					return err
1484				}
1485				svm.Properties = &properties
1486			}
1487		case "location":
1488			if v != nil {
1489				var location string
1490				err = json.Unmarshal(*v, &location)
1491				if err != nil {
1492					return err
1493				}
1494				svm.Location = &location
1495			}
1496		case "tags":
1497			if v != nil {
1498				var tags map[string]*string
1499				err = json.Unmarshal(*v, &tags)
1500				if err != nil {
1501					return err
1502				}
1503				svm.Tags = tags
1504			}
1505		case "id":
1506			if v != nil {
1507				var ID string
1508				err = json.Unmarshal(*v, &ID)
1509				if err != nil {
1510					return err
1511				}
1512				svm.ID = &ID
1513			}
1514		case "name":
1515			if v != nil {
1516				var name string
1517				err = json.Unmarshal(*v, &name)
1518				if err != nil {
1519					return err
1520				}
1521				svm.Name = &name
1522			}
1523		case "type":
1524			if v != nil {
1525				var typeVar string
1526				err = json.Unmarshal(*v, &typeVar)
1527				if err != nil {
1528					return err
1529				}
1530				svm.Type = &typeVar
1531			}
1532		}
1533	}
1534
1535	return nil
1536}
1537
1538// SQLVirtualMachinesCreateOrUpdateFutureType an abstraction for monitoring and retrieving the results of a
1539// long-running operation.
1540type SQLVirtualMachinesCreateOrUpdateFutureType struct {
1541	azure.FutureAPI
1542	// Result returns the result of the asynchronous operation.
1543	// If the operation has not completed it will return an error.
1544	Result func(SQLVirtualMachinesClient) (SQLVirtualMachine, error)
1545}
1546
1547// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1548func (future *SQLVirtualMachinesCreateOrUpdateFutureType) UnmarshalJSON(body []byte) error {
1549	var azFuture azure.Future
1550	if err := json.Unmarshal(body, &azFuture); err != nil {
1551		return err
1552	}
1553	future.FutureAPI = &azFuture
1554	future.Result = future.result
1555	return nil
1556}
1557
1558// result is the default implementation for SQLVirtualMachinesCreateOrUpdateFutureType.Result.
1559func (future *SQLVirtualMachinesCreateOrUpdateFutureType) result(client SQLVirtualMachinesClient) (svm SQLVirtualMachine, err error) {
1560	var done bool
1561	done, err = future.DoneWithContext(context.Background(), client)
1562	if err != nil {
1563		err = autorest.NewErrorWithError(err, "sqlvirtualmachine.SQLVirtualMachinesCreateOrUpdateFutureType", "Result", future.Response(), "Polling failure")
1564		return
1565	}
1566	if !done {
1567		svm.Response.Response = future.Response()
1568		err = azure.NewAsyncOpIncompleteError("sqlvirtualmachine.SQLVirtualMachinesCreateOrUpdateFutureType")
1569		return
1570	}
1571	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1572	if svm.Response.Response, err = future.GetResult(sender); err == nil && svm.Response.Response.StatusCode != http.StatusNoContent {
1573		svm, err = client.CreateOrUpdateResponder(svm.Response.Response)
1574		if err != nil {
1575			err = autorest.NewErrorWithError(err, "sqlvirtualmachine.SQLVirtualMachinesCreateOrUpdateFutureType", "Result", svm.Response.Response, "Failure responding to request")
1576		}
1577	}
1578	return
1579}
1580
1581// SQLVirtualMachinesDeleteFutureType an abstraction for monitoring and retrieving the results of a
1582// long-running operation.
1583type SQLVirtualMachinesDeleteFutureType struct {
1584	azure.FutureAPI
1585	// Result returns the result of the asynchronous operation.
1586	// If the operation has not completed it will return an error.
1587	Result func(SQLVirtualMachinesClient) (autorest.Response, error)
1588}
1589
1590// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1591func (future *SQLVirtualMachinesDeleteFutureType) UnmarshalJSON(body []byte) error {
1592	var azFuture azure.Future
1593	if err := json.Unmarshal(body, &azFuture); err != nil {
1594		return err
1595	}
1596	future.FutureAPI = &azFuture
1597	future.Result = future.result
1598	return nil
1599}
1600
1601// result is the default implementation for SQLVirtualMachinesDeleteFutureType.Result.
1602func (future *SQLVirtualMachinesDeleteFutureType) result(client SQLVirtualMachinesClient) (ar autorest.Response, err error) {
1603	var done bool
1604	done, err = future.DoneWithContext(context.Background(), client)
1605	if err != nil {
1606		err = autorest.NewErrorWithError(err, "sqlvirtualmachine.SQLVirtualMachinesDeleteFutureType", "Result", future.Response(), "Polling failure")
1607		return
1608	}
1609	if !done {
1610		ar.Response = future.Response()
1611		err = azure.NewAsyncOpIncompleteError("sqlvirtualmachine.SQLVirtualMachinesDeleteFutureType")
1612		return
1613	}
1614	ar.Response = future.Response()
1615	return
1616}
1617
1618// SQLVirtualMachinesUpdateFutureType an abstraction for monitoring and retrieving the results of a
1619// long-running operation.
1620type SQLVirtualMachinesUpdateFutureType struct {
1621	azure.FutureAPI
1622	// Result returns the result of the asynchronous operation.
1623	// If the operation has not completed it will return an error.
1624	Result func(SQLVirtualMachinesClient) (SQLVirtualMachine, error)
1625}
1626
1627// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1628func (future *SQLVirtualMachinesUpdateFutureType) UnmarshalJSON(body []byte) error {
1629	var azFuture azure.Future
1630	if err := json.Unmarshal(body, &azFuture); err != nil {
1631		return err
1632	}
1633	future.FutureAPI = &azFuture
1634	future.Result = future.result
1635	return nil
1636}
1637
1638// result is the default implementation for SQLVirtualMachinesUpdateFutureType.Result.
1639func (future *SQLVirtualMachinesUpdateFutureType) result(client SQLVirtualMachinesClient) (svm SQLVirtualMachine, err error) {
1640	var done bool
1641	done, err = future.DoneWithContext(context.Background(), client)
1642	if err != nil {
1643		err = autorest.NewErrorWithError(err, "sqlvirtualmachine.SQLVirtualMachinesUpdateFutureType", "Result", future.Response(), "Polling failure")
1644		return
1645	}
1646	if !done {
1647		svm.Response.Response = future.Response()
1648		err = azure.NewAsyncOpIncompleteError("sqlvirtualmachine.SQLVirtualMachinesUpdateFutureType")
1649		return
1650	}
1651	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1652	if svm.Response.Response, err = future.GetResult(sender); err == nil && svm.Response.Response.StatusCode != http.StatusNoContent {
1653		svm, err = client.UpdateResponder(svm.Response.Response)
1654		if err != nil {
1655			err = autorest.NewErrorWithError(err, "sqlvirtualmachine.SQLVirtualMachinesUpdateFutureType", "Result", svm.Response.Response, "Failure responding to request")
1656		}
1657	}
1658	return
1659}
1660
1661// SQLWorkloadTypeUpdateSettings set workload type to optimize storage for SQL Server.
1662type SQLWorkloadTypeUpdateSettings struct {
1663	// SQLWorkloadType - SQL Server workload type. Possible values include: 'GENERAL', 'OLTP', 'DW'
1664	SQLWorkloadType SQLWorkloadType `json:"sqlWorkloadType,omitempty"`
1665}
1666
1667// StorageConfigurationSettings storage Configurations for SQL Data, Log and TempDb.
1668type StorageConfigurationSettings struct {
1669	// SQLDataSettings - SQL Server Data Storage Settings.
1670	SQLDataSettings *SQLStorageSettings `json:"sqlDataSettings,omitempty"`
1671	// SQLLogSettings - SQL Server Log Storage Settings.
1672	SQLLogSettings *SQLStorageSettings `json:"sqlLogSettings,omitempty"`
1673	// SQLTempDbSettings - SQL Server TempDb Storage Settings.
1674	SQLTempDbSettings *SQLStorageSettings `json:"sqlTempDbSettings,omitempty"`
1675	// DiskConfigurationType - Disk configuration to apply to SQL Server. Possible values include: 'NEW', 'EXTEND', 'ADD'
1676	DiskConfigurationType DiskConfigurationType `json:"diskConfigurationType,omitempty"`
1677	// StorageWorkloadType - Storage workload type. Possible values include: 'StorageWorkloadTypeGENERAL', 'StorageWorkloadTypeOLTP', 'StorageWorkloadTypeDW'
1678	StorageWorkloadType StorageWorkloadType `json:"storageWorkloadType,omitempty"`
1679}
1680
1681// TrackedResource ARM tracked top level resource.
1682type TrackedResource struct {
1683	// Location - Resource location.
1684	Location *string `json:"location,omitempty"`
1685	// Tags - Resource tags.
1686	Tags map[string]*string `json:"tags"`
1687	// ID - READ-ONLY; Resource ID.
1688	ID *string `json:"id,omitempty"`
1689	// Name - READ-ONLY; Resource name.
1690	Name *string `json:"name,omitempty"`
1691	// Type - READ-ONLY; Resource type.
1692	Type *string `json:"type,omitempty"`
1693}
1694
1695// MarshalJSON is the custom marshaler for TrackedResource.
1696func (tr TrackedResource) MarshalJSON() ([]byte, error) {
1697	objectMap := make(map[string]interface{})
1698	if tr.Location != nil {
1699		objectMap["location"] = tr.Location
1700	}
1701	if tr.Tags != nil {
1702		objectMap["tags"] = tr.Tags
1703	}
1704	return json.Marshal(objectMap)
1705}
1706
1707// Update an update to a SQL virtual machine.
1708type Update struct {
1709	// Tags - Resource tags.
1710	Tags map[string]*string `json:"tags"`
1711}
1712
1713// MarshalJSON is the custom marshaler for Update.
1714func (u Update) MarshalJSON() ([]byte, error) {
1715	objectMap := make(map[string]interface{})
1716	if u.Tags != nil {
1717		objectMap["tags"] = u.Tags
1718	}
1719	return json.Marshal(objectMap)
1720}
1721
1722// WsfcDomainCredentials domain credentials for setting up Windows Server Failover Cluster for SQL
1723// availability group.
1724type WsfcDomainCredentials struct {
1725	// ClusterBootstrapAccountPassword - Cluster bootstrap account password.
1726	ClusterBootstrapAccountPassword *string `json:"clusterBootstrapAccountPassword,omitempty"`
1727	// ClusterOperatorAccountPassword - Cluster operator account password.
1728	ClusterOperatorAccountPassword *string `json:"clusterOperatorAccountPassword,omitempty"`
1729	// SQLServiceAccountPassword - SQL service account password.
1730	SQLServiceAccountPassword *string `json:"sqlServiceAccountPassword,omitempty"`
1731}
1732
1733// WsfcDomainProfile active Directory account details to operate Windows Server Failover Cluster.
1734type WsfcDomainProfile struct {
1735	// DomainFqdn - Fully qualified name of the domain.
1736	DomainFqdn *string `json:"domainFqdn,omitempty"`
1737	// OuPath - Organizational Unit path in which the nodes and cluster will be present.
1738	OuPath *string `json:"ouPath,omitempty"`
1739	// ClusterBootstrapAccount - Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain).
1740	ClusterBootstrapAccount *string `json:"clusterBootstrapAccount,omitempty"`
1741	// ClusterOperatorAccount - Account name used for operating cluster i.e. will be part of administrators group on all the participating virtual machines in the cluster.
1742	ClusterOperatorAccount *string `json:"clusterOperatorAccount,omitempty"`
1743	// SQLServiceAccount - Account name under which SQL service will run on all participating SQL virtual machines in the cluster.
1744	SQLServiceAccount *string `json:"sqlServiceAccount,omitempty"`
1745	// FileShareWitnessPath - Optional path for fileshare witness.
1746	FileShareWitnessPath *string `json:"fileShareWitnessPath,omitempty"`
1747	// StorageAccountURL - Fully qualified ARM resource id of the witness storage account.
1748	StorageAccountURL *string `json:"storageAccountUrl,omitempty"`
1749	// StorageAccountPrimaryKey - Primary key of the witness storage account.
1750	StorageAccountPrimaryKey *string `json:"storageAccountPrimaryKey,omitempty"`
1751}
1752