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	"encoding/json"
22	"github.com/Azure/go-autorest/autorest"
23	"github.com/Azure/go-autorest/autorest/azure"
24	"github.com/Azure/go-autorest/autorest/date"
25	"github.com/gofrs/uuid"
26)
27
28// The package's fully qualified name.
29const fqdn = "github.com/Azure/azure-sdk-for-go/services/sql/mgmt/2014-04-01/sql"
30
31// Advisor database Advisor.
32type Advisor struct {
33	autorest.Response `json:"-"`
34	// Kind - READ-ONLY; Resource kind.
35	Kind *string `json:"kind,omitempty"`
36	// Location - READ-ONLY; Resource location.
37	Location *string `json:"location,omitempty"`
38	// AdvisorProperties - Resource properties.
39	*AdvisorProperties `json:"properties,omitempty"`
40	// ID - READ-ONLY; Resource ID.
41	ID *string `json:"id,omitempty"`
42	// Name - READ-ONLY; Resource name.
43	Name *string `json:"name,omitempty"`
44	// Type - READ-ONLY; Resource type.
45	Type *string `json:"type,omitempty"`
46}
47
48// MarshalJSON is the custom marshaler for Advisor.
49func (a Advisor) MarshalJSON() ([]byte, error) {
50	objectMap := make(map[string]interface{})
51	if a.AdvisorProperties != nil {
52		objectMap["properties"] = a.AdvisorProperties
53	}
54	return json.Marshal(objectMap)
55}
56
57// UnmarshalJSON is the custom unmarshaler for Advisor struct.
58func (a *Advisor) UnmarshalJSON(body []byte) error {
59	var m map[string]*json.RawMessage
60	err := json.Unmarshal(body, &m)
61	if err != nil {
62		return err
63	}
64	for k, v := range m {
65		switch k {
66		case "kind":
67			if v != nil {
68				var kind string
69				err = json.Unmarshal(*v, &kind)
70				if err != nil {
71					return err
72				}
73				a.Kind = &kind
74			}
75		case "location":
76			if v != nil {
77				var location string
78				err = json.Unmarshal(*v, &location)
79				if err != nil {
80					return err
81				}
82				a.Location = &location
83			}
84		case "properties":
85			if v != nil {
86				var advisorProperties AdvisorProperties
87				err = json.Unmarshal(*v, &advisorProperties)
88				if err != nil {
89					return err
90				}
91				a.AdvisorProperties = &advisorProperties
92			}
93		case "id":
94			if v != nil {
95				var ID string
96				err = json.Unmarshal(*v, &ID)
97				if err != nil {
98					return err
99				}
100				a.ID = &ID
101			}
102		case "name":
103			if v != nil {
104				var name string
105				err = json.Unmarshal(*v, &name)
106				if err != nil {
107					return err
108				}
109				a.Name = &name
110			}
111		case "type":
112			if v != nil {
113				var typeVar string
114				err = json.Unmarshal(*v, &typeVar)
115				if err != nil {
116					return err
117				}
118				a.Type = &typeVar
119			}
120		}
121	}
122
123	return nil
124}
125
126// AdvisorListResult represents the response to a list advisors request.
127type AdvisorListResult struct {
128	autorest.Response `json:"-"`
129	// Value - The list of advisors.
130	Value *[]Advisor `json:"value,omitempty"`
131}
132
133// AdvisorProperties properties for a Database, Server or Elastic Pool Advisor.
134type AdvisorProperties struct {
135	// AdvisorStatus - READ-ONLY; Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', 'LimitedPublicPreview' and 'PrivatePreview'. Possible values include: 'GA', 'PublicPreview', 'LimitedPublicPreview', 'PrivatePreview'
136	AdvisorStatus AdvisorStatus `json:"advisorStatus,omitempty"`
137	// AutoExecuteValue - Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'. Possible values include: 'Enabled', 'Disabled', 'Default'
138	AutoExecuteValue AutoExecuteStatus `json:"autoExecuteValue,omitempty"`
139	// RecommendationsStatus - READ-ONLY; Gets that status of recommendations for this advisor and reason for not having any recommendations. Possible values include, but are not limited to, 'Ok' (Recommendations available), LowActivity (not enough workload to analyze), 'DbSeemsTuned' (Database is doing well), etc.
140	RecommendationsStatus *string `json:"recommendationsStatus,omitempty"`
141	// LastChecked - READ-ONLY; Gets the time when the current resource was analyzed for recommendations by this advisor.
142	LastChecked *date.Time `json:"lastChecked,omitempty"`
143}
144
145// MarshalJSON is the custom marshaler for AdvisorProperties.
146func (ap AdvisorProperties) MarshalJSON() ([]byte, error) {
147	objectMap := make(map[string]interface{})
148	if ap.AutoExecuteValue != "" {
149		objectMap["autoExecuteValue"] = ap.AutoExecuteValue
150	}
151	return json.Marshal(objectMap)
152}
153
154// CheckNameAvailabilityRequest a request to check whether the specified name for a resource is available.
155type CheckNameAvailabilityRequest struct {
156	// Name - The name whose availability is to be checked.
157	Name *string `json:"name,omitempty"`
158	// Type - The type of resource that is used as the scope of the availability check.
159	Type *string `json:"type,omitempty"`
160}
161
162// CheckNameAvailabilityResponse a response indicating whether the specified name for a resource is
163// available.
164type CheckNameAvailabilityResponse struct {
165	autorest.Response `json:"-"`
166	// Available - READ-ONLY; True if the name is available, otherwise false.
167	Available *bool `json:"available,omitempty"`
168	// Message - READ-ONLY; A message explaining why the name is unavailable. Will be null if the name is available.
169	Message *string `json:"message,omitempty"`
170	// Name - READ-ONLY; The name whose availability was checked.
171	Name *string `json:"name,omitempty"`
172	// 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'
173	Reason CheckNameAvailabilityReason `json:"reason,omitempty"`
174}
175
176// Database represents a database.
177type Database struct {
178	autorest.Response `json:"-"`
179	// Kind - READ-ONLY; Kind of database.  This is metadata used for the Azure portal experience.
180	Kind *string `json:"kind,omitempty"`
181	// DatabaseProperties - The properties representing the resource.
182	*DatabaseProperties `json:"properties,omitempty"`
183	// Location - Resource location.
184	Location *string `json:"location,omitempty"`
185	// Tags - Resource tags.
186	Tags map[string]*string `json:"tags"`
187	// ID - READ-ONLY; Resource ID.
188	ID *string `json:"id,omitempty"`
189	// Name - READ-ONLY; Resource name.
190	Name *string `json:"name,omitempty"`
191	// Type - READ-ONLY; Resource type.
192	Type *string `json:"type,omitempty"`
193}
194
195// MarshalJSON is the custom marshaler for Database.
196func (d Database) MarshalJSON() ([]byte, error) {
197	objectMap := make(map[string]interface{})
198	if d.DatabaseProperties != nil {
199		objectMap["properties"] = d.DatabaseProperties
200	}
201	if d.Location != nil {
202		objectMap["location"] = d.Location
203	}
204	if d.Tags != nil {
205		objectMap["tags"] = d.Tags
206	}
207	return json.Marshal(objectMap)
208}
209
210// UnmarshalJSON is the custom unmarshaler for Database struct.
211func (d *Database) UnmarshalJSON(body []byte) error {
212	var m map[string]*json.RawMessage
213	err := json.Unmarshal(body, &m)
214	if err != nil {
215		return err
216	}
217	for k, v := range m {
218		switch k {
219		case "kind":
220			if v != nil {
221				var kind string
222				err = json.Unmarshal(*v, &kind)
223				if err != nil {
224					return err
225				}
226				d.Kind = &kind
227			}
228		case "properties":
229			if v != nil {
230				var databaseProperties DatabaseProperties
231				err = json.Unmarshal(*v, &databaseProperties)
232				if err != nil {
233					return err
234				}
235				d.DatabaseProperties = &databaseProperties
236			}
237		case "location":
238			if v != nil {
239				var location string
240				err = json.Unmarshal(*v, &location)
241				if err != nil {
242					return err
243				}
244				d.Location = &location
245			}
246		case "tags":
247			if v != nil {
248				var tags map[string]*string
249				err = json.Unmarshal(*v, &tags)
250				if err != nil {
251					return err
252				}
253				d.Tags = tags
254			}
255		case "id":
256			if v != nil {
257				var ID string
258				err = json.Unmarshal(*v, &ID)
259				if err != nil {
260					return err
261				}
262				d.ID = &ID
263			}
264		case "name":
265			if v != nil {
266				var name string
267				err = json.Unmarshal(*v, &name)
268				if err != nil {
269					return err
270				}
271				d.Name = &name
272			}
273		case "type":
274			if v != nil {
275				var typeVar string
276				err = json.Unmarshal(*v, &typeVar)
277				if err != nil {
278					return err
279				}
280				d.Type = &typeVar
281			}
282		}
283	}
284
285	return nil
286}
287
288// DatabaseConnectionPolicy a database connection policy.
289type DatabaseConnectionPolicy struct {
290	autorest.Response `json:"-"`
291	// Kind - READ-ONLY; Resource kind.
292	Kind *string `json:"kind,omitempty"`
293	// Location - READ-ONLY; Resource location.
294	Location *string `json:"location,omitempty"`
295	// DatabaseConnectionPolicyProperties - Resource properties.
296	*DatabaseConnectionPolicyProperties `json:"properties,omitempty"`
297	// ID - READ-ONLY; Resource ID.
298	ID *string `json:"id,omitempty"`
299	// Name - READ-ONLY; Resource name.
300	Name *string `json:"name,omitempty"`
301	// Type - READ-ONLY; Resource type.
302	Type *string `json:"type,omitempty"`
303}
304
305// MarshalJSON is the custom marshaler for DatabaseConnectionPolicy.
306func (dcp DatabaseConnectionPolicy) MarshalJSON() ([]byte, error) {
307	objectMap := make(map[string]interface{})
308	if dcp.DatabaseConnectionPolicyProperties != nil {
309		objectMap["properties"] = dcp.DatabaseConnectionPolicyProperties
310	}
311	return json.Marshal(objectMap)
312}
313
314// UnmarshalJSON is the custom unmarshaler for DatabaseConnectionPolicy struct.
315func (dcp *DatabaseConnectionPolicy) UnmarshalJSON(body []byte) error {
316	var m map[string]*json.RawMessage
317	err := json.Unmarshal(body, &m)
318	if err != nil {
319		return err
320	}
321	for k, v := range m {
322		switch k {
323		case "kind":
324			if v != nil {
325				var kind string
326				err = json.Unmarshal(*v, &kind)
327				if err != nil {
328					return err
329				}
330				dcp.Kind = &kind
331			}
332		case "location":
333			if v != nil {
334				var location string
335				err = json.Unmarshal(*v, &location)
336				if err != nil {
337					return err
338				}
339				dcp.Location = &location
340			}
341		case "properties":
342			if v != nil {
343				var databaseConnectionPolicyProperties DatabaseConnectionPolicyProperties
344				err = json.Unmarshal(*v, &databaseConnectionPolicyProperties)
345				if err != nil {
346					return err
347				}
348				dcp.DatabaseConnectionPolicyProperties = &databaseConnectionPolicyProperties
349			}
350		case "id":
351			if v != nil {
352				var ID string
353				err = json.Unmarshal(*v, &ID)
354				if err != nil {
355					return err
356				}
357				dcp.ID = &ID
358			}
359		case "name":
360			if v != nil {
361				var name string
362				err = json.Unmarshal(*v, &name)
363				if err != nil {
364					return err
365				}
366				dcp.Name = &name
367			}
368		case "type":
369			if v != nil {
370				var typeVar string
371				err = json.Unmarshal(*v, &typeVar)
372				if err != nil {
373					return err
374				}
375				dcp.Type = &typeVar
376			}
377		}
378	}
379
380	return nil
381}
382
383// DatabaseConnectionPolicyProperties properties of a database connection policy.
384type DatabaseConnectionPolicyProperties struct {
385	// SecurityEnabledAccess - The state of security access.
386	SecurityEnabledAccess *string `json:"securityEnabledAccess,omitempty"`
387	// ProxyDNSName - The fully qualified host name of the auditing proxy.
388	ProxyDNSName *string `json:"proxyDnsName,omitempty"`
389	// ProxyPort - The port number of the auditing proxy.
390	ProxyPort *string `json:"proxyPort,omitempty"`
391	// Visibility - The visibility of the auditing proxy.
392	Visibility *string `json:"visibility,omitempty"`
393	// UseServerDefault - Whether server default is enabled or disabled.
394	UseServerDefault *string `json:"useServerDefault,omitempty"`
395	// RedirectionState - The state of proxy redirection.
396	RedirectionState *string `json:"redirectionState,omitempty"`
397	// State - The connection policy state.
398	State *string `json:"state,omitempty"`
399}
400
401// DatabaseListResult represents the response to a list database request.
402type DatabaseListResult struct {
403	autorest.Response `json:"-"`
404	// Value - The list of databases housed in the server.
405	Value *[]Database `json:"value,omitempty"`
406}
407
408// DatabaseProperties represents the properties of a database.
409type DatabaseProperties struct {
410	// Collation - The collation of the database. If createMode is not Default, this value is ignored.
411	Collation *string `json:"collation,omitempty"`
412	// CreationDate - READ-ONLY; The creation date of the database (ISO8601 format).
413	CreationDate *date.Time `json:"creationDate,omitempty"`
414	// ContainmentState - READ-ONLY; The containment state of the database.
415	ContainmentState *int64 `json:"containmentState,omitempty"`
416	// 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.
417	CurrentServiceObjectiveID *uuid.UUID `json:"currentServiceObjectiveId,omitempty"`
418	// DatabaseID - READ-ONLY; The ID of the database.
419	DatabaseID *uuid.UUID `json:"databaseId,omitempty"`
420	// EarliestRestoreDate - READ-ONLY; This records the earliest start date and time that restore is available for this database (ISO8601 format).
421	EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"`
422	// CreateMode - Specifies the mode of database creation.
423	// Default: regular database creation.
424	// Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.
425	// 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.
426	// 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.
427	// Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.
428	// 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.
429	// RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.
430	// Copy, NonReadableSecondary, OnlineSecondary and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. Possible values include: 'CreateModeCopy', 'CreateModeDefault', 'CreateModeNonReadableSecondary', 'CreateModeOnlineSecondary', 'CreateModePointInTimeRestore', 'CreateModeRecovery', 'CreateModeRestore', 'CreateModeRestoreLongTermRetentionBackup'
431	CreateMode CreateMode `json:"createMode,omitempty"`
432	// 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.
433	SourceDatabaseID *string `json:"sourceDatabaseId,omitempty"`
434	// 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.
435	SourceDatabaseDeletionDate *date.Time `json:"sourceDatabaseDeletionDate,omitempty"`
436	// 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.
437	RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"`
438	// RecoveryServicesRecoveryPointResourceID - Conditional. If createMode is RestoreLongTermRetentionBackup, then this value is required. Specifies the resource ID of the recovery point to restore from.
439	RecoveryServicesRecoveryPointResourceID *string `json:"recoveryServicesRecoveryPointResourceId,omitempty"`
440	// Edition - The edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored.
441	//
442	// 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:
443	//
444	// ```azurecli
445	// az sql db list-editions -l <location> -o table
446	// ````
447	//
448	// ```powershell
449	// Get-AzSqlServerServiceObjective -Location <location>
450	// ````
451	// . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'
452	Edition DatabaseEdition `json:"edition,omitempty"`
453	// 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."
454	MaxSizeBytes *string `json:"maxSizeBytes,omitempty"`
455	// 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.
456	//
457	// 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.
458	RequestedServiceObjectiveID *uuid.UUID `json:"requestedServiceObjectiveId,omitempty"`
459	// 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.
460	//
461	// 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:
462	//
463	// ```azurecli
464	// az sql db list-editions -l <location> -o table
465	// ````
466	//
467	// ```powershell
468	// Get-AzSqlServerServiceObjective -Location <location>
469	// ````
470	// . 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'
471	RequestedServiceObjectiveName ServiceObjectiveName `json:"requestedServiceObjectiveName,omitempty"`
472	// 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'
473	ServiceLevelObjective ServiceObjectiveName `json:"serviceLevelObjective,omitempty"`
474	// Status - READ-ONLY; The status of the database.
475	Status *string `json:"status,omitempty"`
476	// 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.
477	ElasticPoolName *string `json:"elasticPoolName,omitempty"`
478	// DefaultSecondaryLocation - READ-ONLY; The default secondary region for this database.
479	DefaultSecondaryLocation *string `json:"defaultSecondaryLocation,omitempty"`
480	// ServiceTierAdvisors - READ-ONLY; The list of service tier advisors for this database. Expanded property
481	ServiceTierAdvisors *[]ServiceTierAdvisor `json:"serviceTierAdvisors,omitempty"`
482	// TransparentDataEncryption - READ-ONLY; The transparent data encryption info for this database.
483	TransparentDataEncryption *[]TransparentDataEncryption `json:"transparentDataEncryption,omitempty"`
484	// RecommendedIndex - READ-ONLY; The recommended indices for this database.
485	RecommendedIndex *[]RecommendedIndex `json:"recommendedIndex,omitempty"`
486	// FailoverGroupID - READ-ONLY; The resource identifier of the failover group containing this database.
487	FailoverGroupID *string `json:"failoverGroupId,omitempty"`
488	// 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'
489	ReadScale ReadScale `json:"readScale,omitempty"`
490	// 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'
491	SampleName SampleName `json:"sampleName,omitempty"`
492	// ZoneRedundant - Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
493	ZoneRedundant *bool `json:"zoneRedundant,omitempty"`
494}
495
496// MarshalJSON is the custom marshaler for DatabaseProperties.
497func (dp DatabaseProperties) MarshalJSON() ([]byte, error) {
498	objectMap := make(map[string]interface{})
499	if dp.Collation != nil {
500		objectMap["collation"] = dp.Collation
501	}
502	if dp.CreateMode != "" {
503		objectMap["createMode"] = dp.CreateMode
504	}
505	if dp.SourceDatabaseID != nil {
506		objectMap["sourceDatabaseId"] = dp.SourceDatabaseID
507	}
508	if dp.SourceDatabaseDeletionDate != nil {
509		objectMap["sourceDatabaseDeletionDate"] = dp.SourceDatabaseDeletionDate
510	}
511	if dp.RestorePointInTime != nil {
512		objectMap["restorePointInTime"] = dp.RestorePointInTime
513	}
514	if dp.RecoveryServicesRecoveryPointResourceID != nil {
515		objectMap["recoveryServicesRecoveryPointResourceId"] = dp.RecoveryServicesRecoveryPointResourceID
516	}
517	if dp.Edition != "" {
518		objectMap["edition"] = dp.Edition
519	}
520	if dp.MaxSizeBytes != nil {
521		objectMap["maxSizeBytes"] = dp.MaxSizeBytes
522	}
523	if dp.RequestedServiceObjectiveID != nil {
524		objectMap["requestedServiceObjectiveId"] = dp.RequestedServiceObjectiveID
525	}
526	if dp.RequestedServiceObjectiveName != "" {
527		objectMap["requestedServiceObjectiveName"] = dp.RequestedServiceObjectiveName
528	}
529	if dp.ElasticPoolName != nil {
530		objectMap["elasticPoolName"] = dp.ElasticPoolName
531	}
532	if dp.ReadScale != "" {
533		objectMap["readScale"] = dp.ReadScale
534	}
535	if dp.SampleName != "" {
536		objectMap["sampleName"] = dp.SampleName
537	}
538	if dp.ZoneRedundant != nil {
539		objectMap["zoneRedundant"] = dp.ZoneRedundant
540	}
541	return json.Marshal(objectMap)
542}
543
544// DatabasesCreateImportOperationFuture an abstraction for monitoring and retrieving the results of a
545// long-running operation.
546type DatabasesCreateImportOperationFuture struct {
547	azure.FutureAPI
548	// Result returns the result of the asynchronous operation.
549	// If the operation has not completed it will return an error.
550	Result func(DatabasesClient) (ImportExportResponse, error)
551}
552
553// DatabasesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
554// operation.
555type DatabasesCreateOrUpdateFuture struct {
556	azure.FutureAPI
557	// Result returns the result of the asynchronous operation.
558	// If the operation has not completed it will return an error.
559	Result func(DatabasesClient) (Database, error)
560}
561
562// DatabaseSecurityAlertPolicy contains information about a database Threat Detection policy.
563type DatabaseSecurityAlertPolicy struct {
564	autorest.Response `json:"-"`
565	// Location - The geo-location where the resource lives
566	Location *string `json:"location,omitempty"`
567	// Kind - READ-ONLY; Resource kind.
568	Kind *string `json:"kind,omitempty"`
569	// DatabaseSecurityAlertPolicyProperties - Properties of the security alert policy.
570	*DatabaseSecurityAlertPolicyProperties `json:"properties,omitempty"`
571	// ID - READ-ONLY; Resource ID.
572	ID *string `json:"id,omitempty"`
573	// Name - READ-ONLY; Resource name.
574	Name *string `json:"name,omitempty"`
575	// Type - READ-ONLY; Resource type.
576	Type *string `json:"type,omitempty"`
577}
578
579// MarshalJSON is the custom marshaler for DatabaseSecurityAlertPolicy.
580func (dsap DatabaseSecurityAlertPolicy) MarshalJSON() ([]byte, error) {
581	objectMap := make(map[string]interface{})
582	if dsap.Location != nil {
583		objectMap["location"] = dsap.Location
584	}
585	if dsap.DatabaseSecurityAlertPolicyProperties != nil {
586		objectMap["properties"] = dsap.DatabaseSecurityAlertPolicyProperties
587	}
588	return json.Marshal(objectMap)
589}
590
591// UnmarshalJSON is the custom unmarshaler for DatabaseSecurityAlertPolicy struct.
592func (dsap *DatabaseSecurityAlertPolicy) UnmarshalJSON(body []byte) error {
593	var m map[string]*json.RawMessage
594	err := json.Unmarshal(body, &m)
595	if err != nil {
596		return err
597	}
598	for k, v := range m {
599		switch k {
600		case "location":
601			if v != nil {
602				var location string
603				err = json.Unmarshal(*v, &location)
604				if err != nil {
605					return err
606				}
607				dsap.Location = &location
608			}
609		case "kind":
610			if v != nil {
611				var kind string
612				err = json.Unmarshal(*v, &kind)
613				if err != nil {
614					return err
615				}
616				dsap.Kind = &kind
617			}
618		case "properties":
619			if v != nil {
620				var databaseSecurityAlertPolicyProperties DatabaseSecurityAlertPolicyProperties
621				err = json.Unmarshal(*v, &databaseSecurityAlertPolicyProperties)
622				if err != nil {
623					return err
624				}
625				dsap.DatabaseSecurityAlertPolicyProperties = &databaseSecurityAlertPolicyProperties
626			}
627		case "id":
628			if v != nil {
629				var ID string
630				err = json.Unmarshal(*v, &ID)
631				if err != nil {
632					return err
633				}
634				dsap.ID = &ID
635			}
636		case "name":
637			if v != nil {
638				var name string
639				err = json.Unmarshal(*v, &name)
640				if err != nil {
641					return err
642				}
643				dsap.Name = &name
644			}
645		case "type":
646			if v != nil {
647				var typeVar string
648				err = json.Unmarshal(*v, &typeVar)
649				if err != nil {
650					return err
651				}
652				dsap.Type = &typeVar
653			}
654		}
655	}
656
657	return nil
658}
659
660// DatabaseSecurityAlertPolicyProperties properties for a database Threat Detection policy.
661type DatabaseSecurityAlertPolicyProperties struct {
662	// State - Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required. Possible values include: 'SecurityAlertPolicyStateNew', 'SecurityAlertPolicyStateEnabled', 'SecurityAlertPolicyStateDisabled'
663	State SecurityAlertPolicyState `json:"state,omitempty"`
664	// 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.
665	DisabledAlerts *string `json:"disabledAlerts,omitempty"`
666	// EmailAddresses - Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.
667	EmailAddresses *string `json:"emailAddresses,omitempty"`
668	// EmailAccountAdmins - Specifies that the alert is sent to the account administrators. Possible values include: 'SecurityAlertPolicyEmailAccountAdminsEnabled', 'SecurityAlertPolicyEmailAccountAdminsDisabled'
669	EmailAccountAdmins SecurityAlertPolicyEmailAccountAdmins `json:"emailAccountAdmins,omitempty"`
670	// 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.
671	StorageEndpoint *string `json:"storageEndpoint,omitempty"`
672	// StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required.
673	StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`
674	// RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs.
675	RetentionDays *int32 `json:"retentionDays,omitempty"`
676	// UseServerDefault - Specifies whether to use the default server policy. Possible values include: 'SecurityAlertPolicyUseServerDefaultEnabled', 'SecurityAlertPolicyUseServerDefaultDisabled'
677	UseServerDefault SecurityAlertPolicyUseServerDefault `json:"useServerDefault,omitempty"`
678}
679
680// DatabasesExportFuture an abstraction for monitoring and retrieving the results of a long-running
681// operation.
682type DatabasesExportFuture struct {
683	azure.FutureAPI
684	// Result returns the result of the asynchronous operation.
685	// If the operation has not completed it will return an error.
686	Result func(DatabasesClient) (ImportExportResponse, error)
687}
688
689// DatabasesImportFuture an abstraction for monitoring and retrieving the results of a long-running
690// operation.
691type DatabasesImportFuture struct {
692	azure.FutureAPI
693	// Result returns the result of the asynchronous operation.
694	// If the operation has not completed it will return an error.
695	Result func(DatabasesClient) (ImportExportResponse, error)
696}
697
698// DatabasesPauseFuture an abstraction for monitoring and retrieving the results of a long-running
699// operation.
700type DatabasesPauseFuture struct {
701	azure.FutureAPI
702	// Result returns the result of the asynchronous operation.
703	// If the operation has not completed it will return an error.
704	Result func(DatabasesClient) (autorest.Response, error)
705}
706
707// DatabasesResumeFuture an abstraction for monitoring and retrieving the results of a long-running
708// operation.
709type DatabasesResumeFuture struct {
710	azure.FutureAPI
711	// Result returns the result of the asynchronous operation.
712	// If the operation has not completed it will return an error.
713	Result func(DatabasesClient) (autorest.Response, error)
714}
715
716// DatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
717// operation.
718type DatabasesUpdateFuture struct {
719	azure.FutureAPI
720	// Result returns the result of the asynchronous operation.
721	// If the operation has not completed it will return an error.
722	Result func(DatabasesClient) (Database, error)
723}
724
725// DatabaseTableAuditingPolicy a database table auditing policy.
726type DatabaseTableAuditingPolicy struct {
727	autorest.Response `json:"-"`
728	// Kind - READ-ONLY; Resource kind.
729	Kind *string `json:"kind,omitempty"`
730	// Location - READ-ONLY; Resource location.
731	Location *string `json:"location,omitempty"`
732	// DatabaseTableAuditingPolicyProperties - Resource properties.
733	*DatabaseTableAuditingPolicyProperties `json:"properties,omitempty"`
734	// ID - READ-ONLY; Resource ID.
735	ID *string `json:"id,omitempty"`
736	// Name - READ-ONLY; Resource name.
737	Name *string `json:"name,omitempty"`
738	// Type - READ-ONLY; Resource type.
739	Type *string `json:"type,omitempty"`
740}
741
742// MarshalJSON is the custom marshaler for DatabaseTableAuditingPolicy.
743func (dtap DatabaseTableAuditingPolicy) MarshalJSON() ([]byte, error) {
744	objectMap := make(map[string]interface{})
745	if dtap.DatabaseTableAuditingPolicyProperties != nil {
746		objectMap["properties"] = dtap.DatabaseTableAuditingPolicyProperties
747	}
748	return json.Marshal(objectMap)
749}
750
751// UnmarshalJSON is the custom unmarshaler for DatabaseTableAuditingPolicy struct.
752func (dtap *DatabaseTableAuditingPolicy) UnmarshalJSON(body []byte) error {
753	var m map[string]*json.RawMessage
754	err := json.Unmarshal(body, &m)
755	if err != nil {
756		return err
757	}
758	for k, v := range m {
759		switch k {
760		case "kind":
761			if v != nil {
762				var kind string
763				err = json.Unmarshal(*v, &kind)
764				if err != nil {
765					return err
766				}
767				dtap.Kind = &kind
768			}
769		case "location":
770			if v != nil {
771				var location string
772				err = json.Unmarshal(*v, &location)
773				if err != nil {
774					return err
775				}
776				dtap.Location = &location
777			}
778		case "properties":
779			if v != nil {
780				var databaseTableAuditingPolicyProperties DatabaseTableAuditingPolicyProperties
781				err = json.Unmarshal(*v, &databaseTableAuditingPolicyProperties)
782				if err != nil {
783					return err
784				}
785				dtap.DatabaseTableAuditingPolicyProperties = &databaseTableAuditingPolicyProperties
786			}
787		case "id":
788			if v != nil {
789				var ID string
790				err = json.Unmarshal(*v, &ID)
791				if err != nil {
792					return err
793				}
794				dtap.ID = &ID
795			}
796		case "name":
797			if v != nil {
798				var name string
799				err = json.Unmarshal(*v, &name)
800				if err != nil {
801					return err
802				}
803				dtap.Name = &name
804			}
805		case "type":
806			if v != nil {
807				var typeVar string
808				err = json.Unmarshal(*v, &typeVar)
809				if err != nil {
810					return err
811				}
812				dtap.Type = &typeVar
813			}
814		}
815	}
816
817	return nil
818}
819
820// DatabaseTableAuditingPolicyListResult represents the response to a list database table auditing policies
821// request.
822type DatabaseTableAuditingPolicyListResult struct {
823	autorest.Response `json:"-"`
824	// Value - The list of database table auditing policies.
825	Value *[]DatabaseTableAuditingPolicy `json:"value,omitempty"`
826}
827
828// DatabaseTableAuditingPolicyProperties properties of a database table auditing policy.
829type DatabaseTableAuditingPolicyProperties struct {
830	// UseServerDefault - Whether server default is enabled or disabled.
831	UseServerDefault *string `json:"useServerDefault,omitempty"`
832	// AuditingState - The state of the policy.
833	AuditingState *string `json:"auditingState,omitempty"`
834	// AuditLogsTableName - The audit logs table name.
835	AuditLogsTableName *string `json:"auditLogsTableName,omitempty"`
836	// EventTypesToAudit - Comma-separated list of event types to audit.
837	EventTypesToAudit *string `json:"eventTypesToAudit,omitempty"`
838	// FullAuditLogsTableName - The full audit logs table name.
839	FullAuditLogsTableName *string `json:"fullAuditLogsTableName,omitempty"`
840	// RetentionDays - The number of days to keep in the audit logs.
841	RetentionDays *string `json:"retentionDays,omitempty"`
842	// StorageAccountKey - The key of the auditing storage account.
843	StorageAccountKey *string `json:"storageAccountKey,omitempty"`
844	// StorageAccountName - The table storage account name
845	StorageAccountName *string `json:"storageAccountName,omitempty"`
846	// StorageAccountResourceGroupName - The table storage account resource group name
847	StorageAccountResourceGroupName *string `json:"storageAccountResourceGroupName,omitempty"`
848	// StorageAccountSecondaryKey - The secondary key of the auditing storage account.
849	StorageAccountSecondaryKey *string `json:"storageAccountSecondaryKey,omitempty"`
850	// StorageAccountSubscriptionID - The table storage subscription Id.
851	StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"`
852	// StorageTableEndpoint - The storage table endpoint.
853	StorageTableEndpoint *string `json:"storageTableEndpoint,omitempty"`
854}
855
856// DatabaseUpdate represents a database update.
857type DatabaseUpdate struct {
858	// Tags - Resource tags.
859	Tags map[string]*string `json:"tags"`
860	// DatabaseProperties - The properties representing the resource.
861	*DatabaseProperties `json:"properties,omitempty"`
862	// ID - READ-ONLY; Resource ID.
863	ID *string `json:"id,omitempty"`
864	// Name - READ-ONLY; Resource name.
865	Name *string `json:"name,omitempty"`
866	// Type - READ-ONLY; Resource type.
867	Type *string `json:"type,omitempty"`
868}
869
870// MarshalJSON is the custom marshaler for DatabaseUpdate.
871func (du DatabaseUpdate) MarshalJSON() ([]byte, error) {
872	objectMap := make(map[string]interface{})
873	if du.Tags != nil {
874		objectMap["tags"] = du.Tags
875	}
876	if du.DatabaseProperties != nil {
877		objectMap["properties"] = du.DatabaseProperties
878	}
879	return json.Marshal(objectMap)
880}
881
882// UnmarshalJSON is the custom unmarshaler for DatabaseUpdate struct.
883func (du *DatabaseUpdate) UnmarshalJSON(body []byte) error {
884	var m map[string]*json.RawMessage
885	err := json.Unmarshal(body, &m)
886	if err != nil {
887		return err
888	}
889	for k, v := range m {
890		switch k {
891		case "tags":
892			if v != nil {
893				var tags map[string]*string
894				err = json.Unmarshal(*v, &tags)
895				if err != nil {
896					return err
897				}
898				du.Tags = tags
899			}
900		case "properties":
901			if v != nil {
902				var databaseProperties DatabaseProperties
903				err = json.Unmarshal(*v, &databaseProperties)
904				if err != nil {
905					return err
906				}
907				du.DatabaseProperties = &databaseProperties
908			}
909		case "id":
910			if v != nil {
911				var ID string
912				err = json.Unmarshal(*v, &ID)
913				if err != nil {
914					return err
915				}
916				du.ID = &ID
917			}
918		case "name":
919			if v != nil {
920				var name string
921				err = json.Unmarshal(*v, &name)
922				if err != nil {
923					return err
924				}
925				du.Name = &name
926			}
927		case "type":
928			if v != nil {
929				var typeVar string
930				err = json.Unmarshal(*v, &typeVar)
931				if err != nil {
932					return err
933				}
934				du.Type = &typeVar
935			}
936		}
937	}
938
939	return nil
940}
941
942// DatabaseUsage the database usages.
943type DatabaseUsage struct {
944	// Name - READ-ONLY; The name of the usage metric.
945	Name *string `json:"name,omitempty"`
946	// ResourceName - READ-ONLY; The name of the resource.
947	ResourceName *string `json:"resourceName,omitempty"`
948	// DisplayName - READ-ONLY; The usage metric display name.
949	DisplayName *string `json:"displayName,omitempty"`
950	// CurrentValue - READ-ONLY; The current value of the usage metric.
951	CurrentValue *float64 `json:"currentValue,omitempty"`
952	// Limit - READ-ONLY; The current limit of the usage metric.
953	Limit *float64 `json:"limit,omitempty"`
954	// Unit - READ-ONLY; The units of the usage metric.
955	Unit *string `json:"unit,omitempty"`
956	// NextResetTime - READ-ONLY; The next reset time for the usage metric (ISO8601 format).
957	NextResetTime *date.Time `json:"nextResetTime,omitempty"`
958}
959
960// DatabaseUsageListResult the response to a list database metrics request.
961type DatabaseUsageListResult struct {
962	autorest.Response `json:"-"`
963	// Value - The list of database usages for the database.
964	Value *[]DatabaseUsage `json:"value,omitempty"`
965}
966
967// DataMaskingPolicy represents a database data masking policy.
968type DataMaskingPolicy struct {
969	autorest.Response `json:"-"`
970	// DataMaskingPolicyProperties - The properties of the data masking policy.
971	*DataMaskingPolicyProperties `json:"properties,omitempty"`
972	// Location - READ-ONLY; The location of the data masking policy.
973	Location *string `json:"location,omitempty"`
974	// Kind - READ-ONLY; The kind of data masking policy. Metadata, used for Azure portal.
975	Kind *string `json:"kind,omitempty"`
976	// ID - READ-ONLY; Resource ID.
977	ID *string `json:"id,omitempty"`
978	// Name - READ-ONLY; Resource name.
979	Name *string `json:"name,omitempty"`
980	// Type - READ-ONLY; Resource type.
981	Type *string `json:"type,omitempty"`
982}
983
984// MarshalJSON is the custom marshaler for DataMaskingPolicy.
985func (dmp DataMaskingPolicy) MarshalJSON() ([]byte, error) {
986	objectMap := make(map[string]interface{})
987	if dmp.DataMaskingPolicyProperties != nil {
988		objectMap["properties"] = dmp.DataMaskingPolicyProperties
989	}
990	return json.Marshal(objectMap)
991}
992
993// UnmarshalJSON is the custom unmarshaler for DataMaskingPolicy struct.
994func (dmp *DataMaskingPolicy) UnmarshalJSON(body []byte) error {
995	var m map[string]*json.RawMessage
996	err := json.Unmarshal(body, &m)
997	if err != nil {
998		return err
999	}
1000	for k, v := range m {
1001		switch k {
1002		case "properties":
1003			if v != nil {
1004				var dataMaskingPolicyProperties DataMaskingPolicyProperties
1005				err = json.Unmarshal(*v, &dataMaskingPolicyProperties)
1006				if err != nil {
1007					return err
1008				}
1009				dmp.DataMaskingPolicyProperties = &dataMaskingPolicyProperties
1010			}
1011		case "location":
1012			if v != nil {
1013				var location string
1014				err = json.Unmarshal(*v, &location)
1015				if err != nil {
1016					return err
1017				}
1018				dmp.Location = &location
1019			}
1020		case "kind":
1021			if v != nil {
1022				var kind string
1023				err = json.Unmarshal(*v, &kind)
1024				if err != nil {
1025					return err
1026				}
1027				dmp.Kind = &kind
1028			}
1029		case "id":
1030			if v != nil {
1031				var ID string
1032				err = json.Unmarshal(*v, &ID)
1033				if err != nil {
1034					return err
1035				}
1036				dmp.ID = &ID
1037			}
1038		case "name":
1039			if v != nil {
1040				var name string
1041				err = json.Unmarshal(*v, &name)
1042				if err != nil {
1043					return err
1044				}
1045				dmp.Name = &name
1046			}
1047		case "type":
1048			if v != nil {
1049				var typeVar string
1050				err = json.Unmarshal(*v, &typeVar)
1051				if err != nil {
1052					return err
1053				}
1054				dmp.Type = &typeVar
1055			}
1056		}
1057	}
1058
1059	return nil
1060}
1061
1062// DataMaskingPolicyProperties the properties of a database data masking policy.
1063type DataMaskingPolicyProperties struct {
1064	// DataMaskingState - The state of the data masking policy. Possible values include: 'DataMaskingStateDisabled', 'DataMaskingStateEnabled'
1065	DataMaskingState DataMaskingState `json:"dataMaskingState,omitempty"`
1066	// 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.
1067	ExemptPrincipals *string `json:"exemptPrincipals,omitempty"`
1068	// ApplicationPrincipals - READ-ONLY; The list of the application principals. This is a legacy parameter and is no longer used.
1069	ApplicationPrincipals *string `json:"applicationPrincipals,omitempty"`
1070	// MaskingLevel - READ-ONLY; The masking level. This is a legacy parameter and is no longer used.
1071	MaskingLevel *string `json:"maskingLevel,omitempty"`
1072}
1073
1074// MarshalJSON is the custom marshaler for DataMaskingPolicyProperties.
1075func (dmpp DataMaskingPolicyProperties) MarshalJSON() ([]byte, error) {
1076	objectMap := make(map[string]interface{})
1077	if dmpp.DataMaskingState != "" {
1078		objectMap["dataMaskingState"] = dmpp.DataMaskingState
1079	}
1080	if dmpp.ExemptPrincipals != nil {
1081		objectMap["exemptPrincipals"] = dmpp.ExemptPrincipals
1082	}
1083	return json.Marshal(objectMap)
1084}
1085
1086// DataMaskingRule represents a database data masking rule.
1087type DataMaskingRule struct {
1088	autorest.Response `json:"-"`
1089	// DataMaskingRuleProperties - The properties of the resource.
1090	*DataMaskingRuleProperties `json:"properties,omitempty"`
1091	// Location - READ-ONLY; The location of the data masking rule.
1092	Location *string `json:"location,omitempty"`
1093	// Kind - READ-ONLY; The kind of Data Masking Rule. Metadata, used for Azure portal.
1094	Kind *string `json:"kind,omitempty"`
1095	// ID - READ-ONLY; Resource ID.
1096	ID *string `json:"id,omitempty"`
1097	// Name - READ-ONLY; Resource name.
1098	Name *string `json:"name,omitempty"`
1099	// Type - READ-ONLY; Resource type.
1100	Type *string `json:"type,omitempty"`
1101}
1102
1103// MarshalJSON is the custom marshaler for DataMaskingRule.
1104func (dmr DataMaskingRule) MarshalJSON() ([]byte, error) {
1105	objectMap := make(map[string]interface{})
1106	if dmr.DataMaskingRuleProperties != nil {
1107		objectMap["properties"] = dmr.DataMaskingRuleProperties
1108	}
1109	return json.Marshal(objectMap)
1110}
1111
1112// UnmarshalJSON is the custom unmarshaler for DataMaskingRule struct.
1113func (dmr *DataMaskingRule) UnmarshalJSON(body []byte) error {
1114	var m map[string]*json.RawMessage
1115	err := json.Unmarshal(body, &m)
1116	if err != nil {
1117		return err
1118	}
1119	for k, v := range m {
1120		switch k {
1121		case "properties":
1122			if v != nil {
1123				var dataMaskingRuleProperties DataMaskingRuleProperties
1124				err = json.Unmarshal(*v, &dataMaskingRuleProperties)
1125				if err != nil {
1126					return err
1127				}
1128				dmr.DataMaskingRuleProperties = &dataMaskingRuleProperties
1129			}
1130		case "location":
1131			if v != nil {
1132				var location string
1133				err = json.Unmarshal(*v, &location)
1134				if err != nil {
1135					return err
1136				}
1137				dmr.Location = &location
1138			}
1139		case "kind":
1140			if v != nil {
1141				var kind string
1142				err = json.Unmarshal(*v, &kind)
1143				if err != nil {
1144					return err
1145				}
1146				dmr.Kind = &kind
1147			}
1148		case "id":
1149			if v != nil {
1150				var ID string
1151				err = json.Unmarshal(*v, &ID)
1152				if err != nil {
1153					return err
1154				}
1155				dmr.ID = &ID
1156			}
1157		case "name":
1158			if v != nil {
1159				var name string
1160				err = json.Unmarshal(*v, &name)
1161				if err != nil {
1162					return err
1163				}
1164				dmr.Name = &name
1165			}
1166		case "type":
1167			if v != nil {
1168				var typeVar string
1169				err = json.Unmarshal(*v, &typeVar)
1170				if err != nil {
1171					return err
1172				}
1173				dmr.Type = &typeVar
1174			}
1175		}
1176	}
1177
1178	return nil
1179}
1180
1181// DataMaskingRuleListResult the response to a list data masking rules request.
1182type DataMaskingRuleListResult struct {
1183	autorest.Response `json:"-"`
1184	// Value - The list of database data masking rules.
1185	Value *[]DataMaskingRule `json:"value,omitempty"`
1186}
1187
1188// DataMaskingRuleProperties the properties of a database data masking rule.
1189type DataMaskingRuleProperties struct {
1190	// ID - READ-ONLY; The rule Id.
1191	ID *string `json:"id,omitempty"`
1192	// AliasName - The alias name. This is a legacy parameter and is no longer used.
1193	AliasName *string `json:"aliasName,omitempty"`
1194	// 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'
1195	RuleState DataMaskingRuleState `json:"ruleState,omitempty"`
1196	// SchemaName - The schema name on which the data masking rule is applied.
1197	SchemaName *string `json:"schemaName,omitempty"`
1198	// TableName - The table name on which the data masking rule is applied.
1199	TableName *string `json:"tableName,omitempty"`
1200	// ColumnName - The column name on which the data masking rule is applied.
1201	ColumnName *string `json:"columnName,omitempty"`
1202	// MaskingFunction - The masking function that is used for the data masking rule. Possible values include: 'DataMaskingFunctionDefault', 'DataMaskingFunctionCCN', 'DataMaskingFunctionEmail', 'DataMaskingFunctionNumber', 'DataMaskingFunctionSSN', 'DataMaskingFunctionText'
1203	MaskingFunction DataMaskingFunction `json:"maskingFunction,omitempty"`
1204	// NumberFrom - The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.
1205	NumberFrom *string `json:"numberFrom,omitempty"`
1206	// NumberTo - The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.
1207	NumberTo *string `json:"numberTo,omitempty"`
1208	// 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.
1209	PrefixSize *string `json:"prefixSize,omitempty"`
1210	// 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.
1211	SuffixSize *string `json:"suffixSize,omitempty"`
1212	// 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.
1213	ReplacementString *string `json:"replacementString,omitempty"`
1214}
1215
1216// MarshalJSON is the custom marshaler for DataMaskingRuleProperties.
1217func (dmrp DataMaskingRuleProperties) MarshalJSON() ([]byte, error) {
1218	objectMap := make(map[string]interface{})
1219	if dmrp.AliasName != nil {
1220		objectMap["aliasName"] = dmrp.AliasName
1221	}
1222	if dmrp.RuleState != "" {
1223		objectMap["ruleState"] = dmrp.RuleState
1224	}
1225	if dmrp.SchemaName != nil {
1226		objectMap["schemaName"] = dmrp.SchemaName
1227	}
1228	if dmrp.TableName != nil {
1229		objectMap["tableName"] = dmrp.TableName
1230	}
1231	if dmrp.ColumnName != nil {
1232		objectMap["columnName"] = dmrp.ColumnName
1233	}
1234	if dmrp.MaskingFunction != "" {
1235		objectMap["maskingFunction"] = dmrp.MaskingFunction
1236	}
1237	if dmrp.NumberFrom != nil {
1238		objectMap["numberFrom"] = dmrp.NumberFrom
1239	}
1240	if dmrp.NumberTo != nil {
1241		objectMap["numberTo"] = dmrp.NumberTo
1242	}
1243	if dmrp.PrefixSize != nil {
1244		objectMap["prefixSize"] = dmrp.PrefixSize
1245	}
1246	if dmrp.SuffixSize != nil {
1247		objectMap["suffixSize"] = dmrp.SuffixSize
1248	}
1249	if dmrp.ReplacementString != nil {
1250		objectMap["replacementString"] = dmrp.ReplacementString
1251	}
1252	return json.Marshal(objectMap)
1253}
1254
1255// DisasterRecoveryConfiguration represents a disaster recovery configuration.
1256type DisasterRecoveryConfiguration struct {
1257	autorest.Response `json:"-"`
1258	// DisasterRecoveryConfigurationProperties - The properties representing the resource.
1259	*DisasterRecoveryConfigurationProperties `json:"properties,omitempty"`
1260	// Location - READ-ONLY; Location of the server that contains this disaster recovery configuration.
1261	Location *string `json:"location,omitempty"`
1262	// ID - READ-ONLY; Resource ID.
1263	ID *string `json:"id,omitempty"`
1264	// Name - READ-ONLY; Resource name.
1265	Name *string `json:"name,omitempty"`
1266	// Type - READ-ONLY; Resource type.
1267	Type *string `json:"type,omitempty"`
1268}
1269
1270// MarshalJSON is the custom marshaler for DisasterRecoveryConfiguration.
1271func (drc DisasterRecoveryConfiguration) MarshalJSON() ([]byte, error) {
1272	objectMap := make(map[string]interface{})
1273	if drc.DisasterRecoveryConfigurationProperties != nil {
1274		objectMap["properties"] = drc.DisasterRecoveryConfigurationProperties
1275	}
1276	return json.Marshal(objectMap)
1277}
1278
1279// UnmarshalJSON is the custom unmarshaler for DisasterRecoveryConfiguration struct.
1280func (drc *DisasterRecoveryConfiguration) UnmarshalJSON(body []byte) error {
1281	var m map[string]*json.RawMessage
1282	err := json.Unmarshal(body, &m)
1283	if err != nil {
1284		return err
1285	}
1286	for k, v := range m {
1287		switch k {
1288		case "properties":
1289			if v != nil {
1290				var disasterRecoveryConfigurationProperties DisasterRecoveryConfigurationProperties
1291				err = json.Unmarshal(*v, &disasterRecoveryConfigurationProperties)
1292				if err != nil {
1293					return err
1294				}
1295				drc.DisasterRecoveryConfigurationProperties = &disasterRecoveryConfigurationProperties
1296			}
1297		case "location":
1298			if v != nil {
1299				var location string
1300				err = json.Unmarshal(*v, &location)
1301				if err != nil {
1302					return err
1303				}
1304				drc.Location = &location
1305			}
1306		case "id":
1307			if v != nil {
1308				var ID string
1309				err = json.Unmarshal(*v, &ID)
1310				if err != nil {
1311					return err
1312				}
1313				drc.ID = &ID
1314			}
1315		case "name":
1316			if v != nil {
1317				var name string
1318				err = json.Unmarshal(*v, &name)
1319				if err != nil {
1320					return err
1321				}
1322				drc.Name = &name
1323			}
1324		case "type":
1325			if v != nil {
1326				var typeVar string
1327				err = json.Unmarshal(*v, &typeVar)
1328				if err != nil {
1329					return err
1330				}
1331				drc.Type = &typeVar
1332			}
1333		}
1334	}
1335
1336	return nil
1337}
1338
1339// DisasterRecoveryConfigurationListResult represents the response to a List disaster recovery
1340// configuration request.
1341type DisasterRecoveryConfigurationListResult struct {
1342	autorest.Response `json:"-"`
1343	// Value - The list of disaster recovery configurations housed under the server.
1344	Value *[]DisasterRecoveryConfiguration `json:"value,omitempty"`
1345}
1346
1347// DisasterRecoveryConfigurationProperties represents the properties of a disaster recovery configuration.
1348type DisasterRecoveryConfigurationProperties struct {
1349	// Status - READ-ONLY; The status of the disaster recovery configuration. Possible values include: 'Creating', 'Ready', 'FailingOver', 'Dropping'
1350	Status DisasterRecoveryConfigurationStatus `json:"status,omitempty"`
1351	// AutoFailover - Whether or not failover can be done automatically. Possible values include: 'Off', 'On'
1352	AutoFailover DisasterRecoveryConfigurationAutoFailover `json:"autoFailover,omitempty"`
1353	// FailoverPolicy - How aggressive the automatic failover should be. Possible values include: 'Manual', 'Automatic'
1354	FailoverPolicy DisasterRecoveryConfigurationFailoverPolicy `json:"failoverPolicy,omitempty"`
1355	// PartnerServerID - Id of the partner server.
1356	PartnerServerID *string `json:"partnerServerId,omitempty"`
1357	// LogicalServerName - READ-ONLY; Logical name of the server.
1358	LogicalServerName *string `json:"logicalServerName,omitempty"`
1359	// PartnerLogicalServerName - READ-ONLY; Logical name of the partner server.
1360	PartnerLogicalServerName *string `json:"partnerLogicalServerName,omitempty"`
1361	// Role - READ-ONLY; The role of the current server in the disaster recovery configuration. Possible values include: 'None', 'Primary', 'Secondary'
1362	Role DisasterRecoveryConfigurationRole `json:"role,omitempty"`
1363}
1364
1365// MarshalJSON is the custom marshaler for DisasterRecoveryConfigurationProperties.
1366func (drcp DisasterRecoveryConfigurationProperties) MarshalJSON() ([]byte, error) {
1367	objectMap := make(map[string]interface{})
1368	if drcp.AutoFailover != "" {
1369		objectMap["autoFailover"] = drcp.AutoFailover
1370	}
1371	if drcp.FailoverPolicy != "" {
1372		objectMap["failoverPolicy"] = drcp.FailoverPolicy
1373	}
1374	if drcp.PartnerServerID != nil {
1375		objectMap["partnerServerId"] = drcp.PartnerServerID
1376	}
1377	return json.Marshal(objectMap)
1378}
1379
1380// DisasterRecoveryConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
1381// results of a long-running operation.
1382type DisasterRecoveryConfigurationsCreateOrUpdateFuture struct {
1383	azure.FutureAPI
1384	// Result returns the result of the asynchronous operation.
1385	// If the operation has not completed it will return an error.
1386	Result func(DisasterRecoveryConfigurationsClient) (DisasterRecoveryConfiguration, error)
1387}
1388
1389// DisasterRecoveryConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
1390// long-running operation.
1391type DisasterRecoveryConfigurationsDeleteFuture struct {
1392	azure.FutureAPI
1393	// Result returns the result of the asynchronous operation.
1394	// If the operation has not completed it will return an error.
1395	Result func(DisasterRecoveryConfigurationsClient) (autorest.Response, error)
1396}
1397
1398// DisasterRecoveryConfigurationsFailoverAllowDataLossFuture an abstraction for monitoring and retrieving
1399// the results of a long-running operation.
1400type DisasterRecoveryConfigurationsFailoverAllowDataLossFuture struct {
1401	azure.FutureAPI
1402	// Result returns the result of the asynchronous operation.
1403	// If the operation has not completed it will return an error.
1404	Result func(DisasterRecoveryConfigurationsClient) (autorest.Response, error)
1405}
1406
1407// DisasterRecoveryConfigurationsFailoverFuture an abstraction for monitoring and retrieving the results of
1408// a long-running operation.
1409type DisasterRecoveryConfigurationsFailoverFuture struct {
1410	azure.FutureAPI
1411	// Result returns the result of the asynchronous operation.
1412	// If the operation has not completed it will return an error.
1413	Result func(DisasterRecoveryConfigurationsClient) (autorest.Response, error)
1414}
1415
1416// EditionCapability the database edition capabilities.
1417type EditionCapability struct {
1418	// Name - READ-ONLY; The edition name.
1419	Name *string `json:"name,omitempty"`
1420	// Status - READ-ONLY; The status of the edition. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
1421	Status CapabilityStatus `json:"status,omitempty"`
1422	// SupportedServiceLevelObjectives - READ-ONLY; The list of supported service objectives for the edition.
1423	SupportedServiceLevelObjectives *[]ServiceObjectiveCapability `json:"supportedServiceLevelObjectives,omitempty"`
1424	// ZoneRedundant - READ-ONLY; Whether or not zone redundancy is supported for the edition.
1425	ZoneRedundant *bool `json:"zoneRedundant,omitempty"`
1426}
1427
1428// ElasticPool represents a database elastic pool.
1429type ElasticPool struct {
1430	autorest.Response `json:"-"`
1431	// ElasticPoolProperties - The properties representing the resource.
1432	*ElasticPoolProperties `json:"properties,omitempty"`
1433	// Kind - READ-ONLY; Kind of elastic pool.  This is metadata used for the Azure portal experience.
1434	Kind *string `json:"kind,omitempty"`
1435	// Location - Resource location.
1436	Location *string `json:"location,omitempty"`
1437	// Tags - Resource tags.
1438	Tags map[string]*string `json:"tags"`
1439	// ID - READ-ONLY; Resource ID.
1440	ID *string `json:"id,omitempty"`
1441	// Name - READ-ONLY; Resource name.
1442	Name *string `json:"name,omitempty"`
1443	// Type - READ-ONLY; Resource type.
1444	Type *string `json:"type,omitempty"`
1445}
1446
1447// MarshalJSON is the custom marshaler for ElasticPool.
1448func (ep ElasticPool) MarshalJSON() ([]byte, error) {
1449	objectMap := make(map[string]interface{})
1450	if ep.ElasticPoolProperties != nil {
1451		objectMap["properties"] = ep.ElasticPoolProperties
1452	}
1453	if ep.Location != nil {
1454		objectMap["location"] = ep.Location
1455	}
1456	if ep.Tags != nil {
1457		objectMap["tags"] = ep.Tags
1458	}
1459	return json.Marshal(objectMap)
1460}
1461
1462// UnmarshalJSON is the custom unmarshaler for ElasticPool struct.
1463func (ep *ElasticPool) UnmarshalJSON(body []byte) error {
1464	var m map[string]*json.RawMessage
1465	err := json.Unmarshal(body, &m)
1466	if err != nil {
1467		return err
1468	}
1469	for k, v := range m {
1470		switch k {
1471		case "properties":
1472			if v != nil {
1473				var elasticPoolProperties ElasticPoolProperties
1474				err = json.Unmarshal(*v, &elasticPoolProperties)
1475				if err != nil {
1476					return err
1477				}
1478				ep.ElasticPoolProperties = &elasticPoolProperties
1479			}
1480		case "kind":
1481			if v != nil {
1482				var kind string
1483				err = json.Unmarshal(*v, &kind)
1484				if err != nil {
1485					return err
1486				}
1487				ep.Kind = &kind
1488			}
1489		case "location":
1490			if v != nil {
1491				var location string
1492				err = json.Unmarshal(*v, &location)
1493				if err != nil {
1494					return err
1495				}
1496				ep.Location = &location
1497			}
1498		case "tags":
1499			if v != nil {
1500				var tags map[string]*string
1501				err = json.Unmarshal(*v, &tags)
1502				if err != nil {
1503					return err
1504				}
1505				ep.Tags = tags
1506			}
1507		case "id":
1508			if v != nil {
1509				var ID string
1510				err = json.Unmarshal(*v, &ID)
1511				if err != nil {
1512					return err
1513				}
1514				ep.ID = &ID
1515			}
1516		case "name":
1517			if v != nil {
1518				var name string
1519				err = json.Unmarshal(*v, &name)
1520				if err != nil {
1521					return err
1522				}
1523				ep.Name = &name
1524			}
1525		case "type":
1526			if v != nil {
1527				var typeVar string
1528				err = json.Unmarshal(*v, &typeVar)
1529				if err != nil {
1530					return err
1531				}
1532				ep.Type = &typeVar
1533			}
1534		}
1535	}
1536
1537	return nil
1538}
1539
1540// ElasticPoolActivity represents the activity on an elastic pool.
1541type ElasticPoolActivity struct {
1542	// Location - The geo-location where the resource lives
1543	Location *string `json:"location,omitempty"`
1544	// ElasticPoolActivityProperties - The properties representing the resource.
1545	*ElasticPoolActivityProperties `json:"properties,omitempty"`
1546	// ID - READ-ONLY; Resource ID.
1547	ID *string `json:"id,omitempty"`
1548	// Name - READ-ONLY; Resource name.
1549	Name *string `json:"name,omitempty"`
1550	// Type - READ-ONLY; Resource type.
1551	Type *string `json:"type,omitempty"`
1552}
1553
1554// MarshalJSON is the custom marshaler for ElasticPoolActivity.
1555func (epa ElasticPoolActivity) MarshalJSON() ([]byte, error) {
1556	objectMap := make(map[string]interface{})
1557	if epa.Location != nil {
1558		objectMap["location"] = epa.Location
1559	}
1560	if epa.ElasticPoolActivityProperties != nil {
1561		objectMap["properties"] = epa.ElasticPoolActivityProperties
1562	}
1563	return json.Marshal(objectMap)
1564}
1565
1566// UnmarshalJSON is the custom unmarshaler for ElasticPoolActivity struct.
1567func (epa *ElasticPoolActivity) UnmarshalJSON(body []byte) error {
1568	var m map[string]*json.RawMessage
1569	err := json.Unmarshal(body, &m)
1570	if err != nil {
1571		return err
1572	}
1573	for k, v := range m {
1574		switch k {
1575		case "location":
1576			if v != nil {
1577				var location string
1578				err = json.Unmarshal(*v, &location)
1579				if err != nil {
1580					return err
1581				}
1582				epa.Location = &location
1583			}
1584		case "properties":
1585			if v != nil {
1586				var elasticPoolActivityProperties ElasticPoolActivityProperties
1587				err = json.Unmarshal(*v, &elasticPoolActivityProperties)
1588				if err != nil {
1589					return err
1590				}
1591				epa.ElasticPoolActivityProperties = &elasticPoolActivityProperties
1592			}
1593		case "id":
1594			if v != nil {
1595				var ID string
1596				err = json.Unmarshal(*v, &ID)
1597				if err != nil {
1598					return err
1599				}
1600				epa.ID = &ID
1601			}
1602		case "name":
1603			if v != nil {
1604				var name string
1605				err = json.Unmarshal(*v, &name)
1606				if err != nil {
1607					return err
1608				}
1609				epa.Name = &name
1610			}
1611		case "type":
1612			if v != nil {
1613				var typeVar string
1614				err = json.Unmarshal(*v, &typeVar)
1615				if err != nil {
1616					return err
1617				}
1618				epa.Type = &typeVar
1619			}
1620		}
1621	}
1622
1623	return nil
1624}
1625
1626// ElasticPoolActivityListResult represents the response to a list elastic pool activity request.
1627type ElasticPoolActivityListResult struct {
1628	autorest.Response `json:"-"`
1629	// Value - The list of elastic pool activities.
1630	Value *[]ElasticPoolActivity `json:"value,omitempty"`
1631}
1632
1633// ElasticPoolActivityProperties represents the properties of an elastic pool.
1634type ElasticPoolActivityProperties struct {
1635	// EndTime - READ-ONLY; The time the operation finished (ISO8601 format).
1636	EndTime *date.Time `json:"endTime,omitempty"`
1637	// ErrorCode - READ-ONLY; The error code if available.
1638	ErrorCode *int32 `json:"errorCode,omitempty"`
1639	// ErrorMessage - READ-ONLY; The error message if available.
1640	ErrorMessage *string `json:"errorMessage,omitempty"`
1641	// ErrorSeverity - READ-ONLY; The error severity if available.
1642	ErrorSeverity *int32 `json:"errorSeverity,omitempty"`
1643	// Operation - READ-ONLY; The operation name.
1644	Operation *string `json:"operation,omitempty"`
1645	// OperationID - READ-ONLY; The unique operation ID.
1646	OperationID *uuid.UUID `json:"operationId,omitempty"`
1647	// PercentComplete - READ-ONLY; The percentage complete if available.
1648	PercentComplete *int32 `json:"percentComplete,omitempty"`
1649	// RequestedDatabaseDtuMax - READ-ONLY; The requested max DTU per database if available.
1650	RequestedDatabaseDtuMax *int32 `json:"requestedDatabaseDtuMax,omitempty"`
1651	// RequestedDatabaseDtuMin - READ-ONLY; The requested min DTU per database if available.
1652	RequestedDatabaseDtuMin *int32 `json:"requestedDatabaseDtuMin,omitempty"`
1653	// RequestedDtu - READ-ONLY; The requested DTU for the pool if available.
1654	RequestedDtu *int32 `json:"requestedDtu,omitempty"`
1655	// RequestedElasticPoolName - READ-ONLY; The requested name for the elastic pool if available.
1656	RequestedElasticPoolName *string `json:"requestedElasticPoolName,omitempty"`
1657	// RequestedStorageLimitInGB - READ-ONLY; The requested storage limit for the pool in GB if available.
1658	RequestedStorageLimitInGB *int64 `json:"requestedStorageLimitInGB,omitempty"`
1659	// ElasticPoolName - READ-ONLY; The name of the elastic pool.
1660	ElasticPoolName *string `json:"elasticPoolName,omitempty"`
1661	// ServerName - READ-ONLY; The name of the server the elastic pool is in.
1662	ServerName *string `json:"serverName,omitempty"`
1663	// StartTime - READ-ONLY; The time the operation started (ISO8601 format).
1664	StartTime *date.Time `json:"startTime,omitempty"`
1665	// State - READ-ONLY; The current state of the operation.
1666	State *string `json:"state,omitempty"`
1667	// RequestedStorageLimitInMB - READ-ONLY; The requested storage limit in MB.
1668	RequestedStorageLimitInMB *int32 `json:"requestedStorageLimitInMB,omitempty"`
1669	// RequestedDatabaseDtuGuarantee - READ-ONLY; The requested per database DTU guarantee.
1670	RequestedDatabaseDtuGuarantee *int32 `json:"requestedDatabaseDtuGuarantee,omitempty"`
1671	// RequestedDatabaseDtuCap - READ-ONLY; The requested per database DTU cap.
1672	RequestedDatabaseDtuCap *int32 `json:"requestedDatabaseDtuCap,omitempty"`
1673	// RequestedDtuGuarantee - READ-ONLY; The requested DTU guarantee.
1674	RequestedDtuGuarantee *int32 `json:"requestedDtuGuarantee,omitempty"`
1675}
1676
1677// ElasticPoolDatabaseActivity represents the activity on an elastic pool.
1678type ElasticPoolDatabaseActivity struct {
1679	// Location - The geo-location where the resource lives
1680	Location *string `json:"location,omitempty"`
1681	// ElasticPoolDatabaseActivityProperties - The properties representing the resource.
1682	*ElasticPoolDatabaseActivityProperties `json:"properties,omitempty"`
1683	// ID - READ-ONLY; Resource ID.
1684	ID *string `json:"id,omitempty"`
1685	// Name - READ-ONLY; Resource name.
1686	Name *string `json:"name,omitempty"`
1687	// Type - READ-ONLY; Resource type.
1688	Type *string `json:"type,omitempty"`
1689}
1690
1691// MarshalJSON is the custom marshaler for ElasticPoolDatabaseActivity.
1692func (epda ElasticPoolDatabaseActivity) MarshalJSON() ([]byte, error) {
1693	objectMap := make(map[string]interface{})
1694	if epda.Location != nil {
1695		objectMap["location"] = epda.Location
1696	}
1697	if epda.ElasticPoolDatabaseActivityProperties != nil {
1698		objectMap["properties"] = epda.ElasticPoolDatabaseActivityProperties
1699	}
1700	return json.Marshal(objectMap)
1701}
1702
1703// UnmarshalJSON is the custom unmarshaler for ElasticPoolDatabaseActivity struct.
1704func (epda *ElasticPoolDatabaseActivity) UnmarshalJSON(body []byte) error {
1705	var m map[string]*json.RawMessage
1706	err := json.Unmarshal(body, &m)
1707	if err != nil {
1708		return err
1709	}
1710	for k, v := range m {
1711		switch k {
1712		case "location":
1713			if v != nil {
1714				var location string
1715				err = json.Unmarshal(*v, &location)
1716				if err != nil {
1717					return err
1718				}
1719				epda.Location = &location
1720			}
1721		case "properties":
1722			if v != nil {
1723				var elasticPoolDatabaseActivityProperties ElasticPoolDatabaseActivityProperties
1724				err = json.Unmarshal(*v, &elasticPoolDatabaseActivityProperties)
1725				if err != nil {
1726					return err
1727				}
1728				epda.ElasticPoolDatabaseActivityProperties = &elasticPoolDatabaseActivityProperties
1729			}
1730		case "id":
1731			if v != nil {
1732				var ID string
1733				err = json.Unmarshal(*v, &ID)
1734				if err != nil {
1735					return err
1736				}
1737				epda.ID = &ID
1738			}
1739		case "name":
1740			if v != nil {
1741				var name string
1742				err = json.Unmarshal(*v, &name)
1743				if err != nil {
1744					return err
1745				}
1746				epda.Name = &name
1747			}
1748		case "type":
1749			if v != nil {
1750				var typeVar string
1751				err = json.Unmarshal(*v, &typeVar)
1752				if err != nil {
1753					return err
1754				}
1755				epda.Type = &typeVar
1756			}
1757		}
1758	}
1759
1760	return nil
1761}
1762
1763// ElasticPoolDatabaseActivityListResult represents the response to a list elastic pool database activity
1764// request.
1765type ElasticPoolDatabaseActivityListResult struct {
1766	autorest.Response `json:"-"`
1767	// Value - The list of elastic pool database activities.
1768	Value *[]ElasticPoolDatabaseActivity `json:"value,omitempty"`
1769}
1770
1771// ElasticPoolDatabaseActivityProperties represents the properties of an elastic pool database activity.
1772type ElasticPoolDatabaseActivityProperties struct {
1773	// DatabaseName - READ-ONLY; The database name.
1774	DatabaseName *string `json:"databaseName,omitempty"`
1775	// EndTime - READ-ONLY; The time the operation finished (ISO8601 format).
1776	EndTime *date.Time `json:"endTime,omitempty"`
1777	// ErrorCode - READ-ONLY; The error code if available.
1778	ErrorCode *int32 `json:"errorCode,omitempty"`
1779	// ErrorMessage - READ-ONLY; The error message if available.
1780	ErrorMessage *string `json:"errorMessage,omitempty"`
1781	// ErrorSeverity - READ-ONLY; The error severity if available.
1782	ErrorSeverity *int32 `json:"errorSeverity,omitempty"`
1783	// Operation - READ-ONLY; The operation name.
1784	Operation *string `json:"operation,omitempty"`
1785	// OperationID - READ-ONLY; The unique operation ID.
1786	OperationID *uuid.UUID `json:"operationId,omitempty"`
1787	// PercentComplete - READ-ONLY; The percentage complete if available.
1788	PercentComplete *int32 `json:"percentComplete,omitempty"`
1789	// RequestedElasticPoolName - READ-ONLY; The name for the elastic pool the database is moving into if available.
1790	RequestedElasticPoolName *string `json:"requestedElasticPoolName,omitempty"`
1791	// CurrentElasticPoolName - READ-ONLY; The name of the current elastic pool the database is in if available.
1792	CurrentElasticPoolName *string `json:"currentElasticPoolName,omitempty"`
1793	// CurrentServiceObjective - READ-ONLY; The name of the current service objective if available.
1794	CurrentServiceObjective *string `json:"currentServiceObjective,omitempty"`
1795	// RequestedServiceObjective - READ-ONLY; The name of the requested service objective if available.
1796	RequestedServiceObjective *string `json:"requestedServiceObjective,omitempty"`
1797	// ServerName - READ-ONLY; The name of the server the elastic pool is in.
1798	ServerName *string `json:"serverName,omitempty"`
1799	// StartTime - READ-ONLY; The time the operation started (ISO8601 format).
1800	StartTime *date.Time `json:"startTime,omitempty"`
1801	// State - READ-ONLY; The current state of the operation.
1802	State *string `json:"state,omitempty"`
1803}
1804
1805// ElasticPoolDtuCapability the Elastic Pool DTU capability.
1806type ElasticPoolDtuCapability struct {
1807	// Limit - READ-ONLY; The maximum size of the database (see 'unit' for the units).
1808	Limit *int64 `json:"limit,omitempty"`
1809	// MaxDatabaseCount - READ-ONLY; The maximum number of databases supported.
1810	MaxDatabaseCount *int64 `json:"maxDatabaseCount,omitempty"`
1811	// Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
1812	Status CapabilityStatus `json:"status,omitempty"`
1813	// SupportedMaxSizes - READ-ONLY; The list of supported max sizes.
1814	SupportedMaxSizes *[]MaxSizeCapability `json:"supportedMaxSizes,omitempty"`
1815	// IncludedMaxSize - READ-ONLY; The included (free) max size for this service level objective.
1816	IncludedMaxSize *MaxSizeCapability `json:"includedMaxSize,omitempty"`
1817	// SupportedPerDatabaseMaxSizes - READ-ONLY; The list of supported max database sizes.
1818	SupportedPerDatabaseMaxSizes *[]MaxSizeCapability `json:"supportedPerDatabaseMaxSizes,omitempty"`
1819	// SupportedPerDatabaseMaxDtus - READ-ONLY; The list of supported max database DTUs.
1820	SupportedPerDatabaseMaxDtus *[]ElasticPoolPerDatabaseMaxDtuCapability `json:"supportedPerDatabaseMaxDtus,omitempty"`
1821}
1822
1823// ElasticPoolEditionCapability the elastic pool edition capabilities.
1824type ElasticPoolEditionCapability struct {
1825	// Name - READ-ONLY; The elastic pool edition name.
1826	Name *string `json:"name,omitempty"`
1827	// Status - READ-ONLY; The status of the elastic pool edition. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
1828	Status CapabilityStatus `json:"status,omitempty"`
1829	// SupportedElasticPoolDtus - READ-ONLY; The list of supported elastic pool DTU levels for the edition.
1830	SupportedElasticPoolDtus *[]ElasticPoolDtuCapability `json:"supportedElasticPoolDtus,omitempty"`
1831	// ZoneRedundant - READ-ONLY; Whether or not zone redundancy is supported for the edition.
1832	ZoneRedundant *bool `json:"zoneRedundant,omitempty"`
1833}
1834
1835// ElasticPoolListResult represents the response to a list elastic pool request.
1836type ElasticPoolListResult struct {
1837	autorest.Response `json:"-"`
1838	// Value - The list of elastic pools hosted in the server.
1839	Value *[]ElasticPool `json:"value,omitempty"`
1840}
1841
1842// ElasticPoolPerDatabaseMaxDtuCapability the max per-database DTU capability.
1843type ElasticPoolPerDatabaseMaxDtuCapability struct {
1844	// Limit - READ-ONLY; The maximum DTUs per database.
1845	Limit *int64 `json:"limit,omitempty"`
1846	// Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
1847	Status CapabilityStatus `json:"status,omitempty"`
1848	// SupportedPerDatabaseMinDtus - READ-ONLY; The list of supported min database DTUs.
1849	SupportedPerDatabaseMinDtus *[]ElasticPoolPerDatabaseMinDtuCapability `json:"supportedPerDatabaseMinDtus,omitempty"`
1850}
1851
1852// ElasticPoolPerDatabaseMinDtuCapability the minimum per-database DTU capability.
1853type ElasticPoolPerDatabaseMinDtuCapability struct {
1854	// Limit - READ-ONLY; The maximum DTUs per database.
1855	Limit *int64 `json:"limit,omitempty"`
1856	// Status - READ-ONLY; The status of the capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
1857	Status CapabilityStatus `json:"status,omitempty"`
1858}
1859
1860// ElasticPoolProperties represents the properties of an elastic pool.
1861type ElasticPoolProperties struct {
1862	// CreationDate - READ-ONLY; The creation date of the elastic pool (ISO8601 format).
1863	CreationDate *date.Time `json:"creationDate,omitempty"`
1864	// State - READ-ONLY; The state of the elastic pool. Possible values include: 'ElasticPoolStateCreating', 'ElasticPoolStateReady', 'ElasticPoolStateDisabled'
1865	State ElasticPoolState `json:"state,omitempty"`
1866	// Edition - The edition of the elastic pool. Possible values include: 'ElasticPoolEditionBasic', 'ElasticPoolEditionStandard', 'ElasticPoolEditionPremium', 'ElasticPoolEditionGeneralPurpose', 'ElasticPoolEditionBusinessCritical'
1867	Edition ElasticPoolEdition `json:"edition,omitempty"`
1868	// Dtu - The total shared DTU for the database elastic pool.
1869	Dtu *int32 `json:"dtu,omitempty"`
1870	// DatabaseDtuMax - The maximum DTU any one database can consume.
1871	DatabaseDtuMax *int32 `json:"databaseDtuMax,omitempty"`
1872	// DatabaseDtuMin - The minimum DTU all databases are guaranteed.
1873	DatabaseDtuMin *int32 `json:"databaseDtuMin,omitempty"`
1874	// StorageMB - Gets storage limit for the database elastic pool in MB.
1875	StorageMB *int32 `json:"storageMB,omitempty"`
1876	// 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.
1877	ZoneRedundant *bool `json:"zoneRedundant,omitempty"`
1878}
1879
1880// MarshalJSON is the custom marshaler for ElasticPoolProperties.
1881func (epp ElasticPoolProperties) MarshalJSON() ([]byte, error) {
1882	objectMap := make(map[string]interface{})
1883	if epp.Edition != "" {
1884		objectMap["edition"] = epp.Edition
1885	}
1886	if epp.Dtu != nil {
1887		objectMap["dtu"] = epp.Dtu
1888	}
1889	if epp.DatabaseDtuMax != nil {
1890		objectMap["databaseDtuMax"] = epp.DatabaseDtuMax
1891	}
1892	if epp.DatabaseDtuMin != nil {
1893		objectMap["databaseDtuMin"] = epp.DatabaseDtuMin
1894	}
1895	if epp.StorageMB != nil {
1896		objectMap["storageMB"] = epp.StorageMB
1897	}
1898	if epp.ZoneRedundant != nil {
1899		objectMap["zoneRedundant"] = epp.ZoneRedundant
1900	}
1901	return json.Marshal(objectMap)
1902}
1903
1904// ElasticPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1905// long-running operation.
1906type ElasticPoolsCreateOrUpdateFuture struct {
1907	azure.FutureAPI
1908	// Result returns the result of the asynchronous operation.
1909	// If the operation has not completed it will return an error.
1910	Result func(ElasticPoolsClient) (ElasticPool, error)
1911}
1912
1913// ElasticPoolsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1914// operation.
1915type ElasticPoolsUpdateFuture struct {
1916	azure.FutureAPI
1917	// Result returns the result of the asynchronous operation.
1918	// If the operation has not completed it will return an error.
1919	Result func(ElasticPoolsClient) (ElasticPool, error)
1920}
1921
1922// ElasticPoolUpdate represents an elastic pool update.
1923type ElasticPoolUpdate struct {
1924	// Tags - Resource tags.
1925	Tags map[string]*string `json:"tags"`
1926	// ElasticPoolProperties - The properties representing the resource.
1927	*ElasticPoolProperties `json:"properties,omitempty"`
1928	// ID - READ-ONLY; Resource ID.
1929	ID *string `json:"id,omitempty"`
1930	// Name - READ-ONLY; Resource name.
1931	Name *string `json:"name,omitempty"`
1932	// Type - READ-ONLY; Resource type.
1933	Type *string `json:"type,omitempty"`
1934}
1935
1936// MarshalJSON is the custom marshaler for ElasticPoolUpdate.
1937func (epu ElasticPoolUpdate) MarshalJSON() ([]byte, error) {
1938	objectMap := make(map[string]interface{})
1939	if epu.Tags != nil {
1940		objectMap["tags"] = epu.Tags
1941	}
1942	if epu.ElasticPoolProperties != nil {
1943		objectMap["properties"] = epu.ElasticPoolProperties
1944	}
1945	return json.Marshal(objectMap)
1946}
1947
1948// UnmarshalJSON is the custom unmarshaler for ElasticPoolUpdate struct.
1949func (epu *ElasticPoolUpdate) UnmarshalJSON(body []byte) error {
1950	var m map[string]*json.RawMessage
1951	err := json.Unmarshal(body, &m)
1952	if err != nil {
1953		return err
1954	}
1955	for k, v := range m {
1956		switch k {
1957		case "tags":
1958			if v != nil {
1959				var tags map[string]*string
1960				err = json.Unmarshal(*v, &tags)
1961				if err != nil {
1962					return err
1963				}
1964				epu.Tags = tags
1965			}
1966		case "properties":
1967			if v != nil {
1968				var elasticPoolProperties ElasticPoolProperties
1969				err = json.Unmarshal(*v, &elasticPoolProperties)
1970				if err != nil {
1971					return err
1972				}
1973				epu.ElasticPoolProperties = &elasticPoolProperties
1974			}
1975		case "id":
1976			if v != nil {
1977				var ID string
1978				err = json.Unmarshal(*v, &ID)
1979				if err != nil {
1980					return err
1981				}
1982				epu.ID = &ID
1983			}
1984		case "name":
1985			if v != nil {
1986				var name string
1987				err = json.Unmarshal(*v, &name)
1988				if err != nil {
1989					return err
1990				}
1991				epu.Name = &name
1992			}
1993		case "type":
1994			if v != nil {
1995				var typeVar string
1996				err = json.Unmarshal(*v, &typeVar)
1997				if err != nil {
1998					return err
1999				}
2000				epu.Type = &typeVar
2001			}
2002		}
2003	}
2004
2005	return nil
2006}
2007
2008// ExportRequest export database parameters.
2009type ExportRequest struct {
2010	// StorageKeyType - The type of the storage key to use. Possible values include: 'StorageAccessKey', 'SharedAccessKey'
2011	StorageKeyType StorageKeyType `json:"storageKeyType,omitempty"`
2012	// StorageKey - The storage key to use.  If storage key type is SharedAccessKey, it must be preceded with a "?."
2013	StorageKey *string `json:"storageKey,omitempty"`
2014	// StorageURI - The storage uri to use.
2015	StorageURI *string `json:"storageUri,omitempty"`
2016	// AdministratorLogin - The name of the SQL administrator.
2017	AdministratorLogin *string `json:"administratorLogin,omitempty"`
2018	// AdministratorLoginPassword - The password of the SQL administrator.
2019	AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"`
2020	// AuthenticationType - The authentication type. Possible values include: 'SQL', 'ADPassword'
2021	AuthenticationType AuthenticationType `json:"authenticationType,omitempty"`
2022}
2023
2024// ExtensionListResult represents the response to a list extensions request.
2025type ExtensionListResult struct {
2026	autorest.Response `json:"-"`
2027	// Value - The list of extensions.
2028	Value *[]interface{} `json:"value,omitempty"`
2029}
2030
2031// FirewallRule represents a server firewall rule.
2032type FirewallRule struct {
2033	autorest.Response `json:"-"`
2034	// Kind - READ-ONLY; Kind of server that contains this firewall rule.
2035	Kind *string `json:"kind,omitempty"`
2036	// Location - READ-ONLY; Location of the server that contains this firewall rule.
2037	Location *string `json:"location,omitempty"`
2038	// FirewallRuleProperties - The properties representing the resource.
2039	*FirewallRuleProperties `json:"properties,omitempty"`
2040	// ID - READ-ONLY; Resource ID.
2041	ID *string `json:"id,omitempty"`
2042	// Name - READ-ONLY; Resource name.
2043	Name *string `json:"name,omitempty"`
2044	// Type - READ-ONLY; Resource type.
2045	Type *string `json:"type,omitempty"`
2046}
2047
2048// MarshalJSON is the custom marshaler for FirewallRule.
2049func (fr FirewallRule) MarshalJSON() ([]byte, error) {
2050	objectMap := make(map[string]interface{})
2051	if fr.FirewallRuleProperties != nil {
2052		objectMap["properties"] = fr.FirewallRuleProperties
2053	}
2054	return json.Marshal(objectMap)
2055}
2056
2057// UnmarshalJSON is the custom unmarshaler for FirewallRule struct.
2058func (fr *FirewallRule) UnmarshalJSON(body []byte) error {
2059	var m map[string]*json.RawMessage
2060	err := json.Unmarshal(body, &m)
2061	if err != nil {
2062		return err
2063	}
2064	for k, v := range m {
2065		switch k {
2066		case "kind":
2067			if v != nil {
2068				var kind string
2069				err = json.Unmarshal(*v, &kind)
2070				if err != nil {
2071					return err
2072				}
2073				fr.Kind = &kind
2074			}
2075		case "location":
2076			if v != nil {
2077				var location string
2078				err = json.Unmarshal(*v, &location)
2079				if err != nil {
2080					return err
2081				}
2082				fr.Location = &location
2083			}
2084		case "properties":
2085			if v != nil {
2086				var firewallRuleProperties FirewallRuleProperties
2087				err = json.Unmarshal(*v, &firewallRuleProperties)
2088				if err != nil {
2089					return err
2090				}
2091				fr.FirewallRuleProperties = &firewallRuleProperties
2092			}
2093		case "id":
2094			if v != nil {
2095				var ID string
2096				err = json.Unmarshal(*v, &ID)
2097				if err != nil {
2098					return err
2099				}
2100				fr.ID = &ID
2101			}
2102		case "name":
2103			if v != nil {
2104				var name string
2105				err = json.Unmarshal(*v, &name)
2106				if err != nil {
2107					return err
2108				}
2109				fr.Name = &name
2110			}
2111		case "type":
2112			if v != nil {
2113				var typeVar string
2114				err = json.Unmarshal(*v, &typeVar)
2115				if err != nil {
2116					return err
2117				}
2118				fr.Type = &typeVar
2119			}
2120		}
2121	}
2122
2123	return nil
2124}
2125
2126// FirewallRuleListResult represents the response to a List Firewall Rules request.
2127type FirewallRuleListResult struct {
2128	autorest.Response `json:"-"`
2129	// Value - The list of server firewall rules.
2130	Value *[]FirewallRule `json:"value,omitempty"`
2131}
2132
2133// FirewallRuleProperties represents the properties of a server firewall rule.
2134type FirewallRuleProperties struct {
2135	// 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.
2136	StartIPAddress *string `json:"startIpAddress,omitempty"`
2137	// 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.
2138	EndIPAddress *string `json:"endIpAddress,omitempty"`
2139}
2140
2141// GeoBackupPolicy a database geo backup policy.
2142type GeoBackupPolicy struct {
2143	autorest.Response `json:"-"`
2144	// GeoBackupPolicyProperties - The properties of the geo backup policy.
2145	*GeoBackupPolicyProperties `json:"properties,omitempty"`
2146	// Kind - READ-ONLY; Kind of geo backup policy.  This is metadata used for the Azure portal experience.
2147	Kind *string `json:"kind,omitempty"`
2148	// Location - READ-ONLY; Backup policy location.
2149	Location *string `json:"location,omitempty"`
2150	// ID - READ-ONLY; Resource ID.
2151	ID *string `json:"id,omitempty"`
2152	// Name - READ-ONLY; Resource name.
2153	Name *string `json:"name,omitempty"`
2154	// Type - READ-ONLY; Resource type.
2155	Type *string `json:"type,omitempty"`
2156}
2157
2158// MarshalJSON is the custom marshaler for GeoBackupPolicy.
2159func (gbp GeoBackupPolicy) MarshalJSON() ([]byte, error) {
2160	objectMap := make(map[string]interface{})
2161	if gbp.GeoBackupPolicyProperties != nil {
2162		objectMap["properties"] = gbp.GeoBackupPolicyProperties
2163	}
2164	return json.Marshal(objectMap)
2165}
2166
2167// UnmarshalJSON is the custom unmarshaler for GeoBackupPolicy struct.
2168func (gbp *GeoBackupPolicy) UnmarshalJSON(body []byte) error {
2169	var m map[string]*json.RawMessage
2170	err := json.Unmarshal(body, &m)
2171	if err != nil {
2172		return err
2173	}
2174	for k, v := range m {
2175		switch k {
2176		case "properties":
2177			if v != nil {
2178				var geoBackupPolicyProperties GeoBackupPolicyProperties
2179				err = json.Unmarshal(*v, &geoBackupPolicyProperties)
2180				if err != nil {
2181					return err
2182				}
2183				gbp.GeoBackupPolicyProperties = &geoBackupPolicyProperties
2184			}
2185		case "kind":
2186			if v != nil {
2187				var kind string
2188				err = json.Unmarshal(*v, &kind)
2189				if err != nil {
2190					return err
2191				}
2192				gbp.Kind = &kind
2193			}
2194		case "location":
2195			if v != nil {
2196				var location string
2197				err = json.Unmarshal(*v, &location)
2198				if err != nil {
2199					return err
2200				}
2201				gbp.Location = &location
2202			}
2203		case "id":
2204			if v != nil {
2205				var ID string
2206				err = json.Unmarshal(*v, &ID)
2207				if err != nil {
2208					return err
2209				}
2210				gbp.ID = &ID
2211			}
2212		case "name":
2213			if v != nil {
2214				var name string
2215				err = json.Unmarshal(*v, &name)
2216				if err != nil {
2217					return err
2218				}
2219				gbp.Name = &name
2220			}
2221		case "type":
2222			if v != nil {
2223				var typeVar string
2224				err = json.Unmarshal(*v, &typeVar)
2225				if err != nil {
2226					return err
2227				}
2228				gbp.Type = &typeVar
2229			}
2230		}
2231	}
2232
2233	return nil
2234}
2235
2236// GeoBackupPolicyListResult the response to a list geo backup policies request.
2237type GeoBackupPolicyListResult struct {
2238	autorest.Response `json:"-"`
2239	// Value - The list of geo backup policies.
2240	Value *[]GeoBackupPolicy `json:"value,omitempty"`
2241}
2242
2243// GeoBackupPolicyProperties the properties of the geo backup policy.
2244type GeoBackupPolicyProperties struct {
2245	// State - The state of the geo backup policy. Possible values include: 'GeoBackupPolicyStateDisabled', 'GeoBackupPolicyStateEnabled'
2246	State GeoBackupPolicyState `json:"state,omitempty"`
2247	// StorageType - READ-ONLY; The storage type of the geo backup policy.
2248	StorageType *string `json:"storageType,omitempty"`
2249}
2250
2251// MarshalJSON is the custom marshaler for GeoBackupPolicyProperties.
2252func (gbpp GeoBackupPolicyProperties) MarshalJSON() ([]byte, error) {
2253	objectMap := make(map[string]interface{})
2254	if gbpp.State != "" {
2255		objectMap["state"] = gbpp.State
2256	}
2257	return json.Marshal(objectMap)
2258}
2259
2260// ImportExportResponse response for Import/Export Get operation.
2261type ImportExportResponse struct {
2262	autorest.Response `json:"-"`
2263	// ImportExportResponseProperties - The import/export operation properties.
2264	*ImportExportResponseProperties `json:"properties,omitempty"`
2265	// ID - READ-ONLY; Resource ID.
2266	ID *string `json:"id,omitempty"`
2267	// Name - READ-ONLY; Resource name.
2268	Name *string `json:"name,omitempty"`
2269	// Type - READ-ONLY; Resource type.
2270	Type *string `json:"type,omitempty"`
2271}
2272
2273// MarshalJSON is the custom marshaler for ImportExportResponse.
2274func (ier ImportExportResponse) MarshalJSON() ([]byte, error) {
2275	objectMap := make(map[string]interface{})
2276	if ier.ImportExportResponseProperties != nil {
2277		objectMap["properties"] = ier.ImportExportResponseProperties
2278	}
2279	return json.Marshal(objectMap)
2280}
2281
2282// UnmarshalJSON is the custom unmarshaler for ImportExportResponse struct.
2283func (ier *ImportExportResponse) UnmarshalJSON(body []byte) error {
2284	var m map[string]*json.RawMessage
2285	err := json.Unmarshal(body, &m)
2286	if err != nil {
2287		return err
2288	}
2289	for k, v := range m {
2290		switch k {
2291		case "properties":
2292			if v != nil {
2293				var importExportResponseProperties ImportExportResponseProperties
2294				err = json.Unmarshal(*v, &importExportResponseProperties)
2295				if err != nil {
2296					return err
2297				}
2298				ier.ImportExportResponseProperties = &importExportResponseProperties
2299			}
2300		case "id":
2301			if v != nil {
2302				var ID string
2303				err = json.Unmarshal(*v, &ID)
2304				if err != nil {
2305					return err
2306				}
2307				ier.ID = &ID
2308			}
2309		case "name":
2310			if v != nil {
2311				var name string
2312				err = json.Unmarshal(*v, &name)
2313				if err != nil {
2314					return err
2315				}
2316				ier.Name = &name
2317			}
2318		case "type":
2319			if v != nil {
2320				var typeVar string
2321				err = json.Unmarshal(*v, &typeVar)
2322				if err != nil {
2323					return err
2324				}
2325				ier.Type = &typeVar
2326			}
2327		}
2328	}
2329
2330	return nil
2331}
2332
2333// ImportExportResponseProperties response for Import/Export Status operation.
2334type ImportExportResponseProperties struct {
2335	// RequestType - READ-ONLY; The request type of the operation.
2336	RequestType *string `json:"requestType,omitempty"`
2337	// RequestID - READ-ONLY; The request type of the operation.
2338	RequestID *uuid.UUID `json:"requestId,omitempty"`
2339	// ServerName - READ-ONLY; The name of the server.
2340	ServerName *string `json:"serverName,omitempty"`
2341	// DatabaseName - READ-ONLY; The name of the database.
2342	DatabaseName *string `json:"databaseName,omitempty"`
2343	// Status - READ-ONLY; The status message returned from the server.
2344	Status *string `json:"status,omitempty"`
2345	// LastModifiedTime - READ-ONLY; The operation status last modified time.
2346	LastModifiedTime *string `json:"lastModifiedTime,omitempty"`
2347	// QueuedTime - READ-ONLY; The operation queued time.
2348	QueuedTime *string `json:"queuedTime,omitempty"`
2349	// BlobURI - READ-ONLY; The blob uri.
2350	BlobURI *string `json:"blobUri,omitempty"`
2351	// ErrorMessage - READ-ONLY; The error message returned from the server.
2352	ErrorMessage *string `json:"errorMessage,omitempty"`
2353}
2354
2355// ImportExtensionProperties represents the properties for an import operation
2356type ImportExtensionProperties struct {
2357	// OperationMode - The type of import operation being performed. This is always Import.
2358	OperationMode *string `json:"operationMode,omitempty"`
2359	// StorageKeyType - The type of the storage key to use. Possible values include: 'StorageAccessKey', 'SharedAccessKey'
2360	StorageKeyType StorageKeyType `json:"storageKeyType,omitempty"`
2361	// StorageKey - The storage key to use.  If storage key type is SharedAccessKey, it must be preceded with a "?."
2362	StorageKey *string `json:"storageKey,omitempty"`
2363	// StorageURI - The storage uri to use.
2364	StorageURI *string `json:"storageUri,omitempty"`
2365	// AdministratorLogin - The name of the SQL administrator.
2366	AdministratorLogin *string `json:"administratorLogin,omitempty"`
2367	// AdministratorLoginPassword - The password of the SQL administrator.
2368	AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"`
2369	// AuthenticationType - The authentication type. Possible values include: 'SQL', 'ADPassword'
2370	AuthenticationType AuthenticationType `json:"authenticationType,omitempty"`
2371}
2372
2373// ImportExtensionRequest import database parameters.
2374type ImportExtensionRequest struct {
2375	// Name - The name of the extension.
2376	Name *string `json:"name,omitempty"`
2377	// Type - The type of the extension.
2378	Type *string `json:"type,omitempty"`
2379	// ImportExtensionProperties - Represents the properties of the resource.
2380	*ImportExtensionProperties `json:"properties,omitempty"`
2381}
2382
2383// MarshalJSON is the custom marshaler for ImportExtensionRequest.
2384func (ier ImportExtensionRequest) MarshalJSON() ([]byte, error) {
2385	objectMap := make(map[string]interface{})
2386	if ier.Name != nil {
2387		objectMap["name"] = ier.Name
2388	}
2389	if ier.Type != nil {
2390		objectMap["type"] = ier.Type
2391	}
2392	if ier.ImportExtensionProperties != nil {
2393		objectMap["properties"] = ier.ImportExtensionProperties
2394	}
2395	return json.Marshal(objectMap)
2396}
2397
2398// UnmarshalJSON is the custom unmarshaler for ImportExtensionRequest struct.
2399func (ier *ImportExtensionRequest) UnmarshalJSON(body []byte) error {
2400	var m map[string]*json.RawMessage
2401	err := json.Unmarshal(body, &m)
2402	if err != nil {
2403		return err
2404	}
2405	for k, v := range m {
2406		switch k {
2407		case "name":
2408			if v != nil {
2409				var name string
2410				err = json.Unmarshal(*v, &name)
2411				if err != nil {
2412					return err
2413				}
2414				ier.Name = &name
2415			}
2416		case "type":
2417			if v != nil {
2418				var typeVar string
2419				err = json.Unmarshal(*v, &typeVar)
2420				if err != nil {
2421					return err
2422				}
2423				ier.Type = &typeVar
2424			}
2425		case "properties":
2426			if v != nil {
2427				var importExtensionProperties ImportExtensionProperties
2428				err = json.Unmarshal(*v, &importExtensionProperties)
2429				if err != nil {
2430					return err
2431				}
2432				ier.ImportExtensionProperties = &importExtensionProperties
2433			}
2434		}
2435	}
2436
2437	return nil
2438}
2439
2440// ImportRequest import database parameters.
2441type ImportRequest struct {
2442	// DatabaseName - The name of the database to import.
2443	DatabaseName *string `json:"databaseName,omitempty"`
2444	// Edition - The edition for the database being created.
2445	//
2446	// 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:
2447	//
2448	// ```azurecli
2449	// az sql db list-editions -l <location> -o table
2450	// ````
2451	//
2452	// ```powershell
2453	// Get-AzSqlServerServiceObjective -Location <location>
2454	// ````
2455	// . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'
2456	Edition DatabaseEdition `json:"edition,omitempty"`
2457	// 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'
2458	ServiceObjectiveName ServiceObjectiveName `json:"serviceObjectiveName,omitempty"`
2459	// MaxSizeBytes - The maximum size for the newly imported database.
2460	MaxSizeBytes *string `json:"maxSizeBytes,omitempty"`
2461	// StorageKeyType - The type of the storage key to use. Possible values include: 'StorageAccessKey', 'SharedAccessKey'
2462	StorageKeyType StorageKeyType `json:"storageKeyType,omitempty"`
2463	// StorageKey - The storage key to use.  If storage key type is SharedAccessKey, it must be preceded with a "?."
2464	StorageKey *string `json:"storageKey,omitempty"`
2465	// StorageURI - The storage uri to use.
2466	StorageURI *string `json:"storageUri,omitempty"`
2467	// AdministratorLogin - The name of the SQL administrator.
2468	AdministratorLogin *string `json:"administratorLogin,omitempty"`
2469	// AdministratorLoginPassword - The password of the SQL administrator.
2470	AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"`
2471	// AuthenticationType - The authentication type. Possible values include: 'SQL', 'ADPassword'
2472	AuthenticationType AuthenticationType `json:"authenticationType,omitempty"`
2473}
2474
2475// LocationCapabilities the capabilities for a location.
2476type LocationCapabilities struct {
2477	autorest.Response `json:"-"`
2478	// Name - READ-ONLY; The location name.
2479	Name *string `json:"name,omitempty"`
2480	// Status - READ-ONLY; Azure SQL Database's status for the location. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
2481	Status CapabilityStatus `json:"status,omitempty"`
2482	// SupportedServerVersions - READ-ONLY; The list of supported server versions.
2483	SupportedServerVersions *[]ServerVersionCapability `json:"supportedServerVersions,omitempty"`
2484}
2485
2486// MaxSizeCapability the maximum size limits for a database.
2487type MaxSizeCapability struct {
2488	// Limit - READ-ONLY; The maximum size of the database (see 'unit' for the units).
2489	Limit *int64 `json:"limit,omitempty"`
2490	// Unit - READ-ONLY; The units that the limit is expressed in. Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes'
2491	Unit MaxSizeUnits `json:"unit,omitempty"`
2492	// Status - READ-ONLY; The status of the maximum size capability. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
2493	Status CapabilityStatus `json:"status,omitempty"`
2494}
2495
2496// Metric database metrics.
2497type Metric struct {
2498	// StartTime - READ-ONLY; The start time for the metric (ISO-8601 format).
2499	StartTime *date.Time `json:"startTime,omitempty"`
2500	// EndTime - READ-ONLY; The end time for the metric (ISO-8601 format).
2501	EndTime *date.Time `json:"endTime,omitempty"`
2502	// TimeGrain - READ-ONLY; The time step to be used to summarize the metric values.
2503	TimeGrain *string `json:"timeGrain,omitempty"`
2504	// Unit - READ-ONLY; The unit of the metric. Possible values include: 'UnitTypeCount', 'UnitTypeBytes', 'UnitTypeSeconds', 'UnitTypePercent', 'UnitTypeCountPerSecond', 'UnitTypeBytesPerSecond'
2505	Unit UnitType `json:"unit,omitempty"`
2506	// Name - READ-ONLY; The name information for the metric.
2507	Name *MetricName `json:"name,omitempty"`
2508	// MetricValues - READ-ONLY; The metric values for the specified time window and timestep.
2509	MetricValues *[]MetricValue `json:"metricValues,omitempty"`
2510}
2511
2512// MetricAvailability a metric availability value.
2513type MetricAvailability struct {
2514	// Retention - READ-ONLY; The length of retention for the database metric.
2515	Retention *string `json:"retention,omitempty"`
2516	// TimeGrain - READ-ONLY; The granularity of the database metric.
2517	TimeGrain *string `json:"timeGrain,omitempty"`
2518}
2519
2520// MetricDefinition a database metric definition.
2521type MetricDefinition struct {
2522	// Name - READ-ONLY; The name information for the metric.
2523	Name *MetricName `json:"name,omitempty"`
2524	// PrimaryAggregationType - READ-ONLY; The primary aggregation type defining how metric values are displayed. Possible values include: 'PrimaryAggregationTypeNone', 'PrimaryAggregationTypeAverage', 'PrimaryAggregationTypeCount', 'PrimaryAggregationTypeMinimum', 'PrimaryAggregationTypeMaximum', 'PrimaryAggregationTypeTotal'
2525	PrimaryAggregationType PrimaryAggregationType `json:"primaryAggregationType,omitempty"`
2526	// ResourceURI - READ-ONLY; The resource uri of the database.
2527	ResourceURI *string `json:"resourceUri,omitempty"`
2528	// Unit - READ-ONLY; The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond'
2529	Unit UnitDefinitionType `json:"unit,omitempty"`
2530	// MetricAvailabilities - READ-ONLY; The list of database metric availabilities for the metric.
2531	MetricAvailabilities *[]MetricAvailability `json:"metricAvailabilities,omitempty"`
2532}
2533
2534// MetricDefinitionListResult the response to a list database metric definitions request.
2535type MetricDefinitionListResult struct {
2536	autorest.Response `json:"-"`
2537	// Value - The list of metric definitions for the database.
2538	Value *[]MetricDefinition `json:"value,omitempty"`
2539}
2540
2541// MetricListResult the response to a list database metrics request.
2542type MetricListResult struct {
2543	autorest.Response `json:"-"`
2544	// Value - The list of metrics for the database.
2545	Value *[]Metric `json:"value,omitempty"`
2546}
2547
2548// MetricName a database metric name.
2549type MetricName struct {
2550	// Value - READ-ONLY; The name of the database metric.
2551	Value *string `json:"value,omitempty"`
2552	// LocalizedValue - READ-ONLY; The friendly name of the database metric.
2553	LocalizedValue *string `json:"localizedValue,omitempty"`
2554}
2555
2556// MetricValue represents database metrics.
2557type MetricValue struct {
2558	// Count - READ-ONLY; The number of values for the metric.
2559	Count *float64 `json:"count,omitempty"`
2560	// Average - READ-ONLY; The average value of the metric.
2561	Average *float64 `json:"average,omitempty"`
2562	// Maximum - READ-ONLY; The max value of the metric.
2563	Maximum *float64 `json:"maximum,omitempty"`
2564	// Minimum - READ-ONLY; The min value of the metric.
2565	Minimum *float64 `json:"minimum,omitempty"`
2566	// Timestamp - READ-ONLY; The metric timestamp (ISO-8601 format).
2567	Timestamp *date.Time `json:"timestamp,omitempty"`
2568	// Total - READ-ONLY; The total value of the metric.
2569	Total *float64 `json:"total,omitempty"`
2570}
2571
2572// Operation SQL REST API operation definition.
2573type Operation struct {
2574	// Name - Operation name: {provider}/{resource}/{operation}
2575	Name *string `json:"name,omitempty"`
2576	// Display - Display metadata associated with the operation.
2577	Display *OperationDisplay `json:"display,omitempty"`
2578}
2579
2580// OperationDisplay display metadata associated with the operation.
2581type OperationDisplay struct {
2582	// Provider - Service provider: Microsoft SQL Database.
2583	Provider *string `json:"provider,omitempty"`
2584	// Resource - Resource on which the operation is performed: Server, Database, etc.
2585	Resource *string `json:"resource,omitempty"`
2586	// Operation - Type of operation: get, read, delete, etc.
2587	Operation *string `json:"operation,omitempty"`
2588}
2589
2590// OperationImpact the impact of an operation, both in absolute and relative terms.
2591type OperationImpact struct {
2592	// Name - READ-ONLY; The name of the impact dimension.
2593	Name *string `json:"name,omitempty"`
2594	// Unit - READ-ONLY; The unit in which estimated impact to dimension is measured.
2595	Unit *string `json:"unit,omitempty"`
2596	// ChangeValueAbsolute - READ-ONLY; The absolute impact to dimension.
2597	ChangeValueAbsolute *float64 `json:"changeValueAbsolute,omitempty"`
2598	// ChangeValueRelative - READ-ONLY; The relative impact to dimension (null if not applicable)
2599	ChangeValueRelative *float64 `json:"changeValueRelative,omitempty"`
2600}
2601
2602// OperationListResult result of the request to list SQL operations. It contains a list of operations and a
2603// URL link to get the next set of results.
2604type OperationListResult struct {
2605	autorest.Response `json:"-"`
2606	// Value - List of SQL operations supported by the SQL resource provider.
2607	Value *[]Operation `json:"value,omitempty"`
2608	// NextLink - URL to get the next set of operation list results if there are any.
2609	NextLink *string `json:"nextLink,omitempty"`
2610}
2611
2612// PerformanceLevel a possible performance level of a service objective capability.
2613type PerformanceLevel struct {
2614	// Unit - READ-ONLY; Unit type used to measure service objective performance level. Possible values include: 'DTU'
2615	Unit PerformanceLevelUnit `json:"unit,omitempty"`
2616	// Value - READ-ONLY; Performance level value.
2617	Value *int32 `json:"value,omitempty"`
2618}
2619
2620// ProxyResource ARM proxy resource.
2621type ProxyResource struct {
2622	// ID - READ-ONLY; Resource ID.
2623	ID *string `json:"id,omitempty"`
2624	// Name - READ-ONLY; Resource name.
2625	Name *string `json:"name,omitempty"`
2626	// Type - READ-ONLY; Resource type.
2627	Type *string `json:"type,omitempty"`
2628}
2629
2630// QueryInterval a database query.
2631type QueryInterval struct {
2632	// IntervalStartTime - READ-ONLY; The start time of the measurement interval (ISO8601 format).
2633	IntervalStartTime *date.Time `json:"intervalStartTime,omitempty"`
2634	// ExecutionCount - READ-ONLY; The number of times the query was executed during this interval.
2635	ExecutionCount *float64 `json:"executionCount,omitempty"`
2636	// Metrics - READ-ONLY; The list of query metrics during this interval.
2637	Metrics *[]QueryMetric `json:"metrics,omitempty"`
2638}
2639
2640// QueryMetric a database query.
2641type QueryMetric struct {
2642	// Name - READ-ONLY; The name of the metric
2643	Name *string `json:"name,omitempty"`
2644	// DisplayName - READ-ONLY; The name of the metric for display in user interface
2645	DisplayName *string `json:"displayName,omitempty"`
2646	// Unit - READ-ONLY; The unit of measurement. Possible values include: 'Percentage', 'KB', 'Microseconds'
2647	Unit QueryMetricUnit `json:"unit,omitempty"`
2648	// Value - READ-ONLY; The measured value
2649	Value *float64 `json:"value,omitempty"`
2650}
2651
2652// QueryStatistic a database query.
2653type QueryStatistic struct {
2654	// QueryID - READ-ONLY; The id of the query
2655	QueryID *string `json:"queryId,omitempty"`
2656	// Intervals - READ-ONLY; The list of query intervals.
2657	Intervals *[]QueryInterval `json:"intervals,omitempty"`
2658}
2659
2660// QueryStatisticListResult represents the response to a get query request.
2661type QueryStatisticListResult struct {
2662	autorest.Response `json:"-"`
2663	// Value - The query.
2664	Value *[]QueryStatistic `json:"value,omitempty"`
2665}
2666
2667// QueryText ...
2668type QueryText struct {
2669	// Name - READ-ONLY; Resource name.
2670	Name *string `json:"name,omitempty"`
2671	// Type - READ-ONLY; Resource type.
2672	Type *string `json:"type,omitempty"`
2673	// QueryText - READ-ONLY; Query text.
2674	QueryText *string `json:"queryText,omitempty"`
2675}
2676
2677// QueryTextListResult represents the response to a get query text request.
2678type QueryTextListResult struct {
2679	autorest.Response `json:"-"`
2680	// Value - The query text.
2681	Value *[]QueryText `json:"value,omitempty"`
2682}
2683
2684// RecommendedElasticPool represents a recommended elastic pool.
2685type RecommendedElasticPool struct {
2686	autorest.Response `json:"-"`
2687	// RecommendedElasticPoolProperties - The properties representing the resource.
2688	*RecommendedElasticPoolProperties `json:"properties,omitempty"`
2689	// ID - READ-ONLY; Resource ID.
2690	ID *string `json:"id,omitempty"`
2691	// Name - READ-ONLY; Resource name.
2692	Name *string `json:"name,omitempty"`
2693	// Type - READ-ONLY; Resource type.
2694	Type *string `json:"type,omitempty"`
2695}
2696
2697// MarshalJSON is the custom marshaler for RecommendedElasticPool.
2698func (rep RecommendedElasticPool) MarshalJSON() ([]byte, error) {
2699	objectMap := make(map[string]interface{})
2700	if rep.RecommendedElasticPoolProperties != nil {
2701		objectMap["properties"] = rep.RecommendedElasticPoolProperties
2702	}
2703	return json.Marshal(objectMap)
2704}
2705
2706// UnmarshalJSON is the custom unmarshaler for RecommendedElasticPool struct.
2707func (rep *RecommendedElasticPool) UnmarshalJSON(body []byte) error {
2708	var m map[string]*json.RawMessage
2709	err := json.Unmarshal(body, &m)
2710	if err != nil {
2711		return err
2712	}
2713	for k, v := range m {
2714		switch k {
2715		case "properties":
2716			if v != nil {
2717				var recommendedElasticPoolProperties RecommendedElasticPoolProperties
2718				err = json.Unmarshal(*v, &recommendedElasticPoolProperties)
2719				if err != nil {
2720					return err
2721				}
2722				rep.RecommendedElasticPoolProperties = &recommendedElasticPoolProperties
2723			}
2724		case "id":
2725			if v != nil {
2726				var ID string
2727				err = json.Unmarshal(*v, &ID)
2728				if err != nil {
2729					return err
2730				}
2731				rep.ID = &ID
2732			}
2733		case "name":
2734			if v != nil {
2735				var name string
2736				err = json.Unmarshal(*v, &name)
2737				if err != nil {
2738					return err
2739				}
2740				rep.Name = &name
2741			}
2742		case "type":
2743			if v != nil {
2744				var typeVar string
2745				err = json.Unmarshal(*v, &typeVar)
2746				if err != nil {
2747					return err
2748				}
2749				rep.Type = &typeVar
2750			}
2751		}
2752	}
2753
2754	return nil
2755}
2756
2757// RecommendedElasticPoolListMetricsResult represents the response to a list recommended elastic pool
2758// metrics request.
2759type RecommendedElasticPoolListMetricsResult struct {
2760	autorest.Response `json:"-"`
2761	// Value - The list of recommended elastic pools metrics.
2762	Value *[]RecommendedElasticPoolMetric `json:"value,omitempty"`
2763}
2764
2765// RecommendedElasticPoolListResult represents the response to a list recommended elastic pool request.
2766type RecommendedElasticPoolListResult struct {
2767	autorest.Response `json:"-"`
2768	// Value - The list of recommended elastic pools hosted in the server.
2769	Value *[]RecommendedElasticPool `json:"value,omitempty"`
2770}
2771
2772// RecommendedElasticPoolMetric represents recommended elastic pool metric.
2773type RecommendedElasticPoolMetric struct {
2774	// DateTime - The time of metric (ISO8601 format).
2775	DateTime *date.Time `json:"dateTime,omitempty"`
2776	// Dtu - Gets or sets the DTUs (Database Transaction Units). See https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/
2777	Dtu *float64 `json:"dtu,omitempty"`
2778	// SizeGB - Gets or sets size in gigabytes.
2779	SizeGB *float64 `json:"sizeGB,omitempty"`
2780}
2781
2782// RecommendedElasticPoolProperties represents the properties of a recommended elastic pool.
2783type RecommendedElasticPoolProperties struct {
2784	// DatabaseEdition - READ-ONLY; The edition of the recommended elastic pool. The ElasticPoolEdition enumeration contains all the valid editions. Possible values include: 'ElasticPoolEditionBasic', 'ElasticPoolEditionStandard', 'ElasticPoolEditionPremium', 'ElasticPoolEditionGeneralPurpose', 'ElasticPoolEditionBusinessCritical'
2785	DatabaseEdition ElasticPoolEdition `json:"databaseEdition,omitempty"`
2786	// Dtu - The DTU for the recommended elastic pool.
2787	Dtu *float64 `json:"dtu,omitempty"`
2788	// DatabaseDtuMin - The minimum DTU for the database.
2789	DatabaseDtuMin *float64 `json:"databaseDtuMin,omitempty"`
2790	// DatabaseDtuMax - The maximum DTU for the database.
2791	DatabaseDtuMax *float64 `json:"databaseDtuMax,omitempty"`
2792	// StorageMB - Gets storage size in megabytes.
2793	StorageMB *float64 `json:"storageMB,omitempty"`
2794	// ObservationPeriodStart - READ-ONLY; The observation period start (ISO8601 format).
2795	ObservationPeriodStart *date.Time `json:"observationPeriodStart,omitempty"`
2796	// ObservationPeriodEnd - READ-ONLY; The observation period start (ISO8601 format).
2797	ObservationPeriodEnd *date.Time `json:"observationPeriodEnd,omitempty"`
2798	// MaxObservedDtu - READ-ONLY; Gets maximum observed DTU.
2799	MaxObservedDtu *float64 `json:"maxObservedDtu,omitempty"`
2800	// MaxObservedStorageMB - READ-ONLY; Gets maximum observed storage in megabytes.
2801	MaxObservedStorageMB *float64 `json:"maxObservedStorageMB,omitempty"`
2802	// Databases - READ-ONLY; The list of databases in this pool. Expanded property
2803	Databases *[]Database `json:"databases,omitempty"`
2804	// Metrics - READ-ONLY; The list of databases housed in the server. Expanded property
2805	Metrics *[]RecommendedElasticPoolMetric `json:"metrics,omitempty"`
2806}
2807
2808// MarshalJSON is the custom marshaler for RecommendedElasticPoolProperties.
2809func (repp RecommendedElasticPoolProperties) MarshalJSON() ([]byte, error) {
2810	objectMap := make(map[string]interface{})
2811	if repp.Dtu != nil {
2812		objectMap["dtu"] = repp.Dtu
2813	}
2814	if repp.DatabaseDtuMin != nil {
2815		objectMap["databaseDtuMin"] = repp.DatabaseDtuMin
2816	}
2817	if repp.DatabaseDtuMax != nil {
2818		objectMap["databaseDtuMax"] = repp.DatabaseDtuMax
2819	}
2820	if repp.StorageMB != nil {
2821		objectMap["storageMB"] = repp.StorageMB
2822	}
2823	return json.Marshal(objectMap)
2824}
2825
2826// RecommendedIndex represents a database recommended index.
2827type RecommendedIndex struct {
2828	// RecommendedIndexProperties - READ-ONLY; The properties representing the resource.
2829	*RecommendedIndexProperties `json:"properties,omitempty"`
2830	// ID - READ-ONLY; Resource ID.
2831	ID *string `json:"id,omitempty"`
2832	// Name - READ-ONLY; Resource name.
2833	Name *string `json:"name,omitempty"`
2834	// Type - READ-ONLY; Resource type.
2835	Type *string `json:"type,omitempty"`
2836}
2837
2838// MarshalJSON is the custom marshaler for RecommendedIndex.
2839func (ri RecommendedIndex) MarshalJSON() ([]byte, error) {
2840	objectMap := make(map[string]interface{})
2841	return json.Marshal(objectMap)
2842}
2843
2844// UnmarshalJSON is the custom unmarshaler for RecommendedIndex struct.
2845func (ri *RecommendedIndex) UnmarshalJSON(body []byte) error {
2846	var m map[string]*json.RawMessage
2847	err := json.Unmarshal(body, &m)
2848	if err != nil {
2849		return err
2850	}
2851	for k, v := range m {
2852		switch k {
2853		case "properties":
2854			if v != nil {
2855				var recommendedIndexProperties RecommendedIndexProperties
2856				err = json.Unmarshal(*v, &recommendedIndexProperties)
2857				if err != nil {
2858					return err
2859				}
2860				ri.RecommendedIndexProperties = &recommendedIndexProperties
2861			}
2862		case "id":
2863			if v != nil {
2864				var ID string
2865				err = json.Unmarshal(*v, &ID)
2866				if err != nil {
2867					return err
2868				}
2869				ri.ID = &ID
2870			}
2871		case "name":
2872			if v != nil {
2873				var name string
2874				err = json.Unmarshal(*v, &name)
2875				if err != nil {
2876					return err
2877				}
2878				ri.Name = &name
2879			}
2880		case "type":
2881			if v != nil {
2882				var typeVar string
2883				err = json.Unmarshal(*v, &typeVar)
2884				if err != nil {
2885					return err
2886				}
2887				ri.Type = &typeVar
2888			}
2889		}
2890	}
2891
2892	return nil
2893}
2894
2895// RecommendedIndexProperties represents the properties of a database recommended index.
2896type RecommendedIndexProperties struct {
2897	// 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'
2898	Action RecommendedIndexAction `json:"action,omitempty"`
2899	// State - READ-ONLY; The current recommendation state. Possible values include: 'Active', 'Pending', 'Executing', 'Verifying', 'PendingRevert', 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success'
2900	State RecommendedIndexState `json:"state,omitempty"`
2901	// Created - READ-ONLY; The UTC datetime showing when this resource was created (ISO8601 format).
2902	Created *date.Time `json:"created,omitempty"`
2903	// LastModified - READ-ONLY; The UTC datetime of when was this resource last changed (ISO8601 format).
2904	LastModified *date.Time `json:"lastModified,omitempty"`
2905	// IndexType - READ-ONLY; The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTEREDCOLUMNSTORE'
2906	IndexType RecommendedIndexType `json:"indexType,omitempty"`
2907	// Schema - READ-ONLY; The schema where table to build index over resides
2908	Schema *string `json:"schema,omitempty"`
2909	// Table - READ-ONLY; The table on which to build index.
2910	Table *string `json:"table,omitempty"`
2911	// Columns - READ-ONLY; Columns over which to build index
2912	Columns *[]string `json:"columns,omitempty"`
2913	// IncludedColumns - READ-ONLY; The list of column names to be included in the index
2914	IncludedColumns *[]string `json:"includedColumns,omitempty"`
2915	// IndexScript - READ-ONLY; The full build index script
2916	IndexScript *string `json:"indexScript,omitempty"`
2917	// EstimatedImpact - READ-ONLY; The estimated impact of doing recommended index action.
2918	EstimatedImpact *[]OperationImpact `json:"estimatedImpact,omitempty"`
2919	// ReportedImpact - READ-ONLY; The values reported after index action is complete.
2920	ReportedImpact *[]OperationImpact `json:"reportedImpact,omitempty"`
2921}
2922
2923// RecoverableDatabase a recoverable database
2924type RecoverableDatabase struct {
2925	autorest.Response `json:"-"`
2926	// RecoverableDatabaseProperties - The properties of a recoverable database
2927	*RecoverableDatabaseProperties `json:"properties,omitempty"`
2928	// ID - READ-ONLY; Resource ID.
2929	ID *string `json:"id,omitempty"`
2930	// Name - READ-ONLY; Resource name.
2931	Name *string `json:"name,omitempty"`
2932	// Type - READ-ONLY; Resource type.
2933	Type *string `json:"type,omitempty"`
2934}
2935
2936// MarshalJSON is the custom marshaler for RecoverableDatabase.
2937func (rd RecoverableDatabase) MarshalJSON() ([]byte, error) {
2938	objectMap := make(map[string]interface{})
2939	if rd.RecoverableDatabaseProperties != nil {
2940		objectMap["properties"] = rd.RecoverableDatabaseProperties
2941	}
2942	return json.Marshal(objectMap)
2943}
2944
2945// UnmarshalJSON is the custom unmarshaler for RecoverableDatabase struct.
2946func (rd *RecoverableDatabase) UnmarshalJSON(body []byte) error {
2947	var m map[string]*json.RawMessage
2948	err := json.Unmarshal(body, &m)
2949	if err != nil {
2950		return err
2951	}
2952	for k, v := range m {
2953		switch k {
2954		case "properties":
2955			if v != nil {
2956				var recoverableDatabaseProperties RecoverableDatabaseProperties
2957				err = json.Unmarshal(*v, &recoverableDatabaseProperties)
2958				if err != nil {
2959					return err
2960				}
2961				rd.RecoverableDatabaseProperties = &recoverableDatabaseProperties
2962			}
2963		case "id":
2964			if v != nil {
2965				var ID string
2966				err = json.Unmarshal(*v, &ID)
2967				if err != nil {
2968					return err
2969				}
2970				rd.ID = &ID
2971			}
2972		case "name":
2973			if v != nil {
2974				var name string
2975				err = json.Unmarshal(*v, &name)
2976				if err != nil {
2977					return err
2978				}
2979				rd.Name = &name
2980			}
2981		case "type":
2982			if v != nil {
2983				var typeVar string
2984				err = json.Unmarshal(*v, &typeVar)
2985				if err != nil {
2986					return err
2987				}
2988				rd.Type = &typeVar
2989			}
2990		}
2991	}
2992
2993	return nil
2994}
2995
2996// RecoverableDatabaseListResult the response to a list recoverable databases request
2997type RecoverableDatabaseListResult struct {
2998	autorest.Response `json:"-"`
2999	// Value - A list of recoverable databases
3000	Value *[]RecoverableDatabase `json:"value,omitempty"`
3001}
3002
3003// RecoverableDatabaseProperties the properties of a recoverable database
3004type RecoverableDatabaseProperties struct {
3005	// Edition - READ-ONLY; The edition of the database
3006	Edition *string `json:"edition,omitempty"`
3007	// ServiceLevelObjective - READ-ONLY; The service level objective name of the database
3008	ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"`
3009	// ElasticPoolName - READ-ONLY; The elastic pool name of the database
3010	ElasticPoolName *string `json:"elasticPoolName,omitempty"`
3011	// LastAvailableBackupDate - READ-ONLY; The last available backup date of the database (ISO8601 format)
3012	LastAvailableBackupDate *date.Time `json:"lastAvailableBackupDate,omitempty"`
3013}
3014
3015// ReplicationLink represents a database replication link.
3016type ReplicationLink struct {
3017	autorest.Response `json:"-"`
3018	// Location - READ-ONLY; Location of the server that contains this firewall rule.
3019	Location *string `json:"location,omitempty"`
3020	// ReplicationLinkProperties - The properties representing the resource.
3021	*ReplicationLinkProperties `json:"properties,omitempty"`
3022	// ID - READ-ONLY; Resource ID.
3023	ID *string `json:"id,omitempty"`
3024	// Name - READ-ONLY; Resource name.
3025	Name *string `json:"name,omitempty"`
3026	// Type - READ-ONLY; Resource type.
3027	Type *string `json:"type,omitempty"`
3028}
3029
3030// MarshalJSON is the custom marshaler for ReplicationLink.
3031func (rl ReplicationLink) MarshalJSON() ([]byte, error) {
3032	objectMap := make(map[string]interface{})
3033	if rl.ReplicationLinkProperties != nil {
3034		objectMap["properties"] = rl.ReplicationLinkProperties
3035	}
3036	return json.Marshal(objectMap)
3037}
3038
3039// UnmarshalJSON is the custom unmarshaler for ReplicationLink struct.
3040func (rl *ReplicationLink) UnmarshalJSON(body []byte) error {
3041	var m map[string]*json.RawMessage
3042	err := json.Unmarshal(body, &m)
3043	if err != nil {
3044		return err
3045	}
3046	for k, v := range m {
3047		switch k {
3048		case "location":
3049			if v != nil {
3050				var location string
3051				err = json.Unmarshal(*v, &location)
3052				if err != nil {
3053					return err
3054				}
3055				rl.Location = &location
3056			}
3057		case "properties":
3058			if v != nil {
3059				var replicationLinkProperties ReplicationLinkProperties
3060				err = json.Unmarshal(*v, &replicationLinkProperties)
3061				if err != nil {
3062					return err
3063				}
3064				rl.ReplicationLinkProperties = &replicationLinkProperties
3065			}
3066		case "id":
3067			if v != nil {
3068				var ID string
3069				err = json.Unmarshal(*v, &ID)
3070				if err != nil {
3071					return err
3072				}
3073				rl.ID = &ID
3074			}
3075		case "name":
3076			if v != nil {
3077				var name string
3078				err = json.Unmarshal(*v, &name)
3079				if err != nil {
3080					return err
3081				}
3082				rl.Name = &name
3083			}
3084		case "type":
3085			if v != nil {
3086				var typeVar string
3087				err = json.Unmarshal(*v, &typeVar)
3088				if err != nil {
3089					return err
3090				}
3091				rl.Type = &typeVar
3092			}
3093		}
3094	}
3095
3096	return nil
3097}
3098
3099// ReplicationLinkListResult represents the response to a List database replication link request.
3100type ReplicationLinkListResult struct {
3101	autorest.Response `json:"-"`
3102	// Value - The list of database replication links housed in the database.
3103	Value *[]ReplicationLink `json:"value,omitempty"`
3104}
3105
3106// ReplicationLinkProperties represents the properties of a database replication link.
3107type ReplicationLinkProperties struct {
3108	// IsTerminationAllowed - READ-ONLY; Legacy value indicating whether termination is allowed.  Currently always returns true.
3109	IsTerminationAllowed *bool `json:"isTerminationAllowed,omitempty"`
3110	// ReplicationMode - READ-ONLY; Replication mode of this replication link.
3111	ReplicationMode *string `json:"replicationMode,omitempty"`
3112	// PartnerServer - READ-ONLY; The name of the server hosting the partner database.
3113	PartnerServer *string `json:"partnerServer,omitempty"`
3114	// PartnerDatabase - READ-ONLY; The name of the partner database.
3115	PartnerDatabase *string `json:"partnerDatabase,omitempty"`
3116	// PartnerLocation - READ-ONLY; The Azure Region of the partner database.
3117	PartnerLocation *string `json:"partnerLocation,omitempty"`
3118	// Role - READ-ONLY; The role of the database in the replication link. Possible values include: 'ReplicationRolePrimary', 'ReplicationRoleSecondary', 'ReplicationRoleNonReadableSecondary', 'ReplicationRoleSource', 'ReplicationRoleCopy'
3119	Role ReplicationRole `json:"role,omitempty"`
3120	// PartnerRole - READ-ONLY; The role of the partner database in the replication link. Possible values include: 'ReplicationRolePrimary', 'ReplicationRoleSecondary', 'ReplicationRoleNonReadableSecondary', 'ReplicationRoleSource', 'ReplicationRoleCopy'
3121	PartnerRole ReplicationRole `json:"partnerRole,omitempty"`
3122	// StartTime - READ-ONLY; The start time for the replication link.
3123	StartTime *date.Time `json:"startTime,omitempty"`
3124	// PercentComplete - READ-ONLY; The percentage of seeding complete for the replication link.
3125	PercentComplete *int32 `json:"percentComplete,omitempty"`
3126	// ReplicationState - READ-ONLY; The replication state for the replication link. Possible values include: 'PENDING', 'SEEDING', 'CATCHUP', 'SUSPENDED'
3127	ReplicationState ReplicationState `json:"replicationState,omitempty"`
3128}
3129
3130// ReplicationLinksFailoverAllowDataLossFuture an abstraction for monitoring and retrieving the results of
3131// a long-running operation.
3132type ReplicationLinksFailoverAllowDataLossFuture struct {
3133	azure.FutureAPI
3134	// Result returns the result of the asynchronous operation.
3135	// If the operation has not completed it will return an error.
3136	Result func(ReplicationLinksClient) (autorest.Response, error)
3137}
3138
3139// ReplicationLinksFailoverFuture an abstraction for monitoring and retrieving the results of a
3140// long-running operation.
3141type ReplicationLinksFailoverFuture struct {
3142	azure.FutureAPI
3143	// Result returns the result of the asynchronous operation.
3144	// If the operation has not completed it will return an error.
3145	Result func(ReplicationLinksClient) (autorest.Response, error)
3146}
3147
3148// ReplicationLinksUnlinkFuture an abstraction for monitoring and retrieving the results of a long-running
3149// operation.
3150type ReplicationLinksUnlinkFuture struct {
3151	azure.FutureAPI
3152	// Result returns the result of the asynchronous operation.
3153	// If the operation has not completed it will return an error.
3154	Result func(ReplicationLinksClient) (autorest.Response, error)
3155}
3156
3157// Resource ARM resource.
3158type Resource struct {
3159	// ID - READ-ONLY; Resource ID.
3160	ID *string `json:"id,omitempty"`
3161	// Name - READ-ONLY; Resource name.
3162	Name *string `json:"name,omitempty"`
3163	// Type - READ-ONLY; Resource type.
3164	Type *string `json:"type,omitempty"`
3165}
3166
3167// RestorableDroppedDatabase a restorable dropped database
3168type RestorableDroppedDatabase struct {
3169	autorest.Response `json:"-"`
3170	// Location - READ-ONLY; The geo-location where the resource lives
3171	Location *string `json:"location,omitempty"`
3172	// RestorableDroppedDatabaseProperties - The properties of a restorable dropped database
3173	*RestorableDroppedDatabaseProperties `json:"properties,omitempty"`
3174	// ID - READ-ONLY; Resource ID.
3175	ID *string `json:"id,omitempty"`
3176	// Name - READ-ONLY; Resource name.
3177	Name *string `json:"name,omitempty"`
3178	// Type - READ-ONLY; Resource type.
3179	Type *string `json:"type,omitempty"`
3180}
3181
3182// MarshalJSON is the custom marshaler for RestorableDroppedDatabase.
3183func (rdd RestorableDroppedDatabase) MarshalJSON() ([]byte, error) {
3184	objectMap := make(map[string]interface{})
3185	if rdd.RestorableDroppedDatabaseProperties != nil {
3186		objectMap["properties"] = rdd.RestorableDroppedDatabaseProperties
3187	}
3188	return json.Marshal(objectMap)
3189}
3190
3191// UnmarshalJSON is the custom unmarshaler for RestorableDroppedDatabase struct.
3192func (rdd *RestorableDroppedDatabase) UnmarshalJSON(body []byte) error {
3193	var m map[string]*json.RawMessage
3194	err := json.Unmarshal(body, &m)
3195	if err != nil {
3196		return err
3197	}
3198	for k, v := range m {
3199		switch k {
3200		case "location":
3201			if v != nil {
3202				var location string
3203				err = json.Unmarshal(*v, &location)
3204				if err != nil {
3205					return err
3206				}
3207				rdd.Location = &location
3208			}
3209		case "properties":
3210			if v != nil {
3211				var restorableDroppedDatabaseProperties RestorableDroppedDatabaseProperties
3212				err = json.Unmarshal(*v, &restorableDroppedDatabaseProperties)
3213				if err != nil {
3214					return err
3215				}
3216				rdd.RestorableDroppedDatabaseProperties = &restorableDroppedDatabaseProperties
3217			}
3218		case "id":
3219			if v != nil {
3220				var ID string
3221				err = json.Unmarshal(*v, &ID)
3222				if err != nil {
3223					return err
3224				}
3225				rdd.ID = &ID
3226			}
3227		case "name":
3228			if v != nil {
3229				var name string
3230				err = json.Unmarshal(*v, &name)
3231				if err != nil {
3232					return err
3233				}
3234				rdd.Name = &name
3235			}
3236		case "type":
3237			if v != nil {
3238				var typeVar string
3239				err = json.Unmarshal(*v, &typeVar)
3240				if err != nil {
3241					return err
3242				}
3243				rdd.Type = &typeVar
3244			}
3245		}
3246	}
3247
3248	return nil
3249}
3250
3251// RestorableDroppedDatabaseListResult the response to a list restorable dropped databases request
3252type RestorableDroppedDatabaseListResult struct {
3253	autorest.Response `json:"-"`
3254	// Value - A list of restorable dropped databases
3255	Value *[]RestorableDroppedDatabase `json:"value,omitempty"`
3256}
3257
3258// RestorableDroppedDatabaseProperties the properties of a restorable dropped database
3259type RestorableDroppedDatabaseProperties struct {
3260	// DatabaseName - READ-ONLY; The name of the database
3261	DatabaseName *string `json:"databaseName,omitempty"`
3262	// Edition - READ-ONLY; The edition of the database
3263	Edition *string `json:"edition,omitempty"`
3264	// MaxSizeBytes - READ-ONLY; The max size in bytes of the database
3265	MaxSizeBytes *string `json:"maxSizeBytes,omitempty"`
3266	// ServiceLevelObjective - READ-ONLY; The service level objective name of the database
3267	ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"`
3268	// ElasticPoolName - READ-ONLY; The elastic pool name of the database
3269	ElasticPoolName *string `json:"elasticPoolName,omitempty"`
3270	// CreationDate - READ-ONLY; The creation date of the database (ISO8601 format)
3271	CreationDate *date.Time `json:"creationDate,omitempty"`
3272	// DeletionDate - READ-ONLY; The deletion date of the database (ISO8601 format)
3273	DeletionDate *date.Time `json:"deletionDate,omitempty"`
3274	// EarliestRestoreDate - READ-ONLY; The earliest restore date of the database (ISO8601 format)
3275	EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"`
3276}
3277
3278// RestorePoint a database restore point.
3279type RestorePoint struct {
3280	// RestorePointProperties - The properties of the restore point.
3281	*RestorePointProperties `json:"properties,omitempty"`
3282	// ID - READ-ONLY; Resource ID.
3283	ID *string `json:"id,omitempty"`
3284	// Name - READ-ONLY; Resource name.
3285	Name *string `json:"name,omitempty"`
3286	// Type - READ-ONLY; Resource type.
3287	Type *string `json:"type,omitempty"`
3288}
3289
3290// MarshalJSON is the custom marshaler for RestorePoint.
3291func (rp RestorePoint) MarshalJSON() ([]byte, error) {
3292	objectMap := make(map[string]interface{})
3293	if rp.RestorePointProperties != nil {
3294		objectMap["properties"] = rp.RestorePointProperties
3295	}
3296	return json.Marshal(objectMap)
3297}
3298
3299// UnmarshalJSON is the custom unmarshaler for RestorePoint struct.
3300func (rp *RestorePoint) UnmarshalJSON(body []byte) error {
3301	var m map[string]*json.RawMessage
3302	err := json.Unmarshal(body, &m)
3303	if err != nil {
3304		return err
3305	}
3306	for k, v := range m {
3307		switch k {
3308		case "properties":
3309			if v != nil {
3310				var restorePointProperties RestorePointProperties
3311				err = json.Unmarshal(*v, &restorePointProperties)
3312				if err != nil {
3313					return err
3314				}
3315				rp.RestorePointProperties = &restorePointProperties
3316			}
3317		case "id":
3318			if v != nil {
3319				var ID string
3320				err = json.Unmarshal(*v, &ID)
3321				if err != nil {
3322					return err
3323				}
3324				rp.ID = &ID
3325			}
3326		case "name":
3327			if v != nil {
3328				var name string
3329				err = json.Unmarshal(*v, &name)
3330				if err != nil {
3331					return err
3332				}
3333				rp.Name = &name
3334			}
3335		case "type":
3336			if v != nil {
3337				var typeVar string
3338				err = json.Unmarshal(*v, &typeVar)
3339				if err != nil {
3340					return err
3341				}
3342				rp.Type = &typeVar
3343			}
3344		}
3345	}
3346
3347	return nil
3348}
3349
3350// RestorePointListResult the response to a list database restore points request.
3351type RestorePointListResult struct {
3352	autorest.Response `json:"-"`
3353	// Value - The list of database restore points.
3354	Value *[]RestorePoint `json:"value,omitempty"`
3355}
3356
3357// RestorePointProperties represents the properties of a database restore point.
3358type RestorePointProperties struct {
3359	// RestorePointType - READ-ONLY; The restore point type of the database restore point. Possible values include: 'DISCRETE', 'CONTINUOUS'
3360	RestorePointType RestorePointType `json:"restorePointType,omitempty"`
3361	// RestorePointCreationDate - READ-ONLY; Restore point creation time (ISO8601 format). Populated when restorePointType = CONTINUOUS. Null otherwise.
3362	RestorePointCreationDate *date.Time `json:"restorePointCreationDate,omitempty"`
3363	// EarliestRestoreDate - READ-ONLY; Earliest restore time (ISO8601 format). Populated when restorePointType = DISCRETE. Null otherwise.
3364	EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"`
3365}
3366
3367// Server represents a server.
3368type Server struct {
3369	autorest.Response `json:"-"`
3370	// Kind - READ-ONLY; Kind of sql server.  This is metadata used for the Azure portal experience.
3371	Kind *string `json:"kind,omitempty"`
3372	// ServerProperties - Represents the properties of the resource.
3373	*ServerProperties `json:"properties,omitempty"`
3374	// Location - Resource location.
3375	Location *string `json:"location,omitempty"`
3376	// Tags - Resource tags.
3377	Tags map[string]*string `json:"tags"`
3378	// ID - READ-ONLY; Resource ID.
3379	ID *string `json:"id,omitempty"`
3380	// Name - READ-ONLY; Resource name.
3381	Name *string `json:"name,omitempty"`
3382	// Type - READ-ONLY; Resource type.
3383	Type *string `json:"type,omitempty"`
3384}
3385
3386// MarshalJSON is the custom marshaler for Server.
3387func (s Server) MarshalJSON() ([]byte, error) {
3388	objectMap := make(map[string]interface{})
3389	if s.ServerProperties != nil {
3390		objectMap["properties"] = s.ServerProperties
3391	}
3392	if s.Location != nil {
3393		objectMap["location"] = s.Location
3394	}
3395	if s.Tags != nil {
3396		objectMap["tags"] = s.Tags
3397	}
3398	return json.Marshal(objectMap)
3399}
3400
3401// UnmarshalJSON is the custom unmarshaler for Server struct.
3402func (s *Server) UnmarshalJSON(body []byte) error {
3403	var m map[string]*json.RawMessage
3404	err := json.Unmarshal(body, &m)
3405	if err != nil {
3406		return err
3407	}
3408	for k, v := range m {
3409		switch k {
3410		case "kind":
3411			if v != nil {
3412				var kind string
3413				err = json.Unmarshal(*v, &kind)
3414				if err != nil {
3415					return err
3416				}
3417				s.Kind = &kind
3418			}
3419		case "properties":
3420			if v != nil {
3421				var serverProperties ServerProperties
3422				err = json.Unmarshal(*v, &serverProperties)
3423				if err != nil {
3424					return err
3425				}
3426				s.ServerProperties = &serverProperties
3427			}
3428		case "location":
3429			if v != nil {
3430				var location string
3431				err = json.Unmarshal(*v, &location)
3432				if err != nil {
3433					return err
3434				}
3435				s.Location = &location
3436			}
3437		case "tags":
3438			if v != nil {
3439				var tags map[string]*string
3440				err = json.Unmarshal(*v, &tags)
3441				if err != nil {
3442					return err
3443				}
3444				s.Tags = tags
3445			}
3446		case "id":
3447			if v != nil {
3448				var ID string
3449				err = json.Unmarshal(*v, &ID)
3450				if err != nil {
3451					return err
3452				}
3453				s.ID = &ID
3454			}
3455		case "name":
3456			if v != nil {
3457				var name string
3458				err = json.Unmarshal(*v, &name)
3459				if err != nil {
3460					return err
3461				}
3462				s.Name = &name
3463			}
3464		case "type":
3465			if v != nil {
3466				var typeVar string
3467				err = json.Unmarshal(*v, &typeVar)
3468				if err != nil {
3469					return err
3470				}
3471				s.Type = &typeVar
3472			}
3473		}
3474	}
3475
3476	return nil
3477}
3478
3479// ServerAdministratorListResult the response to a list Active Directory Administrators request.
3480type ServerAdministratorListResult struct {
3481	autorest.Response `json:"-"`
3482	// Value - The list of server Active Directory Administrators for the server.
3483	Value *[]ServerAzureADAdministrator `json:"value,omitempty"`
3484}
3485
3486// ServerAdministratorProperties the properties of an server Administrator.
3487type ServerAdministratorProperties struct {
3488	// AdministratorType - The type of administrator.
3489	AdministratorType *string `json:"administratorType,omitempty"`
3490	// Login - The server administrator login value.
3491	Login *string `json:"login,omitempty"`
3492	// Sid - The server administrator Sid (Secure ID).
3493	Sid *uuid.UUID `json:"sid,omitempty"`
3494	// TenantID - The server Active Directory Administrator tenant id.
3495	TenantID *uuid.UUID `json:"tenantId,omitempty"`
3496}
3497
3498// ServerAzureADAdministrator an server Active Directory Administrator.
3499type ServerAzureADAdministrator struct {
3500	autorest.Response `json:"-"`
3501	// ServerAdministratorProperties - The properties of the resource.
3502	*ServerAdministratorProperties `json:"properties,omitempty"`
3503	// ID - READ-ONLY; Resource ID.
3504	ID *string `json:"id,omitempty"`
3505	// Name - READ-ONLY; Resource name.
3506	Name *string `json:"name,omitempty"`
3507	// Type - READ-ONLY; Resource type.
3508	Type *string `json:"type,omitempty"`
3509}
3510
3511// MarshalJSON is the custom marshaler for ServerAzureADAdministrator.
3512func (saaa ServerAzureADAdministrator) MarshalJSON() ([]byte, error) {
3513	objectMap := make(map[string]interface{})
3514	if saaa.ServerAdministratorProperties != nil {
3515		objectMap["properties"] = saaa.ServerAdministratorProperties
3516	}
3517	return json.Marshal(objectMap)
3518}
3519
3520// UnmarshalJSON is the custom unmarshaler for ServerAzureADAdministrator struct.
3521func (saaa *ServerAzureADAdministrator) UnmarshalJSON(body []byte) error {
3522	var m map[string]*json.RawMessage
3523	err := json.Unmarshal(body, &m)
3524	if err != nil {
3525		return err
3526	}
3527	for k, v := range m {
3528		switch k {
3529		case "properties":
3530			if v != nil {
3531				var serverAdministratorProperties ServerAdministratorProperties
3532				err = json.Unmarshal(*v, &serverAdministratorProperties)
3533				if err != nil {
3534					return err
3535				}
3536				saaa.ServerAdministratorProperties = &serverAdministratorProperties
3537			}
3538		case "id":
3539			if v != nil {
3540				var ID string
3541				err = json.Unmarshal(*v, &ID)
3542				if err != nil {
3543					return err
3544				}
3545				saaa.ID = &ID
3546			}
3547		case "name":
3548			if v != nil {
3549				var name string
3550				err = json.Unmarshal(*v, &name)
3551				if err != nil {
3552					return err
3553				}
3554				saaa.Name = &name
3555			}
3556		case "type":
3557			if v != nil {
3558				var typeVar string
3559				err = json.Unmarshal(*v, &typeVar)
3560				if err != nil {
3561					return err
3562				}
3563				saaa.Type = &typeVar
3564			}
3565		}
3566	}
3567
3568	return nil
3569}
3570
3571// ServerAzureADAdministratorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3572// of a long-running operation.
3573type ServerAzureADAdministratorsCreateOrUpdateFuture struct {
3574	azure.FutureAPI
3575	// Result returns the result of the asynchronous operation.
3576	// If the operation has not completed it will return an error.
3577	Result func(ServerAzureADAdministratorsClient) (ServerAzureADAdministrator, error)
3578}
3579
3580// ServerAzureADAdministratorsDeleteFuture an abstraction for monitoring and retrieving the results of a
3581// long-running operation.
3582type ServerAzureADAdministratorsDeleteFuture struct {
3583	azure.FutureAPI
3584	// Result returns the result of the asynchronous operation.
3585	// If the operation has not completed it will return an error.
3586	Result func(ServerAzureADAdministratorsClient) (ServerAzureADAdministrator, error)
3587}
3588
3589// ServerCommunicationLink server communication link.
3590type ServerCommunicationLink struct {
3591	autorest.Response `json:"-"`
3592	// ServerCommunicationLinkProperties - The properties of resource.
3593	*ServerCommunicationLinkProperties `json:"properties,omitempty"`
3594	// Location - READ-ONLY; Communication link location.
3595	Location *string `json:"location,omitempty"`
3596	// Kind - READ-ONLY; Communication link kind.  This property is used for Azure Portal metadata.
3597	Kind *string `json:"kind,omitempty"`
3598	// ID - READ-ONLY; Resource ID.
3599	ID *string `json:"id,omitempty"`
3600	// Name - READ-ONLY; Resource name.
3601	Name *string `json:"name,omitempty"`
3602	// Type - READ-ONLY; Resource type.
3603	Type *string `json:"type,omitempty"`
3604}
3605
3606// MarshalJSON is the custom marshaler for ServerCommunicationLink.
3607func (scl ServerCommunicationLink) MarshalJSON() ([]byte, error) {
3608	objectMap := make(map[string]interface{})
3609	if scl.ServerCommunicationLinkProperties != nil {
3610		objectMap["properties"] = scl.ServerCommunicationLinkProperties
3611	}
3612	return json.Marshal(objectMap)
3613}
3614
3615// UnmarshalJSON is the custom unmarshaler for ServerCommunicationLink struct.
3616func (scl *ServerCommunicationLink) UnmarshalJSON(body []byte) error {
3617	var m map[string]*json.RawMessage
3618	err := json.Unmarshal(body, &m)
3619	if err != nil {
3620		return err
3621	}
3622	for k, v := range m {
3623		switch k {
3624		case "properties":
3625			if v != nil {
3626				var serverCommunicationLinkProperties ServerCommunicationLinkProperties
3627				err = json.Unmarshal(*v, &serverCommunicationLinkProperties)
3628				if err != nil {
3629					return err
3630				}
3631				scl.ServerCommunicationLinkProperties = &serverCommunicationLinkProperties
3632			}
3633		case "location":
3634			if v != nil {
3635				var location string
3636				err = json.Unmarshal(*v, &location)
3637				if err != nil {
3638					return err
3639				}
3640				scl.Location = &location
3641			}
3642		case "kind":
3643			if v != nil {
3644				var kind string
3645				err = json.Unmarshal(*v, &kind)
3646				if err != nil {
3647					return err
3648				}
3649				scl.Kind = &kind
3650			}
3651		case "id":
3652			if v != nil {
3653				var ID string
3654				err = json.Unmarshal(*v, &ID)
3655				if err != nil {
3656					return err
3657				}
3658				scl.ID = &ID
3659			}
3660		case "name":
3661			if v != nil {
3662				var name string
3663				err = json.Unmarshal(*v, &name)
3664				if err != nil {
3665					return err
3666				}
3667				scl.Name = &name
3668			}
3669		case "type":
3670			if v != nil {
3671				var typeVar string
3672				err = json.Unmarshal(*v, &typeVar)
3673				if err != nil {
3674					return err
3675				}
3676				scl.Type = &typeVar
3677			}
3678		}
3679	}
3680
3681	return nil
3682}
3683
3684// ServerCommunicationLinkListResult a list of server communication links.
3685type ServerCommunicationLinkListResult struct {
3686	autorest.Response `json:"-"`
3687	// Value - The list of server communication links.
3688	Value *[]ServerCommunicationLink `json:"value,omitempty"`
3689}
3690
3691// ServerCommunicationLinkProperties the properties of a server communication link.
3692type ServerCommunicationLinkProperties struct {
3693	// State - READ-ONLY; The state.
3694	State *string `json:"state,omitempty"`
3695	// PartnerServer - The name of the partner server.
3696	PartnerServer *string `json:"partnerServer,omitempty"`
3697}
3698
3699// MarshalJSON is the custom marshaler for ServerCommunicationLinkProperties.
3700func (sclp ServerCommunicationLinkProperties) MarshalJSON() ([]byte, error) {
3701	objectMap := make(map[string]interface{})
3702	if sclp.PartnerServer != nil {
3703		objectMap["partnerServer"] = sclp.PartnerServer
3704	}
3705	return json.Marshal(objectMap)
3706}
3707
3708// ServerCommunicationLinksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
3709// a long-running operation.
3710type ServerCommunicationLinksCreateOrUpdateFuture struct {
3711	azure.FutureAPI
3712	// Result returns the result of the asynchronous operation.
3713	// If the operation has not completed it will return an error.
3714	Result func(ServerCommunicationLinksClient) (ServerCommunicationLink, error)
3715}
3716
3717// ServerConnectionPolicy a server secure connection policy.
3718type ServerConnectionPolicy struct {
3719	autorest.Response `json:"-"`
3720	// Kind - READ-ONLY; Metadata used for the Azure portal experience.
3721	Kind *string `json:"kind,omitempty"`
3722	// Location - READ-ONLY; Resource location.
3723	Location *string `json:"location,omitempty"`
3724	// ServerConnectionPolicyProperties - The properties of the server secure connection policy.
3725	*ServerConnectionPolicyProperties `json:"properties,omitempty"`
3726	// ID - READ-ONLY; Resource ID.
3727	ID *string `json:"id,omitempty"`
3728	// Name - READ-ONLY; Resource name.
3729	Name *string `json:"name,omitempty"`
3730	// Type - READ-ONLY; Resource type.
3731	Type *string `json:"type,omitempty"`
3732}
3733
3734// MarshalJSON is the custom marshaler for ServerConnectionPolicy.
3735func (scp ServerConnectionPolicy) MarshalJSON() ([]byte, error) {
3736	objectMap := make(map[string]interface{})
3737	if scp.ServerConnectionPolicyProperties != nil {
3738		objectMap["properties"] = scp.ServerConnectionPolicyProperties
3739	}
3740	return json.Marshal(objectMap)
3741}
3742
3743// UnmarshalJSON is the custom unmarshaler for ServerConnectionPolicy struct.
3744func (scp *ServerConnectionPolicy) UnmarshalJSON(body []byte) error {
3745	var m map[string]*json.RawMessage
3746	err := json.Unmarshal(body, &m)
3747	if err != nil {
3748		return err
3749	}
3750	for k, v := range m {
3751		switch k {
3752		case "kind":
3753			if v != nil {
3754				var kind string
3755				err = json.Unmarshal(*v, &kind)
3756				if err != nil {
3757					return err
3758				}
3759				scp.Kind = &kind
3760			}
3761		case "location":
3762			if v != nil {
3763				var location string
3764				err = json.Unmarshal(*v, &location)
3765				if err != nil {
3766					return err
3767				}
3768				scp.Location = &location
3769			}
3770		case "properties":
3771			if v != nil {
3772				var serverConnectionPolicyProperties ServerConnectionPolicyProperties
3773				err = json.Unmarshal(*v, &serverConnectionPolicyProperties)
3774				if err != nil {
3775					return err
3776				}
3777				scp.ServerConnectionPolicyProperties = &serverConnectionPolicyProperties
3778			}
3779		case "id":
3780			if v != nil {
3781				var ID string
3782				err = json.Unmarshal(*v, &ID)
3783				if err != nil {
3784					return err
3785				}
3786				scp.ID = &ID
3787			}
3788		case "name":
3789			if v != nil {
3790				var name string
3791				err = json.Unmarshal(*v, &name)
3792				if err != nil {
3793					return err
3794				}
3795				scp.Name = &name
3796			}
3797		case "type":
3798			if v != nil {
3799				var typeVar string
3800				err = json.Unmarshal(*v, &typeVar)
3801				if err != nil {
3802					return err
3803				}
3804				scp.Type = &typeVar
3805			}
3806		}
3807	}
3808
3809	return nil
3810}
3811
3812// ServerConnectionPolicyProperties the properties of a server secure connection policy.
3813type ServerConnectionPolicyProperties struct {
3814	// ConnectionType - The server connection type. Possible values include: 'ServerConnectionTypeDefault', 'ServerConnectionTypeProxy', 'ServerConnectionTypeRedirect'
3815	ConnectionType ServerConnectionType `json:"connectionType,omitempty"`
3816}
3817
3818// ServerListResult represents the response to a get server request.
3819type ServerListResult struct {
3820	autorest.Response `json:"-"`
3821	// Value - The list of servers.
3822	Value *[]Server `json:"value,omitempty"`
3823}
3824
3825// ServerProperties represents the properties of a server.
3826type ServerProperties struct {
3827	// FullyQualifiedDomainName - READ-ONLY; The fully qualified domain name of the server.
3828	FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"`
3829	// Version - The version of the server. Possible values include: 'TwoFullStopZero', 'OneTwoFullStopZero'
3830	Version ServerVersion `json:"version,omitempty"`
3831	// AdministratorLogin - Administrator username for the server. Can only be specified when the server is being created (and is required for creation).
3832	AdministratorLogin *string `json:"administratorLogin,omitempty"`
3833	// AdministratorLoginPassword - The administrator login password (required for server creation).
3834	AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"`
3835	// ExternalAdministratorSid - READ-ONLY; The ID of the Active Azure Directory object with admin permissions on this server. Legacy parameter, always null. To check for Active Directory admin, query .../servers/{serverName}/administrators.
3836	ExternalAdministratorSid *uuid.UUID `json:"externalAdministratorSid,omitempty"`
3837	// ExternalAdministratorLogin - READ-ONLY; The display name of the Azure Active Directory object with admin permissions on this server. Legacy parameter, always null. To check for Active Directory admin, query .../servers/{serverName}/administrators
3838	ExternalAdministratorLogin *string `json:"externalAdministratorLogin,omitempty"`
3839	// State - READ-ONLY; The state of the server. Possible values include: 'ServerStateReady', 'ServerStateDisabled'
3840	State ServerState `json:"state,omitempty"`
3841}
3842
3843// MarshalJSON is the custom marshaler for ServerProperties.
3844func (sp ServerProperties) MarshalJSON() ([]byte, error) {
3845	objectMap := make(map[string]interface{})
3846	if sp.Version != "" {
3847		objectMap["version"] = sp.Version
3848	}
3849	if sp.AdministratorLogin != nil {
3850		objectMap["administratorLogin"] = sp.AdministratorLogin
3851	}
3852	if sp.AdministratorLoginPassword != nil {
3853		objectMap["administratorLoginPassword"] = sp.AdministratorLoginPassword
3854	}
3855	return json.Marshal(objectMap)
3856}
3857
3858// ServerTableAuditingPolicy a server table auditing policy.
3859type ServerTableAuditingPolicy struct {
3860	autorest.Response `json:"-"`
3861	// Kind - READ-ONLY; Resource kind.
3862	Kind *string `json:"kind,omitempty"`
3863	// Location - READ-ONLY; Resource location.
3864	Location *string `json:"location,omitempty"`
3865	// ServerTableAuditingPolicyProperties - Resource properties.
3866	*ServerTableAuditingPolicyProperties `json:"properties,omitempty"`
3867	// ID - READ-ONLY; Resource ID.
3868	ID *string `json:"id,omitempty"`
3869	// Name - READ-ONLY; Resource name.
3870	Name *string `json:"name,omitempty"`
3871	// Type - READ-ONLY; Resource type.
3872	Type *string `json:"type,omitempty"`
3873}
3874
3875// MarshalJSON is the custom marshaler for ServerTableAuditingPolicy.
3876func (stap ServerTableAuditingPolicy) MarshalJSON() ([]byte, error) {
3877	objectMap := make(map[string]interface{})
3878	if stap.ServerTableAuditingPolicyProperties != nil {
3879		objectMap["properties"] = stap.ServerTableAuditingPolicyProperties
3880	}
3881	return json.Marshal(objectMap)
3882}
3883
3884// UnmarshalJSON is the custom unmarshaler for ServerTableAuditingPolicy struct.
3885func (stap *ServerTableAuditingPolicy) UnmarshalJSON(body []byte) error {
3886	var m map[string]*json.RawMessage
3887	err := json.Unmarshal(body, &m)
3888	if err != nil {
3889		return err
3890	}
3891	for k, v := range m {
3892		switch k {
3893		case "kind":
3894			if v != nil {
3895				var kind string
3896				err = json.Unmarshal(*v, &kind)
3897				if err != nil {
3898					return err
3899				}
3900				stap.Kind = &kind
3901			}
3902		case "location":
3903			if v != nil {
3904				var location string
3905				err = json.Unmarshal(*v, &location)
3906				if err != nil {
3907					return err
3908				}
3909				stap.Location = &location
3910			}
3911		case "properties":
3912			if v != nil {
3913				var serverTableAuditingPolicyProperties ServerTableAuditingPolicyProperties
3914				err = json.Unmarshal(*v, &serverTableAuditingPolicyProperties)
3915				if err != nil {
3916					return err
3917				}
3918				stap.ServerTableAuditingPolicyProperties = &serverTableAuditingPolicyProperties
3919			}
3920		case "id":
3921			if v != nil {
3922				var ID string
3923				err = json.Unmarshal(*v, &ID)
3924				if err != nil {
3925					return err
3926				}
3927				stap.ID = &ID
3928			}
3929		case "name":
3930			if v != nil {
3931				var name string
3932				err = json.Unmarshal(*v, &name)
3933				if err != nil {
3934					return err
3935				}
3936				stap.Name = &name
3937			}
3938		case "type":
3939			if v != nil {
3940				var typeVar string
3941				err = json.Unmarshal(*v, &typeVar)
3942				if err != nil {
3943					return err
3944				}
3945				stap.Type = &typeVar
3946			}
3947		}
3948	}
3949
3950	return nil
3951}
3952
3953// ServerTableAuditingPolicyListResult represents the response to a list server table auditing policies
3954// request.
3955type ServerTableAuditingPolicyListResult struct {
3956	autorest.Response `json:"-"`
3957	// Value - The list of server table auditing policies.
3958	Value *[]ServerTableAuditingPolicy `json:"value,omitempty"`
3959}
3960
3961// ServerTableAuditingPolicyProperties properties of a server table auditing policy.
3962type ServerTableAuditingPolicyProperties struct {
3963	// AuditingState - The state of the policy.
3964	AuditingState *string `json:"auditingState,omitempty"`
3965	// AuditLogsTableName - The audit logs table name.
3966	AuditLogsTableName *string `json:"auditLogsTableName,omitempty"`
3967	// EventTypesToAudit - Comma-separated list of event types to audit.
3968	EventTypesToAudit *string `json:"eventTypesToAudit,omitempty"`
3969	// FullAuditLogsTableName - The full audit logs table name.
3970	FullAuditLogsTableName *string `json:"fullAuditLogsTableName,omitempty"`
3971	// RetentionDays - The number of days to keep in the audit logs.
3972	RetentionDays *string `json:"retentionDays,omitempty"`
3973	// StorageAccountKey - The key of the auditing storage account.
3974	StorageAccountKey *string `json:"storageAccountKey,omitempty"`
3975	// StorageAccountName - The table storage account name
3976	StorageAccountName *string `json:"storageAccountName,omitempty"`
3977	// StorageAccountResourceGroupName - The table storage account resource group name
3978	StorageAccountResourceGroupName *string `json:"storageAccountResourceGroupName,omitempty"`
3979	// StorageAccountSecondaryKey - The secondary key of the auditing storage account.
3980	StorageAccountSecondaryKey *string `json:"storageAccountSecondaryKey,omitempty"`
3981	// StorageAccountSubscriptionID - The table storage subscription Id.
3982	StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"`
3983	// StorageTableEndpoint - The storage table endpoint.
3984	StorageTableEndpoint *string `json:"storageTableEndpoint,omitempty"`
3985}
3986
3987// ServerUpdate represents an update to a server.
3988type ServerUpdate struct {
3989	// Tags - Resource tags.
3990	Tags map[string]*string `json:"tags"`
3991	// ServerProperties - Represents the properties of the resource.
3992	*ServerProperties `json:"properties,omitempty"`
3993	// ID - READ-ONLY; Resource ID.
3994	ID *string `json:"id,omitempty"`
3995	// Name - READ-ONLY; Resource name.
3996	Name *string `json:"name,omitempty"`
3997	// Type - READ-ONLY; Resource type.
3998	Type *string `json:"type,omitempty"`
3999}
4000
4001// MarshalJSON is the custom marshaler for ServerUpdate.
4002func (su ServerUpdate) MarshalJSON() ([]byte, error) {
4003	objectMap := make(map[string]interface{})
4004	if su.Tags != nil {
4005		objectMap["tags"] = su.Tags
4006	}
4007	if su.ServerProperties != nil {
4008		objectMap["properties"] = su.ServerProperties
4009	}
4010	return json.Marshal(objectMap)
4011}
4012
4013// UnmarshalJSON is the custom unmarshaler for ServerUpdate struct.
4014func (su *ServerUpdate) UnmarshalJSON(body []byte) error {
4015	var m map[string]*json.RawMessage
4016	err := json.Unmarshal(body, &m)
4017	if err != nil {
4018		return err
4019	}
4020	for k, v := range m {
4021		switch k {
4022		case "tags":
4023			if v != nil {
4024				var tags map[string]*string
4025				err = json.Unmarshal(*v, &tags)
4026				if err != nil {
4027					return err
4028				}
4029				su.Tags = tags
4030			}
4031		case "properties":
4032			if v != nil {
4033				var serverProperties ServerProperties
4034				err = json.Unmarshal(*v, &serverProperties)
4035				if err != nil {
4036					return err
4037				}
4038				su.ServerProperties = &serverProperties
4039			}
4040		case "id":
4041			if v != nil {
4042				var ID string
4043				err = json.Unmarshal(*v, &ID)
4044				if err != nil {
4045					return err
4046				}
4047				su.ID = &ID
4048			}
4049		case "name":
4050			if v != nil {
4051				var name string
4052				err = json.Unmarshal(*v, &name)
4053				if err != nil {
4054					return err
4055				}
4056				su.Name = &name
4057			}
4058		case "type":
4059			if v != nil {
4060				var typeVar string
4061				err = json.Unmarshal(*v, &typeVar)
4062				if err != nil {
4063					return err
4064				}
4065				su.Type = &typeVar
4066			}
4067		}
4068	}
4069
4070	return nil
4071}
4072
4073// ServerUsage represents server metrics.
4074type ServerUsage struct {
4075	// Name - READ-ONLY; Name of the server usage metric.
4076	Name *string `json:"name,omitempty"`
4077	// ResourceName - READ-ONLY; The name of the resource.
4078	ResourceName *string `json:"resourceName,omitempty"`
4079	// DisplayName - READ-ONLY; The metric display name.
4080	DisplayName *string `json:"displayName,omitempty"`
4081	// CurrentValue - READ-ONLY; The current value of the metric.
4082	CurrentValue *float64 `json:"currentValue,omitempty"`
4083	// Limit - READ-ONLY; The current limit of the metric.
4084	Limit *float64 `json:"limit,omitempty"`
4085	// Unit - READ-ONLY; The units of the metric.
4086	Unit *string `json:"unit,omitempty"`
4087	// NextResetTime - READ-ONLY; The next reset time for the metric (ISO8601 format).
4088	NextResetTime *date.Time `json:"nextResetTime,omitempty"`
4089}
4090
4091// ServerUsageListResult represents the response to a list server metrics request.
4092type ServerUsageListResult struct {
4093	autorest.Response `json:"-"`
4094	// Value - The list of server metrics for the server.
4095	Value *[]ServerUsage `json:"value,omitempty"`
4096}
4097
4098// ServerVersionCapability the server capabilities.
4099type ServerVersionCapability struct {
4100	// Name - READ-ONLY; The server version name.
4101	Name *string `json:"name,omitempty"`
4102	// Status - READ-ONLY; The status of the server version. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
4103	Status CapabilityStatus `json:"status,omitempty"`
4104	// SupportedEditions - READ-ONLY; The list of supported database editions.
4105	SupportedEditions *[]EditionCapability `json:"supportedEditions,omitempty"`
4106	// SupportedElasticPoolEditions - READ-ONLY; The list of supported elastic pool editions.
4107	SupportedElasticPoolEditions *[]ElasticPoolEditionCapability `json:"supportedElasticPoolEditions,omitempty"`
4108}
4109
4110// ServiceObjective represents a database service objective.
4111type ServiceObjective struct {
4112	autorest.Response `json:"-"`
4113	// ServiceObjectiveProperties - Represents the properties of the resource.
4114	*ServiceObjectiveProperties `json:"properties,omitempty"`
4115	// ID - READ-ONLY; Resource ID.
4116	ID *string `json:"id,omitempty"`
4117	// Name - READ-ONLY; Resource name.
4118	Name *string `json:"name,omitempty"`
4119	// Type - READ-ONLY; Resource type.
4120	Type *string `json:"type,omitempty"`
4121}
4122
4123// MarshalJSON is the custom marshaler for ServiceObjective.
4124func (so ServiceObjective) MarshalJSON() ([]byte, error) {
4125	objectMap := make(map[string]interface{})
4126	if so.ServiceObjectiveProperties != nil {
4127		objectMap["properties"] = so.ServiceObjectiveProperties
4128	}
4129	return json.Marshal(objectMap)
4130}
4131
4132// UnmarshalJSON is the custom unmarshaler for ServiceObjective struct.
4133func (so *ServiceObjective) UnmarshalJSON(body []byte) error {
4134	var m map[string]*json.RawMessage
4135	err := json.Unmarshal(body, &m)
4136	if err != nil {
4137		return err
4138	}
4139	for k, v := range m {
4140		switch k {
4141		case "properties":
4142			if v != nil {
4143				var serviceObjectiveProperties ServiceObjectiveProperties
4144				err = json.Unmarshal(*v, &serviceObjectiveProperties)
4145				if err != nil {
4146					return err
4147				}
4148				so.ServiceObjectiveProperties = &serviceObjectiveProperties
4149			}
4150		case "id":
4151			if v != nil {
4152				var ID string
4153				err = json.Unmarshal(*v, &ID)
4154				if err != nil {
4155					return err
4156				}
4157				so.ID = &ID
4158			}
4159		case "name":
4160			if v != nil {
4161				var name string
4162				err = json.Unmarshal(*v, &name)
4163				if err != nil {
4164					return err
4165				}
4166				so.Name = &name
4167			}
4168		case "type":
4169			if v != nil {
4170				var typeVar string
4171				err = json.Unmarshal(*v, &typeVar)
4172				if err != nil {
4173					return err
4174				}
4175				so.Type = &typeVar
4176			}
4177		}
4178	}
4179
4180	return nil
4181}
4182
4183// ServiceObjectiveCapability the service objectives capability.
4184type ServiceObjectiveCapability struct {
4185	// Name - READ-ONLY; The service objective name.
4186	Name *string `json:"name,omitempty"`
4187	// Status - READ-ONLY; The status of the service objective. Possible values include: 'CapabilityStatusVisible', 'CapabilityStatusAvailable', 'CapabilityStatusDefault', 'CapabilityStatusDisabled'
4188	Status CapabilityStatus `json:"status,omitempty"`
4189	// PerformanceLevel - READ-ONLY; The performance level of the service objective capability.
4190	*PerformanceLevel `json:"performanceLevel,omitempty"`
4191	// ID - READ-ONLY; The unique ID of the service objective.
4192	ID *uuid.UUID `json:"id,omitempty"`
4193	// SupportedMaxSizes - READ-ONLY; The list of supported maximum database sizes for this service objective.
4194	SupportedMaxSizes *[]MaxSizeCapability `json:"supportedMaxSizes,omitempty"`
4195	// IncludedMaxSize - READ-ONLY; The included (free) max size for this service level objective.
4196	IncludedMaxSize *MaxSizeCapability `json:"includedMaxSize,omitempty"`
4197}
4198
4199// MarshalJSON is the custom marshaler for ServiceObjectiveCapability.
4200func (soc ServiceObjectiveCapability) MarshalJSON() ([]byte, error) {
4201	objectMap := make(map[string]interface{})
4202	return json.Marshal(objectMap)
4203}
4204
4205// UnmarshalJSON is the custom unmarshaler for ServiceObjectiveCapability struct.
4206func (soc *ServiceObjectiveCapability) UnmarshalJSON(body []byte) error {
4207	var m map[string]*json.RawMessage
4208	err := json.Unmarshal(body, &m)
4209	if err != nil {
4210		return err
4211	}
4212	for k, v := range m {
4213		switch k {
4214		case "name":
4215			if v != nil {
4216				var name string
4217				err = json.Unmarshal(*v, &name)
4218				if err != nil {
4219					return err
4220				}
4221				soc.Name = &name
4222			}
4223		case "status":
4224			if v != nil {
4225				var status CapabilityStatus
4226				err = json.Unmarshal(*v, &status)
4227				if err != nil {
4228					return err
4229				}
4230				soc.Status = status
4231			}
4232		case "performanceLevel":
4233			if v != nil {
4234				var performanceLevel PerformanceLevel
4235				err = json.Unmarshal(*v, &performanceLevel)
4236				if err != nil {
4237					return err
4238				}
4239				soc.PerformanceLevel = &performanceLevel
4240			}
4241		case "id":
4242			if v != nil {
4243				var ID uuid.UUID
4244				err = json.Unmarshal(*v, &ID)
4245				if err != nil {
4246					return err
4247				}
4248				soc.ID = &ID
4249			}
4250		case "supportedMaxSizes":
4251			if v != nil {
4252				var supportedMaxSizes []MaxSizeCapability
4253				err = json.Unmarshal(*v, &supportedMaxSizes)
4254				if err != nil {
4255					return err
4256				}
4257				soc.SupportedMaxSizes = &supportedMaxSizes
4258			}
4259		case "includedMaxSize":
4260			if v != nil {
4261				var includedMaxSize MaxSizeCapability
4262				err = json.Unmarshal(*v, &includedMaxSize)
4263				if err != nil {
4264					return err
4265				}
4266				soc.IncludedMaxSize = &includedMaxSize
4267			}
4268		}
4269	}
4270
4271	return nil
4272}
4273
4274// ServiceObjectiveListResult represents the response to a get database service objectives request.
4275type ServiceObjectiveListResult struct {
4276	autorest.Response `json:"-"`
4277	// Value - The list of database service objectives.
4278	Value *[]ServiceObjective `json:"value,omitempty"`
4279}
4280
4281// ServiceObjectiveProperties represents the properties of a database service objective.
4282type ServiceObjectiveProperties struct {
4283	// ServiceObjectiveName - READ-ONLY; The name for the service objective.
4284	ServiceObjectiveName *string `json:"serviceObjectiveName,omitempty"`
4285	// IsDefault - READ-ONLY; Gets whether the service level objective is the default service objective.
4286	IsDefault *bool `json:"isDefault,omitempty"`
4287	// IsSystem - READ-ONLY; Gets whether the service level objective is a system service objective.
4288	IsSystem *bool `json:"isSystem,omitempty"`
4289	// Description - READ-ONLY; The description for the service level objective.
4290	Description *string `json:"description,omitempty"`
4291	// Enabled - READ-ONLY; Gets whether the service level objective is enabled.
4292	Enabled *bool `json:"enabled,omitempty"`
4293}
4294
4295// ServiceTierAdvisor represents a Service Tier Advisor.
4296type ServiceTierAdvisor struct {
4297	autorest.Response `json:"-"`
4298	// ServiceTierAdvisorProperties - READ-ONLY; The properties representing the resource.
4299	*ServiceTierAdvisorProperties `json:"properties,omitempty"`
4300	// ID - READ-ONLY; Resource ID.
4301	ID *string `json:"id,omitempty"`
4302	// Name - READ-ONLY; Resource name.
4303	Name *string `json:"name,omitempty"`
4304	// Type - READ-ONLY; Resource type.
4305	Type *string `json:"type,omitempty"`
4306}
4307
4308// MarshalJSON is the custom marshaler for ServiceTierAdvisor.
4309func (sta ServiceTierAdvisor) MarshalJSON() ([]byte, error) {
4310	objectMap := make(map[string]interface{})
4311	return json.Marshal(objectMap)
4312}
4313
4314// UnmarshalJSON is the custom unmarshaler for ServiceTierAdvisor struct.
4315func (sta *ServiceTierAdvisor) UnmarshalJSON(body []byte) error {
4316	var m map[string]*json.RawMessage
4317	err := json.Unmarshal(body, &m)
4318	if err != nil {
4319		return err
4320	}
4321	for k, v := range m {
4322		switch k {
4323		case "properties":
4324			if v != nil {
4325				var serviceTierAdvisorProperties ServiceTierAdvisorProperties
4326				err = json.Unmarshal(*v, &serviceTierAdvisorProperties)
4327				if err != nil {
4328					return err
4329				}
4330				sta.ServiceTierAdvisorProperties = &serviceTierAdvisorProperties
4331			}
4332		case "id":
4333			if v != nil {
4334				var ID string
4335				err = json.Unmarshal(*v, &ID)
4336				if err != nil {
4337					return err
4338				}
4339				sta.ID = &ID
4340			}
4341		case "name":
4342			if v != nil {
4343				var name string
4344				err = json.Unmarshal(*v, &name)
4345				if err != nil {
4346					return err
4347				}
4348				sta.Name = &name
4349			}
4350		case "type":
4351			if v != nil {
4352				var typeVar string
4353				err = json.Unmarshal(*v, &typeVar)
4354				if err != nil {
4355					return err
4356				}
4357				sta.Type = &typeVar
4358			}
4359		}
4360	}
4361
4362	return nil
4363}
4364
4365// ServiceTierAdvisorListResult represents the response to a list service tier advisor request.
4366type ServiceTierAdvisorListResult struct {
4367	autorest.Response `json:"-"`
4368	// Value - The list of service tier advisors for specified database.
4369	Value *[]ServiceTierAdvisor `json:"value,omitempty"`
4370}
4371
4372// ServiceTierAdvisorProperties represents the properties of a Service Tier Advisor.
4373type ServiceTierAdvisorProperties struct {
4374	// ObservationPeriodStart - READ-ONLY; The observation period start (ISO8601 format).
4375	ObservationPeriodStart *date.Time `json:"observationPeriodStart,omitempty"`
4376	// ObservationPeriodEnd - READ-ONLY; The observation period start (ISO8601 format).
4377	ObservationPeriodEnd *date.Time `json:"observationPeriodEnd,omitempty"`
4378	// ActiveTimeRatio - READ-ONLY; The activeTimeRatio for service tier advisor.
4379	ActiveTimeRatio *float64 `json:"activeTimeRatio,omitempty"`
4380	// MinDtu - READ-ONLY; Gets or sets minDtu for service tier advisor.
4381	MinDtu *float64 `json:"minDtu,omitempty"`
4382	// AvgDtu - READ-ONLY; Gets or sets avgDtu for service tier advisor.
4383	AvgDtu *float64 `json:"avgDtu,omitempty"`
4384	// MaxDtu - READ-ONLY; Gets or sets maxDtu for service tier advisor.
4385	MaxDtu *float64 `json:"maxDtu,omitempty"`
4386	// MaxSizeInGB - READ-ONLY; Gets or sets maxSizeInGB for service tier advisor.
4387	MaxSizeInGB *float64 `json:"maxSizeInGB,omitempty"`
4388	// ServiceLevelObjectiveUsageMetrics - READ-ONLY; Gets or sets serviceLevelObjectiveUsageMetrics for the service tier advisor.
4389	ServiceLevelObjectiveUsageMetrics *[]SloUsageMetric `json:"serviceLevelObjectiveUsageMetrics,omitempty"`
4390	// CurrentServiceLevelObjective - READ-ONLY; Gets or sets currentServiceLevelObjective for service tier advisor.
4391	CurrentServiceLevelObjective *string `json:"currentServiceLevelObjective,omitempty"`
4392	// CurrentServiceLevelObjectiveID - READ-ONLY; Gets or sets currentServiceLevelObjectiveId for service tier advisor.
4393	CurrentServiceLevelObjectiveID *uuid.UUID `json:"currentServiceLevelObjectiveId,omitempty"`
4394	// UsageBasedRecommendationServiceLevelObjective - READ-ONLY; Gets or sets usageBasedRecommendationServiceLevelObjective for service tier advisor.
4395	UsageBasedRecommendationServiceLevelObjective *string `json:"usageBasedRecommendationServiceLevelObjective,omitempty"`
4396	// UsageBasedRecommendationServiceLevelObjectiveID - READ-ONLY; Gets or sets usageBasedRecommendationServiceLevelObjectiveId for service tier advisor.
4397	UsageBasedRecommendationServiceLevelObjectiveID *uuid.UUID `json:"usageBasedRecommendationServiceLevelObjectiveId,omitempty"`
4398	// DatabaseSizeBasedRecommendationServiceLevelObjective - READ-ONLY; Gets or sets databaseSizeBasedRecommendationServiceLevelObjective for service tier advisor.
4399	DatabaseSizeBasedRecommendationServiceLevelObjective *string `json:"databaseSizeBasedRecommendationServiceLevelObjective,omitempty"`
4400	// DatabaseSizeBasedRecommendationServiceLevelObjectiveID - READ-ONLY; Gets or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service tier advisor.
4401	DatabaseSizeBasedRecommendationServiceLevelObjectiveID *uuid.UUID `json:"databaseSizeBasedRecommendationServiceLevelObjectiveId,omitempty"`
4402	// DisasterPlanBasedRecommendationServiceLevelObjective - READ-ONLY; Gets or sets disasterPlanBasedRecommendationServiceLevelObjective for service tier advisor.
4403	DisasterPlanBasedRecommendationServiceLevelObjective *string `json:"disasterPlanBasedRecommendationServiceLevelObjective,omitempty"`
4404	// DisasterPlanBasedRecommendationServiceLevelObjectiveID - READ-ONLY; Gets or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service tier advisor.
4405	DisasterPlanBasedRecommendationServiceLevelObjectiveID *uuid.UUID `json:"disasterPlanBasedRecommendationServiceLevelObjectiveId,omitempty"`
4406	// OverallRecommendationServiceLevelObjective - READ-ONLY; Gets or sets overallRecommendationServiceLevelObjective for service tier advisor.
4407	OverallRecommendationServiceLevelObjective *string `json:"overallRecommendationServiceLevelObjective,omitempty"`
4408	// OverallRecommendationServiceLevelObjectiveID - READ-ONLY; Gets or sets overallRecommendationServiceLevelObjectiveId for service tier advisor.
4409	OverallRecommendationServiceLevelObjectiveID *uuid.UUID `json:"overallRecommendationServiceLevelObjectiveId,omitempty"`
4410	// Confidence - READ-ONLY; Gets or sets confidence for service tier advisor.
4411	Confidence *float64 `json:"confidence,omitempty"`
4412}
4413
4414// SloUsageMetric a Slo Usage Metric.
4415type SloUsageMetric struct {
4416	// 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'
4417	ServiceLevelObjective ServiceObjectiveName `json:"serviceLevelObjective,omitempty"`
4418	// ServiceLevelObjectiveID - READ-ONLY; The serviceLevelObjectiveId for SLO usage metric.
4419	ServiceLevelObjectiveID *uuid.UUID `json:"serviceLevelObjectiveId,omitempty"`
4420	// InRangeTimeRatio - READ-ONLY; Gets or sets inRangeTimeRatio for SLO usage metric.
4421	InRangeTimeRatio *float64 `json:"inRangeTimeRatio,omitempty"`
4422}
4423
4424// TableAuditingPolicyProperties properties of a table auditing policy.
4425type TableAuditingPolicyProperties struct {
4426	// AuditingState - The state of the policy.
4427	AuditingState *string `json:"auditingState,omitempty"`
4428	// AuditLogsTableName - The audit logs table name.
4429	AuditLogsTableName *string `json:"auditLogsTableName,omitempty"`
4430	// EventTypesToAudit - Comma-separated list of event types to audit.
4431	EventTypesToAudit *string `json:"eventTypesToAudit,omitempty"`
4432	// FullAuditLogsTableName - The full audit logs table name.
4433	FullAuditLogsTableName *string `json:"fullAuditLogsTableName,omitempty"`
4434	// RetentionDays - The number of days to keep in the audit logs.
4435	RetentionDays *string `json:"retentionDays,omitempty"`
4436	// StorageAccountKey - The key of the auditing storage account.
4437	StorageAccountKey *string `json:"storageAccountKey,omitempty"`
4438	// StorageAccountName - The table storage account name
4439	StorageAccountName *string `json:"storageAccountName,omitempty"`
4440	// StorageAccountResourceGroupName - The table storage account resource group name
4441	StorageAccountResourceGroupName *string `json:"storageAccountResourceGroupName,omitempty"`
4442	// StorageAccountSecondaryKey - The secondary key of the auditing storage account.
4443	StorageAccountSecondaryKey *string `json:"storageAccountSecondaryKey,omitempty"`
4444	// StorageAccountSubscriptionID - The table storage subscription Id.
4445	StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"`
4446	// StorageTableEndpoint - The storage table endpoint.
4447	StorageTableEndpoint *string `json:"storageTableEndpoint,omitempty"`
4448}
4449
4450// TopQueries a database query.
4451type TopQueries struct {
4452	// AggregationFunction - READ-ONLY; The function that is used to aggregate each query's metrics. Possible values include: 'Min', 'Max', 'Avg', 'Sum'
4453	AggregationFunction QueryAggregationFunction `json:"aggregationFunction,omitempty"`
4454	// ExecutionType - READ-ONLY; The execution type that is used to filter the query instances that are returned. Possible values include: 'Any', 'Regular', 'Irregular', 'Aborted', 'Exception'
4455	ExecutionType QueryExecutionType `json:"executionType,omitempty"`
4456	// IntervalType - READ-ONLY; The duration of the interval (ISO8601 duration format).
4457	IntervalType *string `json:"intervalType,omitempty"`
4458	// NumberOfTopQueries - READ-ONLY; The number of requested queries.
4459	NumberOfTopQueries *float64 `json:"numberOfTopQueries,omitempty"`
4460	// ObservationStartTime - READ-ONLY; The start time for queries that are returned (ISO8601 format)
4461	ObservationStartTime *date.Time `json:"observationStartTime,omitempty"`
4462	// ObservationEndTime - READ-ONLY; The end time for queries that are returned (ISO8601 format)
4463	ObservationEndTime *date.Time `json:"observationEndTime,omitempty"`
4464	// ObservedMetric - READ-ONLY; The type of metric to use for ordering the top metrics. Possible values include: 'CPU', 'Io', 'Logio', 'Duration', 'ExecutionCount'
4465	ObservedMetric QueryObservedMetricType `json:"observedMetric,omitempty"`
4466	// Queries - READ-ONLY; The list of queries.
4467	Queries *[]QueryStatistic `json:"queries,omitempty"`
4468}
4469
4470// TopQueriesListResult represents the response to a get top queries request.
4471type TopQueriesListResult struct {
4472	autorest.Response `json:"-"`
4473	// Value - The list of top queries.
4474	Value *[]TopQueries `json:"value,omitempty"`
4475}
4476
4477// TrackedResource ARM tracked top level resource.
4478type TrackedResource struct {
4479	// Location - Resource location.
4480	Location *string `json:"location,omitempty"`
4481	// Tags - Resource tags.
4482	Tags map[string]*string `json:"tags"`
4483	// ID - READ-ONLY; Resource ID.
4484	ID *string `json:"id,omitempty"`
4485	// Name - READ-ONLY; Resource name.
4486	Name *string `json:"name,omitempty"`
4487	// Type - READ-ONLY; Resource type.
4488	Type *string `json:"type,omitempty"`
4489}
4490
4491// MarshalJSON is the custom marshaler for TrackedResource.
4492func (tr TrackedResource) MarshalJSON() ([]byte, error) {
4493	objectMap := make(map[string]interface{})
4494	if tr.Location != nil {
4495		objectMap["location"] = tr.Location
4496	}
4497	if tr.Tags != nil {
4498		objectMap["tags"] = tr.Tags
4499	}
4500	return json.Marshal(objectMap)
4501}
4502
4503// TransparentDataEncryption represents a database transparent data encryption configuration.
4504type TransparentDataEncryption struct {
4505	autorest.Response `json:"-"`
4506	// Location - READ-ONLY; Resource location.
4507	Location *string `json:"location,omitempty"`
4508	// TransparentDataEncryptionProperties - Represents the properties of the resource.
4509	*TransparentDataEncryptionProperties `json:"properties,omitempty"`
4510	// ID - READ-ONLY; Resource ID.
4511	ID *string `json:"id,omitempty"`
4512	// Name - READ-ONLY; Resource name.
4513	Name *string `json:"name,omitempty"`
4514	// Type - READ-ONLY; Resource type.
4515	Type *string `json:"type,omitempty"`
4516}
4517
4518// MarshalJSON is the custom marshaler for TransparentDataEncryption.
4519func (tde TransparentDataEncryption) MarshalJSON() ([]byte, error) {
4520	objectMap := make(map[string]interface{})
4521	if tde.TransparentDataEncryptionProperties != nil {
4522		objectMap["properties"] = tde.TransparentDataEncryptionProperties
4523	}
4524	return json.Marshal(objectMap)
4525}
4526
4527// UnmarshalJSON is the custom unmarshaler for TransparentDataEncryption struct.
4528func (tde *TransparentDataEncryption) UnmarshalJSON(body []byte) error {
4529	var m map[string]*json.RawMessage
4530	err := json.Unmarshal(body, &m)
4531	if err != nil {
4532		return err
4533	}
4534	for k, v := range m {
4535		switch k {
4536		case "location":
4537			if v != nil {
4538				var location string
4539				err = json.Unmarshal(*v, &location)
4540				if err != nil {
4541					return err
4542				}
4543				tde.Location = &location
4544			}
4545		case "properties":
4546			if v != nil {
4547				var transparentDataEncryptionProperties TransparentDataEncryptionProperties
4548				err = json.Unmarshal(*v, &transparentDataEncryptionProperties)
4549				if err != nil {
4550					return err
4551				}
4552				tde.TransparentDataEncryptionProperties = &transparentDataEncryptionProperties
4553			}
4554		case "id":
4555			if v != nil {
4556				var ID string
4557				err = json.Unmarshal(*v, &ID)
4558				if err != nil {
4559					return err
4560				}
4561				tde.ID = &ID
4562			}
4563		case "name":
4564			if v != nil {
4565				var name string
4566				err = json.Unmarshal(*v, &name)
4567				if err != nil {
4568					return err
4569				}
4570				tde.Name = &name
4571			}
4572		case "type":
4573			if v != nil {
4574				var typeVar string
4575				err = json.Unmarshal(*v, &typeVar)
4576				if err != nil {
4577					return err
4578				}
4579				tde.Type = &typeVar
4580			}
4581		}
4582	}
4583
4584	return nil
4585}
4586
4587// TransparentDataEncryptionActivity represents a database transparent data encryption Scan.
4588type TransparentDataEncryptionActivity struct {
4589	// Location - READ-ONLY; Resource location.
4590	Location *string `json:"location,omitempty"`
4591	// TransparentDataEncryptionActivityProperties - Represents the properties of the resource.
4592	*TransparentDataEncryptionActivityProperties `json:"properties,omitempty"`
4593	// ID - READ-ONLY; Resource ID.
4594	ID *string `json:"id,omitempty"`
4595	// Name - READ-ONLY; Resource name.
4596	Name *string `json:"name,omitempty"`
4597	// Type - READ-ONLY; Resource type.
4598	Type *string `json:"type,omitempty"`
4599}
4600
4601// MarshalJSON is the custom marshaler for TransparentDataEncryptionActivity.
4602func (tdea TransparentDataEncryptionActivity) MarshalJSON() ([]byte, error) {
4603	objectMap := make(map[string]interface{})
4604	if tdea.TransparentDataEncryptionActivityProperties != nil {
4605		objectMap["properties"] = tdea.TransparentDataEncryptionActivityProperties
4606	}
4607	return json.Marshal(objectMap)
4608}
4609
4610// UnmarshalJSON is the custom unmarshaler for TransparentDataEncryptionActivity struct.
4611func (tdea *TransparentDataEncryptionActivity) UnmarshalJSON(body []byte) error {
4612	var m map[string]*json.RawMessage
4613	err := json.Unmarshal(body, &m)
4614	if err != nil {
4615		return err
4616	}
4617	for k, v := range m {
4618		switch k {
4619		case "location":
4620			if v != nil {
4621				var location string
4622				err = json.Unmarshal(*v, &location)
4623				if err != nil {
4624					return err
4625				}
4626				tdea.Location = &location
4627			}
4628		case "properties":
4629			if v != nil {
4630				var transparentDataEncryptionActivityProperties TransparentDataEncryptionActivityProperties
4631				err = json.Unmarshal(*v, &transparentDataEncryptionActivityProperties)
4632				if err != nil {
4633					return err
4634				}
4635				tdea.TransparentDataEncryptionActivityProperties = &transparentDataEncryptionActivityProperties
4636			}
4637		case "id":
4638			if v != nil {
4639				var ID string
4640				err = json.Unmarshal(*v, &ID)
4641				if err != nil {
4642					return err
4643				}
4644				tdea.ID = &ID
4645			}
4646		case "name":
4647			if v != nil {
4648				var name string
4649				err = json.Unmarshal(*v, &name)
4650				if err != nil {
4651					return err
4652				}
4653				tdea.Name = &name
4654			}
4655		case "type":
4656			if v != nil {
4657				var typeVar string
4658				err = json.Unmarshal(*v, &typeVar)
4659				if err != nil {
4660					return err
4661				}
4662				tdea.Type = &typeVar
4663			}
4664		}
4665	}
4666
4667	return nil
4668}
4669
4670// TransparentDataEncryptionActivityListResult represents the response to a list database transparent data
4671// encryption activity request.
4672type TransparentDataEncryptionActivityListResult struct {
4673	autorest.Response `json:"-"`
4674	// Value - The list of database transparent data encryption activities.
4675	Value *[]TransparentDataEncryptionActivity `json:"value,omitempty"`
4676}
4677
4678// TransparentDataEncryptionActivityProperties represents the properties of a database transparent data
4679// encryption Scan.
4680type TransparentDataEncryptionActivityProperties struct {
4681	// Status - READ-ONLY; The status of the database. Possible values include: 'Encrypting', 'Decrypting'
4682	Status TransparentDataEncryptionActivityStatus `json:"status,omitempty"`
4683	// PercentComplete - READ-ONLY; The percent complete of the transparent data encryption scan for a database.
4684	PercentComplete *float64 `json:"percentComplete,omitempty"`
4685}
4686
4687// TransparentDataEncryptionListResult represents the response to a list transparent data encryption
4688// configurations request.
4689type TransparentDataEncryptionListResult struct {
4690	autorest.Response `json:"-"`
4691	// Value - The list of transparent data encryption configurations.
4692	Value *[]TransparentDataEncryption `json:"value,omitempty"`
4693}
4694
4695// TransparentDataEncryptionProperties represents the properties of a database transparent data encryption.
4696type TransparentDataEncryptionProperties struct {
4697	// Status - The status of the database transparent data encryption. Possible values include: 'TransparentDataEncryptionStatusEnabled', 'TransparentDataEncryptionStatusDisabled'
4698	Status TransparentDataEncryptionStatus `json:"status,omitempty"`
4699}
4700
4701// UnlinkParameters represents the parameters for Unlink Replication Link request.
4702type UnlinkParameters struct {
4703	// ForcedTermination - Determines whether link will be terminated in a forced or a friendly way.
4704	ForcedTermination *bool `json:"forcedTermination,omitempty"`
4705}
4706