1package sql
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	"net/http"
30)
31
32// The package's fully qualified name.
33const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql"
34
35// AuthenticationType enumerates the values for authentication type.
36type AuthenticationType string
37
38const (
39	// ADPassword ...
40	ADPassword AuthenticationType = "ADPassword"
41	// SQL ...
42	SQL AuthenticationType = "SQL"
43)
44
45// PossibleAuthenticationTypeValues returns an array of possible values for the AuthenticationType const type.
46func PossibleAuthenticationTypeValues() []AuthenticationType {
47	return []AuthenticationType{ADPassword, SQL}
48}
49
50// BackupLongTermRetentionPolicyState enumerates the values for backup long term retention policy state.
51type BackupLongTermRetentionPolicyState string
52
53const (
54	// Disabled ...
55	Disabled BackupLongTermRetentionPolicyState = "Disabled"
56	// Enabled ...
57	Enabled BackupLongTermRetentionPolicyState = "Enabled"
58)
59
60// PossibleBackupLongTermRetentionPolicyStateValues returns an array of possible values for the BackupLongTermRetentionPolicyState const type.
61func PossibleBackupLongTermRetentionPolicyStateValues() []BackupLongTermRetentionPolicyState {
62	return []BackupLongTermRetentionPolicyState{Disabled, Enabled}
63}
64
65// BlobAuditingPolicyState enumerates the values for blob auditing policy state.
66type BlobAuditingPolicyState string
67
68const (
69	// BlobAuditingPolicyStateDisabled ...
70	BlobAuditingPolicyStateDisabled BlobAuditingPolicyState = "Disabled"
71	// BlobAuditingPolicyStateEnabled ...
72	BlobAuditingPolicyStateEnabled BlobAuditingPolicyState = "Enabled"
73)
74
75// PossibleBlobAuditingPolicyStateValues returns an array of possible values for the BlobAuditingPolicyState const type.
76func PossibleBlobAuditingPolicyStateValues() []BlobAuditingPolicyState {
77	return []BlobAuditingPolicyState{BlobAuditingPolicyStateDisabled, BlobAuditingPolicyStateEnabled}
78}
79
80// CapabilityStatus enumerates the values for capability status.
81type CapabilityStatus string
82
83const (
84	// CapabilityStatusAvailable ...
85	CapabilityStatusAvailable CapabilityStatus = "Available"
86	// CapabilityStatusDefault ...
87	CapabilityStatusDefault CapabilityStatus = "Default"
88	// CapabilityStatusDisabled ...
89	CapabilityStatusDisabled CapabilityStatus = "Disabled"
90	// CapabilityStatusVisible ...
91	CapabilityStatusVisible CapabilityStatus = "Visible"
92)
93
94// PossibleCapabilityStatusValues returns an array of possible values for the CapabilityStatus const type.
95func PossibleCapabilityStatusValues() []CapabilityStatus {
96	return []CapabilityStatus{CapabilityStatusAvailable, CapabilityStatusDefault, CapabilityStatusDisabled, CapabilityStatusVisible}
97}
98
99// CheckNameAvailabilityReason enumerates the values for check name availability reason.
100type CheckNameAvailabilityReason string
101
102const (
103	// AlreadyExists ...
104	AlreadyExists CheckNameAvailabilityReason = "AlreadyExists"
105	// Invalid ...
106	Invalid CheckNameAvailabilityReason = "Invalid"
107)
108
109// PossibleCheckNameAvailabilityReasonValues returns an array of possible values for the CheckNameAvailabilityReason const type.
110func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason {
111	return []CheckNameAvailabilityReason{AlreadyExists, Invalid}
112}
113
114// CreateMode enumerates the values for create mode.
115type CreateMode string
116
117const (
118	// Copy ...
119	Copy CreateMode = "Copy"
120	// Default ...
121	Default CreateMode = "Default"
122	// NonReadableSecondary ...
123	NonReadableSecondary CreateMode = "NonReadableSecondary"
124	// OnlineSecondary ...
125	OnlineSecondary CreateMode = "OnlineSecondary"
126	// PointInTimeRestore ...
127	PointInTimeRestore CreateMode = "PointInTimeRestore"
128	// Recovery ...
129	Recovery CreateMode = "Recovery"
130	// Restore ...
131	Restore CreateMode = "Restore"
132	// RestoreLongTermRetentionBackup ...
133	RestoreLongTermRetentionBackup CreateMode = "RestoreLongTermRetentionBackup"
134)
135
136// PossibleCreateModeValues returns an array of possible values for the CreateMode const type.
137func PossibleCreateModeValues() []CreateMode {
138	return []CreateMode{Copy, Default, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery, Restore, RestoreLongTermRetentionBackup}
139}
140
141// DatabaseEdition enumerates the values for database edition.
142type DatabaseEdition string
143
144const (
145	// Basic ...
146	Basic DatabaseEdition = "Basic"
147	// Business ...
148	Business DatabaseEdition = "Business"
149	// BusinessCritical ...
150	BusinessCritical DatabaseEdition = "BusinessCritical"
151	// DataWarehouse ...
152	DataWarehouse DatabaseEdition = "DataWarehouse"
153	// Free ...
154	Free DatabaseEdition = "Free"
155	// GeneralPurpose ...
156	GeneralPurpose DatabaseEdition = "GeneralPurpose"
157	// Hyperscale ...
158	Hyperscale DatabaseEdition = "Hyperscale"
159	// Premium ...
160	Premium DatabaseEdition = "Premium"
161	// PremiumRS ...
162	PremiumRS DatabaseEdition = "PremiumRS"
163	// Standard ...
164	Standard DatabaseEdition = "Standard"
165	// Stretch ...
166	Stretch DatabaseEdition = "Stretch"
167	// System ...
168	System DatabaseEdition = "System"
169	// System2 ...
170	System2 DatabaseEdition = "System2"
171	// Web ...
172	Web DatabaseEdition = "Web"
173)
174
175// PossibleDatabaseEditionValues returns an array of possible values for the DatabaseEdition const type.
176func PossibleDatabaseEditionValues() []DatabaseEdition {
177	return []DatabaseEdition{Basic, Business, BusinessCritical, DataWarehouse, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, Web}
178}
179
180// DataMaskingFunction enumerates the values for data masking function.
181type DataMaskingFunction string
182
183const (
184	// DataMaskingFunctionCCN ...
185	DataMaskingFunctionCCN DataMaskingFunction = "CCN"
186	// DataMaskingFunctionDefault ...
187	DataMaskingFunctionDefault DataMaskingFunction = "Default"
188	// DataMaskingFunctionEmail ...
189	DataMaskingFunctionEmail DataMaskingFunction = "Email"
190	// DataMaskingFunctionNumber ...
191	DataMaskingFunctionNumber DataMaskingFunction = "Number"
192	// DataMaskingFunctionSSN ...
193	DataMaskingFunctionSSN DataMaskingFunction = "SSN"
194	// DataMaskingFunctionText ...
195	DataMaskingFunctionText DataMaskingFunction = "Text"
196)
197
198// PossibleDataMaskingFunctionValues returns an array of possible values for the DataMaskingFunction const type.
199func PossibleDataMaskingFunctionValues() []DataMaskingFunction {
200	return []DataMaskingFunction{DataMaskingFunctionCCN, DataMaskingFunctionDefault, DataMaskingFunctionEmail, DataMaskingFunctionNumber, DataMaskingFunctionSSN, DataMaskingFunctionText}
201}
202
203// DataMaskingRuleState enumerates the values for data masking rule state.
204type DataMaskingRuleState string
205
206const (
207	// DataMaskingRuleStateDisabled ...
208	DataMaskingRuleStateDisabled DataMaskingRuleState = "Disabled"
209	// DataMaskingRuleStateEnabled ...
210	DataMaskingRuleStateEnabled DataMaskingRuleState = "Enabled"
211)
212
213// PossibleDataMaskingRuleStateValues returns an array of possible values for the DataMaskingRuleState const type.
214func PossibleDataMaskingRuleStateValues() []DataMaskingRuleState {
215	return []DataMaskingRuleState{DataMaskingRuleStateDisabled, DataMaskingRuleStateEnabled}
216}
217
218// DataMaskingState enumerates the values for data masking state.
219type DataMaskingState string
220
221const (
222	// DataMaskingStateDisabled ...
223	DataMaskingStateDisabled DataMaskingState = "Disabled"
224	// DataMaskingStateEnabled ...
225	DataMaskingStateEnabled DataMaskingState = "Enabled"
226)
227
228// PossibleDataMaskingStateValues returns an array of possible values for the DataMaskingState const type.
229func PossibleDataMaskingStateValues() []DataMaskingState {
230	return []DataMaskingState{DataMaskingStateDisabled, DataMaskingStateEnabled}
231}
232
233// ElasticPoolEdition enumerates the values for elastic pool edition.
234type ElasticPoolEdition string
235
236const (
237	// ElasticPoolEditionBasic ...
238	ElasticPoolEditionBasic ElasticPoolEdition = "Basic"
239	// ElasticPoolEditionBusinessCritical ...
240	ElasticPoolEditionBusinessCritical ElasticPoolEdition = "BusinessCritical"
241	// ElasticPoolEditionGeneralPurpose ...
242	ElasticPoolEditionGeneralPurpose ElasticPoolEdition = "GeneralPurpose"
243	// ElasticPoolEditionPremium ...
244	ElasticPoolEditionPremium ElasticPoolEdition = "Premium"
245	// ElasticPoolEditionStandard ...
246	ElasticPoolEditionStandard ElasticPoolEdition = "Standard"
247)
248
249// PossibleElasticPoolEditionValues returns an array of possible values for the ElasticPoolEdition const type.
250func PossibleElasticPoolEditionValues() []ElasticPoolEdition {
251	return []ElasticPoolEdition{ElasticPoolEditionBasic, ElasticPoolEditionBusinessCritical, ElasticPoolEditionGeneralPurpose, ElasticPoolEditionPremium, ElasticPoolEditionStandard}
252}
253
254// ElasticPoolState enumerates the values for elastic pool state.
255type ElasticPoolState string
256
257const (
258	// ElasticPoolStateCreating ...
259	ElasticPoolStateCreating ElasticPoolState = "Creating"
260	// ElasticPoolStateDisabled ...
261	ElasticPoolStateDisabled ElasticPoolState = "Disabled"
262	// ElasticPoolStateReady ...
263	ElasticPoolStateReady ElasticPoolState = "Ready"
264)
265
266// PossibleElasticPoolStateValues returns an array of possible values for the ElasticPoolState const type.
267func PossibleElasticPoolStateValues() []ElasticPoolState {
268	return []ElasticPoolState{ElasticPoolStateCreating, ElasticPoolStateDisabled, ElasticPoolStateReady}
269}
270
271// FailoverGroupReplicationRole enumerates the values for failover group replication role.
272type FailoverGroupReplicationRole string
273
274const (
275	// Primary ...
276	Primary FailoverGroupReplicationRole = "Primary"
277	// Secondary ...
278	Secondary FailoverGroupReplicationRole = "Secondary"
279)
280
281// PossibleFailoverGroupReplicationRoleValues returns an array of possible values for the FailoverGroupReplicationRole const type.
282func PossibleFailoverGroupReplicationRoleValues() []FailoverGroupReplicationRole {
283	return []FailoverGroupReplicationRole{Primary, Secondary}
284}
285
286// GeoBackupPolicyState enumerates the values for geo backup policy state.
287type GeoBackupPolicyState string
288
289const (
290	// GeoBackupPolicyStateDisabled ...
291	GeoBackupPolicyStateDisabled GeoBackupPolicyState = "Disabled"
292	// GeoBackupPolicyStateEnabled ...
293	GeoBackupPolicyStateEnabled GeoBackupPolicyState = "Enabled"
294)
295
296// PossibleGeoBackupPolicyStateValues returns an array of possible values for the GeoBackupPolicyState const type.
297func PossibleGeoBackupPolicyStateValues() []GeoBackupPolicyState {
298	return []GeoBackupPolicyState{GeoBackupPolicyStateDisabled, GeoBackupPolicyStateEnabled}
299}
300
301// IdentityType enumerates the values for identity type.
302type IdentityType string
303
304const (
305	// SystemAssigned ...
306	SystemAssigned IdentityType = "SystemAssigned"
307)
308
309// PossibleIdentityTypeValues returns an array of possible values for the IdentityType const type.
310func PossibleIdentityTypeValues() []IdentityType {
311	return []IdentityType{SystemAssigned}
312}
313
314// ManagedInstanceLicenseType enumerates the values for managed instance license type.
315type ManagedInstanceLicenseType string
316
317const (
318	// BasePrice ...
319	BasePrice ManagedInstanceLicenseType = "BasePrice"
320	// LicenseIncluded ...
321	LicenseIncluded ManagedInstanceLicenseType = "LicenseIncluded"
322)
323
324// PossibleManagedInstanceLicenseTypeValues returns an array of possible values for the ManagedInstanceLicenseType const type.
325func PossibleManagedInstanceLicenseTypeValues() []ManagedInstanceLicenseType {
326	return []ManagedInstanceLicenseType{BasePrice, LicenseIncluded}
327}
328
329// ManagedInstanceProxyOverride enumerates the values for managed instance proxy override.
330type ManagedInstanceProxyOverride string
331
332const (
333	// ManagedInstanceProxyOverrideDefault ...
334	ManagedInstanceProxyOverrideDefault ManagedInstanceProxyOverride = "Default"
335	// ManagedInstanceProxyOverrideProxy ...
336	ManagedInstanceProxyOverrideProxy ManagedInstanceProxyOverride = "Proxy"
337	// ManagedInstanceProxyOverrideRedirect ...
338	ManagedInstanceProxyOverrideRedirect ManagedInstanceProxyOverride = "Redirect"
339)
340
341// PossibleManagedInstanceProxyOverrideValues returns an array of possible values for the ManagedInstanceProxyOverride const type.
342func PossibleManagedInstanceProxyOverrideValues() []ManagedInstanceProxyOverride {
343	return []ManagedInstanceProxyOverride{ManagedInstanceProxyOverrideDefault, ManagedInstanceProxyOverrideProxy, ManagedInstanceProxyOverrideRedirect}
344}
345
346// ManagedServerCreateMode enumerates the values for managed server create mode.
347type ManagedServerCreateMode string
348
349const (
350	// ManagedServerCreateModeDefault ...
351	ManagedServerCreateModeDefault ManagedServerCreateMode = "Default"
352	// ManagedServerCreateModePointInTimeRestore ...
353	ManagedServerCreateModePointInTimeRestore ManagedServerCreateMode = "PointInTimeRestore"
354)
355
356// PossibleManagedServerCreateModeValues returns an array of possible values for the ManagedServerCreateMode const type.
357func PossibleManagedServerCreateModeValues() []ManagedServerCreateMode {
358	return []ManagedServerCreateMode{ManagedServerCreateModeDefault, ManagedServerCreateModePointInTimeRestore}
359}
360
361// MaxSizeUnits enumerates the values for max size units.
362type MaxSizeUnits string
363
364const (
365	// Gigabytes ...
366	Gigabytes MaxSizeUnits = "Gigabytes"
367	// Megabytes ...
368	Megabytes MaxSizeUnits = "Megabytes"
369	// Petabytes ...
370	Petabytes MaxSizeUnits = "Petabytes"
371	// Terabytes ...
372	Terabytes MaxSizeUnits = "Terabytes"
373)
374
375// PossibleMaxSizeUnitsValues returns an array of possible values for the MaxSizeUnits const type.
376func PossibleMaxSizeUnitsValues() []MaxSizeUnits {
377	return []MaxSizeUnits{Gigabytes, Megabytes, Petabytes, Terabytes}
378}
379
380// OperationOrigin enumerates the values for operation origin.
381type OperationOrigin string
382
383const (
384	// OperationOriginSystem ...
385	OperationOriginSystem OperationOrigin = "system"
386	// OperationOriginUser ...
387	OperationOriginUser OperationOrigin = "user"
388)
389
390// PossibleOperationOriginValues returns an array of possible values for the OperationOrigin const type.
391func PossibleOperationOriginValues() []OperationOrigin {
392	return []OperationOrigin{OperationOriginSystem, OperationOriginUser}
393}
394
395// PerformanceLevelUnit enumerates the values for performance level unit.
396type PerformanceLevelUnit string
397
398const (
399	// DTU ...
400	DTU PerformanceLevelUnit = "DTU"
401)
402
403// PossiblePerformanceLevelUnitValues returns an array of possible values for the PerformanceLevelUnit const type.
404func PossiblePerformanceLevelUnitValues() []PerformanceLevelUnit {
405	return []PerformanceLevelUnit{DTU}
406}
407
408// PrimaryAggregationType enumerates the values for primary aggregation type.
409type PrimaryAggregationType string
410
411const (
412	// Average ...
413	Average PrimaryAggregationType = "Average"
414	// Count ...
415	Count PrimaryAggregationType = "Count"
416	// Maximum ...
417	Maximum PrimaryAggregationType = "Maximum"
418	// Minimum ...
419	Minimum PrimaryAggregationType = "Minimum"
420	// None ...
421	None PrimaryAggregationType = "None"
422	// Total ...
423	Total PrimaryAggregationType = "Total"
424)
425
426// PossiblePrimaryAggregationTypeValues returns an array of possible values for the PrimaryAggregationType const type.
427func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType {
428	return []PrimaryAggregationType{Average, Count, Maximum, Minimum, None, Total}
429}
430
431// ReadOnlyEndpointFailoverPolicy enumerates the values for read only endpoint failover policy.
432type ReadOnlyEndpointFailoverPolicy string
433
434const (
435	// ReadOnlyEndpointFailoverPolicyDisabled ...
436	ReadOnlyEndpointFailoverPolicyDisabled ReadOnlyEndpointFailoverPolicy = "Disabled"
437	// ReadOnlyEndpointFailoverPolicyEnabled ...
438	ReadOnlyEndpointFailoverPolicyEnabled ReadOnlyEndpointFailoverPolicy = "Enabled"
439)
440
441// PossibleReadOnlyEndpointFailoverPolicyValues returns an array of possible values for the ReadOnlyEndpointFailoverPolicy const type.
442func PossibleReadOnlyEndpointFailoverPolicyValues() []ReadOnlyEndpointFailoverPolicy {
443	return []ReadOnlyEndpointFailoverPolicy{ReadOnlyEndpointFailoverPolicyDisabled, ReadOnlyEndpointFailoverPolicyEnabled}
444}
445
446// ReadScale enumerates the values for read scale.
447type ReadScale string
448
449const (
450	// ReadScaleDisabled ...
451	ReadScaleDisabled ReadScale = "Disabled"
452	// ReadScaleEnabled ...
453	ReadScaleEnabled ReadScale = "Enabled"
454)
455
456// PossibleReadScaleValues returns an array of possible values for the ReadScale const type.
457func PossibleReadScaleValues() []ReadScale {
458	return []ReadScale{ReadScaleDisabled, ReadScaleEnabled}
459}
460
461// ReadWriteEndpointFailoverPolicy enumerates the values for read write endpoint failover policy.
462type ReadWriteEndpointFailoverPolicy string
463
464const (
465	// Automatic ...
466	Automatic ReadWriteEndpointFailoverPolicy = "Automatic"
467	// Manual ...
468	Manual ReadWriteEndpointFailoverPolicy = "Manual"
469)
470
471// PossibleReadWriteEndpointFailoverPolicyValues returns an array of possible values for the ReadWriteEndpointFailoverPolicy const type.
472func PossibleReadWriteEndpointFailoverPolicyValues() []ReadWriteEndpointFailoverPolicy {
473	return []ReadWriteEndpointFailoverPolicy{Automatic, Manual}
474}
475
476// RecommendedIndexAction enumerates the values for recommended index action.
477type RecommendedIndexAction string
478
479const (
480	// Create ...
481	Create RecommendedIndexAction = "Create"
482	// Drop ...
483	Drop RecommendedIndexAction = "Drop"
484	// Rebuild ...
485	Rebuild RecommendedIndexAction = "Rebuild"
486)
487
488// PossibleRecommendedIndexActionValues returns an array of possible values for the RecommendedIndexAction const type.
489func PossibleRecommendedIndexActionValues() []RecommendedIndexAction {
490	return []RecommendedIndexAction{Create, Drop, Rebuild}
491}
492
493// RecommendedIndexState enumerates the values for recommended index state.
494type RecommendedIndexState string
495
496const (
497	// Active ...
498	Active RecommendedIndexState = "Active"
499	// Blocked ...
500	Blocked RecommendedIndexState = "Blocked"
501	// Executing ...
502	Executing RecommendedIndexState = "Executing"
503	// Expired ...
504	Expired RecommendedIndexState = "Expired"
505	// Ignored ...
506	Ignored RecommendedIndexState = "Ignored"
507	// Pending ...
508	Pending RecommendedIndexState = "Pending"
509	// PendingRevert ...
510	PendingRevert RecommendedIndexState = "Pending Revert"
511	// Reverted ...
512	Reverted RecommendedIndexState = "Reverted"
513	// Reverting ...
514	Reverting RecommendedIndexState = "Reverting"
515	// Success ...
516	Success RecommendedIndexState = "Success"
517	// Verifying ...
518	Verifying RecommendedIndexState = "Verifying"
519)
520
521// PossibleRecommendedIndexStateValues returns an array of possible values for the RecommendedIndexState const type.
522func PossibleRecommendedIndexStateValues() []RecommendedIndexState {
523	return []RecommendedIndexState{Active, Blocked, Executing, Expired, Ignored, Pending, PendingRevert, Reverted, Reverting, Success, Verifying}
524}
525
526// RecommendedIndexType enumerates the values for recommended index type.
527type RecommendedIndexType string
528
529const (
530	// CLUSTERED ...
531	CLUSTERED RecommendedIndexType = "CLUSTERED"
532	// CLUSTEREDCOLUMNSTORE ...
533	CLUSTEREDCOLUMNSTORE RecommendedIndexType = "CLUSTERED COLUMNSTORE"
534	// COLUMNSTORE ...
535	COLUMNSTORE RecommendedIndexType = "COLUMNSTORE"
536	// NONCLUSTERED ...
537	NONCLUSTERED RecommendedIndexType = "NONCLUSTERED"
538)
539
540// PossibleRecommendedIndexTypeValues returns an array of possible values for the RecommendedIndexType const type.
541func PossibleRecommendedIndexTypeValues() []RecommendedIndexType {
542	return []RecommendedIndexType{CLUSTERED, CLUSTEREDCOLUMNSTORE, COLUMNSTORE, NONCLUSTERED}
543}
544
545// ReplicationRole enumerates the values for replication role.
546type ReplicationRole string
547
548const (
549	// ReplicationRoleCopy ...
550	ReplicationRoleCopy ReplicationRole = "Copy"
551	// ReplicationRoleNonReadableSecondary ...
552	ReplicationRoleNonReadableSecondary ReplicationRole = "NonReadableSecondary"
553	// ReplicationRolePrimary ...
554	ReplicationRolePrimary ReplicationRole = "Primary"
555	// ReplicationRoleSecondary ...
556	ReplicationRoleSecondary ReplicationRole = "Secondary"
557	// ReplicationRoleSource ...
558	ReplicationRoleSource ReplicationRole = "Source"
559)
560
561// PossibleReplicationRoleValues returns an array of possible values for the ReplicationRole const type.
562func PossibleReplicationRoleValues() []ReplicationRole {
563	return []ReplicationRole{ReplicationRoleCopy, ReplicationRoleNonReadableSecondary, ReplicationRolePrimary, ReplicationRoleSecondary, ReplicationRoleSource}
564}
565
566// ReplicationState enumerates the values for replication state.
567type ReplicationState string
568
569const (
570	// CATCHUP ...
571	CATCHUP ReplicationState = "CATCH_UP"
572	// PENDING ...
573	PENDING ReplicationState = "PENDING"
574	// SEEDING ...
575	SEEDING ReplicationState = "SEEDING"
576	// SUSPENDED ...
577	SUSPENDED ReplicationState = "SUSPENDED"
578)
579
580// PossibleReplicationStateValues returns an array of possible values for the ReplicationState const type.
581func PossibleReplicationStateValues() []ReplicationState {
582	return []ReplicationState{CATCHUP, PENDING, SEEDING, SUSPENDED}
583}
584
585// RestorePointType enumerates the values for restore point type.
586type RestorePointType string
587
588const (
589	// CONTINUOUS ...
590	CONTINUOUS RestorePointType = "CONTINUOUS"
591	// DISCRETE ...
592	DISCRETE RestorePointType = "DISCRETE"
593)
594
595// PossibleRestorePointTypeValues returns an array of possible values for the RestorePointType const type.
596func PossibleRestorePointTypeValues() []RestorePointType {
597	return []RestorePointType{CONTINUOUS, DISCRETE}
598}
599
600// SampleName enumerates the values for sample name.
601type SampleName string
602
603const (
604	// AdventureWorksLT ...
605	AdventureWorksLT SampleName = "AdventureWorksLT"
606)
607
608// PossibleSampleNameValues returns an array of possible values for the SampleName const type.
609func PossibleSampleNameValues() []SampleName {
610	return []SampleName{AdventureWorksLT}
611}
612
613// SecurityAlertPolicyEmailAccountAdmins enumerates the values for security alert policy email account admins.
614type SecurityAlertPolicyEmailAccountAdmins string
615
616const (
617	// SecurityAlertPolicyEmailAccountAdminsDisabled ...
618	SecurityAlertPolicyEmailAccountAdminsDisabled SecurityAlertPolicyEmailAccountAdmins = "Disabled"
619	// SecurityAlertPolicyEmailAccountAdminsEnabled ...
620	SecurityAlertPolicyEmailAccountAdminsEnabled SecurityAlertPolicyEmailAccountAdmins = "Enabled"
621)
622
623// PossibleSecurityAlertPolicyEmailAccountAdminsValues returns an array of possible values for the SecurityAlertPolicyEmailAccountAdmins const type.
624func PossibleSecurityAlertPolicyEmailAccountAdminsValues() []SecurityAlertPolicyEmailAccountAdmins {
625	return []SecurityAlertPolicyEmailAccountAdmins{SecurityAlertPolicyEmailAccountAdminsDisabled, SecurityAlertPolicyEmailAccountAdminsEnabled}
626}
627
628// SecurityAlertPolicyState enumerates the values for security alert policy state.
629type SecurityAlertPolicyState string
630
631const (
632	// SecurityAlertPolicyStateDisabled ...
633	SecurityAlertPolicyStateDisabled SecurityAlertPolicyState = "Disabled"
634	// SecurityAlertPolicyStateEnabled ...
635	SecurityAlertPolicyStateEnabled SecurityAlertPolicyState = "Enabled"
636	// SecurityAlertPolicyStateNew ...
637	SecurityAlertPolicyStateNew SecurityAlertPolicyState = "New"
638)
639
640// PossibleSecurityAlertPolicyStateValues returns an array of possible values for the SecurityAlertPolicyState const type.
641func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState {
642	return []SecurityAlertPolicyState{SecurityAlertPolicyStateDisabled, SecurityAlertPolicyStateEnabled, SecurityAlertPolicyStateNew}
643}
644
645// SecurityAlertPolicyUseServerDefault enumerates the values for security alert policy use server default.
646type SecurityAlertPolicyUseServerDefault string
647
648const (
649	// SecurityAlertPolicyUseServerDefaultDisabled ...
650	SecurityAlertPolicyUseServerDefaultDisabled SecurityAlertPolicyUseServerDefault = "Disabled"
651	// SecurityAlertPolicyUseServerDefaultEnabled ...
652	SecurityAlertPolicyUseServerDefaultEnabled SecurityAlertPolicyUseServerDefault = "Enabled"
653)
654
655// PossibleSecurityAlertPolicyUseServerDefaultValues returns an array of possible values for the SecurityAlertPolicyUseServerDefault const type.
656func PossibleSecurityAlertPolicyUseServerDefaultValues() []SecurityAlertPolicyUseServerDefault {
657	return []SecurityAlertPolicyUseServerDefault{SecurityAlertPolicyUseServerDefaultDisabled, SecurityAlertPolicyUseServerDefaultEnabled}
658}
659
660// ServerConnectionType enumerates the values for server connection type.
661type ServerConnectionType string
662
663const (
664	// ServerConnectionTypeDefault ...
665	ServerConnectionTypeDefault ServerConnectionType = "Default"
666	// ServerConnectionTypeProxy ...
667	ServerConnectionTypeProxy ServerConnectionType = "Proxy"
668	// ServerConnectionTypeRedirect ...
669	ServerConnectionTypeRedirect ServerConnectionType = "Redirect"
670)
671
672// PossibleServerConnectionTypeValues returns an array of possible values for the ServerConnectionType const type.
673func PossibleServerConnectionTypeValues() []ServerConnectionType {
674	return []ServerConnectionType{ServerConnectionTypeDefault, ServerConnectionTypeProxy, ServerConnectionTypeRedirect}
675}
676
677// ServerKeyType enumerates the values for server key type.
678type ServerKeyType string
679
680const (
681	// AzureKeyVault ...
682	AzureKeyVault ServerKeyType = "AzureKeyVault"
683	// ServiceManaged ...
684	ServiceManaged ServerKeyType = "ServiceManaged"
685)
686
687// PossibleServerKeyTypeValues returns an array of possible values for the ServerKeyType const type.
688func PossibleServerKeyTypeValues() []ServerKeyType {
689	return []ServerKeyType{AzureKeyVault, ServiceManaged}
690}
691
692// ServiceObjectiveName enumerates the values for service objective name.
693type ServiceObjectiveName string
694
695const (
696	// ServiceObjectiveNameBasic ...
697	ServiceObjectiveNameBasic ServiceObjectiveName = "Basic"
698	// ServiceObjectiveNameDS100 ...
699	ServiceObjectiveNameDS100 ServiceObjectiveName = "DS100"
700	// ServiceObjectiveNameDS1000 ...
701	ServiceObjectiveNameDS1000 ServiceObjectiveName = "DS1000"
702	// ServiceObjectiveNameDS1200 ...
703	ServiceObjectiveNameDS1200 ServiceObjectiveName = "DS1200"
704	// ServiceObjectiveNameDS1500 ...
705	ServiceObjectiveNameDS1500 ServiceObjectiveName = "DS1500"
706	// ServiceObjectiveNameDS200 ...
707	ServiceObjectiveNameDS200 ServiceObjectiveName = "DS200"
708	// ServiceObjectiveNameDS2000 ...
709	ServiceObjectiveNameDS2000 ServiceObjectiveName = "DS2000"
710	// ServiceObjectiveNameDS300 ...
711	ServiceObjectiveNameDS300 ServiceObjectiveName = "DS300"
712	// ServiceObjectiveNameDS400 ...
713	ServiceObjectiveNameDS400 ServiceObjectiveName = "DS400"
714	// ServiceObjectiveNameDS500 ...
715	ServiceObjectiveNameDS500 ServiceObjectiveName = "DS500"
716	// ServiceObjectiveNameDS600 ...
717	ServiceObjectiveNameDS600 ServiceObjectiveName = "DS600"
718	// ServiceObjectiveNameDW100 ...
719	ServiceObjectiveNameDW100 ServiceObjectiveName = "DW100"
720	// ServiceObjectiveNameDW1000 ...
721	ServiceObjectiveNameDW1000 ServiceObjectiveName = "DW1000"
722	// ServiceObjectiveNameDW10000c ...
723	ServiceObjectiveNameDW10000c ServiceObjectiveName = "DW10000c"
724	// ServiceObjectiveNameDW1000c ...
725	ServiceObjectiveNameDW1000c ServiceObjectiveName = "DW1000c"
726	// ServiceObjectiveNameDW1200 ...
727	ServiceObjectiveNameDW1200 ServiceObjectiveName = "DW1200"
728	// ServiceObjectiveNameDW1500 ...
729	ServiceObjectiveNameDW1500 ServiceObjectiveName = "DW1500"
730	// ServiceObjectiveNameDW15000c ...
731	ServiceObjectiveNameDW15000c ServiceObjectiveName = "DW15000c"
732	// ServiceObjectiveNameDW1500c ...
733	ServiceObjectiveNameDW1500c ServiceObjectiveName = "DW1500c"
734	// ServiceObjectiveNameDW200 ...
735	ServiceObjectiveNameDW200 ServiceObjectiveName = "DW200"
736	// ServiceObjectiveNameDW2000 ...
737	ServiceObjectiveNameDW2000 ServiceObjectiveName = "DW2000"
738	// ServiceObjectiveNameDW2000c ...
739	ServiceObjectiveNameDW2000c ServiceObjectiveName = "DW2000c"
740	// ServiceObjectiveNameDW2500c ...
741	ServiceObjectiveNameDW2500c ServiceObjectiveName = "DW2500c"
742	// ServiceObjectiveNameDW300 ...
743	ServiceObjectiveNameDW300 ServiceObjectiveName = "DW300"
744	// ServiceObjectiveNameDW3000 ...
745	ServiceObjectiveNameDW3000 ServiceObjectiveName = "DW3000"
746	// ServiceObjectiveNameDW30000c ...
747	ServiceObjectiveNameDW30000c ServiceObjectiveName = "DW30000c"
748	// ServiceObjectiveNameDW3000c ...
749	ServiceObjectiveNameDW3000c ServiceObjectiveName = "DW3000c"
750	// ServiceObjectiveNameDW400 ...
751	ServiceObjectiveNameDW400 ServiceObjectiveName = "DW400"
752	// ServiceObjectiveNameDW500 ...
753	ServiceObjectiveNameDW500 ServiceObjectiveName = "DW500"
754	// ServiceObjectiveNameDW5000c ...
755	ServiceObjectiveNameDW5000c ServiceObjectiveName = "DW5000c"
756	// ServiceObjectiveNameDW600 ...
757	ServiceObjectiveNameDW600 ServiceObjectiveName = "DW600"
758	// ServiceObjectiveNameDW6000 ...
759	ServiceObjectiveNameDW6000 ServiceObjectiveName = "DW6000"
760	// ServiceObjectiveNameDW6000c ...
761	ServiceObjectiveNameDW6000c ServiceObjectiveName = "DW6000c"
762	// ServiceObjectiveNameDW7500c ...
763	ServiceObjectiveNameDW7500c ServiceObjectiveName = "DW7500c"
764	// ServiceObjectiveNameElasticPool ...
765	ServiceObjectiveNameElasticPool ServiceObjectiveName = "ElasticPool"
766	// ServiceObjectiveNameFree ...
767	ServiceObjectiveNameFree ServiceObjectiveName = "Free"
768	// ServiceObjectiveNameP1 ...
769	ServiceObjectiveNameP1 ServiceObjectiveName = "P1"
770	// ServiceObjectiveNameP11 ...
771	ServiceObjectiveNameP11 ServiceObjectiveName = "P11"
772	// ServiceObjectiveNameP15 ...
773	ServiceObjectiveNameP15 ServiceObjectiveName = "P15"
774	// ServiceObjectiveNameP2 ...
775	ServiceObjectiveNameP2 ServiceObjectiveName = "P2"
776	// ServiceObjectiveNameP3 ...
777	ServiceObjectiveNameP3 ServiceObjectiveName = "P3"
778	// ServiceObjectiveNameP4 ...
779	ServiceObjectiveNameP4 ServiceObjectiveName = "P4"
780	// ServiceObjectiveNameP6 ...
781	ServiceObjectiveNameP6 ServiceObjectiveName = "P6"
782	// ServiceObjectiveNamePRS1 ...
783	ServiceObjectiveNamePRS1 ServiceObjectiveName = "PRS1"
784	// ServiceObjectiveNamePRS2 ...
785	ServiceObjectiveNamePRS2 ServiceObjectiveName = "PRS2"
786	// ServiceObjectiveNamePRS4 ...
787	ServiceObjectiveNamePRS4 ServiceObjectiveName = "PRS4"
788	// ServiceObjectiveNamePRS6 ...
789	ServiceObjectiveNamePRS6 ServiceObjectiveName = "PRS6"
790	// ServiceObjectiveNameS0 ...
791	ServiceObjectiveNameS0 ServiceObjectiveName = "S0"
792	// ServiceObjectiveNameS1 ...
793	ServiceObjectiveNameS1 ServiceObjectiveName = "S1"
794	// ServiceObjectiveNameS12 ...
795	ServiceObjectiveNameS12 ServiceObjectiveName = "S12"
796	// ServiceObjectiveNameS2 ...
797	ServiceObjectiveNameS2 ServiceObjectiveName = "S2"
798	// ServiceObjectiveNameS3 ...
799	ServiceObjectiveNameS3 ServiceObjectiveName = "S3"
800	// ServiceObjectiveNameS4 ...
801	ServiceObjectiveNameS4 ServiceObjectiveName = "S4"
802	// ServiceObjectiveNameS6 ...
803	ServiceObjectiveNameS6 ServiceObjectiveName = "S6"
804	// ServiceObjectiveNameS7 ...
805	ServiceObjectiveNameS7 ServiceObjectiveName = "S7"
806	// ServiceObjectiveNameS9 ...
807	ServiceObjectiveNameS9 ServiceObjectiveName = "S9"
808	// ServiceObjectiveNameSystem ...
809	ServiceObjectiveNameSystem ServiceObjectiveName = "System"
810	// ServiceObjectiveNameSystem0 ...
811	ServiceObjectiveNameSystem0 ServiceObjectiveName = "System0"
812	// ServiceObjectiveNameSystem1 ...
813	ServiceObjectiveNameSystem1 ServiceObjectiveName = "System1"
814	// ServiceObjectiveNameSystem2 ...
815	ServiceObjectiveNameSystem2 ServiceObjectiveName = "System2"
816	// ServiceObjectiveNameSystem2L ...
817	ServiceObjectiveNameSystem2L ServiceObjectiveName = "System2L"
818	// ServiceObjectiveNameSystem3 ...
819	ServiceObjectiveNameSystem3 ServiceObjectiveName = "System3"
820	// ServiceObjectiveNameSystem3L ...
821	ServiceObjectiveNameSystem3L ServiceObjectiveName = "System3L"
822	// ServiceObjectiveNameSystem4 ...
823	ServiceObjectiveNameSystem4 ServiceObjectiveName = "System4"
824	// ServiceObjectiveNameSystem4L ...
825	ServiceObjectiveNameSystem4L ServiceObjectiveName = "System4L"
826)
827
828// PossibleServiceObjectiveNameValues returns an array of possible values for the ServiceObjectiveName const type.
829func PossibleServiceObjectiveNameValues() []ServiceObjectiveName {
830	return []ServiceObjectiveName{ServiceObjectiveNameBasic, ServiceObjectiveNameDS100, ServiceObjectiveNameDS1000, ServiceObjectiveNameDS1200, ServiceObjectiveNameDS1500, ServiceObjectiveNameDS200, ServiceObjectiveNameDS2000, ServiceObjectiveNameDS300, ServiceObjectiveNameDS400, ServiceObjectiveNameDS500, ServiceObjectiveNameDS600, ServiceObjectiveNameDW100, ServiceObjectiveNameDW1000, ServiceObjectiveNameDW10000c, ServiceObjectiveNameDW1000c, ServiceObjectiveNameDW1200, ServiceObjectiveNameDW1500, ServiceObjectiveNameDW15000c, ServiceObjectiveNameDW1500c, ServiceObjectiveNameDW200, ServiceObjectiveNameDW2000, ServiceObjectiveNameDW2000c, ServiceObjectiveNameDW2500c, ServiceObjectiveNameDW300, ServiceObjectiveNameDW3000, ServiceObjectiveNameDW30000c, ServiceObjectiveNameDW3000c, ServiceObjectiveNameDW400, ServiceObjectiveNameDW500, ServiceObjectiveNameDW5000c, ServiceObjectiveNameDW600, ServiceObjectiveNameDW6000, ServiceObjectiveNameDW6000c, ServiceObjectiveNameDW7500c, ServiceObjectiveNameElasticPool, ServiceObjectiveNameFree, ServiceObjectiveNameP1, ServiceObjectiveNameP11, ServiceObjectiveNameP15, ServiceObjectiveNameP2, ServiceObjectiveNameP3, ServiceObjectiveNameP4, ServiceObjectiveNameP6, ServiceObjectiveNamePRS1, ServiceObjectiveNamePRS2, ServiceObjectiveNamePRS4, ServiceObjectiveNamePRS6, ServiceObjectiveNameS0, ServiceObjectiveNameS1, ServiceObjectiveNameS12, ServiceObjectiveNameS2, ServiceObjectiveNameS3, ServiceObjectiveNameS4, ServiceObjectiveNameS6, ServiceObjectiveNameS7, ServiceObjectiveNameS9, ServiceObjectiveNameSystem, ServiceObjectiveNameSystem0, ServiceObjectiveNameSystem1, ServiceObjectiveNameSystem2, ServiceObjectiveNameSystem2L, ServiceObjectiveNameSystem3, ServiceObjectiveNameSystem3L, ServiceObjectiveNameSystem4, ServiceObjectiveNameSystem4L}
831}
832
833// StorageKeyType enumerates the values for storage key type.
834type StorageKeyType string
835
836const (
837	// SharedAccessKey ...
838	SharedAccessKey StorageKeyType = "SharedAccessKey"
839	// StorageAccessKey ...
840	StorageAccessKey StorageKeyType = "StorageAccessKey"
841)
842
843// PossibleStorageKeyTypeValues returns an array of possible values for the StorageKeyType const type.
844func PossibleStorageKeyTypeValues() []StorageKeyType {
845	return []StorageKeyType{SharedAccessKey, StorageAccessKey}
846}
847
848// SyncAgentState enumerates the values for sync agent state.
849type SyncAgentState string
850
851const (
852	// NeverConnected ...
853	NeverConnected SyncAgentState = "NeverConnected"
854	// Offline ...
855	Offline SyncAgentState = "Offline"
856	// Online ...
857	Online SyncAgentState = "Online"
858)
859
860// PossibleSyncAgentStateValues returns an array of possible values for the SyncAgentState const type.
861func PossibleSyncAgentStateValues() []SyncAgentState {
862	return []SyncAgentState{NeverConnected, Offline, Online}
863}
864
865// SyncConflictResolutionPolicy enumerates the values for sync conflict resolution policy.
866type SyncConflictResolutionPolicy string
867
868const (
869	// HubWin ...
870	HubWin SyncConflictResolutionPolicy = "HubWin"
871	// MemberWin ...
872	MemberWin SyncConflictResolutionPolicy = "MemberWin"
873)
874
875// PossibleSyncConflictResolutionPolicyValues returns an array of possible values for the SyncConflictResolutionPolicy const type.
876func PossibleSyncConflictResolutionPolicyValues() []SyncConflictResolutionPolicy {
877	return []SyncConflictResolutionPolicy{HubWin, MemberWin}
878}
879
880// SyncDirection enumerates the values for sync direction.
881type SyncDirection string
882
883const (
884	// Bidirectional ...
885	Bidirectional SyncDirection = "Bidirectional"
886	// OneWayHubToMember ...
887	OneWayHubToMember SyncDirection = "OneWayHubToMember"
888	// OneWayMemberToHub ...
889	OneWayMemberToHub SyncDirection = "OneWayMemberToHub"
890)
891
892// PossibleSyncDirectionValues returns an array of possible values for the SyncDirection const type.
893func PossibleSyncDirectionValues() []SyncDirection {
894	return []SyncDirection{Bidirectional, OneWayHubToMember, OneWayMemberToHub}
895}
896
897// SyncGroupLogType enumerates the values for sync group log type.
898type SyncGroupLogType string
899
900const (
901	// SyncGroupLogTypeAll ...
902	SyncGroupLogTypeAll SyncGroupLogType = "All"
903	// SyncGroupLogTypeError ...
904	SyncGroupLogTypeError SyncGroupLogType = "Error"
905	// SyncGroupLogTypeSuccess ...
906	SyncGroupLogTypeSuccess SyncGroupLogType = "Success"
907	// SyncGroupLogTypeWarning ...
908	SyncGroupLogTypeWarning SyncGroupLogType = "Warning"
909)
910
911// PossibleSyncGroupLogTypeValues returns an array of possible values for the SyncGroupLogType const type.
912func PossibleSyncGroupLogTypeValues() []SyncGroupLogType {
913	return []SyncGroupLogType{SyncGroupLogTypeAll, SyncGroupLogTypeError, SyncGroupLogTypeSuccess, SyncGroupLogTypeWarning}
914}
915
916// SyncGroupState enumerates the values for sync group state.
917type SyncGroupState string
918
919const (
920	// Error ...
921	Error SyncGroupState = "Error"
922	// Good ...
923	Good SyncGroupState = "Good"
924	// NotReady ...
925	NotReady SyncGroupState = "NotReady"
926	// Progressing ...
927	Progressing SyncGroupState = "Progressing"
928	// Warning ...
929	Warning SyncGroupState = "Warning"
930)
931
932// PossibleSyncGroupStateValues returns an array of possible values for the SyncGroupState const type.
933func PossibleSyncGroupStateValues() []SyncGroupState {
934	return []SyncGroupState{Error, Good, NotReady, Progressing, Warning}
935}
936
937// SyncMemberDbType enumerates the values for sync member db type.
938type SyncMemberDbType string
939
940const (
941	// AzureSQLDatabase ...
942	AzureSQLDatabase SyncMemberDbType = "AzureSqlDatabase"
943	// SQLServerDatabase ...
944	SQLServerDatabase SyncMemberDbType = "SqlServerDatabase"
945)
946
947// PossibleSyncMemberDbTypeValues returns an array of possible values for the SyncMemberDbType const type.
948func PossibleSyncMemberDbTypeValues() []SyncMemberDbType {
949	return []SyncMemberDbType{AzureSQLDatabase, SQLServerDatabase}
950}
951
952// SyncMemberState enumerates the values for sync member state.
953type SyncMemberState string
954
955const (
956	// DeProvisioned ...
957	DeProvisioned SyncMemberState = "DeProvisioned"
958	// DeProvisionFailed ...
959	DeProvisionFailed SyncMemberState = "DeProvisionFailed"
960	// DeProvisioning ...
961	DeProvisioning SyncMemberState = "DeProvisioning"
962	// DisabledBackupRestore ...
963	DisabledBackupRestore SyncMemberState = "DisabledBackupRestore"
964	// DisabledTombstoneCleanup ...
965	DisabledTombstoneCleanup SyncMemberState = "DisabledTombstoneCleanup"
966	// Provisioned ...
967	Provisioned SyncMemberState = "Provisioned"
968	// ProvisionFailed ...
969	ProvisionFailed SyncMemberState = "ProvisionFailed"
970	// Provisioning ...
971	Provisioning SyncMemberState = "Provisioning"
972	// ReprovisionFailed ...
973	ReprovisionFailed SyncMemberState = "ReprovisionFailed"
974	// Reprovisioning ...
975	Reprovisioning SyncMemberState = "Reprovisioning"
976	// SyncCancelled ...
977	SyncCancelled SyncMemberState = "SyncCancelled"
978	// SyncCancelling ...
979	SyncCancelling SyncMemberState = "SyncCancelling"
980	// SyncFailed ...
981	SyncFailed SyncMemberState = "SyncFailed"
982	// SyncInProgress ...
983	SyncInProgress SyncMemberState = "SyncInProgress"
984	// SyncSucceeded ...
985	SyncSucceeded SyncMemberState = "SyncSucceeded"
986	// SyncSucceededWithWarnings ...
987	SyncSucceededWithWarnings SyncMemberState = "SyncSucceededWithWarnings"
988	// UnProvisioned ...
989	UnProvisioned SyncMemberState = "UnProvisioned"
990	// UnReprovisioned ...
991	UnReprovisioned SyncMemberState = "UnReprovisioned"
992)
993
994// PossibleSyncMemberStateValues returns an array of possible values for the SyncMemberState const type.
995func PossibleSyncMemberStateValues() []SyncMemberState {
996	return []SyncMemberState{DeProvisioned, DeProvisionFailed, DeProvisioning, DisabledBackupRestore, DisabledTombstoneCleanup, Provisioned, ProvisionFailed, Provisioning, ReprovisionFailed, Reprovisioning, SyncCancelled, SyncCancelling, SyncFailed, SyncInProgress, SyncSucceeded, SyncSucceededWithWarnings, UnProvisioned, UnReprovisioned}
997}
998
999// TransparentDataEncryptionActivityStatus enumerates the values for transparent data encryption activity
1000// status.
1001type TransparentDataEncryptionActivityStatus string
1002
1003const (
1004	// Decrypting ...
1005	Decrypting TransparentDataEncryptionActivityStatus = "Decrypting"
1006	// Encrypting ...
1007	Encrypting TransparentDataEncryptionActivityStatus = "Encrypting"
1008)
1009
1010// PossibleTransparentDataEncryptionActivityStatusValues returns an array of possible values for the TransparentDataEncryptionActivityStatus const type.
1011func PossibleTransparentDataEncryptionActivityStatusValues() []TransparentDataEncryptionActivityStatus {
1012	return []TransparentDataEncryptionActivityStatus{Decrypting, Encrypting}
1013}
1014
1015// TransparentDataEncryptionStatus enumerates the values for transparent data encryption status.
1016type TransparentDataEncryptionStatus string
1017
1018const (
1019	// TransparentDataEncryptionStatusDisabled ...
1020	TransparentDataEncryptionStatusDisabled TransparentDataEncryptionStatus = "Disabled"
1021	// TransparentDataEncryptionStatusEnabled ...
1022	TransparentDataEncryptionStatusEnabled TransparentDataEncryptionStatus = "Enabled"
1023)
1024
1025// PossibleTransparentDataEncryptionStatusValues returns an array of possible values for the TransparentDataEncryptionStatus const type.
1026func PossibleTransparentDataEncryptionStatusValues() []TransparentDataEncryptionStatus {
1027	return []TransparentDataEncryptionStatus{TransparentDataEncryptionStatusDisabled, TransparentDataEncryptionStatusEnabled}
1028}
1029
1030// UnitDefinitionType enumerates the values for unit definition type.
1031type UnitDefinitionType string
1032
1033const (
1034	// UnitDefinitionTypeBytes ...
1035	UnitDefinitionTypeBytes UnitDefinitionType = "Bytes"
1036	// UnitDefinitionTypeBytesPerSecond ...
1037	UnitDefinitionTypeBytesPerSecond UnitDefinitionType = "BytesPerSecond"
1038	// UnitDefinitionTypeCount ...
1039	UnitDefinitionTypeCount UnitDefinitionType = "Count"
1040	// UnitDefinitionTypeCountPerSecond ...
1041	UnitDefinitionTypeCountPerSecond UnitDefinitionType = "CountPerSecond"
1042	// UnitDefinitionTypePercent ...
1043	UnitDefinitionTypePercent UnitDefinitionType = "Percent"
1044	// UnitDefinitionTypeSeconds ...
1045	UnitDefinitionTypeSeconds UnitDefinitionType = "Seconds"
1046)
1047
1048// PossibleUnitDefinitionTypeValues returns an array of possible values for the UnitDefinitionType const type.
1049func PossibleUnitDefinitionTypeValues() []UnitDefinitionType {
1050	return []UnitDefinitionType{UnitDefinitionTypeBytes, UnitDefinitionTypeBytesPerSecond, UnitDefinitionTypeCount, UnitDefinitionTypeCountPerSecond, UnitDefinitionTypePercent, UnitDefinitionTypeSeconds}
1051}
1052
1053// UnitType enumerates the values for unit type.
1054type UnitType string
1055
1056const (
1057	// UnitTypeBytes ...
1058	UnitTypeBytes UnitType = "bytes"
1059	// UnitTypeBytesPerSecond ...
1060	UnitTypeBytesPerSecond UnitType = "bytesPerSecond"
1061	// UnitTypeCount ...
1062	UnitTypeCount UnitType = "count"
1063	// UnitTypeCountPerSecond ...
1064	UnitTypeCountPerSecond UnitType = "countPerSecond"
1065	// UnitTypePercent ...
1066	UnitTypePercent UnitType = "percent"
1067	// UnitTypeSeconds ...
1068	UnitTypeSeconds UnitType = "seconds"
1069)
1070
1071// PossibleUnitTypeValues returns an array of possible values for the UnitType const type.
1072func PossibleUnitTypeValues() []UnitType {
1073	return []UnitType{UnitTypeBytes, UnitTypeBytesPerSecond, UnitTypeCount, UnitTypeCountPerSecond, UnitTypePercent, UnitTypeSeconds}
1074}
1075
1076// VirtualNetworkRuleState enumerates the values for virtual network rule state.
1077type VirtualNetworkRuleState string
1078
1079const (
1080	// Deleting ...
1081	Deleting VirtualNetworkRuleState = "Deleting"
1082	// Initializing ...
1083	Initializing VirtualNetworkRuleState = "Initializing"
1084	// InProgress ...
1085	InProgress VirtualNetworkRuleState = "InProgress"
1086	// Ready ...
1087	Ready VirtualNetworkRuleState = "Ready"
1088	// Unknown ...
1089	Unknown VirtualNetworkRuleState = "Unknown"
1090)
1091
1092// PossibleVirtualNetworkRuleStateValues returns an array of possible values for the VirtualNetworkRuleState const type.
1093func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState {
1094	return []VirtualNetworkRuleState{Deleting, Initializing, InProgress, Ready, Unknown}
1095}
1096
1097// BackupLongTermRetentionPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the
1098// results of a long-running operation.
1099type BackupLongTermRetentionPoliciesCreateOrUpdateFuture struct {
1100	azure.Future
1101}
1102
1103// Result returns the result of the asynchronous operation.
1104// If the operation has not completed it will return an error.
1105func (future *BackupLongTermRetentionPoliciesCreateOrUpdateFuture) Result(client BackupLongTermRetentionPoliciesClient) (bltrp BackupLongTermRetentionPolicy, err error) {
1106	var done bool
1107	done, err = future.DoneWithContext(context.Background(), client)
1108	if err != nil {
1109		err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1110		return
1111	}
1112	if !done {
1113		err = azure.NewAsyncOpIncompleteError("sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture")
1114		return
1115	}
1116	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1117	if bltrp.Response.Response, err = future.GetResult(sender); err == nil && bltrp.Response.Response.StatusCode != http.StatusNoContent {
1118		bltrp, err = client.CreateOrUpdateResponder(bltrp.Response.Response)
1119		if err != nil {
1120			err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesCreateOrUpdateFuture", "Result", bltrp.Response.Response, "Failure responding to request")
1121		}
1122	}
1123	return
1124}
1125
1126// BackupLongTermRetentionPolicy a backup long term retention policy
1127type BackupLongTermRetentionPolicy struct {
1128	autorest.Response `json:"-"`
1129	// Location - READ-ONLY; The geo-location where the resource lives
1130	Location *string `json:"location,omitempty"`
1131	// BackupLongTermRetentionPolicyProperties - The properties of the backup long term retention policy
1132	*BackupLongTermRetentionPolicyProperties `json:"properties,omitempty"`
1133	// ID - READ-ONLY; Resource ID.
1134	ID *string `json:"id,omitempty"`
1135	// Name - READ-ONLY; Resource name.
1136	Name *string `json:"name,omitempty"`
1137	// Type - READ-ONLY; Resource type.
1138	Type *string `json:"type,omitempty"`
1139}
1140
1141// MarshalJSON is the custom marshaler for BackupLongTermRetentionPolicy.
1142func (bltrp BackupLongTermRetentionPolicy) MarshalJSON() ([]byte, error) {
1143	objectMap := make(map[string]interface{})
1144	if bltrp.BackupLongTermRetentionPolicyProperties != nil {
1145		objectMap["properties"] = bltrp.BackupLongTermRetentionPolicyProperties
1146	}
1147	return json.Marshal(objectMap)
1148}
1149
1150// UnmarshalJSON is the custom unmarshaler for BackupLongTermRetentionPolicy struct.
1151func (bltrp *BackupLongTermRetentionPolicy) 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 "location":
1160			if v != nil {
1161				var location string
1162				err = json.Unmarshal(*v, &location)
1163				if err != nil {
1164					return err
1165				}
1166				bltrp.Location = &location
1167			}
1168		case "properties":
1169			if v != nil {
1170				var backupLongTermRetentionPolicyProperties BackupLongTermRetentionPolicyProperties
1171				err = json.Unmarshal(*v, &backupLongTermRetentionPolicyProperties)
1172				if err != nil {
1173					return err
1174				}
1175				bltrp.BackupLongTermRetentionPolicyProperties = &backupLongTermRetentionPolicyProperties
1176			}
1177		case "id":
1178			if v != nil {
1179				var ID string
1180				err = json.Unmarshal(*v, &ID)
1181				if err != nil {
1182					return err
1183				}
1184				bltrp.ID = &ID
1185			}
1186		case "name":
1187			if v != nil {
1188				var name string
1189				err = json.Unmarshal(*v, &name)
1190				if err != nil {
1191					return err
1192				}
1193				bltrp.Name = &name
1194			}
1195		case "type":
1196			if v != nil {
1197				var typeVar string
1198				err = json.Unmarshal(*v, &typeVar)
1199				if err != nil {
1200					return err
1201				}
1202				bltrp.Type = &typeVar
1203			}
1204		}
1205	}
1206
1207	return nil
1208}
1209
1210// BackupLongTermRetentionPolicyListResult represents the response to a list long-term retention policies
1211// request.
1212type BackupLongTermRetentionPolicyListResult struct {
1213	autorest.Response `json:"-"`
1214	// Value - The list of long-term retention policies in the database.
1215	Value *[]BackupLongTermRetentionPolicy `json:"value,omitempty"`
1216}
1217
1218// BackupLongTermRetentionPolicyProperties the properties of a backup long term retention policy
1219type BackupLongTermRetentionPolicyProperties struct {
1220	// State - The status of the backup long term retention policy. Possible values include: 'Disabled', 'Enabled'
1221	State BackupLongTermRetentionPolicyState `json:"state,omitempty"`
1222	// RecoveryServicesBackupPolicyResourceID - The azure recovery services backup protection policy resource id
1223	RecoveryServicesBackupPolicyResourceID *string `json:"recoveryServicesBackupPolicyResourceId,omitempty"`
1224}
1225
1226// BackupLongTermRetentionVault a backup long term retention vault
1227type BackupLongTermRetentionVault struct {
1228	autorest.Response `json:"-"`
1229	// Location - READ-ONLY; The geo-location where the resource lives
1230	Location *string `json:"location,omitempty"`
1231	// BackupLongTermRetentionVaultProperties - The properties of the backup long term retention vault
1232	*BackupLongTermRetentionVaultProperties `json:"properties,omitempty"`
1233	// ID - READ-ONLY; Resource ID.
1234	ID *string `json:"id,omitempty"`
1235	// Name - READ-ONLY; Resource name.
1236	Name *string `json:"name,omitempty"`
1237	// Type - READ-ONLY; Resource type.
1238	Type *string `json:"type,omitempty"`
1239}
1240
1241// MarshalJSON is the custom marshaler for BackupLongTermRetentionVault.
1242func (bltrv BackupLongTermRetentionVault) MarshalJSON() ([]byte, error) {
1243	objectMap := make(map[string]interface{})
1244	if bltrv.BackupLongTermRetentionVaultProperties != nil {
1245		objectMap["properties"] = bltrv.BackupLongTermRetentionVaultProperties
1246	}
1247	return json.Marshal(objectMap)
1248}
1249
1250// UnmarshalJSON is the custom unmarshaler for BackupLongTermRetentionVault struct.
1251func (bltrv *BackupLongTermRetentionVault) UnmarshalJSON(body []byte) error {
1252	var m map[string]*json.RawMessage
1253	err := json.Unmarshal(body, &m)
1254	if err != nil {
1255		return err
1256	}
1257	for k, v := range m {
1258		switch k {
1259		case "location":
1260			if v != nil {
1261				var location string
1262				err = json.Unmarshal(*v, &location)
1263				if err != nil {
1264					return err
1265				}
1266				bltrv.Location = &location
1267			}
1268		case "properties":
1269			if v != nil {
1270				var backupLongTermRetentionVaultProperties BackupLongTermRetentionVaultProperties
1271				err = json.Unmarshal(*v, &backupLongTermRetentionVaultProperties)
1272				if err != nil {
1273					return err
1274				}
1275				bltrv.BackupLongTermRetentionVaultProperties = &backupLongTermRetentionVaultProperties
1276			}
1277		case "id":
1278			if v != nil {
1279				var ID string
1280				err = json.Unmarshal(*v, &ID)
1281				if err != nil {
1282					return err
1283				}
1284				bltrv.ID = &ID
1285			}
1286		case "name":
1287			if v != nil {
1288				var name string
1289				err = json.Unmarshal(*v, &name)
1290				if err != nil {
1291					return err
1292				}
1293				bltrv.Name = &name
1294			}
1295		case "type":
1296			if v != nil {
1297				var typeVar string
1298				err = json.Unmarshal(*v, &typeVar)
1299				if err != nil {
1300					return err
1301				}
1302				bltrv.Type = &typeVar
1303			}
1304		}
1305	}
1306
1307	return nil
1308}
1309
1310// BackupLongTermRetentionVaultListResult represents the response to a list vaults request.
1311type BackupLongTermRetentionVaultListResult struct {
1312	autorest.Response `json:"-"`
1313	// Value - The list of vaults in the server.
1314	Value *[]BackupLongTermRetentionVault `json:"value,omitempty"`
1315}
1316
1317// BackupLongTermRetentionVaultProperties the properties of a backup long term retention vault.
1318type BackupLongTermRetentionVaultProperties struct {
1319	// RecoveryServicesVaultResourceID - The azure recovery services vault resource id
1320	RecoveryServicesVaultResourceID *string `json:"recoveryServicesVaultResourceId,omitempty"`
1321}
1322
1323// BackupLongTermRetentionVaultsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
1324// results of a long-running operation.
1325type BackupLongTermRetentionVaultsCreateOrUpdateFuture struct {
1326	azure.Future
1327}
1328
1329// Result returns the result of the asynchronous operation.
1330// If the operation has not completed it will return an error.
1331func (future *BackupLongTermRetentionVaultsCreateOrUpdateFuture) Result(client BackupLongTermRetentionVaultsClient) (bltrv BackupLongTermRetentionVault, err error) {
1332	var done bool
1333	done, err = future.DoneWithContext(context.Background(), client)
1334	if err != nil {
1335		err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1336		return
1337	}
1338	if !done {
1339		err = azure.NewAsyncOpIncompleteError("sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture")
1340		return
1341	}
1342	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1343	if bltrv.Response.Response, err = future.GetResult(sender); err == nil && bltrv.Response.Response.StatusCode != http.StatusNoContent {
1344		bltrv, err = client.CreateOrUpdateResponder(bltrv.Response.Response)
1345		if err != nil {
1346			err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsCreateOrUpdateFuture", "Result", bltrv.Response.Response, "Failure responding to request")
1347		}
1348	}
1349	return
1350}
1351
1352// CheckNameAvailabilityRequest a request to check whether the specified name for a resource is available.
1353type CheckNameAvailabilityRequest struct {
1354	// Name - The name whose availability is to be checked.
1355	Name *string `json:"name,omitempty"`
1356	// Type - The type of resource that is used as the scope of the availability check.
1357	Type *string `json:"type,omitempty"`
1358}
1359
1360// CheckNameAvailabilityResponse a response indicating whether the specified name for a resource is
1361// available.
1362type CheckNameAvailabilityResponse struct {
1363	autorest.Response `json:"-"`
1364	// Available - READ-ONLY; True if the name is available, otherwise false.
1365	Available *bool `json:"available,omitempty"`
1366	// Message - READ-ONLY; A message explaining why the name is unavailable. Will be null if the name is available.
1367	Message *string `json:"message,omitempty"`
1368	// Name - READ-ONLY; The name whose availability was checked.
1369	Name *string `json:"name,omitempty"`
1370	// Reason - READ-ONLY; The reason code explaining why the name is unavailable. Will be null if the name is available. Possible values include: 'Invalid', 'AlreadyExists'
1371	Reason CheckNameAvailabilityReason `json:"reason,omitempty"`
1372}
1373
1374// Database represents a database.
1375type Database struct {
1376	autorest.Response `json:"-"`
1377	// Kind - READ-ONLY; Kind of database.  This is metadata used for the Azure portal experience.
1378	Kind *string `json:"kind,omitempty"`
1379	// DatabaseProperties - The properties representing the resource.
1380	*DatabaseProperties `json:"properties,omitempty"`
1381	// Location - Resource location.
1382	Location *string `json:"location,omitempty"`
1383	// Tags - Resource tags.
1384	Tags map[string]*string `json:"tags"`
1385	// ID - READ-ONLY; Resource ID.
1386	ID *string `json:"id,omitempty"`
1387	// Name - READ-ONLY; Resource name.
1388	Name *string `json:"name,omitempty"`
1389	// Type - READ-ONLY; Resource type.
1390	Type *string `json:"type,omitempty"`
1391}
1392
1393// MarshalJSON is the custom marshaler for Database.
1394func (d Database) MarshalJSON() ([]byte, error) {
1395	objectMap := make(map[string]interface{})
1396	if d.DatabaseProperties != nil {
1397		objectMap["properties"] = d.DatabaseProperties
1398	}
1399	if d.Location != nil {
1400		objectMap["location"] = d.Location
1401	}
1402	if d.Tags != nil {
1403		objectMap["tags"] = d.Tags
1404	}
1405	return json.Marshal(objectMap)
1406}
1407
1408// UnmarshalJSON is the custom unmarshaler for Database struct.
1409func (d *Database) UnmarshalJSON(body []byte) error {
1410	var m map[string]*json.RawMessage
1411	err := json.Unmarshal(body, &m)
1412	if err != nil {
1413		return err
1414	}
1415	for k, v := range m {
1416		switch k {
1417		case "kind":
1418			if v != nil {
1419				var kind string
1420				err = json.Unmarshal(*v, &kind)
1421				if err != nil {
1422					return err
1423				}
1424				d.Kind = &kind
1425			}
1426		case "properties":
1427			if v != nil {
1428				var databaseProperties DatabaseProperties
1429				err = json.Unmarshal(*v, &databaseProperties)
1430				if err != nil {
1431					return err
1432				}
1433				d.DatabaseProperties = &databaseProperties
1434			}
1435		case "location":
1436			if v != nil {
1437				var location string
1438				err = json.Unmarshal(*v, &location)
1439				if err != nil {
1440					return err
1441				}
1442				d.Location = &location
1443			}
1444		case "tags":
1445			if v != nil {
1446				var tags map[string]*string
1447				err = json.Unmarshal(*v, &tags)
1448				if err != nil {
1449					return err
1450				}
1451				d.Tags = tags
1452			}
1453		case "id":
1454			if v != nil {
1455				var ID string
1456				err = json.Unmarshal(*v, &ID)
1457				if err != nil {
1458					return err
1459				}
1460				d.ID = &ID
1461			}
1462		case "name":
1463			if v != nil {
1464				var name string
1465				err = json.Unmarshal(*v, &name)
1466				if err != nil {
1467					return err
1468				}
1469				d.Name = &name
1470			}
1471		case "type":
1472			if v != nil {
1473				var typeVar string
1474				err = json.Unmarshal(*v, &typeVar)
1475				if err != nil {
1476					return err
1477				}
1478				d.Type = &typeVar
1479			}
1480		}
1481	}
1482
1483	return nil
1484}
1485
1486// DatabaseBlobAuditingPolicy a database blob auditing policy.
1487type DatabaseBlobAuditingPolicy struct {
1488	autorest.Response `json:"-"`
1489	// Kind - READ-ONLY; Resource kind.
1490	Kind *string `json:"kind,omitempty"`
1491	// DatabaseBlobAuditingPolicyProperties - Resource properties.
1492	*DatabaseBlobAuditingPolicyProperties `json:"properties,omitempty"`
1493	// ID - READ-ONLY; Resource ID.
1494	ID *string `json:"id,omitempty"`
1495	// Name - READ-ONLY; Resource name.
1496	Name *string `json:"name,omitempty"`
1497	// Type - READ-ONLY; Resource type.
1498	Type *string `json:"type,omitempty"`
1499}
1500
1501// MarshalJSON is the custom marshaler for DatabaseBlobAuditingPolicy.
1502func (dbap DatabaseBlobAuditingPolicy) MarshalJSON() ([]byte, error) {
1503	objectMap := make(map[string]interface{})
1504	if dbap.DatabaseBlobAuditingPolicyProperties != nil {
1505		objectMap["properties"] = dbap.DatabaseBlobAuditingPolicyProperties
1506	}
1507	return json.Marshal(objectMap)
1508}
1509
1510// UnmarshalJSON is the custom unmarshaler for DatabaseBlobAuditingPolicy struct.
1511func (dbap *DatabaseBlobAuditingPolicy) UnmarshalJSON(body []byte) error {
1512	var m map[string]*json.RawMessage
1513	err := json.Unmarshal(body, &m)
1514	if err != nil {
1515		return err
1516	}
1517	for k, v := range m {
1518		switch k {
1519		case "kind":
1520			if v != nil {
1521				var kind string
1522				err = json.Unmarshal(*v, &kind)
1523				if err != nil {
1524					return err
1525				}
1526				dbap.Kind = &kind
1527			}
1528		case "properties":
1529			if v != nil {
1530				var databaseBlobAuditingPolicyProperties DatabaseBlobAuditingPolicyProperties
1531				err = json.Unmarshal(*v, &databaseBlobAuditingPolicyProperties)
1532				if err != nil {
1533					return err
1534				}
1535				dbap.DatabaseBlobAuditingPolicyProperties = &databaseBlobAuditingPolicyProperties
1536			}
1537		case "id":
1538			if v != nil {
1539				var ID string
1540				err = json.Unmarshal(*v, &ID)
1541				if err != nil {
1542					return err
1543				}
1544				dbap.ID = &ID
1545			}
1546		case "name":
1547			if v != nil {
1548				var name string
1549				err = json.Unmarshal(*v, &name)
1550				if err != nil {
1551					return err
1552				}
1553				dbap.Name = &name
1554			}
1555		case "type":
1556			if v != nil {
1557				var typeVar string
1558				err = json.Unmarshal(*v, &typeVar)
1559				if err != nil {
1560					return err
1561				}
1562				dbap.Type = &typeVar
1563			}
1564		}
1565	}
1566
1567	return nil
1568}
1569
1570// DatabaseBlobAuditingPolicyListResult a list of database auditing settings.
1571type DatabaseBlobAuditingPolicyListResult struct {
1572	autorest.Response `json:"-"`
1573	// Value - READ-ONLY; Array of results.
1574	Value *[]DatabaseBlobAuditingPolicy `json:"value,omitempty"`
1575	// NextLink - READ-ONLY; Link to retrieve next page of results.
1576	NextLink *string `json:"nextLink,omitempty"`
1577}
1578
1579// DatabaseBlobAuditingPolicyListResultIterator provides access to a complete listing of
1580// DatabaseBlobAuditingPolicy values.
1581type DatabaseBlobAuditingPolicyListResultIterator struct {
1582	i    int
1583	page DatabaseBlobAuditingPolicyListResultPage
1584}
1585
1586// NextWithContext advances to the next value.  If there was an error making
1587// the request the iterator does not advance and the error is returned.
1588func (iter *DatabaseBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
1589	if tracing.IsEnabled() {
1590		ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseBlobAuditingPolicyListResultIterator.NextWithContext")
1591		defer func() {
1592			sc := -1
1593			if iter.Response().Response.Response != nil {
1594				sc = iter.Response().Response.Response.StatusCode
1595			}
1596			tracing.EndSpan(ctx, sc, err)
1597		}()
1598	}
1599	iter.i++
1600	if iter.i < len(iter.page.Values()) {
1601		return nil
1602	}
1603	err = iter.page.NextWithContext(ctx)
1604	if err != nil {
1605		iter.i--
1606		return err
1607	}
1608	iter.i = 0
1609	return nil
1610}
1611
1612// Next advances to the next value.  If there was an error making
1613// the request the iterator does not advance and the error is returned.
1614// Deprecated: Use NextWithContext() instead.
1615func (iter *DatabaseBlobAuditingPolicyListResultIterator) Next() error {
1616	return iter.NextWithContext(context.Background())
1617}
1618
1619// NotDone returns true if the enumeration should be started or is not yet complete.
1620func (iter DatabaseBlobAuditingPolicyListResultIterator) NotDone() bool {
1621	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1622}
1623
1624// Response returns the raw server response from the last page request.
1625func (iter DatabaseBlobAuditingPolicyListResultIterator) Response() DatabaseBlobAuditingPolicyListResult {
1626	return iter.page.Response()
1627}
1628
1629// Value returns the current value or a zero-initialized value if the
1630// iterator has advanced beyond the end of the collection.
1631func (iter DatabaseBlobAuditingPolicyListResultIterator) Value() DatabaseBlobAuditingPolicy {
1632	if !iter.page.NotDone() {
1633		return DatabaseBlobAuditingPolicy{}
1634	}
1635	return iter.page.Values()[iter.i]
1636}
1637
1638// Creates a new instance of the DatabaseBlobAuditingPolicyListResultIterator type.
1639func NewDatabaseBlobAuditingPolicyListResultIterator(page DatabaseBlobAuditingPolicyListResultPage) DatabaseBlobAuditingPolicyListResultIterator {
1640	return DatabaseBlobAuditingPolicyListResultIterator{page: page}
1641}
1642
1643// IsEmpty returns true if the ListResult contains no values.
1644func (dbaplr DatabaseBlobAuditingPolicyListResult) IsEmpty() bool {
1645	return dbaplr.Value == nil || len(*dbaplr.Value) == 0
1646}
1647
1648// databaseBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results.
1649// It returns nil if no more results exist.
1650func (dbaplr DatabaseBlobAuditingPolicyListResult) databaseBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
1651	if dbaplr.NextLink == nil || len(to.String(dbaplr.NextLink)) < 1 {
1652		return nil, nil
1653	}
1654	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1655		autorest.AsJSON(),
1656		autorest.AsGet(),
1657		autorest.WithBaseURL(to.String(dbaplr.NextLink)))
1658}
1659
1660// DatabaseBlobAuditingPolicyListResultPage contains a page of DatabaseBlobAuditingPolicy values.
1661type DatabaseBlobAuditingPolicyListResultPage struct {
1662	fn     func(context.Context, DatabaseBlobAuditingPolicyListResult) (DatabaseBlobAuditingPolicyListResult, error)
1663	dbaplr DatabaseBlobAuditingPolicyListResult
1664}
1665
1666// NextWithContext advances to the next page of values.  If there was an error making
1667// the request the page does not advance and the error is returned.
1668func (page *DatabaseBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
1669	if tracing.IsEnabled() {
1670		ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseBlobAuditingPolicyListResultPage.NextWithContext")
1671		defer func() {
1672			sc := -1
1673			if page.Response().Response.Response != nil {
1674				sc = page.Response().Response.Response.StatusCode
1675			}
1676			tracing.EndSpan(ctx, sc, err)
1677		}()
1678	}
1679	next, err := page.fn(ctx, page.dbaplr)
1680	if err != nil {
1681		return err
1682	}
1683	page.dbaplr = next
1684	return nil
1685}
1686
1687// Next advances to the next page of values.  If there was an error making
1688// the request the page does not advance and the error is returned.
1689// Deprecated: Use NextWithContext() instead.
1690func (page *DatabaseBlobAuditingPolicyListResultPage) Next() error {
1691	return page.NextWithContext(context.Background())
1692}
1693
1694// NotDone returns true if the page enumeration should be started or is not yet complete.
1695func (page DatabaseBlobAuditingPolicyListResultPage) NotDone() bool {
1696	return !page.dbaplr.IsEmpty()
1697}
1698
1699// Response returns the raw server response from the last page request.
1700func (page DatabaseBlobAuditingPolicyListResultPage) Response() DatabaseBlobAuditingPolicyListResult {
1701	return page.dbaplr
1702}
1703
1704// Values returns the slice of values for the current page or nil if there are no values.
1705func (page DatabaseBlobAuditingPolicyListResultPage) Values() []DatabaseBlobAuditingPolicy {
1706	if page.dbaplr.IsEmpty() {
1707		return nil
1708	}
1709	return *page.dbaplr.Value
1710}
1711
1712// Creates a new instance of the DatabaseBlobAuditingPolicyListResultPage type.
1713func NewDatabaseBlobAuditingPolicyListResultPage(getNextPage func(context.Context, DatabaseBlobAuditingPolicyListResult) (DatabaseBlobAuditingPolicyListResult, error)) DatabaseBlobAuditingPolicyListResultPage {
1714	return DatabaseBlobAuditingPolicyListResultPage{fn: getNextPage}
1715}
1716
1717// DatabaseBlobAuditingPolicyProperties properties of a database blob auditing policy.
1718type DatabaseBlobAuditingPolicyProperties struct {
1719	// State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled'
1720	State BlobAuditingPolicyState `json:"state,omitempty"`
1721	// StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required.
1722	StorageEndpoint *string `json:"storageEndpoint,omitempty"`
1723	// StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required.
1724	StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`
1725	// RetentionDays - Specifies the number of days to keep in the audit logs in the storage account.
1726	RetentionDays *int32 `json:"retentionDays,omitempty"`
1727	// AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit.
1728	//
1729	// The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:
1730	//
1731	// BATCH_COMPLETED_GROUP,
1732	// SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,
1733	// FAILED_DATABASE_AUTHENTICATION_GROUP.
1734	//
1735	// This above combination is also the set that is configured by default when enabling auditing from the Azure portal.
1736	//
1737	// The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):
1738	//
1739	// APPLICATION_ROLE_CHANGE_PASSWORD_GROUP
1740	// BACKUP_RESTORE_GROUP
1741	// DATABASE_LOGOUT_GROUP
1742	// DATABASE_OBJECT_CHANGE_GROUP
1743	// DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP
1744	// DATABASE_OBJECT_PERMISSION_CHANGE_GROUP
1745	// DATABASE_OPERATION_GROUP
1746	// DATABASE_PERMISSION_CHANGE_GROUP
1747	// DATABASE_PRINCIPAL_CHANGE_GROUP
1748	// DATABASE_PRINCIPAL_IMPERSONATION_GROUP
1749	// DATABASE_ROLE_MEMBER_CHANGE_GROUP
1750	// FAILED_DATABASE_AUTHENTICATION_GROUP
1751	// SCHEMA_OBJECT_ACCESS_GROUP
1752	// SCHEMA_OBJECT_CHANGE_GROUP
1753	// SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP
1754	// SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP
1755	// SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP
1756	// USER_CHANGE_PASSWORD_GROUP
1757	// BATCH_STARTED_GROUP
1758	// BATCH_COMPLETED_GROUP
1759	//
1760	// These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.
1761	//
1762	// For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).
1763	//
1764	// For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:
1765	// SELECT
1766	// UPDATE
1767	// INSERT
1768	// DELETE
1769	// EXECUTE
1770	// RECEIVE
1771	// REFERENCES
1772	//
1773	// The general form for defining an action to be audited is:
1774	// {action} ON {object} BY {principal}
1775	//
1776	// Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.
1777	//
1778	// For example:
1779	// SELECT on dbo.myTable by public
1780	// SELECT on DATABASE::myDatabase by public
1781	// SELECT on SCHEMA::mySchema by public
1782	//
1783	// For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)
1784	AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"`
1785	// StorageAccountSubscriptionID - Specifies the blob storage subscription Id.
1786	StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"`
1787	// IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key.
1788	IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"`
1789	// IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor.
1790	// In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true.
1791	//
1792	// When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.
1793	// Note that for server level audit you should use the 'master' database as {databaseName}.
1794	//
1795	// Diagnostic Settings URI format:
1796	// PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview
1797	//
1798	// For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)
1799	// or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
1800	IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"`
1801}
1802
1803// DatabaseListResult represents the response to a list database request.
1804type DatabaseListResult struct {
1805	autorest.Response `json:"-"`
1806	// Value - The list of databases housed in the server.
1807	Value *[]Database `json:"value,omitempty"`
1808}
1809
1810// DatabaseProperties represents the properties of a database.
1811type DatabaseProperties struct {
1812	// Collation - The collation of the database. If createMode is not Default, this value is ignored.
1813	Collation *string `json:"collation,omitempty"`
1814	// CreationDate - READ-ONLY; The creation date of the database (ISO8601 format).
1815	CreationDate *date.Time `json:"creationDate,omitempty"`
1816	// ContainmentState - READ-ONLY; The containment state of the database.
1817	ContainmentState *int64 `json:"containmentState,omitempty"`
1818	// CurrentServiceObjectiveID - READ-ONLY; The current service level objective ID of the database. This is the ID of the service level objective that is currently active.
1819	CurrentServiceObjectiveID *uuid.UUID `json:"currentServiceObjectiveId,omitempty"`
1820	// DatabaseID - READ-ONLY; The ID of the database.
1821	DatabaseID *uuid.UUID `json:"databaseId,omitempty"`
1822	// EarliestRestoreDate - READ-ONLY; This records the earliest start date and time that restore is available for this database (ISO8601 format).
1823	EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"`
1824	// CreateMode - Specifies the mode of database creation.
1825	// Default: regular database creation.
1826	// Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.
1827	// OnlineSecondary/NonReadableSecondary: creates a database as a (readable or nonreadable) secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.
1828	// PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.
1829	// Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.
1830	// Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.
1831	// RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.
1832	// Copy, NonReadableSecondary, OnlineSecondary and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. Possible values include: 'Copy', 'Default', 'NonReadableSecondary', 'OnlineSecondary', 'PointInTimeRestore', 'Recovery', 'Restore', 'RestoreLongTermRetentionBackup'
1833	CreateMode CreateMode `json:"createMode,omitempty"`
1834	// SourceDatabaseID - Conditional. If createMode is Copy, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery, or Restore, then this value is required. Specifies the resource ID of the source database. If createMode is NonReadableSecondary or OnlineSecondary, the name of the source database must be the same as the new database being created.
1835	SourceDatabaseID *string `json:"sourceDatabaseId,omitempty"`
1836	// SourceDatabaseDeletionDate - Conditional. If createMode is Restore and sourceDatabaseId is the deleted database's original resource id when it existed (as opposed to its current restorable dropped database id), then this value is required. Specifies the time that the database was deleted.
1837	SourceDatabaseDeletionDate *date.Time `json:"sourceDatabaseDeletionDate,omitempty"`
1838	// RestorePointInTime - Conditional. If createMode is PointInTimeRestore, this value is required. If createMode is Restore, this value is optional. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. Must be greater than or equal to the source database's earliestRestoreDate value.
1839	RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"`
1840	// RecoveryServicesRecoveryPointResourceID - Conditional. If createMode is RestoreLongTermRetentionBackup, then this value is required. Specifies the resource ID of the recovery point to restore from.
1841	RecoveryServicesRecoveryPointResourceID *string `json:"recoveryServicesRecoveryPointResourceId,omitempty"`
1842	// Edition - The edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored.
1843	//
1844	// The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands:
1845	//
1846	// ```azurecli
1847	// az sql db list-editions -l <location> -o table
1848	// ````
1849	//
1850	// ```powershell
1851	// Get-AzSqlServerServiceObjective -Location <location>
1852	// ````
1853	// . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'
1854	Edition DatabaseEdition `json:"edition,omitempty"`
1855	// MaxSizeBytes - The max size of the database expressed in bytes. If createMode is not Default, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation."
1856	MaxSizeBytes *string `json:"maxSizeBytes,omitempty"`
1857	// RequestedServiceObjectiveID - The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName.
1858	//
1859	// The list of SKUs may vary by region and support offer. To determine the service objective ids that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API.
1860	RequestedServiceObjectiveID *uuid.UUID `json:"requestedServiceObjectiveId,omitempty"`
1861	// RequestedServiceObjectiveName - The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property.
1862	//
1863	// The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands:
1864	//
1865	// ```azurecli
1866	// az sql db list-editions -l <location> -o table
1867	// ````
1868	//
1869	// ```powershell
1870	// Get-AzSqlServerServiceObjective -Location <location>
1871	// ````
1872	// . Possible values include: 'ServiceObjectiveNameSystem', 'ServiceObjectiveNameSystem0', 'ServiceObjectiveNameSystem1', 'ServiceObjectiveNameSystem2', 'ServiceObjectiveNameSystem3', 'ServiceObjectiveNameSystem4', 'ServiceObjectiveNameSystem2L', 'ServiceObjectiveNameSystem3L', 'ServiceObjectiveNameSystem4L', 'ServiceObjectiveNameFree', 'ServiceObjectiveNameBasic', 'ServiceObjectiveNameS0', 'ServiceObjectiveNameS1', 'ServiceObjectiveNameS2', 'ServiceObjectiveNameS3', 'ServiceObjectiveNameS4', 'ServiceObjectiveNameS6', 'ServiceObjectiveNameS7', 'ServiceObjectiveNameS9', 'ServiceObjectiveNameS12', 'ServiceObjectiveNameP1', 'ServiceObjectiveNameP2', 'ServiceObjectiveNameP3', 'ServiceObjectiveNameP4', 'ServiceObjectiveNameP6', 'ServiceObjectiveNameP11', 'ServiceObjectiveNameP15', 'ServiceObjectiveNamePRS1', 'ServiceObjectiveNamePRS2', 'ServiceObjectiveNamePRS4', 'ServiceObjectiveNamePRS6', 'ServiceObjectiveNameDW100', 'ServiceObjectiveNameDW200', 'ServiceObjectiveNameDW300', 'ServiceObjectiveNameDW400', 'ServiceObjectiveNameDW500', 'ServiceObjectiveNameDW600', 'ServiceObjectiveNameDW1000', 'ServiceObjectiveNameDW1200', 'ServiceObjectiveNameDW1000c', 'ServiceObjectiveNameDW1500', 'ServiceObjectiveNameDW1500c', 'ServiceObjectiveNameDW2000', 'ServiceObjectiveNameDW2000c', 'ServiceObjectiveNameDW3000', 'ServiceObjectiveNameDW2500c', 'ServiceObjectiveNameDW3000c', 'ServiceObjectiveNameDW6000', 'ServiceObjectiveNameDW5000c', 'ServiceObjectiveNameDW6000c', 'ServiceObjectiveNameDW7500c', 'ServiceObjectiveNameDW10000c', 'ServiceObjectiveNameDW15000c', 'ServiceObjectiveNameDW30000c', 'ServiceObjectiveNameDS100', 'ServiceObjectiveNameDS200', 'ServiceObjectiveNameDS300', 'ServiceObjectiveNameDS400', 'ServiceObjectiveNameDS500', 'ServiceObjectiveNameDS600', 'ServiceObjectiveNameDS1000', 'ServiceObjectiveNameDS1200', 'ServiceObjectiveNameDS1500', 'ServiceObjectiveNameDS2000', 'ServiceObjectiveNameElasticPool'
1873	RequestedServiceObjectiveName ServiceObjectiveName `json:"requestedServiceObjectiveName,omitempty"`
1874	// ServiceLevelObjective - READ-ONLY; The current service level objective of the database. Possible values include: 'ServiceObjectiveNameSystem', 'ServiceObjectiveNameSystem0', 'ServiceObjectiveNameSystem1', 'ServiceObjectiveNameSystem2', 'ServiceObjectiveNameSystem3', 'ServiceObjectiveNameSystem4', 'ServiceObjectiveNameSystem2L', 'ServiceObjectiveNameSystem3L', 'ServiceObjectiveNameSystem4L', 'ServiceObjectiveNameFree', 'ServiceObjectiveNameBasic', 'ServiceObjectiveNameS0', 'ServiceObjectiveNameS1', 'ServiceObjectiveNameS2', 'ServiceObjectiveNameS3', 'ServiceObjectiveNameS4', 'ServiceObjectiveNameS6', 'ServiceObjectiveNameS7', 'ServiceObjectiveNameS9', 'ServiceObjectiveNameS12', 'ServiceObjectiveNameP1', 'ServiceObjectiveNameP2', 'ServiceObjectiveNameP3', 'ServiceObjectiveNameP4', 'ServiceObjectiveNameP6', 'ServiceObjectiveNameP11', 'ServiceObjectiveNameP15', 'ServiceObjectiveNamePRS1', 'ServiceObjectiveNamePRS2', 'ServiceObjectiveNamePRS4', 'ServiceObjectiveNamePRS6', 'ServiceObjectiveNameDW100', 'ServiceObjectiveNameDW200', 'ServiceObjectiveNameDW300', 'ServiceObjectiveNameDW400', 'ServiceObjectiveNameDW500', 'ServiceObjectiveNameDW600', 'ServiceObjectiveNameDW1000', 'ServiceObjectiveNameDW1200', 'ServiceObjectiveNameDW1000c', 'ServiceObjectiveNameDW1500', 'ServiceObjectiveNameDW1500c', 'ServiceObjectiveNameDW2000', 'ServiceObjectiveNameDW2000c', 'ServiceObjectiveNameDW3000', 'ServiceObjectiveNameDW2500c', 'ServiceObjectiveNameDW3000c', 'ServiceObjectiveNameDW6000', 'ServiceObjectiveNameDW5000c', 'ServiceObjectiveNameDW6000c', 'ServiceObjectiveNameDW7500c', 'ServiceObjectiveNameDW10000c', 'ServiceObjectiveNameDW15000c', 'ServiceObjectiveNameDW30000c', 'ServiceObjectiveNameDS100', 'ServiceObjectiveNameDS200', 'ServiceObjectiveNameDS300', 'ServiceObjectiveNameDS400', 'ServiceObjectiveNameDS500', 'ServiceObjectiveNameDS600', 'ServiceObjectiveNameDS1000', 'ServiceObjectiveNameDS1200', 'ServiceObjectiveNameDS1500', 'ServiceObjectiveNameDS2000', 'ServiceObjectiveNameElasticPool'
1875	ServiceLevelObjective ServiceObjectiveName `json:"serviceLevelObjective,omitempty"`
1876	// Status - READ-ONLY; The status of the database.
1877	Status *string `json:"status,omitempty"`
1878	// ElasticPoolName - The name of the elastic pool the database is in. If elasticPoolName and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveName is ignored. Not supported for DataWarehouse edition.
1879	ElasticPoolName *string `json:"elasticPoolName,omitempty"`
1880	// DefaultSecondaryLocation - READ-ONLY; The default secondary region for this database.
1881	DefaultSecondaryLocation *string `json:"defaultSecondaryLocation,omitempty"`
1882	// ServiceTierAdvisors - READ-ONLY; The list of service tier advisors for this database. Expanded property
1883	ServiceTierAdvisors *[]ServiceTierAdvisor `json:"serviceTierAdvisors,omitempty"`
1884	// TransparentDataEncryption - READ-ONLY; The transparent data encryption info for this database.
1885	TransparentDataEncryption *[]TransparentDataEncryption `json:"transparentDataEncryption,omitempty"`
1886	// RecommendedIndex - READ-ONLY; The recommended indices for this database.
1887	RecommendedIndex *[]RecommendedIndex `json:"recommendedIndex,omitempty"`
1888	// FailoverGroupID - READ-ONLY; The resource identifier of the failover group containing this database.
1889	FailoverGroupID *string `json:"failoverGroupId,omitempty"`
1890	// ReadScale - Conditional. If the database is a geo-secondary, readScale indicates whether read-only connections are allowed to this database or not. Not supported for DataWarehouse edition. Possible values include: 'ReadScaleEnabled', 'ReadScaleDisabled'
1891	ReadScale ReadScale `json:"readScale,omitempty"`
1892	// SampleName - Indicates the name of the sample schema to apply when creating this database. If createMode is not Default, this value is ignored. Not supported for DataWarehouse edition. Possible values include: 'AdventureWorksLT'
1893	SampleName SampleName `json:"sampleName,omitempty"`
1894	// ZoneRedundant - Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
1895	ZoneRedundant *bool `json:"zoneRedundant,omitempty"`
1896}
1897
1898// DatabasesCreateImportOperationFuture an abstraction for monitoring and retrieving the results of a
1899// long-running operation.
1900type DatabasesCreateImportOperationFuture struct {
1901	azure.Future
1902}
1903
1904// Result returns the result of the asynchronous operation.
1905// If the operation has not completed it will return an error.
1906func (future *DatabasesCreateImportOperationFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
1907	var done bool
1908	done, err = future.DoneWithContext(context.Background(), client)
1909	if err != nil {
1910		err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", future.Response(), "Polling failure")
1911		return
1912	}
1913	if !done {
1914		err = azure.NewAsyncOpIncompleteError("sql.DatabasesCreateImportOperationFuture")
1915		return
1916	}
1917	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1918	if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent {
1919		ier, err = client.CreateImportOperationResponder(ier.Response.Response)
1920		if err != nil {
1921			err = autorest.NewErrorWithError(err, "sql.DatabasesCreateImportOperationFuture", "Result", ier.Response.Response, "Failure responding to request")
1922		}
1923	}
1924	return
1925}
1926
1927// DatabasesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1928// operation.
1929type DatabasesCreateOrUpdateFuture struct {
1930	azure.Future
1931}
1932
1933// Result returns the result of the asynchronous operation.
1934// If the operation has not completed it will return an error.
1935func (future *DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
1936	var done bool
1937	done, err = future.DoneWithContext(context.Background(), client)
1938	if err != nil {
1939		err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1940		return
1941	}
1942	if !done {
1943		err = azure.NewAsyncOpIncompleteError("sql.DatabasesCreateOrUpdateFuture")
1944		return
1945	}
1946	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1947	if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
1948		d, err = client.CreateOrUpdateResponder(d.Response.Response)
1949		if err != nil {
1950			err = autorest.NewErrorWithError(err, "sql.DatabasesCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
1951		}
1952	}
1953	return
1954}
1955
1956// DatabaseSecurityAlertPolicy contains information about a database Threat Detection policy.
1957type DatabaseSecurityAlertPolicy struct {
1958	autorest.Response `json:"-"`
1959	// Location - The geo-location where the resource lives
1960	Location *string `json:"location,omitempty"`
1961	// Kind - READ-ONLY; Resource kind.
1962	Kind *string `json:"kind,omitempty"`
1963	// DatabaseSecurityAlertPolicyProperties - Properties of the security alert policy.
1964	*DatabaseSecurityAlertPolicyProperties `json:"properties,omitempty"`
1965	// ID - READ-ONLY; Resource ID.
1966	ID *string `json:"id,omitempty"`
1967	// Name - READ-ONLY; Resource name.
1968	Name *string `json:"name,omitempty"`
1969	// Type - READ-ONLY; Resource type.
1970	Type *string `json:"type,omitempty"`
1971}
1972
1973// MarshalJSON is the custom marshaler for DatabaseSecurityAlertPolicy.
1974func (dsap DatabaseSecurityAlertPolicy) MarshalJSON() ([]byte, error) {
1975	objectMap := make(map[string]interface{})
1976	if dsap.Location != nil {
1977		objectMap["location"] = dsap.Location
1978	}
1979	if dsap.DatabaseSecurityAlertPolicyProperties != nil {
1980		objectMap["properties"] = dsap.DatabaseSecurityAlertPolicyProperties
1981	}
1982	return json.Marshal(objectMap)
1983}
1984
1985// UnmarshalJSON is the custom unmarshaler for DatabaseSecurityAlertPolicy struct.
1986func (dsap *DatabaseSecurityAlertPolicy) UnmarshalJSON(body []byte) error {
1987	var m map[string]*json.RawMessage
1988	err := json.Unmarshal(body, &m)
1989	if err != nil {
1990		return err
1991	}
1992	for k, v := range m {
1993		switch k {
1994		case "location":
1995			if v != nil {
1996				var location string
1997				err = json.Unmarshal(*v, &location)
1998				if err != nil {
1999					return err
2000				}
2001				dsap.Location = &location
2002			}
2003		case "kind":
2004			if v != nil {
2005				var kind string
2006				err = json.Unmarshal(*v, &kind)
2007				if err != nil {
2008					return err
2009				}
2010				dsap.Kind = &kind
2011			}
2012		case "properties":
2013			if v != nil {
2014				var databaseSecurityAlertPolicyProperties DatabaseSecurityAlertPolicyProperties
2015				err = json.Unmarshal(*v, &databaseSecurityAlertPolicyProperties)
2016				if err != nil {
2017					return err
2018				}
2019				dsap.DatabaseSecurityAlertPolicyProperties = &databaseSecurityAlertPolicyProperties
2020			}
2021		case "id":
2022			if v != nil {
2023				var ID string
2024				err = json.Unmarshal(*v, &ID)
2025				if err != nil {
2026					return err
2027				}
2028				dsap.ID = &ID
2029			}
2030		case "name":
2031			if v != nil {
2032				var name string
2033				err = json.Unmarshal(*v, &name)
2034				if err != nil {
2035					return err
2036				}
2037				dsap.Name = &name
2038			}
2039		case "type":
2040			if v != nil {
2041				var typeVar string
2042				err = json.Unmarshal(*v, &typeVar)
2043				if err != nil {
2044					return err
2045				}
2046				dsap.Type = &typeVar
2047			}
2048		}
2049	}
2050
2051	return nil
2052}
2053
2054// DatabaseSecurityAlertPolicyProperties properties for a database Threat Detection policy.
2055type DatabaseSecurityAlertPolicyProperties struct {
2056	// State - Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required. Possible values include: 'SecurityAlertPolicyStateNew', 'SecurityAlertPolicyStateEnabled', 'SecurityAlertPolicyStateDisabled'
2057	State SecurityAlertPolicyState `json:"state,omitempty"`
2058	// DisabledAlerts - Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Data_Exfiltration; Unsafe_Action.
2059	DisabledAlerts *string `json:"disabledAlerts,omitempty"`
2060	// EmailAddresses - Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.
2061	EmailAddresses *string `json:"emailAddresses,omitempty"`
2062	// EmailAccountAdmins - Specifies that the alert is sent to the account administrators. Possible values include: 'SecurityAlertPolicyEmailAccountAdminsEnabled', 'SecurityAlertPolicyEmailAccountAdminsDisabled'
2063	EmailAccountAdmins SecurityAlertPolicyEmailAccountAdmins `json:"emailAccountAdmins,omitempty"`
2064	// StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. If state is Enabled, storageEndpoint is required.
2065	StorageEndpoint *string `json:"storageEndpoint,omitempty"`
2066	// StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required.
2067	StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`
2068	// RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs.
2069	RetentionDays *int32 `json:"retentionDays,omitempty"`
2070	// UseServerDefault - Specifies whether to use the default server policy. Possible values include: 'SecurityAlertPolicyUseServerDefaultEnabled', 'SecurityAlertPolicyUseServerDefaultDisabled'
2071	UseServerDefault SecurityAlertPolicyUseServerDefault `json:"useServerDefault,omitempty"`
2072}
2073
2074// DatabasesExportFuture an abstraction for monitoring and retrieving the results of a long-running
2075// operation.
2076type DatabasesExportFuture struct {
2077	azure.Future
2078}
2079
2080// Result returns the result of the asynchronous operation.
2081// If the operation has not completed it will return an error.
2082func (future *DatabasesExportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
2083	var done bool
2084	done, err = future.DoneWithContext(context.Background(), client)
2085	if err != nil {
2086		err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", future.Response(), "Polling failure")
2087		return
2088	}
2089	if !done {
2090		err = azure.NewAsyncOpIncompleteError("sql.DatabasesExportFuture")
2091		return
2092	}
2093	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2094	if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent {
2095		ier, err = client.ExportResponder(ier.Response.Response)
2096		if err != nil {
2097			err = autorest.NewErrorWithError(err, "sql.DatabasesExportFuture", "Result", ier.Response.Response, "Failure responding to request")
2098		}
2099	}
2100	return
2101}
2102
2103// DatabasesImportFuture an abstraction for monitoring and retrieving the results of a long-running
2104// operation.
2105type DatabasesImportFuture struct {
2106	azure.Future
2107}
2108
2109// Result returns the result of the asynchronous operation.
2110// If the operation has not completed it will return an error.
2111func (future *DatabasesImportFuture) Result(client DatabasesClient) (ier ImportExportResponse, err error) {
2112	var done bool
2113	done, err = future.DoneWithContext(context.Background(), client)
2114	if err != nil {
2115		err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", future.Response(), "Polling failure")
2116		return
2117	}
2118	if !done {
2119		err = azure.NewAsyncOpIncompleteError("sql.DatabasesImportFuture")
2120		return
2121	}
2122	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2123	if ier.Response.Response, err = future.GetResult(sender); err == nil && ier.Response.Response.StatusCode != http.StatusNoContent {
2124		ier, err = client.ImportResponder(ier.Response.Response)
2125		if err != nil {
2126			err = autorest.NewErrorWithError(err, "sql.DatabasesImportFuture", "Result", ier.Response.Response, "Failure responding to request")
2127		}
2128	}
2129	return
2130}
2131
2132// DatabasesPauseFuture an abstraction for monitoring and retrieving the results of a long-running
2133// operation.
2134type DatabasesPauseFuture struct {
2135	azure.Future
2136}
2137
2138// Result returns the result of the asynchronous operation.
2139// If the operation has not completed it will return an error.
2140func (future *DatabasesPauseFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
2141	var done bool
2142	done, err = future.DoneWithContext(context.Background(), client)
2143	if err != nil {
2144		err = autorest.NewErrorWithError(err, "sql.DatabasesPauseFuture", "Result", future.Response(), "Polling failure")
2145		return
2146	}
2147	if !done {
2148		err = azure.NewAsyncOpIncompleteError("sql.DatabasesPauseFuture")
2149		return
2150	}
2151	ar.Response = future.Response()
2152	return
2153}
2154
2155// DatabasesResumeFuture an abstraction for monitoring and retrieving the results of a long-running
2156// operation.
2157type DatabasesResumeFuture struct {
2158	azure.Future
2159}
2160
2161// Result returns the result of the asynchronous operation.
2162// If the operation has not completed it will return an error.
2163func (future *DatabasesResumeFuture) Result(client DatabasesClient) (ar autorest.Response, err error) {
2164	var done bool
2165	done, err = future.DoneWithContext(context.Background(), client)
2166	if err != nil {
2167		err = autorest.NewErrorWithError(err, "sql.DatabasesResumeFuture", "Result", future.Response(), "Polling failure")
2168		return
2169	}
2170	if !done {
2171		err = azure.NewAsyncOpIncompleteError("sql.DatabasesResumeFuture")
2172		return
2173	}
2174	ar.Response = future.Response()
2175	return
2176}
2177
2178// DatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
2179// operation.
2180type DatabasesUpdateFuture struct {
2181	azure.Future
2182}
2183
2184// Result returns the result of the asynchronous operation.
2185// If the operation has not completed it will return an error.
2186func (future *DatabasesUpdateFuture) Result(client DatabasesClient) (d Database, err error) {
2187	var done bool
2188	done, err = future.DoneWithContext(context.Background(), client)
2189	if err != nil {
2190		err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", future.Response(), "Polling failure")
2191		return
2192	}
2193	if !done {
2194		err = azure.NewAsyncOpIncompleteError("sql.DatabasesUpdateFuture")
2195		return
2196	}
2197	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2198	if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
2199		d, err = client.UpdateResponder(d.Response.Response)
2200		if err != nil {
2201			err = autorest.NewErrorWithError(err, "sql.DatabasesUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
2202		}
2203	}
2204	return
2205}
2206
2207// DatabaseUpdate represents a database update.
2208type DatabaseUpdate struct {
2209	// Tags - Resource tags.
2210	Tags map[string]*string `json:"tags"`
2211	// DatabaseProperties - The properties representing the resource.
2212	*DatabaseProperties `json:"properties,omitempty"`
2213	// ID - READ-ONLY; Resource ID.
2214	ID *string `json:"id,omitempty"`
2215	// Name - READ-ONLY; Resource name.
2216	Name *string `json:"name,omitempty"`
2217	// Type - READ-ONLY; Resource type.
2218	Type *string `json:"type,omitempty"`
2219}
2220
2221// MarshalJSON is the custom marshaler for DatabaseUpdate.
2222func (du DatabaseUpdate) MarshalJSON() ([]byte, error) {
2223	objectMap := make(map[string]interface{})
2224	if du.Tags != nil {
2225		objectMap["tags"] = du.Tags
2226	}
2227	if du.DatabaseProperties != nil {
2228		objectMap["properties"] = du.DatabaseProperties
2229	}
2230	return json.Marshal(objectMap)
2231}
2232
2233// UnmarshalJSON is the custom unmarshaler for DatabaseUpdate struct.
2234func (du *DatabaseUpdate) UnmarshalJSON(body []byte) error {
2235	var m map[string]*json.RawMessage
2236	err := json.Unmarshal(body, &m)
2237	if err != nil {
2238		return err
2239	}
2240	for k, v := range m {
2241		switch k {
2242		case "tags":
2243			if v != nil {
2244				var tags map[string]*string
2245				err = json.Unmarshal(*v, &tags)
2246				if err != nil {
2247					return err
2248				}
2249				du.Tags = tags
2250			}
2251		case "properties":
2252			if v != nil {
2253				var databaseProperties DatabaseProperties
2254				err = json.Unmarshal(*v, &databaseProperties)
2255				if err != nil {
2256					return err
2257				}
2258				du.DatabaseProperties = &databaseProperties
2259			}
2260		case "id":
2261			if v != nil {
2262				var ID string
2263				err = json.Unmarshal(*v, &ID)
2264				if err != nil {
2265					return err
2266				}
2267				du.ID = &ID
2268			}
2269		case "name":
2270			if v != nil {
2271				var name string
2272				err = json.Unmarshal(*v, &name)
2273				if err != nil {
2274					return err
2275				}
2276				du.Name = &name
2277			}
2278		case "type":
2279			if v != nil {
2280				var typeVar string
2281				err = json.Unmarshal(*v, &typeVar)
2282				if err != nil {
2283					return err
2284				}
2285				du.Type = &typeVar
2286			}
2287		}
2288	}
2289
2290	return nil
2291}
2292
2293// DatabaseUsage the database usages.
2294type DatabaseUsage struct {
2295	// Name - READ-ONLY; The name of the usage metric.
2296	Name *string `json:"name,omitempty"`
2297	// ResourceName - READ-ONLY; The name of the resource.
2298	ResourceName *string `json:"resourceName,omitempty"`
2299	// DisplayName - READ-ONLY; The usage metric display name.
2300	DisplayName *string `json:"displayName,omitempty"`
2301	// CurrentValue - READ-ONLY; The current value of the usage metric.
2302	CurrentValue *float64 `json:"currentValue,omitempty"`
2303	// Limit - READ-ONLY; The current limit of the usage metric.
2304	Limit *float64 `json:"limit,omitempty"`
2305	// Unit - READ-ONLY; The units of the usage metric.
2306	Unit *string `json:"unit,omitempty"`
2307	// NextResetTime - READ-ONLY; The next reset time for the usage metric (ISO8601 format).
2308	NextResetTime *date.Time `json:"nextResetTime,omitempty"`
2309}
2310
2311// DatabaseUsageListResult the response to a list database metrics request.
2312type DatabaseUsageListResult struct {
2313	autorest.Response `json:"-"`
2314	// Value - The list of database usages for the database.
2315	Value *[]DatabaseUsage `json:"value,omitempty"`
2316}
2317
2318// DataMaskingPolicy represents a database data masking policy.
2319type DataMaskingPolicy struct {
2320	autorest.Response `json:"-"`
2321	// DataMaskingPolicyProperties - The properties of the data masking policy.
2322	*DataMaskingPolicyProperties `json:"properties,omitempty"`
2323	// Location - READ-ONLY; The location of the data masking policy.
2324	Location *string `json:"location,omitempty"`
2325	// Kind - READ-ONLY; The kind of data masking policy. Metadata, used for Azure portal.
2326	Kind *string `json:"kind,omitempty"`
2327	// ID - READ-ONLY; Resource ID.
2328	ID *string `json:"id,omitempty"`
2329	// Name - READ-ONLY; Resource name.
2330	Name *string `json:"name,omitempty"`
2331	// Type - READ-ONLY; Resource type.
2332	Type *string `json:"type,omitempty"`
2333}
2334
2335// MarshalJSON is the custom marshaler for DataMaskingPolicy.
2336func (dmp DataMaskingPolicy) MarshalJSON() ([]byte, error) {
2337	objectMap := make(map[string]interface{})
2338	if dmp.DataMaskingPolicyProperties != nil {
2339		objectMap["properties"] = dmp.DataMaskingPolicyProperties
2340	}
2341	return json.Marshal(objectMap)
2342}
2343
2344// UnmarshalJSON is the custom unmarshaler for DataMaskingPolicy struct.
2345func (dmp *DataMaskingPolicy) UnmarshalJSON(body []byte) error {
2346	var m map[string]*json.RawMessage
2347	err := json.Unmarshal(body, &m)
2348	if err != nil {
2349		return err
2350	}
2351	for k, v := range m {
2352		switch k {
2353		case "properties":
2354			if v != nil {
2355				var dataMaskingPolicyProperties DataMaskingPolicyProperties
2356				err = json.Unmarshal(*v, &dataMaskingPolicyProperties)
2357				if err != nil {
2358					return err
2359				}
2360				dmp.DataMaskingPolicyProperties = &dataMaskingPolicyProperties
2361			}
2362		case "location":
2363			if v != nil {
2364				var location string
2365				err = json.Unmarshal(*v, &location)
2366				if err != nil {
2367					return err
2368				}
2369				dmp.Location = &location
2370			}
2371		case "kind":
2372			if v != nil {
2373				var kind string
2374				err = json.Unmarshal(*v, &kind)
2375				if err != nil {
2376					return err
2377				}
2378				dmp.Kind = &kind
2379			}
2380		case "id":
2381			if v != nil {
2382				var ID string
2383				err = json.Unmarshal(*v, &ID)
2384				if err != nil {
2385					return err
2386				}
2387				dmp.ID = &ID
2388			}
2389		case "name":
2390			if v != nil {
2391				var name string
2392				err = json.Unmarshal(*v, &name)
2393				if err != nil {
2394					return err
2395				}
2396				dmp.Name = &name
2397			}
2398		case "type":
2399			if v != nil {
2400				var typeVar string
2401				err = json.Unmarshal(*v, &typeVar)
2402				if err != nil {
2403					return err
2404				}
2405				dmp.Type = &typeVar
2406			}
2407		}
2408	}
2409
2410	return nil
2411}
2412
2413// DataMaskingPolicyProperties the properties of a database data masking policy.
2414type DataMaskingPolicyProperties struct {
2415	// DataMaskingState - The state of the data masking policy. Possible values include: 'DataMaskingStateDisabled', 'DataMaskingStateEnabled'
2416	DataMaskingState DataMaskingState `json:"dataMaskingState,omitempty"`
2417	// ExemptPrincipals - The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries.
2418	ExemptPrincipals *string `json:"exemptPrincipals,omitempty"`
2419	// ApplicationPrincipals - READ-ONLY; The list of the application principals. This is a legacy parameter and is no longer used.
2420	ApplicationPrincipals *string `json:"applicationPrincipals,omitempty"`
2421	// MaskingLevel - READ-ONLY; The masking level. This is a legacy parameter and is no longer used.
2422	MaskingLevel *string `json:"maskingLevel,omitempty"`
2423}
2424
2425// DataMaskingRule represents a database data masking rule.
2426type DataMaskingRule struct {
2427	autorest.Response `json:"-"`
2428	// DataMaskingRuleProperties - The properties of the resource.
2429	*DataMaskingRuleProperties `json:"properties,omitempty"`
2430	// Location - READ-ONLY; The location of the data masking rule.
2431	Location *string `json:"location,omitempty"`
2432	// Kind - READ-ONLY; The kind of Data Masking Rule. Metadata, used for Azure portal.
2433	Kind *string `json:"kind,omitempty"`
2434	// ID - READ-ONLY; Resource ID.
2435	ID *string `json:"id,omitempty"`
2436	// Name - READ-ONLY; Resource name.
2437	Name *string `json:"name,omitempty"`
2438	// Type - READ-ONLY; Resource type.
2439	Type *string `json:"type,omitempty"`
2440}
2441
2442// MarshalJSON is the custom marshaler for DataMaskingRule.
2443func (dmr DataMaskingRule) MarshalJSON() ([]byte, error) {
2444	objectMap := make(map[string]interface{})
2445	if dmr.DataMaskingRuleProperties != nil {
2446		objectMap["properties"] = dmr.DataMaskingRuleProperties
2447	}
2448	return json.Marshal(objectMap)
2449}
2450
2451// UnmarshalJSON is the custom unmarshaler for DataMaskingRule struct.
2452func (dmr *DataMaskingRule) UnmarshalJSON(body []byte) error {
2453	var m map[string]*json.RawMessage
2454	err := json.Unmarshal(body, &m)
2455	if err != nil {
2456		return err
2457	}
2458	for k, v := range m {
2459		switch k {
2460		case "properties":
2461			if v != nil {
2462				var dataMaskingRuleProperties DataMaskingRuleProperties
2463				err = json.Unmarshal(*v, &dataMaskingRuleProperties)
2464				if err != nil {
2465					return err
2466				}
2467				dmr.DataMaskingRuleProperties = &dataMaskingRuleProperties
2468			}
2469		case "location":
2470			if v != nil {
2471				var location string
2472				err = json.Unmarshal(*v, &location)
2473				if err != nil {
2474					return err
2475				}
2476				dmr.Location = &location
2477			}
2478		case "kind":
2479			if v != nil {
2480				var kind string
2481				err = json.Unmarshal(*v, &kind)
2482				if err != nil {
2483					return err
2484				}
2485				dmr.Kind = &kind
2486			}
2487		case "id":
2488			if v != nil {
2489				var ID string
2490				err = json.Unmarshal(*v, &ID)
2491				if err != nil {
2492					return err
2493				}
2494				dmr.ID = &ID
2495			}
2496		case "name":
2497			if v != nil {
2498				var name string
2499				err = json.Unmarshal(*v, &name)
2500				if err != nil {
2501					return err
2502				}
2503				dmr.Name = &name
2504			}
2505		case "type":
2506			if v != nil {
2507				var typeVar string
2508				err = json.Unmarshal(*v, &typeVar)
2509				if err != nil {
2510					return err
2511				}
2512				dmr.Type = &typeVar
2513			}
2514		}
2515	}
2516
2517	return nil
2518}
2519
2520// DataMaskingRuleListResult the response to a list data masking rules request.
2521type DataMaskingRuleListResult struct {
2522	autorest.Response `json:"-"`
2523	// Value - The list of database data masking rules.
2524	Value *[]DataMaskingRule `json:"value,omitempty"`
2525}
2526
2527// DataMaskingRuleProperties the properties of a database data masking rule.
2528type DataMaskingRuleProperties struct {
2529	// ID - READ-ONLY; The rule Id.
2530	ID *string `json:"id,omitempty"`
2531	// AliasName - The alias name. This is a legacy parameter and is no longer used.
2532	AliasName *string `json:"aliasName,omitempty"`
2533	// RuleState - The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. Possible values include: 'DataMaskingRuleStateDisabled', 'DataMaskingRuleStateEnabled'
2534	RuleState DataMaskingRuleState `json:"ruleState,omitempty"`
2535	// SchemaName - The schema name on which the data masking rule is applied.
2536	SchemaName *string `json:"schemaName,omitempty"`
2537	// TableName - The table name on which the data masking rule is applied.
2538	TableName *string `json:"tableName,omitempty"`
2539	// ColumnName - The column name on which the data masking rule is applied.
2540	ColumnName *string `json:"columnName,omitempty"`
2541	// MaskingFunction - The masking function that is used for the data masking rule. Possible values include: 'DataMaskingFunctionDefault', 'DataMaskingFunctionCCN', 'DataMaskingFunctionEmail', 'DataMaskingFunctionNumber', 'DataMaskingFunctionSSN', 'DataMaskingFunctionText'
2542	MaskingFunction DataMaskingFunction `json:"maskingFunction,omitempty"`
2543	// NumberFrom - The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.
2544	NumberFrom *string `json:"numberFrom,omitempty"`
2545	// NumberTo - The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.
2546	NumberTo *string `json:"numberTo,omitempty"`
2547	// PrefixSize - If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored.
2548	PrefixSize *string `json:"prefixSize,omitempty"`
2549	// SuffixSize - If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored.
2550	SuffixSize *string `json:"suffixSize,omitempty"`
2551	// ReplacementString - If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored.
2552	ReplacementString *string `json:"replacementString,omitempty"`
2553}
2554
2555// EditionCapability the edition capability.
2556type EditionCapability struct {
2557	// Name - READ-ONLY; The database edition name.
2558	Name *string `json:"name,omitempty"`
2559	// SupportedServiceLevelObjectives - READ-ONLY; The list of supported service objectives for the edition.
2560	SupportedServiceLevelObjectives *[]ServiceLevelObjectiveCapability `json:"supportedServiceLevelObjectives,omitempty"`
2561	// Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
2562	Status CapabilityStatus `json:"status,omitempty"`
2563	// Reason - The reason for the capability not being available.
2564	Reason *string `json:"reason,omitempty"`
2565}
2566
2567// ElasticPool represents a database elastic pool.
2568type ElasticPool struct {
2569	autorest.Response `json:"-"`
2570	// ElasticPoolProperties - The properties representing the resource.
2571	*ElasticPoolProperties `json:"properties,omitempty"`
2572	// Kind - READ-ONLY; Kind of elastic pool.  This is metadata used for the Azure portal experience.
2573	Kind *string `json:"kind,omitempty"`
2574	// Location - Resource location.
2575	Location *string `json:"location,omitempty"`
2576	// Tags - Resource tags.
2577	Tags map[string]*string `json:"tags"`
2578	// ID - READ-ONLY; Resource ID.
2579	ID *string `json:"id,omitempty"`
2580	// Name - READ-ONLY; Resource name.
2581	Name *string `json:"name,omitempty"`
2582	// Type - READ-ONLY; Resource type.
2583	Type *string `json:"type,omitempty"`
2584}
2585
2586// MarshalJSON is the custom marshaler for ElasticPool.
2587func (ep ElasticPool) MarshalJSON() ([]byte, error) {
2588	objectMap := make(map[string]interface{})
2589	if ep.ElasticPoolProperties != nil {
2590		objectMap["properties"] = ep.ElasticPoolProperties
2591	}
2592	if ep.Location != nil {
2593		objectMap["location"] = ep.Location
2594	}
2595	if ep.Tags != nil {
2596		objectMap["tags"] = ep.Tags
2597	}
2598	return json.Marshal(objectMap)
2599}
2600
2601// UnmarshalJSON is the custom unmarshaler for ElasticPool struct.
2602func (ep *ElasticPool) UnmarshalJSON(body []byte) error {
2603	var m map[string]*json.RawMessage
2604	err := json.Unmarshal(body, &m)
2605	if err != nil {
2606		return err
2607	}
2608	for k, v := range m {
2609		switch k {
2610		case "properties":
2611			if v != nil {
2612				var elasticPoolProperties ElasticPoolProperties
2613				err = json.Unmarshal(*v, &elasticPoolProperties)
2614				if err != nil {
2615					return err
2616				}
2617				ep.ElasticPoolProperties = &elasticPoolProperties
2618			}
2619		case "kind":
2620			if v != nil {
2621				var kind string
2622				err = json.Unmarshal(*v, &kind)
2623				if err != nil {
2624					return err
2625				}
2626				ep.Kind = &kind
2627			}
2628		case "location":
2629			if v != nil {
2630				var location string
2631				err = json.Unmarshal(*v, &location)
2632				if err != nil {
2633					return err
2634				}
2635				ep.Location = &location
2636			}
2637		case "tags":
2638			if v != nil {
2639				var tags map[string]*string
2640				err = json.Unmarshal(*v, &tags)
2641				if err != nil {
2642					return err
2643				}
2644				ep.Tags = tags
2645			}
2646		case "id":
2647			if v != nil {
2648				var ID string
2649				err = json.Unmarshal(*v, &ID)
2650				if err != nil {
2651					return err
2652				}
2653				ep.ID = &ID
2654			}
2655		case "name":
2656			if v != nil {
2657				var name string
2658				err = json.Unmarshal(*v, &name)
2659				if err != nil {
2660					return err
2661				}
2662				ep.Name = &name
2663			}
2664		case "type":
2665			if v != nil {
2666				var typeVar string
2667				err = json.Unmarshal(*v, &typeVar)
2668				if err != nil {
2669					return err
2670				}
2671				ep.Type = &typeVar
2672			}
2673		}
2674	}
2675
2676	return nil
2677}
2678
2679// ElasticPoolActivity represents the activity on an elastic pool.
2680type ElasticPoolActivity struct {
2681	// Location - The geo-location where the resource lives
2682	Location *string `json:"location,omitempty"`
2683	// ElasticPoolActivityProperties - The properties representing the resource.
2684	*ElasticPoolActivityProperties `json:"properties,omitempty"`
2685	// ID - READ-ONLY; Resource ID.
2686	ID *string `json:"id,omitempty"`
2687	// Name - READ-ONLY; Resource name.
2688	Name *string `json:"name,omitempty"`
2689	// Type - READ-ONLY; Resource type.
2690	Type *string `json:"type,omitempty"`
2691}
2692
2693// MarshalJSON is the custom marshaler for ElasticPoolActivity.
2694func (epa ElasticPoolActivity) MarshalJSON() ([]byte, error) {
2695	objectMap := make(map[string]interface{})
2696	if epa.Location != nil {
2697		objectMap["location"] = epa.Location
2698	}
2699	if epa.ElasticPoolActivityProperties != nil {
2700		objectMap["properties"] = epa.ElasticPoolActivityProperties
2701	}
2702	return json.Marshal(objectMap)
2703}
2704
2705// UnmarshalJSON is the custom unmarshaler for ElasticPoolActivity struct.
2706func (epa *ElasticPoolActivity) UnmarshalJSON(body []byte) error {
2707	var m map[string]*json.RawMessage
2708	err := json.Unmarshal(body, &m)
2709	if err != nil {
2710		return err
2711	}
2712	for k, v := range m {
2713		switch k {
2714		case "location":
2715			if v != nil {
2716				var location string
2717				err = json.Unmarshal(*v, &location)
2718				if err != nil {
2719					return err
2720				}
2721				epa.Location = &location
2722			}
2723		case "properties":
2724			if v != nil {
2725				var elasticPoolActivityProperties ElasticPoolActivityProperties
2726				err = json.Unmarshal(*v, &elasticPoolActivityProperties)
2727				if err != nil {
2728					return err
2729				}
2730				epa.ElasticPoolActivityProperties = &elasticPoolActivityProperties
2731			}
2732		case "id":
2733			if v != nil {
2734				var ID string
2735				err = json.Unmarshal(*v, &ID)
2736				if err != nil {
2737					return err
2738				}
2739				epa.ID = &ID
2740			}
2741		case "name":
2742			if v != nil {
2743				var name string
2744				err = json.Unmarshal(*v, &name)
2745				if err != nil {
2746					return err
2747				}
2748				epa.Name = &name
2749			}
2750		case "type":
2751			if v != nil {
2752				var typeVar string
2753				err = json.Unmarshal(*v, &typeVar)
2754				if err != nil {
2755					return err
2756				}
2757				epa.Type = &typeVar
2758			}
2759		}
2760	}
2761
2762	return nil
2763}
2764
2765// ElasticPoolActivityListResult represents the response to a list elastic pool activity request.
2766type ElasticPoolActivityListResult struct {
2767	autorest.Response `json:"-"`
2768	// Value - The list of elastic pool activities.
2769	Value *[]ElasticPoolActivity `json:"value,omitempty"`
2770}
2771
2772// ElasticPoolActivityProperties represents the properties of an elastic pool.
2773type ElasticPoolActivityProperties struct {
2774	// EndTime - READ-ONLY; The time the operation finished (ISO8601 format).
2775	EndTime *date.Time `json:"endTime,omitempty"`
2776	// ErrorCode - READ-ONLY; The error code if available.
2777	ErrorCode *int32 `json:"errorCode,omitempty"`
2778	// ErrorMessage - READ-ONLY; The error message if available.
2779	ErrorMessage *string `json:"errorMessage,omitempty"`
2780	// ErrorSeverity - READ-ONLY; The error severity if available.
2781	ErrorSeverity *int32 `json:"errorSeverity,omitempty"`
2782	// Operation - READ-ONLY; The operation name.
2783	Operation *string `json:"operation,omitempty"`
2784	// OperationID - READ-ONLY; The unique operation ID.
2785	OperationID *uuid.UUID `json:"operationId,omitempty"`
2786	// PercentComplete - READ-ONLY; The percentage complete if available.
2787	PercentComplete *int32 `json:"percentComplete,omitempty"`
2788	// RequestedDatabaseDtuMax - READ-ONLY; The requested max DTU per database if available.
2789	RequestedDatabaseDtuMax *int32 `json:"requestedDatabaseDtuMax,omitempty"`
2790	// RequestedDatabaseDtuMin - READ-ONLY; The requested min DTU per database if available.
2791	RequestedDatabaseDtuMin *int32 `json:"requestedDatabaseDtuMin,omitempty"`
2792	// RequestedDtu - READ-ONLY; The requested DTU for the pool if available.
2793	RequestedDtu *int32 `json:"requestedDtu,omitempty"`
2794	// RequestedElasticPoolName - READ-ONLY; The requested name for the elastic pool if available.
2795	RequestedElasticPoolName *string `json:"requestedElasticPoolName,omitempty"`
2796	// RequestedStorageLimitInGB - READ-ONLY; The requested storage limit for the pool in GB if available.
2797	RequestedStorageLimitInGB *int64 `json:"requestedStorageLimitInGB,omitempty"`
2798	// ElasticPoolName - READ-ONLY; The name of the elastic pool.
2799	ElasticPoolName *string `json:"elasticPoolName,omitempty"`
2800	// ServerName - READ-ONLY; The name of the server the elastic pool is in.
2801	ServerName *string `json:"serverName,omitempty"`
2802	// StartTime - READ-ONLY; The time the operation started (ISO8601 format).
2803	StartTime *date.Time `json:"startTime,omitempty"`
2804	// State - READ-ONLY; The current state of the operation.
2805	State *string `json:"state,omitempty"`
2806	// RequestedStorageLimitInMB - READ-ONLY; The requested storage limit in MB.
2807	RequestedStorageLimitInMB *int32 `json:"requestedStorageLimitInMB,omitempty"`
2808	// RequestedDatabaseDtuGuarantee - READ-ONLY; The requested per database DTU guarantee.
2809	RequestedDatabaseDtuGuarantee *int32 `json:"requestedDatabaseDtuGuarantee,omitempty"`
2810	// RequestedDatabaseDtuCap - READ-ONLY; The requested per database DTU cap.
2811	RequestedDatabaseDtuCap *int32 `json:"requestedDatabaseDtuCap,omitempty"`
2812	// RequestedDtuGuarantee - READ-ONLY; The requested DTU guarantee.
2813	RequestedDtuGuarantee *int32 `json:"requestedDtuGuarantee,omitempty"`
2814}
2815
2816// ElasticPoolDatabaseActivity represents the activity on an elastic pool.
2817type ElasticPoolDatabaseActivity struct {
2818	// Location - The geo-location where the resource lives
2819	Location *string `json:"location,omitempty"`
2820	// ElasticPoolDatabaseActivityProperties - The properties representing the resource.
2821	*ElasticPoolDatabaseActivityProperties `json:"properties,omitempty"`
2822	// ID - READ-ONLY; Resource ID.
2823	ID *string `json:"id,omitempty"`
2824	// Name - READ-ONLY; Resource name.
2825	Name *string `json:"name,omitempty"`
2826	// Type - READ-ONLY; Resource type.
2827	Type *string `json:"type,omitempty"`
2828}
2829
2830// MarshalJSON is the custom marshaler for ElasticPoolDatabaseActivity.
2831func (epda ElasticPoolDatabaseActivity) MarshalJSON() ([]byte, error) {
2832	objectMap := make(map[string]interface{})
2833	if epda.Location != nil {
2834		objectMap["location"] = epda.Location
2835	}
2836	if epda.ElasticPoolDatabaseActivityProperties != nil {
2837		objectMap["properties"] = epda.ElasticPoolDatabaseActivityProperties
2838	}
2839	return json.Marshal(objectMap)
2840}
2841
2842// UnmarshalJSON is the custom unmarshaler for ElasticPoolDatabaseActivity struct.
2843func (epda *ElasticPoolDatabaseActivity) UnmarshalJSON(body []byte) error {
2844	var m map[string]*json.RawMessage
2845	err := json.Unmarshal(body, &m)
2846	if err != nil {
2847		return err
2848	}
2849	for k, v := range m {
2850		switch k {
2851		case "location":
2852			if v != nil {
2853				var location string
2854				err = json.Unmarshal(*v, &location)
2855				if err != nil {
2856					return err
2857				}
2858				epda.Location = &location
2859			}
2860		case "properties":
2861			if v != nil {
2862				var elasticPoolDatabaseActivityProperties ElasticPoolDatabaseActivityProperties
2863				err = json.Unmarshal(*v, &elasticPoolDatabaseActivityProperties)
2864				if err != nil {
2865					return err
2866				}
2867				epda.ElasticPoolDatabaseActivityProperties = &elasticPoolDatabaseActivityProperties
2868			}
2869		case "id":
2870			if v != nil {
2871				var ID string
2872				err = json.Unmarshal(*v, &ID)
2873				if err != nil {
2874					return err
2875				}
2876				epda.ID = &ID
2877			}
2878		case "name":
2879			if v != nil {
2880				var name string
2881				err = json.Unmarshal(*v, &name)
2882				if err != nil {
2883					return err
2884				}
2885				epda.Name = &name
2886			}
2887		case "type":
2888			if v != nil {
2889				var typeVar string
2890				err = json.Unmarshal(*v, &typeVar)
2891				if err != nil {
2892					return err
2893				}
2894				epda.Type = &typeVar
2895			}
2896		}
2897	}
2898
2899	return nil
2900}
2901
2902// ElasticPoolDatabaseActivityListResult represents the response to a list elastic pool database activity
2903// request.
2904type ElasticPoolDatabaseActivityListResult struct {
2905	autorest.Response `json:"-"`
2906	// Value - The list of elastic pool database activities.
2907	Value *[]ElasticPoolDatabaseActivity `json:"value,omitempty"`
2908}
2909
2910// ElasticPoolDatabaseActivityProperties represents the properties of an elastic pool database activity.
2911type ElasticPoolDatabaseActivityProperties struct {
2912	// DatabaseName - READ-ONLY; The database name.
2913	DatabaseName *string `json:"databaseName,omitempty"`
2914	// EndTime - READ-ONLY; The time the operation finished (ISO8601 format).
2915	EndTime *date.Time `json:"endTime,omitempty"`
2916	// ErrorCode - READ-ONLY; The error code if available.
2917	ErrorCode *int32 `json:"errorCode,omitempty"`
2918	// ErrorMessage - READ-ONLY; The error message if available.
2919	ErrorMessage *string `json:"errorMessage,omitempty"`
2920	// ErrorSeverity - READ-ONLY; The error severity if available.
2921	ErrorSeverity *int32 `json:"errorSeverity,omitempty"`
2922	// Operation - READ-ONLY; The operation name.
2923	Operation *string `json:"operation,omitempty"`
2924	// OperationID - READ-ONLY; The unique operation ID.
2925	OperationID *uuid.UUID `json:"operationId,omitempty"`
2926	// PercentComplete - READ-ONLY; The percentage complete if available.
2927	PercentComplete *int32 `json:"percentComplete,omitempty"`
2928	// RequestedElasticPoolName - READ-ONLY; The name for the elastic pool the database is moving into if available.
2929	RequestedElasticPoolName *string `json:"requestedElasticPoolName,omitempty"`
2930	// CurrentElasticPoolName - READ-ONLY; The name of the current elastic pool the database is in if available.
2931	CurrentElasticPoolName *string `json:"currentElasticPoolName,omitempty"`
2932	// CurrentServiceObjective - READ-ONLY; The name of the current service objective if available.
2933	CurrentServiceObjective *string `json:"currentServiceObjective,omitempty"`
2934	// RequestedServiceObjective - READ-ONLY; The name of the requested service objective if available.
2935	RequestedServiceObjective *string `json:"requestedServiceObjective,omitempty"`
2936	// ServerName - READ-ONLY; The name of the server the elastic pool is in.
2937	ServerName *string `json:"serverName,omitempty"`
2938	// StartTime - READ-ONLY; The time the operation started (ISO8601 format).
2939	StartTime *date.Time `json:"startTime,omitempty"`
2940	// State - READ-ONLY; The current state of the operation.
2941	State *string `json:"state,omitempty"`
2942}
2943
2944// ElasticPoolDtuCapability the Elastic Pool DTU capability.
2945type ElasticPoolDtuCapability struct {
2946	// Limit - READ-ONLY; The DTU limit for the pool.
2947	Limit *int32 `json:"limit,omitempty"`
2948	// MaxDatabaseCount - READ-ONLY; The maximum number of databases supported.
2949	MaxDatabaseCount *int32 `json:"maxDatabaseCount,omitempty"`
2950	// IncludedMaxSize - READ-ONLY; The included (free) max size for this DTU.
2951	IncludedMaxSize *MaxSizeCapability `json:"includedMaxSize,omitempty"`
2952	// SupportedMaxSizes - READ-ONLY; The list of supported max sizes.
2953	SupportedMaxSizes *[]MaxSizeCapability `json:"supportedMaxSizes,omitempty"`
2954	// SupportedPerDatabaseMaxSizes - READ-ONLY; The list of supported per database max sizes.
2955	SupportedPerDatabaseMaxSizes *[]MaxSizeCapability `json:"supportedPerDatabaseMaxSizes,omitempty"`
2956	// SupportedPerDatabaseMaxDtus - READ-ONLY; The list of supported per database max DTUs.
2957	SupportedPerDatabaseMaxDtus *[]ElasticPoolPerDatabaseMaxDtuCapability `json:"supportedPerDatabaseMaxDtus,omitempty"`
2958	// Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
2959	Status CapabilityStatus `json:"status,omitempty"`
2960	// Reason - The reason for the capability not being available.
2961	Reason *string `json:"reason,omitempty"`
2962}
2963
2964// ElasticPoolEditionCapability the elastic pool edition capability.
2965type ElasticPoolEditionCapability struct {
2966	// Name - READ-ONLY; The elastic pool edition name.
2967	Name *string `json:"name,omitempty"`
2968	// SupportedElasticPoolDtus - READ-ONLY; The list of supported elastic pool DTU levels for the edition.
2969	SupportedElasticPoolDtus *[]ElasticPoolDtuCapability `json:"supportedElasticPoolDtus,omitempty"`
2970	// Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
2971	Status CapabilityStatus `json:"status,omitempty"`
2972	// Reason - The reason for the capability not being available.
2973	Reason *string `json:"reason,omitempty"`
2974}
2975
2976// ElasticPoolListResult represents the response to a list elastic pool request.
2977type ElasticPoolListResult struct {
2978	autorest.Response `json:"-"`
2979	// Value - The list of elastic pools hosted in the server.
2980	Value *[]ElasticPool `json:"value,omitempty"`
2981}
2982
2983// ElasticPoolPerDatabaseMaxDtuCapability the max per-database DTU capability.
2984type ElasticPoolPerDatabaseMaxDtuCapability struct {
2985	// Limit - READ-ONLY; The maximum DTUs per database.
2986	Limit *int32 `json:"limit,omitempty"`
2987	// SupportedPerDatabaseMinDtus - READ-ONLY; The list of supported min database DTUs.
2988	SupportedPerDatabaseMinDtus *[]ElasticPoolPerDatabaseMinDtuCapability `json:"supportedPerDatabaseMinDtus,omitempty"`
2989	// Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
2990	Status CapabilityStatus `json:"status,omitempty"`
2991	// Reason - The reason for the capability not being available.
2992	Reason *string `json:"reason,omitempty"`
2993}
2994
2995// ElasticPoolPerDatabaseMinDtuCapability the minimum per-database DTU capability.
2996type ElasticPoolPerDatabaseMinDtuCapability struct {
2997	// Limit - READ-ONLY; The minimum DTUs per database.
2998	Limit *int32 `json:"limit,omitempty"`
2999	// Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
3000	Status CapabilityStatus `json:"status,omitempty"`
3001	// Reason - The reason for the capability not being available.
3002	Reason *string `json:"reason,omitempty"`
3003}
3004
3005// ElasticPoolProperties represents the properties of an elastic pool.
3006type ElasticPoolProperties struct {
3007	// CreationDate - READ-ONLY; The creation date of the elastic pool (ISO8601 format).
3008	CreationDate *date.Time `json:"creationDate,omitempty"`
3009	// State - READ-ONLY; The state of the elastic pool. Possible values include: 'ElasticPoolStateCreating', 'ElasticPoolStateReady', 'ElasticPoolStateDisabled'
3010	State ElasticPoolState `json:"state,omitempty"`
3011	// Edition - The edition of the elastic pool. Possible values include: 'ElasticPoolEditionBasic', 'ElasticPoolEditionStandard', 'ElasticPoolEditionPremium', 'ElasticPoolEditionGeneralPurpose', 'ElasticPoolEditionBusinessCritical'
3012	Edition ElasticPoolEdition `json:"edition,omitempty"`
3013	// Dtu - The total shared DTU for the database elastic pool.
3014	Dtu *int32 `json:"dtu,omitempty"`
3015	// DatabaseDtuMax - The maximum DTU any one database can consume.
3016	DatabaseDtuMax *int32 `json:"databaseDtuMax,omitempty"`
3017	// DatabaseDtuMin - The minimum DTU all databases are guaranteed.
3018	DatabaseDtuMin *int32 `json:"databaseDtuMin,omitempty"`
3019	// StorageMB - Gets storage limit for the database elastic pool in MB.
3020	StorageMB *int32 `json:"storageMB,omitempty"`
3021	// ZoneRedundant - Whether or not this database elastic pool is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
3022	ZoneRedundant *bool `json:"zoneRedundant,omitempty"`
3023}
3024
3025// ElasticPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3026// long-running operation.
3027type ElasticPoolsCreateOrUpdateFuture struct {
3028	azure.Future
3029}
3030
3031// Result returns the result of the asynchronous operation.
3032// If the operation has not completed it will return an error.
3033func (future *ElasticPoolsCreateOrUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
3034	var done bool
3035	done, err = future.DoneWithContext(context.Background(), client)
3036	if err != nil {
3037		err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3038		return
3039	}
3040	if !done {
3041		err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsCreateOrUpdateFuture")
3042		return
3043	}
3044	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3045	if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent {
3046		ep, err = client.CreateOrUpdateResponder(ep.Response.Response)
3047		if err != nil {
3048			err = autorest.NewErrorWithError(err, "sql.ElasticPoolsCreateOrUpdateFuture", "Result", ep.Response.Response, "Failure responding to request")
3049		}
3050	}
3051	return
3052}
3053
3054// ElasticPoolsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
3055// operation.
3056type ElasticPoolsUpdateFuture struct {
3057	azure.Future
3058}
3059
3060// Result returns the result of the asynchronous operation.
3061// If the operation has not completed it will return an error.
3062func (future *ElasticPoolsUpdateFuture) Result(client ElasticPoolsClient) (ep ElasticPool, err error) {
3063	var done bool
3064	done, err = future.DoneWithContext(context.Background(), client)
3065	if err != nil {
3066		err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", future.Response(), "Polling failure")
3067		return
3068	}
3069	if !done {
3070		err = azure.NewAsyncOpIncompleteError("sql.ElasticPoolsUpdateFuture")
3071		return
3072	}
3073	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3074	if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent {
3075		ep, err = client.UpdateResponder(ep.Response.Response)
3076		if err != nil {
3077			err = autorest.NewErrorWithError(err, "sql.ElasticPoolsUpdateFuture", "Result", ep.Response.Response, "Failure responding to request")
3078		}
3079	}
3080	return
3081}
3082
3083// ElasticPoolUpdate represents an elastic pool update.
3084type ElasticPoolUpdate struct {
3085	// Tags - Resource tags.
3086	Tags map[string]*string `json:"tags"`
3087	// ElasticPoolProperties - The properties representing the resource.
3088	*ElasticPoolProperties `json:"properties,omitempty"`
3089	// ID - READ-ONLY; Resource ID.
3090	ID *string `json:"id,omitempty"`
3091	// Name - READ-ONLY; Resource name.
3092	Name *string `json:"name,omitempty"`
3093	// Type - READ-ONLY; Resource type.
3094	Type *string `json:"type,omitempty"`
3095}
3096
3097// MarshalJSON is the custom marshaler for ElasticPoolUpdate.
3098func (epu ElasticPoolUpdate) MarshalJSON() ([]byte, error) {
3099	objectMap := make(map[string]interface{})
3100	if epu.Tags != nil {
3101		objectMap["tags"] = epu.Tags
3102	}
3103	if epu.ElasticPoolProperties != nil {
3104		objectMap["properties"] = epu.ElasticPoolProperties
3105	}
3106	return json.Marshal(objectMap)
3107}
3108
3109// UnmarshalJSON is the custom unmarshaler for ElasticPoolUpdate struct.
3110func (epu *ElasticPoolUpdate) UnmarshalJSON(body []byte) error {
3111	var m map[string]*json.RawMessage
3112	err := json.Unmarshal(body, &m)
3113	if err != nil {
3114		return err
3115	}
3116	for k, v := range m {
3117		switch k {
3118		case "tags":
3119			if v != nil {
3120				var tags map[string]*string
3121				err = json.Unmarshal(*v, &tags)
3122				if err != nil {
3123					return err
3124				}
3125				epu.Tags = tags
3126			}
3127		case "properties":
3128			if v != nil {
3129				var elasticPoolProperties ElasticPoolProperties
3130				err = json.Unmarshal(*v, &elasticPoolProperties)
3131				if err != nil {
3132					return err
3133				}
3134				epu.ElasticPoolProperties = &elasticPoolProperties
3135			}
3136		case "id":
3137			if v != nil {
3138				var ID string
3139				err = json.Unmarshal(*v, &ID)
3140				if err != nil {
3141					return err
3142				}
3143				epu.ID = &ID
3144			}
3145		case "name":
3146			if v != nil {
3147				var name string
3148				err = json.Unmarshal(*v, &name)
3149				if err != nil {
3150					return err
3151				}
3152				epu.Name = &name
3153			}
3154		case "type":
3155			if v != nil {
3156				var typeVar string
3157				err = json.Unmarshal(*v, &typeVar)
3158				if err != nil {
3159					return err
3160				}
3161				epu.Type = &typeVar
3162			}
3163		}
3164	}
3165
3166	return nil
3167}
3168
3169// EncryptionProtector the server encryption protector.
3170type EncryptionProtector struct {
3171	autorest.Response `json:"-"`
3172	// Kind - READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience.
3173	Kind *string `json:"kind,omitempty"`
3174	// Location - READ-ONLY; Resource location.
3175	Location *string `json:"location,omitempty"`
3176	// EncryptionProtectorProperties - Resource properties.
3177	*EncryptionProtectorProperties `json:"properties,omitempty"`
3178	// ID - READ-ONLY; Resource ID.
3179	ID *string `json:"id,omitempty"`
3180	// Name - READ-ONLY; Resource name.
3181	Name *string `json:"name,omitempty"`
3182	// Type - READ-ONLY; Resource type.
3183	Type *string `json:"type,omitempty"`
3184}
3185
3186// MarshalJSON is the custom marshaler for EncryptionProtector.
3187func (ep EncryptionProtector) MarshalJSON() ([]byte, error) {
3188	objectMap := make(map[string]interface{})
3189	if ep.EncryptionProtectorProperties != nil {
3190		objectMap["properties"] = ep.EncryptionProtectorProperties
3191	}
3192	return json.Marshal(objectMap)
3193}
3194
3195// UnmarshalJSON is the custom unmarshaler for EncryptionProtector struct.
3196func (ep *EncryptionProtector) UnmarshalJSON(body []byte) error {
3197	var m map[string]*json.RawMessage
3198	err := json.Unmarshal(body, &m)
3199	if err != nil {
3200		return err
3201	}
3202	for k, v := range m {
3203		switch k {
3204		case "kind":
3205			if v != nil {
3206				var kind string
3207				err = json.Unmarshal(*v, &kind)
3208				if err != nil {
3209					return err
3210				}
3211				ep.Kind = &kind
3212			}
3213		case "location":
3214			if v != nil {
3215				var location string
3216				err = json.Unmarshal(*v, &location)
3217				if err != nil {
3218					return err
3219				}
3220				ep.Location = &location
3221			}
3222		case "properties":
3223			if v != nil {
3224				var encryptionProtectorProperties EncryptionProtectorProperties
3225				err = json.Unmarshal(*v, &encryptionProtectorProperties)
3226				if err != nil {
3227					return err
3228				}
3229				ep.EncryptionProtectorProperties = &encryptionProtectorProperties
3230			}
3231		case "id":
3232			if v != nil {
3233				var ID string
3234				err = json.Unmarshal(*v, &ID)
3235				if err != nil {
3236					return err
3237				}
3238				ep.ID = &ID
3239			}
3240		case "name":
3241			if v != nil {
3242				var name string
3243				err = json.Unmarshal(*v, &name)
3244				if err != nil {
3245					return err
3246				}
3247				ep.Name = &name
3248			}
3249		case "type":
3250			if v != nil {
3251				var typeVar string
3252				err = json.Unmarshal(*v, &typeVar)
3253				if err != nil {
3254					return err
3255				}
3256				ep.Type = &typeVar
3257			}
3258		}
3259	}
3260
3261	return nil
3262}
3263
3264// EncryptionProtectorListResult a list of server encryption protectors.
3265type EncryptionProtectorListResult struct {
3266	autorest.Response `json:"-"`
3267	// Value - READ-ONLY; Array of results.
3268	Value *[]EncryptionProtector `json:"value,omitempty"`
3269	// NextLink - READ-ONLY; Link to retrieve next page of results.
3270	NextLink *string `json:"nextLink,omitempty"`
3271}
3272
3273// EncryptionProtectorListResultIterator provides access to a complete listing of EncryptionProtector
3274// values.
3275type EncryptionProtectorListResultIterator struct {
3276	i    int
3277	page EncryptionProtectorListResultPage
3278}
3279
3280// NextWithContext advances to the next value.  If there was an error making
3281// the request the iterator does not advance and the error is returned.
3282func (iter *EncryptionProtectorListResultIterator) NextWithContext(ctx context.Context) (err error) {
3283	if tracing.IsEnabled() {
3284		ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorListResultIterator.NextWithContext")
3285		defer func() {
3286			sc := -1
3287			if iter.Response().Response.Response != nil {
3288				sc = iter.Response().Response.Response.StatusCode
3289			}
3290			tracing.EndSpan(ctx, sc, err)
3291		}()
3292	}
3293	iter.i++
3294	if iter.i < len(iter.page.Values()) {
3295		return nil
3296	}
3297	err = iter.page.NextWithContext(ctx)
3298	if err != nil {
3299		iter.i--
3300		return err
3301	}
3302	iter.i = 0
3303	return nil
3304}
3305
3306// Next advances to the next value.  If there was an error making
3307// the request the iterator does not advance and the error is returned.
3308// Deprecated: Use NextWithContext() instead.
3309func (iter *EncryptionProtectorListResultIterator) Next() error {
3310	return iter.NextWithContext(context.Background())
3311}
3312
3313// NotDone returns true if the enumeration should be started or is not yet complete.
3314func (iter EncryptionProtectorListResultIterator) NotDone() bool {
3315	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3316}
3317
3318// Response returns the raw server response from the last page request.
3319func (iter EncryptionProtectorListResultIterator) Response() EncryptionProtectorListResult {
3320	return iter.page.Response()
3321}
3322
3323// Value returns the current value or a zero-initialized value if the
3324// iterator has advanced beyond the end of the collection.
3325func (iter EncryptionProtectorListResultIterator) Value() EncryptionProtector {
3326	if !iter.page.NotDone() {
3327		return EncryptionProtector{}
3328	}
3329	return iter.page.Values()[iter.i]
3330}
3331
3332// Creates a new instance of the EncryptionProtectorListResultIterator type.
3333func NewEncryptionProtectorListResultIterator(page EncryptionProtectorListResultPage) EncryptionProtectorListResultIterator {
3334	return EncryptionProtectorListResultIterator{page: page}
3335}
3336
3337// IsEmpty returns true if the ListResult contains no values.
3338func (eplr EncryptionProtectorListResult) IsEmpty() bool {
3339	return eplr.Value == nil || len(*eplr.Value) == 0
3340}
3341
3342// encryptionProtectorListResultPreparer prepares a request to retrieve the next set of results.
3343// It returns nil if no more results exist.
3344func (eplr EncryptionProtectorListResult) encryptionProtectorListResultPreparer(ctx context.Context) (*http.Request, error) {
3345	if eplr.NextLink == nil || len(to.String(eplr.NextLink)) < 1 {
3346		return nil, nil
3347	}
3348	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3349		autorest.AsJSON(),
3350		autorest.AsGet(),
3351		autorest.WithBaseURL(to.String(eplr.NextLink)))
3352}
3353
3354// EncryptionProtectorListResultPage contains a page of EncryptionProtector values.
3355type EncryptionProtectorListResultPage struct {
3356	fn   func(context.Context, EncryptionProtectorListResult) (EncryptionProtectorListResult, error)
3357	eplr EncryptionProtectorListResult
3358}
3359
3360// NextWithContext advances to the next page of values.  If there was an error making
3361// the request the page does not advance and the error is returned.
3362func (page *EncryptionProtectorListResultPage) NextWithContext(ctx context.Context) (err error) {
3363	if tracing.IsEnabled() {
3364		ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorListResultPage.NextWithContext")
3365		defer func() {
3366			sc := -1
3367			if page.Response().Response.Response != nil {
3368				sc = page.Response().Response.Response.StatusCode
3369			}
3370			tracing.EndSpan(ctx, sc, err)
3371		}()
3372	}
3373	next, err := page.fn(ctx, page.eplr)
3374	if err != nil {
3375		return err
3376	}
3377	page.eplr = next
3378	return nil
3379}
3380
3381// Next advances to the next page of values.  If there was an error making
3382// the request the page does not advance and the error is returned.
3383// Deprecated: Use NextWithContext() instead.
3384func (page *EncryptionProtectorListResultPage) Next() error {
3385	return page.NextWithContext(context.Background())
3386}
3387
3388// NotDone returns true if the page enumeration should be started or is not yet complete.
3389func (page EncryptionProtectorListResultPage) NotDone() bool {
3390	return !page.eplr.IsEmpty()
3391}
3392
3393// Response returns the raw server response from the last page request.
3394func (page EncryptionProtectorListResultPage) Response() EncryptionProtectorListResult {
3395	return page.eplr
3396}
3397
3398// Values returns the slice of values for the current page or nil if there are no values.
3399func (page EncryptionProtectorListResultPage) Values() []EncryptionProtector {
3400	if page.eplr.IsEmpty() {
3401		return nil
3402	}
3403	return *page.eplr.Value
3404}
3405
3406// Creates a new instance of the EncryptionProtectorListResultPage type.
3407func NewEncryptionProtectorListResultPage(getNextPage func(context.Context, EncryptionProtectorListResult) (EncryptionProtectorListResult, error)) EncryptionProtectorListResultPage {
3408	return EncryptionProtectorListResultPage{fn: getNextPage}
3409}
3410
3411// EncryptionProtectorProperties properties for an encryption protector execution.
3412type EncryptionProtectorProperties struct {
3413	// Subregion - READ-ONLY; Subregion of the encryption protector.
3414	Subregion *string `json:"subregion,omitempty"`
3415	// ServerKeyName - The name of the server key.
3416	ServerKeyName *string `json:"serverKeyName,omitempty"`
3417	// ServerKeyType - The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault'
3418	ServerKeyType ServerKeyType `json:"serverKeyType,omitempty"`
3419	// URI - READ-ONLY; The URI of the server key.
3420	URI *string `json:"uri,omitempty"`
3421	// Thumbprint - READ-ONLY; Thumbprint of the server key.
3422	Thumbprint *string `json:"thumbprint,omitempty"`
3423}
3424
3425// EncryptionProtectorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3426// long-running operation.
3427type EncryptionProtectorsCreateOrUpdateFuture struct {
3428	azure.Future
3429}
3430
3431// Result returns the result of the asynchronous operation.
3432// If the operation has not completed it will return an error.
3433func (future *EncryptionProtectorsCreateOrUpdateFuture) Result(client EncryptionProtectorsClient) (ep EncryptionProtector, err error) {
3434	var done bool
3435	done, err = future.DoneWithContext(context.Background(), client)
3436	if err != nil {
3437		err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3438		return
3439	}
3440	if !done {
3441		err = azure.NewAsyncOpIncompleteError("sql.EncryptionProtectorsCreateOrUpdateFuture")
3442		return
3443	}
3444	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3445	if ep.Response.Response, err = future.GetResult(sender); err == nil && ep.Response.Response.StatusCode != http.StatusNoContent {
3446		ep, err = client.CreateOrUpdateResponder(ep.Response.Response)
3447		if err != nil {
3448			err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsCreateOrUpdateFuture", "Result", ep.Response.Response, "Failure responding to request")
3449		}
3450	}
3451	return
3452}
3453
3454// EncryptionProtectorsRevalidateFuture an abstraction for monitoring and retrieving the results of a
3455// long-running operation.
3456type EncryptionProtectorsRevalidateFuture struct {
3457	azure.Future
3458}
3459
3460// Result returns the result of the asynchronous operation.
3461// If the operation has not completed it will return an error.
3462func (future *EncryptionProtectorsRevalidateFuture) Result(client EncryptionProtectorsClient) (ar autorest.Response, err error) {
3463	var done bool
3464	done, err = future.DoneWithContext(context.Background(), client)
3465	if err != nil {
3466		err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsRevalidateFuture", "Result", future.Response(), "Polling failure")
3467		return
3468	}
3469	if !done {
3470		err = azure.NewAsyncOpIncompleteError("sql.EncryptionProtectorsRevalidateFuture")
3471		return
3472	}
3473	ar.Response = future.Response()
3474	return
3475}
3476
3477// ExportRequest export database parameters.
3478type ExportRequest struct {
3479	// StorageKeyType - The type of the storage key to use. Possible values include: 'StorageAccessKey', 'SharedAccessKey'
3480	StorageKeyType StorageKeyType `json:"storageKeyType,omitempty"`
3481	// StorageKey - The storage key to use.  If storage key type is SharedAccessKey, it must be preceded with a "?."
3482	StorageKey *string `json:"storageKey,omitempty"`
3483	// StorageURI - The storage uri to use.
3484	StorageURI *string `json:"storageUri,omitempty"`
3485	// AdministratorLogin - The name of the SQL administrator.
3486	AdministratorLogin *string `json:"administratorLogin,omitempty"`
3487	// AdministratorLoginPassword - The password of the SQL administrator.
3488	AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"`
3489	// AuthenticationType - The authentication type. Possible values include: 'SQL', 'ADPassword'
3490	AuthenticationType AuthenticationType `json:"authenticationType,omitempty"`
3491}
3492
3493// FailoverGroup a failover group.
3494type FailoverGroup struct {
3495	autorest.Response `json:"-"`
3496	// Location - READ-ONLY; Resource location.
3497	Location *string `json:"location,omitempty"`
3498	// Tags - Resource tags.
3499	Tags map[string]*string `json:"tags"`
3500	// FailoverGroupProperties - Resource properties.
3501	*FailoverGroupProperties `json:"properties,omitempty"`
3502	// ID - READ-ONLY; Resource ID.
3503	ID *string `json:"id,omitempty"`
3504	// Name - READ-ONLY; Resource name.
3505	Name *string `json:"name,omitempty"`
3506	// Type - READ-ONLY; Resource type.
3507	Type *string `json:"type,omitempty"`
3508}
3509
3510// MarshalJSON is the custom marshaler for FailoverGroup.
3511func (fg FailoverGroup) MarshalJSON() ([]byte, error) {
3512	objectMap := make(map[string]interface{})
3513	if fg.Tags != nil {
3514		objectMap["tags"] = fg.Tags
3515	}
3516	if fg.FailoverGroupProperties != nil {
3517		objectMap["properties"] = fg.FailoverGroupProperties
3518	}
3519	return json.Marshal(objectMap)
3520}
3521
3522// UnmarshalJSON is the custom unmarshaler for FailoverGroup struct.
3523func (fg *FailoverGroup) UnmarshalJSON(body []byte) error {
3524	var m map[string]*json.RawMessage
3525	err := json.Unmarshal(body, &m)
3526	if err != nil {
3527		return err
3528	}
3529	for k, v := range m {
3530		switch k {
3531		case "location":
3532			if v != nil {
3533				var location string
3534				err = json.Unmarshal(*v, &location)
3535				if err != nil {
3536					return err
3537				}
3538				fg.Location = &location
3539			}
3540		case "tags":
3541			if v != nil {
3542				var tags map[string]*string
3543				err = json.Unmarshal(*v, &tags)
3544				if err != nil {
3545					return err
3546				}
3547				fg.Tags = tags
3548			}
3549		case "properties":
3550			if v != nil {
3551				var failoverGroupProperties FailoverGroupProperties
3552				err = json.Unmarshal(*v, &failoverGroupProperties)
3553				if err != nil {
3554					return err
3555				}
3556				fg.FailoverGroupProperties = &failoverGroupProperties
3557			}
3558		case "id":
3559			if v != nil {
3560				var ID string
3561				err = json.Unmarshal(*v, &ID)
3562				if err != nil {
3563					return err
3564				}
3565				fg.ID = &ID
3566			}
3567		case "name":
3568			if v != nil {
3569				var name string
3570				err = json.Unmarshal(*v, &name)
3571				if err != nil {
3572					return err
3573				}
3574				fg.Name = &name
3575			}
3576		case "type":
3577			if v != nil {
3578				var typeVar string
3579				err = json.Unmarshal(*v, &typeVar)
3580				if err != nil {
3581					return err
3582				}
3583				fg.Type = &typeVar
3584			}
3585		}
3586	}
3587
3588	return nil
3589}
3590
3591// FailoverGroupListResult a list of failover groups.
3592type FailoverGroupListResult struct {
3593	autorest.Response `json:"-"`
3594	// Value - READ-ONLY; Array of results.
3595	Value *[]FailoverGroup `json:"value,omitempty"`
3596	// NextLink - READ-ONLY; Link to retrieve next page of results.
3597	NextLink *string `json:"nextLink,omitempty"`
3598}
3599
3600// FailoverGroupListResultIterator provides access to a complete listing of FailoverGroup values.
3601type FailoverGroupListResultIterator struct {
3602	i    int
3603	page FailoverGroupListResultPage
3604}
3605
3606// NextWithContext advances to the next value.  If there was an error making
3607// the request the iterator does not advance and the error is returned.
3608func (iter *FailoverGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
3609	if tracing.IsEnabled() {
3610		ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupListResultIterator.NextWithContext")
3611		defer func() {
3612			sc := -1
3613			if iter.Response().Response.Response != nil {
3614				sc = iter.Response().Response.Response.StatusCode
3615			}
3616			tracing.EndSpan(ctx, sc, err)
3617		}()
3618	}
3619	iter.i++
3620	if iter.i < len(iter.page.Values()) {
3621		return nil
3622	}
3623	err = iter.page.NextWithContext(ctx)
3624	if err != nil {
3625		iter.i--
3626		return err
3627	}
3628	iter.i = 0
3629	return nil
3630}
3631
3632// Next advances to the next value.  If there was an error making
3633// the request the iterator does not advance and the error is returned.
3634// Deprecated: Use NextWithContext() instead.
3635func (iter *FailoverGroupListResultIterator) Next() error {
3636	return iter.NextWithContext(context.Background())
3637}
3638
3639// NotDone returns true if the enumeration should be started or is not yet complete.
3640func (iter FailoverGroupListResultIterator) NotDone() bool {
3641	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3642}
3643
3644// Response returns the raw server response from the last page request.
3645func (iter FailoverGroupListResultIterator) Response() FailoverGroupListResult {
3646	return iter.page.Response()
3647}
3648
3649// Value returns the current value or a zero-initialized value if the
3650// iterator has advanced beyond the end of the collection.
3651func (iter FailoverGroupListResultIterator) Value() FailoverGroup {
3652	if !iter.page.NotDone() {
3653		return FailoverGroup{}
3654	}
3655	return iter.page.Values()[iter.i]
3656}
3657
3658// Creates a new instance of the FailoverGroupListResultIterator type.
3659func NewFailoverGroupListResultIterator(page FailoverGroupListResultPage) FailoverGroupListResultIterator {
3660	return FailoverGroupListResultIterator{page: page}
3661}
3662
3663// IsEmpty returns true if the ListResult contains no values.
3664func (fglr FailoverGroupListResult) IsEmpty() bool {
3665	return fglr.Value == nil || len(*fglr.Value) == 0
3666}
3667
3668// failoverGroupListResultPreparer prepares a request to retrieve the next set of results.
3669// It returns nil if no more results exist.
3670func (fglr FailoverGroupListResult) failoverGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3671	if fglr.NextLink == nil || len(to.String(fglr.NextLink)) < 1 {
3672		return nil, nil
3673	}
3674	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3675		autorest.AsJSON(),
3676		autorest.AsGet(),
3677		autorest.WithBaseURL(to.String(fglr.NextLink)))
3678}
3679
3680// FailoverGroupListResultPage contains a page of FailoverGroup values.
3681type FailoverGroupListResultPage struct {
3682	fn   func(context.Context, FailoverGroupListResult) (FailoverGroupListResult, error)
3683	fglr FailoverGroupListResult
3684}
3685
3686// NextWithContext advances to the next page of values.  If there was an error making
3687// the request the page does not advance and the error is returned.
3688func (page *FailoverGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3689	if tracing.IsEnabled() {
3690		ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupListResultPage.NextWithContext")
3691		defer func() {
3692			sc := -1
3693			if page.Response().Response.Response != nil {
3694				sc = page.Response().Response.Response.StatusCode
3695			}
3696			tracing.EndSpan(ctx, sc, err)
3697		}()
3698	}
3699	next, err := page.fn(ctx, page.fglr)
3700	if err != nil {
3701		return err
3702	}
3703	page.fglr = next
3704	return nil
3705}
3706
3707// Next advances to the next page of values.  If there was an error making
3708// the request the page does not advance and the error is returned.
3709// Deprecated: Use NextWithContext() instead.
3710func (page *FailoverGroupListResultPage) Next() error {
3711	return page.NextWithContext(context.Background())
3712}
3713
3714// NotDone returns true if the page enumeration should be started or is not yet complete.
3715func (page FailoverGroupListResultPage) NotDone() bool {
3716	return !page.fglr.IsEmpty()
3717}
3718
3719// Response returns the raw server response from the last page request.
3720func (page FailoverGroupListResultPage) Response() FailoverGroupListResult {
3721	return page.fglr
3722}
3723
3724// Values returns the slice of values for the current page or nil if there are no values.
3725func (page FailoverGroupListResultPage) Values() []FailoverGroup {
3726	if page.fglr.IsEmpty() {
3727		return nil
3728	}
3729	return *page.fglr.Value
3730}
3731
3732// Creates a new instance of the FailoverGroupListResultPage type.
3733func NewFailoverGroupListResultPage(getNextPage func(context.Context, FailoverGroupListResult) (FailoverGroupListResult, error)) FailoverGroupListResultPage {
3734	return FailoverGroupListResultPage{fn: getNextPage}
3735}
3736
3737// FailoverGroupProperties properties of a failover group.
3738type FailoverGroupProperties struct {
3739	// ReadWriteEndpoint - Read-write endpoint of the failover group instance.
3740	ReadWriteEndpoint *FailoverGroupReadWriteEndpoint `json:"readWriteEndpoint,omitempty"`
3741	// ReadOnlyEndpoint - Read-only endpoint of the failover group instance.
3742	ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint `json:"readOnlyEndpoint,omitempty"`
3743	// ReplicationRole - READ-ONLY; Local replication role of the failover group instance. Possible values include: 'Primary', 'Secondary'
3744	ReplicationRole FailoverGroupReplicationRole `json:"replicationRole,omitempty"`
3745	// ReplicationState - READ-ONLY; Replication state of the failover group instance.
3746	ReplicationState *string `json:"replicationState,omitempty"`
3747	// PartnerServers - List of partner server information for the failover group.
3748	PartnerServers *[]PartnerInfo `json:"partnerServers,omitempty"`
3749	// Databases - List of databases in the failover group.
3750	Databases *[]string `json:"databases,omitempty"`
3751}
3752
3753// FailoverGroupReadOnlyEndpoint read-only endpoint of the failover group instance.
3754type FailoverGroupReadOnlyEndpoint struct {
3755	// FailoverPolicy - Failover policy of the read-only endpoint for the failover group. Possible values include: 'ReadOnlyEndpointFailoverPolicyDisabled', 'ReadOnlyEndpointFailoverPolicyEnabled'
3756	FailoverPolicy ReadOnlyEndpointFailoverPolicy `json:"failoverPolicy,omitempty"`
3757}
3758
3759// FailoverGroupReadWriteEndpoint read-write endpoint of the failover group instance.
3760type FailoverGroupReadWriteEndpoint struct {
3761	// FailoverPolicy - Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. Possible values include: 'Manual', 'Automatic'
3762	FailoverPolicy ReadWriteEndpointFailoverPolicy `json:"failoverPolicy,omitempty"`
3763	// FailoverWithDataLossGracePeriodMinutes - Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
3764	FailoverWithDataLossGracePeriodMinutes *int32 `json:"failoverWithDataLossGracePeriodMinutes,omitempty"`
3765}
3766
3767// FailoverGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3768// long-running operation.
3769type FailoverGroupsCreateOrUpdateFuture struct {
3770	azure.Future
3771}
3772
3773// Result returns the result of the asynchronous operation.
3774// If the operation has not completed it will return an error.
3775func (future *FailoverGroupsCreateOrUpdateFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
3776	var done bool
3777	done, err = future.DoneWithContext(context.Background(), client)
3778	if err != nil {
3779		err = autorest.NewErrorWithError(err, "sql.FailoverGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3780		return
3781	}
3782	if !done {
3783		err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsCreateOrUpdateFuture")
3784		return
3785	}
3786	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3787	if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent {
3788		fg, err = client.CreateOrUpdateResponder(fg.Response.Response)
3789		if err != nil {
3790			err = autorest.NewErrorWithError(err, "sql.FailoverGroupsCreateOrUpdateFuture", "Result", fg.Response.Response, "Failure responding to request")
3791		}
3792	}
3793	return
3794}
3795
3796// FailoverGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
3797// operation.
3798type FailoverGroupsDeleteFuture struct {
3799	azure.Future
3800}
3801
3802// Result returns the result of the asynchronous operation.
3803// If the operation has not completed it will return an error.
3804func (future *FailoverGroupsDeleteFuture) Result(client FailoverGroupsClient) (ar autorest.Response, err error) {
3805	var done bool
3806	done, err = future.DoneWithContext(context.Background(), client)
3807	if err != nil {
3808		err = autorest.NewErrorWithError(err, "sql.FailoverGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3809		return
3810	}
3811	if !done {
3812		err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsDeleteFuture")
3813		return
3814	}
3815	ar.Response = future.Response()
3816	return
3817}
3818
3819// FailoverGroupsFailoverFuture an abstraction for monitoring and retrieving the results of a long-running
3820// operation.
3821type FailoverGroupsFailoverFuture struct {
3822	azure.Future
3823}
3824
3825// Result returns the result of the asynchronous operation.
3826// If the operation has not completed it will return an error.
3827func (future *FailoverGroupsFailoverFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
3828	var done bool
3829	done, err = future.DoneWithContext(context.Background(), client)
3830	if err != nil {
3831		err = autorest.NewErrorWithError(err, "sql.FailoverGroupsFailoverFuture", "Result", future.Response(), "Polling failure")
3832		return
3833	}
3834	if !done {
3835		err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsFailoverFuture")
3836		return
3837	}
3838	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3839	if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent {
3840		fg, err = client.FailoverResponder(fg.Response.Response)
3841		if err != nil {
3842			err = autorest.NewErrorWithError(err, "sql.FailoverGroupsFailoverFuture", "Result", fg.Response.Response, "Failure responding to request")
3843		}
3844	}
3845	return
3846}
3847
3848// FailoverGroupsForceFailoverAllowDataLossFuture an abstraction for monitoring and retrieving the results
3849// of a long-running operation.
3850type FailoverGroupsForceFailoverAllowDataLossFuture struct {
3851	azure.Future
3852}
3853
3854// Result returns the result of the asynchronous operation.
3855// If the operation has not completed it will return an error.
3856func (future *FailoverGroupsForceFailoverAllowDataLossFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
3857	var done bool
3858	done, err = future.DoneWithContext(context.Background(), client)
3859	if err != nil {
3860		err = autorest.NewErrorWithError(err, "sql.FailoverGroupsForceFailoverAllowDataLossFuture", "Result", future.Response(), "Polling failure")
3861		return
3862	}
3863	if !done {
3864		err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsForceFailoverAllowDataLossFuture")
3865		return
3866	}
3867	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3868	if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent {
3869		fg, err = client.ForceFailoverAllowDataLossResponder(fg.Response.Response)
3870		if err != nil {
3871			err = autorest.NewErrorWithError(err, "sql.FailoverGroupsForceFailoverAllowDataLossFuture", "Result", fg.Response.Response, "Failure responding to request")
3872		}
3873	}
3874	return
3875}
3876
3877// FailoverGroupsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
3878// operation.
3879type FailoverGroupsUpdateFuture struct {
3880	azure.Future
3881}
3882
3883// Result returns the result of the asynchronous operation.
3884// If the operation has not completed it will return an error.
3885func (future *FailoverGroupsUpdateFuture) Result(client FailoverGroupsClient) (fg FailoverGroup, err error) {
3886	var done bool
3887	done, err = future.DoneWithContext(context.Background(), client)
3888	if err != nil {
3889		err = autorest.NewErrorWithError(err, "sql.FailoverGroupsUpdateFuture", "Result", future.Response(), "Polling failure")
3890		return
3891	}
3892	if !done {
3893		err = azure.NewAsyncOpIncompleteError("sql.FailoverGroupsUpdateFuture")
3894		return
3895	}
3896	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3897	if fg.Response.Response, err = future.GetResult(sender); err == nil && fg.Response.Response.StatusCode != http.StatusNoContent {
3898		fg, err = client.UpdateResponder(fg.Response.Response)
3899		if err != nil {
3900			err = autorest.NewErrorWithError(err, "sql.FailoverGroupsUpdateFuture", "Result", fg.Response.Response, "Failure responding to request")
3901		}
3902	}
3903	return
3904}
3905
3906// FailoverGroupUpdate a failover group update request.
3907type FailoverGroupUpdate struct {
3908	// FailoverGroupUpdateProperties - Resource properties.
3909	*FailoverGroupUpdateProperties `json:"properties,omitempty"`
3910	// Tags - Resource tags.
3911	Tags map[string]*string `json:"tags"`
3912}
3913
3914// MarshalJSON is the custom marshaler for FailoverGroupUpdate.
3915func (fgu FailoverGroupUpdate) MarshalJSON() ([]byte, error) {
3916	objectMap := make(map[string]interface{})
3917	if fgu.FailoverGroupUpdateProperties != nil {
3918		objectMap["properties"] = fgu.FailoverGroupUpdateProperties
3919	}
3920	if fgu.Tags != nil {
3921		objectMap["tags"] = fgu.Tags
3922	}
3923	return json.Marshal(objectMap)
3924}
3925
3926// UnmarshalJSON is the custom unmarshaler for FailoverGroupUpdate struct.
3927func (fgu *FailoverGroupUpdate) UnmarshalJSON(body []byte) error {
3928	var m map[string]*json.RawMessage
3929	err := json.Unmarshal(body, &m)
3930	if err != nil {
3931		return err
3932	}
3933	for k, v := range m {
3934		switch k {
3935		case "properties":
3936			if v != nil {
3937				var failoverGroupUpdateProperties FailoverGroupUpdateProperties
3938				err = json.Unmarshal(*v, &failoverGroupUpdateProperties)
3939				if err != nil {
3940					return err
3941				}
3942				fgu.FailoverGroupUpdateProperties = &failoverGroupUpdateProperties
3943			}
3944		case "tags":
3945			if v != nil {
3946				var tags map[string]*string
3947				err = json.Unmarshal(*v, &tags)
3948				if err != nil {
3949					return err
3950				}
3951				fgu.Tags = tags
3952			}
3953		}
3954	}
3955
3956	return nil
3957}
3958
3959// FailoverGroupUpdateProperties properties of a failover group update.
3960type FailoverGroupUpdateProperties struct {
3961	// ReadWriteEndpoint - Read-write endpoint of the failover group instance.
3962	ReadWriteEndpoint *FailoverGroupReadWriteEndpoint `json:"readWriteEndpoint,omitempty"`
3963	// ReadOnlyEndpoint - Read-only endpoint of the failover group instance.
3964	ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint `json:"readOnlyEndpoint,omitempty"`
3965	// Databases - List of databases in the failover group.
3966	Databases *[]string `json:"databases,omitempty"`
3967}
3968
3969// FirewallRule represents a server firewall rule.
3970type FirewallRule struct {
3971	autorest.Response `json:"-"`
3972	// Kind - READ-ONLY; Kind of server that contains this firewall rule.
3973	Kind *string `json:"kind,omitempty"`
3974	// Location - READ-ONLY; Location of the server that contains this firewall rule.
3975	Location *string `json:"location,omitempty"`
3976	// FirewallRuleProperties - The properties representing the resource.
3977	*FirewallRuleProperties `json:"properties,omitempty"`
3978	// ID - READ-ONLY; Resource ID.
3979	ID *string `json:"id,omitempty"`
3980	// Name - READ-ONLY; Resource name.
3981	Name *string `json:"name,omitempty"`
3982	// Type - READ-ONLY; Resource type.
3983	Type *string `json:"type,omitempty"`
3984}
3985
3986// MarshalJSON is the custom marshaler for FirewallRule.
3987func (fr FirewallRule) MarshalJSON() ([]byte, error) {
3988	objectMap := make(map[string]interface{})
3989	if fr.FirewallRuleProperties != nil {
3990		objectMap["properties"] = fr.FirewallRuleProperties
3991	}
3992	return json.Marshal(objectMap)
3993}
3994
3995// UnmarshalJSON is the custom unmarshaler for FirewallRule struct.
3996func (fr *FirewallRule) UnmarshalJSON(body []byte) error {
3997	var m map[string]*json.RawMessage
3998	err := json.Unmarshal(body, &m)
3999	if err != nil {
4000		return err
4001	}
4002	for k, v := range m {
4003		switch k {
4004		case "kind":
4005			if v != nil {
4006				var kind string
4007				err = json.Unmarshal(*v, &kind)
4008				if err != nil {
4009					return err
4010				}
4011				fr.Kind = &kind
4012			}
4013		case "location":
4014			if v != nil {
4015				var location string
4016				err = json.Unmarshal(*v, &location)
4017				if err != nil {
4018					return err
4019				}
4020				fr.Location = &location
4021			}
4022		case "properties":
4023			if v != nil {
4024				var firewallRuleProperties FirewallRuleProperties
4025				err = json.Unmarshal(*v, &firewallRuleProperties)
4026				if err != nil {
4027					return err
4028				}
4029				fr.FirewallRuleProperties = &firewallRuleProperties
4030			}
4031		case "id":
4032			if v != nil {
4033				var ID string
4034				err = json.Unmarshal(*v, &ID)
4035				if err != nil {
4036					return err
4037				}
4038				fr.ID = &ID
4039			}
4040		case "name":
4041			if v != nil {
4042				var name string
4043				err = json.Unmarshal(*v, &name)
4044				if err != nil {
4045					return err
4046				}
4047				fr.Name = &name
4048			}
4049		case "type":
4050			if v != nil {
4051				var typeVar string
4052				err = json.Unmarshal(*v, &typeVar)
4053				if err != nil {
4054					return err
4055				}
4056				fr.Type = &typeVar
4057			}
4058		}
4059	}
4060
4061	return nil
4062}
4063
4064// FirewallRuleListResult represents the response to a List Firewall Rules request.
4065type FirewallRuleListResult struct {
4066	autorest.Response `json:"-"`
4067	// Value - The list of server firewall rules.
4068	Value *[]FirewallRule `json:"value,omitempty"`
4069}
4070
4071// FirewallRuleProperties represents the properties of a server firewall rule.
4072type FirewallRuleProperties struct {
4073	// StartIPAddress - The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP addresses.
4074	StartIPAddress *string `json:"startIpAddress,omitempty"`
4075	// EndIPAddress - The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' to represent all Azure-internal IP addresses.
4076	EndIPAddress *string `json:"endIpAddress,omitempty"`
4077}
4078
4079// GeoBackupPolicy a database geo backup policy.
4080type GeoBackupPolicy struct {
4081	autorest.Response `json:"-"`
4082	// GeoBackupPolicyProperties - The properties of the geo backup policy.
4083	*GeoBackupPolicyProperties `json:"properties,omitempty"`
4084	// Kind - READ-ONLY; Kind of geo backup policy.  This is metadata used for the Azure portal experience.
4085	Kind *string `json:"kind,omitempty"`
4086	// Location - READ-ONLY; Backup policy location.
4087	Location *string `json:"location,omitempty"`
4088	// ID - READ-ONLY; Resource ID.
4089	ID *string `json:"id,omitempty"`
4090	// Name - READ-ONLY; Resource name.
4091	Name *string `json:"name,omitempty"`
4092	// Type - READ-ONLY; Resource type.
4093	Type *string `json:"type,omitempty"`
4094}
4095
4096// MarshalJSON is the custom marshaler for GeoBackupPolicy.
4097func (gbp GeoBackupPolicy) MarshalJSON() ([]byte, error) {
4098	objectMap := make(map[string]interface{})
4099	if gbp.GeoBackupPolicyProperties != nil {
4100		objectMap["properties"] = gbp.GeoBackupPolicyProperties
4101	}
4102	return json.Marshal(objectMap)
4103}
4104
4105// UnmarshalJSON is the custom unmarshaler for GeoBackupPolicy struct.
4106func (gbp *GeoBackupPolicy) UnmarshalJSON(body []byte) error {
4107	var m map[string]*json.RawMessage
4108	err := json.Unmarshal(body, &m)
4109	if err != nil {
4110		return err
4111	}
4112	for k, v := range m {
4113		switch k {
4114		case "properties":
4115			if v != nil {
4116				var geoBackupPolicyProperties GeoBackupPolicyProperties
4117				err = json.Unmarshal(*v, &geoBackupPolicyProperties)
4118				if err != nil {
4119					return err
4120				}
4121				gbp.GeoBackupPolicyProperties = &geoBackupPolicyProperties
4122			}
4123		case "kind":
4124			if v != nil {
4125				var kind string
4126				err = json.Unmarshal(*v, &kind)
4127				if err != nil {
4128					return err
4129				}
4130				gbp.Kind = &kind
4131			}
4132		case "location":
4133			if v != nil {
4134				var location string
4135				err = json.Unmarshal(*v, &location)
4136				if err != nil {
4137					return err
4138				}
4139				gbp.Location = &location
4140			}
4141		case "id":
4142			if v != nil {
4143				var ID string
4144				err = json.Unmarshal(*v, &ID)
4145				if err != nil {
4146					return err
4147				}
4148				gbp.ID = &ID
4149			}
4150		case "name":
4151			if v != nil {
4152				var name string
4153				err = json.Unmarshal(*v, &name)
4154				if err != nil {
4155					return err
4156				}
4157				gbp.Name = &name
4158			}
4159		case "type":
4160			if v != nil {
4161				var typeVar string
4162				err = json.Unmarshal(*v, &typeVar)
4163				if err != nil {
4164					return err
4165				}
4166				gbp.Type = &typeVar
4167			}
4168		}
4169	}
4170
4171	return nil
4172}
4173
4174// GeoBackupPolicyListResult the response to a list geo backup policies request.
4175type GeoBackupPolicyListResult struct {
4176	autorest.Response `json:"-"`
4177	// Value - The list of geo backup policies.
4178	Value *[]GeoBackupPolicy `json:"value,omitempty"`
4179}
4180
4181// GeoBackupPolicyProperties the properties of the geo backup policy.
4182type GeoBackupPolicyProperties struct {
4183	// State - The state of the geo backup policy. Possible values include: 'GeoBackupPolicyStateDisabled', 'GeoBackupPolicyStateEnabled'
4184	State GeoBackupPolicyState `json:"state,omitempty"`
4185	// StorageType - READ-ONLY; The storage type of the geo backup policy.
4186	StorageType *string `json:"storageType,omitempty"`
4187}
4188
4189// ImportExportResponse response for Import/Export Get operation.
4190type ImportExportResponse struct {
4191	autorest.Response `json:"-"`
4192	// ImportExportResponseProperties - The import/export operation properties.
4193	*ImportExportResponseProperties `json:"properties,omitempty"`
4194	// ID - READ-ONLY; Resource ID.
4195	ID *string `json:"id,omitempty"`
4196	// Name - READ-ONLY; Resource name.
4197	Name *string `json:"name,omitempty"`
4198	// Type - READ-ONLY; Resource type.
4199	Type *string `json:"type,omitempty"`
4200}
4201
4202// MarshalJSON is the custom marshaler for ImportExportResponse.
4203func (ier ImportExportResponse) MarshalJSON() ([]byte, error) {
4204	objectMap := make(map[string]interface{})
4205	if ier.ImportExportResponseProperties != nil {
4206		objectMap["properties"] = ier.ImportExportResponseProperties
4207	}
4208	return json.Marshal(objectMap)
4209}
4210
4211// UnmarshalJSON is the custom unmarshaler for ImportExportResponse struct.
4212func (ier *ImportExportResponse) UnmarshalJSON(body []byte) error {
4213	var m map[string]*json.RawMessage
4214	err := json.Unmarshal(body, &m)
4215	if err != nil {
4216		return err
4217	}
4218	for k, v := range m {
4219		switch k {
4220		case "properties":
4221			if v != nil {
4222				var importExportResponseProperties ImportExportResponseProperties
4223				err = json.Unmarshal(*v, &importExportResponseProperties)
4224				if err != nil {
4225					return err
4226				}
4227				ier.ImportExportResponseProperties = &importExportResponseProperties
4228			}
4229		case "id":
4230			if v != nil {
4231				var ID string
4232				err = json.Unmarshal(*v, &ID)
4233				if err != nil {
4234					return err
4235				}
4236				ier.ID = &ID
4237			}
4238		case "name":
4239			if v != nil {
4240				var name string
4241				err = json.Unmarshal(*v, &name)
4242				if err != nil {
4243					return err
4244				}
4245				ier.Name = &name
4246			}
4247		case "type":
4248			if v != nil {
4249				var typeVar string
4250				err = json.Unmarshal(*v, &typeVar)
4251				if err != nil {
4252					return err
4253				}
4254				ier.Type = &typeVar
4255			}
4256		}
4257	}
4258
4259	return nil
4260}
4261
4262// ImportExportResponseProperties response for Import/Export Status operation.
4263type ImportExportResponseProperties struct {
4264	// RequestType - READ-ONLY; The request type of the operation.
4265	RequestType *string `json:"requestType,omitempty"`
4266	// RequestID - READ-ONLY; The request type of the operation.
4267	RequestID *uuid.UUID `json:"requestId,omitempty"`
4268	// ServerName - READ-ONLY; The name of the server.
4269	ServerName *string `json:"serverName,omitempty"`
4270	// DatabaseName - READ-ONLY; The name of the database.
4271	DatabaseName *string `json:"databaseName,omitempty"`
4272	// Status - READ-ONLY; The status message returned from the server.
4273	Status *string `json:"status,omitempty"`
4274	// LastModifiedTime - READ-ONLY; The operation status last modified time.
4275	LastModifiedTime *string `json:"lastModifiedTime,omitempty"`
4276	// QueuedTime - READ-ONLY; The operation queued time.
4277	QueuedTime *string `json:"queuedTime,omitempty"`
4278	// BlobURI - READ-ONLY; The blob uri.
4279	BlobURI *string `json:"blobUri,omitempty"`
4280	// ErrorMessage - READ-ONLY; The error message returned from the server.
4281	ErrorMessage *string `json:"errorMessage,omitempty"`
4282}
4283
4284// ImportExtensionProperties represents the properties for an import operation
4285type ImportExtensionProperties struct {
4286	// OperationMode - The type of import operation being performed. This is always Import.
4287	OperationMode *string `json:"operationMode,omitempty"`
4288	// StorageKeyType - The type of the storage key to use. Possible values include: 'StorageAccessKey', 'SharedAccessKey'
4289	StorageKeyType StorageKeyType `json:"storageKeyType,omitempty"`
4290	// StorageKey - The storage key to use.  If storage key type is SharedAccessKey, it must be preceded with a "?."
4291	StorageKey *string `json:"storageKey,omitempty"`
4292	// StorageURI - The storage uri to use.
4293	StorageURI *string `json:"storageUri,omitempty"`
4294	// AdministratorLogin - The name of the SQL administrator.
4295	AdministratorLogin *string `json:"administratorLogin,omitempty"`
4296	// AdministratorLoginPassword - The password of the SQL administrator.
4297	AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"`
4298	// AuthenticationType - The authentication type. Possible values include: 'SQL', 'ADPassword'
4299	AuthenticationType AuthenticationType `json:"authenticationType,omitempty"`
4300}
4301
4302// ImportExtensionRequest import database parameters.
4303type ImportExtensionRequest struct {
4304	// Name - The name of the extension.
4305	Name *string `json:"name,omitempty"`
4306	// Type - The type of the extension.
4307	Type *string `json:"type,omitempty"`
4308	// ImportExtensionProperties - Represents the properties of the resource.
4309	*ImportExtensionProperties `json:"properties,omitempty"`
4310}
4311
4312// MarshalJSON is the custom marshaler for ImportExtensionRequest.
4313func (ier ImportExtensionRequest) MarshalJSON() ([]byte, error) {
4314	objectMap := make(map[string]interface{})
4315	if ier.Name != nil {
4316		objectMap["name"] = ier.Name
4317	}
4318	if ier.Type != nil {
4319		objectMap["type"] = ier.Type
4320	}
4321	if ier.ImportExtensionProperties != nil {
4322		objectMap["properties"] = ier.ImportExtensionProperties
4323	}
4324	return json.Marshal(objectMap)
4325}
4326
4327// UnmarshalJSON is the custom unmarshaler for ImportExtensionRequest struct.
4328func (ier *ImportExtensionRequest) UnmarshalJSON(body []byte) error {
4329	var m map[string]*json.RawMessage
4330	err := json.Unmarshal(body, &m)
4331	if err != nil {
4332		return err
4333	}
4334	for k, v := range m {
4335		switch k {
4336		case "name":
4337			if v != nil {
4338				var name string
4339				err = json.Unmarshal(*v, &name)
4340				if err != nil {
4341					return err
4342				}
4343				ier.Name = &name
4344			}
4345		case "type":
4346			if v != nil {
4347				var typeVar string
4348				err = json.Unmarshal(*v, &typeVar)
4349				if err != nil {
4350					return err
4351				}
4352				ier.Type = &typeVar
4353			}
4354		case "properties":
4355			if v != nil {
4356				var importExtensionProperties ImportExtensionProperties
4357				err = json.Unmarshal(*v, &importExtensionProperties)
4358				if err != nil {
4359					return err
4360				}
4361				ier.ImportExtensionProperties = &importExtensionProperties
4362			}
4363		}
4364	}
4365
4366	return nil
4367}
4368
4369// ImportRequest import database parameters.
4370type ImportRequest struct {
4371	// DatabaseName - The name of the database to import.
4372	DatabaseName *string `json:"databaseName,omitempty"`
4373	// Edition - The edition for the database being created.
4374	//
4375	// The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands:
4376	//
4377	// ```azurecli
4378	// az sql db list-editions -l <location> -o table
4379	// ````
4380	//
4381	// ```powershell
4382	// Get-AzSqlServerServiceObjective -Location <location>
4383	// ````
4384	// . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'
4385	Edition DatabaseEdition `json:"edition,omitempty"`
4386	// ServiceObjectiveName - The name of the service objective to assign to the database. Possible values include: 'ServiceObjectiveNameSystem', 'ServiceObjectiveNameSystem0', 'ServiceObjectiveNameSystem1', 'ServiceObjectiveNameSystem2', 'ServiceObjectiveNameSystem3', 'ServiceObjectiveNameSystem4', 'ServiceObjectiveNameSystem2L', 'ServiceObjectiveNameSystem3L', 'ServiceObjectiveNameSystem4L', 'ServiceObjectiveNameFree', 'ServiceObjectiveNameBasic', 'ServiceObjectiveNameS0', 'ServiceObjectiveNameS1', 'ServiceObjectiveNameS2', 'ServiceObjectiveNameS3', 'ServiceObjectiveNameS4', 'ServiceObjectiveNameS6', 'ServiceObjectiveNameS7', 'ServiceObjectiveNameS9', 'ServiceObjectiveNameS12', 'ServiceObjectiveNameP1', 'ServiceObjectiveNameP2', 'ServiceObjectiveNameP3', 'ServiceObjectiveNameP4', 'ServiceObjectiveNameP6', 'ServiceObjectiveNameP11', 'ServiceObjectiveNameP15', 'ServiceObjectiveNamePRS1', 'ServiceObjectiveNamePRS2', 'ServiceObjectiveNamePRS4', 'ServiceObjectiveNamePRS6', 'ServiceObjectiveNameDW100', 'ServiceObjectiveNameDW200', 'ServiceObjectiveNameDW300', 'ServiceObjectiveNameDW400', 'ServiceObjectiveNameDW500', 'ServiceObjectiveNameDW600', 'ServiceObjectiveNameDW1000', 'ServiceObjectiveNameDW1200', 'ServiceObjectiveNameDW1000c', 'ServiceObjectiveNameDW1500', 'ServiceObjectiveNameDW1500c', 'ServiceObjectiveNameDW2000', 'ServiceObjectiveNameDW2000c', 'ServiceObjectiveNameDW3000', 'ServiceObjectiveNameDW2500c', 'ServiceObjectiveNameDW3000c', 'ServiceObjectiveNameDW6000', 'ServiceObjectiveNameDW5000c', 'ServiceObjectiveNameDW6000c', 'ServiceObjectiveNameDW7500c', 'ServiceObjectiveNameDW10000c', 'ServiceObjectiveNameDW15000c', 'ServiceObjectiveNameDW30000c', 'ServiceObjectiveNameDS100', 'ServiceObjectiveNameDS200', 'ServiceObjectiveNameDS300', 'ServiceObjectiveNameDS400', 'ServiceObjectiveNameDS500', 'ServiceObjectiveNameDS600', 'ServiceObjectiveNameDS1000', 'ServiceObjectiveNameDS1200', 'ServiceObjectiveNameDS1500', 'ServiceObjectiveNameDS2000', 'ServiceObjectiveNameElasticPool'
4387	ServiceObjectiveName ServiceObjectiveName `json:"serviceObjectiveName,omitempty"`
4388	// MaxSizeBytes - The maximum size for the newly imported database.
4389	MaxSizeBytes *string `json:"maxSizeBytes,omitempty"`
4390	// StorageKeyType - The type of the storage key to use. Possible values include: 'StorageAccessKey', 'SharedAccessKey'
4391	StorageKeyType StorageKeyType `json:"storageKeyType,omitempty"`
4392	// StorageKey - The storage key to use.  If storage key type is SharedAccessKey, it must be preceded with a "?."
4393	StorageKey *string `json:"storageKey,omitempty"`
4394	// StorageURI - The storage uri to use.
4395	StorageURI *string `json:"storageUri,omitempty"`
4396	// AdministratorLogin - The name of the SQL administrator.
4397	AdministratorLogin *string `json:"administratorLogin,omitempty"`
4398	// AdministratorLoginPassword - The password of the SQL administrator.
4399	AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"`
4400	// AuthenticationType - The authentication type. Possible values include: 'SQL', 'ADPassword'
4401	AuthenticationType AuthenticationType `json:"authenticationType,omitempty"`
4402}
4403
4404// LocationCapabilities the location capability.
4405type LocationCapabilities struct {
4406	autorest.Response `json:"-"`
4407	// Name - READ-ONLY; The location name.
4408	Name *string `json:"name,omitempty"`
4409	// SupportedServerVersions - READ-ONLY; The list of supported server versions.
4410	SupportedServerVersions *[]ServerVersionCapability `json:"supportedServerVersions,omitempty"`
4411	// Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
4412	Status CapabilityStatus `json:"status,omitempty"`
4413	// Reason - The reason for the capability not being available.
4414	Reason *string `json:"reason,omitempty"`
4415}
4416
4417// ManagedInstance an Azure SQL managed instance.
4418type ManagedInstance struct {
4419	autorest.Response `json:"-"`
4420	// Identity - The Azure Active Directory identity of the managed instance.
4421	Identity *ResourceIdentity `json:"identity,omitempty"`
4422	// Sku - Managed instance SKU. Allowed values for sku.name: GP_Gen4, GP_Gen5, BC_Gen4, BC_Gen5
4423	Sku *Sku `json:"sku,omitempty"`
4424	// ManagedInstanceProperties - Resource properties.
4425	*ManagedInstanceProperties `json:"properties,omitempty"`
4426	// Location - Resource location.
4427	Location *string `json:"location,omitempty"`
4428	// Tags - Resource tags.
4429	Tags map[string]*string `json:"tags"`
4430	// ID - READ-ONLY; Resource ID.
4431	ID *string `json:"id,omitempty"`
4432	// Name - READ-ONLY; Resource name.
4433	Name *string `json:"name,omitempty"`
4434	// Type - READ-ONLY; Resource type.
4435	Type *string `json:"type,omitempty"`
4436}
4437
4438// MarshalJSON is the custom marshaler for ManagedInstance.
4439func (mi ManagedInstance) MarshalJSON() ([]byte, error) {
4440	objectMap := make(map[string]interface{})
4441	if mi.Identity != nil {
4442		objectMap["identity"] = mi.Identity
4443	}
4444	if mi.Sku != nil {
4445		objectMap["sku"] = mi.Sku
4446	}
4447	if mi.ManagedInstanceProperties != nil {
4448		objectMap["properties"] = mi.ManagedInstanceProperties
4449	}
4450	if mi.Location != nil {
4451		objectMap["location"] = mi.Location
4452	}
4453	if mi.Tags != nil {
4454		objectMap["tags"] = mi.Tags
4455	}
4456	return json.Marshal(objectMap)
4457}
4458
4459// UnmarshalJSON is the custom unmarshaler for ManagedInstance struct.
4460func (mi *ManagedInstance) UnmarshalJSON(body []byte) error {
4461	var m map[string]*json.RawMessage
4462	err := json.Unmarshal(body, &m)
4463	if err != nil {
4464		return err
4465	}
4466	for k, v := range m {
4467		switch k {
4468		case "identity":
4469			if v != nil {
4470				var identity ResourceIdentity
4471				err = json.Unmarshal(*v, &identity)
4472				if err != nil {
4473					return err
4474				}
4475				mi.Identity = &identity
4476			}
4477		case "sku":
4478			if v != nil {
4479				var sku Sku
4480				err = json.Unmarshal(*v, &sku)
4481				if err != nil {
4482					return err
4483				}
4484				mi.Sku = &sku
4485			}
4486		case "properties":
4487			if v != nil {
4488				var managedInstanceProperties ManagedInstanceProperties
4489				err = json.Unmarshal(*v, &managedInstanceProperties)
4490				if err != nil {
4491					return err
4492				}
4493				mi.ManagedInstanceProperties = &managedInstanceProperties
4494			}
4495		case "location":
4496			if v != nil {
4497				var location string
4498				err = json.Unmarshal(*v, &location)
4499				if err != nil {
4500					return err
4501				}
4502				mi.Location = &location
4503			}
4504		case "tags":
4505			if v != nil {
4506				var tags map[string]*string
4507				err = json.Unmarshal(*v, &tags)
4508				if err != nil {
4509					return err
4510				}
4511				mi.Tags = tags
4512			}
4513		case "id":
4514			if v != nil {
4515				var ID string
4516				err = json.Unmarshal(*v, &ID)
4517				if err != nil {
4518					return err
4519				}
4520				mi.ID = &ID
4521			}
4522		case "name":
4523			if v != nil {
4524				var name string
4525				err = json.Unmarshal(*v, &name)
4526				if err != nil {
4527					return err
4528				}
4529				mi.Name = &name
4530			}
4531		case "type":
4532			if v != nil {
4533				var typeVar string
4534				err = json.Unmarshal(*v, &typeVar)
4535				if err != nil {
4536					return err
4537				}
4538				mi.Type = &typeVar
4539			}
4540		}
4541	}
4542
4543	return nil
4544}
4545
4546// ManagedInstanceListResult a list of managed instances.
4547type ManagedInstanceListResult struct {
4548	autorest.Response `json:"-"`
4549	// Value - READ-ONLY; Array of results.
4550	Value *[]ManagedInstance `json:"value,omitempty"`
4551	// NextLink - READ-ONLY; Link to retrieve next page of results.
4552	NextLink *string `json:"nextLink,omitempty"`
4553}
4554
4555// ManagedInstanceListResultIterator provides access to a complete listing of ManagedInstance values.
4556type ManagedInstanceListResultIterator struct {
4557	i    int
4558	page ManagedInstanceListResultPage
4559}
4560
4561// NextWithContext advances to the next value.  If there was an error making
4562// the request the iterator does not advance and the error is returned.
4563func (iter *ManagedInstanceListResultIterator) NextWithContext(ctx context.Context) (err error) {
4564	if tracing.IsEnabled() {
4565		ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceListResultIterator.NextWithContext")
4566		defer func() {
4567			sc := -1
4568			if iter.Response().Response.Response != nil {
4569				sc = iter.Response().Response.Response.StatusCode
4570			}
4571			tracing.EndSpan(ctx, sc, err)
4572		}()
4573	}
4574	iter.i++
4575	if iter.i < len(iter.page.Values()) {
4576		return nil
4577	}
4578	err = iter.page.NextWithContext(ctx)
4579	if err != nil {
4580		iter.i--
4581		return err
4582	}
4583	iter.i = 0
4584	return nil
4585}
4586
4587// Next advances to the next value.  If there was an error making
4588// the request the iterator does not advance and the error is returned.
4589// Deprecated: Use NextWithContext() instead.
4590func (iter *ManagedInstanceListResultIterator) Next() error {
4591	return iter.NextWithContext(context.Background())
4592}
4593
4594// NotDone returns true if the enumeration should be started or is not yet complete.
4595func (iter ManagedInstanceListResultIterator) NotDone() bool {
4596	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4597}
4598
4599// Response returns the raw server response from the last page request.
4600func (iter ManagedInstanceListResultIterator) Response() ManagedInstanceListResult {
4601	return iter.page.Response()
4602}
4603
4604// Value returns the current value or a zero-initialized value if the
4605// iterator has advanced beyond the end of the collection.
4606func (iter ManagedInstanceListResultIterator) Value() ManagedInstance {
4607	if !iter.page.NotDone() {
4608		return ManagedInstance{}
4609	}
4610	return iter.page.Values()[iter.i]
4611}
4612
4613// Creates a new instance of the ManagedInstanceListResultIterator type.
4614func NewManagedInstanceListResultIterator(page ManagedInstanceListResultPage) ManagedInstanceListResultIterator {
4615	return ManagedInstanceListResultIterator{page: page}
4616}
4617
4618// IsEmpty returns true if the ListResult contains no values.
4619func (milr ManagedInstanceListResult) IsEmpty() bool {
4620	return milr.Value == nil || len(*milr.Value) == 0
4621}
4622
4623// managedInstanceListResultPreparer prepares a request to retrieve the next set of results.
4624// It returns nil if no more results exist.
4625func (milr ManagedInstanceListResult) managedInstanceListResultPreparer(ctx context.Context) (*http.Request, error) {
4626	if milr.NextLink == nil || len(to.String(milr.NextLink)) < 1 {
4627		return nil, nil
4628	}
4629	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4630		autorest.AsJSON(),
4631		autorest.AsGet(),
4632		autorest.WithBaseURL(to.String(milr.NextLink)))
4633}
4634
4635// ManagedInstanceListResultPage contains a page of ManagedInstance values.
4636type ManagedInstanceListResultPage struct {
4637	fn   func(context.Context, ManagedInstanceListResult) (ManagedInstanceListResult, error)
4638	milr ManagedInstanceListResult
4639}
4640
4641// NextWithContext advances to the next page of values.  If there was an error making
4642// the request the page does not advance and the error is returned.
4643func (page *ManagedInstanceListResultPage) NextWithContext(ctx context.Context) (err error) {
4644	if tracing.IsEnabled() {
4645		ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceListResultPage.NextWithContext")
4646		defer func() {
4647			sc := -1
4648			if page.Response().Response.Response != nil {
4649				sc = page.Response().Response.Response.StatusCode
4650			}
4651			tracing.EndSpan(ctx, sc, err)
4652		}()
4653	}
4654	next, err := page.fn(ctx, page.milr)
4655	if err != nil {
4656		return err
4657	}
4658	page.milr = next
4659	return nil
4660}
4661
4662// Next advances to the next page of values.  If there was an error making
4663// the request the page does not advance and the error is returned.
4664// Deprecated: Use NextWithContext() instead.
4665func (page *ManagedInstanceListResultPage) Next() error {
4666	return page.NextWithContext(context.Background())
4667}
4668
4669// NotDone returns true if the page enumeration should be started or is not yet complete.
4670func (page ManagedInstanceListResultPage) NotDone() bool {
4671	return !page.milr.IsEmpty()
4672}
4673
4674// Response returns the raw server response from the last page request.
4675func (page ManagedInstanceListResultPage) Response() ManagedInstanceListResult {
4676	return page.milr
4677}
4678
4679// Values returns the slice of values for the current page or nil if there are no values.
4680func (page ManagedInstanceListResultPage) Values() []ManagedInstance {
4681	if page.milr.IsEmpty() {
4682		return nil
4683	}
4684	return *page.milr.Value
4685}
4686
4687// Creates a new instance of the ManagedInstanceListResultPage type.
4688func NewManagedInstanceListResultPage(getNextPage func(context.Context, ManagedInstanceListResult) (ManagedInstanceListResult, error)) ManagedInstanceListResultPage {
4689	return ManagedInstanceListResultPage{fn: getNextPage}
4690}
4691
4692// ManagedInstanceProperties the properties of a managed instance.
4693type ManagedInstanceProperties struct {
4694	// ManagedInstanceCreateMode - Specifies the mode of database creation.
4695	//
4696	// Default: Regular instance creation.
4697	//
4698	// Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. Possible values include: 'ManagedServerCreateModeDefault', 'ManagedServerCreateModePointInTimeRestore'
4699	ManagedInstanceCreateMode ManagedServerCreateMode `json:"managedInstanceCreateMode,omitempty"`
4700	// FullyQualifiedDomainName - READ-ONLY; The fully qualified domain name of the managed instance.
4701	FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"`
4702	// AdministratorLogin - Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation).
4703	AdministratorLogin *string `json:"administratorLogin,omitempty"`
4704	// AdministratorLoginPassword - The administrator login password (required for managed instance creation).
4705	AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"`
4706	// SubnetID - Subnet resource ID for the managed instance.
4707	SubnetID *string `json:"subnetId,omitempty"`
4708	// State - READ-ONLY; The state of the managed instance.
4709	State *string `json:"state,omitempty"`
4710	// LicenseType - The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). Possible values include: 'LicenseIncluded', 'BasePrice'
4711	LicenseType ManagedInstanceLicenseType `json:"licenseType,omitempty"`
4712	// VCores - The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80.
4713	VCores *int32 `json:"vCores,omitempty"`
4714	// StorageSizeInGB - Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only.
4715	StorageSizeInGB *int32 `json:"storageSizeInGB,omitempty"`
4716	// Collation - Collation of the managed instance.
4717	Collation *string `json:"collation,omitempty"`
4718	// DNSZone - READ-ONLY; The Dns Zone that the managed instance is in.
4719	DNSZone *string `json:"dnsZone,omitempty"`
4720	// DNSZonePartner - The resource id of another managed instance whose DNS zone this managed instance will share after creation.
4721	DNSZonePartner *string `json:"dnsZonePartner,omitempty"`
4722	// PublicDataEndpointEnabled - Whether or not the public data endpoint is enabled.
4723	PublicDataEndpointEnabled *bool `json:"publicDataEndpointEnabled,omitempty"`
4724	// SourceManagedInstanceID - The resource identifier of the source managed instance associated with create operation of this instance.
4725	SourceManagedInstanceID *string `json:"sourceManagedInstanceId,omitempty"`
4726	// RestorePointInTime - Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.
4727	RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"`
4728	// ProxyOverride - Connection type used for connecting to the instance. Possible values include: 'ManagedInstanceProxyOverrideProxy', 'ManagedInstanceProxyOverrideRedirect', 'ManagedInstanceProxyOverrideDefault'
4729	ProxyOverride ManagedInstanceProxyOverride `json:"proxyOverride,omitempty"`
4730	// TimezoneID - Id of the timezone. Allowed values are timezones supported by Windows.
4731	// Windows keeps details on supported timezones, including the id, in registry under
4732	// KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.
4733	// You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info.
4734	// List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
4735	// An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time".
4736	TimezoneID *string `json:"timezoneId,omitempty"`
4737	// InstancePoolID - The Id of the instance pool this managed server belongs to.
4738	InstancePoolID *string `json:"instancePoolId,omitempty"`
4739}
4740
4741// ManagedInstancesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4742// long-running operation.
4743type ManagedInstancesCreateOrUpdateFuture struct {
4744	azure.Future
4745}
4746
4747// Result returns the result of the asynchronous operation.
4748// If the operation has not completed it will return an error.
4749func (future *ManagedInstancesCreateOrUpdateFuture) Result(client ManagedInstancesClient) (mi ManagedInstance, err error) {
4750	var done bool
4751	done, err = future.DoneWithContext(context.Background(), client)
4752	if err != nil {
4753		err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4754		return
4755	}
4756	if !done {
4757		err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesCreateOrUpdateFuture")
4758		return
4759	}
4760	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4761	if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
4762		mi, err = client.CreateOrUpdateResponder(mi.Response.Response)
4763		if err != nil {
4764			err = autorest.NewErrorWithError(err, "sql.ManagedInstancesCreateOrUpdateFuture", "Result", mi.Response.Response, "Failure responding to request")
4765		}
4766	}
4767	return
4768}
4769
4770// ManagedInstancesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
4771// operation.
4772type ManagedInstancesDeleteFuture struct {
4773	azure.Future
4774}
4775
4776// Result returns the result of the asynchronous operation.
4777// If the operation has not completed it will return an error.
4778func (future *ManagedInstancesDeleteFuture) Result(client ManagedInstancesClient) (ar autorest.Response, err error) {
4779	var done bool
4780	done, err = future.DoneWithContext(context.Background(), client)
4781	if err != nil {
4782		err = autorest.NewErrorWithError(err, "sql.ManagedInstancesDeleteFuture", "Result", future.Response(), "Polling failure")
4783		return
4784	}
4785	if !done {
4786		err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesDeleteFuture")
4787		return
4788	}
4789	ar.Response = future.Response()
4790	return
4791}
4792
4793// ManagedInstancesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
4794// operation.
4795type ManagedInstancesUpdateFuture struct {
4796	azure.Future
4797}
4798
4799// Result returns the result of the asynchronous operation.
4800// If the operation has not completed it will return an error.
4801func (future *ManagedInstancesUpdateFuture) Result(client ManagedInstancesClient) (mi ManagedInstance, err error) {
4802	var done bool
4803	done, err = future.DoneWithContext(context.Background(), client)
4804	if err != nil {
4805		err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", future.Response(), "Polling failure")
4806		return
4807	}
4808	if !done {
4809		err = azure.NewAsyncOpIncompleteError("sql.ManagedInstancesUpdateFuture")
4810		return
4811	}
4812	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4813	if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent {
4814		mi, err = client.UpdateResponder(mi.Response.Response)
4815		if err != nil {
4816			err = autorest.NewErrorWithError(err, "sql.ManagedInstancesUpdateFuture", "Result", mi.Response.Response, "Failure responding to request")
4817		}
4818	}
4819	return
4820}
4821
4822// ManagedInstanceUpdate an update request for an Azure SQL Database managed instance.
4823type ManagedInstanceUpdate struct {
4824	// Sku - Managed instance sku
4825	Sku *Sku `json:"sku,omitempty"`
4826	// ManagedInstanceProperties - Resource properties.
4827	*ManagedInstanceProperties `json:"properties,omitempty"`
4828	// Tags - Resource tags.
4829	Tags map[string]*string `json:"tags"`
4830}
4831
4832// MarshalJSON is the custom marshaler for ManagedInstanceUpdate.
4833func (miu ManagedInstanceUpdate) MarshalJSON() ([]byte, error) {
4834	objectMap := make(map[string]interface{})
4835	if miu.Sku != nil {
4836		objectMap["sku"] = miu.Sku
4837	}
4838	if miu.ManagedInstanceProperties != nil {
4839		objectMap["properties"] = miu.ManagedInstanceProperties
4840	}
4841	if miu.Tags != nil {
4842		objectMap["tags"] = miu.Tags
4843	}
4844	return json.Marshal(objectMap)
4845}
4846
4847// UnmarshalJSON is the custom unmarshaler for ManagedInstanceUpdate struct.
4848func (miu *ManagedInstanceUpdate) UnmarshalJSON(body []byte) error {
4849	var m map[string]*json.RawMessage
4850	err := json.Unmarshal(body, &m)
4851	if err != nil {
4852		return err
4853	}
4854	for k, v := range m {
4855		switch k {
4856		case "sku":
4857			if v != nil {
4858				var sku Sku
4859				err = json.Unmarshal(*v, &sku)
4860				if err != nil {
4861					return err
4862				}
4863				miu.Sku = &sku
4864			}
4865		case "properties":
4866			if v != nil {
4867				var managedInstanceProperties ManagedInstanceProperties
4868				err = json.Unmarshal(*v, &managedInstanceProperties)
4869				if err != nil {
4870					return err
4871				}
4872				miu.ManagedInstanceProperties = &managedInstanceProperties
4873			}
4874		case "tags":
4875			if v != nil {
4876				var tags map[string]*string
4877				err = json.Unmarshal(*v, &tags)
4878				if err != nil {
4879					return err
4880				}
4881				miu.Tags = tags
4882			}
4883		}
4884	}
4885
4886	return nil
4887}
4888
4889// MaxSizeCapability the maximum size capability.
4890type MaxSizeCapability struct {
4891	// Limit - READ-ONLY; The maximum size limit (see 'unit' for the units).
4892	Limit *int32 `json:"limit,omitempty"`
4893	// Unit - READ-ONLY; The units that the limit is expressed in. Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes'
4894	Unit MaxSizeUnits `json:"unit,omitempty"`
4895	// Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
4896	Status CapabilityStatus `json:"status,omitempty"`
4897	// Reason - The reason for the capability not being available.
4898	Reason *string `json:"reason,omitempty"`
4899}
4900
4901// Metric database metrics.
4902type Metric struct {
4903	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
4904	StartTime *date.Time `json:"startTime,omitempty"`
4905	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
4906	EndTime *date.Time `json:"endTime,omitempty"`
4907	// TimeGrain - READ-ONLY; The time step to be used to summarize the metric values.
4908	TimeGrain *string `json:"timeGrain,omitempty"`
4909	// Unit - READ-ONLY; The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond'
4910	Unit UnitType `json:"unit,omitempty"`
4911	// Name - READ-ONLY; The name information for the metric.
4912	Name *MetricName `json:"name,omitempty"`
4913	// MetricValues - READ-ONLY; The metric values for the specified time window and timestep.
4914	MetricValues *[]MetricValue `json:"metricValues,omitempty"`
4915}
4916
4917// MetricAvailability a metric availability value.
4918type MetricAvailability struct {
4919	// Retention - READ-ONLY; The length of retention for the database metric.
4920	Retention *string `json:"retention,omitempty"`
4921	// TimeGrain - READ-ONLY; The granularity of the database metric.
4922	TimeGrain *string `json:"timeGrain,omitempty"`
4923}
4924
4925// MetricDefinition a database metric definition.
4926type MetricDefinition struct {
4927	// Name - READ-ONLY; The name information for the metric.
4928	Name *MetricName `json:"name,omitempty"`
4929	// PrimaryAggregationType - READ-ONLY; The primary aggregation type defining how metric values are displayed. Possible values include: 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total'
4930	PrimaryAggregationType PrimaryAggregationType `json:"primaryAggregationType,omitempty"`
4931	// ResourceURI - READ-ONLY; The resource uri of the database.
4932	ResourceURI *string `json:"resourceUri,omitempty"`
4933	// Unit - READ-ONLY; The unit of the metric. Possible values include: 'UnitDefinitionTypeCount', 'UnitDefinitionTypeBytes', 'UnitDefinitionTypeSeconds', 'UnitDefinitionTypePercent', 'UnitDefinitionTypeCountPerSecond', 'UnitDefinitionTypeBytesPerSecond'
4934	Unit UnitDefinitionType `json:"unit,omitempty"`
4935	// MetricAvailabilities - READ-ONLY; The list of database metric availabilities for the metric.
4936	MetricAvailabilities *[]MetricAvailability `json:"metricAvailabilities,omitempty"`
4937}
4938
4939// MetricDefinitionListResult the response to a list database metric definitions request.
4940type MetricDefinitionListResult struct {
4941	autorest.Response `json:"-"`
4942	// Value - The list of metric definitions for the database.
4943	Value *[]MetricDefinition `json:"value,omitempty"`
4944}
4945
4946// MetricListResult the response to a list database metrics request.
4947type MetricListResult struct {
4948	autorest.Response `json:"-"`
4949	// Value - The list of metrics for the database.
4950	Value *[]Metric `json:"value,omitempty"`
4951}
4952
4953// MetricName a database metric name.
4954type MetricName struct {
4955	// Value - READ-ONLY; The name of the database metric.
4956	Value *string `json:"value,omitempty"`
4957	// LocalizedValue - READ-ONLY; The friendly name of the database metric.
4958	LocalizedValue *string `json:"localizedValue,omitempty"`
4959}
4960
4961// MetricValue represents database metrics.
4962type MetricValue struct {
4963	// Count - READ-ONLY; The number of values for the metric.
4964	Count *float64 `json:"count,omitempty"`
4965	// Average - READ-ONLY; The average value of the metric.
4966	Average *float64 `json:"average,omitempty"`
4967	// Maximum - READ-ONLY; The max value of the metric.
4968	Maximum *float64 `json:"maximum,omitempty"`
4969	// Minimum - READ-ONLY; The min value of the metric.
4970	Minimum *float64 `json:"minimum,omitempty"`
4971	// Timestamp - READ-ONLY; The metric timestamp (ISO-8601 format).
4972	Timestamp *date.Time `json:"timestamp,omitempty"`
4973	// Total - READ-ONLY; The total value of the metric.
4974	Total *float64 `json:"total,omitempty"`
4975}
4976
4977// Operation SQL REST API operation definition.
4978type Operation struct {
4979	// Name - READ-ONLY; The name of the operation being performed on this particular object.
4980	Name *string `json:"name,omitempty"`
4981	// Display - READ-ONLY; The localized display information for this particular operation / action.
4982	Display *OperationDisplay `json:"display,omitempty"`
4983	// Origin - READ-ONLY; The intended executor of the operation. Possible values include: 'OperationOriginUser', 'OperationOriginSystem'
4984	Origin OperationOrigin `json:"origin,omitempty"`
4985	// Properties - READ-ONLY; Additional descriptions for the operation.
4986	Properties map[string]interface{} `json:"properties"`
4987}
4988
4989// MarshalJSON is the custom marshaler for Operation.
4990func (o Operation) MarshalJSON() ([]byte, error) {
4991	objectMap := make(map[string]interface{})
4992	return json.Marshal(objectMap)
4993}
4994
4995// OperationDisplay display metadata associated with the operation.
4996type OperationDisplay struct {
4997	// Provider - READ-ONLY; The localized friendly form of the resource provider name.
4998	Provider *string `json:"provider,omitempty"`
4999	// Resource - READ-ONLY; The localized friendly form of the resource type related to this action/operation.
5000	Resource *string `json:"resource,omitempty"`
5001	// Operation - READ-ONLY; The localized friendly name for the operation.
5002	Operation *string `json:"operation,omitempty"`
5003	// Description - READ-ONLY; The localized friendly description for the operation.
5004	Description *string `json:"description,omitempty"`
5005}
5006
5007// OperationImpact the impact of an operation, both in absolute and relative terms.
5008type OperationImpact struct {
5009	// Name - READ-ONLY; The name of the impact dimension.
5010	Name *string `json:"name,omitempty"`
5011	// Unit - READ-ONLY; The unit in which estimated impact to dimension is measured.
5012	Unit *string `json:"unit,omitempty"`
5013	// ChangeValueAbsolute - READ-ONLY; The absolute impact to dimension.
5014	ChangeValueAbsolute *float64 `json:"changeValueAbsolute,omitempty"`
5015	// ChangeValueRelative - READ-ONLY; The relative impact to dimension (null if not applicable)
5016	ChangeValueRelative *float64 `json:"changeValueRelative,omitempty"`
5017}
5018
5019// OperationListResult result of the request to list SQL operations.
5020type OperationListResult struct {
5021	autorest.Response `json:"-"`
5022	// Value - READ-ONLY; Array of results.
5023	Value *[]Operation `json:"value,omitempty"`
5024	// NextLink - READ-ONLY; Link to retrieve next page of results.
5025	NextLink *string `json:"nextLink,omitempty"`
5026}
5027
5028// OperationListResultIterator provides access to a complete listing of Operation values.
5029type OperationListResultIterator struct {
5030	i    int
5031	page OperationListResultPage
5032}
5033
5034// NextWithContext advances to the next value.  If there was an error making
5035// the request the iterator does not advance and the error is returned.
5036func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
5037	if tracing.IsEnabled() {
5038		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
5039		defer func() {
5040			sc := -1
5041			if iter.Response().Response.Response != nil {
5042				sc = iter.Response().Response.Response.StatusCode
5043			}
5044			tracing.EndSpan(ctx, sc, err)
5045		}()
5046	}
5047	iter.i++
5048	if iter.i < len(iter.page.Values()) {
5049		return nil
5050	}
5051	err = iter.page.NextWithContext(ctx)
5052	if err != nil {
5053		iter.i--
5054		return err
5055	}
5056	iter.i = 0
5057	return nil
5058}
5059
5060// Next advances to the next value.  If there was an error making
5061// the request the iterator does not advance and the error is returned.
5062// Deprecated: Use NextWithContext() instead.
5063func (iter *OperationListResultIterator) Next() error {
5064	return iter.NextWithContext(context.Background())
5065}
5066
5067// NotDone returns true if the enumeration should be started or is not yet complete.
5068func (iter OperationListResultIterator) NotDone() bool {
5069	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5070}
5071
5072// Response returns the raw server response from the last page request.
5073func (iter OperationListResultIterator) Response() OperationListResult {
5074	return iter.page.Response()
5075}
5076
5077// Value returns the current value or a zero-initialized value if the
5078// iterator has advanced beyond the end of the collection.
5079func (iter OperationListResultIterator) Value() Operation {
5080	if !iter.page.NotDone() {
5081		return Operation{}
5082	}
5083	return iter.page.Values()[iter.i]
5084}
5085
5086// Creates a new instance of the OperationListResultIterator type.
5087func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
5088	return OperationListResultIterator{page: page}
5089}
5090
5091// IsEmpty returns true if the ListResult contains no values.
5092func (olr OperationListResult) IsEmpty() bool {
5093	return olr.Value == nil || len(*olr.Value) == 0
5094}
5095
5096// operationListResultPreparer prepares a request to retrieve the next set of results.
5097// It returns nil if no more results exist.
5098func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
5099	if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
5100		return nil, nil
5101	}
5102	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5103		autorest.AsJSON(),
5104		autorest.AsGet(),
5105		autorest.WithBaseURL(to.String(olr.NextLink)))
5106}
5107
5108// OperationListResultPage contains a page of Operation values.
5109type OperationListResultPage struct {
5110	fn  func(context.Context, OperationListResult) (OperationListResult, error)
5111	olr OperationListResult
5112}
5113
5114// NextWithContext advances to the next page of values.  If there was an error making
5115// the request the page does not advance and the error is returned.
5116func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
5117	if tracing.IsEnabled() {
5118		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
5119		defer func() {
5120			sc := -1
5121			if page.Response().Response.Response != nil {
5122				sc = page.Response().Response.Response.StatusCode
5123			}
5124			tracing.EndSpan(ctx, sc, err)
5125		}()
5126	}
5127	next, err := page.fn(ctx, page.olr)
5128	if err != nil {
5129		return err
5130	}
5131	page.olr = next
5132	return nil
5133}
5134
5135// Next advances to the next page of values.  If there was an error making
5136// the request the page does not advance and the error is returned.
5137// Deprecated: Use NextWithContext() instead.
5138func (page *OperationListResultPage) Next() error {
5139	return page.NextWithContext(context.Background())
5140}
5141
5142// NotDone returns true if the page enumeration should be started or is not yet complete.
5143func (page OperationListResultPage) NotDone() bool {
5144	return !page.olr.IsEmpty()
5145}
5146
5147// Response returns the raw server response from the last page request.
5148func (page OperationListResultPage) Response() OperationListResult {
5149	return page.olr
5150}
5151
5152// Values returns the slice of values for the current page or nil if there are no values.
5153func (page OperationListResultPage) Values() []Operation {
5154	if page.olr.IsEmpty() {
5155		return nil
5156	}
5157	return *page.olr.Value
5158}
5159
5160// Creates a new instance of the OperationListResultPage type.
5161func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
5162	return OperationListResultPage{fn: getNextPage}
5163}
5164
5165// PartnerInfo partner server information for the failover group.
5166type PartnerInfo struct {
5167	// ID - Resource identifier of the partner server.
5168	ID *string `json:"id,omitempty"`
5169	// Location - READ-ONLY; Geo location of the partner server.
5170	Location *string `json:"location,omitempty"`
5171	// ReplicationRole - READ-ONLY; Replication role of the partner server. Possible values include: 'Primary', 'Secondary'
5172	ReplicationRole FailoverGroupReplicationRole `json:"replicationRole,omitempty"`
5173}
5174
5175// PerformanceLevelCapability the performance level capability.
5176type PerformanceLevelCapability struct {
5177	// Value - READ-ONLY; Performance level value.
5178	Value *int32 `json:"value,omitempty"`
5179	// Unit - READ-ONLY; Unit type used to measure service objective performance level. Possible values include: 'DTU'
5180	Unit PerformanceLevelUnit `json:"unit,omitempty"`
5181}
5182
5183// ProxyResource ARM proxy resource.
5184type ProxyResource struct {
5185	// ID - READ-ONLY; Resource ID.
5186	ID *string `json:"id,omitempty"`
5187	// Name - READ-ONLY; Resource name.
5188	Name *string `json:"name,omitempty"`
5189	// Type - READ-ONLY; Resource type.
5190	Type *string `json:"type,omitempty"`
5191}
5192
5193// RecommendedIndex represents a database recommended index.
5194type RecommendedIndex struct {
5195	// RecommendedIndexProperties - READ-ONLY; The properties representing the resource.
5196	*RecommendedIndexProperties `json:"properties,omitempty"`
5197	// ID - READ-ONLY; Resource ID.
5198	ID *string `json:"id,omitempty"`
5199	// Name - READ-ONLY; Resource name.
5200	Name *string `json:"name,omitempty"`
5201	// Type - READ-ONLY; Resource type.
5202	Type *string `json:"type,omitempty"`
5203}
5204
5205// MarshalJSON is the custom marshaler for RecommendedIndex.
5206func (ri RecommendedIndex) MarshalJSON() ([]byte, error) {
5207	objectMap := make(map[string]interface{})
5208	return json.Marshal(objectMap)
5209}
5210
5211// UnmarshalJSON is the custom unmarshaler for RecommendedIndex struct.
5212func (ri *RecommendedIndex) UnmarshalJSON(body []byte) error {
5213	var m map[string]*json.RawMessage
5214	err := json.Unmarshal(body, &m)
5215	if err != nil {
5216		return err
5217	}
5218	for k, v := range m {
5219		switch k {
5220		case "properties":
5221			if v != nil {
5222				var recommendedIndexProperties RecommendedIndexProperties
5223				err = json.Unmarshal(*v, &recommendedIndexProperties)
5224				if err != nil {
5225					return err
5226				}
5227				ri.RecommendedIndexProperties = &recommendedIndexProperties
5228			}
5229		case "id":
5230			if v != nil {
5231				var ID string
5232				err = json.Unmarshal(*v, &ID)
5233				if err != nil {
5234					return err
5235				}
5236				ri.ID = &ID
5237			}
5238		case "name":
5239			if v != nil {
5240				var name string
5241				err = json.Unmarshal(*v, &name)
5242				if err != nil {
5243					return err
5244				}
5245				ri.Name = &name
5246			}
5247		case "type":
5248			if v != nil {
5249				var typeVar string
5250				err = json.Unmarshal(*v, &typeVar)
5251				if err != nil {
5252					return err
5253				}
5254				ri.Type = &typeVar
5255			}
5256		}
5257	}
5258
5259	return nil
5260}
5261
5262// RecommendedIndexProperties represents the properties of a database recommended index.
5263type RecommendedIndexProperties struct {
5264	// Action - READ-ONLY; The proposed index action. You can create a missing index, drop an unused index, or rebuild an existing index to improve its performance. Possible values include: 'Create', 'Drop', 'Rebuild'
5265	Action RecommendedIndexAction `json:"action,omitempty"`
5266	// State - READ-ONLY; The current recommendation state. Possible values include: 'Active', 'Pending', 'Executing', 'Verifying', 'PendingRevert', 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success'
5267	State RecommendedIndexState `json:"state,omitempty"`
5268	// Created - READ-ONLY; The UTC datetime showing when this resource was created (ISO8601 format).
5269	Created *date.Time `json:"created,omitempty"`
5270	// LastModified - READ-ONLY; The UTC datetime of when was this resource last changed (ISO8601 format).
5271	LastModified *date.Time `json:"lastModified,omitempty"`
5272	// IndexType - READ-ONLY; The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTEREDCOLUMNSTORE'
5273	IndexType RecommendedIndexType `json:"indexType,omitempty"`
5274	// Schema - READ-ONLY; The schema where table to build index over resides
5275	Schema *string `json:"schema,omitempty"`
5276	// Table - READ-ONLY; The table on which to build index.
5277	Table *string `json:"table,omitempty"`
5278	// Columns - READ-ONLY; Columns over which to build index
5279	Columns *[]string `json:"columns,omitempty"`
5280	// IncludedColumns - READ-ONLY; The list of column names to be included in the index
5281	IncludedColumns *[]string `json:"includedColumns,omitempty"`
5282	// IndexScript - READ-ONLY; The full build index script
5283	IndexScript *string `json:"indexScript,omitempty"`
5284	// EstimatedImpact - READ-ONLY; The estimated impact of doing recommended index action.
5285	EstimatedImpact *[]OperationImpact `json:"estimatedImpact,omitempty"`
5286	// ReportedImpact - READ-ONLY; The values reported after index action is complete.
5287	ReportedImpact *[]OperationImpact `json:"reportedImpact,omitempty"`
5288}
5289
5290// RecoverableDatabase a recoverable database
5291type RecoverableDatabase struct {
5292	autorest.Response `json:"-"`
5293	// RecoverableDatabaseProperties - The properties of a recoverable database
5294	*RecoverableDatabaseProperties `json:"properties,omitempty"`
5295	// ID - READ-ONLY; Resource ID.
5296	ID *string `json:"id,omitempty"`
5297	// Name - READ-ONLY; Resource name.
5298	Name *string `json:"name,omitempty"`
5299	// Type - READ-ONLY; Resource type.
5300	Type *string `json:"type,omitempty"`
5301}
5302
5303// MarshalJSON is the custom marshaler for RecoverableDatabase.
5304func (rd RecoverableDatabase) MarshalJSON() ([]byte, error) {
5305	objectMap := make(map[string]interface{})
5306	if rd.RecoverableDatabaseProperties != nil {
5307		objectMap["properties"] = rd.RecoverableDatabaseProperties
5308	}
5309	return json.Marshal(objectMap)
5310}
5311
5312// UnmarshalJSON is the custom unmarshaler for RecoverableDatabase struct.
5313func (rd *RecoverableDatabase) UnmarshalJSON(body []byte) error {
5314	var m map[string]*json.RawMessage
5315	err := json.Unmarshal(body, &m)
5316	if err != nil {
5317		return err
5318	}
5319	for k, v := range m {
5320		switch k {
5321		case "properties":
5322			if v != nil {
5323				var recoverableDatabaseProperties RecoverableDatabaseProperties
5324				err = json.Unmarshal(*v, &recoverableDatabaseProperties)
5325				if err != nil {
5326					return err
5327				}
5328				rd.RecoverableDatabaseProperties = &recoverableDatabaseProperties
5329			}
5330		case "id":
5331			if v != nil {
5332				var ID string
5333				err = json.Unmarshal(*v, &ID)
5334				if err != nil {
5335					return err
5336				}
5337				rd.ID = &ID
5338			}
5339		case "name":
5340			if v != nil {
5341				var name string
5342				err = json.Unmarshal(*v, &name)
5343				if err != nil {
5344					return err
5345				}
5346				rd.Name = &name
5347			}
5348		case "type":
5349			if v != nil {
5350				var typeVar string
5351				err = json.Unmarshal(*v, &typeVar)
5352				if err != nil {
5353					return err
5354				}
5355				rd.Type = &typeVar
5356			}
5357		}
5358	}
5359
5360	return nil
5361}
5362
5363// RecoverableDatabaseListResult the response to a list recoverable databases request
5364type RecoverableDatabaseListResult struct {
5365	autorest.Response `json:"-"`
5366	// Value - A list of recoverable databases
5367	Value *[]RecoverableDatabase `json:"value,omitempty"`
5368}
5369
5370// RecoverableDatabaseProperties the properties of a recoverable database
5371type RecoverableDatabaseProperties struct {
5372	// Edition - READ-ONLY; The edition of the database
5373	Edition *string `json:"edition,omitempty"`
5374	// ServiceLevelObjective - READ-ONLY; The service level objective name of the database
5375	ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"`
5376	// ElasticPoolName - READ-ONLY; The elastic pool name of the database
5377	ElasticPoolName *string `json:"elasticPoolName,omitempty"`
5378	// LastAvailableBackupDate - READ-ONLY; The last available backup date of the database (ISO8601 format)
5379	LastAvailableBackupDate *date.Time `json:"lastAvailableBackupDate,omitempty"`
5380}
5381
5382// ReplicationLink represents a database replication link.
5383type ReplicationLink struct {
5384	autorest.Response `json:"-"`
5385	// Location - READ-ONLY; Location of the server that contains this firewall rule.
5386	Location *string `json:"location,omitempty"`
5387	// ReplicationLinkProperties - The properties representing the resource.
5388	*ReplicationLinkProperties `json:"properties,omitempty"`
5389	// ID - READ-ONLY; Resource ID.
5390	ID *string `json:"id,omitempty"`
5391	// Name - READ-ONLY; Resource name.
5392	Name *string `json:"name,omitempty"`
5393	// Type - READ-ONLY; Resource type.
5394	Type *string `json:"type,omitempty"`
5395}
5396
5397// MarshalJSON is the custom marshaler for ReplicationLink.
5398func (rl ReplicationLink) MarshalJSON() ([]byte, error) {
5399	objectMap := make(map[string]interface{})
5400	if rl.ReplicationLinkProperties != nil {
5401		objectMap["properties"] = rl.ReplicationLinkProperties
5402	}
5403	return json.Marshal(objectMap)
5404}
5405
5406// UnmarshalJSON is the custom unmarshaler for ReplicationLink struct.
5407func (rl *ReplicationLink) UnmarshalJSON(body []byte) error {
5408	var m map[string]*json.RawMessage
5409	err := json.Unmarshal(body, &m)
5410	if err != nil {
5411		return err
5412	}
5413	for k, v := range m {
5414		switch k {
5415		case "location":
5416			if v != nil {
5417				var location string
5418				err = json.Unmarshal(*v, &location)
5419				if err != nil {
5420					return err
5421				}
5422				rl.Location = &location
5423			}
5424		case "properties":
5425			if v != nil {
5426				var replicationLinkProperties ReplicationLinkProperties
5427				err = json.Unmarshal(*v, &replicationLinkProperties)
5428				if err != nil {
5429					return err
5430				}
5431				rl.ReplicationLinkProperties = &replicationLinkProperties
5432			}
5433		case "id":
5434			if v != nil {
5435				var ID string
5436				err = json.Unmarshal(*v, &ID)
5437				if err != nil {
5438					return err
5439				}
5440				rl.ID = &ID
5441			}
5442		case "name":
5443			if v != nil {
5444				var name string
5445				err = json.Unmarshal(*v, &name)
5446				if err != nil {
5447					return err
5448				}
5449				rl.Name = &name
5450			}
5451		case "type":
5452			if v != nil {
5453				var typeVar string
5454				err = json.Unmarshal(*v, &typeVar)
5455				if err != nil {
5456					return err
5457				}
5458				rl.Type = &typeVar
5459			}
5460		}
5461	}
5462
5463	return nil
5464}
5465
5466// ReplicationLinkListResult represents the response to a List database replication link request.
5467type ReplicationLinkListResult struct {
5468	autorest.Response `json:"-"`
5469	// Value - The list of database replication links housed in the database.
5470	Value *[]ReplicationLink `json:"value,omitempty"`
5471}
5472
5473// ReplicationLinkProperties represents the properties of a database replication link.
5474type ReplicationLinkProperties struct {
5475	// IsTerminationAllowed - READ-ONLY; Legacy value indicating whether termination is allowed.  Currently always returns true.
5476	IsTerminationAllowed *bool `json:"isTerminationAllowed,omitempty"`
5477	// ReplicationMode - READ-ONLY; Replication mode of this replication link.
5478	ReplicationMode *string `json:"replicationMode,omitempty"`
5479	// PartnerServer - READ-ONLY; The name of the server hosting the partner database.
5480	PartnerServer *string `json:"partnerServer,omitempty"`
5481	// PartnerDatabase - READ-ONLY; The name of the partner database.
5482	PartnerDatabase *string `json:"partnerDatabase,omitempty"`
5483	// PartnerLocation - READ-ONLY; The Azure Region of the partner database.
5484	PartnerLocation *string `json:"partnerLocation,omitempty"`
5485	// Role - READ-ONLY; The role of the database in the replication link. Possible values include: 'ReplicationRolePrimary', 'ReplicationRoleSecondary', 'ReplicationRoleNonReadableSecondary', 'ReplicationRoleSource', 'ReplicationRoleCopy'
5486	Role ReplicationRole `json:"role,omitempty"`
5487	// PartnerRole - READ-ONLY; The role of the partner database in the replication link. Possible values include: 'ReplicationRolePrimary', 'ReplicationRoleSecondary', 'ReplicationRoleNonReadableSecondary', 'ReplicationRoleSource', 'ReplicationRoleCopy'
5488	PartnerRole ReplicationRole `json:"partnerRole,omitempty"`
5489	// StartTime - READ-ONLY; The start time for the replication link.
5490	StartTime *date.Time `json:"startTime,omitempty"`
5491	// PercentComplete - READ-ONLY; The percentage of seeding complete for the replication link.
5492	PercentComplete *int32 `json:"percentComplete,omitempty"`
5493	// ReplicationState - READ-ONLY; The replication state for the replication link. Possible values include: 'PENDING', 'SEEDING', 'CATCHUP', 'SUSPENDED'
5494	ReplicationState ReplicationState `json:"replicationState,omitempty"`
5495}
5496
5497// ReplicationLinksFailoverAllowDataLossFuture an abstraction for monitoring and retrieving the results of
5498// a long-running operation.
5499type ReplicationLinksFailoverAllowDataLossFuture struct {
5500	azure.Future
5501}
5502
5503// Result returns the result of the asynchronous operation.
5504// If the operation has not completed it will return an error.
5505func (future *ReplicationLinksFailoverAllowDataLossFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
5506	var done bool
5507	done, err = future.DoneWithContext(context.Background(), client)
5508	if err != nil {
5509		err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverAllowDataLossFuture", "Result", future.Response(), "Polling failure")
5510		return
5511	}
5512	if !done {
5513		err = azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverAllowDataLossFuture")
5514		return
5515	}
5516	ar.Response = future.Response()
5517	return
5518}
5519
5520// ReplicationLinksFailoverFuture an abstraction for monitoring and retrieving the results of a
5521// long-running operation.
5522type ReplicationLinksFailoverFuture struct {
5523	azure.Future
5524}
5525
5526// Result returns the result of the asynchronous operation.
5527// If the operation has not completed it will return an error.
5528func (future *ReplicationLinksFailoverFuture) Result(client ReplicationLinksClient) (ar autorest.Response, err error) {
5529	var done bool
5530	done, err = future.DoneWithContext(context.Background(), client)
5531	if err != nil {
5532		err = autorest.NewErrorWithError(err, "sql.ReplicationLinksFailoverFuture", "Result", future.Response(), "Polling failure")
5533		return
5534	}
5535	if !done {
5536		err = azure.NewAsyncOpIncompleteError("sql.ReplicationLinksFailoverFuture")
5537		return
5538	}
5539	ar.Response = future.Response()
5540	return
5541}
5542
5543// Resource ARM resource.
5544type Resource struct {
5545	// ID - READ-ONLY; Resource ID.
5546	ID *string `json:"id,omitempty"`
5547	// Name - READ-ONLY; Resource name.
5548	Name *string `json:"name,omitempty"`
5549	// Type - READ-ONLY; Resource type.
5550	Type *string `json:"type,omitempty"`
5551}
5552
5553// ResourceIdentity azure Active Directory identity configuration for a resource.
5554type ResourceIdentity struct {
5555	// PrincipalID - READ-ONLY; The Azure Active Directory principal id.
5556	PrincipalID *uuid.UUID `json:"principalId,omitempty"`
5557	// 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'
5558	Type IdentityType `json:"type,omitempty"`
5559	// TenantID - READ-ONLY; The Azure Active Directory tenant id.
5560	TenantID *uuid.UUID `json:"tenantId,omitempty"`
5561}
5562
5563// RestorableDroppedDatabase a restorable dropped database
5564type RestorableDroppedDatabase struct {
5565	autorest.Response `json:"-"`
5566	// Location - READ-ONLY; The geo-location where the resource lives
5567	Location *string `json:"location,omitempty"`
5568	// RestorableDroppedDatabaseProperties - The properties of a restorable dropped database
5569	*RestorableDroppedDatabaseProperties `json:"properties,omitempty"`
5570	// ID - READ-ONLY; Resource ID.
5571	ID *string `json:"id,omitempty"`
5572	// Name - READ-ONLY; Resource name.
5573	Name *string `json:"name,omitempty"`
5574	// Type - READ-ONLY; Resource type.
5575	Type *string `json:"type,omitempty"`
5576}
5577
5578// MarshalJSON is the custom marshaler for RestorableDroppedDatabase.
5579func (rdd RestorableDroppedDatabase) MarshalJSON() ([]byte, error) {
5580	objectMap := make(map[string]interface{})
5581	if rdd.RestorableDroppedDatabaseProperties != nil {
5582		objectMap["properties"] = rdd.RestorableDroppedDatabaseProperties
5583	}
5584	return json.Marshal(objectMap)
5585}
5586
5587// UnmarshalJSON is the custom unmarshaler for RestorableDroppedDatabase struct.
5588func (rdd *RestorableDroppedDatabase) UnmarshalJSON(body []byte) error {
5589	var m map[string]*json.RawMessage
5590	err := json.Unmarshal(body, &m)
5591	if err != nil {
5592		return err
5593	}
5594	for k, v := range m {
5595		switch k {
5596		case "location":
5597			if v != nil {
5598				var location string
5599				err = json.Unmarshal(*v, &location)
5600				if err != nil {
5601					return err
5602				}
5603				rdd.Location = &location
5604			}
5605		case "properties":
5606			if v != nil {
5607				var restorableDroppedDatabaseProperties RestorableDroppedDatabaseProperties
5608				err = json.Unmarshal(*v, &restorableDroppedDatabaseProperties)
5609				if err != nil {
5610					return err
5611				}
5612				rdd.RestorableDroppedDatabaseProperties = &restorableDroppedDatabaseProperties
5613			}
5614		case "id":
5615			if v != nil {
5616				var ID string
5617				err = json.Unmarshal(*v, &ID)
5618				if err != nil {
5619					return err
5620				}
5621				rdd.ID = &ID
5622			}
5623		case "name":
5624			if v != nil {
5625				var name string
5626				err = json.Unmarshal(*v, &name)
5627				if err != nil {
5628					return err
5629				}
5630				rdd.Name = &name
5631			}
5632		case "type":
5633			if v != nil {
5634				var typeVar string
5635				err = json.Unmarshal(*v, &typeVar)
5636				if err != nil {
5637					return err
5638				}
5639				rdd.Type = &typeVar
5640			}
5641		}
5642	}
5643
5644	return nil
5645}
5646
5647// RestorableDroppedDatabaseListResult the response to a list restorable dropped databases request
5648type RestorableDroppedDatabaseListResult struct {
5649	autorest.Response `json:"-"`
5650	// Value - A list of restorable dropped databases
5651	Value *[]RestorableDroppedDatabase `json:"value,omitempty"`
5652}
5653
5654// RestorableDroppedDatabaseProperties the properties of a restorable dropped database
5655type RestorableDroppedDatabaseProperties struct {
5656	// DatabaseName - READ-ONLY; The name of the database
5657	DatabaseName *string `json:"databaseName,omitempty"`
5658	// Edition - READ-ONLY; The edition of the database
5659	Edition *string `json:"edition,omitempty"`
5660	// MaxSizeBytes - READ-ONLY; The max size in bytes of the database
5661	MaxSizeBytes *string `json:"maxSizeBytes,omitempty"`
5662	// ServiceLevelObjective - READ-ONLY; The service level objective name of the database
5663	ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"`
5664	// ElasticPoolName - READ-ONLY; The elastic pool name of the database
5665	ElasticPoolName *string `json:"elasticPoolName,omitempty"`
5666	// CreationDate - READ-ONLY; The creation date of the database (ISO8601 format)
5667	CreationDate *date.Time `json:"creationDate,omitempty"`
5668	// DeletionDate - READ-ONLY; The deletion date of the database (ISO8601 format)
5669	DeletionDate *date.Time `json:"deletionDate,omitempty"`
5670	// EarliestRestoreDate - READ-ONLY; The earliest restore date of the database (ISO8601 format)
5671	EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"`
5672}
5673
5674// RestorePoint a database restore point.
5675type RestorePoint struct {
5676	// RestorePointProperties - The properties of the restore point.
5677	*RestorePointProperties `json:"properties,omitempty"`
5678	// ID - READ-ONLY; Resource ID.
5679	ID *string `json:"id,omitempty"`
5680	// Name - READ-ONLY; Resource name.
5681	Name *string `json:"name,omitempty"`
5682	// Type - READ-ONLY; Resource type.
5683	Type *string `json:"type,omitempty"`
5684}
5685
5686// MarshalJSON is the custom marshaler for RestorePoint.
5687func (rp RestorePoint) MarshalJSON() ([]byte, error) {
5688	objectMap := make(map[string]interface{})
5689	if rp.RestorePointProperties != nil {
5690		objectMap["properties"] = rp.RestorePointProperties
5691	}
5692	return json.Marshal(objectMap)
5693}
5694
5695// UnmarshalJSON is the custom unmarshaler for RestorePoint struct.
5696func (rp *RestorePoint) UnmarshalJSON(body []byte) error {
5697	var m map[string]*json.RawMessage
5698	err := json.Unmarshal(body, &m)
5699	if err != nil {
5700		return err
5701	}
5702	for k, v := range m {
5703		switch k {
5704		case "properties":
5705			if v != nil {
5706				var restorePointProperties RestorePointProperties
5707				err = json.Unmarshal(*v, &restorePointProperties)
5708				if err != nil {
5709					return err
5710				}
5711				rp.RestorePointProperties = &restorePointProperties
5712			}
5713		case "id":
5714			if v != nil {
5715				var ID string
5716				err = json.Unmarshal(*v, &ID)
5717				if err != nil {
5718					return err
5719				}
5720				rp.ID = &ID
5721			}
5722		case "name":
5723			if v != nil {
5724				var name string
5725				err = json.Unmarshal(*v, &name)
5726				if err != nil {
5727					return err
5728				}
5729				rp.Name = &name
5730			}
5731		case "type":
5732			if v != nil {
5733				var typeVar string
5734				err = json.Unmarshal(*v, &typeVar)
5735				if err != nil {
5736					return err
5737				}
5738				rp.Type = &typeVar
5739			}
5740		}
5741	}
5742
5743	return nil
5744}
5745
5746// RestorePointListResult the response to a list database restore points request.
5747type RestorePointListResult struct {
5748	autorest.Response `json:"-"`
5749	// Value - The list of database restore points.
5750	Value *[]RestorePoint `json:"value,omitempty"`
5751}
5752
5753// RestorePointProperties represents the properties of a database restore point.
5754type RestorePointProperties struct {
5755	// RestorePointType - READ-ONLY; The restore point type of the database restore point. Possible values include: 'DISCRETE', 'CONTINUOUS'
5756	RestorePointType RestorePointType `json:"restorePointType,omitempty"`
5757	// RestorePointCreationDate - READ-ONLY; Restore point creation time (ISO8601 format). Populated when restorePointType = CONTINUOUS. Null otherwise.
5758	RestorePointCreationDate *date.Time `json:"restorePointCreationDate,omitempty"`
5759	// EarliestRestoreDate - READ-ONLY; Earliest restore time (ISO8601 format). Populated when restorePointType = DISCRETE. Null otherwise.
5760	EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"`
5761}
5762
5763// Server an Azure SQL Database server.
5764type Server struct {
5765	autorest.Response `json:"-"`
5766	// Identity - The Azure Active Directory identity of the server.
5767	Identity *ResourceIdentity `json:"identity,omitempty"`
5768	// Kind - READ-ONLY; Kind of sql server. This is metadata used for the Azure portal experience.
5769	Kind *string `json:"kind,omitempty"`
5770	// ServerProperties - Resource properties.
5771	*ServerProperties `json:"properties,omitempty"`
5772	// Location - Resource location.
5773	Location *string `json:"location,omitempty"`
5774	// Tags - Resource tags.
5775	Tags map[string]*string `json:"tags"`
5776	// ID - READ-ONLY; Resource ID.
5777	ID *string `json:"id,omitempty"`
5778	// Name - READ-ONLY; Resource name.
5779	Name *string `json:"name,omitempty"`
5780	// Type - READ-ONLY; Resource type.
5781	Type *string `json:"type,omitempty"`
5782}
5783
5784// MarshalJSON is the custom marshaler for Server.
5785func (s Server) MarshalJSON() ([]byte, error) {
5786	objectMap := make(map[string]interface{})
5787	if s.Identity != nil {
5788		objectMap["identity"] = s.Identity
5789	}
5790	if s.ServerProperties != nil {
5791		objectMap["properties"] = s.ServerProperties
5792	}
5793	if s.Location != nil {
5794		objectMap["location"] = s.Location
5795	}
5796	if s.Tags != nil {
5797		objectMap["tags"] = s.Tags
5798	}
5799	return json.Marshal(objectMap)
5800}
5801
5802// UnmarshalJSON is the custom unmarshaler for Server struct.
5803func (s *Server) UnmarshalJSON(body []byte) error {
5804	var m map[string]*json.RawMessage
5805	err := json.Unmarshal(body, &m)
5806	if err != nil {
5807		return err
5808	}
5809	for k, v := range m {
5810		switch k {
5811		case "identity":
5812			if v != nil {
5813				var identity ResourceIdentity
5814				err = json.Unmarshal(*v, &identity)
5815				if err != nil {
5816					return err
5817				}
5818				s.Identity = &identity
5819			}
5820		case "kind":
5821			if v != nil {
5822				var kind string
5823				err = json.Unmarshal(*v, &kind)
5824				if err != nil {
5825					return err
5826				}
5827				s.Kind = &kind
5828			}
5829		case "properties":
5830			if v != nil {
5831				var serverProperties ServerProperties
5832				err = json.Unmarshal(*v, &serverProperties)
5833				if err != nil {
5834					return err
5835				}
5836				s.ServerProperties = &serverProperties
5837			}
5838		case "location":
5839			if v != nil {
5840				var location string
5841				err = json.Unmarshal(*v, &location)
5842				if err != nil {
5843					return err
5844				}
5845				s.Location = &location
5846			}
5847		case "tags":
5848			if v != nil {
5849				var tags map[string]*string
5850				err = json.Unmarshal(*v, &tags)
5851				if err != nil {
5852					return err
5853				}
5854				s.Tags = tags
5855			}
5856		case "id":
5857			if v != nil {
5858				var ID string
5859				err = json.Unmarshal(*v, &ID)
5860				if err != nil {
5861					return err
5862				}
5863				s.ID = &ID
5864			}
5865		case "name":
5866			if v != nil {
5867				var name string
5868				err = json.Unmarshal(*v, &name)
5869				if err != nil {
5870					return err
5871				}
5872				s.Name = &name
5873			}
5874		case "type":
5875			if v != nil {
5876				var typeVar string
5877				err = json.Unmarshal(*v, &typeVar)
5878				if err != nil {
5879					return err
5880				}
5881				s.Type = &typeVar
5882			}
5883		}
5884	}
5885
5886	return nil
5887}
5888
5889// ServerAdministratorListResult the response to a list Active Directory Administrators request.
5890type ServerAdministratorListResult struct {
5891	autorest.Response `json:"-"`
5892	// Value - The list of server Active Directory Administrators for the server.
5893	Value *[]ServerAzureADAdministrator `json:"value,omitempty"`
5894}
5895
5896// ServerAdministratorProperties the properties of an server Administrator.
5897type ServerAdministratorProperties struct {
5898	// AdministratorType - The type of administrator.
5899	AdministratorType *string `json:"administratorType,omitempty"`
5900	// Login - The server administrator login value.
5901	Login *string `json:"login,omitempty"`
5902	// Sid - The server administrator Sid (Secure ID).
5903	Sid *uuid.UUID `json:"sid,omitempty"`
5904	// TenantID - The server Active Directory Administrator tenant id.
5905	TenantID *uuid.UUID `json:"tenantId,omitempty"`
5906}
5907
5908// ServerAzureADAdministrator an server Active Directory Administrator.
5909type ServerAzureADAdministrator struct {
5910	autorest.Response `json:"-"`
5911	// ServerAdministratorProperties - The properties of the resource.
5912	*ServerAdministratorProperties `json:"properties,omitempty"`
5913	// ID - READ-ONLY; Resource ID.
5914	ID *string `json:"id,omitempty"`
5915	// Name - READ-ONLY; Resource name.
5916	Name *string `json:"name,omitempty"`
5917	// Type - READ-ONLY; Resource type.
5918	Type *string `json:"type,omitempty"`
5919}
5920
5921// MarshalJSON is the custom marshaler for ServerAzureADAdministrator.
5922func (saaa ServerAzureADAdministrator) MarshalJSON() ([]byte, error) {
5923	objectMap := make(map[string]interface{})
5924	if saaa.ServerAdministratorProperties != nil {
5925		objectMap["properties"] = saaa.ServerAdministratorProperties
5926	}
5927	return json.Marshal(objectMap)
5928}
5929
5930// UnmarshalJSON is the custom unmarshaler for ServerAzureADAdministrator struct.
5931func (saaa *ServerAzureADAdministrator) UnmarshalJSON(body []byte) error {
5932	var m map[string]*json.RawMessage
5933	err := json.Unmarshal(body, &m)
5934	if err != nil {
5935		return err
5936	}
5937	for k, v := range m {
5938		switch k {
5939		case "properties":
5940			if v != nil {
5941				var serverAdministratorProperties ServerAdministratorProperties
5942				err = json.Unmarshal(*v, &serverAdministratorProperties)
5943				if err != nil {
5944					return err
5945				}
5946				saaa.ServerAdministratorProperties = &serverAdministratorProperties
5947			}
5948		case "id":
5949			if v != nil {
5950				var ID string
5951				err = json.Unmarshal(*v, &ID)
5952				if err != nil {
5953					return err
5954				}
5955				saaa.ID = &ID
5956			}
5957		case "name":
5958			if v != nil {
5959				var name string
5960				err = json.Unmarshal(*v, &name)
5961				if err != nil {
5962					return err
5963				}
5964				saaa.Name = &name
5965			}
5966		case "type":
5967			if v != nil {
5968				var typeVar string
5969				err = json.Unmarshal(*v, &typeVar)
5970				if err != nil {
5971					return err
5972				}
5973				saaa.Type = &typeVar
5974			}
5975		}
5976	}
5977
5978	return nil
5979}
5980
5981// ServerAzureADAdministratorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
5982// of a long-running operation.
5983type ServerAzureADAdministratorsCreateOrUpdateFuture struct {
5984	azure.Future
5985}
5986
5987// Result returns the result of the asynchronous operation.
5988// If the operation has not completed it will return an error.
5989func (future *ServerAzureADAdministratorsCreateOrUpdateFuture) Result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) {
5990	var done bool
5991	done, err = future.DoneWithContext(context.Background(), client)
5992	if err != nil {
5993		err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5994		return
5995	}
5996	if !done {
5997		err = azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsCreateOrUpdateFuture")
5998		return
5999	}
6000	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6001	if saaa.Response.Response, err = future.GetResult(sender); err == nil && saaa.Response.Response.StatusCode != http.StatusNoContent {
6002		saaa, err = client.CreateOrUpdateResponder(saaa.Response.Response)
6003		if err != nil {
6004			err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", saaa.Response.Response, "Failure responding to request")
6005		}
6006	}
6007	return
6008}
6009
6010// ServerAzureADAdministratorsDeleteFuture an abstraction for monitoring and retrieving the results of a
6011// long-running operation.
6012type ServerAzureADAdministratorsDeleteFuture struct {
6013	azure.Future
6014}
6015
6016// Result returns the result of the asynchronous operation.
6017// If the operation has not completed it will return an error.
6018func (future *ServerAzureADAdministratorsDeleteFuture) Result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) {
6019	var done bool
6020	done, err = future.DoneWithContext(context.Background(), client)
6021	if err != nil {
6022		err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", future.Response(), "Polling failure")
6023		return
6024	}
6025	if !done {
6026		err = azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsDeleteFuture")
6027		return
6028	}
6029	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6030	if saaa.Response.Response, err = future.GetResult(sender); err == nil && saaa.Response.Response.StatusCode != http.StatusNoContent {
6031		saaa, err = client.DeleteResponder(saaa.Response.Response)
6032		if err != nil {
6033			err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", saaa.Response.Response, "Failure responding to request")
6034		}
6035	}
6036	return
6037}
6038
6039// ServerCommunicationLink server communication link.
6040type ServerCommunicationLink struct {
6041	autorest.Response `json:"-"`
6042	// ServerCommunicationLinkProperties - The properties of resource.
6043	*ServerCommunicationLinkProperties `json:"properties,omitempty"`
6044	// Location - READ-ONLY; Communication link location.
6045	Location *string `json:"location,omitempty"`
6046	// Kind - READ-ONLY; Communication link kind.  This property is used for Azure Portal metadata.
6047	Kind *string `json:"kind,omitempty"`
6048	// ID - READ-ONLY; Resource ID.
6049	ID *string `json:"id,omitempty"`
6050	// Name - READ-ONLY; Resource name.
6051	Name *string `json:"name,omitempty"`
6052	// Type - READ-ONLY; Resource type.
6053	Type *string `json:"type,omitempty"`
6054}
6055
6056// MarshalJSON is the custom marshaler for ServerCommunicationLink.
6057func (scl ServerCommunicationLink) MarshalJSON() ([]byte, error) {
6058	objectMap := make(map[string]interface{})
6059	if scl.ServerCommunicationLinkProperties != nil {
6060		objectMap["properties"] = scl.ServerCommunicationLinkProperties
6061	}
6062	return json.Marshal(objectMap)
6063}
6064
6065// UnmarshalJSON is the custom unmarshaler for ServerCommunicationLink struct.
6066func (scl *ServerCommunicationLink) UnmarshalJSON(body []byte) error {
6067	var m map[string]*json.RawMessage
6068	err := json.Unmarshal(body, &m)
6069	if err != nil {
6070		return err
6071	}
6072	for k, v := range m {
6073		switch k {
6074		case "properties":
6075			if v != nil {
6076				var serverCommunicationLinkProperties ServerCommunicationLinkProperties
6077				err = json.Unmarshal(*v, &serverCommunicationLinkProperties)
6078				if err != nil {
6079					return err
6080				}
6081				scl.ServerCommunicationLinkProperties = &serverCommunicationLinkProperties
6082			}
6083		case "location":
6084			if v != nil {
6085				var location string
6086				err = json.Unmarshal(*v, &location)
6087				if err != nil {
6088					return err
6089				}
6090				scl.Location = &location
6091			}
6092		case "kind":
6093			if v != nil {
6094				var kind string
6095				err = json.Unmarshal(*v, &kind)
6096				if err != nil {
6097					return err
6098				}
6099				scl.Kind = &kind
6100			}
6101		case "id":
6102			if v != nil {
6103				var ID string
6104				err = json.Unmarshal(*v, &ID)
6105				if err != nil {
6106					return err
6107				}
6108				scl.ID = &ID
6109			}
6110		case "name":
6111			if v != nil {
6112				var name string
6113				err = json.Unmarshal(*v, &name)
6114				if err != nil {
6115					return err
6116				}
6117				scl.Name = &name
6118			}
6119		case "type":
6120			if v != nil {
6121				var typeVar string
6122				err = json.Unmarshal(*v, &typeVar)
6123				if err != nil {
6124					return err
6125				}
6126				scl.Type = &typeVar
6127			}
6128		}
6129	}
6130
6131	return nil
6132}
6133
6134// ServerCommunicationLinkListResult a list of server communication links.
6135type ServerCommunicationLinkListResult struct {
6136	autorest.Response `json:"-"`
6137	// Value - The list of server communication links.
6138	Value *[]ServerCommunicationLink `json:"value,omitempty"`
6139}
6140
6141// ServerCommunicationLinkProperties the properties of a server communication link.
6142type ServerCommunicationLinkProperties struct {
6143	// State - READ-ONLY; The state.
6144	State *string `json:"state,omitempty"`
6145	// PartnerServer - The name of the partner server.
6146	PartnerServer *string `json:"partnerServer,omitempty"`
6147}
6148
6149// ServerCommunicationLinksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
6150// a long-running operation.
6151type ServerCommunicationLinksCreateOrUpdateFuture struct {
6152	azure.Future
6153}
6154
6155// Result returns the result of the asynchronous operation.
6156// If the operation has not completed it will return an error.
6157func (future *ServerCommunicationLinksCreateOrUpdateFuture) Result(client ServerCommunicationLinksClient) (scl ServerCommunicationLink, err error) {
6158	var done bool
6159	done, err = future.DoneWithContext(context.Background(), client)
6160	if err != nil {
6161		err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6162		return
6163	}
6164	if !done {
6165		err = azure.NewAsyncOpIncompleteError("sql.ServerCommunicationLinksCreateOrUpdateFuture")
6166		return
6167	}
6168	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6169	if scl.Response.Response, err = future.GetResult(sender); err == nil && scl.Response.Response.StatusCode != http.StatusNoContent {
6170		scl, err = client.CreateOrUpdateResponder(scl.Response.Response)
6171		if err != nil {
6172			err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksCreateOrUpdateFuture", "Result", scl.Response.Response, "Failure responding to request")
6173		}
6174	}
6175	return
6176}
6177
6178// ServerConnectionPolicy a server secure connection policy.
6179type ServerConnectionPolicy struct {
6180	autorest.Response `json:"-"`
6181	// Kind - READ-ONLY; Metadata used for the Azure portal experience.
6182	Kind *string `json:"kind,omitempty"`
6183	// Location - READ-ONLY; Resource location.
6184	Location *string `json:"location,omitempty"`
6185	// ServerConnectionPolicyProperties - The properties of the server secure connection policy.
6186	*ServerConnectionPolicyProperties `json:"properties,omitempty"`
6187	// ID - READ-ONLY; Resource ID.
6188	ID *string `json:"id,omitempty"`
6189	// Name - READ-ONLY; Resource name.
6190	Name *string `json:"name,omitempty"`
6191	// Type - READ-ONLY; Resource type.
6192	Type *string `json:"type,omitempty"`
6193}
6194
6195// MarshalJSON is the custom marshaler for ServerConnectionPolicy.
6196func (scp ServerConnectionPolicy) MarshalJSON() ([]byte, error) {
6197	objectMap := make(map[string]interface{})
6198	if scp.ServerConnectionPolicyProperties != nil {
6199		objectMap["properties"] = scp.ServerConnectionPolicyProperties
6200	}
6201	return json.Marshal(objectMap)
6202}
6203
6204// UnmarshalJSON is the custom unmarshaler for ServerConnectionPolicy struct.
6205func (scp *ServerConnectionPolicy) UnmarshalJSON(body []byte) error {
6206	var m map[string]*json.RawMessage
6207	err := json.Unmarshal(body, &m)
6208	if err != nil {
6209		return err
6210	}
6211	for k, v := range m {
6212		switch k {
6213		case "kind":
6214			if v != nil {
6215				var kind string
6216				err = json.Unmarshal(*v, &kind)
6217				if err != nil {
6218					return err
6219				}
6220				scp.Kind = &kind
6221			}
6222		case "location":
6223			if v != nil {
6224				var location string
6225				err = json.Unmarshal(*v, &location)
6226				if err != nil {
6227					return err
6228				}
6229				scp.Location = &location
6230			}
6231		case "properties":
6232			if v != nil {
6233				var serverConnectionPolicyProperties ServerConnectionPolicyProperties
6234				err = json.Unmarshal(*v, &serverConnectionPolicyProperties)
6235				if err != nil {
6236					return err
6237				}
6238				scp.ServerConnectionPolicyProperties = &serverConnectionPolicyProperties
6239			}
6240		case "id":
6241			if v != nil {
6242				var ID string
6243				err = json.Unmarshal(*v, &ID)
6244				if err != nil {
6245					return err
6246				}
6247				scp.ID = &ID
6248			}
6249		case "name":
6250			if v != nil {
6251				var name string
6252				err = json.Unmarshal(*v, &name)
6253				if err != nil {
6254					return err
6255				}
6256				scp.Name = &name
6257			}
6258		case "type":
6259			if v != nil {
6260				var typeVar string
6261				err = json.Unmarshal(*v, &typeVar)
6262				if err != nil {
6263					return err
6264				}
6265				scp.Type = &typeVar
6266			}
6267		}
6268	}
6269
6270	return nil
6271}
6272
6273// ServerConnectionPolicyProperties the properties of a server secure connection policy.
6274type ServerConnectionPolicyProperties struct {
6275	// ConnectionType - The server connection type. Possible values include: 'ServerConnectionTypeDefault', 'ServerConnectionTypeProxy', 'ServerConnectionTypeRedirect'
6276	ConnectionType ServerConnectionType `json:"connectionType,omitempty"`
6277}
6278
6279// ServerKey a server key.
6280type ServerKey struct {
6281	autorest.Response `json:"-"`
6282	// Kind - Kind of encryption protector. This is metadata used for the Azure portal experience.
6283	Kind *string `json:"kind,omitempty"`
6284	// Location - READ-ONLY; Resource location.
6285	Location *string `json:"location,omitempty"`
6286	// ServerKeyProperties - Resource properties.
6287	*ServerKeyProperties `json:"properties,omitempty"`
6288	// ID - READ-ONLY; Resource ID.
6289	ID *string `json:"id,omitempty"`
6290	// Name - READ-ONLY; Resource name.
6291	Name *string `json:"name,omitempty"`
6292	// Type - READ-ONLY; Resource type.
6293	Type *string `json:"type,omitempty"`
6294}
6295
6296// MarshalJSON is the custom marshaler for ServerKey.
6297func (sk ServerKey) MarshalJSON() ([]byte, error) {
6298	objectMap := make(map[string]interface{})
6299	if sk.Kind != nil {
6300		objectMap["kind"] = sk.Kind
6301	}
6302	if sk.ServerKeyProperties != nil {
6303		objectMap["properties"] = sk.ServerKeyProperties
6304	}
6305	return json.Marshal(objectMap)
6306}
6307
6308// UnmarshalJSON is the custom unmarshaler for ServerKey struct.
6309func (sk *ServerKey) UnmarshalJSON(body []byte) error {
6310	var m map[string]*json.RawMessage
6311	err := json.Unmarshal(body, &m)
6312	if err != nil {
6313		return err
6314	}
6315	for k, v := range m {
6316		switch k {
6317		case "kind":
6318			if v != nil {
6319				var kind string
6320				err = json.Unmarshal(*v, &kind)
6321				if err != nil {
6322					return err
6323				}
6324				sk.Kind = &kind
6325			}
6326		case "location":
6327			if v != nil {
6328				var location string
6329				err = json.Unmarshal(*v, &location)
6330				if err != nil {
6331					return err
6332				}
6333				sk.Location = &location
6334			}
6335		case "properties":
6336			if v != nil {
6337				var serverKeyProperties ServerKeyProperties
6338				err = json.Unmarshal(*v, &serverKeyProperties)
6339				if err != nil {
6340					return err
6341				}
6342				sk.ServerKeyProperties = &serverKeyProperties
6343			}
6344		case "id":
6345			if v != nil {
6346				var ID string
6347				err = json.Unmarshal(*v, &ID)
6348				if err != nil {
6349					return err
6350				}
6351				sk.ID = &ID
6352			}
6353		case "name":
6354			if v != nil {
6355				var name string
6356				err = json.Unmarshal(*v, &name)
6357				if err != nil {
6358					return err
6359				}
6360				sk.Name = &name
6361			}
6362		case "type":
6363			if v != nil {
6364				var typeVar string
6365				err = json.Unmarshal(*v, &typeVar)
6366				if err != nil {
6367					return err
6368				}
6369				sk.Type = &typeVar
6370			}
6371		}
6372	}
6373
6374	return nil
6375}
6376
6377// ServerKeyListResult a list of server keys.
6378type ServerKeyListResult struct {
6379	autorest.Response `json:"-"`
6380	// Value - READ-ONLY; Array of results.
6381	Value *[]ServerKey `json:"value,omitempty"`
6382	// NextLink - READ-ONLY; Link to retrieve next page of results.
6383	NextLink *string `json:"nextLink,omitempty"`
6384}
6385
6386// ServerKeyListResultIterator provides access to a complete listing of ServerKey values.
6387type ServerKeyListResultIterator struct {
6388	i    int
6389	page ServerKeyListResultPage
6390}
6391
6392// NextWithContext advances to the next value.  If there was an error making
6393// the request the iterator does not advance and the error is returned.
6394func (iter *ServerKeyListResultIterator) NextWithContext(ctx context.Context) (err error) {
6395	if tracing.IsEnabled() {
6396		ctx = tracing.StartSpan(ctx, fqdn+"/ServerKeyListResultIterator.NextWithContext")
6397		defer func() {
6398			sc := -1
6399			if iter.Response().Response.Response != nil {
6400				sc = iter.Response().Response.Response.StatusCode
6401			}
6402			tracing.EndSpan(ctx, sc, err)
6403		}()
6404	}
6405	iter.i++
6406	if iter.i < len(iter.page.Values()) {
6407		return nil
6408	}
6409	err = iter.page.NextWithContext(ctx)
6410	if err != nil {
6411		iter.i--
6412		return err
6413	}
6414	iter.i = 0
6415	return nil
6416}
6417
6418// Next advances to the next value.  If there was an error making
6419// the request the iterator does not advance and the error is returned.
6420// Deprecated: Use NextWithContext() instead.
6421func (iter *ServerKeyListResultIterator) Next() error {
6422	return iter.NextWithContext(context.Background())
6423}
6424
6425// NotDone returns true if the enumeration should be started or is not yet complete.
6426func (iter ServerKeyListResultIterator) NotDone() bool {
6427	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6428}
6429
6430// Response returns the raw server response from the last page request.
6431func (iter ServerKeyListResultIterator) Response() ServerKeyListResult {
6432	return iter.page.Response()
6433}
6434
6435// Value returns the current value or a zero-initialized value if the
6436// iterator has advanced beyond the end of the collection.
6437func (iter ServerKeyListResultIterator) Value() ServerKey {
6438	if !iter.page.NotDone() {
6439		return ServerKey{}
6440	}
6441	return iter.page.Values()[iter.i]
6442}
6443
6444// Creates a new instance of the ServerKeyListResultIterator type.
6445func NewServerKeyListResultIterator(page ServerKeyListResultPage) ServerKeyListResultIterator {
6446	return ServerKeyListResultIterator{page: page}
6447}
6448
6449// IsEmpty returns true if the ListResult contains no values.
6450func (sklr ServerKeyListResult) IsEmpty() bool {
6451	return sklr.Value == nil || len(*sklr.Value) == 0
6452}
6453
6454// serverKeyListResultPreparer prepares a request to retrieve the next set of results.
6455// It returns nil if no more results exist.
6456func (sklr ServerKeyListResult) serverKeyListResultPreparer(ctx context.Context) (*http.Request, error) {
6457	if sklr.NextLink == nil || len(to.String(sklr.NextLink)) < 1 {
6458		return nil, nil
6459	}
6460	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6461		autorest.AsJSON(),
6462		autorest.AsGet(),
6463		autorest.WithBaseURL(to.String(sklr.NextLink)))
6464}
6465
6466// ServerKeyListResultPage contains a page of ServerKey values.
6467type ServerKeyListResultPage struct {
6468	fn   func(context.Context, ServerKeyListResult) (ServerKeyListResult, error)
6469	sklr ServerKeyListResult
6470}
6471
6472// NextWithContext advances to the next page of values.  If there was an error making
6473// the request the page does not advance and the error is returned.
6474func (page *ServerKeyListResultPage) NextWithContext(ctx context.Context) (err error) {
6475	if tracing.IsEnabled() {
6476		ctx = tracing.StartSpan(ctx, fqdn+"/ServerKeyListResultPage.NextWithContext")
6477		defer func() {
6478			sc := -1
6479			if page.Response().Response.Response != nil {
6480				sc = page.Response().Response.Response.StatusCode
6481			}
6482			tracing.EndSpan(ctx, sc, err)
6483		}()
6484	}
6485	next, err := page.fn(ctx, page.sklr)
6486	if err != nil {
6487		return err
6488	}
6489	page.sklr = next
6490	return nil
6491}
6492
6493// Next advances to the next page of values.  If there was an error making
6494// the request the page does not advance and the error is returned.
6495// Deprecated: Use NextWithContext() instead.
6496func (page *ServerKeyListResultPage) Next() error {
6497	return page.NextWithContext(context.Background())
6498}
6499
6500// NotDone returns true if the page enumeration should be started or is not yet complete.
6501func (page ServerKeyListResultPage) NotDone() bool {
6502	return !page.sklr.IsEmpty()
6503}
6504
6505// Response returns the raw server response from the last page request.
6506func (page ServerKeyListResultPage) Response() ServerKeyListResult {
6507	return page.sklr
6508}
6509
6510// Values returns the slice of values for the current page or nil if there are no values.
6511func (page ServerKeyListResultPage) Values() []ServerKey {
6512	if page.sklr.IsEmpty() {
6513		return nil
6514	}
6515	return *page.sklr.Value
6516}
6517
6518// Creates a new instance of the ServerKeyListResultPage type.
6519func NewServerKeyListResultPage(getNextPage func(context.Context, ServerKeyListResult) (ServerKeyListResult, error)) ServerKeyListResultPage {
6520	return ServerKeyListResultPage{fn: getNextPage}
6521}
6522
6523// ServerKeyProperties properties for a server key execution.
6524type ServerKeyProperties struct {
6525	// Subregion - READ-ONLY; Subregion of the server key.
6526	Subregion *string `json:"subregion,omitempty"`
6527	// ServerKeyType - The server key type like 'ServiceManaged', 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault'
6528	ServerKeyType ServerKeyType `json:"serverKeyType,omitempty"`
6529	// URI - The URI of the server key.
6530	URI *string `json:"uri,omitempty"`
6531	// Thumbprint - Thumbprint of the server key.
6532	Thumbprint *string `json:"thumbprint,omitempty"`
6533	// CreationDate - The server key creation date.
6534	CreationDate *date.Time `json:"creationDate,omitempty"`
6535}
6536
6537// ServerKeysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6538// long-running operation.
6539type ServerKeysCreateOrUpdateFuture struct {
6540	azure.Future
6541}
6542
6543// Result returns the result of the asynchronous operation.
6544// If the operation has not completed it will return an error.
6545func (future *ServerKeysCreateOrUpdateFuture) Result(client ServerKeysClient) (sk ServerKey, err error) {
6546	var done bool
6547	done, err = future.DoneWithContext(context.Background(), client)
6548	if err != nil {
6549		err = autorest.NewErrorWithError(err, "sql.ServerKeysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6550		return
6551	}
6552	if !done {
6553		err = azure.NewAsyncOpIncompleteError("sql.ServerKeysCreateOrUpdateFuture")
6554		return
6555	}
6556	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6557	if sk.Response.Response, err = future.GetResult(sender); err == nil && sk.Response.Response.StatusCode != http.StatusNoContent {
6558		sk, err = client.CreateOrUpdateResponder(sk.Response.Response)
6559		if err != nil {
6560			err = autorest.NewErrorWithError(err, "sql.ServerKeysCreateOrUpdateFuture", "Result", sk.Response.Response, "Failure responding to request")
6561		}
6562	}
6563	return
6564}
6565
6566// ServerKeysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6567// operation.
6568type ServerKeysDeleteFuture struct {
6569	azure.Future
6570}
6571
6572// Result returns the result of the asynchronous operation.
6573// If the operation has not completed it will return an error.
6574func (future *ServerKeysDeleteFuture) Result(client ServerKeysClient) (ar autorest.Response, err error) {
6575	var done bool
6576	done, err = future.DoneWithContext(context.Background(), client)
6577	if err != nil {
6578		err = autorest.NewErrorWithError(err, "sql.ServerKeysDeleteFuture", "Result", future.Response(), "Polling failure")
6579		return
6580	}
6581	if !done {
6582		err = azure.NewAsyncOpIncompleteError("sql.ServerKeysDeleteFuture")
6583		return
6584	}
6585	ar.Response = future.Response()
6586	return
6587}
6588
6589// ServerListResult a list of servers.
6590type ServerListResult struct {
6591	autorest.Response `json:"-"`
6592	// Value - READ-ONLY; Array of results.
6593	Value *[]Server `json:"value,omitempty"`
6594	// NextLink - READ-ONLY; Link to retrieve next page of results.
6595	NextLink *string `json:"nextLink,omitempty"`
6596}
6597
6598// ServerListResultIterator provides access to a complete listing of Server values.
6599type ServerListResultIterator struct {
6600	i    int
6601	page ServerListResultPage
6602}
6603
6604// NextWithContext advances to the next value.  If there was an error making
6605// the request the iterator does not advance and the error is returned.
6606func (iter *ServerListResultIterator) NextWithContext(ctx context.Context) (err error) {
6607	if tracing.IsEnabled() {
6608		ctx = tracing.StartSpan(ctx, fqdn+"/ServerListResultIterator.NextWithContext")
6609		defer func() {
6610			sc := -1
6611			if iter.Response().Response.Response != nil {
6612				sc = iter.Response().Response.Response.StatusCode
6613			}
6614			tracing.EndSpan(ctx, sc, err)
6615		}()
6616	}
6617	iter.i++
6618	if iter.i < len(iter.page.Values()) {
6619		return nil
6620	}
6621	err = iter.page.NextWithContext(ctx)
6622	if err != nil {
6623		iter.i--
6624		return err
6625	}
6626	iter.i = 0
6627	return nil
6628}
6629
6630// Next advances to the next value.  If there was an error making
6631// the request the iterator does not advance and the error is returned.
6632// Deprecated: Use NextWithContext() instead.
6633func (iter *ServerListResultIterator) Next() error {
6634	return iter.NextWithContext(context.Background())
6635}
6636
6637// NotDone returns true if the enumeration should be started or is not yet complete.
6638func (iter ServerListResultIterator) NotDone() bool {
6639	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6640}
6641
6642// Response returns the raw server response from the last page request.
6643func (iter ServerListResultIterator) Response() ServerListResult {
6644	return iter.page.Response()
6645}
6646
6647// Value returns the current value or a zero-initialized value if the
6648// iterator has advanced beyond the end of the collection.
6649func (iter ServerListResultIterator) Value() Server {
6650	if !iter.page.NotDone() {
6651		return Server{}
6652	}
6653	return iter.page.Values()[iter.i]
6654}
6655
6656// Creates a new instance of the ServerListResultIterator type.
6657func NewServerListResultIterator(page ServerListResultPage) ServerListResultIterator {
6658	return ServerListResultIterator{page: page}
6659}
6660
6661// IsEmpty returns true if the ListResult contains no values.
6662func (slr ServerListResult) IsEmpty() bool {
6663	return slr.Value == nil || len(*slr.Value) == 0
6664}
6665
6666// serverListResultPreparer prepares a request to retrieve the next set of results.
6667// It returns nil if no more results exist.
6668func (slr ServerListResult) serverListResultPreparer(ctx context.Context) (*http.Request, error) {
6669	if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
6670		return nil, nil
6671	}
6672	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6673		autorest.AsJSON(),
6674		autorest.AsGet(),
6675		autorest.WithBaseURL(to.String(slr.NextLink)))
6676}
6677
6678// ServerListResultPage contains a page of Server values.
6679type ServerListResultPage struct {
6680	fn  func(context.Context, ServerListResult) (ServerListResult, error)
6681	slr ServerListResult
6682}
6683
6684// NextWithContext advances to the next page of values.  If there was an error making
6685// the request the page does not advance and the error is returned.
6686func (page *ServerListResultPage) NextWithContext(ctx context.Context) (err error) {
6687	if tracing.IsEnabled() {
6688		ctx = tracing.StartSpan(ctx, fqdn+"/ServerListResultPage.NextWithContext")
6689		defer func() {
6690			sc := -1
6691			if page.Response().Response.Response != nil {
6692				sc = page.Response().Response.Response.StatusCode
6693			}
6694			tracing.EndSpan(ctx, sc, err)
6695		}()
6696	}
6697	next, err := page.fn(ctx, page.slr)
6698	if err != nil {
6699		return err
6700	}
6701	page.slr = next
6702	return nil
6703}
6704
6705// Next advances to the next page of values.  If there was an error making
6706// the request the page does not advance and the error is returned.
6707// Deprecated: Use NextWithContext() instead.
6708func (page *ServerListResultPage) Next() error {
6709	return page.NextWithContext(context.Background())
6710}
6711
6712// NotDone returns true if the page enumeration should be started or is not yet complete.
6713func (page ServerListResultPage) NotDone() bool {
6714	return !page.slr.IsEmpty()
6715}
6716
6717// Response returns the raw server response from the last page request.
6718func (page ServerListResultPage) Response() ServerListResult {
6719	return page.slr
6720}
6721
6722// Values returns the slice of values for the current page or nil if there are no values.
6723func (page ServerListResultPage) Values() []Server {
6724	if page.slr.IsEmpty() {
6725		return nil
6726	}
6727	return *page.slr.Value
6728}
6729
6730// Creates a new instance of the ServerListResultPage type.
6731func NewServerListResultPage(getNextPage func(context.Context, ServerListResult) (ServerListResult, error)) ServerListResultPage {
6732	return ServerListResultPage{fn: getNextPage}
6733}
6734
6735// ServerProperties the properties of a server.
6736type ServerProperties struct {
6737	// AdministratorLogin - Administrator username for the server. Once created it cannot be changed.
6738	AdministratorLogin *string `json:"administratorLogin,omitempty"`
6739	// AdministratorLoginPassword - The administrator login password (required for server creation).
6740	AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"`
6741	// Version - The version of the server.
6742	Version *string `json:"version,omitempty"`
6743	// State - READ-ONLY; The state of the server.
6744	State *string `json:"state,omitempty"`
6745	// FullyQualifiedDomainName - READ-ONLY; The fully qualified domain name of the server.
6746	FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"`
6747}
6748
6749// ServersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
6750// operation.
6751type ServersCreateOrUpdateFuture struct {
6752	azure.Future
6753}
6754
6755// Result returns the result of the asynchronous operation.
6756// If the operation has not completed it will return an error.
6757func (future *ServersCreateOrUpdateFuture) Result(client ServersClient) (s Server, err error) {
6758	var done bool
6759	done, err = future.DoneWithContext(context.Background(), client)
6760	if err != nil {
6761		err = autorest.NewErrorWithError(err, "sql.ServersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6762		return
6763	}
6764	if !done {
6765		err = azure.NewAsyncOpIncompleteError("sql.ServersCreateOrUpdateFuture")
6766		return
6767	}
6768	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6769	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
6770		s, err = client.CreateOrUpdateResponder(s.Response.Response)
6771		if err != nil {
6772			err = autorest.NewErrorWithError(err, "sql.ServersCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
6773		}
6774	}
6775	return
6776}
6777
6778// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6779// operation.
6780type ServersDeleteFuture struct {
6781	azure.Future
6782}
6783
6784// Result returns the result of the asynchronous operation.
6785// If the operation has not completed it will return an error.
6786func (future *ServersDeleteFuture) Result(client ServersClient) (ar autorest.Response, err error) {
6787	var done bool
6788	done, err = future.DoneWithContext(context.Background(), client)
6789	if err != nil {
6790		err = autorest.NewErrorWithError(err, "sql.ServersDeleteFuture", "Result", future.Response(), "Polling failure")
6791		return
6792	}
6793	if !done {
6794		err = azure.NewAsyncOpIncompleteError("sql.ServersDeleteFuture")
6795		return
6796	}
6797	ar.Response = future.Response()
6798	return
6799}
6800
6801// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
6802// operation.
6803type ServersUpdateFuture struct {
6804	azure.Future
6805}
6806
6807// Result returns the result of the asynchronous operation.
6808// If the operation has not completed it will return an error.
6809func (future *ServersUpdateFuture) Result(client ServersClient) (s Server, err error) {
6810	var done bool
6811	done, err = future.DoneWithContext(context.Background(), client)
6812	if err != nil {
6813		err = autorest.NewErrorWithError(err, "sql.ServersUpdateFuture", "Result", future.Response(), "Polling failure")
6814		return
6815	}
6816	if !done {
6817		err = azure.NewAsyncOpIncompleteError("sql.ServersUpdateFuture")
6818		return
6819	}
6820	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6821	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
6822		s, err = client.UpdateResponder(s.Response.Response)
6823		if err != nil {
6824			err = autorest.NewErrorWithError(err, "sql.ServersUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
6825		}
6826	}
6827	return
6828}
6829
6830// ServerUpdate an update request for an Azure SQL Database server.
6831type ServerUpdate struct {
6832	// ServerProperties - Resource properties.
6833	*ServerProperties `json:"properties,omitempty"`
6834	// Tags - Resource tags.
6835	Tags map[string]*string `json:"tags"`
6836}
6837
6838// MarshalJSON is the custom marshaler for ServerUpdate.
6839func (su ServerUpdate) MarshalJSON() ([]byte, error) {
6840	objectMap := make(map[string]interface{})
6841	if su.ServerProperties != nil {
6842		objectMap["properties"] = su.ServerProperties
6843	}
6844	if su.Tags != nil {
6845		objectMap["tags"] = su.Tags
6846	}
6847	return json.Marshal(objectMap)
6848}
6849
6850// UnmarshalJSON is the custom unmarshaler for ServerUpdate struct.
6851func (su *ServerUpdate) UnmarshalJSON(body []byte) error {
6852	var m map[string]*json.RawMessage
6853	err := json.Unmarshal(body, &m)
6854	if err != nil {
6855		return err
6856	}
6857	for k, v := range m {
6858		switch k {
6859		case "properties":
6860			if v != nil {
6861				var serverProperties ServerProperties
6862				err = json.Unmarshal(*v, &serverProperties)
6863				if err != nil {
6864					return err
6865				}
6866				su.ServerProperties = &serverProperties
6867			}
6868		case "tags":
6869			if v != nil {
6870				var tags map[string]*string
6871				err = json.Unmarshal(*v, &tags)
6872				if err != nil {
6873					return err
6874				}
6875				su.Tags = tags
6876			}
6877		}
6878	}
6879
6880	return nil
6881}
6882
6883// ServerUsage represents server metrics.
6884type ServerUsage struct {
6885	// Name - READ-ONLY; Name of the server usage metric.
6886	Name *string `json:"name,omitempty"`
6887	// ResourceName - READ-ONLY; The name of the resource.
6888	ResourceName *string `json:"resourceName,omitempty"`
6889	// DisplayName - READ-ONLY; The metric display name.
6890	DisplayName *string `json:"displayName,omitempty"`
6891	// CurrentValue - READ-ONLY; The current value of the metric.
6892	CurrentValue *float64 `json:"currentValue,omitempty"`
6893	// Limit - READ-ONLY; The current limit of the metric.
6894	Limit *float64 `json:"limit,omitempty"`
6895	// Unit - READ-ONLY; The units of the metric.
6896	Unit *string `json:"unit,omitempty"`
6897	// NextResetTime - READ-ONLY; The next reset time for the metric (ISO8601 format).
6898	NextResetTime *date.Time `json:"nextResetTime,omitempty"`
6899}
6900
6901// ServerUsageListResult represents the response to a list server metrics request.
6902type ServerUsageListResult struct {
6903	autorest.Response `json:"-"`
6904	// Value - The list of server metrics for the server.
6905	Value *[]ServerUsage `json:"value,omitempty"`
6906}
6907
6908// ServerVersionCapability the server capability
6909type ServerVersionCapability struct {
6910	// Name - READ-ONLY; The server version name.
6911	Name *string `json:"name,omitempty"`
6912	// SupportedEditions - READ-ONLY; The list of supported database editions.
6913	SupportedEditions *[]EditionCapability `json:"supportedEditions,omitempty"`
6914	// SupportedElasticPoolEditions - READ-ONLY; The list of supported elastic pool editions.
6915	SupportedElasticPoolEditions *[]ElasticPoolEditionCapability `json:"supportedElasticPoolEditions,omitempty"`
6916	// Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
6917	Status CapabilityStatus `json:"status,omitempty"`
6918	// Reason - The reason for the capability not being available.
6919	Reason *string `json:"reason,omitempty"`
6920}
6921
6922// ServiceLevelObjectiveCapability the service objectives capability.
6923type ServiceLevelObjectiveCapability struct {
6924	// ID - READ-ONLY; The unique ID of the service objective.
6925	ID *uuid.UUID `json:"id,omitempty"`
6926	// Name - READ-ONLY; The service objective name.
6927	Name *string `json:"name,omitempty"`
6928	// SupportedMaxSizes - READ-ONLY; The list of supported maximum database sizes for this service objective.
6929	SupportedMaxSizes *[]MaxSizeCapability `json:"supportedMaxSizes,omitempty"`
6930	// PerformanceLevel - READ-ONLY; The performance level of the service objective capability.
6931	PerformanceLevel *PerformanceLevelCapability `json:"performanceLevel,omitempty"`
6932	// IncludedMaxSize - READ-ONLY; The included (free) max size for this service level objective.
6933	IncludedMaxSize *MaxSizeCapability `json:"includedMaxSize,omitempty"`
6934	// Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
6935	Status CapabilityStatus `json:"status,omitempty"`
6936	// Reason - The reason for the capability not being available.
6937	Reason *string `json:"reason,omitempty"`
6938}
6939
6940// ServiceObjective represents a database service objective.
6941type ServiceObjective struct {
6942	autorest.Response `json:"-"`
6943	// ServiceObjectiveProperties - Represents the properties of the resource.
6944	*ServiceObjectiveProperties `json:"properties,omitempty"`
6945	// ID - READ-ONLY; Resource ID.
6946	ID *string `json:"id,omitempty"`
6947	// Name - READ-ONLY; Resource name.
6948	Name *string `json:"name,omitempty"`
6949	// Type - READ-ONLY; Resource type.
6950	Type *string `json:"type,omitempty"`
6951}
6952
6953// MarshalJSON is the custom marshaler for ServiceObjective.
6954func (so ServiceObjective) MarshalJSON() ([]byte, error) {
6955	objectMap := make(map[string]interface{})
6956	if so.ServiceObjectiveProperties != nil {
6957		objectMap["properties"] = so.ServiceObjectiveProperties
6958	}
6959	return json.Marshal(objectMap)
6960}
6961
6962// UnmarshalJSON is the custom unmarshaler for ServiceObjective struct.
6963func (so *ServiceObjective) UnmarshalJSON(body []byte) error {
6964	var m map[string]*json.RawMessage
6965	err := json.Unmarshal(body, &m)
6966	if err != nil {
6967		return err
6968	}
6969	for k, v := range m {
6970		switch k {
6971		case "properties":
6972			if v != nil {
6973				var serviceObjectiveProperties ServiceObjectiveProperties
6974				err = json.Unmarshal(*v, &serviceObjectiveProperties)
6975				if err != nil {
6976					return err
6977				}
6978				so.ServiceObjectiveProperties = &serviceObjectiveProperties
6979			}
6980		case "id":
6981			if v != nil {
6982				var ID string
6983				err = json.Unmarshal(*v, &ID)
6984				if err != nil {
6985					return err
6986				}
6987				so.ID = &ID
6988			}
6989		case "name":
6990			if v != nil {
6991				var name string
6992				err = json.Unmarshal(*v, &name)
6993				if err != nil {
6994					return err
6995				}
6996				so.Name = &name
6997			}
6998		case "type":
6999			if v != nil {
7000				var typeVar string
7001				err = json.Unmarshal(*v, &typeVar)
7002				if err != nil {
7003					return err
7004				}
7005				so.Type = &typeVar
7006			}
7007		}
7008	}
7009
7010	return nil
7011}
7012
7013// ServiceObjectiveListResult represents the response to a get database service objectives request.
7014type ServiceObjectiveListResult struct {
7015	autorest.Response `json:"-"`
7016	// Value - The list of database service objectives.
7017	Value *[]ServiceObjective `json:"value,omitempty"`
7018}
7019
7020// ServiceObjectiveProperties represents the properties of a database service objective.
7021type ServiceObjectiveProperties struct {
7022	// ServiceObjectiveName - READ-ONLY; The name for the service objective.
7023	ServiceObjectiveName *string `json:"serviceObjectiveName,omitempty"`
7024	// IsDefault - READ-ONLY; Gets whether the service level objective is the default service objective.
7025	IsDefault *bool `json:"isDefault,omitempty"`
7026	// IsSystem - READ-ONLY; Gets whether the service level objective is a system service objective.
7027	IsSystem *bool `json:"isSystem,omitempty"`
7028	// Description - READ-ONLY; The description for the service level objective.
7029	Description *string `json:"description,omitempty"`
7030	// Enabled - READ-ONLY; Gets whether the service level objective is enabled.
7031	Enabled *bool `json:"enabled,omitempty"`
7032}
7033
7034// ServiceTierAdvisor represents a Service Tier Advisor.
7035type ServiceTierAdvisor struct {
7036	autorest.Response `json:"-"`
7037	// ServiceTierAdvisorProperties - READ-ONLY; The properties representing the resource.
7038	*ServiceTierAdvisorProperties `json:"properties,omitempty"`
7039	// ID - READ-ONLY; Resource ID.
7040	ID *string `json:"id,omitempty"`
7041	// Name - READ-ONLY; Resource name.
7042	Name *string `json:"name,omitempty"`
7043	// Type - READ-ONLY; Resource type.
7044	Type *string `json:"type,omitempty"`
7045}
7046
7047// MarshalJSON is the custom marshaler for ServiceTierAdvisor.
7048func (sta ServiceTierAdvisor) MarshalJSON() ([]byte, error) {
7049	objectMap := make(map[string]interface{})
7050	return json.Marshal(objectMap)
7051}
7052
7053// UnmarshalJSON is the custom unmarshaler for ServiceTierAdvisor struct.
7054func (sta *ServiceTierAdvisor) UnmarshalJSON(body []byte) error {
7055	var m map[string]*json.RawMessage
7056	err := json.Unmarshal(body, &m)
7057	if err != nil {
7058		return err
7059	}
7060	for k, v := range m {
7061		switch k {
7062		case "properties":
7063			if v != nil {
7064				var serviceTierAdvisorProperties ServiceTierAdvisorProperties
7065				err = json.Unmarshal(*v, &serviceTierAdvisorProperties)
7066				if err != nil {
7067					return err
7068				}
7069				sta.ServiceTierAdvisorProperties = &serviceTierAdvisorProperties
7070			}
7071		case "id":
7072			if v != nil {
7073				var ID string
7074				err = json.Unmarshal(*v, &ID)
7075				if err != nil {
7076					return err
7077				}
7078				sta.ID = &ID
7079			}
7080		case "name":
7081			if v != nil {
7082				var name string
7083				err = json.Unmarshal(*v, &name)
7084				if err != nil {
7085					return err
7086				}
7087				sta.Name = &name
7088			}
7089		case "type":
7090			if v != nil {
7091				var typeVar string
7092				err = json.Unmarshal(*v, &typeVar)
7093				if err != nil {
7094					return err
7095				}
7096				sta.Type = &typeVar
7097			}
7098		}
7099	}
7100
7101	return nil
7102}
7103
7104// ServiceTierAdvisorListResult represents the response to a list service tier advisor request.
7105type ServiceTierAdvisorListResult struct {
7106	autorest.Response `json:"-"`
7107	// Value - The list of service tier advisors for specified database.
7108	Value *[]ServiceTierAdvisor `json:"value,omitempty"`
7109}
7110
7111// ServiceTierAdvisorProperties represents the properties of a Service Tier Advisor.
7112type ServiceTierAdvisorProperties struct {
7113	// ObservationPeriodStart - READ-ONLY; The observation period start (ISO8601 format).
7114	ObservationPeriodStart *date.Time `json:"observationPeriodStart,omitempty"`
7115	// ObservationPeriodEnd - READ-ONLY; The observation period start (ISO8601 format).
7116	ObservationPeriodEnd *date.Time `json:"observationPeriodEnd,omitempty"`
7117	// ActiveTimeRatio - READ-ONLY; The activeTimeRatio for service tier advisor.
7118	ActiveTimeRatio *float64 `json:"activeTimeRatio,omitempty"`
7119	// MinDtu - READ-ONLY; Gets or sets minDtu for service tier advisor.
7120	MinDtu *float64 `json:"minDtu,omitempty"`
7121	// AvgDtu - READ-ONLY; Gets or sets avgDtu for service tier advisor.
7122	AvgDtu *float64 `json:"avgDtu,omitempty"`
7123	// MaxDtu - READ-ONLY; Gets or sets maxDtu for service tier advisor.
7124	MaxDtu *float64 `json:"maxDtu,omitempty"`
7125	// MaxSizeInGB - READ-ONLY; Gets or sets maxSizeInGB for service tier advisor.
7126	MaxSizeInGB *float64 `json:"maxSizeInGB,omitempty"`
7127	// ServiceLevelObjectiveUsageMetrics - READ-ONLY; Gets or sets serviceLevelObjectiveUsageMetrics for the service tier advisor.
7128	ServiceLevelObjectiveUsageMetrics *[]SloUsageMetric `json:"serviceLevelObjectiveUsageMetrics,omitempty"`
7129	// CurrentServiceLevelObjective - READ-ONLY; Gets or sets currentServiceLevelObjective for service tier advisor.
7130	CurrentServiceLevelObjective *string `json:"currentServiceLevelObjective,omitempty"`
7131	// CurrentServiceLevelObjectiveID - READ-ONLY; Gets or sets currentServiceLevelObjectiveId for service tier advisor.
7132	CurrentServiceLevelObjectiveID *uuid.UUID `json:"currentServiceLevelObjectiveId,omitempty"`
7133	// UsageBasedRecommendationServiceLevelObjective - READ-ONLY; Gets or sets usageBasedRecommendationServiceLevelObjective for service tier advisor.
7134	UsageBasedRecommendationServiceLevelObjective *string `json:"usageBasedRecommendationServiceLevelObjective,omitempty"`
7135	// UsageBasedRecommendationServiceLevelObjectiveID - READ-ONLY; Gets or sets usageBasedRecommendationServiceLevelObjectiveId for service tier advisor.
7136	UsageBasedRecommendationServiceLevelObjectiveID *uuid.UUID `json:"usageBasedRecommendationServiceLevelObjectiveId,omitempty"`
7137	// DatabaseSizeBasedRecommendationServiceLevelObjective - READ-ONLY; Gets or sets databaseSizeBasedRecommendationServiceLevelObjective for service tier advisor.
7138	DatabaseSizeBasedRecommendationServiceLevelObjective *string `json:"databaseSizeBasedRecommendationServiceLevelObjective,omitempty"`
7139	// DatabaseSizeBasedRecommendationServiceLevelObjectiveID - READ-ONLY; Gets or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service tier advisor.
7140	DatabaseSizeBasedRecommendationServiceLevelObjectiveID *uuid.UUID `json:"databaseSizeBasedRecommendationServiceLevelObjectiveId,omitempty"`
7141	// DisasterPlanBasedRecommendationServiceLevelObjective - READ-ONLY; Gets or sets disasterPlanBasedRecommendationServiceLevelObjective for service tier advisor.
7142	DisasterPlanBasedRecommendationServiceLevelObjective *string `json:"disasterPlanBasedRecommendationServiceLevelObjective,omitempty"`
7143	// DisasterPlanBasedRecommendationServiceLevelObjectiveID - READ-ONLY; Gets or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service tier advisor.
7144	DisasterPlanBasedRecommendationServiceLevelObjectiveID *uuid.UUID `json:"disasterPlanBasedRecommendationServiceLevelObjectiveId,omitempty"`
7145	// OverallRecommendationServiceLevelObjective - READ-ONLY; Gets or sets overallRecommendationServiceLevelObjective for service tier advisor.
7146	OverallRecommendationServiceLevelObjective *string `json:"overallRecommendationServiceLevelObjective,omitempty"`
7147	// OverallRecommendationServiceLevelObjectiveID - READ-ONLY; Gets or sets overallRecommendationServiceLevelObjectiveId for service tier advisor.
7148	OverallRecommendationServiceLevelObjectiveID *uuid.UUID `json:"overallRecommendationServiceLevelObjectiveId,omitempty"`
7149	// Confidence - READ-ONLY; Gets or sets confidence for service tier advisor.
7150	Confidence *float64 `json:"confidence,omitempty"`
7151}
7152
7153// Sku an ARM Resource SKU.
7154type Sku struct {
7155	// Name - The name of the SKU, typically, a letter + Number code, e.g. P3.
7156	Name *string `json:"name,omitempty"`
7157	// Tier - The tier or edition of the particular SKU, e.g. Basic, Premium.
7158	Tier *string `json:"tier,omitempty"`
7159	// Size - Size of the particular SKU
7160	Size *string `json:"size,omitempty"`
7161	// Family - If the service has different generations of hardware, for the same SKU, then that can be captured here.
7162	Family *string `json:"family,omitempty"`
7163	// Capacity - Capacity of the particular SKU.
7164	Capacity *int32 `json:"capacity,omitempty"`
7165}
7166
7167// SloUsageMetric a Slo Usage Metric.
7168type SloUsageMetric struct {
7169	// ServiceLevelObjective - READ-ONLY; The serviceLevelObjective for SLO usage metric. Possible values include: 'ServiceObjectiveNameSystem', 'ServiceObjectiveNameSystem0', 'ServiceObjectiveNameSystem1', 'ServiceObjectiveNameSystem2', 'ServiceObjectiveNameSystem3', 'ServiceObjectiveNameSystem4', 'ServiceObjectiveNameSystem2L', 'ServiceObjectiveNameSystem3L', 'ServiceObjectiveNameSystem4L', 'ServiceObjectiveNameFree', 'ServiceObjectiveNameBasic', 'ServiceObjectiveNameS0', 'ServiceObjectiveNameS1', 'ServiceObjectiveNameS2', 'ServiceObjectiveNameS3', 'ServiceObjectiveNameS4', 'ServiceObjectiveNameS6', 'ServiceObjectiveNameS7', 'ServiceObjectiveNameS9', 'ServiceObjectiveNameS12', 'ServiceObjectiveNameP1', 'ServiceObjectiveNameP2', 'ServiceObjectiveNameP3', 'ServiceObjectiveNameP4', 'ServiceObjectiveNameP6', 'ServiceObjectiveNameP11', 'ServiceObjectiveNameP15', 'ServiceObjectiveNamePRS1', 'ServiceObjectiveNamePRS2', 'ServiceObjectiveNamePRS4', 'ServiceObjectiveNamePRS6', 'ServiceObjectiveNameDW100', 'ServiceObjectiveNameDW200', 'ServiceObjectiveNameDW300', 'ServiceObjectiveNameDW400', 'ServiceObjectiveNameDW500', 'ServiceObjectiveNameDW600', 'ServiceObjectiveNameDW1000', 'ServiceObjectiveNameDW1200', 'ServiceObjectiveNameDW1000c', 'ServiceObjectiveNameDW1500', 'ServiceObjectiveNameDW1500c', 'ServiceObjectiveNameDW2000', 'ServiceObjectiveNameDW2000c', 'ServiceObjectiveNameDW3000', 'ServiceObjectiveNameDW2500c', 'ServiceObjectiveNameDW3000c', 'ServiceObjectiveNameDW6000', 'ServiceObjectiveNameDW5000c', 'ServiceObjectiveNameDW6000c', 'ServiceObjectiveNameDW7500c', 'ServiceObjectiveNameDW10000c', 'ServiceObjectiveNameDW15000c', 'ServiceObjectiveNameDW30000c', 'ServiceObjectiveNameDS100', 'ServiceObjectiveNameDS200', 'ServiceObjectiveNameDS300', 'ServiceObjectiveNameDS400', 'ServiceObjectiveNameDS500', 'ServiceObjectiveNameDS600', 'ServiceObjectiveNameDS1000', 'ServiceObjectiveNameDS1200', 'ServiceObjectiveNameDS1500', 'ServiceObjectiveNameDS2000', 'ServiceObjectiveNameElasticPool'
7170	ServiceLevelObjective ServiceObjectiveName `json:"serviceLevelObjective,omitempty"`
7171	// ServiceLevelObjectiveID - READ-ONLY; The serviceLevelObjectiveId for SLO usage metric.
7172	ServiceLevelObjectiveID *uuid.UUID `json:"serviceLevelObjectiveId,omitempty"`
7173	// InRangeTimeRatio - READ-ONLY; Gets or sets inRangeTimeRatio for SLO usage metric.
7174	InRangeTimeRatio *float64 `json:"inRangeTimeRatio,omitempty"`
7175}
7176
7177// SubscriptionUsage usage Metric of a Subscription in a Location.
7178type SubscriptionUsage struct {
7179	autorest.Response `json:"-"`
7180	// SubscriptionUsageProperties - Resource properties.
7181	*SubscriptionUsageProperties `json:"properties,omitempty"`
7182	// ID - READ-ONLY; Resource ID.
7183	ID *string `json:"id,omitempty"`
7184	// Name - READ-ONLY; Resource name.
7185	Name *string `json:"name,omitempty"`
7186	// Type - READ-ONLY; Resource type.
7187	Type *string `json:"type,omitempty"`
7188}
7189
7190// MarshalJSON is the custom marshaler for SubscriptionUsage.
7191func (su SubscriptionUsage) MarshalJSON() ([]byte, error) {
7192	objectMap := make(map[string]interface{})
7193	if su.SubscriptionUsageProperties != nil {
7194		objectMap["properties"] = su.SubscriptionUsageProperties
7195	}
7196	return json.Marshal(objectMap)
7197}
7198
7199// UnmarshalJSON is the custom unmarshaler for SubscriptionUsage struct.
7200func (su *SubscriptionUsage) UnmarshalJSON(body []byte) error {
7201	var m map[string]*json.RawMessage
7202	err := json.Unmarshal(body, &m)
7203	if err != nil {
7204		return err
7205	}
7206	for k, v := range m {
7207		switch k {
7208		case "properties":
7209			if v != nil {
7210				var subscriptionUsageProperties SubscriptionUsageProperties
7211				err = json.Unmarshal(*v, &subscriptionUsageProperties)
7212				if err != nil {
7213					return err
7214				}
7215				su.SubscriptionUsageProperties = &subscriptionUsageProperties
7216			}
7217		case "id":
7218			if v != nil {
7219				var ID string
7220				err = json.Unmarshal(*v, &ID)
7221				if err != nil {
7222					return err
7223				}
7224				su.ID = &ID
7225			}
7226		case "name":
7227			if v != nil {
7228				var name string
7229				err = json.Unmarshal(*v, &name)
7230				if err != nil {
7231					return err
7232				}
7233				su.Name = &name
7234			}
7235		case "type":
7236			if v != nil {
7237				var typeVar string
7238				err = json.Unmarshal(*v, &typeVar)
7239				if err != nil {
7240					return err
7241				}
7242				su.Type = &typeVar
7243			}
7244		}
7245	}
7246
7247	return nil
7248}
7249
7250// SubscriptionUsageListResult a list of subscription usage metrics in a location.
7251type SubscriptionUsageListResult struct {
7252	autorest.Response `json:"-"`
7253	// Value - READ-ONLY; Array of results.
7254	Value *[]SubscriptionUsage `json:"value,omitempty"`
7255	// NextLink - READ-ONLY; Link to retrieve next page of results.
7256	NextLink *string `json:"nextLink,omitempty"`
7257}
7258
7259// SubscriptionUsageListResultIterator provides access to a complete listing of SubscriptionUsage values.
7260type SubscriptionUsageListResultIterator struct {
7261	i    int
7262	page SubscriptionUsageListResultPage
7263}
7264
7265// NextWithContext advances to the next value.  If there was an error making
7266// the request the iterator does not advance and the error is returned.
7267func (iter *SubscriptionUsageListResultIterator) NextWithContext(ctx context.Context) (err error) {
7268	if tracing.IsEnabled() {
7269		ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionUsageListResultIterator.NextWithContext")
7270		defer func() {
7271			sc := -1
7272			if iter.Response().Response.Response != nil {
7273				sc = iter.Response().Response.Response.StatusCode
7274			}
7275			tracing.EndSpan(ctx, sc, err)
7276		}()
7277	}
7278	iter.i++
7279	if iter.i < len(iter.page.Values()) {
7280		return nil
7281	}
7282	err = iter.page.NextWithContext(ctx)
7283	if err != nil {
7284		iter.i--
7285		return err
7286	}
7287	iter.i = 0
7288	return nil
7289}
7290
7291// Next advances to the next value.  If there was an error making
7292// the request the iterator does not advance and the error is returned.
7293// Deprecated: Use NextWithContext() instead.
7294func (iter *SubscriptionUsageListResultIterator) Next() error {
7295	return iter.NextWithContext(context.Background())
7296}
7297
7298// NotDone returns true if the enumeration should be started or is not yet complete.
7299func (iter SubscriptionUsageListResultIterator) NotDone() bool {
7300	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7301}
7302
7303// Response returns the raw server response from the last page request.
7304func (iter SubscriptionUsageListResultIterator) Response() SubscriptionUsageListResult {
7305	return iter.page.Response()
7306}
7307
7308// Value returns the current value or a zero-initialized value if the
7309// iterator has advanced beyond the end of the collection.
7310func (iter SubscriptionUsageListResultIterator) Value() SubscriptionUsage {
7311	if !iter.page.NotDone() {
7312		return SubscriptionUsage{}
7313	}
7314	return iter.page.Values()[iter.i]
7315}
7316
7317// Creates a new instance of the SubscriptionUsageListResultIterator type.
7318func NewSubscriptionUsageListResultIterator(page SubscriptionUsageListResultPage) SubscriptionUsageListResultIterator {
7319	return SubscriptionUsageListResultIterator{page: page}
7320}
7321
7322// IsEmpty returns true if the ListResult contains no values.
7323func (sulr SubscriptionUsageListResult) IsEmpty() bool {
7324	return sulr.Value == nil || len(*sulr.Value) == 0
7325}
7326
7327// subscriptionUsageListResultPreparer prepares a request to retrieve the next set of results.
7328// It returns nil if no more results exist.
7329func (sulr SubscriptionUsageListResult) subscriptionUsageListResultPreparer(ctx context.Context) (*http.Request, error) {
7330	if sulr.NextLink == nil || len(to.String(sulr.NextLink)) < 1 {
7331		return nil, nil
7332	}
7333	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7334		autorest.AsJSON(),
7335		autorest.AsGet(),
7336		autorest.WithBaseURL(to.String(sulr.NextLink)))
7337}
7338
7339// SubscriptionUsageListResultPage contains a page of SubscriptionUsage values.
7340type SubscriptionUsageListResultPage struct {
7341	fn   func(context.Context, SubscriptionUsageListResult) (SubscriptionUsageListResult, error)
7342	sulr SubscriptionUsageListResult
7343}
7344
7345// NextWithContext advances to the next page of values.  If there was an error making
7346// the request the page does not advance and the error is returned.
7347func (page *SubscriptionUsageListResultPage) NextWithContext(ctx context.Context) (err error) {
7348	if tracing.IsEnabled() {
7349		ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionUsageListResultPage.NextWithContext")
7350		defer func() {
7351			sc := -1
7352			if page.Response().Response.Response != nil {
7353				sc = page.Response().Response.Response.StatusCode
7354			}
7355			tracing.EndSpan(ctx, sc, err)
7356		}()
7357	}
7358	next, err := page.fn(ctx, page.sulr)
7359	if err != nil {
7360		return err
7361	}
7362	page.sulr = next
7363	return nil
7364}
7365
7366// Next advances to the next page of values.  If there was an error making
7367// the request the page does not advance and the error is returned.
7368// Deprecated: Use NextWithContext() instead.
7369func (page *SubscriptionUsageListResultPage) Next() error {
7370	return page.NextWithContext(context.Background())
7371}
7372
7373// NotDone returns true if the page enumeration should be started or is not yet complete.
7374func (page SubscriptionUsageListResultPage) NotDone() bool {
7375	return !page.sulr.IsEmpty()
7376}
7377
7378// Response returns the raw server response from the last page request.
7379func (page SubscriptionUsageListResultPage) Response() SubscriptionUsageListResult {
7380	return page.sulr
7381}
7382
7383// Values returns the slice of values for the current page or nil if there are no values.
7384func (page SubscriptionUsageListResultPage) Values() []SubscriptionUsage {
7385	if page.sulr.IsEmpty() {
7386		return nil
7387	}
7388	return *page.sulr.Value
7389}
7390
7391// Creates a new instance of the SubscriptionUsageListResultPage type.
7392func NewSubscriptionUsageListResultPage(getNextPage func(context.Context, SubscriptionUsageListResult) (SubscriptionUsageListResult, error)) SubscriptionUsageListResultPage {
7393	return SubscriptionUsageListResultPage{fn: getNextPage}
7394}
7395
7396// SubscriptionUsageProperties properties of a subscription usage.
7397type SubscriptionUsageProperties struct {
7398	// DisplayName - READ-ONLY; User-readable name of the metric.
7399	DisplayName *string `json:"displayName,omitempty"`
7400	// CurrentValue - READ-ONLY; Current value of the metric.
7401	CurrentValue *float64 `json:"currentValue,omitempty"`
7402	// Limit - READ-ONLY; Boundary value of the metric.
7403	Limit *float64 `json:"limit,omitempty"`
7404	// Unit - READ-ONLY; Unit of the metric.
7405	Unit *string `json:"unit,omitempty"`
7406}
7407
7408// SyncAgent an Azure SQL Database sync agent.
7409type SyncAgent struct {
7410	autorest.Response `json:"-"`
7411	// SyncAgentProperties - Resource properties.
7412	*SyncAgentProperties `json:"properties,omitempty"`
7413	// ID - READ-ONLY; Resource ID.
7414	ID *string `json:"id,omitempty"`
7415	// Name - READ-ONLY; Resource name.
7416	Name *string `json:"name,omitempty"`
7417	// Type - READ-ONLY; Resource type.
7418	Type *string `json:"type,omitempty"`
7419}
7420
7421// MarshalJSON is the custom marshaler for SyncAgent.
7422func (sa SyncAgent) MarshalJSON() ([]byte, error) {
7423	objectMap := make(map[string]interface{})
7424	if sa.SyncAgentProperties != nil {
7425		objectMap["properties"] = sa.SyncAgentProperties
7426	}
7427	return json.Marshal(objectMap)
7428}
7429
7430// UnmarshalJSON is the custom unmarshaler for SyncAgent struct.
7431func (sa *SyncAgent) UnmarshalJSON(body []byte) error {
7432	var m map[string]*json.RawMessage
7433	err := json.Unmarshal(body, &m)
7434	if err != nil {
7435		return err
7436	}
7437	for k, v := range m {
7438		switch k {
7439		case "properties":
7440			if v != nil {
7441				var syncAgentProperties SyncAgentProperties
7442				err = json.Unmarshal(*v, &syncAgentProperties)
7443				if err != nil {
7444					return err
7445				}
7446				sa.SyncAgentProperties = &syncAgentProperties
7447			}
7448		case "id":
7449			if v != nil {
7450				var ID string
7451				err = json.Unmarshal(*v, &ID)
7452				if err != nil {
7453					return err
7454				}
7455				sa.ID = &ID
7456			}
7457		case "name":
7458			if v != nil {
7459				var name string
7460				err = json.Unmarshal(*v, &name)
7461				if err != nil {
7462					return err
7463				}
7464				sa.Name = &name
7465			}
7466		case "type":
7467			if v != nil {
7468				var typeVar string
7469				err = json.Unmarshal(*v, &typeVar)
7470				if err != nil {
7471					return err
7472				}
7473				sa.Type = &typeVar
7474			}
7475		}
7476	}
7477
7478	return nil
7479}
7480
7481// SyncAgentKeyProperties properties of an Azure SQL Database sync agent key.
7482type SyncAgentKeyProperties struct {
7483	autorest.Response `json:"-"`
7484	// SyncAgentKey - READ-ONLY; Key of sync agent.
7485	SyncAgentKey *string `json:"syncAgentKey,omitempty"`
7486}
7487
7488// SyncAgentLinkedDatabase an Azure SQL Database sync agent linked database.
7489type SyncAgentLinkedDatabase struct {
7490	// SyncAgentLinkedDatabaseProperties - Resource properties.
7491	*SyncAgentLinkedDatabaseProperties `json:"properties,omitempty"`
7492	// ID - READ-ONLY; Resource ID.
7493	ID *string `json:"id,omitempty"`
7494	// Name - READ-ONLY; Resource name.
7495	Name *string `json:"name,omitempty"`
7496	// Type - READ-ONLY; Resource type.
7497	Type *string `json:"type,omitempty"`
7498}
7499
7500// MarshalJSON is the custom marshaler for SyncAgentLinkedDatabase.
7501func (sald SyncAgentLinkedDatabase) MarshalJSON() ([]byte, error) {
7502	objectMap := make(map[string]interface{})
7503	if sald.SyncAgentLinkedDatabaseProperties != nil {
7504		objectMap["properties"] = sald.SyncAgentLinkedDatabaseProperties
7505	}
7506	return json.Marshal(objectMap)
7507}
7508
7509// UnmarshalJSON is the custom unmarshaler for SyncAgentLinkedDatabase struct.
7510func (sald *SyncAgentLinkedDatabase) UnmarshalJSON(body []byte) error {
7511	var m map[string]*json.RawMessage
7512	err := json.Unmarshal(body, &m)
7513	if err != nil {
7514		return err
7515	}
7516	for k, v := range m {
7517		switch k {
7518		case "properties":
7519			if v != nil {
7520				var syncAgentLinkedDatabaseProperties SyncAgentLinkedDatabaseProperties
7521				err = json.Unmarshal(*v, &syncAgentLinkedDatabaseProperties)
7522				if err != nil {
7523					return err
7524				}
7525				sald.SyncAgentLinkedDatabaseProperties = &syncAgentLinkedDatabaseProperties
7526			}
7527		case "id":
7528			if v != nil {
7529				var ID string
7530				err = json.Unmarshal(*v, &ID)
7531				if err != nil {
7532					return err
7533				}
7534				sald.ID = &ID
7535			}
7536		case "name":
7537			if v != nil {
7538				var name string
7539				err = json.Unmarshal(*v, &name)
7540				if err != nil {
7541					return err
7542				}
7543				sald.Name = &name
7544			}
7545		case "type":
7546			if v != nil {
7547				var typeVar string
7548				err = json.Unmarshal(*v, &typeVar)
7549				if err != nil {
7550					return err
7551				}
7552				sald.Type = &typeVar
7553			}
7554		}
7555	}
7556
7557	return nil
7558}
7559
7560// SyncAgentLinkedDatabaseListResult a list of sync agent linked databases.
7561type SyncAgentLinkedDatabaseListResult struct {
7562	autorest.Response `json:"-"`
7563	// Value - READ-ONLY; Array of results.
7564	Value *[]SyncAgentLinkedDatabase `json:"value,omitempty"`
7565	// NextLink - READ-ONLY; Link to retrieve next page of results.
7566	NextLink *string `json:"nextLink,omitempty"`
7567}
7568
7569// SyncAgentLinkedDatabaseListResultIterator provides access to a complete listing of
7570// SyncAgentLinkedDatabase values.
7571type SyncAgentLinkedDatabaseListResultIterator struct {
7572	i    int
7573	page SyncAgentLinkedDatabaseListResultPage
7574}
7575
7576// NextWithContext advances to the next value.  If there was an error making
7577// the request the iterator does not advance and the error is returned.
7578func (iter *SyncAgentLinkedDatabaseListResultIterator) NextWithContext(ctx context.Context) (err error) {
7579	if tracing.IsEnabled() {
7580		ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentLinkedDatabaseListResultIterator.NextWithContext")
7581		defer func() {
7582			sc := -1
7583			if iter.Response().Response.Response != nil {
7584				sc = iter.Response().Response.Response.StatusCode
7585			}
7586			tracing.EndSpan(ctx, sc, err)
7587		}()
7588	}
7589	iter.i++
7590	if iter.i < len(iter.page.Values()) {
7591		return nil
7592	}
7593	err = iter.page.NextWithContext(ctx)
7594	if err != nil {
7595		iter.i--
7596		return err
7597	}
7598	iter.i = 0
7599	return nil
7600}
7601
7602// Next advances to the next value.  If there was an error making
7603// the request the iterator does not advance and the error is returned.
7604// Deprecated: Use NextWithContext() instead.
7605func (iter *SyncAgentLinkedDatabaseListResultIterator) Next() error {
7606	return iter.NextWithContext(context.Background())
7607}
7608
7609// NotDone returns true if the enumeration should be started or is not yet complete.
7610func (iter SyncAgentLinkedDatabaseListResultIterator) NotDone() bool {
7611	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7612}
7613
7614// Response returns the raw server response from the last page request.
7615func (iter SyncAgentLinkedDatabaseListResultIterator) Response() SyncAgentLinkedDatabaseListResult {
7616	return iter.page.Response()
7617}
7618
7619// Value returns the current value or a zero-initialized value if the
7620// iterator has advanced beyond the end of the collection.
7621func (iter SyncAgentLinkedDatabaseListResultIterator) Value() SyncAgentLinkedDatabase {
7622	if !iter.page.NotDone() {
7623		return SyncAgentLinkedDatabase{}
7624	}
7625	return iter.page.Values()[iter.i]
7626}
7627
7628// Creates a new instance of the SyncAgentLinkedDatabaseListResultIterator type.
7629func NewSyncAgentLinkedDatabaseListResultIterator(page SyncAgentLinkedDatabaseListResultPage) SyncAgentLinkedDatabaseListResultIterator {
7630	return SyncAgentLinkedDatabaseListResultIterator{page: page}
7631}
7632
7633// IsEmpty returns true if the ListResult contains no values.
7634func (saldlr SyncAgentLinkedDatabaseListResult) IsEmpty() bool {
7635	return saldlr.Value == nil || len(*saldlr.Value) == 0
7636}
7637
7638// syncAgentLinkedDatabaseListResultPreparer prepares a request to retrieve the next set of results.
7639// It returns nil if no more results exist.
7640func (saldlr SyncAgentLinkedDatabaseListResult) syncAgentLinkedDatabaseListResultPreparer(ctx context.Context) (*http.Request, error) {
7641	if saldlr.NextLink == nil || len(to.String(saldlr.NextLink)) < 1 {
7642		return nil, nil
7643	}
7644	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7645		autorest.AsJSON(),
7646		autorest.AsGet(),
7647		autorest.WithBaseURL(to.String(saldlr.NextLink)))
7648}
7649
7650// SyncAgentLinkedDatabaseListResultPage contains a page of SyncAgentLinkedDatabase values.
7651type SyncAgentLinkedDatabaseListResultPage struct {
7652	fn     func(context.Context, SyncAgentLinkedDatabaseListResult) (SyncAgentLinkedDatabaseListResult, error)
7653	saldlr SyncAgentLinkedDatabaseListResult
7654}
7655
7656// NextWithContext advances to the next page of values.  If there was an error making
7657// the request the page does not advance and the error is returned.
7658func (page *SyncAgentLinkedDatabaseListResultPage) NextWithContext(ctx context.Context) (err error) {
7659	if tracing.IsEnabled() {
7660		ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentLinkedDatabaseListResultPage.NextWithContext")
7661		defer func() {
7662			sc := -1
7663			if page.Response().Response.Response != nil {
7664				sc = page.Response().Response.Response.StatusCode
7665			}
7666			tracing.EndSpan(ctx, sc, err)
7667		}()
7668	}
7669	next, err := page.fn(ctx, page.saldlr)
7670	if err != nil {
7671		return err
7672	}
7673	page.saldlr = next
7674	return nil
7675}
7676
7677// Next advances to the next page of values.  If there was an error making
7678// the request the page does not advance and the error is returned.
7679// Deprecated: Use NextWithContext() instead.
7680func (page *SyncAgentLinkedDatabaseListResultPage) Next() error {
7681	return page.NextWithContext(context.Background())
7682}
7683
7684// NotDone returns true if the page enumeration should be started or is not yet complete.
7685func (page SyncAgentLinkedDatabaseListResultPage) NotDone() bool {
7686	return !page.saldlr.IsEmpty()
7687}
7688
7689// Response returns the raw server response from the last page request.
7690func (page SyncAgentLinkedDatabaseListResultPage) Response() SyncAgentLinkedDatabaseListResult {
7691	return page.saldlr
7692}
7693
7694// Values returns the slice of values for the current page or nil if there are no values.
7695func (page SyncAgentLinkedDatabaseListResultPage) Values() []SyncAgentLinkedDatabase {
7696	if page.saldlr.IsEmpty() {
7697		return nil
7698	}
7699	return *page.saldlr.Value
7700}
7701
7702// Creates a new instance of the SyncAgentLinkedDatabaseListResultPage type.
7703func NewSyncAgentLinkedDatabaseListResultPage(getNextPage func(context.Context, SyncAgentLinkedDatabaseListResult) (SyncAgentLinkedDatabaseListResult, error)) SyncAgentLinkedDatabaseListResultPage {
7704	return SyncAgentLinkedDatabaseListResultPage{fn: getNextPage}
7705}
7706
7707// SyncAgentLinkedDatabaseProperties properties of an Azure SQL Database sync agent linked database.
7708type SyncAgentLinkedDatabaseProperties struct {
7709	// DatabaseType - READ-ONLY; Type of the sync agent linked database. Possible values include: 'AzureSQLDatabase', 'SQLServerDatabase'
7710	DatabaseType SyncMemberDbType `json:"databaseType,omitempty"`
7711	// DatabaseID - READ-ONLY; Id of the sync agent linked database.
7712	DatabaseID *string `json:"databaseId,omitempty"`
7713	// Description - READ-ONLY; Description of the sync agent linked database.
7714	Description *string `json:"description,omitempty"`
7715	// ServerName - READ-ONLY; Server name of the sync agent linked database.
7716	ServerName *string `json:"serverName,omitempty"`
7717	// DatabaseName - READ-ONLY; Database name of the sync agent linked database.
7718	DatabaseName *string `json:"databaseName,omitempty"`
7719	// UserName - READ-ONLY; User name of the sync agent linked database.
7720	UserName *string `json:"userName,omitempty"`
7721}
7722
7723// SyncAgentListResult a list of sync agents.
7724type SyncAgentListResult struct {
7725	autorest.Response `json:"-"`
7726	// Value - READ-ONLY; Array of results.
7727	Value *[]SyncAgent `json:"value,omitempty"`
7728	// NextLink - READ-ONLY; Link to retrieve next page of results.
7729	NextLink *string `json:"nextLink,omitempty"`
7730}
7731
7732// SyncAgentListResultIterator provides access to a complete listing of SyncAgent values.
7733type SyncAgentListResultIterator struct {
7734	i    int
7735	page SyncAgentListResultPage
7736}
7737
7738// NextWithContext advances to the next value.  If there was an error making
7739// the request the iterator does not advance and the error is returned.
7740func (iter *SyncAgentListResultIterator) NextWithContext(ctx context.Context) (err error) {
7741	if tracing.IsEnabled() {
7742		ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentListResultIterator.NextWithContext")
7743		defer func() {
7744			sc := -1
7745			if iter.Response().Response.Response != nil {
7746				sc = iter.Response().Response.Response.StatusCode
7747			}
7748			tracing.EndSpan(ctx, sc, err)
7749		}()
7750	}
7751	iter.i++
7752	if iter.i < len(iter.page.Values()) {
7753		return nil
7754	}
7755	err = iter.page.NextWithContext(ctx)
7756	if err != nil {
7757		iter.i--
7758		return err
7759	}
7760	iter.i = 0
7761	return nil
7762}
7763
7764// Next advances to the next value.  If there was an error making
7765// the request the iterator does not advance and the error is returned.
7766// Deprecated: Use NextWithContext() instead.
7767func (iter *SyncAgentListResultIterator) Next() error {
7768	return iter.NextWithContext(context.Background())
7769}
7770
7771// NotDone returns true if the enumeration should be started or is not yet complete.
7772func (iter SyncAgentListResultIterator) NotDone() bool {
7773	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7774}
7775
7776// Response returns the raw server response from the last page request.
7777func (iter SyncAgentListResultIterator) Response() SyncAgentListResult {
7778	return iter.page.Response()
7779}
7780
7781// Value returns the current value or a zero-initialized value if the
7782// iterator has advanced beyond the end of the collection.
7783func (iter SyncAgentListResultIterator) Value() SyncAgent {
7784	if !iter.page.NotDone() {
7785		return SyncAgent{}
7786	}
7787	return iter.page.Values()[iter.i]
7788}
7789
7790// Creates a new instance of the SyncAgentListResultIterator type.
7791func NewSyncAgentListResultIterator(page SyncAgentListResultPage) SyncAgentListResultIterator {
7792	return SyncAgentListResultIterator{page: page}
7793}
7794
7795// IsEmpty returns true if the ListResult contains no values.
7796func (salr SyncAgentListResult) IsEmpty() bool {
7797	return salr.Value == nil || len(*salr.Value) == 0
7798}
7799
7800// syncAgentListResultPreparer prepares a request to retrieve the next set of results.
7801// It returns nil if no more results exist.
7802func (salr SyncAgentListResult) syncAgentListResultPreparer(ctx context.Context) (*http.Request, error) {
7803	if salr.NextLink == nil || len(to.String(salr.NextLink)) < 1 {
7804		return nil, nil
7805	}
7806	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7807		autorest.AsJSON(),
7808		autorest.AsGet(),
7809		autorest.WithBaseURL(to.String(salr.NextLink)))
7810}
7811
7812// SyncAgentListResultPage contains a page of SyncAgent values.
7813type SyncAgentListResultPage struct {
7814	fn   func(context.Context, SyncAgentListResult) (SyncAgentListResult, error)
7815	salr SyncAgentListResult
7816}
7817
7818// NextWithContext advances to the next page of values.  If there was an error making
7819// the request the page does not advance and the error is returned.
7820func (page *SyncAgentListResultPage) NextWithContext(ctx context.Context) (err error) {
7821	if tracing.IsEnabled() {
7822		ctx = tracing.StartSpan(ctx, fqdn+"/SyncAgentListResultPage.NextWithContext")
7823		defer func() {
7824			sc := -1
7825			if page.Response().Response.Response != nil {
7826				sc = page.Response().Response.Response.StatusCode
7827			}
7828			tracing.EndSpan(ctx, sc, err)
7829		}()
7830	}
7831	next, err := page.fn(ctx, page.salr)
7832	if err != nil {
7833		return err
7834	}
7835	page.salr = next
7836	return nil
7837}
7838
7839// Next advances to the next page of values.  If there was an error making
7840// the request the page does not advance and the error is returned.
7841// Deprecated: Use NextWithContext() instead.
7842func (page *SyncAgentListResultPage) Next() error {
7843	return page.NextWithContext(context.Background())
7844}
7845
7846// NotDone returns true if the page enumeration should be started or is not yet complete.
7847func (page SyncAgentListResultPage) NotDone() bool {
7848	return !page.salr.IsEmpty()
7849}
7850
7851// Response returns the raw server response from the last page request.
7852func (page SyncAgentListResultPage) Response() SyncAgentListResult {
7853	return page.salr
7854}
7855
7856// Values returns the slice of values for the current page or nil if there are no values.
7857func (page SyncAgentListResultPage) Values() []SyncAgent {
7858	if page.salr.IsEmpty() {
7859		return nil
7860	}
7861	return *page.salr.Value
7862}
7863
7864// Creates a new instance of the SyncAgentListResultPage type.
7865func NewSyncAgentListResultPage(getNextPage func(context.Context, SyncAgentListResult) (SyncAgentListResult, error)) SyncAgentListResultPage {
7866	return SyncAgentListResultPage{fn: getNextPage}
7867}
7868
7869// SyncAgentProperties properties of an Azure SQL Database sync agent.
7870type SyncAgentProperties struct {
7871	// Name - READ-ONLY; Name of the sync agent.
7872	Name *string `json:"name,omitempty"`
7873	// SyncDatabaseID - ARM resource id of the sync database in the sync agent.
7874	SyncDatabaseID *string `json:"syncDatabaseId,omitempty"`
7875	// LastAliveTime - READ-ONLY; Last alive time of the sync agent.
7876	LastAliveTime *date.Time `json:"lastAliveTime,omitempty"`
7877	// State - READ-ONLY; State of the sync agent. Possible values include: 'Online', 'Offline', 'NeverConnected'
7878	State SyncAgentState `json:"state,omitempty"`
7879	// IsUpToDate - READ-ONLY; If the sync agent version is up to date.
7880	IsUpToDate *bool `json:"isUpToDate,omitempty"`
7881	// ExpiryTime - READ-ONLY; Expiration time of the sync agent version.
7882	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
7883	// Version - READ-ONLY; Version of the sync agent.
7884	Version *string `json:"version,omitempty"`
7885}
7886
7887// SyncAgentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7888// long-running operation.
7889type SyncAgentsCreateOrUpdateFuture struct {
7890	azure.Future
7891}
7892
7893// Result returns the result of the asynchronous operation.
7894// If the operation has not completed it will return an error.
7895func (future *SyncAgentsCreateOrUpdateFuture) Result(client SyncAgentsClient) (sa SyncAgent, err error) {
7896	var done bool
7897	done, err = future.DoneWithContext(context.Background(), client)
7898	if err != nil {
7899		err = autorest.NewErrorWithError(err, "sql.SyncAgentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7900		return
7901	}
7902	if !done {
7903		err = azure.NewAsyncOpIncompleteError("sql.SyncAgentsCreateOrUpdateFuture")
7904		return
7905	}
7906	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7907	if sa.Response.Response, err = future.GetResult(sender); err == nil && sa.Response.Response.StatusCode != http.StatusNoContent {
7908		sa, err = client.CreateOrUpdateResponder(sa.Response.Response)
7909		if err != nil {
7910			err = autorest.NewErrorWithError(err, "sql.SyncAgentsCreateOrUpdateFuture", "Result", sa.Response.Response, "Failure responding to request")
7911		}
7912	}
7913	return
7914}
7915
7916// SyncAgentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
7917// operation.
7918type SyncAgentsDeleteFuture struct {
7919	azure.Future
7920}
7921
7922// Result returns the result of the asynchronous operation.
7923// If the operation has not completed it will return an error.
7924func (future *SyncAgentsDeleteFuture) Result(client SyncAgentsClient) (ar autorest.Response, err error) {
7925	var done bool
7926	done, err = future.DoneWithContext(context.Background(), client)
7927	if err != nil {
7928		err = autorest.NewErrorWithError(err, "sql.SyncAgentsDeleteFuture", "Result", future.Response(), "Polling failure")
7929		return
7930	}
7931	if !done {
7932		err = azure.NewAsyncOpIncompleteError("sql.SyncAgentsDeleteFuture")
7933		return
7934	}
7935	ar.Response = future.Response()
7936	return
7937}
7938
7939// SyncDatabaseIDListResult a list of sync database ID properties.
7940type SyncDatabaseIDListResult struct {
7941	autorest.Response `json:"-"`
7942	// Value - READ-ONLY; Array of results.
7943	Value *[]SyncDatabaseIDProperties `json:"value,omitempty"`
7944	// NextLink - READ-ONLY; Link to retrieve next page of results.
7945	NextLink *string `json:"nextLink,omitempty"`
7946}
7947
7948// SyncDatabaseIDListResultIterator provides access to a complete listing of SyncDatabaseIDProperties
7949// values.
7950type SyncDatabaseIDListResultIterator struct {
7951	i    int
7952	page SyncDatabaseIDListResultPage
7953}
7954
7955// NextWithContext advances to the next value.  If there was an error making
7956// the request the iterator does not advance and the error is returned.
7957func (iter *SyncDatabaseIDListResultIterator) NextWithContext(ctx context.Context) (err error) {
7958	if tracing.IsEnabled() {
7959		ctx = tracing.StartSpan(ctx, fqdn+"/SyncDatabaseIDListResultIterator.NextWithContext")
7960		defer func() {
7961			sc := -1
7962			if iter.Response().Response.Response != nil {
7963				sc = iter.Response().Response.Response.StatusCode
7964			}
7965			tracing.EndSpan(ctx, sc, err)
7966		}()
7967	}
7968	iter.i++
7969	if iter.i < len(iter.page.Values()) {
7970		return nil
7971	}
7972	err = iter.page.NextWithContext(ctx)
7973	if err != nil {
7974		iter.i--
7975		return err
7976	}
7977	iter.i = 0
7978	return nil
7979}
7980
7981// Next advances to the next value.  If there was an error making
7982// the request the iterator does not advance and the error is returned.
7983// Deprecated: Use NextWithContext() instead.
7984func (iter *SyncDatabaseIDListResultIterator) Next() error {
7985	return iter.NextWithContext(context.Background())
7986}
7987
7988// NotDone returns true if the enumeration should be started or is not yet complete.
7989func (iter SyncDatabaseIDListResultIterator) NotDone() bool {
7990	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7991}
7992
7993// Response returns the raw server response from the last page request.
7994func (iter SyncDatabaseIDListResultIterator) Response() SyncDatabaseIDListResult {
7995	return iter.page.Response()
7996}
7997
7998// Value returns the current value or a zero-initialized value if the
7999// iterator has advanced beyond the end of the collection.
8000func (iter SyncDatabaseIDListResultIterator) Value() SyncDatabaseIDProperties {
8001	if !iter.page.NotDone() {
8002		return SyncDatabaseIDProperties{}
8003	}
8004	return iter.page.Values()[iter.i]
8005}
8006
8007// Creates a new instance of the SyncDatabaseIDListResultIterator type.
8008func NewSyncDatabaseIDListResultIterator(page SyncDatabaseIDListResultPage) SyncDatabaseIDListResultIterator {
8009	return SyncDatabaseIDListResultIterator{page: page}
8010}
8011
8012// IsEmpty returns true if the ListResult contains no values.
8013func (sdilr SyncDatabaseIDListResult) IsEmpty() bool {
8014	return sdilr.Value == nil || len(*sdilr.Value) == 0
8015}
8016
8017// syncDatabaseIDListResultPreparer prepares a request to retrieve the next set of results.
8018// It returns nil if no more results exist.
8019func (sdilr SyncDatabaseIDListResult) syncDatabaseIDListResultPreparer(ctx context.Context) (*http.Request, error) {
8020	if sdilr.NextLink == nil || len(to.String(sdilr.NextLink)) < 1 {
8021		return nil, nil
8022	}
8023	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8024		autorest.AsJSON(),
8025		autorest.AsGet(),
8026		autorest.WithBaseURL(to.String(sdilr.NextLink)))
8027}
8028
8029// SyncDatabaseIDListResultPage contains a page of SyncDatabaseIDProperties values.
8030type SyncDatabaseIDListResultPage struct {
8031	fn    func(context.Context, SyncDatabaseIDListResult) (SyncDatabaseIDListResult, error)
8032	sdilr SyncDatabaseIDListResult
8033}
8034
8035// NextWithContext advances to the next page of values.  If there was an error making
8036// the request the page does not advance and the error is returned.
8037func (page *SyncDatabaseIDListResultPage) NextWithContext(ctx context.Context) (err error) {
8038	if tracing.IsEnabled() {
8039		ctx = tracing.StartSpan(ctx, fqdn+"/SyncDatabaseIDListResultPage.NextWithContext")
8040		defer func() {
8041			sc := -1
8042			if page.Response().Response.Response != nil {
8043				sc = page.Response().Response.Response.StatusCode
8044			}
8045			tracing.EndSpan(ctx, sc, err)
8046		}()
8047	}
8048	next, err := page.fn(ctx, page.sdilr)
8049	if err != nil {
8050		return err
8051	}
8052	page.sdilr = next
8053	return nil
8054}
8055
8056// Next advances to the next page of values.  If there was an error making
8057// the request the page does not advance and the error is returned.
8058// Deprecated: Use NextWithContext() instead.
8059func (page *SyncDatabaseIDListResultPage) Next() error {
8060	return page.NextWithContext(context.Background())
8061}
8062
8063// NotDone returns true if the page enumeration should be started or is not yet complete.
8064func (page SyncDatabaseIDListResultPage) NotDone() bool {
8065	return !page.sdilr.IsEmpty()
8066}
8067
8068// Response returns the raw server response from the last page request.
8069func (page SyncDatabaseIDListResultPage) Response() SyncDatabaseIDListResult {
8070	return page.sdilr
8071}
8072
8073// Values returns the slice of values for the current page or nil if there are no values.
8074func (page SyncDatabaseIDListResultPage) Values() []SyncDatabaseIDProperties {
8075	if page.sdilr.IsEmpty() {
8076		return nil
8077	}
8078	return *page.sdilr.Value
8079}
8080
8081// Creates a new instance of the SyncDatabaseIDListResultPage type.
8082func NewSyncDatabaseIDListResultPage(getNextPage func(context.Context, SyncDatabaseIDListResult) (SyncDatabaseIDListResult, error)) SyncDatabaseIDListResultPage {
8083	return SyncDatabaseIDListResultPage{fn: getNextPage}
8084}
8085
8086// SyncDatabaseIDProperties properties of the sync database id.
8087type SyncDatabaseIDProperties struct {
8088	// ID - READ-ONLY; ARM resource id of sync database.
8089	ID *string `json:"id,omitempty"`
8090}
8091
8092// SyncFullSchemaProperties properties of the database full schema.
8093type SyncFullSchemaProperties struct {
8094	// Tables - READ-ONLY; List of tables in the database full schema.
8095	Tables *[]SyncFullSchemaTable `json:"tables,omitempty"`
8096	// LastUpdateTime - READ-ONLY; Last update time of the database schema.
8097	LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"`
8098}
8099
8100// SyncFullSchemaPropertiesListResult a list of sync schema properties.
8101type SyncFullSchemaPropertiesListResult struct {
8102	autorest.Response `json:"-"`
8103	// Value - READ-ONLY; Array of results.
8104	Value *[]SyncFullSchemaProperties `json:"value,omitempty"`
8105	// NextLink - READ-ONLY; Link to retrieve next page of results.
8106	NextLink *string `json:"nextLink,omitempty"`
8107}
8108
8109// SyncFullSchemaPropertiesListResultIterator provides access to a complete listing of
8110// SyncFullSchemaProperties values.
8111type SyncFullSchemaPropertiesListResultIterator struct {
8112	i    int
8113	page SyncFullSchemaPropertiesListResultPage
8114}
8115
8116// NextWithContext advances to the next value.  If there was an error making
8117// the request the iterator does not advance and the error is returned.
8118func (iter *SyncFullSchemaPropertiesListResultIterator) NextWithContext(ctx context.Context) (err error) {
8119	if tracing.IsEnabled() {
8120		ctx = tracing.StartSpan(ctx, fqdn+"/SyncFullSchemaPropertiesListResultIterator.NextWithContext")
8121		defer func() {
8122			sc := -1
8123			if iter.Response().Response.Response != nil {
8124				sc = iter.Response().Response.Response.StatusCode
8125			}
8126			tracing.EndSpan(ctx, sc, err)
8127		}()
8128	}
8129	iter.i++
8130	if iter.i < len(iter.page.Values()) {
8131		return nil
8132	}
8133	err = iter.page.NextWithContext(ctx)
8134	if err != nil {
8135		iter.i--
8136		return err
8137	}
8138	iter.i = 0
8139	return nil
8140}
8141
8142// Next advances to the next value.  If there was an error making
8143// the request the iterator does not advance and the error is returned.
8144// Deprecated: Use NextWithContext() instead.
8145func (iter *SyncFullSchemaPropertiesListResultIterator) Next() error {
8146	return iter.NextWithContext(context.Background())
8147}
8148
8149// NotDone returns true if the enumeration should be started or is not yet complete.
8150func (iter SyncFullSchemaPropertiesListResultIterator) NotDone() bool {
8151	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8152}
8153
8154// Response returns the raw server response from the last page request.
8155func (iter SyncFullSchemaPropertiesListResultIterator) Response() SyncFullSchemaPropertiesListResult {
8156	return iter.page.Response()
8157}
8158
8159// Value returns the current value or a zero-initialized value if the
8160// iterator has advanced beyond the end of the collection.
8161func (iter SyncFullSchemaPropertiesListResultIterator) Value() SyncFullSchemaProperties {
8162	if !iter.page.NotDone() {
8163		return SyncFullSchemaProperties{}
8164	}
8165	return iter.page.Values()[iter.i]
8166}
8167
8168// Creates a new instance of the SyncFullSchemaPropertiesListResultIterator type.
8169func NewSyncFullSchemaPropertiesListResultIterator(page SyncFullSchemaPropertiesListResultPage) SyncFullSchemaPropertiesListResultIterator {
8170	return SyncFullSchemaPropertiesListResultIterator{page: page}
8171}
8172
8173// IsEmpty returns true if the ListResult contains no values.
8174func (sfsplr SyncFullSchemaPropertiesListResult) IsEmpty() bool {
8175	return sfsplr.Value == nil || len(*sfsplr.Value) == 0
8176}
8177
8178// syncFullSchemaPropertiesListResultPreparer prepares a request to retrieve the next set of results.
8179// It returns nil if no more results exist.
8180func (sfsplr SyncFullSchemaPropertiesListResult) syncFullSchemaPropertiesListResultPreparer(ctx context.Context) (*http.Request, error) {
8181	if sfsplr.NextLink == nil || len(to.String(sfsplr.NextLink)) < 1 {
8182		return nil, nil
8183	}
8184	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8185		autorest.AsJSON(),
8186		autorest.AsGet(),
8187		autorest.WithBaseURL(to.String(sfsplr.NextLink)))
8188}
8189
8190// SyncFullSchemaPropertiesListResultPage contains a page of SyncFullSchemaProperties values.
8191type SyncFullSchemaPropertiesListResultPage struct {
8192	fn     func(context.Context, SyncFullSchemaPropertiesListResult) (SyncFullSchemaPropertiesListResult, error)
8193	sfsplr SyncFullSchemaPropertiesListResult
8194}
8195
8196// NextWithContext advances to the next page of values.  If there was an error making
8197// the request the page does not advance and the error is returned.
8198func (page *SyncFullSchemaPropertiesListResultPage) NextWithContext(ctx context.Context) (err error) {
8199	if tracing.IsEnabled() {
8200		ctx = tracing.StartSpan(ctx, fqdn+"/SyncFullSchemaPropertiesListResultPage.NextWithContext")
8201		defer func() {
8202			sc := -1
8203			if page.Response().Response.Response != nil {
8204				sc = page.Response().Response.Response.StatusCode
8205			}
8206			tracing.EndSpan(ctx, sc, err)
8207		}()
8208	}
8209	next, err := page.fn(ctx, page.sfsplr)
8210	if err != nil {
8211		return err
8212	}
8213	page.sfsplr = next
8214	return nil
8215}
8216
8217// Next advances to the next page of values.  If there was an error making
8218// the request the page does not advance and the error is returned.
8219// Deprecated: Use NextWithContext() instead.
8220func (page *SyncFullSchemaPropertiesListResultPage) Next() error {
8221	return page.NextWithContext(context.Background())
8222}
8223
8224// NotDone returns true if the page enumeration should be started or is not yet complete.
8225func (page SyncFullSchemaPropertiesListResultPage) NotDone() bool {
8226	return !page.sfsplr.IsEmpty()
8227}
8228
8229// Response returns the raw server response from the last page request.
8230func (page SyncFullSchemaPropertiesListResultPage) Response() SyncFullSchemaPropertiesListResult {
8231	return page.sfsplr
8232}
8233
8234// Values returns the slice of values for the current page or nil if there are no values.
8235func (page SyncFullSchemaPropertiesListResultPage) Values() []SyncFullSchemaProperties {
8236	if page.sfsplr.IsEmpty() {
8237		return nil
8238	}
8239	return *page.sfsplr.Value
8240}
8241
8242// Creates a new instance of the SyncFullSchemaPropertiesListResultPage type.
8243func NewSyncFullSchemaPropertiesListResultPage(getNextPage func(context.Context, SyncFullSchemaPropertiesListResult) (SyncFullSchemaPropertiesListResult, error)) SyncFullSchemaPropertiesListResultPage {
8244	return SyncFullSchemaPropertiesListResultPage{fn: getNextPage}
8245}
8246
8247// SyncFullSchemaTable properties of the table in the database full schema.
8248type SyncFullSchemaTable struct {
8249	// Columns - READ-ONLY; List of columns in the table of database full schema.
8250	Columns *[]SyncFullSchemaTableColumn `json:"columns,omitempty"`
8251	// ErrorID - READ-ONLY; Error id of the table.
8252	ErrorID *string `json:"errorId,omitempty"`
8253	// HasError - READ-ONLY; If there is error in the table.
8254	HasError *bool `json:"hasError,omitempty"`
8255	// Name - READ-ONLY; Name of the table.
8256	Name *string `json:"name,omitempty"`
8257	// QuotedName - READ-ONLY; Quoted name of the table.
8258	QuotedName *string `json:"quotedName,omitempty"`
8259}
8260
8261// SyncFullSchemaTableColumn properties of the column in the table of database full schema.
8262type SyncFullSchemaTableColumn struct {
8263	// DataSize - READ-ONLY; Data size of the column.
8264	DataSize *string `json:"dataSize,omitempty"`
8265	// DataType - READ-ONLY; Data type of the column.
8266	DataType *string `json:"dataType,omitempty"`
8267	// ErrorID - READ-ONLY; Error id of the column.
8268	ErrorID *string `json:"errorId,omitempty"`
8269	// HasError - READ-ONLY; If there is error in the table.
8270	HasError *bool `json:"hasError,omitempty"`
8271	// IsPrimaryKey - READ-ONLY; If it is the primary key of the table.
8272	IsPrimaryKey *bool `json:"isPrimaryKey,omitempty"`
8273	// Name - READ-ONLY; Name of the column.
8274	Name *string `json:"name,omitempty"`
8275	// QuotedName - READ-ONLY; Quoted name of the column.
8276	QuotedName *string `json:"quotedName,omitempty"`
8277}
8278
8279// SyncGroup an Azure SQL Database sync group.
8280type SyncGroup struct {
8281	autorest.Response `json:"-"`
8282	// SyncGroupProperties - Resource properties.
8283	*SyncGroupProperties `json:"properties,omitempty"`
8284	// ID - READ-ONLY; Resource ID.
8285	ID *string `json:"id,omitempty"`
8286	// Name - READ-ONLY; Resource name.
8287	Name *string `json:"name,omitempty"`
8288	// Type - READ-ONLY; Resource type.
8289	Type *string `json:"type,omitempty"`
8290}
8291
8292// MarshalJSON is the custom marshaler for SyncGroup.
8293func (sg SyncGroup) MarshalJSON() ([]byte, error) {
8294	objectMap := make(map[string]interface{})
8295	if sg.SyncGroupProperties != nil {
8296		objectMap["properties"] = sg.SyncGroupProperties
8297	}
8298	return json.Marshal(objectMap)
8299}
8300
8301// UnmarshalJSON is the custom unmarshaler for SyncGroup struct.
8302func (sg *SyncGroup) UnmarshalJSON(body []byte) error {
8303	var m map[string]*json.RawMessage
8304	err := json.Unmarshal(body, &m)
8305	if err != nil {
8306		return err
8307	}
8308	for k, v := range m {
8309		switch k {
8310		case "properties":
8311			if v != nil {
8312				var syncGroupProperties SyncGroupProperties
8313				err = json.Unmarshal(*v, &syncGroupProperties)
8314				if err != nil {
8315					return err
8316				}
8317				sg.SyncGroupProperties = &syncGroupProperties
8318			}
8319		case "id":
8320			if v != nil {
8321				var ID string
8322				err = json.Unmarshal(*v, &ID)
8323				if err != nil {
8324					return err
8325				}
8326				sg.ID = &ID
8327			}
8328		case "name":
8329			if v != nil {
8330				var name string
8331				err = json.Unmarshal(*v, &name)
8332				if err != nil {
8333					return err
8334				}
8335				sg.Name = &name
8336			}
8337		case "type":
8338			if v != nil {
8339				var typeVar string
8340				err = json.Unmarshal(*v, &typeVar)
8341				if err != nil {
8342					return err
8343				}
8344				sg.Type = &typeVar
8345			}
8346		}
8347	}
8348
8349	return nil
8350}
8351
8352// SyncGroupListResult a list of sync groups.
8353type SyncGroupListResult struct {
8354	autorest.Response `json:"-"`
8355	// Value - READ-ONLY; Array of results.
8356	Value *[]SyncGroup `json:"value,omitempty"`
8357	// NextLink - READ-ONLY; Link to retrieve next page of results.
8358	NextLink *string `json:"nextLink,omitempty"`
8359}
8360
8361// SyncGroupListResultIterator provides access to a complete listing of SyncGroup values.
8362type SyncGroupListResultIterator struct {
8363	i    int
8364	page SyncGroupListResultPage
8365}
8366
8367// NextWithContext advances to the next value.  If there was an error making
8368// the request the iterator does not advance and the error is returned.
8369func (iter *SyncGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
8370	if tracing.IsEnabled() {
8371		ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupListResultIterator.NextWithContext")
8372		defer func() {
8373			sc := -1
8374			if iter.Response().Response.Response != nil {
8375				sc = iter.Response().Response.Response.StatusCode
8376			}
8377			tracing.EndSpan(ctx, sc, err)
8378		}()
8379	}
8380	iter.i++
8381	if iter.i < len(iter.page.Values()) {
8382		return nil
8383	}
8384	err = iter.page.NextWithContext(ctx)
8385	if err != nil {
8386		iter.i--
8387		return err
8388	}
8389	iter.i = 0
8390	return nil
8391}
8392
8393// Next advances to the next value.  If there was an error making
8394// the request the iterator does not advance and the error is returned.
8395// Deprecated: Use NextWithContext() instead.
8396func (iter *SyncGroupListResultIterator) Next() error {
8397	return iter.NextWithContext(context.Background())
8398}
8399
8400// NotDone returns true if the enumeration should be started or is not yet complete.
8401func (iter SyncGroupListResultIterator) NotDone() bool {
8402	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8403}
8404
8405// Response returns the raw server response from the last page request.
8406func (iter SyncGroupListResultIterator) Response() SyncGroupListResult {
8407	return iter.page.Response()
8408}
8409
8410// Value returns the current value or a zero-initialized value if the
8411// iterator has advanced beyond the end of the collection.
8412func (iter SyncGroupListResultIterator) Value() SyncGroup {
8413	if !iter.page.NotDone() {
8414		return SyncGroup{}
8415	}
8416	return iter.page.Values()[iter.i]
8417}
8418
8419// Creates a new instance of the SyncGroupListResultIterator type.
8420func NewSyncGroupListResultIterator(page SyncGroupListResultPage) SyncGroupListResultIterator {
8421	return SyncGroupListResultIterator{page: page}
8422}
8423
8424// IsEmpty returns true if the ListResult contains no values.
8425func (sglr SyncGroupListResult) IsEmpty() bool {
8426	return sglr.Value == nil || len(*sglr.Value) == 0
8427}
8428
8429// syncGroupListResultPreparer prepares a request to retrieve the next set of results.
8430// It returns nil if no more results exist.
8431func (sglr SyncGroupListResult) syncGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
8432	if sglr.NextLink == nil || len(to.String(sglr.NextLink)) < 1 {
8433		return nil, nil
8434	}
8435	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8436		autorest.AsJSON(),
8437		autorest.AsGet(),
8438		autorest.WithBaseURL(to.String(sglr.NextLink)))
8439}
8440
8441// SyncGroupListResultPage contains a page of SyncGroup values.
8442type SyncGroupListResultPage struct {
8443	fn   func(context.Context, SyncGroupListResult) (SyncGroupListResult, error)
8444	sglr SyncGroupListResult
8445}
8446
8447// NextWithContext 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.
8449func (page *SyncGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
8450	if tracing.IsEnabled() {
8451		ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupListResultPage.NextWithContext")
8452		defer func() {
8453			sc := -1
8454			if page.Response().Response.Response != nil {
8455				sc = page.Response().Response.Response.StatusCode
8456			}
8457			tracing.EndSpan(ctx, sc, err)
8458		}()
8459	}
8460	next, err := page.fn(ctx, page.sglr)
8461	if err != nil {
8462		return err
8463	}
8464	page.sglr = next
8465	return nil
8466}
8467
8468// Next advances to the next page of values.  If there was an error making
8469// the request the page does not advance and the error is returned.
8470// Deprecated: Use NextWithContext() instead.
8471func (page *SyncGroupListResultPage) Next() error {
8472	return page.NextWithContext(context.Background())
8473}
8474
8475// NotDone returns true if the page enumeration should be started or is not yet complete.
8476func (page SyncGroupListResultPage) NotDone() bool {
8477	return !page.sglr.IsEmpty()
8478}
8479
8480// Response returns the raw server response from the last page request.
8481func (page SyncGroupListResultPage) Response() SyncGroupListResult {
8482	return page.sglr
8483}
8484
8485// Values returns the slice of values for the current page or nil if there are no values.
8486func (page SyncGroupListResultPage) Values() []SyncGroup {
8487	if page.sglr.IsEmpty() {
8488		return nil
8489	}
8490	return *page.sglr.Value
8491}
8492
8493// Creates a new instance of the SyncGroupListResultPage type.
8494func NewSyncGroupListResultPage(getNextPage func(context.Context, SyncGroupListResult) (SyncGroupListResult, error)) SyncGroupListResultPage {
8495	return SyncGroupListResultPage{fn: getNextPage}
8496}
8497
8498// SyncGroupLogListResult a list of sync group log properties.
8499type SyncGroupLogListResult struct {
8500	autorest.Response `json:"-"`
8501	// Value - READ-ONLY; Array of results.
8502	Value *[]SyncGroupLogProperties `json:"value,omitempty"`
8503	// NextLink - READ-ONLY; Link to retrieve next page of results.
8504	NextLink *string `json:"nextLink,omitempty"`
8505}
8506
8507// SyncGroupLogListResultIterator provides access to a complete listing of SyncGroupLogProperties values.
8508type SyncGroupLogListResultIterator struct {
8509	i    int
8510	page SyncGroupLogListResultPage
8511}
8512
8513// NextWithContext advances to the next value.  If there was an error making
8514// the request the iterator does not advance and the error is returned.
8515func (iter *SyncGroupLogListResultIterator) NextWithContext(ctx context.Context) (err error) {
8516	if tracing.IsEnabled() {
8517		ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupLogListResultIterator.NextWithContext")
8518		defer func() {
8519			sc := -1
8520			if iter.Response().Response.Response != nil {
8521				sc = iter.Response().Response.Response.StatusCode
8522			}
8523			tracing.EndSpan(ctx, sc, err)
8524		}()
8525	}
8526	iter.i++
8527	if iter.i < len(iter.page.Values()) {
8528		return nil
8529	}
8530	err = iter.page.NextWithContext(ctx)
8531	if err != nil {
8532		iter.i--
8533		return err
8534	}
8535	iter.i = 0
8536	return nil
8537}
8538
8539// Next advances to the next value.  If there was an error making
8540// the request the iterator does not advance and the error is returned.
8541// Deprecated: Use NextWithContext() instead.
8542func (iter *SyncGroupLogListResultIterator) Next() error {
8543	return iter.NextWithContext(context.Background())
8544}
8545
8546// NotDone returns true if the enumeration should be started or is not yet complete.
8547func (iter SyncGroupLogListResultIterator) NotDone() bool {
8548	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8549}
8550
8551// Response returns the raw server response from the last page request.
8552func (iter SyncGroupLogListResultIterator) Response() SyncGroupLogListResult {
8553	return iter.page.Response()
8554}
8555
8556// Value returns the current value or a zero-initialized value if the
8557// iterator has advanced beyond the end of the collection.
8558func (iter SyncGroupLogListResultIterator) Value() SyncGroupLogProperties {
8559	if !iter.page.NotDone() {
8560		return SyncGroupLogProperties{}
8561	}
8562	return iter.page.Values()[iter.i]
8563}
8564
8565// Creates a new instance of the SyncGroupLogListResultIterator type.
8566func NewSyncGroupLogListResultIterator(page SyncGroupLogListResultPage) SyncGroupLogListResultIterator {
8567	return SyncGroupLogListResultIterator{page: page}
8568}
8569
8570// IsEmpty returns true if the ListResult contains no values.
8571func (sgllr SyncGroupLogListResult) IsEmpty() bool {
8572	return sgllr.Value == nil || len(*sgllr.Value) == 0
8573}
8574
8575// syncGroupLogListResultPreparer prepares a request to retrieve the next set of results.
8576// It returns nil if no more results exist.
8577func (sgllr SyncGroupLogListResult) syncGroupLogListResultPreparer(ctx context.Context) (*http.Request, error) {
8578	if sgllr.NextLink == nil || len(to.String(sgllr.NextLink)) < 1 {
8579		return nil, nil
8580	}
8581	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8582		autorest.AsJSON(),
8583		autorest.AsGet(),
8584		autorest.WithBaseURL(to.String(sgllr.NextLink)))
8585}
8586
8587// SyncGroupLogListResultPage contains a page of SyncGroupLogProperties values.
8588type SyncGroupLogListResultPage struct {
8589	fn    func(context.Context, SyncGroupLogListResult) (SyncGroupLogListResult, error)
8590	sgllr SyncGroupLogListResult
8591}
8592
8593// NextWithContext advances to the next page of values.  If there was an error making
8594// the request the page does not advance and the error is returned.
8595func (page *SyncGroupLogListResultPage) NextWithContext(ctx context.Context) (err error) {
8596	if tracing.IsEnabled() {
8597		ctx = tracing.StartSpan(ctx, fqdn+"/SyncGroupLogListResultPage.NextWithContext")
8598		defer func() {
8599			sc := -1
8600			if page.Response().Response.Response != nil {
8601				sc = page.Response().Response.Response.StatusCode
8602			}
8603			tracing.EndSpan(ctx, sc, err)
8604		}()
8605	}
8606	next, err := page.fn(ctx, page.sgllr)
8607	if err != nil {
8608		return err
8609	}
8610	page.sgllr = next
8611	return nil
8612}
8613
8614// Next advances to the next page of values.  If there was an error making
8615// the request the page does not advance and the error is returned.
8616// Deprecated: Use NextWithContext() instead.
8617func (page *SyncGroupLogListResultPage) Next() error {
8618	return page.NextWithContext(context.Background())
8619}
8620
8621// NotDone returns true if the page enumeration should be started or is not yet complete.
8622func (page SyncGroupLogListResultPage) NotDone() bool {
8623	return !page.sgllr.IsEmpty()
8624}
8625
8626// Response returns the raw server response from the last page request.
8627func (page SyncGroupLogListResultPage) Response() SyncGroupLogListResult {
8628	return page.sgllr
8629}
8630
8631// Values returns the slice of values for the current page or nil if there are no values.
8632func (page SyncGroupLogListResultPage) Values() []SyncGroupLogProperties {
8633	if page.sgllr.IsEmpty() {
8634		return nil
8635	}
8636	return *page.sgllr.Value
8637}
8638
8639// Creates a new instance of the SyncGroupLogListResultPage type.
8640func NewSyncGroupLogListResultPage(getNextPage func(context.Context, SyncGroupLogListResult) (SyncGroupLogListResult, error)) SyncGroupLogListResultPage {
8641	return SyncGroupLogListResultPage{fn: getNextPage}
8642}
8643
8644// SyncGroupLogProperties properties of an Azure SQL Database sync group log.
8645type SyncGroupLogProperties struct {
8646	// Timestamp - READ-ONLY; Timestamp of the sync group log.
8647	Timestamp *date.Time `json:"timestamp,omitempty"`
8648	// Type - READ-ONLY; Type of the sync group log. Possible values include: 'SyncGroupLogTypeAll', 'SyncGroupLogTypeError', 'SyncGroupLogTypeWarning', 'SyncGroupLogTypeSuccess'
8649	Type SyncGroupLogType `json:"type,omitempty"`
8650	// Source - READ-ONLY; Source of the sync group log.
8651	Source *string `json:"source,omitempty"`
8652	// Details - READ-ONLY; Details of the sync group log.
8653	Details *string `json:"details,omitempty"`
8654	// TracingID - READ-ONLY; TracingId of the sync group log.
8655	TracingID *uuid.UUID `json:"tracingId,omitempty"`
8656	// OperationStatus - READ-ONLY; OperationStatus of the sync group log.
8657	OperationStatus *string `json:"operationStatus,omitempty"`
8658}
8659
8660// SyncGroupProperties properties of a sync group.
8661type SyncGroupProperties struct {
8662	// Interval - Sync interval of the sync group.
8663	Interval *int32 `json:"interval,omitempty"`
8664	// LastSyncTime - READ-ONLY; Last sync time of the sync group.
8665	LastSyncTime *date.Time `json:"lastSyncTime,omitempty"`
8666	// ConflictResolutionPolicy - Conflict resolution policy of the sync group. Possible values include: 'HubWin', 'MemberWin'
8667	ConflictResolutionPolicy SyncConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
8668	// SyncDatabaseID - ARM resource id of the sync database in the sync group.
8669	SyncDatabaseID *string `json:"syncDatabaseId,omitempty"`
8670	// HubDatabaseUserName - User name for the sync group hub database credential.
8671	HubDatabaseUserName *string `json:"hubDatabaseUserName,omitempty"`
8672	// HubDatabasePassword - Password for the sync group hub database credential.
8673	HubDatabasePassword *string `json:"hubDatabasePassword,omitempty"`
8674	// SyncState - READ-ONLY; Sync state of the sync group. Possible values include: 'NotReady', 'Error', 'Warning', 'Progressing', 'Good'
8675	SyncState SyncGroupState `json:"syncState,omitempty"`
8676	// Schema - Sync schema of the sync group.
8677	Schema *SyncGroupSchema `json:"schema,omitempty"`
8678}
8679
8680// SyncGroupSchema properties of sync group schema.
8681type SyncGroupSchema struct {
8682	// Tables - List of tables in sync group schema.
8683	Tables *[]SyncGroupSchemaTable `json:"tables,omitempty"`
8684	// MasterSyncMemberName - Name of master sync member where the schema is from.
8685	MasterSyncMemberName *string `json:"masterSyncMemberName,omitempty"`
8686}
8687
8688// SyncGroupSchemaTable properties of table in sync group schema.
8689type SyncGroupSchemaTable struct {
8690	// Columns - List of columns in sync group schema.
8691	Columns *[]SyncGroupSchemaTableColumn `json:"columns,omitempty"`
8692	// QuotedName - Quoted name of sync group schema table.
8693	QuotedName *string `json:"quotedName,omitempty"`
8694}
8695
8696// SyncGroupSchemaTableColumn properties of column in sync group table.
8697type SyncGroupSchemaTableColumn struct {
8698	// QuotedName - Quoted name of sync group table column.
8699	QuotedName *string `json:"quotedName,omitempty"`
8700	// DataSize - Data size of the column.
8701	DataSize *string `json:"dataSize,omitempty"`
8702	// DataType - Data type of the column.
8703	DataType *string `json:"dataType,omitempty"`
8704}
8705
8706// SyncGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8707// long-running operation.
8708type SyncGroupsCreateOrUpdateFuture struct {
8709	azure.Future
8710}
8711
8712// Result returns the result of the asynchronous operation.
8713// If the operation has not completed it will return an error.
8714func (future *SyncGroupsCreateOrUpdateFuture) Result(client SyncGroupsClient) (sg SyncGroup, err error) {
8715	var done bool
8716	done, err = future.DoneWithContext(context.Background(), client)
8717	if err != nil {
8718		err = autorest.NewErrorWithError(err, "sql.SyncGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8719		return
8720	}
8721	if !done {
8722		err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsCreateOrUpdateFuture")
8723		return
8724	}
8725	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8726	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
8727		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
8728		if err != nil {
8729			err = autorest.NewErrorWithError(err, "sql.SyncGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
8730		}
8731	}
8732	return
8733}
8734
8735// SyncGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
8736// operation.
8737type SyncGroupsDeleteFuture struct {
8738	azure.Future
8739}
8740
8741// Result returns the result of the asynchronous operation.
8742// If the operation has not completed it will return an error.
8743func (future *SyncGroupsDeleteFuture) Result(client SyncGroupsClient) (ar autorest.Response, err error) {
8744	var done bool
8745	done, err = future.DoneWithContext(context.Background(), client)
8746	if err != nil {
8747		err = autorest.NewErrorWithError(err, "sql.SyncGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
8748		return
8749	}
8750	if !done {
8751		err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsDeleteFuture")
8752		return
8753	}
8754	ar.Response = future.Response()
8755	return
8756}
8757
8758// SyncGroupsRefreshHubSchemaFuture an abstraction for monitoring and retrieving the results of a
8759// long-running operation.
8760type SyncGroupsRefreshHubSchemaFuture struct {
8761	azure.Future
8762}
8763
8764// Result returns the result of the asynchronous operation.
8765// If the operation has not completed it will return an error.
8766func (future *SyncGroupsRefreshHubSchemaFuture) Result(client SyncGroupsClient) (ar autorest.Response, err error) {
8767	var done bool
8768	done, err = future.DoneWithContext(context.Background(), client)
8769	if err != nil {
8770		err = autorest.NewErrorWithError(err, "sql.SyncGroupsRefreshHubSchemaFuture", "Result", future.Response(), "Polling failure")
8771		return
8772	}
8773	if !done {
8774		err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsRefreshHubSchemaFuture")
8775		return
8776	}
8777	ar.Response = future.Response()
8778	return
8779}
8780
8781// SyncGroupsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
8782// operation.
8783type SyncGroupsUpdateFuture struct {
8784	azure.Future
8785}
8786
8787// Result returns the result of the asynchronous operation.
8788// If the operation has not completed it will return an error.
8789func (future *SyncGroupsUpdateFuture) Result(client SyncGroupsClient) (sg SyncGroup, err error) {
8790	var done bool
8791	done, err = future.DoneWithContext(context.Background(), client)
8792	if err != nil {
8793		err = autorest.NewErrorWithError(err, "sql.SyncGroupsUpdateFuture", "Result", future.Response(), "Polling failure")
8794		return
8795	}
8796	if !done {
8797		err = azure.NewAsyncOpIncompleteError("sql.SyncGroupsUpdateFuture")
8798		return
8799	}
8800	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8801	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
8802		sg, err = client.UpdateResponder(sg.Response.Response)
8803		if err != nil {
8804			err = autorest.NewErrorWithError(err, "sql.SyncGroupsUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
8805		}
8806	}
8807	return
8808}
8809
8810// SyncMember an Azure SQL Database sync member.
8811type SyncMember struct {
8812	autorest.Response `json:"-"`
8813	// SyncMemberProperties - Resource properties.
8814	*SyncMemberProperties `json:"properties,omitempty"`
8815	// ID - READ-ONLY; Resource ID.
8816	ID *string `json:"id,omitempty"`
8817	// Name - READ-ONLY; Resource name.
8818	Name *string `json:"name,omitempty"`
8819	// Type - READ-ONLY; Resource type.
8820	Type *string `json:"type,omitempty"`
8821}
8822
8823// MarshalJSON is the custom marshaler for SyncMember.
8824func (sm SyncMember) MarshalJSON() ([]byte, error) {
8825	objectMap := make(map[string]interface{})
8826	if sm.SyncMemberProperties != nil {
8827		objectMap["properties"] = sm.SyncMemberProperties
8828	}
8829	return json.Marshal(objectMap)
8830}
8831
8832// UnmarshalJSON is the custom unmarshaler for SyncMember struct.
8833func (sm *SyncMember) UnmarshalJSON(body []byte) error {
8834	var m map[string]*json.RawMessage
8835	err := json.Unmarshal(body, &m)
8836	if err != nil {
8837		return err
8838	}
8839	for k, v := range m {
8840		switch k {
8841		case "properties":
8842			if v != nil {
8843				var syncMemberProperties SyncMemberProperties
8844				err = json.Unmarshal(*v, &syncMemberProperties)
8845				if err != nil {
8846					return err
8847				}
8848				sm.SyncMemberProperties = &syncMemberProperties
8849			}
8850		case "id":
8851			if v != nil {
8852				var ID string
8853				err = json.Unmarshal(*v, &ID)
8854				if err != nil {
8855					return err
8856				}
8857				sm.ID = &ID
8858			}
8859		case "name":
8860			if v != nil {
8861				var name string
8862				err = json.Unmarshal(*v, &name)
8863				if err != nil {
8864					return err
8865				}
8866				sm.Name = &name
8867			}
8868		case "type":
8869			if v != nil {
8870				var typeVar string
8871				err = json.Unmarshal(*v, &typeVar)
8872				if err != nil {
8873					return err
8874				}
8875				sm.Type = &typeVar
8876			}
8877		}
8878	}
8879
8880	return nil
8881}
8882
8883// SyncMemberListResult a list of Azure SQL Database sync members.
8884type SyncMemberListResult struct {
8885	autorest.Response `json:"-"`
8886	// Value - READ-ONLY; Array of results.
8887	Value *[]SyncMember `json:"value,omitempty"`
8888	// NextLink - READ-ONLY; Link to retrieve next page of results.
8889	NextLink *string `json:"nextLink,omitempty"`
8890}
8891
8892// SyncMemberListResultIterator provides access to a complete listing of SyncMember values.
8893type SyncMemberListResultIterator struct {
8894	i    int
8895	page SyncMemberListResultPage
8896}
8897
8898// NextWithContext advances to the next value.  If there was an error making
8899// the request the iterator does not advance and the error is returned.
8900func (iter *SyncMemberListResultIterator) NextWithContext(ctx context.Context) (err error) {
8901	if tracing.IsEnabled() {
8902		ctx = tracing.StartSpan(ctx, fqdn+"/SyncMemberListResultIterator.NextWithContext")
8903		defer func() {
8904			sc := -1
8905			if iter.Response().Response.Response != nil {
8906				sc = iter.Response().Response.Response.StatusCode
8907			}
8908			tracing.EndSpan(ctx, sc, err)
8909		}()
8910	}
8911	iter.i++
8912	if iter.i < len(iter.page.Values()) {
8913		return nil
8914	}
8915	err = iter.page.NextWithContext(ctx)
8916	if err != nil {
8917		iter.i--
8918		return err
8919	}
8920	iter.i = 0
8921	return nil
8922}
8923
8924// Next advances to the next value.  If there was an error making
8925// the request the iterator does not advance and the error is returned.
8926// Deprecated: Use NextWithContext() instead.
8927func (iter *SyncMemberListResultIterator) Next() error {
8928	return iter.NextWithContext(context.Background())
8929}
8930
8931// NotDone returns true if the enumeration should be started or is not yet complete.
8932func (iter SyncMemberListResultIterator) NotDone() bool {
8933	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8934}
8935
8936// Response returns the raw server response from the last page request.
8937func (iter SyncMemberListResultIterator) Response() SyncMemberListResult {
8938	return iter.page.Response()
8939}
8940
8941// Value returns the current value or a zero-initialized value if the
8942// iterator has advanced beyond the end of the collection.
8943func (iter SyncMemberListResultIterator) Value() SyncMember {
8944	if !iter.page.NotDone() {
8945		return SyncMember{}
8946	}
8947	return iter.page.Values()[iter.i]
8948}
8949
8950// Creates a new instance of the SyncMemberListResultIterator type.
8951func NewSyncMemberListResultIterator(page SyncMemberListResultPage) SyncMemberListResultIterator {
8952	return SyncMemberListResultIterator{page: page}
8953}
8954
8955// IsEmpty returns true if the ListResult contains no values.
8956func (smlr SyncMemberListResult) IsEmpty() bool {
8957	return smlr.Value == nil || len(*smlr.Value) == 0
8958}
8959
8960// syncMemberListResultPreparer prepares a request to retrieve the next set of results.
8961// It returns nil if no more results exist.
8962func (smlr SyncMemberListResult) syncMemberListResultPreparer(ctx context.Context) (*http.Request, error) {
8963	if smlr.NextLink == nil || len(to.String(smlr.NextLink)) < 1 {
8964		return nil, nil
8965	}
8966	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8967		autorest.AsJSON(),
8968		autorest.AsGet(),
8969		autorest.WithBaseURL(to.String(smlr.NextLink)))
8970}
8971
8972// SyncMemberListResultPage contains a page of SyncMember values.
8973type SyncMemberListResultPage struct {
8974	fn   func(context.Context, SyncMemberListResult) (SyncMemberListResult, error)
8975	smlr SyncMemberListResult
8976}
8977
8978// NextWithContext advances to the next page of values.  If there was an error making
8979// the request the page does not advance and the error is returned.
8980func (page *SyncMemberListResultPage) NextWithContext(ctx context.Context) (err error) {
8981	if tracing.IsEnabled() {
8982		ctx = tracing.StartSpan(ctx, fqdn+"/SyncMemberListResultPage.NextWithContext")
8983		defer func() {
8984			sc := -1
8985			if page.Response().Response.Response != nil {
8986				sc = page.Response().Response.Response.StatusCode
8987			}
8988			tracing.EndSpan(ctx, sc, err)
8989		}()
8990	}
8991	next, err := page.fn(ctx, page.smlr)
8992	if err != nil {
8993		return err
8994	}
8995	page.smlr = next
8996	return nil
8997}
8998
8999// Next advances to the next page of values.  If there was an error making
9000// the request the page does not advance and the error is returned.
9001// Deprecated: Use NextWithContext() instead.
9002func (page *SyncMemberListResultPage) Next() error {
9003	return page.NextWithContext(context.Background())
9004}
9005
9006// NotDone returns true if the page enumeration should be started or is not yet complete.
9007func (page SyncMemberListResultPage) NotDone() bool {
9008	return !page.smlr.IsEmpty()
9009}
9010
9011// Response returns the raw server response from the last page request.
9012func (page SyncMemberListResultPage) Response() SyncMemberListResult {
9013	return page.smlr
9014}
9015
9016// Values returns the slice of values for the current page or nil if there are no values.
9017func (page SyncMemberListResultPage) Values() []SyncMember {
9018	if page.smlr.IsEmpty() {
9019		return nil
9020	}
9021	return *page.smlr.Value
9022}
9023
9024// Creates a new instance of the SyncMemberListResultPage type.
9025func NewSyncMemberListResultPage(getNextPage func(context.Context, SyncMemberListResult) (SyncMemberListResult, error)) SyncMemberListResultPage {
9026	return SyncMemberListResultPage{fn: getNextPage}
9027}
9028
9029// SyncMemberProperties properties of a sync member.
9030type SyncMemberProperties struct {
9031	// DatabaseType - Database type of the sync member. Possible values include: 'AzureSQLDatabase', 'SQLServerDatabase'
9032	DatabaseType SyncMemberDbType `json:"databaseType,omitempty"`
9033	// SyncAgentID - ARM resource id of the sync agent in the sync member.
9034	SyncAgentID *string `json:"syncAgentId,omitempty"`
9035	// SQLServerDatabaseID - SQL Server database id of the sync member.
9036	SQLServerDatabaseID *uuid.UUID `json:"sqlServerDatabaseId,omitempty"`
9037	// ServerName - Server name of the member database in the sync member
9038	ServerName *string `json:"serverName,omitempty"`
9039	// DatabaseName - Database name of the member database in the sync member.
9040	DatabaseName *string `json:"databaseName,omitempty"`
9041	// UserName - User name of the member database in the sync member.
9042	UserName *string `json:"userName,omitempty"`
9043	// Password - Password of the member database in the sync member.
9044	Password *string `json:"password,omitempty"`
9045	// SyncDirection - Sync direction of the sync member. Possible values include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember'
9046	SyncDirection SyncDirection `json:"syncDirection,omitempty"`
9047	// SyncState - READ-ONLY; Sync state of the sync member. Possible values include: 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', 'DisabledTombstoneCleanup', 'DisabledBackupRestore', 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', 'ReprovisionFailed', 'UnReprovisioned'
9048	SyncState SyncMemberState `json:"syncState,omitempty"`
9049}
9050
9051// SyncMembersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9052// long-running operation.
9053type SyncMembersCreateOrUpdateFuture struct {
9054	azure.Future
9055}
9056
9057// Result returns the result of the asynchronous operation.
9058// If the operation has not completed it will return an error.
9059func (future *SyncMembersCreateOrUpdateFuture) Result(client SyncMembersClient) (sm SyncMember, err error) {
9060	var done bool
9061	done, err = future.DoneWithContext(context.Background(), client)
9062	if err != nil {
9063		err = autorest.NewErrorWithError(err, "sql.SyncMembersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9064		return
9065	}
9066	if !done {
9067		err = azure.NewAsyncOpIncompleteError("sql.SyncMembersCreateOrUpdateFuture")
9068		return
9069	}
9070	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9071	if sm.Response.Response, err = future.GetResult(sender); err == nil && sm.Response.Response.StatusCode != http.StatusNoContent {
9072		sm, err = client.CreateOrUpdateResponder(sm.Response.Response)
9073		if err != nil {
9074			err = autorest.NewErrorWithError(err, "sql.SyncMembersCreateOrUpdateFuture", "Result", sm.Response.Response, "Failure responding to request")
9075		}
9076	}
9077	return
9078}
9079
9080// SyncMembersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9081// operation.
9082type SyncMembersDeleteFuture struct {
9083	azure.Future
9084}
9085
9086// Result returns the result of the asynchronous operation.
9087// If the operation has not completed it will return an error.
9088func (future *SyncMembersDeleteFuture) Result(client SyncMembersClient) (ar autorest.Response, err error) {
9089	var done bool
9090	done, err = future.DoneWithContext(context.Background(), client)
9091	if err != nil {
9092		err = autorest.NewErrorWithError(err, "sql.SyncMembersDeleteFuture", "Result", future.Response(), "Polling failure")
9093		return
9094	}
9095	if !done {
9096		err = azure.NewAsyncOpIncompleteError("sql.SyncMembersDeleteFuture")
9097		return
9098	}
9099	ar.Response = future.Response()
9100	return
9101}
9102
9103// SyncMembersRefreshMemberSchemaFuture an abstraction for monitoring and retrieving the results of a
9104// long-running operation.
9105type SyncMembersRefreshMemberSchemaFuture struct {
9106	azure.Future
9107}
9108
9109// Result returns the result of the asynchronous operation.
9110// If the operation has not completed it will return an error.
9111func (future *SyncMembersRefreshMemberSchemaFuture) Result(client SyncMembersClient) (ar autorest.Response, err error) {
9112	var done bool
9113	done, err = future.DoneWithContext(context.Background(), client)
9114	if err != nil {
9115		err = autorest.NewErrorWithError(err, "sql.SyncMembersRefreshMemberSchemaFuture", "Result", future.Response(), "Polling failure")
9116		return
9117	}
9118	if !done {
9119		err = azure.NewAsyncOpIncompleteError("sql.SyncMembersRefreshMemberSchemaFuture")
9120		return
9121	}
9122	ar.Response = future.Response()
9123	return
9124}
9125
9126// SyncMembersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
9127// operation.
9128type SyncMembersUpdateFuture struct {
9129	azure.Future
9130}
9131
9132// Result returns the result of the asynchronous operation.
9133// If the operation has not completed it will return an error.
9134func (future *SyncMembersUpdateFuture) Result(client SyncMembersClient) (sm SyncMember, err error) {
9135	var done bool
9136	done, err = future.DoneWithContext(context.Background(), client)
9137	if err != nil {
9138		err = autorest.NewErrorWithError(err, "sql.SyncMembersUpdateFuture", "Result", future.Response(), "Polling failure")
9139		return
9140	}
9141	if !done {
9142		err = azure.NewAsyncOpIncompleteError("sql.SyncMembersUpdateFuture")
9143		return
9144	}
9145	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9146	if sm.Response.Response, err = future.GetResult(sender); err == nil && sm.Response.Response.StatusCode != http.StatusNoContent {
9147		sm, err = client.UpdateResponder(sm.Response.Response)
9148		if err != nil {
9149			err = autorest.NewErrorWithError(err, "sql.SyncMembersUpdateFuture", "Result", sm.Response.Response, "Failure responding to request")
9150		}
9151	}
9152	return
9153}
9154
9155// TrackedResource ARM tracked top level resource.
9156type TrackedResource struct {
9157	// Location - Resource location.
9158	Location *string `json:"location,omitempty"`
9159	// Tags - Resource tags.
9160	Tags map[string]*string `json:"tags"`
9161	// ID - READ-ONLY; Resource ID.
9162	ID *string `json:"id,omitempty"`
9163	// Name - READ-ONLY; Resource name.
9164	Name *string `json:"name,omitempty"`
9165	// Type - READ-ONLY; Resource type.
9166	Type *string `json:"type,omitempty"`
9167}
9168
9169// MarshalJSON is the custom marshaler for TrackedResource.
9170func (tr TrackedResource) MarshalJSON() ([]byte, error) {
9171	objectMap := make(map[string]interface{})
9172	if tr.Location != nil {
9173		objectMap["location"] = tr.Location
9174	}
9175	if tr.Tags != nil {
9176		objectMap["tags"] = tr.Tags
9177	}
9178	return json.Marshal(objectMap)
9179}
9180
9181// TransparentDataEncryption represents a database transparent data encryption configuration.
9182type TransparentDataEncryption struct {
9183	autorest.Response `json:"-"`
9184	// Location - READ-ONLY; Resource location.
9185	Location *string `json:"location,omitempty"`
9186	// TransparentDataEncryptionProperties - Represents the properties of the resource.
9187	*TransparentDataEncryptionProperties `json:"properties,omitempty"`
9188	// ID - READ-ONLY; Resource ID.
9189	ID *string `json:"id,omitempty"`
9190	// Name - READ-ONLY; Resource name.
9191	Name *string `json:"name,omitempty"`
9192	// Type - READ-ONLY; Resource type.
9193	Type *string `json:"type,omitempty"`
9194}
9195
9196// MarshalJSON is the custom marshaler for TransparentDataEncryption.
9197func (tde TransparentDataEncryption) MarshalJSON() ([]byte, error) {
9198	objectMap := make(map[string]interface{})
9199	if tde.TransparentDataEncryptionProperties != nil {
9200		objectMap["properties"] = tde.TransparentDataEncryptionProperties
9201	}
9202	return json.Marshal(objectMap)
9203}
9204
9205// UnmarshalJSON is the custom unmarshaler for TransparentDataEncryption struct.
9206func (tde *TransparentDataEncryption) UnmarshalJSON(body []byte) error {
9207	var m map[string]*json.RawMessage
9208	err := json.Unmarshal(body, &m)
9209	if err != nil {
9210		return err
9211	}
9212	for k, v := range m {
9213		switch k {
9214		case "location":
9215			if v != nil {
9216				var location string
9217				err = json.Unmarshal(*v, &location)
9218				if err != nil {
9219					return err
9220				}
9221				tde.Location = &location
9222			}
9223		case "properties":
9224			if v != nil {
9225				var transparentDataEncryptionProperties TransparentDataEncryptionProperties
9226				err = json.Unmarshal(*v, &transparentDataEncryptionProperties)
9227				if err != nil {
9228					return err
9229				}
9230				tde.TransparentDataEncryptionProperties = &transparentDataEncryptionProperties
9231			}
9232		case "id":
9233			if v != nil {
9234				var ID string
9235				err = json.Unmarshal(*v, &ID)
9236				if err != nil {
9237					return err
9238				}
9239				tde.ID = &ID
9240			}
9241		case "name":
9242			if v != nil {
9243				var name string
9244				err = json.Unmarshal(*v, &name)
9245				if err != nil {
9246					return err
9247				}
9248				tde.Name = &name
9249			}
9250		case "type":
9251			if v != nil {
9252				var typeVar string
9253				err = json.Unmarshal(*v, &typeVar)
9254				if err != nil {
9255					return err
9256				}
9257				tde.Type = &typeVar
9258			}
9259		}
9260	}
9261
9262	return nil
9263}
9264
9265// TransparentDataEncryptionActivity represents a database transparent data encryption Scan.
9266type TransparentDataEncryptionActivity struct {
9267	// Location - READ-ONLY; Resource location.
9268	Location *string `json:"location,omitempty"`
9269	// TransparentDataEncryptionActivityProperties - Represents the properties of the resource.
9270	*TransparentDataEncryptionActivityProperties `json:"properties,omitempty"`
9271	// ID - READ-ONLY; Resource ID.
9272	ID *string `json:"id,omitempty"`
9273	// Name - READ-ONLY; Resource name.
9274	Name *string `json:"name,omitempty"`
9275	// Type - READ-ONLY; Resource type.
9276	Type *string `json:"type,omitempty"`
9277}
9278
9279// MarshalJSON is the custom marshaler for TransparentDataEncryptionActivity.
9280func (tdea TransparentDataEncryptionActivity) MarshalJSON() ([]byte, error) {
9281	objectMap := make(map[string]interface{})
9282	if tdea.TransparentDataEncryptionActivityProperties != nil {
9283		objectMap["properties"] = tdea.TransparentDataEncryptionActivityProperties
9284	}
9285	return json.Marshal(objectMap)
9286}
9287
9288// UnmarshalJSON is the custom unmarshaler for TransparentDataEncryptionActivity struct.
9289func (tdea *TransparentDataEncryptionActivity) UnmarshalJSON(body []byte) error {
9290	var m map[string]*json.RawMessage
9291	err := json.Unmarshal(body, &m)
9292	if err != nil {
9293		return err
9294	}
9295	for k, v := range m {
9296		switch k {
9297		case "location":
9298			if v != nil {
9299				var location string
9300				err = json.Unmarshal(*v, &location)
9301				if err != nil {
9302					return err
9303				}
9304				tdea.Location = &location
9305			}
9306		case "properties":
9307			if v != nil {
9308				var transparentDataEncryptionActivityProperties TransparentDataEncryptionActivityProperties
9309				err = json.Unmarshal(*v, &transparentDataEncryptionActivityProperties)
9310				if err != nil {
9311					return err
9312				}
9313				tdea.TransparentDataEncryptionActivityProperties = &transparentDataEncryptionActivityProperties
9314			}
9315		case "id":
9316			if v != nil {
9317				var ID string
9318				err = json.Unmarshal(*v, &ID)
9319				if err != nil {
9320					return err
9321				}
9322				tdea.ID = &ID
9323			}
9324		case "name":
9325			if v != nil {
9326				var name string
9327				err = json.Unmarshal(*v, &name)
9328				if err != nil {
9329					return err
9330				}
9331				tdea.Name = &name
9332			}
9333		case "type":
9334			if v != nil {
9335				var typeVar string
9336				err = json.Unmarshal(*v, &typeVar)
9337				if err != nil {
9338					return err
9339				}
9340				tdea.Type = &typeVar
9341			}
9342		}
9343	}
9344
9345	return nil
9346}
9347
9348// TransparentDataEncryptionActivityListResult represents the response to a list database transparent data
9349// encryption activity request.
9350type TransparentDataEncryptionActivityListResult struct {
9351	autorest.Response `json:"-"`
9352	// Value - The list of database transparent data encryption activities.
9353	Value *[]TransparentDataEncryptionActivity `json:"value,omitempty"`
9354}
9355
9356// TransparentDataEncryptionActivityProperties represents the properties of a database transparent data
9357// encryption Scan.
9358type TransparentDataEncryptionActivityProperties struct {
9359	// Status - READ-ONLY; The status of the database. Possible values include: 'Encrypting', 'Decrypting'
9360	Status TransparentDataEncryptionActivityStatus `json:"status,omitempty"`
9361	// PercentComplete - READ-ONLY; The percent complete of the transparent data encryption scan for a database.
9362	PercentComplete *float64 `json:"percentComplete,omitempty"`
9363}
9364
9365// TransparentDataEncryptionProperties represents the properties of a database transparent data encryption.
9366type TransparentDataEncryptionProperties struct {
9367	// Status - The status of the database transparent data encryption. Possible values include: 'TransparentDataEncryptionStatusEnabled', 'TransparentDataEncryptionStatusDisabled'
9368	Status TransparentDataEncryptionStatus `json:"status,omitempty"`
9369}
9370
9371// VirtualCluster an Azure SQL virtual cluster.
9372type VirtualCluster struct {
9373	autorest.Response `json:"-"`
9374	// VirtualClusterProperties - Resource properties.
9375	*VirtualClusterProperties `json:"properties,omitempty"`
9376	// Location - Resource location.
9377	Location *string `json:"location,omitempty"`
9378	// Tags - Resource tags.
9379	Tags map[string]*string `json:"tags"`
9380	// ID - READ-ONLY; Resource ID.
9381	ID *string `json:"id,omitempty"`
9382	// Name - READ-ONLY; Resource name.
9383	Name *string `json:"name,omitempty"`
9384	// Type - READ-ONLY; Resource type.
9385	Type *string `json:"type,omitempty"`
9386}
9387
9388// MarshalJSON is the custom marshaler for VirtualCluster.
9389func (vc VirtualCluster) MarshalJSON() ([]byte, error) {
9390	objectMap := make(map[string]interface{})
9391	if vc.VirtualClusterProperties != nil {
9392		objectMap["properties"] = vc.VirtualClusterProperties
9393	}
9394	if vc.Location != nil {
9395		objectMap["location"] = vc.Location
9396	}
9397	if vc.Tags != nil {
9398		objectMap["tags"] = vc.Tags
9399	}
9400	return json.Marshal(objectMap)
9401}
9402
9403// UnmarshalJSON is the custom unmarshaler for VirtualCluster struct.
9404func (vc *VirtualCluster) UnmarshalJSON(body []byte) error {
9405	var m map[string]*json.RawMessage
9406	err := json.Unmarshal(body, &m)
9407	if err != nil {
9408		return err
9409	}
9410	for k, v := range m {
9411		switch k {
9412		case "properties":
9413			if v != nil {
9414				var virtualClusterProperties VirtualClusterProperties
9415				err = json.Unmarshal(*v, &virtualClusterProperties)
9416				if err != nil {
9417					return err
9418				}
9419				vc.VirtualClusterProperties = &virtualClusterProperties
9420			}
9421		case "location":
9422			if v != nil {
9423				var location string
9424				err = json.Unmarshal(*v, &location)
9425				if err != nil {
9426					return err
9427				}
9428				vc.Location = &location
9429			}
9430		case "tags":
9431			if v != nil {
9432				var tags map[string]*string
9433				err = json.Unmarshal(*v, &tags)
9434				if err != nil {
9435					return err
9436				}
9437				vc.Tags = tags
9438			}
9439		case "id":
9440			if v != nil {
9441				var ID string
9442				err = json.Unmarshal(*v, &ID)
9443				if err != nil {
9444					return err
9445				}
9446				vc.ID = &ID
9447			}
9448		case "name":
9449			if v != nil {
9450				var name string
9451				err = json.Unmarshal(*v, &name)
9452				if err != nil {
9453					return err
9454				}
9455				vc.Name = &name
9456			}
9457		case "type":
9458			if v != nil {
9459				var typeVar string
9460				err = json.Unmarshal(*v, &typeVar)
9461				if err != nil {
9462					return err
9463				}
9464				vc.Type = &typeVar
9465			}
9466		}
9467	}
9468
9469	return nil
9470}
9471
9472// VirtualClusterListResult a list of virtual clusters.
9473type VirtualClusterListResult struct {
9474	autorest.Response `json:"-"`
9475	// Value - READ-ONLY; Array of results.
9476	Value *[]VirtualCluster `json:"value,omitempty"`
9477	// NextLink - READ-ONLY; Link to retrieve next page of results.
9478	NextLink *string `json:"nextLink,omitempty"`
9479}
9480
9481// VirtualClusterListResultIterator provides access to a complete listing of VirtualCluster values.
9482type VirtualClusterListResultIterator struct {
9483	i    int
9484	page VirtualClusterListResultPage
9485}
9486
9487// NextWithContext advances to the next value.  If there was an error making
9488// the request the iterator does not advance and the error is returned.
9489func (iter *VirtualClusterListResultIterator) NextWithContext(ctx context.Context) (err error) {
9490	if tracing.IsEnabled() {
9491		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualClusterListResultIterator.NextWithContext")
9492		defer func() {
9493			sc := -1
9494			if iter.Response().Response.Response != nil {
9495				sc = iter.Response().Response.Response.StatusCode
9496			}
9497			tracing.EndSpan(ctx, sc, err)
9498		}()
9499	}
9500	iter.i++
9501	if iter.i < len(iter.page.Values()) {
9502		return nil
9503	}
9504	err = iter.page.NextWithContext(ctx)
9505	if err != nil {
9506		iter.i--
9507		return err
9508	}
9509	iter.i = 0
9510	return nil
9511}
9512
9513// Next advances to the next value.  If there was an error making
9514// the request the iterator does not advance and the error is returned.
9515// Deprecated: Use NextWithContext() instead.
9516func (iter *VirtualClusterListResultIterator) Next() error {
9517	return iter.NextWithContext(context.Background())
9518}
9519
9520// NotDone returns true if the enumeration should be started or is not yet complete.
9521func (iter VirtualClusterListResultIterator) NotDone() bool {
9522	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9523}
9524
9525// Response returns the raw server response from the last page request.
9526func (iter VirtualClusterListResultIterator) Response() VirtualClusterListResult {
9527	return iter.page.Response()
9528}
9529
9530// Value returns the current value or a zero-initialized value if the
9531// iterator has advanced beyond the end of the collection.
9532func (iter VirtualClusterListResultIterator) Value() VirtualCluster {
9533	if !iter.page.NotDone() {
9534		return VirtualCluster{}
9535	}
9536	return iter.page.Values()[iter.i]
9537}
9538
9539// Creates a new instance of the VirtualClusterListResultIterator type.
9540func NewVirtualClusterListResultIterator(page VirtualClusterListResultPage) VirtualClusterListResultIterator {
9541	return VirtualClusterListResultIterator{page: page}
9542}
9543
9544// IsEmpty returns true if the ListResult contains no values.
9545func (vclr VirtualClusterListResult) IsEmpty() bool {
9546	return vclr.Value == nil || len(*vclr.Value) == 0
9547}
9548
9549// virtualClusterListResultPreparer prepares a request to retrieve the next set of results.
9550// It returns nil if no more results exist.
9551func (vclr VirtualClusterListResult) virtualClusterListResultPreparer(ctx context.Context) (*http.Request, error) {
9552	if vclr.NextLink == nil || len(to.String(vclr.NextLink)) < 1 {
9553		return nil, nil
9554	}
9555	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9556		autorest.AsJSON(),
9557		autorest.AsGet(),
9558		autorest.WithBaseURL(to.String(vclr.NextLink)))
9559}
9560
9561// VirtualClusterListResultPage contains a page of VirtualCluster values.
9562type VirtualClusterListResultPage struct {
9563	fn   func(context.Context, VirtualClusterListResult) (VirtualClusterListResult, error)
9564	vclr VirtualClusterListResult
9565}
9566
9567// NextWithContext advances to the next page of values.  If there was an error making
9568// the request the page does not advance and the error is returned.
9569func (page *VirtualClusterListResultPage) NextWithContext(ctx context.Context) (err error) {
9570	if tracing.IsEnabled() {
9571		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualClusterListResultPage.NextWithContext")
9572		defer func() {
9573			sc := -1
9574			if page.Response().Response.Response != nil {
9575				sc = page.Response().Response.Response.StatusCode
9576			}
9577			tracing.EndSpan(ctx, sc, err)
9578		}()
9579	}
9580	next, err := page.fn(ctx, page.vclr)
9581	if err != nil {
9582		return err
9583	}
9584	page.vclr = next
9585	return nil
9586}
9587
9588// Next advances to the next page of values.  If there was an error making
9589// the request the page does not advance and the error is returned.
9590// Deprecated: Use NextWithContext() instead.
9591func (page *VirtualClusterListResultPage) Next() error {
9592	return page.NextWithContext(context.Background())
9593}
9594
9595// NotDone returns true if the page enumeration should be started or is not yet complete.
9596func (page VirtualClusterListResultPage) NotDone() bool {
9597	return !page.vclr.IsEmpty()
9598}
9599
9600// Response returns the raw server response from the last page request.
9601func (page VirtualClusterListResultPage) Response() VirtualClusterListResult {
9602	return page.vclr
9603}
9604
9605// Values returns the slice of values for the current page or nil if there are no values.
9606func (page VirtualClusterListResultPage) Values() []VirtualCluster {
9607	if page.vclr.IsEmpty() {
9608		return nil
9609	}
9610	return *page.vclr.Value
9611}
9612
9613// Creates a new instance of the VirtualClusterListResultPage type.
9614func NewVirtualClusterListResultPage(getNextPage func(context.Context, VirtualClusterListResult) (VirtualClusterListResult, error)) VirtualClusterListResultPage {
9615	return VirtualClusterListResultPage{fn: getNextPage}
9616}
9617
9618// VirtualClusterProperties the properties of a virtual cluster.
9619type VirtualClusterProperties struct {
9620	// SubnetID - READ-ONLY; Subnet resource ID for the virtual cluster.
9621	SubnetID *string `json:"subnetId,omitempty"`
9622	// Family - If the service has different generations of hardware, for the same SKU, then that can be captured here.
9623	Family *string `json:"family,omitempty"`
9624	// ChildResources - READ-ONLY; List of resources in this virtual cluster.
9625	ChildResources *[]string `json:"childResources,omitempty"`
9626}
9627
9628// VirtualClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9629// operation.
9630type VirtualClustersDeleteFuture struct {
9631	azure.Future
9632}
9633
9634// Result returns the result of the asynchronous operation.
9635// If the operation has not completed it will return an error.
9636func (future *VirtualClustersDeleteFuture) Result(client VirtualClustersClient) (ar autorest.Response, err error) {
9637	var done bool
9638	done, err = future.DoneWithContext(context.Background(), client)
9639	if err != nil {
9640		err = autorest.NewErrorWithError(err, "sql.VirtualClustersDeleteFuture", "Result", future.Response(), "Polling failure")
9641		return
9642	}
9643	if !done {
9644		err = azure.NewAsyncOpIncompleteError("sql.VirtualClustersDeleteFuture")
9645		return
9646	}
9647	ar.Response = future.Response()
9648	return
9649}
9650
9651// VirtualClustersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
9652// operation.
9653type VirtualClustersUpdateFuture struct {
9654	azure.Future
9655}
9656
9657// Result returns the result of the asynchronous operation.
9658// If the operation has not completed it will return an error.
9659func (future *VirtualClustersUpdateFuture) Result(client VirtualClustersClient) (vc VirtualCluster, err error) {
9660	var done bool
9661	done, err = future.DoneWithContext(context.Background(), client)
9662	if err != nil {
9663		err = autorest.NewErrorWithError(err, "sql.VirtualClustersUpdateFuture", "Result", future.Response(), "Polling failure")
9664		return
9665	}
9666	if !done {
9667		err = azure.NewAsyncOpIncompleteError("sql.VirtualClustersUpdateFuture")
9668		return
9669	}
9670	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9671	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
9672		vc, err = client.UpdateResponder(vc.Response.Response)
9673		if err != nil {
9674			err = autorest.NewErrorWithError(err, "sql.VirtualClustersUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
9675		}
9676	}
9677	return
9678}
9679
9680// VirtualClusterUpdate an update request for an Azure SQL Database virtual cluster.
9681type VirtualClusterUpdate struct {
9682	// VirtualClusterProperties - Resource properties.
9683	*VirtualClusterProperties `json:"properties,omitempty"`
9684	// Tags - Resource tags.
9685	Tags map[string]*string `json:"tags"`
9686}
9687
9688// MarshalJSON is the custom marshaler for VirtualClusterUpdate.
9689func (vcu VirtualClusterUpdate) MarshalJSON() ([]byte, error) {
9690	objectMap := make(map[string]interface{})
9691	if vcu.VirtualClusterProperties != nil {
9692		objectMap["properties"] = vcu.VirtualClusterProperties
9693	}
9694	if vcu.Tags != nil {
9695		objectMap["tags"] = vcu.Tags
9696	}
9697	return json.Marshal(objectMap)
9698}
9699
9700// UnmarshalJSON is the custom unmarshaler for VirtualClusterUpdate struct.
9701func (vcu *VirtualClusterUpdate) UnmarshalJSON(body []byte) error {
9702	var m map[string]*json.RawMessage
9703	err := json.Unmarshal(body, &m)
9704	if err != nil {
9705		return err
9706	}
9707	for k, v := range m {
9708		switch k {
9709		case "properties":
9710			if v != nil {
9711				var virtualClusterProperties VirtualClusterProperties
9712				err = json.Unmarshal(*v, &virtualClusterProperties)
9713				if err != nil {
9714					return err
9715				}
9716				vcu.VirtualClusterProperties = &virtualClusterProperties
9717			}
9718		case "tags":
9719			if v != nil {
9720				var tags map[string]*string
9721				err = json.Unmarshal(*v, &tags)
9722				if err != nil {
9723					return err
9724				}
9725				vcu.Tags = tags
9726			}
9727		}
9728	}
9729
9730	return nil
9731}
9732
9733// VirtualNetworkRule a virtual network rule.
9734type VirtualNetworkRule struct {
9735	autorest.Response `json:"-"`
9736	// VirtualNetworkRuleProperties - Resource properties.
9737	*VirtualNetworkRuleProperties `json:"properties,omitempty"`
9738	// ID - READ-ONLY; Resource ID.
9739	ID *string `json:"id,omitempty"`
9740	// Name - READ-ONLY; Resource name.
9741	Name *string `json:"name,omitempty"`
9742	// Type - READ-ONLY; Resource type.
9743	Type *string `json:"type,omitempty"`
9744}
9745
9746// MarshalJSON is the custom marshaler for VirtualNetworkRule.
9747func (vnr VirtualNetworkRule) MarshalJSON() ([]byte, error) {
9748	objectMap := make(map[string]interface{})
9749	if vnr.VirtualNetworkRuleProperties != nil {
9750		objectMap["properties"] = vnr.VirtualNetworkRuleProperties
9751	}
9752	return json.Marshal(objectMap)
9753}
9754
9755// UnmarshalJSON is the custom unmarshaler for VirtualNetworkRule struct.
9756func (vnr *VirtualNetworkRule) UnmarshalJSON(body []byte) error {
9757	var m map[string]*json.RawMessage
9758	err := json.Unmarshal(body, &m)
9759	if err != nil {
9760		return err
9761	}
9762	for k, v := range m {
9763		switch k {
9764		case "properties":
9765			if v != nil {
9766				var virtualNetworkRuleProperties VirtualNetworkRuleProperties
9767				err = json.Unmarshal(*v, &virtualNetworkRuleProperties)
9768				if err != nil {
9769					return err
9770				}
9771				vnr.VirtualNetworkRuleProperties = &virtualNetworkRuleProperties
9772			}
9773		case "id":
9774			if v != nil {
9775				var ID string
9776				err = json.Unmarshal(*v, &ID)
9777				if err != nil {
9778					return err
9779				}
9780				vnr.ID = &ID
9781			}
9782		case "name":
9783			if v != nil {
9784				var name string
9785				err = json.Unmarshal(*v, &name)
9786				if err != nil {
9787					return err
9788				}
9789				vnr.Name = &name
9790			}
9791		case "type":
9792			if v != nil {
9793				var typeVar string
9794				err = json.Unmarshal(*v, &typeVar)
9795				if err != nil {
9796					return err
9797				}
9798				vnr.Type = &typeVar
9799			}
9800		}
9801	}
9802
9803	return nil
9804}
9805
9806// VirtualNetworkRuleListResult a list of virtual network rules.
9807type VirtualNetworkRuleListResult struct {
9808	autorest.Response `json:"-"`
9809	// Value - READ-ONLY; Array of results.
9810	Value *[]VirtualNetworkRule `json:"value,omitempty"`
9811	// NextLink - READ-ONLY; Link to retrieve next page of results.
9812	NextLink *string `json:"nextLink,omitempty"`
9813}
9814
9815// VirtualNetworkRuleListResultIterator provides access to a complete listing of VirtualNetworkRule values.
9816type VirtualNetworkRuleListResultIterator struct {
9817	i    int
9818	page VirtualNetworkRuleListResultPage
9819}
9820
9821// NextWithContext advances to the next value.  If there was an error making
9822// the request the iterator does not advance and the error is returned.
9823func (iter *VirtualNetworkRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
9824	if tracing.IsEnabled() {
9825		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultIterator.NextWithContext")
9826		defer func() {
9827			sc := -1
9828			if iter.Response().Response.Response != nil {
9829				sc = iter.Response().Response.Response.StatusCode
9830			}
9831			tracing.EndSpan(ctx, sc, err)
9832		}()
9833	}
9834	iter.i++
9835	if iter.i < len(iter.page.Values()) {
9836		return nil
9837	}
9838	err = iter.page.NextWithContext(ctx)
9839	if err != nil {
9840		iter.i--
9841		return err
9842	}
9843	iter.i = 0
9844	return nil
9845}
9846
9847// Next advances to the next value.  If there was an error making
9848// the request the iterator does not advance and the error is returned.
9849// Deprecated: Use NextWithContext() instead.
9850func (iter *VirtualNetworkRuleListResultIterator) Next() error {
9851	return iter.NextWithContext(context.Background())
9852}
9853
9854// NotDone returns true if the enumeration should be started or is not yet complete.
9855func (iter VirtualNetworkRuleListResultIterator) NotDone() bool {
9856	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9857}
9858
9859// Response returns the raw server response from the last page request.
9860func (iter VirtualNetworkRuleListResultIterator) Response() VirtualNetworkRuleListResult {
9861	return iter.page.Response()
9862}
9863
9864// Value returns the current value or a zero-initialized value if the
9865// iterator has advanced beyond the end of the collection.
9866func (iter VirtualNetworkRuleListResultIterator) Value() VirtualNetworkRule {
9867	if !iter.page.NotDone() {
9868		return VirtualNetworkRule{}
9869	}
9870	return iter.page.Values()[iter.i]
9871}
9872
9873// Creates a new instance of the VirtualNetworkRuleListResultIterator type.
9874func NewVirtualNetworkRuleListResultIterator(page VirtualNetworkRuleListResultPage) VirtualNetworkRuleListResultIterator {
9875	return VirtualNetworkRuleListResultIterator{page: page}
9876}
9877
9878// IsEmpty returns true if the ListResult contains no values.
9879func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool {
9880	return vnrlr.Value == nil || len(*vnrlr.Value) == 0
9881}
9882
9883// virtualNetworkRuleListResultPreparer prepares a request to retrieve the next set of results.
9884// It returns nil if no more results exist.
9885func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
9886	if vnrlr.NextLink == nil || len(to.String(vnrlr.NextLink)) < 1 {
9887		return nil, nil
9888	}
9889	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9890		autorest.AsJSON(),
9891		autorest.AsGet(),
9892		autorest.WithBaseURL(to.String(vnrlr.NextLink)))
9893}
9894
9895// VirtualNetworkRuleListResultPage contains a page of VirtualNetworkRule values.
9896type VirtualNetworkRuleListResultPage struct {
9897	fn    func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)
9898	vnrlr VirtualNetworkRuleListResult
9899}
9900
9901// NextWithContext advances to the next page of values.  If there was an error making
9902// the request the page does not advance and the error is returned.
9903func (page *VirtualNetworkRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
9904	if tracing.IsEnabled() {
9905		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultPage.NextWithContext")
9906		defer func() {
9907			sc := -1
9908			if page.Response().Response.Response != nil {
9909				sc = page.Response().Response.Response.StatusCode
9910			}
9911			tracing.EndSpan(ctx, sc, err)
9912		}()
9913	}
9914	next, err := page.fn(ctx, page.vnrlr)
9915	if err != nil {
9916		return err
9917	}
9918	page.vnrlr = next
9919	return nil
9920}
9921
9922// Next advances to the next page of values.  If there was an error making
9923// the request the page does not advance and the error is returned.
9924// Deprecated: Use NextWithContext() instead.
9925func (page *VirtualNetworkRuleListResultPage) Next() error {
9926	return page.NextWithContext(context.Background())
9927}
9928
9929// NotDone returns true if the page enumeration should be started or is not yet complete.
9930func (page VirtualNetworkRuleListResultPage) NotDone() bool {
9931	return !page.vnrlr.IsEmpty()
9932}
9933
9934// Response returns the raw server response from the last page request.
9935func (page VirtualNetworkRuleListResultPage) Response() VirtualNetworkRuleListResult {
9936	return page.vnrlr
9937}
9938
9939// Values returns the slice of values for the current page or nil if there are no values.
9940func (page VirtualNetworkRuleListResultPage) Values() []VirtualNetworkRule {
9941	if page.vnrlr.IsEmpty() {
9942		return nil
9943	}
9944	return *page.vnrlr.Value
9945}
9946
9947// Creates a new instance of the VirtualNetworkRuleListResultPage type.
9948func NewVirtualNetworkRuleListResultPage(getNextPage func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)) VirtualNetworkRuleListResultPage {
9949	return VirtualNetworkRuleListResultPage{fn: getNextPage}
9950}
9951
9952// VirtualNetworkRuleProperties properties of a virtual network rule.
9953type VirtualNetworkRuleProperties struct {
9954	// VirtualNetworkSubnetID - The ARM resource id of the virtual network subnet.
9955	VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"`
9956	// IgnoreMissingVnetServiceEndpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
9957	IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"`
9958	// State - READ-ONLY; Virtual Network Rule State. Possible values include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown'
9959	State VirtualNetworkRuleState `json:"state,omitempty"`
9960}
9961
9962// VirtualNetworkRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9963// long-running operation.
9964type VirtualNetworkRulesCreateOrUpdateFuture struct {
9965	azure.Future
9966}
9967
9968// Result returns the result of the asynchronous operation.
9969// If the operation has not completed it will return an error.
9970func (future *VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetworkRulesClient) (vnr VirtualNetworkRule, err error) {
9971	var done bool
9972	done, err = future.DoneWithContext(context.Background(), client)
9973	if err != nil {
9974		err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9975		return
9976	}
9977	if !done {
9978		err = azure.NewAsyncOpIncompleteError("sql.VirtualNetworkRulesCreateOrUpdateFuture")
9979		return
9980	}
9981	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9982	if vnr.Response.Response, err = future.GetResult(sender); err == nil && vnr.Response.Response.StatusCode != http.StatusNoContent {
9983		vnr, err = client.CreateOrUpdateResponder(vnr.Response.Response)
9984		if err != nil {
9985			err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesCreateOrUpdateFuture", "Result", vnr.Response.Response, "Failure responding to request")
9986		}
9987	}
9988	return
9989}
9990
9991// VirtualNetworkRulesDeleteFuture an abstraction for monitoring and retrieving the results of a
9992// long-running operation.
9993type VirtualNetworkRulesDeleteFuture struct {
9994	azure.Future
9995}
9996
9997// Result returns the result of the asynchronous operation.
9998// If the operation has not completed it will return an error.
9999func (future *VirtualNetworkRulesDeleteFuture) Result(client VirtualNetworkRulesClient) (ar autorest.Response, err error) {
10000	var done bool
10001	done, err = future.DoneWithContext(context.Background(), client)
10002	if err != nil {
10003		err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesDeleteFuture", "Result", future.Response(), "Polling failure")
10004		return
10005	}
10006	if !done {
10007		err = azure.NewAsyncOpIncompleteError("sql.VirtualNetworkRulesDeleteFuture")
10008		return
10009	}
10010	ar.Response = future.Response()
10011	return
10012}
10013