1package synapse
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"context"
22	"encoding/json"
23	"github.com/Azure/go-autorest/autorest"
24	"github.com/Azure/go-autorest/autorest/azure"
25	"github.com/Azure/go-autorest/autorest/date"
26	"github.com/Azure/go-autorest/autorest/to"
27	"github.com/Azure/go-autorest/tracing"
28	"github.com/gofrs/uuid"
29	"net/http"
30)
31
32// The package's fully qualified name.
33const fqdn = "github.com/Azure/azure-sdk-for-go/services/synapse/mgmt/2020-12-01/synapse"
34
35// AadAdminProperties workspace active directory administrator properties
36type AadAdminProperties struct {
37	// TenantID - Tenant ID of the workspace active directory administrator
38	TenantID *string `json:"tenantId,omitempty"`
39	// Login - Login of the workspace active directory administrator
40	Login *string `json:"login,omitempty"`
41	// AdministratorType - Workspace active directory administrator type
42	AdministratorType *string `json:"administratorType,omitempty"`
43	// Sid - Object ID of the workspace active directory administrator
44	Sid *string `json:"sid,omitempty"`
45}
46
47// AutoPauseProperties auto-pausing properties of a Big Data pool powered by Apache Spark
48type AutoPauseProperties struct {
49	// DelayInMinutes - Number of minutes of idle time before the Big Data pool is automatically paused.
50	DelayInMinutes *int32 `json:"delayInMinutes,omitempty"`
51	// Enabled - Whether auto-pausing is enabled for the Big Data pool.
52	Enabled *bool `json:"enabled,omitempty"`
53}
54
55// AutoScaleProperties auto-scaling properties of a Big Data pool powered by Apache Spark
56type AutoScaleProperties struct {
57	// MinNodeCount - The minimum number of nodes the Big Data pool can support.
58	MinNodeCount *int32 `json:"minNodeCount,omitempty"`
59	// Enabled - Whether automatic scaling is enabled for the Big Data pool.
60	Enabled *bool `json:"enabled,omitempty"`
61	// MaxNodeCount - The maximum number of nodes the Big Data pool can support.
62	MaxNodeCount *int32 `json:"maxNodeCount,omitempty"`
63}
64
65// AvailableRpOperation an operation that is available in this resource provider
66type AvailableRpOperation struct {
67	// Display - Display properties of the operation
68	Display *AvailableRpOperationDisplayInfo `json:"display,omitempty"`
69	// IsDataAction - Whether this operation is a data action
70	IsDataAction *string `json:"isDataAction,omitempty"`
71	// Name - Operation name
72	Name *string `json:"name,omitempty"`
73	// OperationMetaPropertyInfo - Operation properties
74	*OperationMetaPropertyInfo `json:"properties,omitempty"`
75	// Origin - Operation origin
76	Origin *string `json:"origin,omitempty"`
77}
78
79// MarshalJSON is the custom marshaler for AvailableRpOperation.
80func (aro AvailableRpOperation) MarshalJSON() ([]byte, error) {
81	objectMap := make(map[string]interface{})
82	if aro.Display != nil {
83		objectMap["display"] = aro.Display
84	}
85	if aro.IsDataAction != nil {
86		objectMap["isDataAction"] = aro.IsDataAction
87	}
88	if aro.Name != nil {
89		objectMap["name"] = aro.Name
90	}
91	if aro.OperationMetaPropertyInfo != nil {
92		objectMap["properties"] = aro.OperationMetaPropertyInfo
93	}
94	if aro.Origin != nil {
95		objectMap["origin"] = aro.Origin
96	}
97	return json.Marshal(objectMap)
98}
99
100// UnmarshalJSON is the custom unmarshaler for AvailableRpOperation struct.
101func (aro *AvailableRpOperation) UnmarshalJSON(body []byte) error {
102	var m map[string]*json.RawMessage
103	err := json.Unmarshal(body, &m)
104	if err != nil {
105		return err
106	}
107	for k, v := range m {
108		switch k {
109		case "display":
110			if v != nil {
111				var display AvailableRpOperationDisplayInfo
112				err = json.Unmarshal(*v, &display)
113				if err != nil {
114					return err
115				}
116				aro.Display = &display
117			}
118		case "isDataAction":
119			if v != nil {
120				var isDataAction string
121				err = json.Unmarshal(*v, &isDataAction)
122				if err != nil {
123					return err
124				}
125				aro.IsDataAction = &isDataAction
126			}
127		case "name":
128			if v != nil {
129				var name string
130				err = json.Unmarshal(*v, &name)
131				if err != nil {
132					return err
133				}
134				aro.Name = &name
135			}
136		case "properties":
137			if v != nil {
138				var operationMetaPropertyInfo OperationMetaPropertyInfo
139				err = json.Unmarshal(*v, &operationMetaPropertyInfo)
140				if err != nil {
141					return err
142				}
143				aro.OperationMetaPropertyInfo = &operationMetaPropertyInfo
144			}
145		case "origin":
146			if v != nil {
147				var origin string
148				err = json.Unmarshal(*v, &origin)
149				if err != nil {
150					return err
151				}
152				aro.Origin = &origin
153			}
154		}
155	}
156
157	return nil
158}
159
160// AvailableRpOperationDisplayInfo description of an available operation
161type AvailableRpOperationDisplayInfo struct {
162	// Description - Operation description
163	Description *string `json:"description,omitempty"`
164	// Resource - Resource type
165	Resource *string `json:"resource,omitempty"`
166	// Provider - Resource provider name
167	Provider *string `json:"provider,omitempty"`
168	// Operation - Operation name
169	Operation *string `json:"operation,omitempty"`
170}
171
172// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.
173type AzureEntityResource struct {
174	// Etag - READ-ONLY; Resource Etag.
175	Etag *string `json:"etag,omitempty"`
176	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
177	ID *string `json:"id,omitempty"`
178	// Name - READ-ONLY; The name of the resource
179	Name *string `json:"name,omitempty"`
180	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
181	Type *string `json:"type,omitempty"`
182}
183
184// BigDataPoolPatchInfo properties patch for a Big Data pool
185type BigDataPoolPatchInfo struct {
186	// Tags - Updated tags for the Big Data pool
187	Tags map[string]*string `json:"tags"`
188}
189
190// MarshalJSON is the custom marshaler for BigDataPoolPatchInfo.
191func (bdppi BigDataPoolPatchInfo) MarshalJSON() ([]byte, error) {
192	objectMap := make(map[string]interface{})
193	if bdppi.Tags != nil {
194		objectMap["tags"] = bdppi.Tags
195	}
196	return json.Marshal(objectMap)
197}
198
199// BigDataPoolResourceInfo a Big Data pool
200type BigDataPoolResourceInfo struct {
201	autorest.Response `json:"-"`
202	// BigDataPoolResourceProperties - Big Data pool properties
203	*BigDataPoolResourceProperties `json:"properties,omitempty"`
204	// Tags - Resource tags.
205	Tags map[string]*string `json:"tags"`
206	// Location - The geo-location where the resource lives
207	Location *string `json:"location,omitempty"`
208	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
209	ID *string `json:"id,omitempty"`
210	// Name - READ-ONLY; The name of the resource
211	Name *string `json:"name,omitempty"`
212	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
213	Type *string `json:"type,omitempty"`
214}
215
216// MarshalJSON is the custom marshaler for BigDataPoolResourceInfo.
217func (bdpri BigDataPoolResourceInfo) MarshalJSON() ([]byte, error) {
218	objectMap := make(map[string]interface{})
219	if bdpri.BigDataPoolResourceProperties != nil {
220		objectMap["properties"] = bdpri.BigDataPoolResourceProperties
221	}
222	if bdpri.Tags != nil {
223		objectMap["tags"] = bdpri.Tags
224	}
225	if bdpri.Location != nil {
226		objectMap["location"] = bdpri.Location
227	}
228	return json.Marshal(objectMap)
229}
230
231// UnmarshalJSON is the custom unmarshaler for BigDataPoolResourceInfo struct.
232func (bdpri *BigDataPoolResourceInfo) UnmarshalJSON(body []byte) error {
233	var m map[string]*json.RawMessage
234	err := json.Unmarshal(body, &m)
235	if err != nil {
236		return err
237	}
238	for k, v := range m {
239		switch k {
240		case "properties":
241			if v != nil {
242				var bigDataPoolResourceProperties BigDataPoolResourceProperties
243				err = json.Unmarshal(*v, &bigDataPoolResourceProperties)
244				if err != nil {
245					return err
246				}
247				bdpri.BigDataPoolResourceProperties = &bigDataPoolResourceProperties
248			}
249		case "tags":
250			if v != nil {
251				var tags map[string]*string
252				err = json.Unmarshal(*v, &tags)
253				if err != nil {
254					return err
255				}
256				bdpri.Tags = tags
257			}
258		case "location":
259			if v != nil {
260				var location string
261				err = json.Unmarshal(*v, &location)
262				if err != nil {
263					return err
264				}
265				bdpri.Location = &location
266			}
267		case "id":
268			if v != nil {
269				var ID string
270				err = json.Unmarshal(*v, &ID)
271				if err != nil {
272					return err
273				}
274				bdpri.ID = &ID
275			}
276		case "name":
277			if v != nil {
278				var name string
279				err = json.Unmarshal(*v, &name)
280				if err != nil {
281					return err
282				}
283				bdpri.Name = &name
284			}
285		case "type":
286			if v != nil {
287				var typeVar string
288				err = json.Unmarshal(*v, &typeVar)
289				if err != nil {
290					return err
291				}
292				bdpri.Type = &typeVar
293			}
294		}
295	}
296
297	return nil
298}
299
300// BigDataPoolResourceInfoListResult collection of Big Data pool information
301type BigDataPoolResourceInfoListResult struct {
302	autorest.Response `json:"-"`
303	// NextLink - Link to the next page of results
304	NextLink *string `json:"nextLink,omitempty"`
305	// Value - List of Big Data pools
306	Value *[]BigDataPoolResourceInfo `json:"value,omitempty"`
307}
308
309// BigDataPoolResourceInfoListResultIterator provides access to a complete listing of
310// BigDataPoolResourceInfo values.
311type BigDataPoolResourceInfoListResultIterator struct {
312	i    int
313	page BigDataPoolResourceInfoListResultPage
314}
315
316// NextWithContext advances to the next value.  If there was an error making
317// the request the iterator does not advance and the error is returned.
318func (iter *BigDataPoolResourceInfoListResultIterator) NextWithContext(ctx context.Context) (err error) {
319	if tracing.IsEnabled() {
320		ctx = tracing.StartSpan(ctx, fqdn+"/BigDataPoolResourceInfoListResultIterator.NextWithContext")
321		defer func() {
322			sc := -1
323			if iter.Response().Response.Response != nil {
324				sc = iter.Response().Response.Response.StatusCode
325			}
326			tracing.EndSpan(ctx, sc, err)
327		}()
328	}
329	iter.i++
330	if iter.i < len(iter.page.Values()) {
331		return nil
332	}
333	err = iter.page.NextWithContext(ctx)
334	if err != nil {
335		iter.i--
336		return err
337	}
338	iter.i = 0
339	return nil
340}
341
342// Next advances to the next value.  If there was an error making
343// the request the iterator does not advance and the error is returned.
344// Deprecated: Use NextWithContext() instead.
345func (iter *BigDataPoolResourceInfoListResultIterator) Next() error {
346	return iter.NextWithContext(context.Background())
347}
348
349// NotDone returns true if the enumeration should be started or is not yet complete.
350func (iter BigDataPoolResourceInfoListResultIterator) NotDone() bool {
351	return iter.page.NotDone() && iter.i < len(iter.page.Values())
352}
353
354// Response returns the raw server response from the last page request.
355func (iter BigDataPoolResourceInfoListResultIterator) Response() BigDataPoolResourceInfoListResult {
356	return iter.page.Response()
357}
358
359// Value returns the current value or a zero-initialized value if the
360// iterator has advanced beyond the end of the collection.
361func (iter BigDataPoolResourceInfoListResultIterator) Value() BigDataPoolResourceInfo {
362	if !iter.page.NotDone() {
363		return BigDataPoolResourceInfo{}
364	}
365	return iter.page.Values()[iter.i]
366}
367
368// Creates a new instance of the BigDataPoolResourceInfoListResultIterator type.
369func NewBigDataPoolResourceInfoListResultIterator(page BigDataPoolResourceInfoListResultPage) BigDataPoolResourceInfoListResultIterator {
370	return BigDataPoolResourceInfoListResultIterator{page: page}
371}
372
373// IsEmpty returns true if the ListResult contains no values.
374func (bdprilr BigDataPoolResourceInfoListResult) IsEmpty() bool {
375	return bdprilr.Value == nil || len(*bdprilr.Value) == 0
376}
377
378// hasNextLink returns true if the NextLink is not empty.
379func (bdprilr BigDataPoolResourceInfoListResult) hasNextLink() bool {
380	return bdprilr.NextLink != nil && len(*bdprilr.NextLink) != 0
381}
382
383// bigDataPoolResourceInfoListResultPreparer prepares a request to retrieve the next set of results.
384// It returns nil if no more results exist.
385func (bdprilr BigDataPoolResourceInfoListResult) bigDataPoolResourceInfoListResultPreparer(ctx context.Context) (*http.Request, error) {
386	if !bdprilr.hasNextLink() {
387		return nil, nil
388	}
389	return autorest.Prepare((&http.Request{}).WithContext(ctx),
390		autorest.AsJSON(),
391		autorest.AsGet(),
392		autorest.WithBaseURL(to.String(bdprilr.NextLink)))
393}
394
395// BigDataPoolResourceInfoListResultPage contains a page of BigDataPoolResourceInfo values.
396type BigDataPoolResourceInfoListResultPage struct {
397	fn      func(context.Context, BigDataPoolResourceInfoListResult) (BigDataPoolResourceInfoListResult, error)
398	bdprilr BigDataPoolResourceInfoListResult
399}
400
401// NextWithContext advances to the next page of values.  If there was an error making
402// the request the page does not advance and the error is returned.
403func (page *BigDataPoolResourceInfoListResultPage) NextWithContext(ctx context.Context) (err error) {
404	if tracing.IsEnabled() {
405		ctx = tracing.StartSpan(ctx, fqdn+"/BigDataPoolResourceInfoListResultPage.NextWithContext")
406		defer func() {
407			sc := -1
408			if page.Response().Response.Response != nil {
409				sc = page.Response().Response.Response.StatusCode
410			}
411			tracing.EndSpan(ctx, sc, err)
412		}()
413	}
414	for {
415		next, err := page.fn(ctx, page.bdprilr)
416		if err != nil {
417			return err
418		}
419		page.bdprilr = next
420		if !next.hasNextLink() || !next.IsEmpty() {
421			break
422		}
423	}
424	return nil
425}
426
427// Next advances to the next page of values.  If there was an error making
428// the request the page does not advance and the error is returned.
429// Deprecated: Use NextWithContext() instead.
430func (page *BigDataPoolResourceInfoListResultPage) Next() error {
431	return page.NextWithContext(context.Background())
432}
433
434// NotDone returns true if the page enumeration should be started or is not yet complete.
435func (page BigDataPoolResourceInfoListResultPage) NotDone() bool {
436	return !page.bdprilr.IsEmpty()
437}
438
439// Response returns the raw server response from the last page request.
440func (page BigDataPoolResourceInfoListResultPage) Response() BigDataPoolResourceInfoListResult {
441	return page.bdprilr
442}
443
444// Values returns the slice of values for the current page or nil if there are no values.
445func (page BigDataPoolResourceInfoListResultPage) Values() []BigDataPoolResourceInfo {
446	if page.bdprilr.IsEmpty() {
447		return nil
448	}
449	return *page.bdprilr.Value
450}
451
452// Creates a new instance of the BigDataPoolResourceInfoListResultPage type.
453func NewBigDataPoolResourceInfoListResultPage(cur BigDataPoolResourceInfoListResult, getNextPage func(context.Context, BigDataPoolResourceInfoListResult) (BigDataPoolResourceInfoListResult, error)) BigDataPoolResourceInfoListResultPage {
454	return BigDataPoolResourceInfoListResultPage{
455		fn:      getNextPage,
456		bdprilr: cur,
457	}
458}
459
460// BigDataPoolResourceProperties properties of a Big Data pool powered by Apache Spark
461type BigDataPoolResourceProperties struct {
462	// ProvisioningState - The state of the Big Data pool.
463	ProvisioningState *string `json:"provisioningState,omitempty"`
464	// AutoScale - Auto-scaling properties
465	AutoScale *AutoScaleProperties `json:"autoScale,omitempty"`
466	// CreationDate - The time when the Big Data pool was created.
467	CreationDate *date.Time `json:"creationDate,omitempty"`
468	// AutoPause - Auto-pausing properties
469	AutoPause *AutoPauseProperties `json:"autoPause,omitempty"`
470	// IsComputeIsolationEnabled - Whether compute isolation is required or not.
471	IsComputeIsolationEnabled *bool `json:"isComputeIsolationEnabled,omitempty"`
472	// SessionLevelPackagesEnabled - Whether session level packages enabled.
473	SessionLevelPackagesEnabled *bool `json:"sessionLevelPackagesEnabled,omitempty"`
474	// CacheSize - The cache size
475	CacheSize *int32 `json:"cacheSize,omitempty"`
476	// DynamicExecutorAllocation - Dynamic Executor Allocation
477	DynamicExecutorAllocation *DynamicExecutorAllocation `json:"dynamicExecutorAllocation,omitempty"`
478	// SparkEventsFolder - The Spark events folder
479	SparkEventsFolder *string `json:"sparkEventsFolder,omitempty"`
480	// NodeCount - The number of nodes in the Big Data pool.
481	NodeCount *int32 `json:"nodeCount,omitempty"`
482	// LibraryRequirements - Library version requirements
483	LibraryRequirements *LibraryRequirements `json:"libraryRequirements,omitempty"`
484	// CustomLibraries - List of custom libraries/packages associated with the spark pool.
485	CustomLibraries *[]LibraryInfo `json:"customLibraries,omitempty"`
486	// SparkConfigProperties - Spark configuration file to specify additional properties
487	SparkConfigProperties *LibraryRequirements `json:"sparkConfigProperties,omitempty"`
488	// SparkVersion - The Apache Spark version.
489	SparkVersion *string `json:"sparkVersion,omitempty"`
490	// DefaultSparkLogFolder - The default folder where Spark logs will be written.
491	DefaultSparkLogFolder *string `json:"defaultSparkLogFolder,omitempty"`
492	// NodeSize - The level of compute power that each node in the Big Data pool has. Possible values include: 'NodeSizeNone', 'NodeSizeSmall', 'NodeSizeMedium', 'NodeSizeLarge', 'NodeSizeXLarge', 'NodeSizeXXLarge', 'NodeSizeXXXLarge'
493	NodeSize NodeSize `json:"nodeSize,omitempty"`
494	// NodeSizeFamily - The kind of nodes that the Big Data pool provides. Possible values include: 'NodeSizeFamilyNone', 'NodeSizeFamilyMemoryOptimized'
495	NodeSizeFamily NodeSizeFamily `json:"nodeSizeFamily,omitempty"`
496	// LastSucceededTimestamp - READ-ONLY; The time when the Big Data pool was updated successfully.
497	LastSucceededTimestamp *date.Time `json:"lastSucceededTimestamp,omitempty"`
498}
499
500// MarshalJSON is the custom marshaler for BigDataPoolResourceProperties.
501func (bdprp BigDataPoolResourceProperties) MarshalJSON() ([]byte, error) {
502	objectMap := make(map[string]interface{})
503	if bdprp.ProvisioningState != nil {
504		objectMap["provisioningState"] = bdprp.ProvisioningState
505	}
506	if bdprp.AutoScale != nil {
507		objectMap["autoScale"] = bdprp.AutoScale
508	}
509	if bdprp.CreationDate != nil {
510		objectMap["creationDate"] = bdprp.CreationDate
511	}
512	if bdprp.AutoPause != nil {
513		objectMap["autoPause"] = bdprp.AutoPause
514	}
515	if bdprp.IsComputeIsolationEnabled != nil {
516		objectMap["isComputeIsolationEnabled"] = bdprp.IsComputeIsolationEnabled
517	}
518	if bdprp.SessionLevelPackagesEnabled != nil {
519		objectMap["sessionLevelPackagesEnabled"] = bdprp.SessionLevelPackagesEnabled
520	}
521	if bdprp.CacheSize != nil {
522		objectMap["cacheSize"] = bdprp.CacheSize
523	}
524	if bdprp.DynamicExecutorAllocation != nil {
525		objectMap["dynamicExecutorAllocation"] = bdprp.DynamicExecutorAllocation
526	}
527	if bdprp.SparkEventsFolder != nil {
528		objectMap["sparkEventsFolder"] = bdprp.SparkEventsFolder
529	}
530	if bdprp.NodeCount != nil {
531		objectMap["nodeCount"] = bdprp.NodeCount
532	}
533	if bdprp.LibraryRequirements != nil {
534		objectMap["libraryRequirements"] = bdprp.LibraryRequirements
535	}
536	if bdprp.CustomLibraries != nil {
537		objectMap["customLibraries"] = bdprp.CustomLibraries
538	}
539	if bdprp.SparkConfigProperties != nil {
540		objectMap["sparkConfigProperties"] = bdprp.SparkConfigProperties
541	}
542	if bdprp.SparkVersion != nil {
543		objectMap["sparkVersion"] = bdprp.SparkVersion
544	}
545	if bdprp.DefaultSparkLogFolder != nil {
546		objectMap["defaultSparkLogFolder"] = bdprp.DefaultSparkLogFolder
547	}
548	if bdprp.NodeSize != "" {
549		objectMap["nodeSize"] = bdprp.NodeSize
550	}
551	if bdprp.NodeSizeFamily != "" {
552		objectMap["nodeSizeFamily"] = bdprp.NodeSizeFamily
553	}
554	return json.Marshal(objectMap)
555}
556
557// BigDataPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
558// long-running operation.
559type BigDataPoolsCreateOrUpdateFuture struct {
560	azure.FutureAPI
561	// Result returns the result of the asynchronous operation.
562	// If the operation has not completed it will return an error.
563	Result func(BigDataPoolsClient) (BigDataPoolResourceInfo, error)
564}
565
566// BigDataPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
567// operation.
568type BigDataPoolsDeleteFuture struct {
569	azure.FutureAPI
570	// Result returns the result of the asynchronous operation.
571	// If the operation has not completed it will return an error.
572	Result func(BigDataPoolsClient) (SetObject, error)
573}
574
575// CheckNameAvailabilityRequest a request about whether a workspace name is available
576type CheckNameAvailabilityRequest struct {
577	// Name - Workspace name
578	Name *string `json:"name,omitempty"`
579	// Type - Type: workspace
580	Type *string `json:"type,omitempty"`
581}
582
583// CheckNameAvailabilityResponse a response saying whether the workspace name is available
584type CheckNameAvailabilityResponse struct {
585	autorest.Response `json:"-"`
586	// Message - Validation message
587	Message *string `json:"message,omitempty"`
588	// Available - Whether the workspace name is available
589	Available *bool `json:"available,omitempty"`
590	// Reason - Reason the workspace name is or is not available
591	Reason *string `json:"reason,omitempty"`
592	// Name - Workspace name
593	Name *string `json:"name,omitempty"`
594}
595
596// CmdkeySetup the custom setup of running cmdkey commands.
597type CmdkeySetup struct {
598	// CmdkeySetupTypeProperties - Cmdkey command custom setup type properties.
599	*CmdkeySetupTypeProperties `json:"typeProperties,omitempty"`
600	// Type - Possible values include: 'TypeCustomSetupBase', 'TypeCmdkeySetup', 'TypeEnvironmentVariableSetup', 'TypeComponentSetup'
601	Type TypeBasicCustomSetupBase `json:"type,omitempty"`
602}
603
604// MarshalJSON is the custom marshaler for CmdkeySetup.
605func (cs CmdkeySetup) MarshalJSON() ([]byte, error) {
606	cs.Type = TypeCmdkeySetup
607	objectMap := make(map[string]interface{})
608	if cs.CmdkeySetupTypeProperties != nil {
609		objectMap["typeProperties"] = cs.CmdkeySetupTypeProperties
610	}
611	if cs.Type != "" {
612		objectMap["type"] = cs.Type
613	}
614	return json.Marshal(objectMap)
615}
616
617// AsCmdkeySetup is the BasicCustomSetupBase implementation for CmdkeySetup.
618func (cs CmdkeySetup) AsCmdkeySetup() (*CmdkeySetup, bool) {
619	return &cs, true
620}
621
622// AsEnvironmentVariableSetup is the BasicCustomSetupBase implementation for CmdkeySetup.
623func (cs CmdkeySetup) AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) {
624	return nil, false
625}
626
627// AsComponentSetup is the BasicCustomSetupBase implementation for CmdkeySetup.
628func (cs CmdkeySetup) AsComponentSetup() (*ComponentSetup, bool) {
629	return nil, false
630}
631
632// AsCustomSetupBase is the BasicCustomSetupBase implementation for CmdkeySetup.
633func (cs CmdkeySetup) AsCustomSetupBase() (*CustomSetupBase, bool) {
634	return nil, false
635}
636
637// AsBasicCustomSetupBase is the BasicCustomSetupBase implementation for CmdkeySetup.
638func (cs CmdkeySetup) AsBasicCustomSetupBase() (BasicCustomSetupBase, bool) {
639	return &cs, true
640}
641
642// UnmarshalJSON is the custom unmarshaler for CmdkeySetup struct.
643func (cs *CmdkeySetup) UnmarshalJSON(body []byte) error {
644	var m map[string]*json.RawMessage
645	err := json.Unmarshal(body, &m)
646	if err != nil {
647		return err
648	}
649	for k, v := range m {
650		switch k {
651		case "typeProperties":
652			if v != nil {
653				var cmdkeySetupTypeProperties CmdkeySetupTypeProperties
654				err = json.Unmarshal(*v, &cmdkeySetupTypeProperties)
655				if err != nil {
656					return err
657				}
658				cs.CmdkeySetupTypeProperties = &cmdkeySetupTypeProperties
659			}
660		case "type":
661			if v != nil {
662				var typeVar TypeBasicCustomSetupBase
663				err = json.Unmarshal(*v, &typeVar)
664				if err != nil {
665					return err
666				}
667				cs.Type = typeVar
668			}
669		}
670	}
671
672	return nil
673}
674
675// CmdkeySetupTypeProperties cmdkey command custom setup type properties.
676type CmdkeySetupTypeProperties struct {
677	// TargetName - The server name of data source access.
678	TargetName interface{} `json:"targetName,omitempty"`
679	// UserName - The user name of data source access.
680	UserName interface{} `json:"userName,omitempty"`
681	// Password - The password of data source access.
682	Password BasicSecretBase `json:"password,omitempty"`
683}
684
685// UnmarshalJSON is the custom unmarshaler for CmdkeySetupTypeProperties struct.
686func (cstp *CmdkeySetupTypeProperties) UnmarshalJSON(body []byte) error {
687	var m map[string]*json.RawMessage
688	err := json.Unmarshal(body, &m)
689	if err != nil {
690		return err
691	}
692	for k, v := range m {
693		switch k {
694		case "targetName":
695			if v != nil {
696				var targetName interface{}
697				err = json.Unmarshal(*v, &targetName)
698				if err != nil {
699					return err
700				}
701				cstp.TargetName = targetName
702			}
703		case "userName":
704			if v != nil {
705				var userName interface{}
706				err = json.Unmarshal(*v, &userName)
707				if err != nil {
708					return err
709				}
710				cstp.UserName = userName
711			}
712		case "password":
713			if v != nil {
714				password, err := unmarshalBasicSecretBase(*v)
715				if err != nil {
716					return err
717				}
718				cstp.Password = password
719			}
720		}
721	}
722
723	return nil
724}
725
726// ComponentSetup the custom setup of installing 3rd party components.
727type ComponentSetup struct {
728	// LicensedComponentSetupTypeProperties - Install 3rd party component type properties.
729	*LicensedComponentSetupTypeProperties `json:"typeProperties,omitempty"`
730	// Type - Possible values include: 'TypeCustomSetupBase', 'TypeCmdkeySetup', 'TypeEnvironmentVariableSetup', 'TypeComponentSetup'
731	Type TypeBasicCustomSetupBase `json:"type,omitempty"`
732}
733
734// MarshalJSON is the custom marshaler for ComponentSetup.
735func (cs ComponentSetup) MarshalJSON() ([]byte, error) {
736	cs.Type = TypeComponentSetup
737	objectMap := make(map[string]interface{})
738	if cs.LicensedComponentSetupTypeProperties != nil {
739		objectMap["typeProperties"] = cs.LicensedComponentSetupTypeProperties
740	}
741	if cs.Type != "" {
742		objectMap["type"] = cs.Type
743	}
744	return json.Marshal(objectMap)
745}
746
747// AsCmdkeySetup is the BasicCustomSetupBase implementation for ComponentSetup.
748func (cs ComponentSetup) AsCmdkeySetup() (*CmdkeySetup, bool) {
749	return nil, false
750}
751
752// AsEnvironmentVariableSetup is the BasicCustomSetupBase implementation for ComponentSetup.
753func (cs ComponentSetup) AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) {
754	return nil, false
755}
756
757// AsComponentSetup is the BasicCustomSetupBase implementation for ComponentSetup.
758func (cs ComponentSetup) AsComponentSetup() (*ComponentSetup, bool) {
759	return &cs, true
760}
761
762// AsCustomSetupBase is the BasicCustomSetupBase implementation for ComponentSetup.
763func (cs ComponentSetup) AsCustomSetupBase() (*CustomSetupBase, bool) {
764	return nil, false
765}
766
767// AsBasicCustomSetupBase is the BasicCustomSetupBase implementation for ComponentSetup.
768func (cs ComponentSetup) AsBasicCustomSetupBase() (BasicCustomSetupBase, bool) {
769	return &cs, true
770}
771
772// UnmarshalJSON is the custom unmarshaler for ComponentSetup struct.
773func (cs *ComponentSetup) UnmarshalJSON(body []byte) error {
774	var m map[string]*json.RawMessage
775	err := json.Unmarshal(body, &m)
776	if err != nil {
777		return err
778	}
779	for k, v := range m {
780		switch k {
781		case "typeProperties":
782			if v != nil {
783				var licensedComponentSetupTypeProperties LicensedComponentSetupTypeProperties
784				err = json.Unmarshal(*v, &licensedComponentSetupTypeProperties)
785				if err != nil {
786					return err
787				}
788				cs.LicensedComponentSetupTypeProperties = &licensedComponentSetupTypeProperties
789			}
790		case "type":
791			if v != nil {
792				var typeVar TypeBasicCustomSetupBase
793				err = json.Unmarshal(*v, &typeVar)
794				if err != nil {
795					return err
796				}
797				cs.Type = typeVar
798			}
799		}
800	}
801
802	return nil
803}
804
805// CreateSQLPoolRestorePointDefinition contains the information necessary to perform a create Sql pool
806// restore point operation.
807type CreateSQLPoolRestorePointDefinition struct {
808	// RestorePointLabel - The restore point label to apply
809	RestorePointLabel *string `json:"restorePointLabel,omitempty"`
810}
811
812// CustomerManagedKeyDetails details of the customer managed key associated with the workspace
813type CustomerManagedKeyDetails struct {
814	// Status - READ-ONLY; The customer managed key status on the workspace
815	Status *string `json:"status,omitempty"`
816	// Key - The key object of the workspace
817	Key *WorkspaceKeyDetails `json:"key,omitempty"`
818}
819
820// MarshalJSON is the custom marshaler for CustomerManagedKeyDetails.
821func (cmkd CustomerManagedKeyDetails) MarshalJSON() ([]byte, error) {
822	objectMap := make(map[string]interface{})
823	if cmkd.Key != nil {
824		objectMap["key"] = cmkd.Key
825	}
826	return json.Marshal(objectMap)
827}
828
829// BasicCustomSetupBase the base definition of the custom setup.
830type BasicCustomSetupBase interface {
831	AsCmdkeySetup() (*CmdkeySetup, bool)
832	AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool)
833	AsComponentSetup() (*ComponentSetup, bool)
834	AsCustomSetupBase() (*CustomSetupBase, bool)
835}
836
837// CustomSetupBase the base definition of the custom setup.
838type CustomSetupBase struct {
839	// Type - Possible values include: 'TypeCustomSetupBase', 'TypeCmdkeySetup', 'TypeEnvironmentVariableSetup', 'TypeComponentSetup'
840	Type TypeBasicCustomSetupBase `json:"type,omitempty"`
841}
842
843func unmarshalBasicCustomSetupBase(body []byte) (BasicCustomSetupBase, error) {
844	var m map[string]interface{}
845	err := json.Unmarshal(body, &m)
846	if err != nil {
847		return nil, err
848	}
849
850	switch m["type"] {
851	case string(TypeCmdkeySetup):
852		var cs CmdkeySetup
853		err := json.Unmarshal(body, &cs)
854		return cs, err
855	case string(TypeEnvironmentVariableSetup):
856		var evs EnvironmentVariableSetup
857		err := json.Unmarshal(body, &evs)
858		return evs, err
859	case string(TypeComponentSetup):
860		var cs ComponentSetup
861		err := json.Unmarshal(body, &cs)
862		return cs, err
863	default:
864		var csb CustomSetupBase
865		err := json.Unmarshal(body, &csb)
866		return csb, err
867	}
868}
869func unmarshalBasicCustomSetupBaseArray(body []byte) ([]BasicCustomSetupBase, error) {
870	var rawMessages []*json.RawMessage
871	err := json.Unmarshal(body, &rawMessages)
872	if err != nil {
873		return nil, err
874	}
875
876	csbArray := make([]BasicCustomSetupBase, len(rawMessages))
877
878	for index, rawMessage := range rawMessages {
879		csb, err := unmarshalBasicCustomSetupBase(*rawMessage)
880		if err != nil {
881			return nil, err
882		}
883		csbArray[index] = csb
884	}
885	return csbArray, nil
886}
887
888// MarshalJSON is the custom marshaler for CustomSetupBase.
889func (csb CustomSetupBase) MarshalJSON() ([]byte, error) {
890	csb.Type = TypeCustomSetupBase
891	objectMap := make(map[string]interface{})
892	if csb.Type != "" {
893		objectMap["type"] = csb.Type
894	}
895	return json.Marshal(objectMap)
896}
897
898// AsCmdkeySetup is the BasicCustomSetupBase implementation for CustomSetupBase.
899func (csb CustomSetupBase) AsCmdkeySetup() (*CmdkeySetup, bool) {
900	return nil, false
901}
902
903// AsEnvironmentVariableSetup is the BasicCustomSetupBase implementation for CustomSetupBase.
904func (csb CustomSetupBase) AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) {
905	return nil, false
906}
907
908// AsComponentSetup is the BasicCustomSetupBase implementation for CustomSetupBase.
909func (csb CustomSetupBase) AsComponentSetup() (*ComponentSetup, bool) {
910	return nil, false
911}
912
913// AsCustomSetupBase is the BasicCustomSetupBase implementation for CustomSetupBase.
914func (csb CustomSetupBase) AsCustomSetupBase() (*CustomSetupBase, bool) {
915	return &csb, true
916}
917
918// AsBasicCustomSetupBase is the BasicCustomSetupBase implementation for CustomSetupBase.
919func (csb CustomSetupBase) AsBasicCustomSetupBase() (BasicCustomSetupBase, bool) {
920	return &csb, true
921}
922
923// DataLakeStorageAccountDetails details of the data lake storage account associated with the workspace
924type DataLakeStorageAccountDetails struct {
925	// AccountURL - Account URL
926	AccountURL *string `json:"accountUrl,omitempty"`
927	// Filesystem - Filesystem name
928	Filesystem *string `json:"filesystem,omitempty"`
929}
930
931// DataMaskingPolicy ...
932type DataMaskingPolicy struct {
933	autorest.Response `json:"-"`
934	// DataMaskingPolicyProperties - The properties of the data masking policy.
935	*DataMaskingPolicyProperties `json:"properties,omitempty"`
936	// Location - READ-ONLY; The location of the data masking policy.
937	Location *string `json:"location,omitempty"`
938	// Kind - READ-ONLY; The kind of data masking policy. Metadata, used for Azure portal.
939	Kind *string `json:"kind,omitempty"`
940	// ManagedBy - READ-ONLY; Fully qualified resource ID of the sql pool
941	ManagedBy *string `json:"managedBy,omitempty"`
942	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
943	ID *string `json:"id,omitempty"`
944	// Name - READ-ONLY; The name of the resource
945	Name *string `json:"name,omitempty"`
946	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
947	Type *string `json:"type,omitempty"`
948}
949
950// MarshalJSON is the custom marshaler for DataMaskingPolicy.
951func (dmp DataMaskingPolicy) MarshalJSON() ([]byte, error) {
952	objectMap := make(map[string]interface{})
953	if dmp.DataMaskingPolicyProperties != nil {
954		objectMap["properties"] = dmp.DataMaskingPolicyProperties
955	}
956	return json.Marshal(objectMap)
957}
958
959// UnmarshalJSON is the custom unmarshaler for DataMaskingPolicy struct.
960func (dmp *DataMaskingPolicy) UnmarshalJSON(body []byte) error {
961	var m map[string]*json.RawMessage
962	err := json.Unmarshal(body, &m)
963	if err != nil {
964		return err
965	}
966	for k, v := range m {
967		switch k {
968		case "properties":
969			if v != nil {
970				var dataMaskingPolicyProperties DataMaskingPolicyProperties
971				err = json.Unmarshal(*v, &dataMaskingPolicyProperties)
972				if err != nil {
973					return err
974				}
975				dmp.DataMaskingPolicyProperties = &dataMaskingPolicyProperties
976			}
977		case "location":
978			if v != nil {
979				var location string
980				err = json.Unmarshal(*v, &location)
981				if err != nil {
982					return err
983				}
984				dmp.Location = &location
985			}
986		case "kind":
987			if v != nil {
988				var kind string
989				err = json.Unmarshal(*v, &kind)
990				if err != nil {
991					return err
992				}
993				dmp.Kind = &kind
994			}
995		case "managedBy":
996			if v != nil {
997				var managedBy string
998				err = json.Unmarshal(*v, &managedBy)
999				if err != nil {
1000					return err
1001				}
1002				dmp.ManagedBy = &managedBy
1003			}
1004		case "id":
1005			if v != nil {
1006				var ID string
1007				err = json.Unmarshal(*v, &ID)
1008				if err != nil {
1009					return err
1010				}
1011				dmp.ID = &ID
1012			}
1013		case "name":
1014			if v != nil {
1015				var name string
1016				err = json.Unmarshal(*v, &name)
1017				if err != nil {
1018					return err
1019				}
1020				dmp.Name = &name
1021			}
1022		case "type":
1023			if v != nil {
1024				var typeVar string
1025				err = json.Unmarshal(*v, &typeVar)
1026				if err != nil {
1027					return err
1028				}
1029				dmp.Type = &typeVar
1030			}
1031		}
1032	}
1033
1034	return nil
1035}
1036
1037// DataMaskingPolicyProperties the properties of a database data masking policy.
1038type DataMaskingPolicyProperties struct {
1039	// DataMaskingState - The state of the data masking policy. Possible values include: 'DataMaskingStateDisabled', 'DataMaskingStateEnabled'
1040	DataMaskingState DataMaskingState `json:"dataMaskingState,omitempty"`
1041	// 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.
1042	ExemptPrincipals *string `json:"exemptPrincipals,omitempty"`
1043	// ApplicationPrincipals - READ-ONLY; The list of the application principals. This is a legacy parameter and is no longer used.
1044	ApplicationPrincipals *string `json:"applicationPrincipals,omitempty"`
1045	// MaskingLevel - READ-ONLY; The masking level. This is a legacy parameter and is no longer used.
1046	MaskingLevel *string `json:"maskingLevel,omitempty"`
1047}
1048
1049// MarshalJSON is the custom marshaler for DataMaskingPolicyProperties.
1050func (dmpp DataMaskingPolicyProperties) MarshalJSON() ([]byte, error) {
1051	objectMap := make(map[string]interface{})
1052	if dmpp.DataMaskingState != "" {
1053		objectMap["dataMaskingState"] = dmpp.DataMaskingState
1054	}
1055	if dmpp.ExemptPrincipals != nil {
1056		objectMap["exemptPrincipals"] = dmpp.ExemptPrincipals
1057	}
1058	return json.Marshal(objectMap)
1059}
1060
1061// DataMaskingRule represents a Sql pool data masking rule.
1062type DataMaskingRule struct {
1063	autorest.Response `json:"-"`
1064	// DataMaskingRuleProperties - The properties of the resource.
1065	*DataMaskingRuleProperties `json:"properties,omitempty"`
1066	// Location - READ-ONLY; The location of the data masking rule.
1067	Location *string `json:"location,omitempty"`
1068	// Kind - READ-ONLY; The kind of Data Masking Rule. Metadata, used for Azure portal.
1069	Kind *string `json:"kind,omitempty"`
1070	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1071	ID *string `json:"id,omitempty"`
1072	// Name - READ-ONLY; The name of the resource
1073	Name *string `json:"name,omitempty"`
1074	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1075	Type *string `json:"type,omitempty"`
1076}
1077
1078// MarshalJSON is the custom marshaler for DataMaskingRule.
1079func (dmr DataMaskingRule) MarshalJSON() ([]byte, error) {
1080	objectMap := make(map[string]interface{})
1081	if dmr.DataMaskingRuleProperties != nil {
1082		objectMap["properties"] = dmr.DataMaskingRuleProperties
1083	}
1084	return json.Marshal(objectMap)
1085}
1086
1087// UnmarshalJSON is the custom unmarshaler for DataMaskingRule struct.
1088func (dmr *DataMaskingRule) UnmarshalJSON(body []byte) error {
1089	var m map[string]*json.RawMessage
1090	err := json.Unmarshal(body, &m)
1091	if err != nil {
1092		return err
1093	}
1094	for k, v := range m {
1095		switch k {
1096		case "properties":
1097			if v != nil {
1098				var dataMaskingRuleProperties DataMaskingRuleProperties
1099				err = json.Unmarshal(*v, &dataMaskingRuleProperties)
1100				if err != nil {
1101					return err
1102				}
1103				dmr.DataMaskingRuleProperties = &dataMaskingRuleProperties
1104			}
1105		case "location":
1106			if v != nil {
1107				var location string
1108				err = json.Unmarshal(*v, &location)
1109				if err != nil {
1110					return err
1111				}
1112				dmr.Location = &location
1113			}
1114		case "kind":
1115			if v != nil {
1116				var kind string
1117				err = json.Unmarshal(*v, &kind)
1118				if err != nil {
1119					return err
1120				}
1121				dmr.Kind = &kind
1122			}
1123		case "id":
1124			if v != nil {
1125				var ID string
1126				err = json.Unmarshal(*v, &ID)
1127				if err != nil {
1128					return err
1129				}
1130				dmr.ID = &ID
1131			}
1132		case "name":
1133			if v != nil {
1134				var name string
1135				err = json.Unmarshal(*v, &name)
1136				if err != nil {
1137					return err
1138				}
1139				dmr.Name = &name
1140			}
1141		case "type":
1142			if v != nil {
1143				var typeVar string
1144				err = json.Unmarshal(*v, &typeVar)
1145				if err != nil {
1146					return err
1147				}
1148				dmr.Type = &typeVar
1149			}
1150		}
1151	}
1152
1153	return nil
1154}
1155
1156// DataMaskingRuleListResult the response to a list data masking rules request.
1157type DataMaskingRuleListResult struct {
1158	autorest.Response `json:"-"`
1159	// Value - The list of Sql pool data masking rules.
1160	Value *[]DataMaskingRule `json:"value,omitempty"`
1161}
1162
1163// DataMaskingRuleProperties the properties of a Sql pool data masking rule.
1164type DataMaskingRuleProperties struct {
1165	// ID - READ-ONLY; The rule Id.
1166	ID *string `json:"id,omitempty"`
1167	// AliasName - The alias name. This is a legacy parameter and is no longer used.
1168	AliasName *string `json:"aliasName,omitempty"`
1169	// 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'
1170	RuleState DataMaskingRuleState `json:"ruleState,omitempty"`
1171	// SchemaName - The schema name on which the data masking rule is applied.
1172	SchemaName *string `json:"schemaName,omitempty"`
1173	// TableName - The table name on which the data masking rule is applied.
1174	TableName *string `json:"tableName,omitempty"`
1175	// ColumnName - The column name on which the data masking rule is applied.
1176	ColumnName *string `json:"columnName,omitempty"`
1177	// MaskingFunction - The masking function that is used for the data masking rule. Possible values include: 'DataMaskingFunctionDefault', 'DataMaskingFunctionCCN', 'DataMaskingFunctionEmail', 'DataMaskingFunctionNumber', 'DataMaskingFunctionSSN', 'DataMaskingFunctionText'
1178	MaskingFunction DataMaskingFunction `json:"maskingFunction,omitempty"`
1179	// NumberFrom - The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.
1180	NumberFrom *string `json:"numberFrom,omitempty"`
1181	// NumberTo - The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.
1182	NumberTo *string `json:"numberTo,omitempty"`
1183	// 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.
1184	PrefixSize *string `json:"prefixSize,omitempty"`
1185	// 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.
1186	SuffixSize *string `json:"suffixSize,omitempty"`
1187	// 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.
1188	ReplacementString *string `json:"replacementString,omitempty"`
1189}
1190
1191// MarshalJSON is the custom marshaler for DataMaskingRuleProperties.
1192func (dmrp DataMaskingRuleProperties) MarshalJSON() ([]byte, error) {
1193	objectMap := make(map[string]interface{})
1194	if dmrp.AliasName != nil {
1195		objectMap["aliasName"] = dmrp.AliasName
1196	}
1197	if dmrp.RuleState != "" {
1198		objectMap["ruleState"] = dmrp.RuleState
1199	}
1200	if dmrp.SchemaName != nil {
1201		objectMap["schemaName"] = dmrp.SchemaName
1202	}
1203	if dmrp.TableName != nil {
1204		objectMap["tableName"] = dmrp.TableName
1205	}
1206	if dmrp.ColumnName != nil {
1207		objectMap["columnName"] = dmrp.ColumnName
1208	}
1209	if dmrp.MaskingFunction != "" {
1210		objectMap["maskingFunction"] = dmrp.MaskingFunction
1211	}
1212	if dmrp.NumberFrom != nil {
1213		objectMap["numberFrom"] = dmrp.NumberFrom
1214	}
1215	if dmrp.NumberTo != nil {
1216		objectMap["numberTo"] = dmrp.NumberTo
1217	}
1218	if dmrp.PrefixSize != nil {
1219		objectMap["prefixSize"] = dmrp.PrefixSize
1220	}
1221	if dmrp.SuffixSize != nil {
1222		objectMap["suffixSize"] = dmrp.SuffixSize
1223	}
1224	if dmrp.ReplacementString != nil {
1225		objectMap["replacementString"] = dmrp.ReplacementString
1226	}
1227	return json.Marshal(objectMap)
1228}
1229
1230// DataWarehouseUserActivities user activities of a data warehouse
1231type DataWarehouseUserActivities struct {
1232	autorest.Response `json:"-"`
1233	// DataWarehouseUserActivitiesProperties - Resource properties.
1234	*DataWarehouseUserActivitiesProperties `json:"properties,omitempty"`
1235	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1236	ID *string `json:"id,omitempty"`
1237	// Name - READ-ONLY; The name of the resource
1238	Name *string `json:"name,omitempty"`
1239	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1240	Type *string `json:"type,omitempty"`
1241}
1242
1243// MarshalJSON is the custom marshaler for DataWarehouseUserActivities.
1244func (dwua DataWarehouseUserActivities) MarshalJSON() ([]byte, error) {
1245	objectMap := make(map[string]interface{})
1246	if dwua.DataWarehouseUserActivitiesProperties != nil {
1247		objectMap["properties"] = dwua.DataWarehouseUserActivitiesProperties
1248	}
1249	return json.Marshal(objectMap)
1250}
1251
1252// UnmarshalJSON is the custom unmarshaler for DataWarehouseUserActivities struct.
1253func (dwua *DataWarehouseUserActivities) UnmarshalJSON(body []byte) error {
1254	var m map[string]*json.RawMessage
1255	err := json.Unmarshal(body, &m)
1256	if err != nil {
1257		return err
1258	}
1259	for k, v := range m {
1260		switch k {
1261		case "properties":
1262			if v != nil {
1263				var dataWarehouseUserActivitiesProperties DataWarehouseUserActivitiesProperties
1264				err = json.Unmarshal(*v, &dataWarehouseUserActivitiesProperties)
1265				if err != nil {
1266					return err
1267				}
1268				dwua.DataWarehouseUserActivitiesProperties = &dataWarehouseUserActivitiesProperties
1269			}
1270		case "id":
1271			if v != nil {
1272				var ID string
1273				err = json.Unmarshal(*v, &ID)
1274				if err != nil {
1275					return err
1276				}
1277				dwua.ID = &ID
1278			}
1279		case "name":
1280			if v != nil {
1281				var name string
1282				err = json.Unmarshal(*v, &name)
1283				if err != nil {
1284					return err
1285				}
1286				dwua.Name = &name
1287			}
1288		case "type":
1289			if v != nil {
1290				var typeVar string
1291				err = json.Unmarshal(*v, &typeVar)
1292				if err != nil {
1293					return err
1294				}
1295				dwua.Type = &typeVar
1296			}
1297		}
1298	}
1299
1300	return nil
1301}
1302
1303// DataWarehouseUserActivitiesProperties user activities of a data warehouse. This currently includes the
1304// count of running or suspended queries. For more information, please view the sys.dm_pdw_exec_requests
1305// dynamic management view (DMV).
1306type DataWarehouseUserActivitiesProperties struct {
1307	// ActiveQueriesCount - READ-ONLY; Count of running and suspended queries.
1308	ActiveQueriesCount *int32 `json:"activeQueriesCount,omitempty"`
1309}
1310
1311// DynamicExecutorAllocation dynamic Executor Allocation Properties
1312type DynamicExecutorAllocation struct {
1313	// Enabled - Indicates whether Dynamic Executor Allocation is enabled or not.
1314	Enabled *bool `json:"enabled,omitempty"`
1315}
1316
1317// EncryptionDetails details of the encryption associated with the workspace
1318type EncryptionDetails struct {
1319	// DoubleEncryptionEnabled - READ-ONLY; Double Encryption enabled
1320	DoubleEncryptionEnabled *bool `json:"doubleEncryptionEnabled,omitempty"`
1321	// Cmk - Customer Managed Key Details
1322	Cmk *CustomerManagedKeyDetails `json:"cmk,omitempty"`
1323}
1324
1325// MarshalJSON is the custom marshaler for EncryptionDetails.
1326func (ed EncryptionDetails) MarshalJSON() ([]byte, error) {
1327	objectMap := make(map[string]interface{})
1328	if ed.Cmk != nil {
1329		objectMap["cmk"] = ed.Cmk
1330	}
1331	return json.Marshal(objectMap)
1332}
1333
1334// EncryptionProtector the server encryption protector.
1335type EncryptionProtector struct {
1336	autorest.Response `json:"-"`
1337	// Kind - READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience.
1338	Kind *string `json:"kind,omitempty"`
1339	// Location - READ-ONLY; Resource location.
1340	Location *string `json:"location,omitempty"`
1341	// EncryptionProtectorProperties - Resource properties.
1342	*EncryptionProtectorProperties `json:"properties,omitempty"`
1343	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1344	ID *string `json:"id,omitempty"`
1345	// Name - READ-ONLY; The name of the resource
1346	Name *string `json:"name,omitempty"`
1347	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1348	Type *string `json:"type,omitempty"`
1349}
1350
1351// MarshalJSON is the custom marshaler for EncryptionProtector.
1352func (ep EncryptionProtector) MarshalJSON() ([]byte, error) {
1353	objectMap := make(map[string]interface{})
1354	if ep.EncryptionProtectorProperties != nil {
1355		objectMap["properties"] = ep.EncryptionProtectorProperties
1356	}
1357	return json.Marshal(objectMap)
1358}
1359
1360// UnmarshalJSON is the custom unmarshaler for EncryptionProtector struct.
1361func (ep *EncryptionProtector) UnmarshalJSON(body []byte) error {
1362	var m map[string]*json.RawMessage
1363	err := json.Unmarshal(body, &m)
1364	if err != nil {
1365		return err
1366	}
1367	for k, v := range m {
1368		switch k {
1369		case "kind":
1370			if v != nil {
1371				var kind string
1372				err = json.Unmarshal(*v, &kind)
1373				if err != nil {
1374					return err
1375				}
1376				ep.Kind = &kind
1377			}
1378		case "location":
1379			if v != nil {
1380				var location string
1381				err = json.Unmarshal(*v, &location)
1382				if err != nil {
1383					return err
1384				}
1385				ep.Location = &location
1386			}
1387		case "properties":
1388			if v != nil {
1389				var encryptionProtectorProperties EncryptionProtectorProperties
1390				err = json.Unmarshal(*v, &encryptionProtectorProperties)
1391				if err != nil {
1392					return err
1393				}
1394				ep.EncryptionProtectorProperties = &encryptionProtectorProperties
1395			}
1396		case "id":
1397			if v != nil {
1398				var ID string
1399				err = json.Unmarshal(*v, &ID)
1400				if err != nil {
1401					return err
1402				}
1403				ep.ID = &ID
1404			}
1405		case "name":
1406			if v != nil {
1407				var name string
1408				err = json.Unmarshal(*v, &name)
1409				if err != nil {
1410					return err
1411				}
1412				ep.Name = &name
1413			}
1414		case "type":
1415			if v != nil {
1416				var typeVar string
1417				err = json.Unmarshal(*v, &typeVar)
1418				if err != nil {
1419					return err
1420				}
1421				ep.Type = &typeVar
1422			}
1423		}
1424	}
1425
1426	return nil
1427}
1428
1429// EncryptionProtectorListResult a list of server encryption protectors.
1430type EncryptionProtectorListResult struct {
1431	autorest.Response `json:"-"`
1432	// Value - READ-ONLY; Array of results.
1433	Value *[]EncryptionProtector `json:"value,omitempty"`
1434	// NextLink - READ-ONLY; Link to retrieve next page of results.
1435	NextLink *string `json:"nextLink,omitempty"`
1436}
1437
1438// EncryptionProtectorListResultIterator provides access to a complete listing of EncryptionProtector
1439// values.
1440type EncryptionProtectorListResultIterator struct {
1441	i    int
1442	page EncryptionProtectorListResultPage
1443}
1444
1445// NextWithContext advances to the next value.  If there was an error making
1446// the request the iterator does not advance and the error is returned.
1447func (iter *EncryptionProtectorListResultIterator) NextWithContext(ctx context.Context) (err error) {
1448	if tracing.IsEnabled() {
1449		ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorListResultIterator.NextWithContext")
1450		defer func() {
1451			sc := -1
1452			if iter.Response().Response.Response != nil {
1453				sc = iter.Response().Response.Response.StatusCode
1454			}
1455			tracing.EndSpan(ctx, sc, err)
1456		}()
1457	}
1458	iter.i++
1459	if iter.i < len(iter.page.Values()) {
1460		return nil
1461	}
1462	err = iter.page.NextWithContext(ctx)
1463	if err != nil {
1464		iter.i--
1465		return err
1466	}
1467	iter.i = 0
1468	return nil
1469}
1470
1471// Next advances to the next value.  If there was an error making
1472// the request the iterator does not advance and the error is returned.
1473// Deprecated: Use NextWithContext() instead.
1474func (iter *EncryptionProtectorListResultIterator) Next() error {
1475	return iter.NextWithContext(context.Background())
1476}
1477
1478// NotDone returns true if the enumeration should be started or is not yet complete.
1479func (iter EncryptionProtectorListResultIterator) NotDone() bool {
1480	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1481}
1482
1483// Response returns the raw server response from the last page request.
1484func (iter EncryptionProtectorListResultIterator) Response() EncryptionProtectorListResult {
1485	return iter.page.Response()
1486}
1487
1488// Value returns the current value or a zero-initialized value if the
1489// iterator has advanced beyond the end of the collection.
1490func (iter EncryptionProtectorListResultIterator) Value() EncryptionProtector {
1491	if !iter.page.NotDone() {
1492		return EncryptionProtector{}
1493	}
1494	return iter.page.Values()[iter.i]
1495}
1496
1497// Creates a new instance of the EncryptionProtectorListResultIterator type.
1498func NewEncryptionProtectorListResultIterator(page EncryptionProtectorListResultPage) EncryptionProtectorListResultIterator {
1499	return EncryptionProtectorListResultIterator{page: page}
1500}
1501
1502// IsEmpty returns true if the ListResult contains no values.
1503func (eplr EncryptionProtectorListResult) IsEmpty() bool {
1504	return eplr.Value == nil || len(*eplr.Value) == 0
1505}
1506
1507// hasNextLink returns true if the NextLink is not empty.
1508func (eplr EncryptionProtectorListResult) hasNextLink() bool {
1509	return eplr.NextLink != nil && len(*eplr.NextLink) != 0
1510}
1511
1512// encryptionProtectorListResultPreparer prepares a request to retrieve the next set of results.
1513// It returns nil if no more results exist.
1514func (eplr EncryptionProtectorListResult) encryptionProtectorListResultPreparer(ctx context.Context) (*http.Request, error) {
1515	if !eplr.hasNextLink() {
1516		return nil, nil
1517	}
1518	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1519		autorest.AsJSON(),
1520		autorest.AsGet(),
1521		autorest.WithBaseURL(to.String(eplr.NextLink)))
1522}
1523
1524// EncryptionProtectorListResultPage contains a page of EncryptionProtector values.
1525type EncryptionProtectorListResultPage struct {
1526	fn   func(context.Context, EncryptionProtectorListResult) (EncryptionProtectorListResult, error)
1527	eplr EncryptionProtectorListResult
1528}
1529
1530// NextWithContext advances to the next page of values.  If there was an error making
1531// the request the page does not advance and the error is returned.
1532func (page *EncryptionProtectorListResultPage) NextWithContext(ctx context.Context) (err error) {
1533	if tracing.IsEnabled() {
1534		ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorListResultPage.NextWithContext")
1535		defer func() {
1536			sc := -1
1537			if page.Response().Response.Response != nil {
1538				sc = page.Response().Response.Response.StatusCode
1539			}
1540			tracing.EndSpan(ctx, sc, err)
1541		}()
1542	}
1543	for {
1544		next, err := page.fn(ctx, page.eplr)
1545		if err != nil {
1546			return err
1547		}
1548		page.eplr = next
1549		if !next.hasNextLink() || !next.IsEmpty() {
1550			break
1551		}
1552	}
1553	return nil
1554}
1555
1556// Next advances to the next page of values.  If there was an error making
1557// the request the page does not advance and the error is returned.
1558// Deprecated: Use NextWithContext() instead.
1559func (page *EncryptionProtectorListResultPage) Next() error {
1560	return page.NextWithContext(context.Background())
1561}
1562
1563// NotDone returns true if the page enumeration should be started or is not yet complete.
1564func (page EncryptionProtectorListResultPage) NotDone() bool {
1565	return !page.eplr.IsEmpty()
1566}
1567
1568// Response returns the raw server response from the last page request.
1569func (page EncryptionProtectorListResultPage) Response() EncryptionProtectorListResult {
1570	return page.eplr
1571}
1572
1573// Values returns the slice of values for the current page or nil if there are no values.
1574func (page EncryptionProtectorListResultPage) Values() []EncryptionProtector {
1575	if page.eplr.IsEmpty() {
1576		return nil
1577	}
1578	return *page.eplr.Value
1579}
1580
1581// Creates a new instance of the EncryptionProtectorListResultPage type.
1582func NewEncryptionProtectorListResultPage(cur EncryptionProtectorListResult, getNextPage func(context.Context, EncryptionProtectorListResult) (EncryptionProtectorListResult, error)) EncryptionProtectorListResultPage {
1583	return EncryptionProtectorListResultPage{
1584		fn:   getNextPage,
1585		eplr: cur,
1586	}
1587}
1588
1589// EncryptionProtectorProperties properties for an encryption protector execution.
1590type EncryptionProtectorProperties struct {
1591	// Subregion - READ-ONLY; Subregion of the encryption protector.
1592	Subregion *string `json:"subregion,omitempty"`
1593	// ServerKeyName - The name of the server key.
1594	ServerKeyName *string `json:"serverKeyName,omitempty"`
1595	// ServerKeyType - The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault'
1596	ServerKeyType ServerKeyType `json:"serverKeyType,omitempty"`
1597	// URI - READ-ONLY; The URI of the server key.
1598	URI *string `json:"uri,omitempty"`
1599	// Thumbprint - READ-ONLY; Thumbprint of the server key.
1600	Thumbprint *string `json:"thumbprint,omitempty"`
1601}
1602
1603// MarshalJSON is the custom marshaler for EncryptionProtectorProperties.
1604func (epp EncryptionProtectorProperties) MarshalJSON() ([]byte, error) {
1605	objectMap := make(map[string]interface{})
1606	if epp.ServerKeyName != nil {
1607		objectMap["serverKeyName"] = epp.ServerKeyName
1608	}
1609	if epp.ServerKeyType != "" {
1610		objectMap["serverKeyType"] = epp.ServerKeyType
1611	}
1612	return json.Marshal(objectMap)
1613}
1614
1615// EntityReference the entity reference.
1616type EntityReference struct {
1617	// Type - The type of this referenced entity. Possible values include: 'IntegrationRuntimeReference', 'LinkedServiceReference'
1618	Type IntegrationRuntimeEntityReferenceType `json:"type,omitempty"`
1619	// ReferenceName - The name of this referenced entity.
1620	ReferenceName *string `json:"referenceName,omitempty"`
1621}
1622
1623// EnvironmentVariableSetup the custom setup of setting environment variable.
1624type EnvironmentVariableSetup struct {
1625	// EnvironmentVariableSetupTypeProperties - Add environment variable type properties.
1626	*EnvironmentVariableSetupTypeProperties `json:"typeProperties,omitempty"`
1627	// Type - Possible values include: 'TypeCustomSetupBase', 'TypeCmdkeySetup', 'TypeEnvironmentVariableSetup', 'TypeComponentSetup'
1628	Type TypeBasicCustomSetupBase `json:"type,omitempty"`
1629}
1630
1631// MarshalJSON is the custom marshaler for EnvironmentVariableSetup.
1632func (evs EnvironmentVariableSetup) MarshalJSON() ([]byte, error) {
1633	evs.Type = TypeEnvironmentVariableSetup
1634	objectMap := make(map[string]interface{})
1635	if evs.EnvironmentVariableSetupTypeProperties != nil {
1636		objectMap["typeProperties"] = evs.EnvironmentVariableSetupTypeProperties
1637	}
1638	if evs.Type != "" {
1639		objectMap["type"] = evs.Type
1640	}
1641	return json.Marshal(objectMap)
1642}
1643
1644// AsCmdkeySetup is the BasicCustomSetupBase implementation for EnvironmentVariableSetup.
1645func (evs EnvironmentVariableSetup) AsCmdkeySetup() (*CmdkeySetup, bool) {
1646	return nil, false
1647}
1648
1649// AsEnvironmentVariableSetup is the BasicCustomSetupBase implementation for EnvironmentVariableSetup.
1650func (evs EnvironmentVariableSetup) AsEnvironmentVariableSetup() (*EnvironmentVariableSetup, bool) {
1651	return &evs, true
1652}
1653
1654// AsComponentSetup is the BasicCustomSetupBase implementation for EnvironmentVariableSetup.
1655func (evs EnvironmentVariableSetup) AsComponentSetup() (*ComponentSetup, bool) {
1656	return nil, false
1657}
1658
1659// AsCustomSetupBase is the BasicCustomSetupBase implementation for EnvironmentVariableSetup.
1660func (evs EnvironmentVariableSetup) AsCustomSetupBase() (*CustomSetupBase, bool) {
1661	return nil, false
1662}
1663
1664// AsBasicCustomSetupBase is the BasicCustomSetupBase implementation for EnvironmentVariableSetup.
1665func (evs EnvironmentVariableSetup) AsBasicCustomSetupBase() (BasicCustomSetupBase, bool) {
1666	return &evs, true
1667}
1668
1669// UnmarshalJSON is the custom unmarshaler for EnvironmentVariableSetup struct.
1670func (evs *EnvironmentVariableSetup) UnmarshalJSON(body []byte) error {
1671	var m map[string]*json.RawMessage
1672	err := json.Unmarshal(body, &m)
1673	if err != nil {
1674		return err
1675	}
1676	for k, v := range m {
1677		switch k {
1678		case "typeProperties":
1679			if v != nil {
1680				var environmentVariableSetupTypeProperties EnvironmentVariableSetupTypeProperties
1681				err = json.Unmarshal(*v, &environmentVariableSetupTypeProperties)
1682				if err != nil {
1683					return err
1684				}
1685				evs.EnvironmentVariableSetupTypeProperties = &environmentVariableSetupTypeProperties
1686			}
1687		case "type":
1688			if v != nil {
1689				var typeVar TypeBasicCustomSetupBase
1690				err = json.Unmarshal(*v, &typeVar)
1691				if err != nil {
1692					return err
1693				}
1694				evs.Type = typeVar
1695			}
1696		}
1697	}
1698
1699	return nil
1700}
1701
1702// EnvironmentVariableSetupTypeProperties environment variable custom setup type properties.
1703type EnvironmentVariableSetupTypeProperties struct {
1704	// VariableName - The name of the environment variable.
1705	VariableName *string `json:"variableName,omitempty"`
1706	// VariableValue - The value of the environment variable.
1707	VariableValue *string `json:"variableValue,omitempty"`
1708}
1709
1710// ErrorAdditionalInfo the resource management error additional info.
1711type ErrorAdditionalInfo struct {
1712	// Type - READ-ONLY; The additional info type.
1713	Type *string `json:"type,omitempty"`
1714	// Info - READ-ONLY; The additional info.
1715	Info interface{} `json:"info,omitempty"`
1716}
1717
1718// ErrorDetail the error detail.
1719type ErrorDetail struct {
1720	// Code - READ-ONLY; The error code.
1721	Code *string `json:"code,omitempty"`
1722	// Message - READ-ONLY; The error message.
1723	Message *string `json:"message,omitempty"`
1724	// Target - READ-ONLY; The error target.
1725	Target *string `json:"target,omitempty"`
1726	// Details - READ-ONLY; The error details.
1727	Details *[]ErrorDetail `json:"details,omitempty"`
1728	// AdditionalInfo - READ-ONLY; The error additional info.
1729	AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
1730}
1731
1732// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for
1733// failed operations. (This also follows the OData error response format.).
1734type ErrorResponse struct {
1735	// Error - The error object.
1736	Error *ErrorDetail `json:"error,omitempty"`
1737}
1738
1739// ExtendedServerBlobAuditingPolicy an extended server blob auditing policy.
1740type ExtendedServerBlobAuditingPolicy struct {
1741	autorest.Response `json:"-"`
1742	// ExtendedServerBlobAuditingPolicyProperties - Resource properties.
1743	*ExtendedServerBlobAuditingPolicyProperties `json:"properties,omitempty"`
1744	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
1745	ID *string `json:"id,omitempty"`
1746	// Name - READ-ONLY; The name of the resource
1747	Name *string `json:"name,omitempty"`
1748	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
1749	Type *string `json:"type,omitempty"`
1750}
1751
1752// MarshalJSON is the custom marshaler for ExtendedServerBlobAuditingPolicy.
1753func (esbap ExtendedServerBlobAuditingPolicy) MarshalJSON() ([]byte, error) {
1754	objectMap := make(map[string]interface{})
1755	if esbap.ExtendedServerBlobAuditingPolicyProperties != nil {
1756		objectMap["properties"] = esbap.ExtendedServerBlobAuditingPolicyProperties
1757	}
1758	return json.Marshal(objectMap)
1759}
1760
1761// UnmarshalJSON is the custom unmarshaler for ExtendedServerBlobAuditingPolicy struct.
1762func (esbap *ExtendedServerBlobAuditingPolicy) UnmarshalJSON(body []byte) error {
1763	var m map[string]*json.RawMessage
1764	err := json.Unmarshal(body, &m)
1765	if err != nil {
1766		return err
1767	}
1768	for k, v := range m {
1769		switch k {
1770		case "properties":
1771			if v != nil {
1772				var extendedServerBlobAuditingPolicyProperties ExtendedServerBlobAuditingPolicyProperties
1773				err = json.Unmarshal(*v, &extendedServerBlobAuditingPolicyProperties)
1774				if err != nil {
1775					return err
1776				}
1777				esbap.ExtendedServerBlobAuditingPolicyProperties = &extendedServerBlobAuditingPolicyProperties
1778			}
1779		case "id":
1780			if v != nil {
1781				var ID string
1782				err = json.Unmarshal(*v, &ID)
1783				if err != nil {
1784					return err
1785				}
1786				esbap.ID = &ID
1787			}
1788		case "name":
1789			if v != nil {
1790				var name string
1791				err = json.Unmarshal(*v, &name)
1792				if err != nil {
1793					return err
1794				}
1795				esbap.Name = &name
1796			}
1797		case "type":
1798			if v != nil {
1799				var typeVar string
1800				err = json.Unmarshal(*v, &typeVar)
1801				if err != nil {
1802					return err
1803				}
1804				esbap.Type = &typeVar
1805			}
1806		}
1807	}
1808
1809	return nil
1810}
1811
1812// ExtendedServerBlobAuditingPolicyListResult a list of server extended auditing settings.
1813type ExtendedServerBlobAuditingPolicyListResult struct {
1814	autorest.Response `json:"-"`
1815	// Value - READ-ONLY; Array of results.
1816	Value *[]ExtendedServerBlobAuditingPolicy `json:"value,omitempty"`
1817	// NextLink - READ-ONLY; Link to retrieve next page of results.
1818	NextLink *string `json:"nextLink,omitempty"`
1819}
1820
1821// ExtendedServerBlobAuditingPolicyListResultIterator provides access to a complete listing of
1822// ExtendedServerBlobAuditingPolicy values.
1823type ExtendedServerBlobAuditingPolicyListResultIterator struct {
1824	i    int
1825	page ExtendedServerBlobAuditingPolicyListResultPage
1826}
1827
1828// NextWithContext advances to the next value.  If there was an error making
1829// the request the iterator does not advance and the error is returned.
1830func (iter *ExtendedServerBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
1831	if tracing.IsEnabled() {
1832		ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPolicyListResultIterator.NextWithContext")
1833		defer func() {
1834			sc := -1
1835			if iter.Response().Response.Response != nil {
1836				sc = iter.Response().Response.Response.StatusCode
1837			}
1838			tracing.EndSpan(ctx, sc, err)
1839		}()
1840	}
1841	iter.i++
1842	if iter.i < len(iter.page.Values()) {
1843		return nil
1844	}
1845	err = iter.page.NextWithContext(ctx)
1846	if err != nil {
1847		iter.i--
1848		return err
1849	}
1850	iter.i = 0
1851	return nil
1852}
1853
1854// Next advances to the next value.  If there was an error making
1855// the request the iterator does not advance and the error is returned.
1856// Deprecated: Use NextWithContext() instead.
1857func (iter *ExtendedServerBlobAuditingPolicyListResultIterator) Next() error {
1858	return iter.NextWithContext(context.Background())
1859}
1860
1861// NotDone returns true if the enumeration should be started or is not yet complete.
1862func (iter ExtendedServerBlobAuditingPolicyListResultIterator) NotDone() bool {
1863	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1864}
1865
1866// Response returns the raw server response from the last page request.
1867func (iter ExtendedServerBlobAuditingPolicyListResultIterator) Response() ExtendedServerBlobAuditingPolicyListResult {
1868	return iter.page.Response()
1869}
1870
1871// Value returns the current value or a zero-initialized value if the
1872// iterator has advanced beyond the end of the collection.
1873func (iter ExtendedServerBlobAuditingPolicyListResultIterator) Value() ExtendedServerBlobAuditingPolicy {
1874	if !iter.page.NotDone() {
1875		return ExtendedServerBlobAuditingPolicy{}
1876	}
1877	return iter.page.Values()[iter.i]
1878}
1879
1880// Creates a new instance of the ExtendedServerBlobAuditingPolicyListResultIterator type.
1881func NewExtendedServerBlobAuditingPolicyListResultIterator(page ExtendedServerBlobAuditingPolicyListResultPage) ExtendedServerBlobAuditingPolicyListResultIterator {
1882	return ExtendedServerBlobAuditingPolicyListResultIterator{page: page}
1883}
1884
1885// IsEmpty returns true if the ListResult contains no values.
1886func (esbaplr ExtendedServerBlobAuditingPolicyListResult) IsEmpty() bool {
1887	return esbaplr.Value == nil || len(*esbaplr.Value) == 0
1888}
1889
1890// hasNextLink returns true if the NextLink is not empty.
1891func (esbaplr ExtendedServerBlobAuditingPolicyListResult) hasNextLink() bool {
1892	return esbaplr.NextLink != nil && len(*esbaplr.NextLink) != 0
1893}
1894
1895// extendedServerBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results.
1896// It returns nil if no more results exist.
1897func (esbaplr ExtendedServerBlobAuditingPolicyListResult) extendedServerBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
1898	if !esbaplr.hasNextLink() {
1899		return nil, nil
1900	}
1901	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1902		autorest.AsJSON(),
1903		autorest.AsGet(),
1904		autorest.WithBaseURL(to.String(esbaplr.NextLink)))
1905}
1906
1907// ExtendedServerBlobAuditingPolicyListResultPage contains a page of ExtendedServerBlobAuditingPolicy
1908// values.
1909type ExtendedServerBlobAuditingPolicyListResultPage struct {
1910	fn      func(context.Context, ExtendedServerBlobAuditingPolicyListResult) (ExtendedServerBlobAuditingPolicyListResult, error)
1911	esbaplr ExtendedServerBlobAuditingPolicyListResult
1912}
1913
1914// NextWithContext advances to the next page of values.  If there was an error making
1915// the request the page does not advance and the error is returned.
1916func (page *ExtendedServerBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
1917	if tracing.IsEnabled() {
1918		ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedServerBlobAuditingPolicyListResultPage.NextWithContext")
1919		defer func() {
1920			sc := -1
1921			if page.Response().Response.Response != nil {
1922				sc = page.Response().Response.Response.StatusCode
1923			}
1924			tracing.EndSpan(ctx, sc, err)
1925		}()
1926	}
1927	for {
1928		next, err := page.fn(ctx, page.esbaplr)
1929		if err != nil {
1930			return err
1931		}
1932		page.esbaplr = next
1933		if !next.hasNextLink() || !next.IsEmpty() {
1934			break
1935		}
1936	}
1937	return nil
1938}
1939
1940// Next advances to the next page of values.  If there was an error making
1941// the request the page does not advance and the error is returned.
1942// Deprecated: Use NextWithContext() instead.
1943func (page *ExtendedServerBlobAuditingPolicyListResultPage) Next() error {
1944	return page.NextWithContext(context.Background())
1945}
1946
1947// NotDone returns true if the page enumeration should be started or is not yet complete.
1948func (page ExtendedServerBlobAuditingPolicyListResultPage) NotDone() bool {
1949	return !page.esbaplr.IsEmpty()
1950}
1951
1952// Response returns the raw server response from the last page request.
1953func (page ExtendedServerBlobAuditingPolicyListResultPage) Response() ExtendedServerBlobAuditingPolicyListResult {
1954	return page.esbaplr
1955}
1956
1957// Values returns the slice of values for the current page or nil if there are no values.
1958func (page ExtendedServerBlobAuditingPolicyListResultPage) Values() []ExtendedServerBlobAuditingPolicy {
1959	if page.esbaplr.IsEmpty() {
1960		return nil
1961	}
1962	return *page.esbaplr.Value
1963}
1964
1965// Creates a new instance of the ExtendedServerBlobAuditingPolicyListResultPage type.
1966func NewExtendedServerBlobAuditingPolicyListResultPage(cur ExtendedServerBlobAuditingPolicyListResult, getNextPage func(context.Context, ExtendedServerBlobAuditingPolicyListResult) (ExtendedServerBlobAuditingPolicyListResult, error)) ExtendedServerBlobAuditingPolicyListResultPage {
1967	return ExtendedServerBlobAuditingPolicyListResultPage{
1968		fn:      getNextPage,
1969		esbaplr: cur,
1970	}
1971}
1972
1973// ExtendedServerBlobAuditingPolicyProperties properties of an extended server blob auditing policy.
1974type ExtendedServerBlobAuditingPolicyProperties struct {
1975	// PredicateExpression - Specifies condition of where clause when creating an audit.
1976	PredicateExpression *string `json:"predicateExpression,omitempty"`
1977	// State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled'
1978	State BlobAuditingPolicyState `json:"state,omitempty"`
1979	// StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
1980	StorageEndpoint *string `json:"storageEndpoint,omitempty"`
1981	// StorageAccountAccessKey - Specifies the identifier key of the auditing storage account.
1982	// If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
1983	// Prerequisites for using managed identity authentication:
1984	// 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
1985	// 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
1986	// For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)
1987	StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`
1988	// RetentionDays - Specifies the number of days to keep in the audit logs in the storage account.
1989	RetentionDays *int32 `json:"retentionDays,omitempty"`
1990	// AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit.
1991	//
1992	// The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:
1993	//
1994	// BATCH_COMPLETED_GROUP,
1995	// SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,
1996	// FAILED_DATABASE_AUTHENTICATION_GROUP.
1997	//
1998	// This above combination is also the set that is configured by default when enabling auditing from the Azure portal.
1999	//
2000	// The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):
2001	//
2002	// APPLICATION_ROLE_CHANGE_PASSWORD_GROUP
2003	// BACKUP_RESTORE_GROUP
2004	// DATABASE_LOGOUT_GROUP
2005	// DATABASE_OBJECT_CHANGE_GROUP
2006	// DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP
2007	// DATABASE_OBJECT_PERMISSION_CHANGE_GROUP
2008	// DATABASE_OPERATION_GROUP
2009	// DATABASE_PERMISSION_CHANGE_GROUP
2010	// DATABASE_PRINCIPAL_CHANGE_GROUP
2011	// DATABASE_PRINCIPAL_IMPERSONATION_GROUP
2012	// DATABASE_ROLE_MEMBER_CHANGE_GROUP
2013	// FAILED_DATABASE_AUTHENTICATION_GROUP
2014	// SCHEMA_OBJECT_ACCESS_GROUP
2015	// SCHEMA_OBJECT_CHANGE_GROUP
2016	// SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP
2017	// SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP
2018	// SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP
2019	// USER_CHANGE_PASSWORD_GROUP
2020	// BATCH_STARTED_GROUP
2021	// BATCH_COMPLETED_GROUP
2022	//
2023	// These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.
2024	//
2025	// For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).
2026	//
2027	// For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:
2028	// SELECT
2029	// UPDATE
2030	// INSERT
2031	// DELETE
2032	// EXECUTE
2033	// RECEIVE
2034	// REFERENCES
2035	//
2036	// The general form for defining an action to be audited is:
2037	// {action} ON {object} BY {principal}
2038	//
2039	// Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.
2040	//
2041	// For example:
2042	// SELECT on dbo.myTable by public
2043	// SELECT on DATABASE::myDatabase by public
2044	// SELECT on SCHEMA::mySchema by public
2045	//
2046	// For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)
2047	AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"`
2048	// StorageAccountSubscriptionID - Specifies the blob storage subscription Id.
2049	StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"`
2050	// IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key.
2051	IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"`
2052	// IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor.
2053	// In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true.
2054	//
2055	// When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.
2056	// Note that for server level audit you should use the 'master' database as {databaseName}.
2057	//
2058	// Diagnostic Settings URI format:
2059	// PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview
2060	//
2061	// For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)
2062	// or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
2063	IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"`
2064	// QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
2065	// The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
2066	QueueDelayMs *int32 `json:"queueDelayMs,omitempty"`
2067}
2068
2069// ExtendedSQLPoolBlobAuditingPolicy an extended Sql pool blob auditing policy.
2070type ExtendedSQLPoolBlobAuditingPolicy struct {
2071	autorest.Response `json:"-"`
2072	// ExtendedSQLPoolBlobAuditingPolicyProperties - Resource properties.
2073	*ExtendedSQLPoolBlobAuditingPolicyProperties `json:"properties,omitempty"`
2074	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
2075	ID *string `json:"id,omitempty"`
2076	// Name - READ-ONLY; The name of the resource
2077	Name *string `json:"name,omitempty"`
2078	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
2079	Type *string `json:"type,omitempty"`
2080}
2081
2082// MarshalJSON is the custom marshaler for ExtendedSQLPoolBlobAuditingPolicy.
2083func (espbap ExtendedSQLPoolBlobAuditingPolicy) MarshalJSON() ([]byte, error) {
2084	objectMap := make(map[string]interface{})
2085	if espbap.ExtendedSQLPoolBlobAuditingPolicyProperties != nil {
2086		objectMap["properties"] = espbap.ExtendedSQLPoolBlobAuditingPolicyProperties
2087	}
2088	return json.Marshal(objectMap)
2089}
2090
2091// UnmarshalJSON is the custom unmarshaler for ExtendedSQLPoolBlobAuditingPolicy struct.
2092func (espbap *ExtendedSQLPoolBlobAuditingPolicy) UnmarshalJSON(body []byte) error {
2093	var m map[string]*json.RawMessage
2094	err := json.Unmarshal(body, &m)
2095	if err != nil {
2096		return err
2097	}
2098	for k, v := range m {
2099		switch k {
2100		case "properties":
2101			if v != nil {
2102				var extendedSQLPoolBlobAuditingPolicyProperties ExtendedSQLPoolBlobAuditingPolicyProperties
2103				err = json.Unmarshal(*v, &extendedSQLPoolBlobAuditingPolicyProperties)
2104				if err != nil {
2105					return err
2106				}
2107				espbap.ExtendedSQLPoolBlobAuditingPolicyProperties = &extendedSQLPoolBlobAuditingPolicyProperties
2108			}
2109		case "id":
2110			if v != nil {
2111				var ID string
2112				err = json.Unmarshal(*v, &ID)
2113				if err != nil {
2114					return err
2115				}
2116				espbap.ID = &ID
2117			}
2118		case "name":
2119			if v != nil {
2120				var name string
2121				err = json.Unmarshal(*v, &name)
2122				if err != nil {
2123					return err
2124				}
2125				espbap.Name = &name
2126			}
2127		case "type":
2128			if v != nil {
2129				var typeVar string
2130				err = json.Unmarshal(*v, &typeVar)
2131				if err != nil {
2132					return err
2133				}
2134				espbap.Type = &typeVar
2135			}
2136		}
2137	}
2138
2139	return nil
2140}
2141
2142// ExtendedSQLPoolBlobAuditingPolicyListResult a list of sql pool extended auditing settings.
2143type ExtendedSQLPoolBlobAuditingPolicyListResult struct {
2144	autorest.Response `json:"-"`
2145	// Value - READ-ONLY; Array of results.
2146	Value *[]ExtendedSQLPoolBlobAuditingPolicy `json:"value,omitempty"`
2147	// NextLink - READ-ONLY; Link to retrieve next page of results.
2148	NextLink *string `json:"nextLink,omitempty"`
2149}
2150
2151// ExtendedSQLPoolBlobAuditingPolicyListResultIterator provides access to a complete listing of
2152// ExtendedSQLPoolBlobAuditingPolicy values.
2153type ExtendedSQLPoolBlobAuditingPolicyListResultIterator struct {
2154	i    int
2155	page ExtendedSQLPoolBlobAuditingPolicyListResultPage
2156}
2157
2158// NextWithContext advances to the next value.  If there was an error making
2159// the request the iterator does not advance and the error is returned.
2160func (iter *ExtendedSQLPoolBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
2161	if tracing.IsEnabled() {
2162		ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedSQLPoolBlobAuditingPolicyListResultIterator.NextWithContext")
2163		defer func() {
2164			sc := -1
2165			if iter.Response().Response.Response != nil {
2166				sc = iter.Response().Response.Response.StatusCode
2167			}
2168			tracing.EndSpan(ctx, sc, err)
2169		}()
2170	}
2171	iter.i++
2172	if iter.i < len(iter.page.Values()) {
2173		return nil
2174	}
2175	err = iter.page.NextWithContext(ctx)
2176	if err != nil {
2177		iter.i--
2178		return err
2179	}
2180	iter.i = 0
2181	return nil
2182}
2183
2184// Next advances to the next value.  If there was an error making
2185// the request the iterator does not advance and the error is returned.
2186// Deprecated: Use NextWithContext() instead.
2187func (iter *ExtendedSQLPoolBlobAuditingPolicyListResultIterator) Next() error {
2188	return iter.NextWithContext(context.Background())
2189}
2190
2191// NotDone returns true if the enumeration should be started or is not yet complete.
2192func (iter ExtendedSQLPoolBlobAuditingPolicyListResultIterator) NotDone() bool {
2193	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2194}
2195
2196// Response returns the raw server response from the last page request.
2197func (iter ExtendedSQLPoolBlobAuditingPolicyListResultIterator) Response() ExtendedSQLPoolBlobAuditingPolicyListResult {
2198	return iter.page.Response()
2199}
2200
2201// Value returns the current value or a zero-initialized value if the
2202// iterator has advanced beyond the end of the collection.
2203func (iter ExtendedSQLPoolBlobAuditingPolicyListResultIterator) Value() ExtendedSQLPoolBlobAuditingPolicy {
2204	if !iter.page.NotDone() {
2205		return ExtendedSQLPoolBlobAuditingPolicy{}
2206	}
2207	return iter.page.Values()[iter.i]
2208}
2209
2210// Creates a new instance of the ExtendedSQLPoolBlobAuditingPolicyListResultIterator type.
2211func NewExtendedSQLPoolBlobAuditingPolicyListResultIterator(page ExtendedSQLPoolBlobAuditingPolicyListResultPage) ExtendedSQLPoolBlobAuditingPolicyListResultIterator {
2212	return ExtendedSQLPoolBlobAuditingPolicyListResultIterator{page: page}
2213}
2214
2215// IsEmpty returns true if the ListResult contains no values.
2216func (espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult) IsEmpty() bool {
2217	return espbaplr.Value == nil || len(*espbaplr.Value) == 0
2218}
2219
2220// hasNextLink returns true if the NextLink is not empty.
2221func (espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult) hasNextLink() bool {
2222	return espbaplr.NextLink != nil && len(*espbaplr.NextLink) != 0
2223}
2224
2225// extendedSQLPoolBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results.
2226// It returns nil if no more results exist.
2227func (espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult) extendedSQLPoolBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
2228	if !espbaplr.hasNextLink() {
2229		return nil, nil
2230	}
2231	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2232		autorest.AsJSON(),
2233		autorest.AsGet(),
2234		autorest.WithBaseURL(to.String(espbaplr.NextLink)))
2235}
2236
2237// ExtendedSQLPoolBlobAuditingPolicyListResultPage contains a page of ExtendedSQLPoolBlobAuditingPolicy
2238// values.
2239type ExtendedSQLPoolBlobAuditingPolicyListResultPage struct {
2240	fn       func(context.Context, ExtendedSQLPoolBlobAuditingPolicyListResult) (ExtendedSQLPoolBlobAuditingPolicyListResult, error)
2241	espbaplr ExtendedSQLPoolBlobAuditingPolicyListResult
2242}
2243
2244// NextWithContext advances to the next page of values.  If there was an error making
2245// the request the page does not advance and the error is returned.
2246func (page *ExtendedSQLPoolBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
2247	if tracing.IsEnabled() {
2248		ctx = tracing.StartSpan(ctx, fqdn+"/ExtendedSQLPoolBlobAuditingPolicyListResultPage.NextWithContext")
2249		defer func() {
2250			sc := -1
2251			if page.Response().Response.Response != nil {
2252				sc = page.Response().Response.Response.StatusCode
2253			}
2254			tracing.EndSpan(ctx, sc, err)
2255		}()
2256	}
2257	for {
2258		next, err := page.fn(ctx, page.espbaplr)
2259		if err != nil {
2260			return err
2261		}
2262		page.espbaplr = next
2263		if !next.hasNextLink() || !next.IsEmpty() {
2264			break
2265		}
2266	}
2267	return nil
2268}
2269
2270// Next advances to the next page of values.  If there was an error making
2271// the request the page does not advance and the error is returned.
2272// Deprecated: Use NextWithContext() instead.
2273func (page *ExtendedSQLPoolBlobAuditingPolicyListResultPage) Next() error {
2274	return page.NextWithContext(context.Background())
2275}
2276
2277// NotDone returns true if the page enumeration should be started or is not yet complete.
2278func (page ExtendedSQLPoolBlobAuditingPolicyListResultPage) NotDone() bool {
2279	return !page.espbaplr.IsEmpty()
2280}
2281
2282// Response returns the raw server response from the last page request.
2283func (page ExtendedSQLPoolBlobAuditingPolicyListResultPage) Response() ExtendedSQLPoolBlobAuditingPolicyListResult {
2284	return page.espbaplr
2285}
2286
2287// Values returns the slice of values for the current page or nil if there are no values.
2288func (page ExtendedSQLPoolBlobAuditingPolicyListResultPage) Values() []ExtendedSQLPoolBlobAuditingPolicy {
2289	if page.espbaplr.IsEmpty() {
2290		return nil
2291	}
2292	return *page.espbaplr.Value
2293}
2294
2295// Creates a new instance of the ExtendedSQLPoolBlobAuditingPolicyListResultPage type.
2296func NewExtendedSQLPoolBlobAuditingPolicyListResultPage(cur ExtendedSQLPoolBlobAuditingPolicyListResult, getNextPage func(context.Context, ExtendedSQLPoolBlobAuditingPolicyListResult) (ExtendedSQLPoolBlobAuditingPolicyListResult, error)) ExtendedSQLPoolBlobAuditingPolicyListResultPage {
2297	return ExtendedSQLPoolBlobAuditingPolicyListResultPage{
2298		fn:       getNextPage,
2299		espbaplr: cur,
2300	}
2301}
2302
2303// ExtendedSQLPoolBlobAuditingPolicyProperties properties of an extended Sql pool blob auditing policy.
2304type ExtendedSQLPoolBlobAuditingPolicyProperties struct {
2305	// PredicateExpression - Specifies condition of where clause when creating an audit.
2306	PredicateExpression *string `json:"predicateExpression,omitempty"`
2307	// State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled'
2308	State BlobAuditingPolicyState `json:"state,omitempty"`
2309	// StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
2310	StorageEndpoint *string `json:"storageEndpoint,omitempty"`
2311	// StorageAccountAccessKey - Specifies the identifier key of the auditing storage account.
2312	// If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
2313	// Prerequisites for using managed identity authentication:
2314	// 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
2315	// 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
2316	// For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)
2317	StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`
2318	// RetentionDays - Specifies the number of days to keep in the audit logs in the storage account.
2319	RetentionDays *int32 `json:"retentionDays,omitempty"`
2320	// AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit.
2321	//
2322	// The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:
2323	//
2324	// BATCH_COMPLETED_GROUP,
2325	// SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,
2326	// FAILED_DATABASE_AUTHENTICATION_GROUP.
2327	//
2328	// This above combination is also the set that is configured by default when enabling auditing from the Azure portal.
2329	//
2330	// The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):
2331	//
2332	// APPLICATION_ROLE_CHANGE_PASSWORD_GROUP
2333	// BACKUP_RESTORE_GROUP
2334	// DATABASE_LOGOUT_GROUP
2335	// DATABASE_OBJECT_CHANGE_GROUP
2336	// DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP
2337	// DATABASE_OBJECT_PERMISSION_CHANGE_GROUP
2338	// DATABASE_OPERATION_GROUP
2339	// DATABASE_PERMISSION_CHANGE_GROUP
2340	// DATABASE_PRINCIPAL_CHANGE_GROUP
2341	// DATABASE_PRINCIPAL_IMPERSONATION_GROUP
2342	// DATABASE_ROLE_MEMBER_CHANGE_GROUP
2343	// FAILED_DATABASE_AUTHENTICATION_GROUP
2344	// SCHEMA_OBJECT_ACCESS_GROUP
2345	// SCHEMA_OBJECT_CHANGE_GROUP
2346	// SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP
2347	// SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP
2348	// SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP
2349	// USER_CHANGE_PASSWORD_GROUP
2350	// BATCH_STARTED_GROUP
2351	// BATCH_COMPLETED_GROUP
2352	//
2353	// These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.
2354	//
2355	// For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).
2356	//
2357	// For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:
2358	// SELECT
2359	// UPDATE
2360	// INSERT
2361	// DELETE
2362	// EXECUTE
2363	// RECEIVE
2364	// REFERENCES
2365	//
2366	// The general form for defining an action to be audited is:
2367	// {action} ON {object} BY {principal}
2368	//
2369	// Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.
2370	//
2371	// For example:
2372	// SELECT on dbo.myTable by public
2373	// SELECT on DATABASE::myDatabase by public
2374	// SELECT on SCHEMA::mySchema by public
2375	//
2376	// For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)
2377	AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"`
2378	// StorageAccountSubscriptionID - Specifies the blob storage subscription Id.
2379	StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"`
2380	// IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key.
2381	IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"`
2382	// IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor.
2383	// In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true.
2384	//
2385	// When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.
2386	// Note that for server level audit you should use the 'master' database as {databaseName}.
2387	//
2388	// Diagnostic Settings URI format:
2389	// PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview
2390	//
2391	// For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)
2392	// or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
2393	IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"`
2394	// QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
2395	// The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
2396	QueueDelayMs *int32 `json:"queueDelayMs,omitempty"`
2397}
2398
2399// GeoBackupPolicy a database geo backup policy.
2400type GeoBackupPolicy struct {
2401	autorest.Response `json:"-"`
2402	// GeoBackupPolicyProperties - The properties of the geo backup policy.
2403	*GeoBackupPolicyProperties `json:"properties,omitempty"`
2404	// Kind - READ-ONLY; Kind of geo backup policy.  This is metadata used for the Azure portal experience.
2405	Kind *string `json:"kind,omitempty"`
2406	// Location - READ-ONLY; Backup policy location.
2407	Location *string `json:"location,omitempty"`
2408	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
2409	ID *string `json:"id,omitempty"`
2410	// Name - READ-ONLY; The name of the resource
2411	Name *string `json:"name,omitempty"`
2412	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
2413	Type *string `json:"type,omitempty"`
2414}
2415
2416// MarshalJSON is the custom marshaler for GeoBackupPolicy.
2417func (gbp GeoBackupPolicy) MarshalJSON() ([]byte, error) {
2418	objectMap := make(map[string]interface{})
2419	if gbp.GeoBackupPolicyProperties != nil {
2420		objectMap["properties"] = gbp.GeoBackupPolicyProperties
2421	}
2422	return json.Marshal(objectMap)
2423}
2424
2425// UnmarshalJSON is the custom unmarshaler for GeoBackupPolicy struct.
2426func (gbp *GeoBackupPolicy) UnmarshalJSON(body []byte) error {
2427	var m map[string]*json.RawMessage
2428	err := json.Unmarshal(body, &m)
2429	if err != nil {
2430		return err
2431	}
2432	for k, v := range m {
2433		switch k {
2434		case "properties":
2435			if v != nil {
2436				var geoBackupPolicyProperties GeoBackupPolicyProperties
2437				err = json.Unmarshal(*v, &geoBackupPolicyProperties)
2438				if err != nil {
2439					return err
2440				}
2441				gbp.GeoBackupPolicyProperties = &geoBackupPolicyProperties
2442			}
2443		case "kind":
2444			if v != nil {
2445				var kind string
2446				err = json.Unmarshal(*v, &kind)
2447				if err != nil {
2448					return err
2449				}
2450				gbp.Kind = &kind
2451			}
2452		case "location":
2453			if v != nil {
2454				var location string
2455				err = json.Unmarshal(*v, &location)
2456				if err != nil {
2457					return err
2458				}
2459				gbp.Location = &location
2460			}
2461		case "id":
2462			if v != nil {
2463				var ID string
2464				err = json.Unmarshal(*v, &ID)
2465				if err != nil {
2466					return err
2467				}
2468				gbp.ID = &ID
2469			}
2470		case "name":
2471			if v != nil {
2472				var name string
2473				err = json.Unmarshal(*v, &name)
2474				if err != nil {
2475					return err
2476				}
2477				gbp.Name = &name
2478			}
2479		case "type":
2480			if v != nil {
2481				var typeVar string
2482				err = json.Unmarshal(*v, &typeVar)
2483				if err != nil {
2484					return err
2485				}
2486				gbp.Type = &typeVar
2487			}
2488		}
2489	}
2490
2491	return nil
2492}
2493
2494// GeoBackupPolicyListResult the response to a list geo backup policies request.
2495type GeoBackupPolicyListResult struct {
2496	autorest.Response `json:"-"`
2497	// Value - The list of geo backup policies.
2498	Value *[]GeoBackupPolicy `json:"value,omitempty"`
2499}
2500
2501// GeoBackupPolicyProperties the properties of the geo backup policy.
2502type GeoBackupPolicyProperties struct {
2503	// State - The state of the geo backup policy. Possible values include: 'GeoBackupPolicyStateDisabled', 'GeoBackupPolicyStateEnabled'
2504	State GeoBackupPolicyState `json:"state,omitempty"`
2505	// StorageType - READ-ONLY; The storage type of the geo backup policy.
2506	StorageType *string `json:"storageType,omitempty"`
2507}
2508
2509// MarshalJSON is the custom marshaler for GeoBackupPolicyProperties.
2510func (gbpp GeoBackupPolicyProperties) MarshalJSON() ([]byte, error) {
2511	objectMap := make(map[string]interface{})
2512	if gbpp.State != "" {
2513		objectMap["state"] = gbpp.State
2514	}
2515	return json.Marshal(objectMap)
2516}
2517
2518// GetSsisObjectMetadataRequest the request payload of get SSIS object metadata.
2519type GetSsisObjectMetadataRequest struct {
2520	// MetadataPath - Metadata path.
2521	MetadataPath *string `json:"metadataPath,omitempty"`
2522}
2523
2524// BasicIntegrationRuntime azure Synapse nested object which serves as a compute resource for activities.
2525type BasicIntegrationRuntime interface {
2526	AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool)
2527	AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool)
2528	AsIntegrationRuntime() (*IntegrationRuntime, bool)
2529}
2530
2531// IntegrationRuntime azure Synapse nested object which serves as a compute resource for activities.
2532type IntegrationRuntime struct {
2533	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
2534	AdditionalProperties map[string]interface{} `json:""`
2535	// Description - Integration runtime description.
2536	Description *string `json:"description,omitempty"`
2537	// Type - Possible values include: 'TypeIntegrationRuntime', 'TypeManaged', 'TypeSelfHosted'
2538	Type Type `json:"type,omitempty"`
2539}
2540
2541func unmarshalBasicIntegrationRuntime(body []byte) (BasicIntegrationRuntime, error) {
2542	var m map[string]interface{}
2543	err := json.Unmarshal(body, &m)
2544	if err != nil {
2545		return nil, err
2546	}
2547
2548	switch m["type"] {
2549	case string(TypeManaged):
2550		var mir ManagedIntegrationRuntime
2551		err := json.Unmarshal(body, &mir)
2552		return mir, err
2553	case string(TypeSelfHosted):
2554		var shir SelfHostedIntegrationRuntime
2555		err := json.Unmarshal(body, &shir)
2556		return shir, err
2557	default:
2558		var ir IntegrationRuntime
2559		err := json.Unmarshal(body, &ir)
2560		return ir, err
2561	}
2562}
2563func unmarshalBasicIntegrationRuntimeArray(body []byte) ([]BasicIntegrationRuntime, error) {
2564	var rawMessages []*json.RawMessage
2565	err := json.Unmarshal(body, &rawMessages)
2566	if err != nil {
2567		return nil, err
2568	}
2569
2570	irArray := make([]BasicIntegrationRuntime, len(rawMessages))
2571
2572	for index, rawMessage := range rawMessages {
2573		ir, err := unmarshalBasicIntegrationRuntime(*rawMessage)
2574		if err != nil {
2575			return nil, err
2576		}
2577		irArray[index] = ir
2578	}
2579	return irArray, nil
2580}
2581
2582// MarshalJSON is the custom marshaler for IntegrationRuntime.
2583func (ir IntegrationRuntime) MarshalJSON() ([]byte, error) {
2584	ir.Type = TypeIntegrationRuntime
2585	objectMap := make(map[string]interface{})
2586	if ir.Description != nil {
2587		objectMap["description"] = ir.Description
2588	}
2589	if ir.Type != "" {
2590		objectMap["type"] = ir.Type
2591	}
2592	for k, v := range ir.AdditionalProperties {
2593		objectMap[k] = v
2594	}
2595	return json.Marshal(objectMap)
2596}
2597
2598// AsManagedIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime.
2599func (ir IntegrationRuntime) AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) {
2600	return nil, false
2601}
2602
2603// AsSelfHostedIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime.
2604func (ir IntegrationRuntime) AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) {
2605	return nil, false
2606}
2607
2608// AsIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime.
2609func (ir IntegrationRuntime) AsIntegrationRuntime() (*IntegrationRuntime, bool) {
2610	return &ir, true
2611}
2612
2613// AsBasicIntegrationRuntime is the BasicIntegrationRuntime implementation for IntegrationRuntime.
2614func (ir IntegrationRuntime) AsBasicIntegrationRuntime() (BasicIntegrationRuntime, bool) {
2615	return &ir, true
2616}
2617
2618// UnmarshalJSON is the custom unmarshaler for IntegrationRuntime struct.
2619func (ir *IntegrationRuntime) UnmarshalJSON(body []byte) error {
2620	var m map[string]*json.RawMessage
2621	err := json.Unmarshal(body, &m)
2622	if err != nil {
2623		return err
2624	}
2625	for k, v := range m {
2626		switch k {
2627		default:
2628			if v != nil {
2629				var additionalProperties interface{}
2630				err = json.Unmarshal(*v, &additionalProperties)
2631				if err != nil {
2632					return err
2633				}
2634				if ir.AdditionalProperties == nil {
2635					ir.AdditionalProperties = make(map[string]interface{})
2636				}
2637				ir.AdditionalProperties[k] = additionalProperties
2638			}
2639		case "description":
2640			if v != nil {
2641				var description string
2642				err = json.Unmarshal(*v, &description)
2643				if err != nil {
2644					return err
2645				}
2646				ir.Description = &description
2647			}
2648		case "type":
2649			if v != nil {
2650				var typeVar Type
2651				err = json.Unmarshal(*v, &typeVar)
2652				if err != nil {
2653					return err
2654				}
2655				ir.Type = typeVar
2656			}
2657		}
2658	}
2659
2660	return nil
2661}
2662
2663// IntegrationRuntimeAuthKeys the integration runtime authentication keys.
2664type IntegrationRuntimeAuthKeys struct {
2665	autorest.Response `json:"-"`
2666	// AuthKey1 - The primary integration runtime authentication key.
2667	AuthKey1 *string `json:"authKey1,omitempty"`
2668	// AuthKey2 - The secondary integration runtime authentication key.
2669	AuthKey2 *string `json:"authKey2,omitempty"`
2670}
2671
2672// IntegrationRuntimeComputeProperties the compute resource properties for managed integration runtime.
2673type IntegrationRuntimeComputeProperties struct {
2674	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
2675	AdditionalProperties map[string]interface{} `json:""`
2676	// Location - The location for managed integration runtime. The supported regions could be found on https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities
2677	Location *string `json:"location,omitempty"`
2678	// NodeSize - The node size requirement to managed integration runtime.
2679	NodeSize *string `json:"nodeSize,omitempty"`
2680	// NumberOfNodes - The required number of nodes for managed integration runtime.
2681	NumberOfNodes *int32 `json:"numberOfNodes,omitempty"`
2682	// MaxParallelExecutionsPerNode - Maximum parallel executions count per node for managed integration runtime.
2683	MaxParallelExecutionsPerNode *int32 `json:"maxParallelExecutionsPerNode,omitempty"`
2684	// DataFlowProperties - Data flow properties for managed integration runtime.
2685	DataFlowProperties *IntegrationRuntimeDataFlowProperties `json:"dataFlowProperties,omitempty"`
2686	// VNetProperties - VNet properties for managed integration runtime.
2687	VNetProperties *IntegrationRuntimeVNetProperties `json:"vNetProperties,omitempty"`
2688}
2689
2690// MarshalJSON is the custom marshaler for IntegrationRuntimeComputeProperties.
2691func (ircp IntegrationRuntimeComputeProperties) MarshalJSON() ([]byte, error) {
2692	objectMap := make(map[string]interface{})
2693	if ircp.Location != nil {
2694		objectMap["location"] = ircp.Location
2695	}
2696	if ircp.NodeSize != nil {
2697		objectMap["nodeSize"] = ircp.NodeSize
2698	}
2699	if ircp.NumberOfNodes != nil {
2700		objectMap["numberOfNodes"] = ircp.NumberOfNodes
2701	}
2702	if ircp.MaxParallelExecutionsPerNode != nil {
2703		objectMap["maxParallelExecutionsPerNode"] = ircp.MaxParallelExecutionsPerNode
2704	}
2705	if ircp.DataFlowProperties != nil {
2706		objectMap["dataFlowProperties"] = ircp.DataFlowProperties
2707	}
2708	if ircp.VNetProperties != nil {
2709		objectMap["vNetProperties"] = ircp.VNetProperties
2710	}
2711	for k, v := range ircp.AdditionalProperties {
2712		objectMap[k] = v
2713	}
2714	return json.Marshal(objectMap)
2715}
2716
2717// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeComputeProperties struct.
2718func (ircp *IntegrationRuntimeComputeProperties) UnmarshalJSON(body []byte) error {
2719	var m map[string]*json.RawMessage
2720	err := json.Unmarshal(body, &m)
2721	if err != nil {
2722		return err
2723	}
2724	for k, v := range m {
2725		switch k {
2726		default:
2727			if v != nil {
2728				var additionalProperties interface{}
2729				err = json.Unmarshal(*v, &additionalProperties)
2730				if err != nil {
2731					return err
2732				}
2733				if ircp.AdditionalProperties == nil {
2734					ircp.AdditionalProperties = make(map[string]interface{})
2735				}
2736				ircp.AdditionalProperties[k] = additionalProperties
2737			}
2738		case "location":
2739			if v != nil {
2740				var location string
2741				err = json.Unmarshal(*v, &location)
2742				if err != nil {
2743					return err
2744				}
2745				ircp.Location = &location
2746			}
2747		case "nodeSize":
2748			if v != nil {
2749				var nodeSize string
2750				err = json.Unmarshal(*v, &nodeSize)
2751				if err != nil {
2752					return err
2753				}
2754				ircp.NodeSize = &nodeSize
2755			}
2756		case "numberOfNodes":
2757			if v != nil {
2758				var numberOfNodes int32
2759				err = json.Unmarshal(*v, &numberOfNodes)
2760				if err != nil {
2761					return err
2762				}
2763				ircp.NumberOfNodes = &numberOfNodes
2764			}
2765		case "maxParallelExecutionsPerNode":
2766			if v != nil {
2767				var maxParallelExecutionsPerNode int32
2768				err = json.Unmarshal(*v, &maxParallelExecutionsPerNode)
2769				if err != nil {
2770					return err
2771				}
2772				ircp.MaxParallelExecutionsPerNode = &maxParallelExecutionsPerNode
2773			}
2774		case "dataFlowProperties":
2775			if v != nil {
2776				var dataFlowProperties IntegrationRuntimeDataFlowProperties
2777				err = json.Unmarshal(*v, &dataFlowProperties)
2778				if err != nil {
2779					return err
2780				}
2781				ircp.DataFlowProperties = &dataFlowProperties
2782			}
2783		case "vNetProperties":
2784			if v != nil {
2785				var vNetProperties IntegrationRuntimeVNetProperties
2786				err = json.Unmarshal(*v, &vNetProperties)
2787				if err != nil {
2788					return err
2789				}
2790				ircp.VNetProperties = &vNetProperties
2791			}
2792		}
2793	}
2794
2795	return nil
2796}
2797
2798// IntegrationRuntimeConnectionInfo connection information for encrypting the on-premises data source
2799// credentials.
2800type IntegrationRuntimeConnectionInfo struct {
2801	autorest.Response `json:"-"`
2802	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
2803	AdditionalProperties map[string]interface{} `json:""`
2804	// ServiceToken - READ-ONLY; The token generated in service. Callers use this token to authenticate to integration runtime.
2805	ServiceToken *string `json:"serviceToken,omitempty"`
2806	// IdentityCertThumbprint - READ-ONLY; The integration runtime SSL certificate thumbprint. Click-Once application uses it to do server validation.
2807	IdentityCertThumbprint *string `json:"identityCertThumbprint,omitempty"`
2808	// HostServiceURI - READ-ONLY; The on-premises integration runtime host URL.
2809	HostServiceURI *string `json:"hostServiceUri,omitempty"`
2810	// Version - READ-ONLY; The integration runtime version.
2811	Version *string `json:"version,omitempty"`
2812	// PublicKey - READ-ONLY; The public key for encrypting a credential when transferring the credential to the integration runtime.
2813	PublicKey *string `json:"publicKey,omitempty"`
2814	// IsIdentityCertExprired - READ-ONLY; Whether the identity certificate is expired.
2815	IsIdentityCertExprired *bool `json:"isIdentityCertExprired,omitempty"`
2816}
2817
2818// MarshalJSON is the custom marshaler for IntegrationRuntimeConnectionInfo.
2819func (irci IntegrationRuntimeConnectionInfo) MarshalJSON() ([]byte, error) {
2820	objectMap := make(map[string]interface{})
2821	for k, v := range irci.AdditionalProperties {
2822		objectMap[k] = v
2823	}
2824	return json.Marshal(objectMap)
2825}
2826
2827// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeConnectionInfo struct.
2828func (irci *IntegrationRuntimeConnectionInfo) UnmarshalJSON(body []byte) error {
2829	var m map[string]*json.RawMessage
2830	err := json.Unmarshal(body, &m)
2831	if err != nil {
2832		return err
2833	}
2834	for k, v := range m {
2835		switch k {
2836		default:
2837			if v != nil {
2838				var additionalProperties interface{}
2839				err = json.Unmarshal(*v, &additionalProperties)
2840				if err != nil {
2841					return err
2842				}
2843				if irci.AdditionalProperties == nil {
2844					irci.AdditionalProperties = make(map[string]interface{})
2845				}
2846				irci.AdditionalProperties[k] = additionalProperties
2847			}
2848		case "serviceToken":
2849			if v != nil {
2850				var serviceToken string
2851				err = json.Unmarshal(*v, &serviceToken)
2852				if err != nil {
2853					return err
2854				}
2855				irci.ServiceToken = &serviceToken
2856			}
2857		case "identityCertThumbprint":
2858			if v != nil {
2859				var identityCertThumbprint string
2860				err = json.Unmarshal(*v, &identityCertThumbprint)
2861				if err != nil {
2862					return err
2863				}
2864				irci.IdentityCertThumbprint = &identityCertThumbprint
2865			}
2866		case "hostServiceUri":
2867			if v != nil {
2868				var hostServiceURI string
2869				err = json.Unmarshal(*v, &hostServiceURI)
2870				if err != nil {
2871					return err
2872				}
2873				irci.HostServiceURI = &hostServiceURI
2874			}
2875		case "version":
2876			if v != nil {
2877				var version string
2878				err = json.Unmarshal(*v, &version)
2879				if err != nil {
2880					return err
2881				}
2882				irci.Version = &version
2883			}
2884		case "publicKey":
2885			if v != nil {
2886				var publicKey string
2887				err = json.Unmarshal(*v, &publicKey)
2888				if err != nil {
2889					return err
2890				}
2891				irci.PublicKey = &publicKey
2892			}
2893		case "isIdentityCertExprired":
2894			if v != nil {
2895				var isIdentityCertExprired bool
2896				err = json.Unmarshal(*v, &isIdentityCertExprired)
2897				if err != nil {
2898					return err
2899				}
2900				irci.IsIdentityCertExprired = &isIdentityCertExprired
2901			}
2902		}
2903	}
2904
2905	return nil
2906}
2907
2908// IntegrationRuntimeCustomSetupScriptProperties custom setup script properties for a managed dedicated
2909// integration runtime.
2910type IntegrationRuntimeCustomSetupScriptProperties struct {
2911	// BlobContainerURI - The URI of the Azure blob container that contains the custom setup script.
2912	BlobContainerURI *string `json:"blobContainerUri,omitempty"`
2913	// SasToken - The SAS token of the Azure blob container.
2914	SasToken *SecureString `json:"sasToken,omitempty"`
2915}
2916
2917// IntegrationRuntimeDataFlowProperties data flow properties for managed integration runtime.
2918type IntegrationRuntimeDataFlowProperties struct {
2919	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
2920	AdditionalProperties map[string]interface{} `json:""`
2921	// ComputeType - Compute type of the cluster which will execute data flow job. Possible values include: 'General', 'MemoryOptimized', 'ComputeOptimized'
2922	ComputeType DataFlowComputeType `json:"computeType,omitempty"`
2923	// CoreCount - Core count of the cluster which will execute data flow job. Supported values are: 8, 16, 32, 48, 80, 144 and 272.
2924	CoreCount *int32 `json:"coreCount,omitempty"`
2925	// TimeToLive - Time to live (in minutes) setting of the cluster which will execute data flow job.
2926	TimeToLive *int32 `json:"timeToLive,omitempty"`
2927}
2928
2929// MarshalJSON is the custom marshaler for IntegrationRuntimeDataFlowProperties.
2930func (irdfp IntegrationRuntimeDataFlowProperties) MarshalJSON() ([]byte, error) {
2931	objectMap := make(map[string]interface{})
2932	if irdfp.ComputeType != "" {
2933		objectMap["computeType"] = irdfp.ComputeType
2934	}
2935	if irdfp.CoreCount != nil {
2936		objectMap["coreCount"] = irdfp.CoreCount
2937	}
2938	if irdfp.TimeToLive != nil {
2939		objectMap["timeToLive"] = irdfp.TimeToLive
2940	}
2941	for k, v := range irdfp.AdditionalProperties {
2942		objectMap[k] = v
2943	}
2944	return json.Marshal(objectMap)
2945}
2946
2947// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeDataFlowProperties struct.
2948func (irdfp *IntegrationRuntimeDataFlowProperties) UnmarshalJSON(body []byte) error {
2949	var m map[string]*json.RawMessage
2950	err := json.Unmarshal(body, &m)
2951	if err != nil {
2952		return err
2953	}
2954	for k, v := range m {
2955		switch k {
2956		default:
2957			if v != nil {
2958				var additionalProperties interface{}
2959				err = json.Unmarshal(*v, &additionalProperties)
2960				if err != nil {
2961					return err
2962				}
2963				if irdfp.AdditionalProperties == nil {
2964					irdfp.AdditionalProperties = make(map[string]interface{})
2965				}
2966				irdfp.AdditionalProperties[k] = additionalProperties
2967			}
2968		case "computeType":
2969			if v != nil {
2970				var computeType DataFlowComputeType
2971				err = json.Unmarshal(*v, &computeType)
2972				if err != nil {
2973					return err
2974				}
2975				irdfp.ComputeType = computeType
2976			}
2977		case "coreCount":
2978			if v != nil {
2979				var coreCount int32
2980				err = json.Unmarshal(*v, &coreCount)
2981				if err != nil {
2982					return err
2983				}
2984				irdfp.CoreCount = &coreCount
2985			}
2986		case "timeToLive":
2987			if v != nil {
2988				var timeToLive int32
2989				err = json.Unmarshal(*v, &timeToLive)
2990				if err != nil {
2991					return err
2992				}
2993				irdfp.TimeToLive = &timeToLive
2994			}
2995		}
2996	}
2997
2998	return nil
2999}
3000
3001// IntegrationRuntimeDataProxyProperties data proxy properties for a managed dedicated integration runtime.
3002type IntegrationRuntimeDataProxyProperties struct {
3003	// ConnectVia - The self-hosted integration runtime reference.
3004	ConnectVia *EntityReference `json:"connectVia,omitempty"`
3005	// StagingLinkedService - The staging linked service reference.
3006	StagingLinkedService *EntityReference `json:"stagingLinkedService,omitempty"`
3007	// Path - The path to contain the staged data in the Blob storage.
3008	Path *string `json:"path,omitempty"`
3009}
3010
3011// IntegrationRuntimeListResponse a list of integration runtime resources.
3012type IntegrationRuntimeListResponse struct {
3013	autorest.Response `json:"-"`
3014	// Value - List of integration runtimes.
3015	Value *[]IntegrationRuntimeResource `json:"value,omitempty"`
3016	// NextLink - The link to the next page of results, if any remaining results exist.
3017	NextLink *string `json:"nextLink,omitempty"`
3018}
3019
3020// IntegrationRuntimeListResponseIterator provides access to a complete listing of
3021// IntegrationRuntimeResource values.
3022type IntegrationRuntimeListResponseIterator struct {
3023	i    int
3024	page IntegrationRuntimeListResponsePage
3025}
3026
3027// NextWithContext advances to the next value.  If there was an error making
3028// the request the iterator does not advance and the error is returned.
3029func (iter *IntegrationRuntimeListResponseIterator) NextWithContext(ctx context.Context) (err error) {
3030	if tracing.IsEnabled() {
3031		ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeListResponseIterator.NextWithContext")
3032		defer func() {
3033			sc := -1
3034			if iter.Response().Response.Response != nil {
3035				sc = iter.Response().Response.Response.StatusCode
3036			}
3037			tracing.EndSpan(ctx, sc, err)
3038		}()
3039	}
3040	iter.i++
3041	if iter.i < len(iter.page.Values()) {
3042		return nil
3043	}
3044	err = iter.page.NextWithContext(ctx)
3045	if err != nil {
3046		iter.i--
3047		return err
3048	}
3049	iter.i = 0
3050	return nil
3051}
3052
3053// Next advances to the next value.  If there was an error making
3054// the request the iterator does not advance and the error is returned.
3055// Deprecated: Use NextWithContext() instead.
3056func (iter *IntegrationRuntimeListResponseIterator) Next() error {
3057	return iter.NextWithContext(context.Background())
3058}
3059
3060// NotDone returns true if the enumeration should be started or is not yet complete.
3061func (iter IntegrationRuntimeListResponseIterator) NotDone() bool {
3062	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3063}
3064
3065// Response returns the raw server response from the last page request.
3066func (iter IntegrationRuntimeListResponseIterator) Response() IntegrationRuntimeListResponse {
3067	return iter.page.Response()
3068}
3069
3070// Value returns the current value or a zero-initialized value if the
3071// iterator has advanced beyond the end of the collection.
3072func (iter IntegrationRuntimeListResponseIterator) Value() IntegrationRuntimeResource {
3073	if !iter.page.NotDone() {
3074		return IntegrationRuntimeResource{}
3075	}
3076	return iter.page.Values()[iter.i]
3077}
3078
3079// Creates a new instance of the IntegrationRuntimeListResponseIterator type.
3080func NewIntegrationRuntimeListResponseIterator(page IntegrationRuntimeListResponsePage) IntegrationRuntimeListResponseIterator {
3081	return IntegrationRuntimeListResponseIterator{page: page}
3082}
3083
3084// IsEmpty returns true if the ListResult contains no values.
3085func (irlr IntegrationRuntimeListResponse) IsEmpty() bool {
3086	return irlr.Value == nil || len(*irlr.Value) == 0
3087}
3088
3089// hasNextLink returns true if the NextLink is not empty.
3090func (irlr IntegrationRuntimeListResponse) hasNextLink() bool {
3091	return irlr.NextLink != nil && len(*irlr.NextLink) != 0
3092}
3093
3094// integrationRuntimeListResponsePreparer prepares a request to retrieve the next set of results.
3095// It returns nil if no more results exist.
3096func (irlr IntegrationRuntimeListResponse) integrationRuntimeListResponsePreparer(ctx context.Context) (*http.Request, error) {
3097	if !irlr.hasNextLink() {
3098		return nil, nil
3099	}
3100	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3101		autorest.AsJSON(),
3102		autorest.AsGet(),
3103		autorest.WithBaseURL(to.String(irlr.NextLink)))
3104}
3105
3106// IntegrationRuntimeListResponsePage contains a page of IntegrationRuntimeResource values.
3107type IntegrationRuntimeListResponsePage struct {
3108	fn   func(context.Context, IntegrationRuntimeListResponse) (IntegrationRuntimeListResponse, error)
3109	irlr IntegrationRuntimeListResponse
3110}
3111
3112// NextWithContext advances to the next page of values.  If there was an error making
3113// the request the page does not advance and the error is returned.
3114func (page *IntegrationRuntimeListResponsePage) NextWithContext(ctx context.Context) (err error) {
3115	if tracing.IsEnabled() {
3116		ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimeListResponsePage.NextWithContext")
3117		defer func() {
3118			sc := -1
3119			if page.Response().Response.Response != nil {
3120				sc = page.Response().Response.Response.StatusCode
3121			}
3122			tracing.EndSpan(ctx, sc, err)
3123		}()
3124	}
3125	for {
3126		next, err := page.fn(ctx, page.irlr)
3127		if err != nil {
3128			return err
3129		}
3130		page.irlr = next
3131		if !next.hasNextLink() || !next.IsEmpty() {
3132			break
3133		}
3134	}
3135	return nil
3136}
3137
3138// Next advances to the next page of values.  If there was an error making
3139// the request the page does not advance and the error is returned.
3140// Deprecated: Use NextWithContext() instead.
3141func (page *IntegrationRuntimeListResponsePage) Next() error {
3142	return page.NextWithContext(context.Background())
3143}
3144
3145// NotDone returns true if the page enumeration should be started or is not yet complete.
3146func (page IntegrationRuntimeListResponsePage) NotDone() bool {
3147	return !page.irlr.IsEmpty()
3148}
3149
3150// Response returns the raw server response from the last page request.
3151func (page IntegrationRuntimeListResponsePage) Response() IntegrationRuntimeListResponse {
3152	return page.irlr
3153}
3154
3155// Values returns the slice of values for the current page or nil if there are no values.
3156func (page IntegrationRuntimeListResponsePage) Values() []IntegrationRuntimeResource {
3157	if page.irlr.IsEmpty() {
3158		return nil
3159	}
3160	return *page.irlr.Value
3161}
3162
3163// Creates a new instance of the IntegrationRuntimeListResponsePage type.
3164func NewIntegrationRuntimeListResponsePage(cur IntegrationRuntimeListResponse, getNextPage func(context.Context, IntegrationRuntimeListResponse) (IntegrationRuntimeListResponse, error)) IntegrationRuntimeListResponsePage {
3165	return IntegrationRuntimeListResponsePage{
3166		fn:   getNextPage,
3167		irlr: cur,
3168	}
3169}
3170
3171// IntegrationRuntimeMonitoringData get monitoring data response.
3172type IntegrationRuntimeMonitoringData struct {
3173	autorest.Response `json:"-"`
3174	// Name - Integration runtime name.
3175	Name *string `json:"name,omitempty"`
3176	// Nodes - Integration runtime node monitoring data.
3177	Nodes *[]IntegrationRuntimeNodeMonitoringData `json:"nodes,omitempty"`
3178}
3179
3180// IntegrationRuntimeNodeIPAddress the IP address of self-hosted integration runtime node.
3181type IntegrationRuntimeNodeIPAddress struct {
3182	autorest.Response `json:"-"`
3183	// IPAddress - READ-ONLY; The IP address of self-hosted integration runtime node.
3184	IPAddress *string `json:"ipAddress,omitempty"`
3185}
3186
3187// IntegrationRuntimeNodeMonitoringData monitoring data for integration runtime node.
3188type IntegrationRuntimeNodeMonitoringData struct {
3189	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
3190	AdditionalProperties map[string]interface{} `json:""`
3191	// NodeName - READ-ONLY; Name of the integration runtime node.
3192	NodeName *string `json:"nodeName,omitempty"`
3193	// AvailableMemoryInMB - READ-ONLY; Available memory (MB) on the integration runtime node.
3194	AvailableMemoryInMB *int32 `json:"availableMemoryInMB,omitempty"`
3195	// CPUUtilization - READ-ONLY; CPU percentage on the integration runtime node.
3196	CPUUtilization *int32 `json:"cpuUtilization,omitempty"`
3197	// ConcurrentJobsLimit - READ-ONLY; Maximum concurrent jobs on the integration runtime node.
3198	ConcurrentJobsLimit *int32 `json:"concurrentJobsLimit,omitempty"`
3199	// ConcurrentJobsRunning - READ-ONLY; The number of jobs currently running on the integration runtime node.
3200	ConcurrentJobsRunning *int32 `json:"concurrentJobsRunning,omitempty"`
3201	// MaxConcurrentJobs - READ-ONLY; The maximum concurrent jobs in this integration runtime.
3202	MaxConcurrentJobs *int32 `json:"maxConcurrentJobs,omitempty"`
3203	// SentBytes - READ-ONLY; Sent bytes on the integration runtime node.
3204	SentBytes *float64 `json:"sentBytes,omitempty"`
3205	// ReceivedBytes - READ-ONLY; Received bytes on the integration runtime node.
3206	ReceivedBytes *float64 `json:"receivedBytes,omitempty"`
3207}
3208
3209// MarshalJSON is the custom marshaler for IntegrationRuntimeNodeMonitoringData.
3210func (irnmd IntegrationRuntimeNodeMonitoringData) MarshalJSON() ([]byte, error) {
3211	objectMap := make(map[string]interface{})
3212	for k, v := range irnmd.AdditionalProperties {
3213		objectMap[k] = v
3214	}
3215	return json.Marshal(objectMap)
3216}
3217
3218// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeNodeMonitoringData struct.
3219func (irnmd *IntegrationRuntimeNodeMonitoringData) UnmarshalJSON(body []byte) error {
3220	var m map[string]*json.RawMessage
3221	err := json.Unmarshal(body, &m)
3222	if err != nil {
3223		return err
3224	}
3225	for k, v := range m {
3226		switch k {
3227		default:
3228			if v != nil {
3229				var additionalProperties interface{}
3230				err = json.Unmarshal(*v, &additionalProperties)
3231				if err != nil {
3232					return err
3233				}
3234				if irnmd.AdditionalProperties == nil {
3235					irnmd.AdditionalProperties = make(map[string]interface{})
3236				}
3237				irnmd.AdditionalProperties[k] = additionalProperties
3238			}
3239		case "nodeName":
3240			if v != nil {
3241				var nodeName string
3242				err = json.Unmarshal(*v, &nodeName)
3243				if err != nil {
3244					return err
3245				}
3246				irnmd.NodeName = &nodeName
3247			}
3248		case "availableMemoryInMB":
3249			if v != nil {
3250				var availableMemoryInMB int32
3251				err = json.Unmarshal(*v, &availableMemoryInMB)
3252				if err != nil {
3253					return err
3254				}
3255				irnmd.AvailableMemoryInMB = &availableMemoryInMB
3256			}
3257		case "cpuUtilization":
3258			if v != nil {
3259				var CPUUtilization int32
3260				err = json.Unmarshal(*v, &CPUUtilization)
3261				if err != nil {
3262					return err
3263				}
3264				irnmd.CPUUtilization = &CPUUtilization
3265			}
3266		case "concurrentJobsLimit":
3267			if v != nil {
3268				var concurrentJobsLimit int32
3269				err = json.Unmarshal(*v, &concurrentJobsLimit)
3270				if err != nil {
3271					return err
3272				}
3273				irnmd.ConcurrentJobsLimit = &concurrentJobsLimit
3274			}
3275		case "concurrentJobsRunning":
3276			if v != nil {
3277				var concurrentJobsRunning int32
3278				err = json.Unmarshal(*v, &concurrentJobsRunning)
3279				if err != nil {
3280					return err
3281				}
3282				irnmd.ConcurrentJobsRunning = &concurrentJobsRunning
3283			}
3284		case "maxConcurrentJobs":
3285			if v != nil {
3286				var maxConcurrentJobs int32
3287				err = json.Unmarshal(*v, &maxConcurrentJobs)
3288				if err != nil {
3289					return err
3290				}
3291				irnmd.MaxConcurrentJobs = &maxConcurrentJobs
3292			}
3293		case "sentBytes":
3294			if v != nil {
3295				var sentBytes float64
3296				err = json.Unmarshal(*v, &sentBytes)
3297				if err != nil {
3298					return err
3299				}
3300				irnmd.SentBytes = &sentBytes
3301			}
3302		case "receivedBytes":
3303			if v != nil {
3304				var receivedBytes float64
3305				err = json.Unmarshal(*v, &receivedBytes)
3306				if err != nil {
3307					return err
3308				}
3309				irnmd.ReceivedBytes = &receivedBytes
3310			}
3311		}
3312	}
3313
3314	return nil
3315}
3316
3317// IntegrationRuntimeObjectMetadataRefreshFuture an abstraction for monitoring and retrieving the results
3318// of a long-running operation.
3319type IntegrationRuntimeObjectMetadataRefreshFuture struct {
3320	azure.FutureAPI
3321	// Result returns the result of the asynchronous operation.
3322	// If the operation has not completed it will return an error.
3323	Result func(IntegrationRuntimeObjectMetadataClient) (SsisObjectMetadataStatusResponse, error)
3324}
3325
3326// IntegrationRuntimeRegenerateKeyParameters parameters to regenerate the authentication key.
3327type IntegrationRuntimeRegenerateKeyParameters struct {
3328	// KeyName - The name of the authentication key to regenerate. Possible values include: 'AuthKey1', 'AuthKey2'
3329	KeyName IntegrationRuntimeAuthKeyName `json:"keyName,omitempty"`
3330}
3331
3332// IntegrationRuntimeResource integration runtime resource type.
3333type IntegrationRuntimeResource struct {
3334	autorest.Response `json:"-"`
3335	// Properties - Integration runtime properties.
3336	Properties BasicIntegrationRuntime `json:"properties,omitempty"`
3337	// Etag - READ-ONLY; Resource Etag.
3338	Etag *string `json:"etag,omitempty"`
3339	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
3340	ID *string `json:"id,omitempty"`
3341	// Name - READ-ONLY; The name of the resource
3342	Name *string `json:"name,omitempty"`
3343	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
3344	Type *string `json:"type,omitempty"`
3345}
3346
3347// MarshalJSON is the custom marshaler for IntegrationRuntimeResource.
3348func (irr IntegrationRuntimeResource) MarshalJSON() ([]byte, error) {
3349	objectMap := make(map[string]interface{})
3350	objectMap["properties"] = irr.Properties
3351	return json.Marshal(objectMap)
3352}
3353
3354// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeResource struct.
3355func (irr *IntegrationRuntimeResource) UnmarshalJSON(body []byte) error {
3356	var m map[string]*json.RawMessage
3357	err := json.Unmarshal(body, &m)
3358	if err != nil {
3359		return err
3360	}
3361	for k, v := range m {
3362		switch k {
3363		case "properties":
3364			if v != nil {
3365				properties, err := unmarshalBasicIntegrationRuntime(*v)
3366				if err != nil {
3367					return err
3368				}
3369				irr.Properties = properties
3370			}
3371		case "etag":
3372			if v != nil {
3373				var etag string
3374				err = json.Unmarshal(*v, &etag)
3375				if err != nil {
3376					return err
3377				}
3378				irr.Etag = &etag
3379			}
3380		case "id":
3381			if v != nil {
3382				var ID string
3383				err = json.Unmarshal(*v, &ID)
3384				if err != nil {
3385					return err
3386				}
3387				irr.ID = &ID
3388			}
3389		case "name":
3390			if v != nil {
3391				var name string
3392				err = json.Unmarshal(*v, &name)
3393				if err != nil {
3394					return err
3395				}
3396				irr.Name = &name
3397			}
3398		case "type":
3399			if v != nil {
3400				var typeVar string
3401				err = json.Unmarshal(*v, &typeVar)
3402				if err != nil {
3403					return err
3404				}
3405				irr.Type = &typeVar
3406			}
3407		}
3408	}
3409
3410	return nil
3411}
3412
3413// IntegrationRuntimesCreateFuture an abstraction for monitoring and retrieving the results of a
3414// long-running operation.
3415type IntegrationRuntimesCreateFuture struct {
3416	azure.FutureAPI
3417	// Result returns the result of the asynchronous operation.
3418	// If the operation has not completed it will return an error.
3419	Result func(IntegrationRuntimesClient) (IntegrationRuntimeResource, error)
3420}
3421
3422// IntegrationRuntimesDeleteFuture an abstraction for monitoring and retrieving the results of a
3423// long-running operation.
3424type IntegrationRuntimesDeleteFuture struct {
3425	azure.FutureAPI
3426	// Result returns the result of the asynchronous operation.
3427	// If the operation has not completed it will return an error.
3428	Result func(IntegrationRuntimesClient) (autorest.Response, error)
3429}
3430
3431// IntegrationRuntimesDisableInteractiveQueryFuture an abstraction for monitoring and retrieving the
3432// results of a long-running operation.
3433type IntegrationRuntimesDisableInteractiveQueryFuture struct {
3434	azure.FutureAPI
3435	// Result returns the result of the asynchronous operation.
3436	// If the operation has not completed it will return an error.
3437	Result func(IntegrationRuntimesClient) (autorest.Response, error)
3438}
3439
3440// IntegrationRuntimesEnableInteractiveQueryFuture an abstraction for monitoring and retrieving the results
3441// of a long-running operation.
3442type IntegrationRuntimesEnableInteractiveQueryFuture struct {
3443	azure.FutureAPI
3444	// Result returns the result of the asynchronous operation.
3445	// If the operation has not completed it will return an error.
3446	Result func(IntegrationRuntimesClient) (autorest.Response, error)
3447}
3448
3449// IntegrationRuntimeSsisCatalogInfo catalog information for managed dedicated integration runtime.
3450type IntegrationRuntimeSsisCatalogInfo struct {
3451	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
3452	AdditionalProperties map[string]interface{} `json:""`
3453	// CatalogServerEndpoint - The catalog database server URL.
3454	CatalogServerEndpoint *string `json:"catalogServerEndpoint,omitempty"`
3455	// CatalogAdminUserName - The administrator user name of catalog database.
3456	CatalogAdminUserName *string `json:"catalogAdminUserName,omitempty"`
3457	// CatalogAdminPassword - The password of the administrator user account of the catalog database.
3458	CatalogAdminPassword *SecureString `json:"catalogAdminPassword,omitempty"`
3459	// CatalogPricingTier - The pricing tier for the catalog database. The valid values could be found in https://azure.microsoft.com/en-us/pricing/details/sql-database/. Possible values include: 'IntegrationRuntimeSsisCatalogPricingTierBasic', 'IntegrationRuntimeSsisCatalogPricingTierStandard', 'IntegrationRuntimeSsisCatalogPricingTierPremium', 'IntegrationRuntimeSsisCatalogPricingTierPremiumRS'
3460	CatalogPricingTier IntegrationRuntimeSsisCatalogPricingTier `json:"catalogPricingTier,omitempty"`
3461}
3462
3463// MarshalJSON is the custom marshaler for IntegrationRuntimeSsisCatalogInfo.
3464func (irsci IntegrationRuntimeSsisCatalogInfo) MarshalJSON() ([]byte, error) {
3465	objectMap := make(map[string]interface{})
3466	if irsci.CatalogServerEndpoint != nil {
3467		objectMap["catalogServerEndpoint"] = irsci.CatalogServerEndpoint
3468	}
3469	if irsci.CatalogAdminUserName != nil {
3470		objectMap["catalogAdminUserName"] = irsci.CatalogAdminUserName
3471	}
3472	if irsci.CatalogAdminPassword != nil {
3473		objectMap["catalogAdminPassword"] = irsci.CatalogAdminPassword
3474	}
3475	if irsci.CatalogPricingTier != "" {
3476		objectMap["catalogPricingTier"] = irsci.CatalogPricingTier
3477	}
3478	for k, v := range irsci.AdditionalProperties {
3479		objectMap[k] = v
3480	}
3481	return json.Marshal(objectMap)
3482}
3483
3484// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeSsisCatalogInfo struct.
3485func (irsci *IntegrationRuntimeSsisCatalogInfo) UnmarshalJSON(body []byte) error {
3486	var m map[string]*json.RawMessage
3487	err := json.Unmarshal(body, &m)
3488	if err != nil {
3489		return err
3490	}
3491	for k, v := range m {
3492		switch k {
3493		default:
3494			if v != nil {
3495				var additionalProperties interface{}
3496				err = json.Unmarshal(*v, &additionalProperties)
3497				if err != nil {
3498					return err
3499				}
3500				if irsci.AdditionalProperties == nil {
3501					irsci.AdditionalProperties = make(map[string]interface{})
3502				}
3503				irsci.AdditionalProperties[k] = additionalProperties
3504			}
3505		case "catalogServerEndpoint":
3506			if v != nil {
3507				var catalogServerEndpoint string
3508				err = json.Unmarshal(*v, &catalogServerEndpoint)
3509				if err != nil {
3510					return err
3511				}
3512				irsci.CatalogServerEndpoint = &catalogServerEndpoint
3513			}
3514		case "catalogAdminUserName":
3515			if v != nil {
3516				var catalogAdminUserName string
3517				err = json.Unmarshal(*v, &catalogAdminUserName)
3518				if err != nil {
3519					return err
3520				}
3521				irsci.CatalogAdminUserName = &catalogAdminUserName
3522			}
3523		case "catalogAdminPassword":
3524			if v != nil {
3525				var catalogAdminPassword SecureString
3526				err = json.Unmarshal(*v, &catalogAdminPassword)
3527				if err != nil {
3528					return err
3529				}
3530				irsci.CatalogAdminPassword = &catalogAdminPassword
3531			}
3532		case "catalogPricingTier":
3533			if v != nil {
3534				var catalogPricingTier IntegrationRuntimeSsisCatalogPricingTier
3535				err = json.Unmarshal(*v, &catalogPricingTier)
3536				if err != nil {
3537					return err
3538				}
3539				irsci.CatalogPricingTier = catalogPricingTier
3540			}
3541		}
3542	}
3543
3544	return nil
3545}
3546
3547// IntegrationRuntimeSsisProperties SSIS properties for managed integration runtime.
3548type IntegrationRuntimeSsisProperties struct {
3549	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
3550	AdditionalProperties map[string]interface{} `json:""`
3551	// CatalogInfo - Catalog information for managed dedicated integration runtime.
3552	CatalogInfo *IntegrationRuntimeSsisCatalogInfo `json:"catalogInfo,omitempty"`
3553	// LicenseType - License type for bringing your own license scenario. Possible values include: 'BasePrice', 'LicenseIncluded'
3554	LicenseType IntegrationRuntimeLicenseType `json:"licenseType,omitempty"`
3555	// CustomSetupScriptProperties - Custom setup script properties for a managed dedicated integration runtime.
3556	CustomSetupScriptProperties *IntegrationRuntimeCustomSetupScriptProperties `json:"customSetupScriptProperties,omitempty"`
3557	// DataProxyProperties - Data proxy properties for a managed dedicated integration runtime.
3558	DataProxyProperties *IntegrationRuntimeDataProxyProperties `json:"dataProxyProperties,omitempty"`
3559	// Edition - The edition for the SSIS Integration Runtime. Possible values include: 'Standard', 'Enterprise'
3560	Edition IntegrationRuntimeEdition `json:"edition,omitempty"`
3561	// ExpressCustomSetupProperties - Custom setup without script properties for a SSIS integration runtime.
3562	ExpressCustomSetupProperties *[]BasicCustomSetupBase `json:"expressCustomSetupProperties,omitempty"`
3563}
3564
3565// MarshalJSON is the custom marshaler for IntegrationRuntimeSsisProperties.
3566func (irsp IntegrationRuntimeSsisProperties) MarshalJSON() ([]byte, error) {
3567	objectMap := make(map[string]interface{})
3568	if irsp.CatalogInfo != nil {
3569		objectMap["catalogInfo"] = irsp.CatalogInfo
3570	}
3571	if irsp.LicenseType != "" {
3572		objectMap["licenseType"] = irsp.LicenseType
3573	}
3574	if irsp.CustomSetupScriptProperties != nil {
3575		objectMap["customSetupScriptProperties"] = irsp.CustomSetupScriptProperties
3576	}
3577	if irsp.DataProxyProperties != nil {
3578		objectMap["dataProxyProperties"] = irsp.DataProxyProperties
3579	}
3580	if irsp.Edition != "" {
3581		objectMap["edition"] = irsp.Edition
3582	}
3583	if irsp.ExpressCustomSetupProperties != nil {
3584		objectMap["expressCustomSetupProperties"] = irsp.ExpressCustomSetupProperties
3585	}
3586	for k, v := range irsp.AdditionalProperties {
3587		objectMap[k] = v
3588	}
3589	return json.Marshal(objectMap)
3590}
3591
3592// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeSsisProperties struct.
3593func (irsp *IntegrationRuntimeSsisProperties) UnmarshalJSON(body []byte) error {
3594	var m map[string]*json.RawMessage
3595	err := json.Unmarshal(body, &m)
3596	if err != nil {
3597		return err
3598	}
3599	for k, v := range m {
3600		switch k {
3601		default:
3602			if v != nil {
3603				var additionalProperties interface{}
3604				err = json.Unmarshal(*v, &additionalProperties)
3605				if err != nil {
3606					return err
3607				}
3608				if irsp.AdditionalProperties == nil {
3609					irsp.AdditionalProperties = make(map[string]interface{})
3610				}
3611				irsp.AdditionalProperties[k] = additionalProperties
3612			}
3613		case "catalogInfo":
3614			if v != nil {
3615				var catalogInfo IntegrationRuntimeSsisCatalogInfo
3616				err = json.Unmarshal(*v, &catalogInfo)
3617				if err != nil {
3618					return err
3619				}
3620				irsp.CatalogInfo = &catalogInfo
3621			}
3622		case "licenseType":
3623			if v != nil {
3624				var licenseType IntegrationRuntimeLicenseType
3625				err = json.Unmarshal(*v, &licenseType)
3626				if err != nil {
3627					return err
3628				}
3629				irsp.LicenseType = licenseType
3630			}
3631		case "customSetupScriptProperties":
3632			if v != nil {
3633				var customSetupScriptProperties IntegrationRuntimeCustomSetupScriptProperties
3634				err = json.Unmarshal(*v, &customSetupScriptProperties)
3635				if err != nil {
3636					return err
3637				}
3638				irsp.CustomSetupScriptProperties = &customSetupScriptProperties
3639			}
3640		case "dataProxyProperties":
3641			if v != nil {
3642				var dataProxyProperties IntegrationRuntimeDataProxyProperties
3643				err = json.Unmarshal(*v, &dataProxyProperties)
3644				if err != nil {
3645					return err
3646				}
3647				irsp.DataProxyProperties = &dataProxyProperties
3648			}
3649		case "edition":
3650			if v != nil {
3651				var edition IntegrationRuntimeEdition
3652				err = json.Unmarshal(*v, &edition)
3653				if err != nil {
3654					return err
3655				}
3656				irsp.Edition = edition
3657			}
3658		case "expressCustomSetupProperties":
3659			if v != nil {
3660				expressCustomSetupProperties, err := unmarshalBasicCustomSetupBaseArray(*v)
3661				if err != nil {
3662					return err
3663				}
3664				irsp.ExpressCustomSetupProperties = &expressCustomSetupProperties
3665			}
3666		}
3667	}
3668
3669	return nil
3670}
3671
3672// IntegrationRuntimesStartFuture an abstraction for monitoring and retrieving the results of a
3673// long-running operation.
3674type IntegrationRuntimesStartFuture struct {
3675	azure.FutureAPI
3676	// Result returns the result of the asynchronous operation.
3677	// If the operation has not completed it will return an error.
3678	Result func(IntegrationRuntimesClient) (IntegrationRuntimeStatusResponse, error)
3679}
3680
3681// IntegrationRuntimesStopFuture an abstraction for monitoring and retrieving the results of a long-running
3682// operation.
3683type IntegrationRuntimesStopFuture struct {
3684	azure.FutureAPI
3685	// Result returns the result of the asynchronous operation.
3686	// If the operation has not completed it will return an error.
3687	Result func(IntegrationRuntimesClient) (autorest.Response, error)
3688}
3689
3690// BasicIntegrationRuntimeStatus integration runtime status.
3691type BasicIntegrationRuntimeStatus interface {
3692	AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool)
3693	AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool)
3694	AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool)
3695}
3696
3697// IntegrationRuntimeStatus integration runtime status.
3698type IntegrationRuntimeStatus struct {
3699	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
3700	AdditionalProperties map[string]interface{} `json:""`
3701	// DataFactoryName - READ-ONLY; The workspace name which the integration runtime belong to.
3702	DataFactoryName *string `json:"dataFactoryName,omitempty"`
3703	// State - READ-ONLY; The state of integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied'
3704	State IntegrationRuntimeState `json:"state,omitempty"`
3705	// Type - Possible values include: 'TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus', 'TypeBasicIntegrationRuntimeStatusTypeManaged', 'TypeBasicIntegrationRuntimeStatusTypeSelfHosted'
3706	Type TypeBasicIntegrationRuntimeStatus `json:"type,omitempty"`
3707}
3708
3709func unmarshalBasicIntegrationRuntimeStatus(body []byte) (BasicIntegrationRuntimeStatus, error) {
3710	var m map[string]interface{}
3711	err := json.Unmarshal(body, &m)
3712	if err != nil {
3713		return nil, err
3714	}
3715
3716	switch m["type"] {
3717	case string(TypeBasicIntegrationRuntimeStatusTypeManaged):
3718		var mirs ManagedIntegrationRuntimeStatus
3719		err := json.Unmarshal(body, &mirs)
3720		return mirs, err
3721	case string(TypeBasicIntegrationRuntimeStatusTypeSelfHosted):
3722		var shirs SelfHostedIntegrationRuntimeStatus
3723		err := json.Unmarshal(body, &shirs)
3724		return shirs, err
3725	default:
3726		var irs IntegrationRuntimeStatus
3727		err := json.Unmarshal(body, &irs)
3728		return irs, err
3729	}
3730}
3731func unmarshalBasicIntegrationRuntimeStatusArray(body []byte) ([]BasicIntegrationRuntimeStatus, error) {
3732	var rawMessages []*json.RawMessage
3733	err := json.Unmarshal(body, &rawMessages)
3734	if err != nil {
3735		return nil, err
3736	}
3737
3738	irsArray := make([]BasicIntegrationRuntimeStatus, len(rawMessages))
3739
3740	for index, rawMessage := range rawMessages {
3741		irs, err := unmarshalBasicIntegrationRuntimeStatus(*rawMessage)
3742		if err != nil {
3743			return nil, err
3744		}
3745		irsArray[index] = irs
3746	}
3747	return irsArray, nil
3748}
3749
3750// MarshalJSON is the custom marshaler for IntegrationRuntimeStatus.
3751func (irs IntegrationRuntimeStatus) MarshalJSON() ([]byte, error) {
3752	irs.Type = TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus
3753	objectMap := make(map[string]interface{})
3754	if irs.Type != "" {
3755		objectMap["type"] = irs.Type
3756	}
3757	for k, v := range irs.AdditionalProperties {
3758		objectMap[k] = v
3759	}
3760	return json.Marshal(objectMap)
3761}
3762
3763// AsManagedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus.
3764func (irs IntegrationRuntimeStatus) AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) {
3765	return nil, false
3766}
3767
3768// AsSelfHostedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus.
3769func (irs IntegrationRuntimeStatus) AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) {
3770	return nil, false
3771}
3772
3773// AsIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus.
3774func (irs IntegrationRuntimeStatus) AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) {
3775	return &irs, true
3776}
3777
3778// AsBasicIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for IntegrationRuntimeStatus.
3779func (irs IntegrationRuntimeStatus) AsBasicIntegrationRuntimeStatus() (BasicIntegrationRuntimeStatus, bool) {
3780	return &irs, true
3781}
3782
3783// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeStatus struct.
3784func (irs *IntegrationRuntimeStatus) UnmarshalJSON(body []byte) error {
3785	var m map[string]*json.RawMessage
3786	err := json.Unmarshal(body, &m)
3787	if err != nil {
3788		return err
3789	}
3790	for k, v := range m {
3791		switch k {
3792		default:
3793			if v != nil {
3794				var additionalProperties interface{}
3795				err = json.Unmarshal(*v, &additionalProperties)
3796				if err != nil {
3797					return err
3798				}
3799				if irs.AdditionalProperties == nil {
3800					irs.AdditionalProperties = make(map[string]interface{})
3801				}
3802				irs.AdditionalProperties[k] = additionalProperties
3803			}
3804		case "dataFactoryName":
3805			if v != nil {
3806				var dataFactoryName string
3807				err = json.Unmarshal(*v, &dataFactoryName)
3808				if err != nil {
3809					return err
3810				}
3811				irs.DataFactoryName = &dataFactoryName
3812			}
3813		case "state":
3814			if v != nil {
3815				var state IntegrationRuntimeState
3816				err = json.Unmarshal(*v, &state)
3817				if err != nil {
3818					return err
3819				}
3820				irs.State = state
3821			}
3822		case "type":
3823			if v != nil {
3824				var typeVar TypeBasicIntegrationRuntimeStatus
3825				err = json.Unmarshal(*v, &typeVar)
3826				if err != nil {
3827					return err
3828				}
3829				irs.Type = typeVar
3830			}
3831		}
3832	}
3833
3834	return nil
3835}
3836
3837// IntegrationRuntimeStatusResponse integration runtime status response.
3838type IntegrationRuntimeStatusResponse struct {
3839	autorest.Response `json:"-"`
3840	// Name - READ-ONLY; The integration runtime name.
3841	Name *string `json:"name,omitempty"`
3842	// Properties - Integration runtime properties.
3843	Properties BasicIntegrationRuntimeStatus `json:"properties,omitempty"`
3844}
3845
3846// MarshalJSON is the custom marshaler for IntegrationRuntimeStatusResponse.
3847func (irsr IntegrationRuntimeStatusResponse) MarshalJSON() ([]byte, error) {
3848	objectMap := make(map[string]interface{})
3849	objectMap["properties"] = irsr.Properties
3850	return json.Marshal(objectMap)
3851}
3852
3853// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeStatusResponse struct.
3854func (irsr *IntegrationRuntimeStatusResponse) UnmarshalJSON(body []byte) error {
3855	var m map[string]*json.RawMessage
3856	err := json.Unmarshal(body, &m)
3857	if err != nil {
3858		return err
3859	}
3860	for k, v := range m {
3861		switch k {
3862		case "name":
3863			if v != nil {
3864				var name string
3865				err = json.Unmarshal(*v, &name)
3866				if err != nil {
3867					return err
3868				}
3869				irsr.Name = &name
3870			}
3871		case "properties":
3872			if v != nil {
3873				properties, err := unmarshalBasicIntegrationRuntimeStatus(*v)
3874				if err != nil {
3875					return err
3876				}
3877				irsr.Properties = properties
3878			}
3879		}
3880	}
3881
3882	return nil
3883}
3884
3885// IntegrationRuntimeVNetProperties vNet properties for managed integration runtime.
3886type IntegrationRuntimeVNetProperties struct {
3887	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
3888	AdditionalProperties map[string]interface{} `json:""`
3889	// VNetID - The ID of the VNet that this integration runtime will join.
3890	VNetID *string `json:"vNetId,omitempty"`
3891	// Subnet - The name of the subnet this integration runtime will join.
3892	Subnet *string `json:"subnet,omitempty"`
3893	// PublicIPs - Resource IDs of the public IP addresses that this integration runtime will use.
3894	PublicIPs *[]string `json:"publicIPs,omitempty"`
3895}
3896
3897// MarshalJSON is the custom marshaler for IntegrationRuntimeVNetProperties.
3898func (irvnp IntegrationRuntimeVNetProperties) MarshalJSON() ([]byte, error) {
3899	objectMap := make(map[string]interface{})
3900	if irvnp.VNetID != nil {
3901		objectMap["vNetId"] = irvnp.VNetID
3902	}
3903	if irvnp.Subnet != nil {
3904		objectMap["subnet"] = irvnp.Subnet
3905	}
3906	if irvnp.PublicIPs != nil {
3907		objectMap["publicIPs"] = irvnp.PublicIPs
3908	}
3909	for k, v := range irvnp.AdditionalProperties {
3910		objectMap[k] = v
3911	}
3912	return json.Marshal(objectMap)
3913}
3914
3915// UnmarshalJSON is the custom unmarshaler for IntegrationRuntimeVNetProperties struct.
3916func (irvnp *IntegrationRuntimeVNetProperties) UnmarshalJSON(body []byte) error {
3917	var m map[string]*json.RawMessage
3918	err := json.Unmarshal(body, &m)
3919	if err != nil {
3920		return err
3921	}
3922	for k, v := range m {
3923		switch k {
3924		default:
3925			if v != nil {
3926				var additionalProperties interface{}
3927				err = json.Unmarshal(*v, &additionalProperties)
3928				if err != nil {
3929					return err
3930				}
3931				if irvnp.AdditionalProperties == nil {
3932					irvnp.AdditionalProperties = make(map[string]interface{})
3933				}
3934				irvnp.AdditionalProperties[k] = additionalProperties
3935			}
3936		case "vNetId":
3937			if v != nil {
3938				var vNetID string
3939				err = json.Unmarshal(*v, &vNetID)
3940				if err != nil {
3941					return err
3942				}
3943				irvnp.VNetID = &vNetID
3944			}
3945		case "subnet":
3946			if v != nil {
3947				var subnet string
3948				err = json.Unmarshal(*v, &subnet)
3949				if err != nil {
3950					return err
3951				}
3952				irvnp.Subnet = &subnet
3953			}
3954		case "publicIPs":
3955			if v != nil {
3956				var publicIPs []string
3957				err = json.Unmarshal(*v, &publicIPs)
3958				if err != nil {
3959					return err
3960				}
3961				irvnp.PublicIPs = &publicIPs
3962			}
3963		}
3964	}
3965
3966	return nil
3967}
3968
3969// IPFirewallRuleInfo IP firewall rule
3970type IPFirewallRuleInfo struct {
3971	autorest.Response `json:"-"`
3972	// IPFirewallRuleProperties - IP firewall rule properties
3973	*IPFirewallRuleProperties `json:"properties,omitempty"`
3974	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
3975	ID *string `json:"id,omitempty"`
3976	// Name - READ-ONLY; The name of the resource
3977	Name *string `json:"name,omitempty"`
3978	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
3979	Type *string `json:"type,omitempty"`
3980}
3981
3982// MarshalJSON is the custom marshaler for IPFirewallRuleInfo.
3983func (ifri IPFirewallRuleInfo) MarshalJSON() ([]byte, error) {
3984	objectMap := make(map[string]interface{})
3985	if ifri.IPFirewallRuleProperties != nil {
3986		objectMap["properties"] = ifri.IPFirewallRuleProperties
3987	}
3988	return json.Marshal(objectMap)
3989}
3990
3991// UnmarshalJSON is the custom unmarshaler for IPFirewallRuleInfo struct.
3992func (ifri *IPFirewallRuleInfo) UnmarshalJSON(body []byte) error {
3993	var m map[string]*json.RawMessage
3994	err := json.Unmarshal(body, &m)
3995	if err != nil {
3996		return err
3997	}
3998	for k, v := range m {
3999		switch k {
4000		case "properties":
4001			if v != nil {
4002				var IPFirewallRuleProperties IPFirewallRuleProperties
4003				err = json.Unmarshal(*v, &IPFirewallRuleProperties)
4004				if err != nil {
4005					return err
4006				}
4007				ifri.IPFirewallRuleProperties = &IPFirewallRuleProperties
4008			}
4009		case "id":
4010			if v != nil {
4011				var ID string
4012				err = json.Unmarshal(*v, &ID)
4013				if err != nil {
4014					return err
4015				}
4016				ifri.ID = &ID
4017			}
4018		case "name":
4019			if v != nil {
4020				var name string
4021				err = json.Unmarshal(*v, &name)
4022				if err != nil {
4023					return err
4024				}
4025				ifri.Name = &name
4026			}
4027		case "type":
4028			if v != nil {
4029				var typeVar string
4030				err = json.Unmarshal(*v, &typeVar)
4031				if err != nil {
4032					return err
4033				}
4034				ifri.Type = &typeVar
4035			}
4036		}
4037	}
4038
4039	return nil
4040}
4041
4042// IPFirewallRuleInfoListResult list of IP firewall rules
4043type IPFirewallRuleInfoListResult struct {
4044	autorest.Response `json:"-"`
4045	// NextLink - Link to next page of results
4046	NextLink *string `json:"nextLink,omitempty"`
4047	// Value - List of IP firewall rules
4048	Value *[]IPFirewallRuleInfo `json:"value,omitempty"`
4049}
4050
4051// IPFirewallRuleInfoListResultIterator provides access to a complete listing of IPFirewallRuleInfo values.
4052type IPFirewallRuleInfoListResultIterator struct {
4053	i    int
4054	page IPFirewallRuleInfoListResultPage
4055}
4056
4057// NextWithContext advances to the next value.  If there was an error making
4058// the request the iterator does not advance and the error is returned.
4059func (iter *IPFirewallRuleInfoListResultIterator) NextWithContext(ctx context.Context) (err error) {
4060	if tracing.IsEnabled() {
4061		ctx = tracing.StartSpan(ctx, fqdn+"/IPFirewallRuleInfoListResultIterator.NextWithContext")
4062		defer func() {
4063			sc := -1
4064			if iter.Response().Response.Response != nil {
4065				sc = iter.Response().Response.Response.StatusCode
4066			}
4067			tracing.EndSpan(ctx, sc, err)
4068		}()
4069	}
4070	iter.i++
4071	if iter.i < len(iter.page.Values()) {
4072		return nil
4073	}
4074	err = iter.page.NextWithContext(ctx)
4075	if err != nil {
4076		iter.i--
4077		return err
4078	}
4079	iter.i = 0
4080	return nil
4081}
4082
4083// Next advances to the next value.  If there was an error making
4084// the request the iterator does not advance and the error is returned.
4085// Deprecated: Use NextWithContext() instead.
4086func (iter *IPFirewallRuleInfoListResultIterator) Next() error {
4087	return iter.NextWithContext(context.Background())
4088}
4089
4090// NotDone returns true if the enumeration should be started or is not yet complete.
4091func (iter IPFirewallRuleInfoListResultIterator) NotDone() bool {
4092	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4093}
4094
4095// Response returns the raw server response from the last page request.
4096func (iter IPFirewallRuleInfoListResultIterator) Response() IPFirewallRuleInfoListResult {
4097	return iter.page.Response()
4098}
4099
4100// Value returns the current value or a zero-initialized value if the
4101// iterator has advanced beyond the end of the collection.
4102func (iter IPFirewallRuleInfoListResultIterator) Value() IPFirewallRuleInfo {
4103	if !iter.page.NotDone() {
4104		return IPFirewallRuleInfo{}
4105	}
4106	return iter.page.Values()[iter.i]
4107}
4108
4109// Creates a new instance of the IPFirewallRuleInfoListResultIterator type.
4110func NewIPFirewallRuleInfoListResultIterator(page IPFirewallRuleInfoListResultPage) IPFirewallRuleInfoListResultIterator {
4111	return IPFirewallRuleInfoListResultIterator{page: page}
4112}
4113
4114// IsEmpty returns true if the ListResult contains no values.
4115func (ifrilr IPFirewallRuleInfoListResult) IsEmpty() bool {
4116	return ifrilr.Value == nil || len(*ifrilr.Value) == 0
4117}
4118
4119// hasNextLink returns true if the NextLink is not empty.
4120func (ifrilr IPFirewallRuleInfoListResult) hasNextLink() bool {
4121	return ifrilr.NextLink != nil && len(*ifrilr.NextLink) != 0
4122}
4123
4124// iPFirewallRuleInfoListResultPreparer prepares a request to retrieve the next set of results.
4125// It returns nil if no more results exist.
4126func (ifrilr IPFirewallRuleInfoListResult) iPFirewallRuleInfoListResultPreparer(ctx context.Context) (*http.Request, error) {
4127	if !ifrilr.hasNextLink() {
4128		return nil, nil
4129	}
4130	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4131		autorest.AsJSON(),
4132		autorest.AsGet(),
4133		autorest.WithBaseURL(to.String(ifrilr.NextLink)))
4134}
4135
4136// IPFirewallRuleInfoListResultPage contains a page of IPFirewallRuleInfo values.
4137type IPFirewallRuleInfoListResultPage struct {
4138	fn     func(context.Context, IPFirewallRuleInfoListResult) (IPFirewallRuleInfoListResult, error)
4139	ifrilr IPFirewallRuleInfoListResult
4140}
4141
4142// NextWithContext advances to the next page of values.  If there was an error making
4143// the request the page does not advance and the error is returned.
4144func (page *IPFirewallRuleInfoListResultPage) NextWithContext(ctx context.Context) (err error) {
4145	if tracing.IsEnabled() {
4146		ctx = tracing.StartSpan(ctx, fqdn+"/IPFirewallRuleInfoListResultPage.NextWithContext")
4147		defer func() {
4148			sc := -1
4149			if page.Response().Response.Response != nil {
4150				sc = page.Response().Response.Response.StatusCode
4151			}
4152			tracing.EndSpan(ctx, sc, err)
4153		}()
4154	}
4155	for {
4156		next, err := page.fn(ctx, page.ifrilr)
4157		if err != nil {
4158			return err
4159		}
4160		page.ifrilr = next
4161		if !next.hasNextLink() || !next.IsEmpty() {
4162			break
4163		}
4164	}
4165	return nil
4166}
4167
4168// Next advances to the next page of values.  If there was an error making
4169// the request the page does not advance and the error is returned.
4170// Deprecated: Use NextWithContext() instead.
4171func (page *IPFirewallRuleInfoListResultPage) Next() error {
4172	return page.NextWithContext(context.Background())
4173}
4174
4175// NotDone returns true if the page enumeration should be started or is not yet complete.
4176func (page IPFirewallRuleInfoListResultPage) NotDone() bool {
4177	return !page.ifrilr.IsEmpty()
4178}
4179
4180// Response returns the raw server response from the last page request.
4181func (page IPFirewallRuleInfoListResultPage) Response() IPFirewallRuleInfoListResult {
4182	return page.ifrilr
4183}
4184
4185// Values returns the slice of values for the current page or nil if there are no values.
4186func (page IPFirewallRuleInfoListResultPage) Values() []IPFirewallRuleInfo {
4187	if page.ifrilr.IsEmpty() {
4188		return nil
4189	}
4190	return *page.ifrilr.Value
4191}
4192
4193// Creates a new instance of the IPFirewallRuleInfoListResultPage type.
4194func NewIPFirewallRuleInfoListResultPage(cur IPFirewallRuleInfoListResult, getNextPage func(context.Context, IPFirewallRuleInfoListResult) (IPFirewallRuleInfoListResult, error)) IPFirewallRuleInfoListResultPage {
4195	return IPFirewallRuleInfoListResultPage{
4196		fn:     getNextPage,
4197		ifrilr: cur,
4198	}
4199}
4200
4201// IPFirewallRuleProperties IP firewall rule properties
4202type IPFirewallRuleProperties struct {
4203	// EndIPAddress - The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress
4204	EndIPAddress *string `json:"endIpAddress,omitempty"`
4205	// ProvisioningState - READ-ONLY; Resource provisioning state. Possible values include: 'ProvisioningStateProvisioning', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateFailed', 'ProvisioningStateDeleteError'
4206	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4207	// StartIPAddress - The start IP address of the firewall rule. Must be IPv4 format
4208	StartIPAddress *string `json:"startIpAddress,omitempty"`
4209}
4210
4211// MarshalJSON is the custom marshaler for IPFirewallRuleProperties.
4212func (ifrp IPFirewallRuleProperties) MarshalJSON() ([]byte, error) {
4213	objectMap := make(map[string]interface{})
4214	if ifrp.EndIPAddress != nil {
4215		objectMap["endIpAddress"] = ifrp.EndIPAddress
4216	}
4217	if ifrp.StartIPAddress != nil {
4218		objectMap["startIpAddress"] = ifrp.StartIPAddress
4219	}
4220	return json.Marshal(objectMap)
4221}
4222
4223// IPFirewallRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4224// long-running operation.
4225type IPFirewallRulesCreateOrUpdateFuture struct {
4226	azure.FutureAPI
4227	// Result returns the result of the asynchronous operation.
4228	// If the operation has not completed it will return an error.
4229	Result func(IPFirewallRulesClient) (IPFirewallRuleInfo, error)
4230}
4231
4232// IPFirewallRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
4233// operation.
4234type IPFirewallRulesDeleteFuture struct {
4235	azure.FutureAPI
4236	// Result returns the result of the asynchronous operation.
4237	// If the operation has not completed it will return an error.
4238	Result func(IPFirewallRulesClient) (SetObject, error)
4239}
4240
4241// IPFirewallRulesReplaceAllFuture an abstraction for monitoring and retrieving the results of a
4242// long-running operation.
4243type IPFirewallRulesReplaceAllFuture struct {
4244	azure.FutureAPI
4245	// Result returns the result of the asynchronous operation.
4246	// If the operation has not completed it will return an error.
4247	Result func(IPFirewallRulesClient) (ReplaceAllFirewallRulesOperationResponse, error)
4248}
4249
4250// Key a workspace key
4251type Key struct {
4252	autorest.Response `json:"-"`
4253	// KeyProperties - Keys resource properties
4254	*KeyProperties `json:"properties,omitempty"`
4255	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
4256	ID *string `json:"id,omitempty"`
4257	// Name - READ-ONLY; The name of the resource
4258	Name *string `json:"name,omitempty"`
4259	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
4260	Type *string `json:"type,omitempty"`
4261}
4262
4263// MarshalJSON is the custom marshaler for Key.
4264func (kVar Key) MarshalJSON() ([]byte, error) {
4265	objectMap := make(map[string]interface{})
4266	if kVar.KeyProperties != nil {
4267		objectMap["properties"] = kVar.KeyProperties
4268	}
4269	return json.Marshal(objectMap)
4270}
4271
4272// UnmarshalJSON is the custom unmarshaler for Key struct.
4273func (kVar *Key) UnmarshalJSON(body []byte) error {
4274	var m map[string]*json.RawMessage
4275	err := json.Unmarshal(body, &m)
4276	if err != nil {
4277		return err
4278	}
4279	for k, v := range m {
4280		switch k {
4281		case "properties":
4282			if v != nil {
4283				var keyProperties KeyProperties
4284				err = json.Unmarshal(*v, &keyProperties)
4285				if err != nil {
4286					return err
4287				}
4288				kVar.KeyProperties = &keyProperties
4289			}
4290		case "id":
4291			if v != nil {
4292				var ID string
4293				err = json.Unmarshal(*v, &ID)
4294				if err != nil {
4295					return err
4296				}
4297				kVar.ID = &ID
4298			}
4299		case "name":
4300			if v != nil {
4301				var name string
4302				err = json.Unmarshal(*v, &name)
4303				if err != nil {
4304					return err
4305				}
4306				kVar.Name = &name
4307			}
4308		case "type":
4309			if v != nil {
4310				var typeVar string
4311				err = json.Unmarshal(*v, &typeVar)
4312				if err != nil {
4313					return err
4314				}
4315				kVar.Type = &typeVar
4316			}
4317		}
4318	}
4319
4320	return nil
4321}
4322
4323// KeyInfoListResult list of keys
4324type KeyInfoListResult struct {
4325	autorest.Response `json:"-"`
4326	// NextLink - Link to the next page of results
4327	NextLink *string `json:"nextLink,omitempty"`
4328	// Value - List of keys
4329	Value *[]Key `json:"value,omitempty"`
4330}
4331
4332// KeyInfoListResultIterator provides access to a complete listing of Key values.
4333type KeyInfoListResultIterator struct {
4334	i    int
4335	page KeyInfoListResultPage
4336}
4337
4338// NextWithContext advances to the next value.  If there was an error making
4339// the request the iterator does not advance and the error is returned.
4340func (iter *KeyInfoListResultIterator) NextWithContext(ctx context.Context) (err error) {
4341	if tracing.IsEnabled() {
4342		ctx = tracing.StartSpan(ctx, fqdn+"/KeyInfoListResultIterator.NextWithContext")
4343		defer func() {
4344			sc := -1
4345			if iter.Response().Response.Response != nil {
4346				sc = iter.Response().Response.Response.StatusCode
4347			}
4348			tracing.EndSpan(ctx, sc, err)
4349		}()
4350	}
4351	iter.i++
4352	if iter.i < len(iter.page.Values()) {
4353		return nil
4354	}
4355	err = iter.page.NextWithContext(ctx)
4356	if err != nil {
4357		iter.i--
4358		return err
4359	}
4360	iter.i = 0
4361	return nil
4362}
4363
4364// Next advances to the next value.  If there was an error making
4365// the request the iterator does not advance and the error is returned.
4366// Deprecated: Use NextWithContext() instead.
4367func (iter *KeyInfoListResultIterator) Next() error {
4368	return iter.NextWithContext(context.Background())
4369}
4370
4371// NotDone returns true if the enumeration should be started or is not yet complete.
4372func (iter KeyInfoListResultIterator) NotDone() bool {
4373	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4374}
4375
4376// Response returns the raw server response from the last page request.
4377func (iter KeyInfoListResultIterator) Response() KeyInfoListResult {
4378	return iter.page.Response()
4379}
4380
4381// Value returns the current value or a zero-initialized value if the
4382// iterator has advanced beyond the end of the collection.
4383func (iter KeyInfoListResultIterator) Value() Key {
4384	if !iter.page.NotDone() {
4385		return Key{}
4386	}
4387	return iter.page.Values()[iter.i]
4388}
4389
4390// Creates a new instance of the KeyInfoListResultIterator type.
4391func NewKeyInfoListResultIterator(page KeyInfoListResultPage) KeyInfoListResultIterator {
4392	return KeyInfoListResultIterator{page: page}
4393}
4394
4395// IsEmpty returns true if the ListResult contains no values.
4396func (kilr KeyInfoListResult) IsEmpty() bool {
4397	return kilr.Value == nil || len(*kilr.Value) == 0
4398}
4399
4400// hasNextLink returns true if the NextLink is not empty.
4401func (kilr KeyInfoListResult) hasNextLink() bool {
4402	return kilr.NextLink != nil && len(*kilr.NextLink) != 0
4403}
4404
4405// keyInfoListResultPreparer prepares a request to retrieve the next set of results.
4406// It returns nil if no more results exist.
4407func (kilr KeyInfoListResult) keyInfoListResultPreparer(ctx context.Context) (*http.Request, error) {
4408	if !kilr.hasNextLink() {
4409		return nil, nil
4410	}
4411	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4412		autorest.AsJSON(),
4413		autorest.AsGet(),
4414		autorest.WithBaseURL(to.String(kilr.NextLink)))
4415}
4416
4417// KeyInfoListResultPage contains a page of Key values.
4418type KeyInfoListResultPage struct {
4419	fn   func(context.Context, KeyInfoListResult) (KeyInfoListResult, error)
4420	kilr KeyInfoListResult
4421}
4422
4423// NextWithContext advances to the next page of values.  If there was an error making
4424// the request the page does not advance and the error is returned.
4425func (page *KeyInfoListResultPage) NextWithContext(ctx context.Context) (err error) {
4426	if tracing.IsEnabled() {
4427		ctx = tracing.StartSpan(ctx, fqdn+"/KeyInfoListResultPage.NextWithContext")
4428		defer func() {
4429			sc := -1
4430			if page.Response().Response.Response != nil {
4431				sc = page.Response().Response.Response.StatusCode
4432			}
4433			tracing.EndSpan(ctx, sc, err)
4434		}()
4435	}
4436	for {
4437		next, err := page.fn(ctx, page.kilr)
4438		if err != nil {
4439			return err
4440		}
4441		page.kilr = next
4442		if !next.hasNextLink() || !next.IsEmpty() {
4443			break
4444		}
4445	}
4446	return nil
4447}
4448
4449// Next advances to the next page of values.  If there was an error making
4450// the request the page does not advance and the error is returned.
4451// Deprecated: Use NextWithContext() instead.
4452func (page *KeyInfoListResultPage) Next() error {
4453	return page.NextWithContext(context.Background())
4454}
4455
4456// NotDone returns true if the page enumeration should be started or is not yet complete.
4457func (page KeyInfoListResultPage) NotDone() bool {
4458	return !page.kilr.IsEmpty()
4459}
4460
4461// Response returns the raw server response from the last page request.
4462func (page KeyInfoListResultPage) Response() KeyInfoListResult {
4463	return page.kilr
4464}
4465
4466// Values returns the slice of values for the current page or nil if there are no values.
4467func (page KeyInfoListResultPage) Values() []Key {
4468	if page.kilr.IsEmpty() {
4469		return nil
4470	}
4471	return *page.kilr.Value
4472}
4473
4474// Creates a new instance of the KeyInfoListResultPage type.
4475func NewKeyInfoListResultPage(cur KeyInfoListResult, getNextPage func(context.Context, KeyInfoListResult) (KeyInfoListResult, error)) KeyInfoListResultPage {
4476	return KeyInfoListResultPage{
4477		fn:   getNextPage,
4478		kilr: cur,
4479	}
4480}
4481
4482// KeyProperties key properties
4483type KeyProperties struct {
4484	// IsActiveCMK - Used to activate the workspace after a customer managed key is provided.
4485	IsActiveCMK *bool `json:"isActiveCMK,omitempty"`
4486	// KeyVaultURL - The Key Vault Url of the workspace key.
4487	KeyVaultURL *string `json:"keyVaultUrl,omitempty"`
4488}
4489
4490// LibraryInfo library/package information of a Big Data pool powered by Apache Spark
4491type LibraryInfo struct {
4492	// Name - Name of the library.
4493	Name *string `json:"name,omitempty"`
4494	// Path - Storage blob path of library.
4495	Path *string `json:"path,omitempty"`
4496	// ContainerName - Storage blob container name.
4497	ContainerName *string `json:"containerName,omitempty"`
4498	// UploadedTimestamp - READ-ONLY; The last update time of the library.
4499	UploadedTimestamp *date.Time `json:"uploadedTimestamp,omitempty"`
4500	// Type - Type of the library.
4501	Type *string `json:"type,omitempty"`
4502	// ProvisioningStatus - READ-ONLY; Provisioning status of the library/package.
4503	ProvisioningStatus *string `json:"provisioningStatus,omitempty"`
4504	// CreatorID - READ-ONLY; Creator Id of the library/package.
4505	CreatorID *string `json:"creatorId,omitempty"`
4506}
4507
4508// MarshalJSON is the custom marshaler for LibraryInfo.
4509func (li LibraryInfo) MarshalJSON() ([]byte, error) {
4510	objectMap := make(map[string]interface{})
4511	if li.Name != nil {
4512		objectMap["name"] = li.Name
4513	}
4514	if li.Path != nil {
4515		objectMap["path"] = li.Path
4516	}
4517	if li.ContainerName != nil {
4518		objectMap["containerName"] = li.ContainerName
4519	}
4520	if li.Type != nil {
4521		objectMap["type"] = li.Type
4522	}
4523	return json.Marshal(objectMap)
4524}
4525
4526// LibraryRequirements library requirements for a Big Data pool powered by Apache Spark
4527type LibraryRequirements struct {
4528	// Time - READ-ONLY; The last update time of the library requirements file.
4529	Time *date.Time `json:"time,omitempty"`
4530	// Content - The library requirements.
4531	Content *string `json:"content,omitempty"`
4532	// Filename - The filename of the library requirements file.
4533	Filename *string `json:"filename,omitempty"`
4534}
4535
4536// MarshalJSON is the custom marshaler for LibraryRequirements.
4537func (lr LibraryRequirements) MarshalJSON() ([]byte, error) {
4538	objectMap := make(map[string]interface{})
4539	if lr.Content != nil {
4540		objectMap["content"] = lr.Content
4541	}
4542	if lr.Filename != nil {
4543		objectMap["filename"] = lr.Filename
4544	}
4545	return json.Marshal(objectMap)
4546}
4547
4548// LicensedComponentSetupTypeProperties installation of licensed component setup type properties.
4549type LicensedComponentSetupTypeProperties struct {
4550	// ComponentName - The name of the 3rd party component.
4551	ComponentName *string `json:"componentName,omitempty"`
4552	// LicenseKey - The license key to activate the component.
4553	LicenseKey BasicSecretBase `json:"licenseKey,omitempty"`
4554}
4555
4556// UnmarshalJSON is the custom unmarshaler for LicensedComponentSetupTypeProperties struct.
4557func (lcstp *LicensedComponentSetupTypeProperties) UnmarshalJSON(body []byte) error {
4558	var m map[string]*json.RawMessage
4559	err := json.Unmarshal(body, &m)
4560	if err != nil {
4561		return err
4562	}
4563	for k, v := range m {
4564		switch k {
4565		case "componentName":
4566			if v != nil {
4567				var componentName string
4568				err = json.Unmarshal(*v, &componentName)
4569				if err != nil {
4570					return err
4571				}
4572				lcstp.ComponentName = &componentName
4573			}
4574		case "licenseKey":
4575			if v != nil {
4576				licenseKey, err := unmarshalBasicSecretBase(*v)
4577				if err != nil {
4578					return err
4579				}
4580				lcstp.LicenseKey = licenseKey
4581			}
4582		}
4583	}
4584
4585	return nil
4586}
4587
4588// LinkedIntegrationRuntime the linked integration runtime information.
4589type LinkedIntegrationRuntime struct {
4590	// Name - READ-ONLY; The name of the linked integration runtime.
4591	Name *string `json:"name,omitempty"`
4592	// SubscriptionID - READ-ONLY; The subscription ID for which the linked integration runtime belong to.
4593	SubscriptionID *string `json:"subscriptionId,omitempty"`
4594	// DataFactoryName - READ-ONLY; The name of the workspace for which the linked integration runtime belong to.
4595	DataFactoryName *string `json:"dataFactoryName,omitempty"`
4596	// DataFactoryLocation - READ-ONLY; The location of the workspace for which the linked integration runtime belong to.
4597	DataFactoryLocation *string `json:"dataFactoryLocation,omitempty"`
4598	// CreateTime - READ-ONLY; The creating time of the linked integration runtime.
4599	CreateTime *date.Time `json:"createTime,omitempty"`
4600}
4601
4602// LinkedIntegrationRuntimeKeyAuthorization the key authorization type integration runtime.
4603type LinkedIntegrationRuntimeKeyAuthorization struct {
4604	// Key - The key used for authorization.
4605	Key *SecureString `json:"key,omitempty"`
4606	// AuthorizationType - Possible values include: 'AuthorizationTypeLinkedIntegrationRuntimeType', 'AuthorizationTypeKey', 'AuthorizationTypeRBAC'
4607	AuthorizationType AuthorizationType `json:"authorizationType,omitempty"`
4608}
4609
4610// MarshalJSON is the custom marshaler for LinkedIntegrationRuntimeKeyAuthorization.
4611func (lirka LinkedIntegrationRuntimeKeyAuthorization) MarshalJSON() ([]byte, error) {
4612	lirka.AuthorizationType = AuthorizationTypeKey
4613	objectMap := make(map[string]interface{})
4614	if lirka.Key != nil {
4615		objectMap["key"] = lirka.Key
4616	}
4617	if lirka.AuthorizationType != "" {
4618		objectMap["authorizationType"] = lirka.AuthorizationType
4619	}
4620	return json.Marshal(objectMap)
4621}
4622
4623// AsLinkedIntegrationRuntimeKeyAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeKeyAuthorization.
4624func (lirka LinkedIntegrationRuntimeKeyAuthorization) AsLinkedIntegrationRuntimeKeyAuthorization() (*LinkedIntegrationRuntimeKeyAuthorization, bool) {
4625	return &lirka, true
4626}
4627
4628// AsLinkedIntegrationRuntimeRbacAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeKeyAuthorization.
4629func (lirka LinkedIntegrationRuntimeKeyAuthorization) AsLinkedIntegrationRuntimeRbacAuthorization() (*LinkedIntegrationRuntimeRbacAuthorization, bool) {
4630	return nil, false
4631}
4632
4633// AsLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeKeyAuthorization.
4634func (lirka LinkedIntegrationRuntimeKeyAuthorization) AsLinkedIntegrationRuntimeType() (*LinkedIntegrationRuntimeType, bool) {
4635	return nil, false
4636}
4637
4638// AsBasicLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeKeyAuthorization.
4639func (lirka LinkedIntegrationRuntimeKeyAuthorization) AsBasicLinkedIntegrationRuntimeType() (BasicLinkedIntegrationRuntimeType, bool) {
4640	return &lirka, true
4641}
4642
4643// LinkedIntegrationRuntimeRbacAuthorization the role based access control (RBAC) authorization type
4644// integration runtime.
4645type LinkedIntegrationRuntimeRbacAuthorization struct {
4646	// ResourceID - The resource identifier of the integration runtime to be shared.
4647	ResourceID *string `json:"resourceId,omitempty"`
4648	// AuthorizationType - Possible values include: 'AuthorizationTypeLinkedIntegrationRuntimeType', 'AuthorizationTypeKey', 'AuthorizationTypeRBAC'
4649	AuthorizationType AuthorizationType `json:"authorizationType,omitempty"`
4650}
4651
4652// MarshalJSON is the custom marshaler for LinkedIntegrationRuntimeRbacAuthorization.
4653func (lirra LinkedIntegrationRuntimeRbacAuthorization) MarshalJSON() ([]byte, error) {
4654	lirra.AuthorizationType = AuthorizationTypeRBAC
4655	objectMap := make(map[string]interface{})
4656	if lirra.ResourceID != nil {
4657		objectMap["resourceId"] = lirra.ResourceID
4658	}
4659	if lirra.AuthorizationType != "" {
4660		objectMap["authorizationType"] = lirra.AuthorizationType
4661	}
4662	return json.Marshal(objectMap)
4663}
4664
4665// AsLinkedIntegrationRuntimeKeyAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeRbacAuthorization.
4666func (lirra LinkedIntegrationRuntimeRbacAuthorization) AsLinkedIntegrationRuntimeKeyAuthorization() (*LinkedIntegrationRuntimeKeyAuthorization, bool) {
4667	return nil, false
4668}
4669
4670// AsLinkedIntegrationRuntimeRbacAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeRbacAuthorization.
4671func (lirra LinkedIntegrationRuntimeRbacAuthorization) AsLinkedIntegrationRuntimeRbacAuthorization() (*LinkedIntegrationRuntimeRbacAuthorization, bool) {
4672	return &lirra, true
4673}
4674
4675// AsLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeRbacAuthorization.
4676func (lirra LinkedIntegrationRuntimeRbacAuthorization) AsLinkedIntegrationRuntimeType() (*LinkedIntegrationRuntimeType, bool) {
4677	return nil, false
4678}
4679
4680// AsBasicLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeRbacAuthorization.
4681func (lirra LinkedIntegrationRuntimeRbacAuthorization) AsBasicLinkedIntegrationRuntimeType() (BasicLinkedIntegrationRuntimeType, bool) {
4682	return &lirra, true
4683}
4684
4685// BasicLinkedIntegrationRuntimeType the base definition of a linked integration runtime.
4686type BasicLinkedIntegrationRuntimeType interface {
4687	AsLinkedIntegrationRuntimeKeyAuthorization() (*LinkedIntegrationRuntimeKeyAuthorization, bool)
4688	AsLinkedIntegrationRuntimeRbacAuthorization() (*LinkedIntegrationRuntimeRbacAuthorization, bool)
4689	AsLinkedIntegrationRuntimeType() (*LinkedIntegrationRuntimeType, bool)
4690}
4691
4692// LinkedIntegrationRuntimeType the base definition of a linked integration runtime.
4693type LinkedIntegrationRuntimeType struct {
4694	// AuthorizationType - Possible values include: 'AuthorizationTypeLinkedIntegrationRuntimeType', 'AuthorizationTypeKey', 'AuthorizationTypeRBAC'
4695	AuthorizationType AuthorizationType `json:"authorizationType,omitempty"`
4696}
4697
4698func unmarshalBasicLinkedIntegrationRuntimeType(body []byte) (BasicLinkedIntegrationRuntimeType, error) {
4699	var m map[string]interface{}
4700	err := json.Unmarshal(body, &m)
4701	if err != nil {
4702		return nil, err
4703	}
4704
4705	switch m["authorizationType"] {
4706	case string(AuthorizationTypeKey):
4707		var lirka LinkedIntegrationRuntimeKeyAuthorization
4708		err := json.Unmarshal(body, &lirka)
4709		return lirka, err
4710	case string(AuthorizationTypeRBAC):
4711		var lirra LinkedIntegrationRuntimeRbacAuthorization
4712		err := json.Unmarshal(body, &lirra)
4713		return lirra, err
4714	default:
4715		var lirt LinkedIntegrationRuntimeType
4716		err := json.Unmarshal(body, &lirt)
4717		return lirt, err
4718	}
4719}
4720func unmarshalBasicLinkedIntegrationRuntimeTypeArray(body []byte) ([]BasicLinkedIntegrationRuntimeType, error) {
4721	var rawMessages []*json.RawMessage
4722	err := json.Unmarshal(body, &rawMessages)
4723	if err != nil {
4724		return nil, err
4725	}
4726
4727	lirtArray := make([]BasicLinkedIntegrationRuntimeType, len(rawMessages))
4728
4729	for index, rawMessage := range rawMessages {
4730		lirt, err := unmarshalBasicLinkedIntegrationRuntimeType(*rawMessage)
4731		if err != nil {
4732			return nil, err
4733		}
4734		lirtArray[index] = lirt
4735	}
4736	return lirtArray, nil
4737}
4738
4739// MarshalJSON is the custom marshaler for LinkedIntegrationRuntimeType.
4740func (lirt LinkedIntegrationRuntimeType) MarshalJSON() ([]byte, error) {
4741	lirt.AuthorizationType = AuthorizationTypeLinkedIntegrationRuntimeType
4742	objectMap := make(map[string]interface{})
4743	if lirt.AuthorizationType != "" {
4744		objectMap["authorizationType"] = lirt.AuthorizationType
4745	}
4746	return json.Marshal(objectMap)
4747}
4748
4749// AsLinkedIntegrationRuntimeKeyAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeType.
4750func (lirt LinkedIntegrationRuntimeType) AsLinkedIntegrationRuntimeKeyAuthorization() (*LinkedIntegrationRuntimeKeyAuthorization, bool) {
4751	return nil, false
4752}
4753
4754// AsLinkedIntegrationRuntimeRbacAuthorization is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeType.
4755func (lirt LinkedIntegrationRuntimeType) AsLinkedIntegrationRuntimeRbacAuthorization() (*LinkedIntegrationRuntimeRbacAuthorization, bool) {
4756	return nil, false
4757}
4758
4759// AsLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeType.
4760func (lirt LinkedIntegrationRuntimeType) AsLinkedIntegrationRuntimeType() (*LinkedIntegrationRuntimeType, bool) {
4761	return &lirt, true
4762}
4763
4764// AsBasicLinkedIntegrationRuntimeType is the BasicLinkedIntegrationRuntimeType implementation for LinkedIntegrationRuntimeType.
4765func (lirt LinkedIntegrationRuntimeType) AsBasicLinkedIntegrationRuntimeType() (BasicLinkedIntegrationRuntimeType, bool) {
4766	return &lirt, true
4767}
4768
4769// ListAvailableRpOperation ...
4770type ListAvailableRpOperation struct {
4771	autorest.Response `json:"-"`
4772	Value             *[]AvailableRpOperation `json:"value,omitempty"`
4773}
4774
4775// ListSQLPoolSecurityAlertPolicies a list of SQL pool security alert policies.
4776type ListSQLPoolSecurityAlertPolicies struct {
4777	autorest.Response `json:"-"`
4778	// Value - READ-ONLY; Array of results.
4779	Value *[]SQLPoolSecurityAlertPolicy `json:"value,omitempty"`
4780	// NextLink - READ-ONLY; Link to retrieve next page of results.
4781	NextLink *string `json:"nextLink,omitempty"`
4782}
4783
4784// ListSQLPoolSecurityAlertPoliciesIterator provides access to a complete listing of
4785// SQLPoolSecurityAlertPolicy values.
4786type ListSQLPoolSecurityAlertPoliciesIterator struct {
4787	i    int
4788	page ListSQLPoolSecurityAlertPoliciesPage
4789}
4790
4791// NextWithContext advances to the next value.  If there was an error making
4792// the request the iterator does not advance and the error is returned.
4793func (iter *ListSQLPoolSecurityAlertPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
4794	if tracing.IsEnabled() {
4795		ctx = tracing.StartSpan(ctx, fqdn+"/ListSQLPoolSecurityAlertPoliciesIterator.NextWithContext")
4796		defer func() {
4797			sc := -1
4798			if iter.Response().Response.Response != nil {
4799				sc = iter.Response().Response.Response.StatusCode
4800			}
4801			tracing.EndSpan(ctx, sc, err)
4802		}()
4803	}
4804	iter.i++
4805	if iter.i < len(iter.page.Values()) {
4806		return nil
4807	}
4808	err = iter.page.NextWithContext(ctx)
4809	if err != nil {
4810		iter.i--
4811		return err
4812	}
4813	iter.i = 0
4814	return nil
4815}
4816
4817// Next advances to the next value.  If there was an error making
4818// the request the iterator does not advance and the error is returned.
4819// Deprecated: Use NextWithContext() instead.
4820func (iter *ListSQLPoolSecurityAlertPoliciesIterator) Next() error {
4821	return iter.NextWithContext(context.Background())
4822}
4823
4824// NotDone returns true if the enumeration should be started or is not yet complete.
4825func (iter ListSQLPoolSecurityAlertPoliciesIterator) NotDone() bool {
4826	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4827}
4828
4829// Response returns the raw server response from the last page request.
4830func (iter ListSQLPoolSecurityAlertPoliciesIterator) Response() ListSQLPoolSecurityAlertPolicies {
4831	return iter.page.Response()
4832}
4833
4834// Value returns the current value or a zero-initialized value if the
4835// iterator has advanced beyond the end of the collection.
4836func (iter ListSQLPoolSecurityAlertPoliciesIterator) Value() SQLPoolSecurityAlertPolicy {
4837	if !iter.page.NotDone() {
4838		return SQLPoolSecurityAlertPolicy{}
4839	}
4840	return iter.page.Values()[iter.i]
4841}
4842
4843// Creates a new instance of the ListSQLPoolSecurityAlertPoliciesIterator type.
4844func NewListSQLPoolSecurityAlertPoliciesIterator(page ListSQLPoolSecurityAlertPoliciesPage) ListSQLPoolSecurityAlertPoliciesIterator {
4845	return ListSQLPoolSecurityAlertPoliciesIterator{page: page}
4846}
4847
4848// IsEmpty returns true if the ListResult contains no values.
4849func (lspsap ListSQLPoolSecurityAlertPolicies) IsEmpty() bool {
4850	return lspsap.Value == nil || len(*lspsap.Value) == 0
4851}
4852
4853// hasNextLink returns true if the NextLink is not empty.
4854func (lspsap ListSQLPoolSecurityAlertPolicies) hasNextLink() bool {
4855	return lspsap.NextLink != nil && len(*lspsap.NextLink) != 0
4856}
4857
4858// listSQLPoolSecurityAlertPoliciesPreparer prepares a request to retrieve the next set of results.
4859// It returns nil if no more results exist.
4860func (lspsap ListSQLPoolSecurityAlertPolicies) listSQLPoolSecurityAlertPoliciesPreparer(ctx context.Context) (*http.Request, error) {
4861	if !lspsap.hasNextLink() {
4862		return nil, nil
4863	}
4864	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4865		autorest.AsJSON(),
4866		autorest.AsGet(),
4867		autorest.WithBaseURL(to.String(lspsap.NextLink)))
4868}
4869
4870// ListSQLPoolSecurityAlertPoliciesPage contains a page of SQLPoolSecurityAlertPolicy values.
4871type ListSQLPoolSecurityAlertPoliciesPage struct {
4872	fn     func(context.Context, ListSQLPoolSecurityAlertPolicies) (ListSQLPoolSecurityAlertPolicies, error)
4873	lspsap ListSQLPoolSecurityAlertPolicies
4874}
4875
4876// NextWithContext advances to the next page of values.  If there was an error making
4877// the request the page does not advance and the error is returned.
4878func (page *ListSQLPoolSecurityAlertPoliciesPage) NextWithContext(ctx context.Context) (err error) {
4879	if tracing.IsEnabled() {
4880		ctx = tracing.StartSpan(ctx, fqdn+"/ListSQLPoolSecurityAlertPoliciesPage.NextWithContext")
4881		defer func() {
4882			sc := -1
4883			if page.Response().Response.Response != nil {
4884				sc = page.Response().Response.Response.StatusCode
4885			}
4886			tracing.EndSpan(ctx, sc, err)
4887		}()
4888	}
4889	for {
4890		next, err := page.fn(ctx, page.lspsap)
4891		if err != nil {
4892			return err
4893		}
4894		page.lspsap = next
4895		if !next.hasNextLink() || !next.IsEmpty() {
4896			break
4897		}
4898	}
4899	return nil
4900}
4901
4902// Next advances to the next page of values.  If there was an error making
4903// the request the page does not advance and the error is returned.
4904// Deprecated: Use NextWithContext() instead.
4905func (page *ListSQLPoolSecurityAlertPoliciesPage) Next() error {
4906	return page.NextWithContext(context.Background())
4907}
4908
4909// NotDone returns true if the page enumeration should be started or is not yet complete.
4910func (page ListSQLPoolSecurityAlertPoliciesPage) NotDone() bool {
4911	return !page.lspsap.IsEmpty()
4912}
4913
4914// Response returns the raw server response from the last page request.
4915func (page ListSQLPoolSecurityAlertPoliciesPage) Response() ListSQLPoolSecurityAlertPolicies {
4916	return page.lspsap
4917}
4918
4919// Values returns the slice of values for the current page or nil if there are no values.
4920func (page ListSQLPoolSecurityAlertPoliciesPage) Values() []SQLPoolSecurityAlertPolicy {
4921	if page.lspsap.IsEmpty() {
4922		return nil
4923	}
4924	return *page.lspsap.Value
4925}
4926
4927// Creates a new instance of the ListSQLPoolSecurityAlertPoliciesPage type.
4928func NewListSQLPoolSecurityAlertPoliciesPage(cur ListSQLPoolSecurityAlertPolicies, getNextPage func(context.Context, ListSQLPoolSecurityAlertPolicies) (ListSQLPoolSecurityAlertPolicies, error)) ListSQLPoolSecurityAlertPoliciesPage {
4929	return ListSQLPoolSecurityAlertPoliciesPage{
4930		fn:     getNextPage,
4931		lspsap: cur,
4932	}
4933}
4934
4935// MaintenanceWindowOptions maintenance window options.
4936type MaintenanceWindowOptions struct {
4937	autorest.Response `json:"-"`
4938	// MaintenanceWindowOptionsProperties - Resource properties.
4939	*MaintenanceWindowOptionsProperties `json:"properties,omitempty"`
4940	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
4941	ID *string `json:"id,omitempty"`
4942	// Name - READ-ONLY; The name of the resource
4943	Name *string `json:"name,omitempty"`
4944	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
4945	Type *string `json:"type,omitempty"`
4946}
4947
4948// MarshalJSON is the custom marshaler for MaintenanceWindowOptions.
4949func (mwo MaintenanceWindowOptions) MarshalJSON() ([]byte, error) {
4950	objectMap := make(map[string]interface{})
4951	if mwo.MaintenanceWindowOptionsProperties != nil {
4952		objectMap["properties"] = mwo.MaintenanceWindowOptionsProperties
4953	}
4954	return json.Marshal(objectMap)
4955}
4956
4957// UnmarshalJSON is the custom unmarshaler for MaintenanceWindowOptions struct.
4958func (mwo *MaintenanceWindowOptions) UnmarshalJSON(body []byte) error {
4959	var m map[string]*json.RawMessage
4960	err := json.Unmarshal(body, &m)
4961	if err != nil {
4962		return err
4963	}
4964	for k, v := range m {
4965		switch k {
4966		case "properties":
4967			if v != nil {
4968				var maintenanceWindowOptionsProperties MaintenanceWindowOptionsProperties
4969				err = json.Unmarshal(*v, &maintenanceWindowOptionsProperties)
4970				if err != nil {
4971					return err
4972				}
4973				mwo.MaintenanceWindowOptionsProperties = &maintenanceWindowOptionsProperties
4974			}
4975		case "id":
4976			if v != nil {
4977				var ID string
4978				err = json.Unmarshal(*v, &ID)
4979				if err != nil {
4980					return err
4981				}
4982				mwo.ID = &ID
4983			}
4984		case "name":
4985			if v != nil {
4986				var name string
4987				err = json.Unmarshal(*v, &name)
4988				if err != nil {
4989					return err
4990				}
4991				mwo.Name = &name
4992			}
4993		case "type":
4994			if v != nil {
4995				var typeVar string
4996				err = json.Unmarshal(*v, &typeVar)
4997				if err != nil {
4998					return err
4999				}
5000				mwo.Type = &typeVar
5001			}
5002		}
5003	}
5004
5005	return nil
5006}
5007
5008// MaintenanceWindowOptionsProperties maintenance window options properties.
5009type MaintenanceWindowOptionsProperties struct {
5010	// IsEnabled - Whether maintenance windows are enabled for the database.
5011	IsEnabled *bool `json:"isEnabled,omitempty"`
5012	// MaintenanceWindowCycles - Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, 24*60}.
5013	MaintenanceWindowCycles *[]MaintenanceWindowTimeRange `json:"maintenanceWindowCycles,omitempty"`
5014	// MinDurationInMinutes - Minimum duration of maintenance window.
5015	MinDurationInMinutes *int32 `json:"minDurationInMinutes,omitempty"`
5016	// DefaultDurationInMinutes - Default duration for maintenance window.
5017	DefaultDurationInMinutes *int32 `json:"defaultDurationInMinutes,omitempty"`
5018	// MinCycles - Minimum number of maintenance windows cycles to be set on the database.
5019	MinCycles *int32 `json:"minCycles,omitempty"`
5020	// TimeGranularityInMinutes - Time granularity in minutes for maintenance windows.
5021	TimeGranularityInMinutes *int32 `json:"timeGranularityInMinutes,omitempty"`
5022	// AllowMultipleMaintenanceWindowsPerCycle - Whether we allow multiple maintenance windows per cycle.
5023	AllowMultipleMaintenanceWindowsPerCycle *bool `json:"allowMultipleMaintenanceWindowsPerCycle,omitempty"`
5024}
5025
5026// MaintenanceWindows maintenance windows.
5027type MaintenanceWindows struct {
5028	autorest.Response `json:"-"`
5029	// MaintenanceWindowsProperties - Resource properties.
5030	*MaintenanceWindowsProperties `json:"properties,omitempty"`
5031	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
5032	ID *string `json:"id,omitempty"`
5033	// Name - READ-ONLY; The name of the resource
5034	Name *string `json:"name,omitempty"`
5035	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
5036	Type *string `json:"type,omitempty"`
5037}
5038
5039// MarshalJSON is the custom marshaler for MaintenanceWindows.
5040func (mw MaintenanceWindows) MarshalJSON() ([]byte, error) {
5041	objectMap := make(map[string]interface{})
5042	if mw.MaintenanceWindowsProperties != nil {
5043		objectMap["properties"] = mw.MaintenanceWindowsProperties
5044	}
5045	return json.Marshal(objectMap)
5046}
5047
5048// UnmarshalJSON is the custom unmarshaler for MaintenanceWindows struct.
5049func (mw *MaintenanceWindows) UnmarshalJSON(body []byte) error {
5050	var m map[string]*json.RawMessage
5051	err := json.Unmarshal(body, &m)
5052	if err != nil {
5053		return err
5054	}
5055	for k, v := range m {
5056		switch k {
5057		case "properties":
5058			if v != nil {
5059				var maintenanceWindowsProperties MaintenanceWindowsProperties
5060				err = json.Unmarshal(*v, &maintenanceWindowsProperties)
5061				if err != nil {
5062					return err
5063				}
5064				mw.MaintenanceWindowsProperties = &maintenanceWindowsProperties
5065			}
5066		case "id":
5067			if v != nil {
5068				var ID string
5069				err = json.Unmarshal(*v, &ID)
5070				if err != nil {
5071					return err
5072				}
5073				mw.ID = &ID
5074			}
5075		case "name":
5076			if v != nil {
5077				var name string
5078				err = json.Unmarshal(*v, &name)
5079				if err != nil {
5080					return err
5081				}
5082				mw.Name = &name
5083			}
5084		case "type":
5085			if v != nil {
5086				var typeVar string
5087				err = json.Unmarshal(*v, &typeVar)
5088				if err != nil {
5089					return err
5090				}
5091				mw.Type = &typeVar
5092			}
5093		}
5094	}
5095
5096	return nil
5097}
5098
5099// MaintenanceWindowsProperties maintenance windows resource properties.
5100type MaintenanceWindowsProperties struct {
5101	TimeRanges *[]MaintenanceWindowTimeRange `json:"timeRanges,omitempty"`
5102}
5103
5104// MaintenanceWindowTimeRange maintenance window time range.
5105type MaintenanceWindowTimeRange struct {
5106	// DayOfWeek - Day of maintenance window. Possible values include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'
5107	DayOfWeek DayOfWeek `json:"dayOfWeek,omitempty"`
5108	// StartTime - Start time minutes offset from 12am.
5109	StartTime *string `json:"startTime,omitempty"`
5110	// Duration - Duration of maintenance window in minutes.
5111	Duration *string `json:"duration,omitempty"`
5112}
5113
5114// ManagedIdentity the workspace managed identity
5115type ManagedIdentity struct {
5116	// PrincipalID - READ-ONLY; The principal ID of the workspace managed identity
5117	PrincipalID *string `json:"principalId,omitempty"`
5118	// TenantID - READ-ONLY; The tenant ID of the workspace managed identity
5119	TenantID *uuid.UUID `json:"tenantId,omitempty"`
5120	// Type - The type of managed identity for the workspace. Possible values include: 'ResourceIdentityTypeNone', 'ResourceIdentityTypeSystemAssigned'
5121	Type ResourceIdentityType `json:"type,omitempty"`
5122}
5123
5124// MarshalJSON is the custom marshaler for ManagedIdentity.
5125func (mi ManagedIdentity) MarshalJSON() ([]byte, error) {
5126	objectMap := make(map[string]interface{})
5127	if mi.Type != "" {
5128		objectMap["type"] = mi.Type
5129	}
5130	return json.Marshal(objectMap)
5131}
5132
5133// ManagedIdentitySQLControlSettingsModel sql Control Settings for workspace managed identity
5134type ManagedIdentitySQLControlSettingsModel struct {
5135	autorest.Response `json:"-"`
5136	// ManagedIdentitySQLControlSettingsModelProperties - Sql Control Settings for workspace managed identity
5137	*ManagedIdentitySQLControlSettingsModelProperties `json:"properties,omitempty"`
5138	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
5139	ID *string `json:"id,omitempty"`
5140	// Name - READ-ONLY; The name of the resource
5141	Name *string `json:"name,omitempty"`
5142	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
5143	Type *string `json:"type,omitempty"`
5144}
5145
5146// MarshalJSON is the custom marshaler for ManagedIdentitySQLControlSettingsModel.
5147func (miscsm ManagedIdentitySQLControlSettingsModel) MarshalJSON() ([]byte, error) {
5148	objectMap := make(map[string]interface{})
5149	if miscsm.ManagedIdentitySQLControlSettingsModelProperties != nil {
5150		objectMap["properties"] = miscsm.ManagedIdentitySQLControlSettingsModelProperties
5151	}
5152	return json.Marshal(objectMap)
5153}
5154
5155// UnmarshalJSON is the custom unmarshaler for ManagedIdentitySQLControlSettingsModel struct.
5156func (miscsm *ManagedIdentitySQLControlSettingsModel) UnmarshalJSON(body []byte) error {
5157	var m map[string]*json.RawMessage
5158	err := json.Unmarshal(body, &m)
5159	if err != nil {
5160		return err
5161	}
5162	for k, v := range m {
5163		switch k {
5164		case "properties":
5165			if v != nil {
5166				var managedIdentitySQLControlSettingsModelProperties ManagedIdentitySQLControlSettingsModelProperties
5167				err = json.Unmarshal(*v, &managedIdentitySQLControlSettingsModelProperties)
5168				if err != nil {
5169					return err
5170				}
5171				miscsm.ManagedIdentitySQLControlSettingsModelProperties = &managedIdentitySQLControlSettingsModelProperties
5172			}
5173		case "id":
5174			if v != nil {
5175				var ID string
5176				err = json.Unmarshal(*v, &ID)
5177				if err != nil {
5178					return err
5179				}
5180				miscsm.ID = &ID
5181			}
5182		case "name":
5183			if v != nil {
5184				var name string
5185				err = json.Unmarshal(*v, &name)
5186				if err != nil {
5187					return err
5188				}
5189				miscsm.Name = &name
5190			}
5191		case "type":
5192			if v != nil {
5193				var typeVar string
5194				err = json.Unmarshal(*v, &typeVar)
5195				if err != nil {
5196					return err
5197				}
5198				miscsm.Type = &typeVar
5199			}
5200		}
5201	}
5202
5203	return nil
5204}
5205
5206// ManagedIdentitySQLControlSettingsModelProperties sql Control Settings for workspace managed identity
5207type ManagedIdentitySQLControlSettingsModelProperties struct {
5208	// GrantSQLControlToManagedIdentity - Grant sql control to managed identity
5209	GrantSQLControlToManagedIdentity *ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity `json:"grantSqlControlToManagedIdentity,omitempty"`
5210}
5211
5212// ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity grant sql control to
5213// managed identity
5214type ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity struct {
5215	// DesiredState - Desired state. Possible values include: 'DesiredStateEnabled', 'DesiredStateDisabled'
5216	DesiredState DesiredState `json:"desiredState,omitempty"`
5217	// ActualState - READ-ONLY; Actual state. Possible values include: 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Unknown'
5218	ActualState ActualState `json:"actualState,omitempty"`
5219}
5220
5221// MarshalJSON is the custom marshaler for ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity.
5222func (miscsmSctmi ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity) MarshalJSON() ([]byte, error) {
5223	objectMap := make(map[string]interface{})
5224	if miscsmSctmi.DesiredState != "" {
5225		objectMap["desiredState"] = miscsmSctmi.DesiredState
5226	}
5227	return json.Marshal(objectMap)
5228}
5229
5230// ManagedIntegrationRuntime managed integration runtime, including managed elastic and managed dedicated
5231// integration runtimes.
5232type ManagedIntegrationRuntime struct {
5233	// State - READ-ONLY; Integration runtime state, only valid for managed dedicated integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied'
5234	State IntegrationRuntimeState `json:"state,omitempty"`
5235	// ManagedIntegrationRuntimeTypeProperties - Managed integration runtime properties.
5236	*ManagedIntegrationRuntimeTypeProperties `json:"typeProperties,omitempty"`
5237	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
5238	AdditionalProperties map[string]interface{} `json:""`
5239	// Description - Integration runtime description.
5240	Description *string `json:"description,omitempty"`
5241	// Type - Possible values include: 'TypeIntegrationRuntime', 'TypeManaged', 'TypeSelfHosted'
5242	Type Type `json:"type,omitempty"`
5243}
5244
5245// MarshalJSON is the custom marshaler for ManagedIntegrationRuntime.
5246func (mir ManagedIntegrationRuntime) MarshalJSON() ([]byte, error) {
5247	mir.Type = TypeManaged
5248	objectMap := make(map[string]interface{})
5249	if mir.ManagedIntegrationRuntimeTypeProperties != nil {
5250		objectMap["typeProperties"] = mir.ManagedIntegrationRuntimeTypeProperties
5251	}
5252	if mir.Description != nil {
5253		objectMap["description"] = mir.Description
5254	}
5255	if mir.Type != "" {
5256		objectMap["type"] = mir.Type
5257	}
5258	for k, v := range mir.AdditionalProperties {
5259		objectMap[k] = v
5260	}
5261	return json.Marshal(objectMap)
5262}
5263
5264// AsManagedIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime.
5265func (mir ManagedIntegrationRuntime) AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) {
5266	return &mir, true
5267}
5268
5269// AsSelfHostedIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime.
5270func (mir ManagedIntegrationRuntime) AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) {
5271	return nil, false
5272}
5273
5274// AsIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime.
5275func (mir ManagedIntegrationRuntime) AsIntegrationRuntime() (*IntegrationRuntime, bool) {
5276	return nil, false
5277}
5278
5279// AsBasicIntegrationRuntime is the BasicIntegrationRuntime implementation for ManagedIntegrationRuntime.
5280func (mir ManagedIntegrationRuntime) AsBasicIntegrationRuntime() (BasicIntegrationRuntime, bool) {
5281	return &mir, true
5282}
5283
5284// UnmarshalJSON is the custom unmarshaler for ManagedIntegrationRuntime struct.
5285func (mir *ManagedIntegrationRuntime) UnmarshalJSON(body []byte) error {
5286	var m map[string]*json.RawMessage
5287	err := json.Unmarshal(body, &m)
5288	if err != nil {
5289		return err
5290	}
5291	for k, v := range m {
5292		switch k {
5293		case "state":
5294			if v != nil {
5295				var state IntegrationRuntimeState
5296				err = json.Unmarshal(*v, &state)
5297				if err != nil {
5298					return err
5299				}
5300				mir.State = state
5301			}
5302		case "typeProperties":
5303			if v != nil {
5304				var managedIntegrationRuntimeTypeProperties ManagedIntegrationRuntimeTypeProperties
5305				err = json.Unmarshal(*v, &managedIntegrationRuntimeTypeProperties)
5306				if err != nil {
5307					return err
5308				}
5309				mir.ManagedIntegrationRuntimeTypeProperties = &managedIntegrationRuntimeTypeProperties
5310			}
5311		default:
5312			if v != nil {
5313				var additionalProperties interface{}
5314				err = json.Unmarshal(*v, &additionalProperties)
5315				if err != nil {
5316					return err
5317				}
5318				if mir.AdditionalProperties == nil {
5319					mir.AdditionalProperties = make(map[string]interface{})
5320				}
5321				mir.AdditionalProperties[k] = additionalProperties
5322			}
5323		case "description":
5324			if v != nil {
5325				var description string
5326				err = json.Unmarshal(*v, &description)
5327				if err != nil {
5328					return err
5329				}
5330				mir.Description = &description
5331			}
5332		case "type":
5333			if v != nil {
5334				var typeVar Type
5335				err = json.Unmarshal(*v, &typeVar)
5336				if err != nil {
5337					return err
5338				}
5339				mir.Type = typeVar
5340			}
5341		}
5342	}
5343
5344	return nil
5345}
5346
5347// ManagedIntegrationRuntimeError error definition for managed integration runtime.
5348type ManagedIntegrationRuntimeError struct {
5349	// Time - READ-ONLY; The time when the error occurred.
5350	Time *date.Time `json:"time,omitempty"`
5351	// Code - READ-ONLY; Error code.
5352	Code *string `json:"code,omitempty"`
5353	// Parameters - READ-ONLY; Managed integration runtime error parameters.
5354	Parameters *[]string `json:"parameters,omitempty"`
5355	// Message - READ-ONLY; Error message.
5356	Message *string `json:"message,omitempty"`
5357}
5358
5359// ManagedIntegrationRuntimeNode properties of integration runtime node.
5360type ManagedIntegrationRuntimeNode struct {
5361	// NodeID - READ-ONLY; The managed integration runtime node id.
5362	NodeID *string `json:"nodeId,omitempty"`
5363	// Status - READ-ONLY; The managed integration runtime node status. Possible values include: 'ManagedIntegrationRuntimeNodeStatusStarting', 'ManagedIntegrationRuntimeNodeStatusAvailable', 'ManagedIntegrationRuntimeNodeStatusRecycling', 'ManagedIntegrationRuntimeNodeStatusUnavailable'
5364	Status ManagedIntegrationRuntimeNodeStatus `json:"status,omitempty"`
5365	// Errors - The errors that occurred on this integration runtime node.
5366	Errors *[]ManagedIntegrationRuntimeError `json:"errors,omitempty"`
5367}
5368
5369// MarshalJSON is the custom marshaler for ManagedIntegrationRuntimeNode.
5370func (mirn ManagedIntegrationRuntimeNode) MarshalJSON() ([]byte, error) {
5371	objectMap := make(map[string]interface{})
5372	if mirn.Errors != nil {
5373		objectMap["errors"] = mirn.Errors
5374	}
5375	return json.Marshal(objectMap)
5376}
5377
5378// ManagedIntegrationRuntimeOperationResult properties of managed integration runtime operation result.
5379type ManagedIntegrationRuntimeOperationResult struct {
5380	// Type - READ-ONLY; The operation type. Could be start or stop.
5381	Type *string `json:"type,omitempty"`
5382	// StartTime - READ-ONLY; The start time of the operation.
5383	StartTime *date.Time `json:"startTime,omitempty"`
5384	// Result - READ-ONLY; The operation result.
5385	Result *string `json:"result,omitempty"`
5386	// ErrorCode - READ-ONLY; The error code.
5387	ErrorCode *string `json:"errorCode,omitempty"`
5388	// Parameters - READ-ONLY; Managed integration runtime error parameters.
5389	Parameters *[]string `json:"parameters,omitempty"`
5390	// ActivityID - READ-ONLY; The activity id for the operation request.
5391	ActivityID *string `json:"activityId,omitempty"`
5392}
5393
5394// ManagedIntegrationRuntimeStatus managed integration runtime status.
5395type ManagedIntegrationRuntimeStatus struct {
5396	// ManagedIntegrationRuntimeStatusTypeProperties - Managed integration runtime status type properties.
5397	*ManagedIntegrationRuntimeStatusTypeProperties `json:"typeProperties,omitempty"`
5398	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
5399	AdditionalProperties map[string]interface{} `json:""`
5400	// DataFactoryName - READ-ONLY; The workspace name which the integration runtime belong to.
5401	DataFactoryName *string `json:"dataFactoryName,omitempty"`
5402	// State - READ-ONLY; The state of integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied'
5403	State IntegrationRuntimeState `json:"state,omitempty"`
5404	// Type - Possible values include: 'TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus', 'TypeBasicIntegrationRuntimeStatusTypeManaged', 'TypeBasicIntegrationRuntimeStatusTypeSelfHosted'
5405	Type TypeBasicIntegrationRuntimeStatus `json:"type,omitempty"`
5406}
5407
5408// MarshalJSON is the custom marshaler for ManagedIntegrationRuntimeStatus.
5409func (mirs ManagedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) {
5410	mirs.Type = TypeBasicIntegrationRuntimeStatusTypeManaged
5411	objectMap := make(map[string]interface{})
5412	if mirs.ManagedIntegrationRuntimeStatusTypeProperties != nil {
5413		objectMap["typeProperties"] = mirs.ManagedIntegrationRuntimeStatusTypeProperties
5414	}
5415	if mirs.Type != "" {
5416		objectMap["type"] = mirs.Type
5417	}
5418	for k, v := range mirs.AdditionalProperties {
5419		objectMap[k] = v
5420	}
5421	return json.Marshal(objectMap)
5422}
5423
5424// AsManagedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus.
5425func (mirs ManagedIntegrationRuntimeStatus) AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) {
5426	return &mirs, true
5427}
5428
5429// AsSelfHostedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus.
5430func (mirs ManagedIntegrationRuntimeStatus) AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) {
5431	return nil, false
5432}
5433
5434// AsIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus.
5435func (mirs ManagedIntegrationRuntimeStatus) AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) {
5436	return nil, false
5437}
5438
5439// AsBasicIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for ManagedIntegrationRuntimeStatus.
5440func (mirs ManagedIntegrationRuntimeStatus) AsBasicIntegrationRuntimeStatus() (BasicIntegrationRuntimeStatus, bool) {
5441	return &mirs, true
5442}
5443
5444// UnmarshalJSON is the custom unmarshaler for ManagedIntegrationRuntimeStatus struct.
5445func (mirs *ManagedIntegrationRuntimeStatus) UnmarshalJSON(body []byte) error {
5446	var m map[string]*json.RawMessage
5447	err := json.Unmarshal(body, &m)
5448	if err != nil {
5449		return err
5450	}
5451	for k, v := range m {
5452		switch k {
5453		case "typeProperties":
5454			if v != nil {
5455				var managedIntegrationRuntimeStatusTypeProperties ManagedIntegrationRuntimeStatusTypeProperties
5456				err = json.Unmarshal(*v, &managedIntegrationRuntimeStatusTypeProperties)
5457				if err != nil {
5458					return err
5459				}
5460				mirs.ManagedIntegrationRuntimeStatusTypeProperties = &managedIntegrationRuntimeStatusTypeProperties
5461			}
5462		default:
5463			if v != nil {
5464				var additionalProperties interface{}
5465				err = json.Unmarshal(*v, &additionalProperties)
5466				if err != nil {
5467					return err
5468				}
5469				if mirs.AdditionalProperties == nil {
5470					mirs.AdditionalProperties = make(map[string]interface{})
5471				}
5472				mirs.AdditionalProperties[k] = additionalProperties
5473			}
5474		case "dataFactoryName":
5475			if v != nil {
5476				var dataFactoryName string
5477				err = json.Unmarshal(*v, &dataFactoryName)
5478				if err != nil {
5479					return err
5480				}
5481				mirs.DataFactoryName = &dataFactoryName
5482			}
5483		case "state":
5484			if v != nil {
5485				var state IntegrationRuntimeState
5486				err = json.Unmarshal(*v, &state)
5487				if err != nil {
5488					return err
5489				}
5490				mirs.State = state
5491			}
5492		case "type":
5493			if v != nil {
5494				var typeVar TypeBasicIntegrationRuntimeStatus
5495				err = json.Unmarshal(*v, &typeVar)
5496				if err != nil {
5497					return err
5498				}
5499				mirs.Type = typeVar
5500			}
5501		}
5502	}
5503
5504	return nil
5505}
5506
5507// ManagedIntegrationRuntimeStatusTypeProperties managed integration runtime status type properties.
5508type ManagedIntegrationRuntimeStatusTypeProperties struct {
5509	// CreateTime - READ-ONLY; The time at which the integration runtime was created, in ISO8601 format.
5510	CreateTime *date.Time `json:"createTime,omitempty"`
5511	// Nodes - READ-ONLY; The list of nodes for managed integration runtime.
5512	Nodes *[]ManagedIntegrationRuntimeNode `json:"nodes,omitempty"`
5513	// OtherErrors - READ-ONLY; The errors that occurred on this integration runtime.
5514	OtherErrors *[]ManagedIntegrationRuntimeError `json:"otherErrors,omitempty"`
5515	// LastOperation - READ-ONLY; The last operation result that occurred on this integration runtime.
5516	LastOperation *ManagedIntegrationRuntimeOperationResult `json:"lastOperation,omitempty"`
5517}
5518
5519// ManagedIntegrationRuntimeTypeProperties managed integration runtime type properties.
5520type ManagedIntegrationRuntimeTypeProperties struct {
5521	// ComputeProperties - The compute resource for managed integration runtime.
5522	ComputeProperties *IntegrationRuntimeComputeProperties `json:"computeProperties,omitempty"`
5523	// SsisProperties - SSIS properties for managed integration runtime.
5524	SsisProperties *IntegrationRuntimeSsisProperties `json:"ssisProperties,omitempty"`
5525}
5526
5527// ManagedVirtualNetworkSettings managed Virtual Network Settings
5528type ManagedVirtualNetworkSettings struct {
5529	// PreventDataExfiltration - Prevent Data Exfiltration
5530	PreventDataExfiltration *bool `json:"preventDataExfiltration,omitempty"`
5531	// LinkedAccessCheckOnTargetResource - Linked Access Check On Target Resource
5532	LinkedAccessCheckOnTargetResource *bool `json:"linkedAccessCheckOnTargetResource,omitempty"`
5533	// AllowedAadTenantIdsForLinking - Allowed Aad Tenant Ids For Linking
5534	AllowedAadTenantIdsForLinking *[]string `json:"allowedAadTenantIdsForLinking,omitempty"`
5535}
5536
5537// MetadataSyncConfig configuration for metadata sync
5538type MetadataSyncConfig struct {
5539	autorest.Response `json:"-"`
5540	// MetadataSyncConfigProperties - Metadata Sync Config properties
5541	*MetadataSyncConfigProperties `json:"properties,omitempty"`
5542	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
5543	ID *string `json:"id,omitempty"`
5544	// Name - READ-ONLY; The name of the resource
5545	Name *string `json:"name,omitempty"`
5546	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
5547	Type *string `json:"type,omitempty"`
5548}
5549
5550// MarshalJSON is the custom marshaler for MetadataSyncConfig.
5551func (msc MetadataSyncConfig) MarshalJSON() ([]byte, error) {
5552	objectMap := make(map[string]interface{})
5553	if msc.MetadataSyncConfigProperties != nil {
5554		objectMap["properties"] = msc.MetadataSyncConfigProperties
5555	}
5556	return json.Marshal(objectMap)
5557}
5558
5559// UnmarshalJSON is the custom unmarshaler for MetadataSyncConfig struct.
5560func (msc *MetadataSyncConfig) UnmarshalJSON(body []byte) error {
5561	var m map[string]*json.RawMessage
5562	err := json.Unmarshal(body, &m)
5563	if err != nil {
5564		return err
5565	}
5566	for k, v := range m {
5567		switch k {
5568		case "properties":
5569			if v != nil {
5570				var metadataSyncConfigProperties MetadataSyncConfigProperties
5571				err = json.Unmarshal(*v, &metadataSyncConfigProperties)
5572				if err != nil {
5573					return err
5574				}
5575				msc.MetadataSyncConfigProperties = &metadataSyncConfigProperties
5576			}
5577		case "id":
5578			if v != nil {
5579				var ID string
5580				err = json.Unmarshal(*v, &ID)
5581				if err != nil {
5582					return err
5583				}
5584				msc.ID = &ID
5585			}
5586		case "name":
5587			if v != nil {
5588				var name string
5589				err = json.Unmarshal(*v, &name)
5590				if err != nil {
5591					return err
5592				}
5593				msc.Name = &name
5594			}
5595		case "type":
5596			if v != nil {
5597				var typeVar string
5598				err = json.Unmarshal(*v, &typeVar)
5599				if err != nil {
5600					return err
5601				}
5602				msc.Type = &typeVar
5603			}
5604		}
5605	}
5606
5607	return nil
5608}
5609
5610// MetadataSyncConfigProperties metadata Sync Config properties
5611type MetadataSyncConfigProperties struct {
5612	// Enabled - Indicates whether the metadata sync is enabled or disabled
5613	Enabled *bool `json:"enabled,omitempty"`
5614	// SyncIntervalInMinutes - The Sync Interval in minutes.
5615	SyncIntervalInMinutes *int32 `json:"syncIntervalInMinutes,omitempty"`
5616}
5617
5618// OperationMetaLogSpecification what is this?
5619type OperationMetaLogSpecification struct {
5620	// DisplayName - Log display name
5621	DisplayName *string `json:"displayName,omitempty"`
5622	// BlobDuration - Time range the log covers
5623	BlobDuration *string `json:"blobDuration,omitempty"`
5624	// Name - Log unique name
5625	Name *string `json:"name,omitempty"`
5626}
5627
5628// OperationMetaMetricDimensionSpecification what is this?
5629type OperationMetaMetricDimensionSpecification struct {
5630	// DisplayName - Dimension display name
5631	DisplayName *string `json:"displayName,omitempty"`
5632	// Name - Dimension unique name
5633	Name *string `json:"name,omitempty"`
5634	// ToBeExportedForShoebox - Whether this metric should be exported for Shoebox
5635	ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"`
5636}
5637
5638// OperationMetaMetricSpecification what is this?
5639type OperationMetaMetricSpecification struct {
5640	// SourceMdmNamespace - The source MDM namespace
5641	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
5642	// DisplayName - Metric display name
5643	DisplayName *string `json:"displayName,omitempty"`
5644	// Name - Metric unique name
5645	Name *string `json:"name,omitempty"`
5646	// AggregationType - Metric aggregation type
5647	AggregationType *string `json:"aggregationType,omitempty"`
5648	// DisplayDescription - Metric description
5649	DisplayDescription *string `json:"displayDescription,omitempty"`
5650	// SourceMdmAccount - The source MDM account
5651	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
5652	// EnableRegionalMdmAccount - Whether the regional MDM account is enabled
5653	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
5654	// Unit - Metric units
5655	Unit *string `json:"unit,omitempty"`
5656	// Dimensions - Metric dimensions
5657	Dimensions *[]OperationMetaMetricDimensionSpecification `json:"dimensions,omitempty"`
5658	// SupportsInstanceLevelAggregation - Whether the metric supports instance-level aggregation
5659	SupportsInstanceLevelAggregation *bool `json:"supportsInstanceLevelAggregation,omitempty"`
5660	// MetricFilterPattern - Metric filter
5661	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
5662}
5663
5664// OperationMetaPropertyInfo what is this?
5665type OperationMetaPropertyInfo struct {
5666	// ServiceSpecification - Operation service specification
5667	ServiceSpecification *OperationMetaServiceSpecification `json:"serviceSpecification,omitempty"`
5668}
5669
5670// OperationMetaServiceSpecification what is this?
5671type OperationMetaServiceSpecification struct {
5672	// MetricSpecifications - Service metric specifications
5673	MetricSpecifications *[]OperationMetaMetricSpecification `json:"metricSpecifications,omitempty"`
5674	// LogSpecifications - Service log specifications
5675	LogSpecifications *[]OperationMetaLogSpecification `json:"logSpecifications,omitempty"`
5676}
5677
5678// OperationResource an operation
5679type OperationResource struct {
5680	autorest.Response `json:"-"`
5681	// ID - Operation ID
5682	ID *string `json:"id,omitempty"`
5683	// Name - Operation name
5684	Name *string `json:"name,omitempty"`
5685	// Status - Operation status. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed', 'OperationStatusCanceled'
5686	Status OperationStatus `json:"status,omitempty"`
5687	// Properties - Operation properties
5688	Properties interface{} `json:"properties,omitempty"`
5689	// Error - Errors from the operation
5690	Error *ErrorDetail `json:"error,omitempty"`
5691	// StartTime - Operation start time
5692	StartTime *date.Time `json:"startTime,omitempty"`
5693	// EndTime - Operation start time
5694	EndTime *date.Time `json:"endTime,omitempty"`
5695	// PercentComplete - Completion percentage of the operation
5696	PercentComplete *float64 `json:"percentComplete,omitempty"`
5697}
5698
5699// PrivateEndpoint private endpoint details
5700type PrivateEndpoint struct {
5701	// ID - READ-ONLY; Resource id of the private endpoint.
5702	ID *string `json:"id,omitempty"`
5703}
5704
5705// PrivateEndpointConnection a private endpoint connection
5706type PrivateEndpointConnection struct {
5707	autorest.Response `json:"-"`
5708	// PrivateEndpointConnectionProperties - Private endpoint connection properties.
5709	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
5710	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
5711	ID *string `json:"id,omitempty"`
5712	// Name - READ-ONLY; The name of the resource
5713	Name *string `json:"name,omitempty"`
5714	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
5715	Type *string `json:"type,omitempty"`
5716}
5717
5718// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
5719func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
5720	objectMap := make(map[string]interface{})
5721	if pec.PrivateEndpointConnectionProperties != nil {
5722		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
5723	}
5724	return json.Marshal(objectMap)
5725}
5726
5727// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
5728func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
5729	var m map[string]*json.RawMessage
5730	err := json.Unmarshal(body, &m)
5731	if err != nil {
5732		return err
5733	}
5734	for k, v := range m {
5735		switch k {
5736		case "properties":
5737			if v != nil {
5738				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
5739				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
5740				if err != nil {
5741					return err
5742				}
5743				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
5744			}
5745		case "id":
5746			if v != nil {
5747				var ID string
5748				err = json.Unmarshal(*v, &ID)
5749				if err != nil {
5750					return err
5751				}
5752				pec.ID = &ID
5753			}
5754		case "name":
5755			if v != nil {
5756				var name string
5757				err = json.Unmarshal(*v, &name)
5758				if err != nil {
5759					return err
5760				}
5761				pec.Name = &name
5762			}
5763		case "type":
5764			if v != nil {
5765				var typeVar string
5766				err = json.Unmarshal(*v, &typeVar)
5767				if err != nil {
5768					return err
5769				}
5770				pec.Type = &typeVar
5771			}
5772		}
5773	}
5774
5775	return nil
5776}
5777
5778// PrivateEndpointConnectionForPrivateLinkHub ...
5779type PrivateEndpointConnectionForPrivateLinkHub struct {
5780	Name *string `json:"name,omitempty"`
5781	Type *string `json:"type,omitempty"`
5782	// ID - READ-ONLY; identifier
5783	ID *string `json:"id,omitempty"`
5784	// PrivateEndpointConnectionProperties - Properties of private endpoint connection for private link hub
5785	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
5786}
5787
5788// MarshalJSON is the custom marshaler for PrivateEndpointConnectionForPrivateLinkHub.
5789func (pecfplh PrivateEndpointConnectionForPrivateLinkHub) MarshalJSON() ([]byte, error) {
5790	objectMap := make(map[string]interface{})
5791	if pecfplh.Name != nil {
5792		objectMap["name"] = pecfplh.Name
5793	}
5794	if pecfplh.Type != nil {
5795		objectMap["type"] = pecfplh.Type
5796	}
5797	if pecfplh.PrivateEndpointConnectionProperties != nil {
5798		objectMap["properties"] = pecfplh.PrivateEndpointConnectionProperties
5799	}
5800	return json.Marshal(objectMap)
5801}
5802
5803// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnectionForPrivateLinkHub struct.
5804func (pecfplh *PrivateEndpointConnectionForPrivateLinkHub) UnmarshalJSON(body []byte) error {
5805	var m map[string]*json.RawMessage
5806	err := json.Unmarshal(body, &m)
5807	if err != nil {
5808		return err
5809	}
5810	for k, v := range m {
5811		switch k {
5812		case "name":
5813			if v != nil {
5814				var name string
5815				err = json.Unmarshal(*v, &name)
5816				if err != nil {
5817					return err
5818				}
5819				pecfplh.Name = &name
5820			}
5821		case "type":
5822			if v != nil {
5823				var typeVar string
5824				err = json.Unmarshal(*v, &typeVar)
5825				if err != nil {
5826					return err
5827				}
5828				pecfplh.Type = &typeVar
5829			}
5830		case "id":
5831			if v != nil {
5832				var ID string
5833				err = json.Unmarshal(*v, &ID)
5834				if err != nil {
5835					return err
5836				}
5837				pecfplh.ID = &ID
5838			}
5839		case "properties":
5840			if v != nil {
5841				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
5842				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
5843				if err != nil {
5844					return err
5845				}
5846				pecfplh.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
5847			}
5848		}
5849	}
5850
5851	return nil
5852}
5853
5854// PrivateEndpointConnectionForPrivateLinkHubBasic private Endpoint Connection For Private Link Hub - Basic
5855type PrivateEndpointConnectionForPrivateLinkHubBasic struct {
5856	// ID - READ-ONLY; identifier
5857	ID *string `json:"id,omitempty"`
5858	// PrivateEndpointConnectionProperties - Properties of private endpoint connection for private link hub
5859	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
5860}
5861
5862// MarshalJSON is the custom marshaler for PrivateEndpointConnectionForPrivateLinkHubBasic.
5863func (pecfplhb PrivateEndpointConnectionForPrivateLinkHubBasic) MarshalJSON() ([]byte, error) {
5864	objectMap := make(map[string]interface{})
5865	if pecfplhb.PrivateEndpointConnectionProperties != nil {
5866		objectMap["properties"] = pecfplhb.PrivateEndpointConnectionProperties
5867	}
5868	return json.Marshal(objectMap)
5869}
5870
5871// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnectionForPrivateLinkHubBasic struct.
5872func (pecfplhb *PrivateEndpointConnectionForPrivateLinkHubBasic) UnmarshalJSON(body []byte) error {
5873	var m map[string]*json.RawMessage
5874	err := json.Unmarshal(body, &m)
5875	if err != nil {
5876		return err
5877	}
5878	for k, v := range m {
5879		switch k {
5880		case "id":
5881			if v != nil {
5882				var ID string
5883				err = json.Unmarshal(*v, &ID)
5884				if err != nil {
5885					return err
5886				}
5887				pecfplhb.ID = &ID
5888			}
5889		case "properties":
5890			if v != nil {
5891				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
5892				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
5893				if err != nil {
5894					return err
5895				}
5896				pecfplhb.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
5897			}
5898		}
5899	}
5900
5901	return nil
5902}
5903
5904// PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse ...
5905type PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse struct {
5906	autorest.Response `json:"-"`
5907	Value             *[]PrivateEndpointConnectionForPrivateLinkHub `json:"value,omitempty"`
5908	NextLink          *string                                       `json:"nextLink,omitempty"`
5909}
5910
5911// PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator provides access to a
5912// complete listing of PrivateEndpointConnectionForPrivateLinkHub values.
5913type PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator struct {
5914	i    int
5915	page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage
5916}
5917
5918// NextWithContext advances to the next value.  If there was an error making
5919// the request the iterator does not advance and the error is returned.
5920func (iter *PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) NextWithContext(ctx context.Context) (err error) {
5921	if tracing.IsEnabled() {
5922		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator.NextWithContext")
5923		defer func() {
5924			sc := -1
5925			if iter.Response().Response.Response != nil {
5926				sc = iter.Response().Response.Response.StatusCode
5927			}
5928			tracing.EndSpan(ctx, sc, err)
5929		}()
5930	}
5931	iter.i++
5932	if iter.i < len(iter.page.Values()) {
5933		return nil
5934	}
5935	err = iter.page.NextWithContext(ctx)
5936	if err != nil {
5937		iter.i--
5938		return err
5939	}
5940	iter.i = 0
5941	return nil
5942}
5943
5944// Next advances to the next value.  If there was an error making
5945// the request the iterator does not advance and the error is returned.
5946// Deprecated: Use NextWithContext() instead.
5947func (iter *PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) Next() error {
5948	return iter.NextWithContext(context.Background())
5949}
5950
5951// NotDone returns true if the enumeration should be started or is not yet complete.
5952func (iter PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) NotDone() bool {
5953	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5954}
5955
5956// Response returns the raw server response from the last page request.
5957func (iter PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) Response() PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse {
5958	return iter.page.Response()
5959}
5960
5961// Value returns the current value or a zero-initialized value if the
5962// iterator has advanced beyond the end of the collection.
5963func (iter PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator) Value() PrivateEndpointConnectionForPrivateLinkHub {
5964	if !iter.page.NotDone() {
5965		return PrivateEndpointConnectionForPrivateLinkHub{}
5966	}
5967	return iter.page.Values()[iter.i]
5968}
5969
5970// Creates a new instance of the PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator type.
5971func NewPrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator(page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator {
5972	return PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseIterator{page: page}
5973}
5974
5975// IsEmpty returns true if the ListResult contains no values.
5976func (pecfplhRcr PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) IsEmpty() bool {
5977	return pecfplhRcr.Value == nil || len(*pecfplhRcr.Value) == 0
5978}
5979
5980// hasNextLink returns true if the NextLink is not empty.
5981func (pecfplhRcr PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) hasNextLink() bool {
5982	return pecfplhRcr.NextLink != nil && len(*pecfplhRcr.NextLink) != 0
5983}
5984
5985// privateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePreparer prepares a request to retrieve the next set of results.
5986// It returns nil if no more results exist.
5987func (pecfplhRcr PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) privateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePreparer(ctx context.Context) (*http.Request, error) {
5988	if !pecfplhRcr.hasNextLink() {
5989		return nil, nil
5990	}
5991	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5992		autorest.AsJSON(),
5993		autorest.AsGet(),
5994		autorest.WithBaseURL(to.String(pecfplhRcr.NextLink)))
5995}
5996
5997// PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage contains a page of
5998// PrivateEndpointConnectionForPrivateLinkHub values.
5999type PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage struct {
6000	fn         func(context.Context, PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) (PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse, error)
6001	pecfplhrcr PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse
6002}
6003
6004// NextWithContext advances to the next page of values.  If there was an error making
6005// the request the page does not advance and the error is returned.
6006func (page *PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) NextWithContext(ctx context.Context) (err error) {
6007	if tracing.IsEnabled() {
6008		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage.NextWithContext")
6009		defer func() {
6010			sc := -1
6011			if page.Response().Response.Response != nil {
6012				sc = page.Response().Response.Response.StatusCode
6013			}
6014			tracing.EndSpan(ctx, sc, err)
6015		}()
6016	}
6017	for {
6018		next, err := page.fn(ctx, page.pecfplhrcr)
6019		if err != nil {
6020			return err
6021		}
6022		page.pecfplhrcr = next
6023		if !next.hasNextLink() || !next.IsEmpty() {
6024			break
6025		}
6026	}
6027	return nil
6028}
6029
6030// Next advances to the next page of values.  If there was an error making
6031// the request the page does not advance and the error is returned.
6032// Deprecated: Use NextWithContext() instead.
6033func (page *PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) Next() error {
6034	return page.NextWithContext(context.Background())
6035}
6036
6037// NotDone returns true if the page enumeration should be started or is not yet complete.
6038func (page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) NotDone() bool {
6039	return !page.pecfplhrcr.IsEmpty()
6040}
6041
6042// Response returns the raw server response from the last page request.
6043func (page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) Response() PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse {
6044	return page.pecfplhrcr
6045}
6046
6047// Values returns the slice of values for the current page or nil if there are no values.
6048func (page PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage) Values() []PrivateEndpointConnectionForPrivateLinkHub {
6049	if page.pecfplhrcr.IsEmpty() {
6050		return nil
6051	}
6052	return *page.pecfplhrcr.Value
6053}
6054
6055// Creates a new instance of the PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage type.
6056func NewPrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage(cur PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse, getNextPage func(context.Context, PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) (PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse, error)) PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage {
6057	return PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponsePage{
6058		fn:         getNextPage,
6059		pecfplhrcr: cur,
6060	}
6061}
6062
6063// PrivateEndpointConnectionList a list of private endpoint connections
6064type PrivateEndpointConnectionList struct {
6065	autorest.Response `json:"-"`
6066	// Value - READ-ONLY; Array of results.
6067	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
6068	// NextLink - READ-ONLY; Link to retrieve next page of results.
6069	NextLink *string `json:"nextLink,omitempty"`
6070}
6071
6072// PrivateEndpointConnectionListIterator provides access to a complete listing of PrivateEndpointConnection
6073// values.
6074type PrivateEndpointConnectionListIterator struct {
6075	i    int
6076	page PrivateEndpointConnectionListPage
6077}
6078
6079// NextWithContext advances to the next value.  If there was an error making
6080// the request the iterator does not advance and the error is returned.
6081func (iter *PrivateEndpointConnectionListIterator) NextWithContext(ctx context.Context) (err error) {
6082	if tracing.IsEnabled() {
6083		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListIterator.NextWithContext")
6084		defer func() {
6085			sc := -1
6086			if iter.Response().Response.Response != nil {
6087				sc = iter.Response().Response.Response.StatusCode
6088			}
6089			tracing.EndSpan(ctx, sc, err)
6090		}()
6091	}
6092	iter.i++
6093	if iter.i < len(iter.page.Values()) {
6094		return nil
6095	}
6096	err = iter.page.NextWithContext(ctx)
6097	if err != nil {
6098		iter.i--
6099		return err
6100	}
6101	iter.i = 0
6102	return nil
6103}
6104
6105// Next advances to the next value.  If there was an error making
6106// the request the iterator does not advance and the error is returned.
6107// Deprecated: Use NextWithContext() instead.
6108func (iter *PrivateEndpointConnectionListIterator) Next() error {
6109	return iter.NextWithContext(context.Background())
6110}
6111
6112// NotDone returns true if the enumeration should be started or is not yet complete.
6113func (iter PrivateEndpointConnectionListIterator) NotDone() bool {
6114	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6115}
6116
6117// Response returns the raw server response from the last page request.
6118func (iter PrivateEndpointConnectionListIterator) Response() PrivateEndpointConnectionList {
6119	return iter.page.Response()
6120}
6121
6122// Value returns the current value or a zero-initialized value if the
6123// iterator has advanced beyond the end of the collection.
6124func (iter PrivateEndpointConnectionListIterator) Value() PrivateEndpointConnection {
6125	if !iter.page.NotDone() {
6126		return PrivateEndpointConnection{}
6127	}
6128	return iter.page.Values()[iter.i]
6129}
6130
6131// Creates a new instance of the PrivateEndpointConnectionListIterator type.
6132func NewPrivateEndpointConnectionListIterator(page PrivateEndpointConnectionListPage) PrivateEndpointConnectionListIterator {
6133	return PrivateEndpointConnectionListIterator{page: page}
6134}
6135
6136// IsEmpty returns true if the ListResult contains no values.
6137func (pecl PrivateEndpointConnectionList) IsEmpty() bool {
6138	return pecl.Value == nil || len(*pecl.Value) == 0
6139}
6140
6141// hasNextLink returns true if the NextLink is not empty.
6142func (pecl PrivateEndpointConnectionList) hasNextLink() bool {
6143	return pecl.NextLink != nil && len(*pecl.NextLink) != 0
6144}
6145
6146// privateEndpointConnectionListPreparer prepares a request to retrieve the next set of results.
6147// It returns nil if no more results exist.
6148func (pecl PrivateEndpointConnectionList) privateEndpointConnectionListPreparer(ctx context.Context) (*http.Request, error) {
6149	if !pecl.hasNextLink() {
6150		return nil, nil
6151	}
6152	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6153		autorest.AsJSON(),
6154		autorest.AsGet(),
6155		autorest.WithBaseURL(to.String(pecl.NextLink)))
6156}
6157
6158// PrivateEndpointConnectionListPage contains a page of PrivateEndpointConnection values.
6159type PrivateEndpointConnectionListPage struct {
6160	fn   func(context.Context, PrivateEndpointConnectionList) (PrivateEndpointConnectionList, error)
6161	pecl PrivateEndpointConnectionList
6162}
6163
6164// NextWithContext advances to the next page of values.  If there was an error making
6165// the request the page does not advance and the error is returned.
6166func (page *PrivateEndpointConnectionListPage) NextWithContext(ctx context.Context) (err error) {
6167	if tracing.IsEnabled() {
6168		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListPage.NextWithContext")
6169		defer func() {
6170			sc := -1
6171			if page.Response().Response.Response != nil {
6172				sc = page.Response().Response.Response.StatusCode
6173			}
6174			tracing.EndSpan(ctx, sc, err)
6175		}()
6176	}
6177	for {
6178		next, err := page.fn(ctx, page.pecl)
6179		if err != nil {
6180			return err
6181		}
6182		page.pecl = next
6183		if !next.hasNextLink() || !next.IsEmpty() {
6184			break
6185		}
6186	}
6187	return nil
6188}
6189
6190// Next advances to the next page of values.  If there was an error making
6191// the request the page does not advance and the error is returned.
6192// Deprecated: Use NextWithContext() instead.
6193func (page *PrivateEndpointConnectionListPage) Next() error {
6194	return page.NextWithContext(context.Background())
6195}
6196
6197// NotDone returns true if the page enumeration should be started or is not yet complete.
6198func (page PrivateEndpointConnectionListPage) NotDone() bool {
6199	return !page.pecl.IsEmpty()
6200}
6201
6202// Response returns the raw server response from the last page request.
6203func (page PrivateEndpointConnectionListPage) Response() PrivateEndpointConnectionList {
6204	return page.pecl
6205}
6206
6207// Values returns the slice of values for the current page or nil if there are no values.
6208func (page PrivateEndpointConnectionListPage) Values() []PrivateEndpointConnection {
6209	if page.pecl.IsEmpty() {
6210		return nil
6211	}
6212	return *page.pecl.Value
6213}
6214
6215// Creates a new instance of the PrivateEndpointConnectionListPage type.
6216func NewPrivateEndpointConnectionListPage(cur PrivateEndpointConnectionList, getNextPage func(context.Context, PrivateEndpointConnectionList) (PrivateEndpointConnectionList, error)) PrivateEndpointConnectionListPage {
6217	return PrivateEndpointConnectionListPage{
6218		fn:   getNextPage,
6219		pecl: cur,
6220	}
6221}
6222
6223// PrivateEndpointConnectionProperties properties of a private endpoint connection.
6224type PrivateEndpointConnectionProperties struct {
6225	// PrivateEndpoint - The private endpoint which the connection belongs to.
6226	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
6227	// PrivateLinkServiceConnectionState - Connection state of the private endpoint connection.
6228	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
6229	// ProvisioningState - READ-ONLY; Provisioning state of the private endpoint connection.
6230	ProvisioningState *string `json:"provisioningState,omitempty"`
6231}
6232
6233// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties.
6234func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
6235	objectMap := make(map[string]interface{})
6236	if pecp.PrivateEndpoint != nil {
6237		objectMap["privateEndpoint"] = pecp.PrivateEndpoint
6238	}
6239	if pecp.PrivateLinkServiceConnectionState != nil {
6240		objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState
6241	}
6242	return json.Marshal(objectMap)
6243}
6244
6245// PrivateEndpointConnectionsCreateFuture an abstraction for monitoring and retrieving the results of a
6246// long-running operation.
6247type PrivateEndpointConnectionsCreateFuture struct {
6248	azure.FutureAPI
6249	// Result returns the result of the asynchronous operation.
6250	// If the operation has not completed it will return an error.
6251	Result func(PrivateEndpointConnectionsClient) (PrivateEndpointConnection, error)
6252}
6253
6254// PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
6255// long-running operation.
6256type PrivateEndpointConnectionsDeleteFuture struct {
6257	azure.FutureAPI
6258	// Result returns the result of the asynchronous operation.
6259	// If the operation has not completed it will return an error.
6260	Result func(PrivateEndpointConnectionsClient) (OperationResource, error)
6261}
6262
6263// PrivateLinkHub a privateLinkHub
6264type PrivateLinkHub struct {
6265	autorest.Response `json:"-"`
6266	// PrivateLinkHubProperties - PrivateLinkHub resource properties
6267	*PrivateLinkHubProperties `json:"properties,omitempty"`
6268	// Tags - Resource tags.
6269	Tags map[string]*string `json:"tags"`
6270	// Location - The geo-location where the resource lives
6271	Location *string `json:"location,omitempty"`
6272	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
6273	ID *string `json:"id,omitempty"`
6274	// Name - READ-ONLY; The name of the resource
6275	Name *string `json:"name,omitempty"`
6276	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
6277	Type *string `json:"type,omitempty"`
6278}
6279
6280// MarshalJSON is the custom marshaler for PrivateLinkHub.
6281func (plh PrivateLinkHub) MarshalJSON() ([]byte, error) {
6282	objectMap := make(map[string]interface{})
6283	if plh.PrivateLinkHubProperties != nil {
6284		objectMap["properties"] = plh.PrivateLinkHubProperties
6285	}
6286	if plh.Tags != nil {
6287		objectMap["tags"] = plh.Tags
6288	}
6289	if plh.Location != nil {
6290		objectMap["location"] = plh.Location
6291	}
6292	return json.Marshal(objectMap)
6293}
6294
6295// UnmarshalJSON is the custom unmarshaler for PrivateLinkHub struct.
6296func (plh *PrivateLinkHub) UnmarshalJSON(body []byte) error {
6297	var m map[string]*json.RawMessage
6298	err := json.Unmarshal(body, &m)
6299	if err != nil {
6300		return err
6301	}
6302	for k, v := range m {
6303		switch k {
6304		case "properties":
6305			if v != nil {
6306				var privateLinkHubProperties PrivateLinkHubProperties
6307				err = json.Unmarshal(*v, &privateLinkHubProperties)
6308				if err != nil {
6309					return err
6310				}
6311				plh.PrivateLinkHubProperties = &privateLinkHubProperties
6312			}
6313		case "tags":
6314			if v != nil {
6315				var tags map[string]*string
6316				err = json.Unmarshal(*v, &tags)
6317				if err != nil {
6318					return err
6319				}
6320				plh.Tags = tags
6321			}
6322		case "location":
6323			if v != nil {
6324				var location string
6325				err = json.Unmarshal(*v, &location)
6326				if err != nil {
6327					return err
6328				}
6329				plh.Location = &location
6330			}
6331		case "id":
6332			if v != nil {
6333				var ID string
6334				err = json.Unmarshal(*v, &ID)
6335				if err != nil {
6336					return err
6337				}
6338				plh.ID = &ID
6339			}
6340		case "name":
6341			if v != nil {
6342				var name string
6343				err = json.Unmarshal(*v, &name)
6344				if err != nil {
6345					return err
6346				}
6347				plh.Name = &name
6348			}
6349		case "type":
6350			if v != nil {
6351				var typeVar string
6352				err = json.Unmarshal(*v, &typeVar)
6353				if err != nil {
6354					return err
6355				}
6356				plh.Type = &typeVar
6357			}
6358		}
6359	}
6360
6361	return nil
6362}
6363
6364// PrivateLinkHubInfoListResult list of privateLinkHubs
6365type PrivateLinkHubInfoListResult struct {
6366	autorest.Response `json:"-"`
6367	// NextLink - Link to the next page of results
6368	NextLink *string `json:"nextLink,omitempty"`
6369	// Value - List of privateLinkHubs
6370	Value *[]PrivateLinkHub `json:"value,omitempty"`
6371}
6372
6373// PrivateLinkHubInfoListResultIterator provides access to a complete listing of PrivateLinkHub values.
6374type PrivateLinkHubInfoListResultIterator struct {
6375	i    int
6376	page PrivateLinkHubInfoListResultPage
6377}
6378
6379// NextWithContext advances to the next value.  If there was an error making
6380// the request the iterator does not advance and the error is returned.
6381func (iter *PrivateLinkHubInfoListResultIterator) NextWithContext(ctx context.Context) (err error) {
6382	if tracing.IsEnabled() {
6383		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubInfoListResultIterator.NextWithContext")
6384		defer func() {
6385			sc := -1
6386			if iter.Response().Response.Response != nil {
6387				sc = iter.Response().Response.Response.StatusCode
6388			}
6389			tracing.EndSpan(ctx, sc, err)
6390		}()
6391	}
6392	iter.i++
6393	if iter.i < len(iter.page.Values()) {
6394		return nil
6395	}
6396	err = iter.page.NextWithContext(ctx)
6397	if err != nil {
6398		iter.i--
6399		return err
6400	}
6401	iter.i = 0
6402	return nil
6403}
6404
6405// Next advances to the next value.  If there was an error making
6406// the request the iterator does not advance and the error is returned.
6407// Deprecated: Use NextWithContext() instead.
6408func (iter *PrivateLinkHubInfoListResultIterator) Next() error {
6409	return iter.NextWithContext(context.Background())
6410}
6411
6412// NotDone returns true if the enumeration should be started or is not yet complete.
6413func (iter PrivateLinkHubInfoListResultIterator) NotDone() bool {
6414	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6415}
6416
6417// Response returns the raw server response from the last page request.
6418func (iter PrivateLinkHubInfoListResultIterator) Response() PrivateLinkHubInfoListResult {
6419	return iter.page.Response()
6420}
6421
6422// Value returns the current value or a zero-initialized value if the
6423// iterator has advanced beyond the end of the collection.
6424func (iter PrivateLinkHubInfoListResultIterator) Value() PrivateLinkHub {
6425	if !iter.page.NotDone() {
6426		return PrivateLinkHub{}
6427	}
6428	return iter.page.Values()[iter.i]
6429}
6430
6431// Creates a new instance of the PrivateLinkHubInfoListResultIterator type.
6432func NewPrivateLinkHubInfoListResultIterator(page PrivateLinkHubInfoListResultPage) PrivateLinkHubInfoListResultIterator {
6433	return PrivateLinkHubInfoListResultIterator{page: page}
6434}
6435
6436// IsEmpty returns true if the ListResult contains no values.
6437func (plhilr PrivateLinkHubInfoListResult) IsEmpty() bool {
6438	return plhilr.Value == nil || len(*plhilr.Value) == 0
6439}
6440
6441// hasNextLink returns true if the NextLink is not empty.
6442func (plhilr PrivateLinkHubInfoListResult) hasNextLink() bool {
6443	return plhilr.NextLink != nil && len(*plhilr.NextLink) != 0
6444}
6445
6446// privateLinkHubInfoListResultPreparer prepares a request to retrieve the next set of results.
6447// It returns nil if no more results exist.
6448func (plhilr PrivateLinkHubInfoListResult) privateLinkHubInfoListResultPreparer(ctx context.Context) (*http.Request, error) {
6449	if !plhilr.hasNextLink() {
6450		return nil, nil
6451	}
6452	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6453		autorest.AsJSON(),
6454		autorest.AsGet(),
6455		autorest.WithBaseURL(to.String(plhilr.NextLink)))
6456}
6457
6458// PrivateLinkHubInfoListResultPage contains a page of PrivateLinkHub values.
6459type PrivateLinkHubInfoListResultPage struct {
6460	fn     func(context.Context, PrivateLinkHubInfoListResult) (PrivateLinkHubInfoListResult, error)
6461	plhilr PrivateLinkHubInfoListResult
6462}
6463
6464// NextWithContext advances to the next page of values.  If there was an error making
6465// the request the page does not advance and the error is returned.
6466func (page *PrivateLinkHubInfoListResultPage) NextWithContext(ctx context.Context) (err error) {
6467	if tracing.IsEnabled() {
6468		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkHubInfoListResultPage.NextWithContext")
6469		defer func() {
6470			sc := -1
6471			if page.Response().Response.Response != nil {
6472				sc = page.Response().Response.Response.StatusCode
6473			}
6474			tracing.EndSpan(ctx, sc, err)
6475		}()
6476	}
6477	for {
6478		next, err := page.fn(ctx, page.plhilr)
6479		if err != nil {
6480			return err
6481		}
6482		page.plhilr = next
6483		if !next.hasNextLink() || !next.IsEmpty() {
6484			break
6485		}
6486	}
6487	return nil
6488}
6489
6490// Next advances to the next page of values.  If there was an error making
6491// the request the page does not advance and the error is returned.
6492// Deprecated: Use NextWithContext() instead.
6493func (page *PrivateLinkHubInfoListResultPage) Next() error {
6494	return page.NextWithContext(context.Background())
6495}
6496
6497// NotDone returns true if the page enumeration should be started or is not yet complete.
6498func (page PrivateLinkHubInfoListResultPage) NotDone() bool {
6499	return !page.plhilr.IsEmpty()
6500}
6501
6502// Response returns the raw server response from the last page request.
6503func (page PrivateLinkHubInfoListResultPage) Response() PrivateLinkHubInfoListResult {
6504	return page.plhilr
6505}
6506
6507// Values returns the slice of values for the current page or nil if there are no values.
6508func (page PrivateLinkHubInfoListResultPage) Values() []PrivateLinkHub {
6509	if page.plhilr.IsEmpty() {
6510		return nil
6511	}
6512	return *page.plhilr.Value
6513}
6514
6515// Creates a new instance of the PrivateLinkHubInfoListResultPage type.
6516func NewPrivateLinkHubInfoListResultPage(cur PrivateLinkHubInfoListResult, getNextPage func(context.Context, PrivateLinkHubInfoListResult) (PrivateLinkHubInfoListResult, error)) PrivateLinkHubInfoListResultPage {
6517	return PrivateLinkHubInfoListResultPage{
6518		fn:     getNextPage,
6519		plhilr: cur,
6520	}
6521}
6522
6523// PrivateLinkHubPatchInfo privateLinkHub patch details
6524type PrivateLinkHubPatchInfo struct {
6525	// Tags - Resource tags
6526	Tags map[string]*string `json:"tags"`
6527}
6528
6529// MarshalJSON is the custom marshaler for PrivateLinkHubPatchInfo.
6530func (plhpi PrivateLinkHubPatchInfo) MarshalJSON() ([]byte, error) {
6531	objectMap := make(map[string]interface{})
6532	if plhpi.Tags != nil {
6533		objectMap["tags"] = plhpi.Tags
6534	}
6535	return json.Marshal(objectMap)
6536}
6537
6538// PrivateLinkHubProperties privateLinkHub properties
6539type PrivateLinkHubProperties struct {
6540	// ProvisioningState - PrivateLinkHub provisioning state
6541	ProvisioningState *string `json:"provisioningState,omitempty"`
6542	// PrivateEndpointConnections - READ-ONLY; List of private endpoint connections
6543	PrivateEndpointConnections *[]PrivateEndpointConnectionForPrivateLinkHubBasic `json:"privateEndpointConnections,omitempty"`
6544}
6545
6546// MarshalJSON is the custom marshaler for PrivateLinkHubProperties.
6547func (plhp PrivateLinkHubProperties) MarshalJSON() ([]byte, error) {
6548	objectMap := make(map[string]interface{})
6549	if plhp.ProvisioningState != nil {
6550		objectMap["provisioningState"] = plhp.ProvisioningState
6551	}
6552	return json.Marshal(objectMap)
6553}
6554
6555// PrivateLinkHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6556// operation.
6557type PrivateLinkHubsDeleteFuture struct {
6558	azure.FutureAPI
6559	// Result returns the result of the asynchronous operation.
6560	// If the operation has not completed it will return an error.
6561	Result func(PrivateLinkHubsClient) (autorest.Response, error)
6562}
6563
6564// PrivateLinkResource a private link resource
6565type PrivateLinkResource struct {
6566	autorest.Response `json:"-"`
6567	// Properties - READ-ONLY; The private link resource properties.
6568	Properties *PrivateLinkResourceProperties `json:"properties,omitempty"`
6569	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
6570	ID *string `json:"id,omitempty"`
6571	// Name - READ-ONLY; The name of the resource
6572	Name *string `json:"name,omitempty"`
6573	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
6574	Type *string `json:"type,omitempty"`
6575}
6576
6577// PrivateLinkResourceListResult a list of private link resources
6578type PrivateLinkResourceListResult struct {
6579	autorest.Response `json:"-"`
6580	// Value - READ-ONLY; Array of results.
6581	Value *[]PrivateLinkResource `json:"value,omitempty"`
6582	// NextLink - READ-ONLY; Link to retrieve next page of results.
6583	NextLink *string `json:"nextLink,omitempty"`
6584}
6585
6586// PrivateLinkResourceListResultIterator provides access to a complete listing of PrivateLinkResource
6587// values.
6588type PrivateLinkResourceListResultIterator struct {
6589	i    int
6590	page PrivateLinkResourceListResultPage
6591}
6592
6593// NextWithContext advances to the next value.  If there was an error making
6594// the request the iterator does not advance and the error is returned.
6595func (iter *PrivateLinkResourceListResultIterator) NextWithContext(ctx context.Context) (err error) {
6596	if tracing.IsEnabled() {
6597		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourceListResultIterator.NextWithContext")
6598		defer func() {
6599			sc := -1
6600			if iter.Response().Response.Response != nil {
6601				sc = iter.Response().Response.Response.StatusCode
6602			}
6603			tracing.EndSpan(ctx, sc, err)
6604		}()
6605	}
6606	iter.i++
6607	if iter.i < len(iter.page.Values()) {
6608		return nil
6609	}
6610	err = iter.page.NextWithContext(ctx)
6611	if err != nil {
6612		iter.i--
6613		return err
6614	}
6615	iter.i = 0
6616	return nil
6617}
6618
6619// Next advances to the next value.  If there was an error making
6620// the request the iterator does not advance and the error is returned.
6621// Deprecated: Use NextWithContext() instead.
6622func (iter *PrivateLinkResourceListResultIterator) Next() error {
6623	return iter.NextWithContext(context.Background())
6624}
6625
6626// NotDone returns true if the enumeration should be started or is not yet complete.
6627func (iter PrivateLinkResourceListResultIterator) NotDone() bool {
6628	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6629}
6630
6631// Response returns the raw server response from the last page request.
6632func (iter PrivateLinkResourceListResultIterator) Response() PrivateLinkResourceListResult {
6633	return iter.page.Response()
6634}
6635
6636// Value returns the current value or a zero-initialized value if the
6637// iterator has advanced beyond the end of the collection.
6638func (iter PrivateLinkResourceListResultIterator) Value() PrivateLinkResource {
6639	if !iter.page.NotDone() {
6640		return PrivateLinkResource{}
6641	}
6642	return iter.page.Values()[iter.i]
6643}
6644
6645// Creates a new instance of the PrivateLinkResourceListResultIterator type.
6646func NewPrivateLinkResourceListResultIterator(page PrivateLinkResourceListResultPage) PrivateLinkResourceListResultIterator {
6647	return PrivateLinkResourceListResultIterator{page: page}
6648}
6649
6650// IsEmpty returns true if the ListResult contains no values.
6651func (plrlr PrivateLinkResourceListResult) IsEmpty() bool {
6652	return plrlr.Value == nil || len(*plrlr.Value) == 0
6653}
6654
6655// hasNextLink returns true if the NextLink is not empty.
6656func (plrlr PrivateLinkResourceListResult) hasNextLink() bool {
6657	return plrlr.NextLink != nil && len(*plrlr.NextLink) != 0
6658}
6659
6660// privateLinkResourceListResultPreparer prepares a request to retrieve the next set of results.
6661// It returns nil if no more results exist.
6662func (plrlr PrivateLinkResourceListResult) privateLinkResourceListResultPreparer(ctx context.Context) (*http.Request, error) {
6663	if !plrlr.hasNextLink() {
6664		return nil, nil
6665	}
6666	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6667		autorest.AsJSON(),
6668		autorest.AsGet(),
6669		autorest.WithBaseURL(to.String(plrlr.NextLink)))
6670}
6671
6672// PrivateLinkResourceListResultPage contains a page of PrivateLinkResource values.
6673type PrivateLinkResourceListResultPage struct {
6674	fn    func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)
6675	plrlr PrivateLinkResourceListResult
6676}
6677
6678// NextWithContext advances to the next page of values.  If there was an error making
6679// the request the page does not advance and the error is returned.
6680func (page *PrivateLinkResourceListResultPage) NextWithContext(ctx context.Context) (err error) {
6681	if tracing.IsEnabled() {
6682		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourceListResultPage.NextWithContext")
6683		defer func() {
6684			sc := -1
6685			if page.Response().Response.Response != nil {
6686				sc = page.Response().Response.Response.StatusCode
6687			}
6688			tracing.EndSpan(ctx, sc, err)
6689		}()
6690	}
6691	for {
6692		next, err := page.fn(ctx, page.plrlr)
6693		if err != nil {
6694			return err
6695		}
6696		page.plrlr = next
6697		if !next.hasNextLink() || !next.IsEmpty() {
6698			break
6699		}
6700	}
6701	return nil
6702}
6703
6704// Next advances to the next page of values.  If there was an error making
6705// the request the page does not advance and the error is returned.
6706// Deprecated: Use NextWithContext() instead.
6707func (page *PrivateLinkResourceListResultPage) Next() error {
6708	return page.NextWithContext(context.Background())
6709}
6710
6711// NotDone returns true if the page enumeration should be started or is not yet complete.
6712func (page PrivateLinkResourceListResultPage) NotDone() bool {
6713	return !page.plrlr.IsEmpty()
6714}
6715
6716// Response returns the raw server response from the last page request.
6717func (page PrivateLinkResourceListResultPage) Response() PrivateLinkResourceListResult {
6718	return page.plrlr
6719}
6720
6721// Values returns the slice of values for the current page or nil if there are no values.
6722func (page PrivateLinkResourceListResultPage) Values() []PrivateLinkResource {
6723	if page.plrlr.IsEmpty() {
6724		return nil
6725	}
6726	return *page.plrlr.Value
6727}
6728
6729// Creates a new instance of the PrivateLinkResourceListResultPage type.
6730func NewPrivateLinkResourceListResultPage(cur PrivateLinkResourceListResult, getNextPage func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)) PrivateLinkResourceListResultPage {
6731	return PrivateLinkResourceListResultPage{
6732		fn:    getNextPage,
6733		plrlr: cur,
6734	}
6735}
6736
6737// PrivateLinkResourceProperties properties of a private link resource.
6738type PrivateLinkResourceProperties struct {
6739	// GroupID - READ-ONLY; The private link resource group id.
6740	GroupID *string `json:"groupId,omitempty"`
6741	// RequiredMembers - READ-ONLY; The private link resource required member names.
6742	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
6743	// RequiredZoneNames - READ-ONLY; Required DNS zone names of the the private link resource.
6744	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
6745}
6746
6747// PrivateLinkServiceConnectionState connection state details of the private endpoint
6748type PrivateLinkServiceConnectionState struct {
6749	// Status - The private link service connection status.
6750	Status *string `json:"status,omitempty"`
6751	// Description - The private link service connection description.
6752	Description *string `json:"description,omitempty"`
6753	// ActionsRequired - READ-ONLY; The actions required for private link service connection.
6754	ActionsRequired *string `json:"actionsRequired,omitempty"`
6755}
6756
6757// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionState.
6758func (plscs PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) {
6759	objectMap := make(map[string]interface{})
6760	if plscs.Status != nil {
6761		objectMap["status"] = plscs.Status
6762	}
6763	if plscs.Description != nil {
6764		objectMap["description"] = plscs.Description
6765	}
6766	return json.Marshal(objectMap)
6767}
6768
6769// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
6770// have tags and a location
6771type ProxyResource struct {
6772	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
6773	ID *string `json:"id,omitempty"`
6774	// Name - READ-ONLY; The name of the resource
6775	Name *string `json:"name,omitempty"`
6776	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
6777	Type *string `json:"type,omitempty"`
6778}
6779
6780// PurviewConfiguration purview Configuration
6781type PurviewConfiguration struct {
6782	// PurviewResourceID - Purview Resource ID
6783	PurviewResourceID *string `json:"purviewResourceId,omitempty"`
6784}
6785
6786// QueryInterval a database query.
6787type QueryInterval struct {
6788	// IntervalStartTime - READ-ONLY; The start time of the measurement interval (ISO8601 format).
6789	IntervalStartTime *date.Time `json:"intervalStartTime,omitempty"`
6790	// ExecutionCount - READ-ONLY; The number of times the query was executed during this interval.
6791	ExecutionCount *float64 `json:"executionCount,omitempty"`
6792	// Metrics - READ-ONLY; The list of query metrics during this interval.
6793	Metrics *[]QueryMetric `json:"metrics,omitempty"`
6794}
6795
6796// QueryMetric a database query.
6797type QueryMetric struct {
6798	// Name - READ-ONLY; The name of the metric
6799	Name *string `json:"name,omitempty"`
6800	// DisplayName - READ-ONLY; The name of the metric for display in user interface
6801	DisplayName *string `json:"displayName,omitempty"`
6802	// Unit - READ-ONLY; The unit of measurement. Possible values include: 'Percentage', 'KB', 'Microseconds'
6803	Unit QueryMetricUnit `json:"unit,omitempty"`
6804	// Value - READ-ONLY; The measured value
6805	Value *float64 `json:"value,omitempty"`
6806}
6807
6808// QueryStatistic a database query.
6809type QueryStatistic struct {
6810	// QueryID - READ-ONLY; The id of the query
6811	QueryID *string `json:"queryId,omitempty"`
6812	// Intervals - READ-ONLY; The list of query intervals.
6813	Intervals *[]QueryInterval `json:"intervals,omitempty"`
6814}
6815
6816// RecommendedSensitivityLabelUpdate a recommended sensitivity label update operation.
6817type RecommendedSensitivityLabelUpdate struct {
6818	// RecommendedSensitivityLabelUpdateProperties - Resource properties.
6819	*RecommendedSensitivityLabelUpdateProperties `json:"properties,omitempty"`
6820	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
6821	ID *string `json:"id,omitempty"`
6822	// Name - READ-ONLY; The name of the resource
6823	Name *string `json:"name,omitempty"`
6824	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
6825	Type *string `json:"type,omitempty"`
6826}
6827
6828// MarshalJSON is the custom marshaler for RecommendedSensitivityLabelUpdate.
6829func (rslu RecommendedSensitivityLabelUpdate) MarshalJSON() ([]byte, error) {
6830	objectMap := make(map[string]interface{})
6831	if rslu.RecommendedSensitivityLabelUpdateProperties != nil {
6832		objectMap["properties"] = rslu.RecommendedSensitivityLabelUpdateProperties
6833	}
6834	return json.Marshal(objectMap)
6835}
6836
6837// UnmarshalJSON is the custom unmarshaler for RecommendedSensitivityLabelUpdate struct.
6838func (rslu *RecommendedSensitivityLabelUpdate) UnmarshalJSON(body []byte) error {
6839	var m map[string]*json.RawMessage
6840	err := json.Unmarshal(body, &m)
6841	if err != nil {
6842		return err
6843	}
6844	for k, v := range m {
6845		switch k {
6846		case "properties":
6847			if v != nil {
6848				var recommendedSensitivityLabelUpdateProperties RecommendedSensitivityLabelUpdateProperties
6849				err = json.Unmarshal(*v, &recommendedSensitivityLabelUpdateProperties)
6850				if err != nil {
6851					return err
6852				}
6853				rslu.RecommendedSensitivityLabelUpdateProperties = &recommendedSensitivityLabelUpdateProperties
6854			}
6855		case "id":
6856			if v != nil {
6857				var ID string
6858				err = json.Unmarshal(*v, &ID)
6859				if err != nil {
6860					return err
6861				}
6862				rslu.ID = &ID
6863			}
6864		case "name":
6865			if v != nil {
6866				var name string
6867				err = json.Unmarshal(*v, &name)
6868				if err != nil {
6869					return err
6870				}
6871				rslu.Name = &name
6872			}
6873		case "type":
6874			if v != nil {
6875				var typeVar string
6876				err = json.Unmarshal(*v, &typeVar)
6877				if err != nil {
6878					return err
6879				}
6880				rslu.Type = &typeVar
6881			}
6882		}
6883	}
6884
6885	return nil
6886}
6887
6888// RecommendedSensitivityLabelUpdateList a list of recommended sensitivity label update operations.
6889type RecommendedSensitivityLabelUpdateList struct {
6890	Operations *[]RecommendedSensitivityLabelUpdate `json:"operations,omitempty"`
6891}
6892
6893// RecommendedSensitivityLabelUpdateProperties properties of an operation executed on a recommended
6894// sensitivity label.
6895type RecommendedSensitivityLabelUpdateProperties struct {
6896	// Op - Possible values include: 'Enable', 'Disable'
6897	Op RecommendedSensitivityLabelUpdateKind `json:"op,omitempty"`
6898	// Schema - Schema name of the column to update.
6899	Schema *string `json:"schema,omitempty"`
6900	// Table - Table name of the column to update.
6901	Table *string `json:"table,omitempty"`
6902	// Column - Column name to update.
6903	Column *string `json:"column,omitempty"`
6904}
6905
6906// RecoverableSQLPool a recoverable sql pool
6907type RecoverableSQLPool struct {
6908	autorest.Response `json:"-"`
6909	// RecoverableSQLPoolProperties - The properties of a recoverable sql pool
6910	*RecoverableSQLPoolProperties `json:"properties,omitempty"`
6911	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
6912	ID *string `json:"id,omitempty"`
6913	// Name - READ-ONLY; The name of the resource
6914	Name *string `json:"name,omitempty"`
6915	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
6916	Type *string `json:"type,omitempty"`
6917}
6918
6919// MarshalJSON is the custom marshaler for RecoverableSQLPool.
6920func (rsp RecoverableSQLPool) MarshalJSON() ([]byte, error) {
6921	objectMap := make(map[string]interface{})
6922	if rsp.RecoverableSQLPoolProperties != nil {
6923		objectMap["properties"] = rsp.RecoverableSQLPoolProperties
6924	}
6925	return json.Marshal(objectMap)
6926}
6927
6928// UnmarshalJSON is the custom unmarshaler for RecoverableSQLPool struct.
6929func (rsp *RecoverableSQLPool) UnmarshalJSON(body []byte) error {
6930	var m map[string]*json.RawMessage
6931	err := json.Unmarshal(body, &m)
6932	if err != nil {
6933		return err
6934	}
6935	for k, v := range m {
6936		switch k {
6937		case "properties":
6938			if v != nil {
6939				var recoverableSQLPoolProperties RecoverableSQLPoolProperties
6940				err = json.Unmarshal(*v, &recoverableSQLPoolProperties)
6941				if err != nil {
6942					return err
6943				}
6944				rsp.RecoverableSQLPoolProperties = &recoverableSQLPoolProperties
6945			}
6946		case "id":
6947			if v != nil {
6948				var ID string
6949				err = json.Unmarshal(*v, &ID)
6950				if err != nil {
6951					return err
6952				}
6953				rsp.ID = &ID
6954			}
6955		case "name":
6956			if v != nil {
6957				var name string
6958				err = json.Unmarshal(*v, &name)
6959				if err != nil {
6960					return err
6961				}
6962				rsp.Name = &name
6963			}
6964		case "type":
6965			if v != nil {
6966				var typeVar string
6967				err = json.Unmarshal(*v, &typeVar)
6968				if err != nil {
6969					return err
6970				}
6971				rsp.Type = &typeVar
6972			}
6973		}
6974	}
6975
6976	return nil
6977}
6978
6979// RecoverableSQLPoolListResult the response to a list recoverable sql pools request
6980type RecoverableSQLPoolListResult struct {
6981	autorest.Response `json:"-"`
6982	// Value - READ-ONLY; A list of recoverable sql pool
6983	Value *[]RecoverableSQLPool `json:"value,omitempty"`
6984	// NextLink - READ-ONLY; Link to retrieve next page of results.
6985	NextLink *string `json:"nextLink,omitempty"`
6986}
6987
6988// RecoverableSQLPoolListResultIterator provides access to a complete listing of RecoverableSQLPool values.
6989type RecoverableSQLPoolListResultIterator struct {
6990	i    int
6991	page RecoverableSQLPoolListResultPage
6992}
6993
6994// NextWithContext advances to the next value.  If there was an error making
6995// the request the iterator does not advance and the error is returned.
6996func (iter *RecoverableSQLPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
6997	if tracing.IsEnabled() {
6998		ctx = tracing.StartSpan(ctx, fqdn+"/RecoverableSQLPoolListResultIterator.NextWithContext")
6999		defer func() {
7000			sc := -1
7001			if iter.Response().Response.Response != nil {
7002				sc = iter.Response().Response.Response.StatusCode
7003			}
7004			tracing.EndSpan(ctx, sc, err)
7005		}()
7006	}
7007	iter.i++
7008	if iter.i < len(iter.page.Values()) {
7009		return nil
7010	}
7011	err = iter.page.NextWithContext(ctx)
7012	if err != nil {
7013		iter.i--
7014		return err
7015	}
7016	iter.i = 0
7017	return nil
7018}
7019
7020// Next advances to the next value.  If there was an error making
7021// the request the iterator does not advance and the error is returned.
7022// Deprecated: Use NextWithContext() instead.
7023func (iter *RecoverableSQLPoolListResultIterator) Next() error {
7024	return iter.NextWithContext(context.Background())
7025}
7026
7027// NotDone returns true if the enumeration should be started or is not yet complete.
7028func (iter RecoverableSQLPoolListResultIterator) NotDone() bool {
7029	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7030}
7031
7032// Response returns the raw server response from the last page request.
7033func (iter RecoverableSQLPoolListResultIterator) Response() RecoverableSQLPoolListResult {
7034	return iter.page.Response()
7035}
7036
7037// Value returns the current value or a zero-initialized value if the
7038// iterator has advanced beyond the end of the collection.
7039func (iter RecoverableSQLPoolListResultIterator) Value() RecoverableSQLPool {
7040	if !iter.page.NotDone() {
7041		return RecoverableSQLPool{}
7042	}
7043	return iter.page.Values()[iter.i]
7044}
7045
7046// Creates a new instance of the RecoverableSQLPoolListResultIterator type.
7047func NewRecoverableSQLPoolListResultIterator(page RecoverableSQLPoolListResultPage) RecoverableSQLPoolListResultIterator {
7048	return RecoverableSQLPoolListResultIterator{page: page}
7049}
7050
7051// IsEmpty returns true if the ListResult contains no values.
7052func (rsplr RecoverableSQLPoolListResult) IsEmpty() bool {
7053	return rsplr.Value == nil || len(*rsplr.Value) == 0
7054}
7055
7056// hasNextLink returns true if the NextLink is not empty.
7057func (rsplr RecoverableSQLPoolListResult) hasNextLink() bool {
7058	return rsplr.NextLink != nil && len(*rsplr.NextLink) != 0
7059}
7060
7061// recoverableSQLPoolListResultPreparer prepares a request to retrieve the next set of results.
7062// It returns nil if no more results exist.
7063func (rsplr RecoverableSQLPoolListResult) recoverableSQLPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
7064	if !rsplr.hasNextLink() {
7065		return nil, nil
7066	}
7067	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7068		autorest.AsJSON(),
7069		autorest.AsGet(),
7070		autorest.WithBaseURL(to.String(rsplr.NextLink)))
7071}
7072
7073// RecoverableSQLPoolListResultPage contains a page of RecoverableSQLPool values.
7074type RecoverableSQLPoolListResultPage struct {
7075	fn    func(context.Context, RecoverableSQLPoolListResult) (RecoverableSQLPoolListResult, error)
7076	rsplr RecoverableSQLPoolListResult
7077}
7078
7079// NextWithContext advances to the next page of values.  If there was an error making
7080// the request the page does not advance and the error is returned.
7081func (page *RecoverableSQLPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
7082	if tracing.IsEnabled() {
7083		ctx = tracing.StartSpan(ctx, fqdn+"/RecoverableSQLPoolListResultPage.NextWithContext")
7084		defer func() {
7085			sc := -1
7086			if page.Response().Response.Response != nil {
7087				sc = page.Response().Response.Response.StatusCode
7088			}
7089			tracing.EndSpan(ctx, sc, err)
7090		}()
7091	}
7092	for {
7093		next, err := page.fn(ctx, page.rsplr)
7094		if err != nil {
7095			return err
7096		}
7097		page.rsplr = next
7098		if !next.hasNextLink() || !next.IsEmpty() {
7099			break
7100		}
7101	}
7102	return nil
7103}
7104
7105// Next advances to the next page of values.  If there was an error making
7106// the request the page does not advance and the error is returned.
7107// Deprecated: Use NextWithContext() instead.
7108func (page *RecoverableSQLPoolListResultPage) Next() error {
7109	return page.NextWithContext(context.Background())
7110}
7111
7112// NotDone returns true if the page enumeration should be started or is not yet complete.
7113func (page RecoverableSQLPoolListResultPage) NotDone() bool {
7114	return !page.rsplr.IsEmpty()
7115}
7116
7117// Response returns the raw server response from the last page request.
7118func (page RecoverableSQLPoolListResultPage) Response() RecoverableSQLPoolListResult {
7119	return page.rsplr
7120}
7121
7122// Values returns the slice of values for the current page or nil if there are no values.
7123func (page RecoverableSQLPoolListResultPage) Values() []RecoverableSQLPool {
7124	if page.rsplr.IsEmpty() {
7125		return nil
7126	}
7127	return *page.rsplr.Value
7128}
7129
7130// Creates a new instance of the RecoverableSQLPoolListResultPage type.
7131func NewRecoverableSQLPoolListResultPage(cur RecoverableSQLPoolListResult, getNextPage func(context.Context, RecoverableSQLPoolListResult) (RecoverableSQLPoolListResult, error)) RecoverableSQLPoolListResultPage {
7132	return RecoverableSQLPoolListResultPage{
7133		fn:    getNextPage,
7134		rsplr: cur,
7135	}
7136}
7137
7138// RecoverableSQLPoolProperties the properties of a recoverable sql pool
7139type RecoverableSQLPoolProperties struct {
7140	// Edition - READ-ONLY; The edition of the database
7141	Edition *string `json:"edition,omitempty"`
7142	// ServiceLevelObjective - READ-ONLY; The service level objective name of the database
7143	ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"`
7144	// ElasticPoolName - READ-ONLY; The elastic pool name of the database
7145	ElasticPoolName *string `json:"elasticPoolName,omitempty"`
7146	// LastAvailableBackupDate - READ-ONLY; The last available backup date of the database (ISO8601 format)
7147	LastAvailableBackupDate *date.Time `json:"lastAvailableBackupDate,omitempty"`
7148}
7149
7150// ReplaceAllFirewallRulesOperationResponse an existing operation for replacing the firewall rules
7151type ReplaceAllFirewallRulesOperationResponse struct {
7152	autorest.Response `json:"-"`
7153	// OperationID - The operation ID
7154	OperationID *string `json:"operationId,omitempty"`
7155}
7156
7157// ReplaceAllIPFirewallRulesRequest replace all IP firewall rules request
7158type ReplaceAllIPFirewallRulesRequest struct {
7159	// IPFirewallRules - IP firewall rule properties
7160	IPFirewallRules map[string]*IPFirewallRuleProperties `json:"ipFirewallRules"`
7161}
7162
7163// MarshalJSON is the custom marshaler for ReplaceAllIPFirewallRulesRequest.
7164func (raifrr ReplaceAllIPFirewallRulesRequest) MarshalJSON() ([]byte, error) {
7165	objectMap := make(map[string]interface{})
7166	if raifrr.IPFirewallRules != nil {
7167		objectMap["ipFirewallRules"] = raifrr.IPFirewallRules
7168	}
7169	return json.Marshal(objectMap)
7170}
7171
7172// ReplicationLink represents a Sql pool replication link.
7173type ReplicationLink struct {
7174	autorest.Response `json:"-"`
7175	// Location - READ-ONLY; Location of the workspace that contains this firewall rule.
7176	Location *string `json:"location,omitempty"`
7177	// ReplicationLinkProperties - The properties representing the resource.
7178	*ReplicationLinkProperties `json:"properties,omitempty"`
7179	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
7180	ID *string `json:"id,omitempty"`
7181	// Name - READ-ONLY; The name of the resource
7182	Name *string `json:"name,omitempty"`
7183	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
7184	Type *string `json:"type,omitempty"`
7185}
7186
7187// MarshalJSON is the custom marshaler for ReplicationLink.
7188func (rl ReplicationLink) MarshalJSON() ([]byte, error) {
7189	objectMap := make(map[string]interface{})
7190	if rl.ReplicationLinkProperties != nil {
7191		objectMap["properties"] = rl.ReplicationLinkProperties
7192	}
7193	return json.Marshal(objectMap)
7194}
7195
7196// UnmarshalJSON is the custom unmarshaler for ReplicationLink struct.
7197func (rl *ReplicationLink) UnmarshalJSON(body []byte) error {
7198	var m map[string]*json.RawMessage
7199	err := json.Unmarshal(body, &m)
7200	if err != nil {
7201		return err
7202	}
7203	for k, v := range m {
7204		switch k {
7205		case "location":
7206			if v != nil {
7207				var location string
7208				err = json.Unmarshal(*v, &location)
7209				if err != nil {
7210					return err
7211				}
7212				rl.Location = &location
7213			}
7214		case "properties":
7215			if v != nil {
7216				var replicationLinkProperties ReplicationLinkProperties
7217				err = json.Unmarshal(*v, &replicationLinkProperties)
7218				if err != nil {
7219					return err
7220				}
7221				rl.ReplicationLinkProperties = &replicationLinkProperties
7222			}
7223		case "id":
7224			if v != nil {
7225				var ID string
7226				err = json.Unmarshal(*v, &ID)
7227				if err != nil {
7228					return err
7229				}
7230				rl.ID = &ID
7231			}
7232		case "name":
7233			if v != nil {
7234				var name string
7235				err = json.Unmarshal(*v, &name)
7236				if err != nil {
7237					return err
7238				}
7239				rl.Name = &name
7240			}
7241		case "type":
7242			if v != nil {
7243				var typeVar string
7244				err = json.Unmarshal(*v, &typeVar)
7245				if err != nil {
7246					return err
7247				}
7248				rl.Type = &typeVar
7249			}
7250		}
7251	}
7252
7253	return nil
7254}
7255
7256// ReplicationLinkListResult represents the response to a List Sql pool replication link request.
7257type ReplicationLinkListResult struct {
7258	autorest.Response `json:"-"`
7259	// Value - The list of Sql pool replication links housed in the Sql pool.
7260	Value *[]ReplicationLink `json:"value,omitempty"`
7261	// NextLink - READ-ONLY; Link to retrieve next page of results.
7262	NextLink *string `json:"nextLink,omitempty"`
7263}
7264
7265// MarshalJSON is the custom marshaler for ReplicationLinkListResult.
7266func (rllr ReplicationLinkListResult) MarshalJSON() ([]byte, error) {
7267	objectMap := make(map[string]interface{})
7268	if rllr.Value != nil {
7269		objectMap["value"] = rllr.Value
7270	}
7271	return json.Marshal(objectMap)
7272}
7273
7274// ReplicationLinkListResultIterator provides access to a complete listing of ReplicationLink values.
7275type ReplicationLinkListResultIterator struct {
7276	i    int
7277	page ReplicationLinkListResultPage
7278}
7279
7280// NextWithContext advances to the next value.  If there was an error making
7281// the request the iterator does not advance and the error is returned.
7282func (iter *ReplicationLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
7283	if tracing.IsEnabled() {
7284		ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLinkListResultIterator.NextWithContext")
7285		defer func() {
7286			sc := -1
7287			if iter.Response().Response.Response != nil {
7288				sc = iter.Response().Response.Response.StatusCode
7289			}
7290			tracing.EndSpan(ctx, sc, err)
7291		}()
7292	}
7293	iter.i++
7294	if iter.i < len(iter.page.Values()) {
7295		return nil
7296	}
7297	err = iter.page.NextWithContext(ctx)
7298	if err != nil {
7299		iter.i--
7300		return err
7301	}
7302	iter.i = 0
7303	return nil
7304}
7305
7306// Next advances to the next value.  If there was an error making
7307// the request the iterator does not advance and the error is returned.
7308// Deprecated: Use NextWithContext() instead.
7309func (iter *ReplicationLinkListResultIterator) Next() error {
7310	return iter.NextWithContext(context.Background())
7311}
7312
7313// NotDone returns true if the enumeration should be started or is not yet complete.
7314func (iter ReplicationLinkListResultIterator) NotDone() bool {
7315	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7316}
7317
7318// Response returns the raw server response from the last page request.
7319func (iter ReplicationLinkListResultIterator) Response() ReplicationLinkListResult {
7320	return iter.page.Response()
7321}
7322
7323// Value returns the current value or a zero-initialized value if the
7324// iterator has advanced beyond the end of the collection.
7325func (iter ReplicationLinkListResultIterator) Value() ReplicationLink {
7326	if !iter.page.NotDone() {
7327		return ReplicationLink{}
7328	}
7329	return iter.page.Values()[iter.i]
7330}
7331
7332// Creates a new instance of the ReplicationLinkListResultIterator type.
7333func NewReplicationLinkListResultIterator(page ReplicationLinkListResultPage) ReplicationLinkListResultIterator {
7334	return ReplicationLinkListResultIterator{page: page}
7335}
7336
7337// IsEmpty returns true if the ListResult contains no values.
7338func (rllr ReplicationLinkListResult) IsEmpty() bool {
7339	return rllr.Value == nil || len(*rllr.Value) == 0
7340}
7341
7342// hasNextLink returns true if the NextLink is not empty.
7343func (rllr ReplicationLinkListResult) hasNextLink() bool {
7344	return rllr.NextLink != nil && len(*rllr.NextLink) != 0
7345}
7346
7347// replicationLinkListResultPreparer prepares a request to retrieve the next set of results.
7348// It returns nil if no more results exist.
7349func (rllr ReplicationLinkListResult) replicationLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
7350	if !rllr.hasNextLink() {
7351		return nil, nil
7352	}
7353	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7354		autorest.AsJSON(),
7355		autorest.AsGet(),
7356		autorest.WithBaseURL(to.String(rllr.NextLink)))
7357}
7358
7359// ReplicationLinkListResultPage contains a page of ReplicationLink values.
7360type ReplicationLinkListResultPage struct {
7361	fn   func(context.Context, ReplicationLinkListResult) (ReplicationLinkListResult, error)
7362	rllr ReplicationLinkListResult
7363}
7364
7365// NextWithContext advances to the next page of values.  If there was an error making
7366// the request the page does not advance and the error is returned.
7367func (page *ReplicationLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
7368	if tracing.IsEnabled() {
7369		ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLinkListResultPage.NextWithContext")
7370		defer func() {
7371			sc := -1
7372			if page.Response().Response.Response != nil {
7373				sc = page.Response().Response.Response.StatusCode
7374			}
7375			tracing.EndSpan(ctx, sc, err)
7376		}()
7377	}
7378	for {
7379		next, err := page.fn(ctx, page.rllr)
7380		if err != nil {
7381			return err
7382		}
7383		page.rllr = next
7384		if !next.hasNextLink() || !next.IsEmpty() {
7385			break
7386		}
7387	}
7388	return nil
7389}
7390
7391// Next advances to the next page of values.  If there was an error making
7392// the request the page does not advance and the error is returned.
7393// Deprecated: Use NextWithContext() instead.
7394func (page *ReplicationLinkListResultPage) Next() error {
7395	return page.NextWithContext(context.Background())
7396}
7397
7398// NotDone returns true if the page enumeration should be started or is not yet complete.
7399func (page ReplicationLinkListResultPage) NotDone() bool {
7400	return !page.rllr.IsEmpty()
7401}
7402
7403// Response returns the raw server response from the last page request.
7404func (page ReplicationLinkListResultPage) Response() ReplicationLinkListResult {
7405	return page.rllr
7406}
7407
7408// Values returns the slice of values for the current page or nil if there are no values.
7409func (page ReplicationLinkListResultPage) Values() []ReplicationLink {
7410	if page.rllr.IsEmpty() {
7411		return nil
7412	}
7413	return *page.rllr.Value
7414}
7415
7416// Creates a new instance of the ReplicationLinkListResultPage type.
7417func NewReplicationLinkListResultPage(cur ReplicationLinkListResult, getNextPage func(context.Context, ReplicationLinkListResult) (ReplicationLinkListResult, error)) ReplicationLinkListResultPage {
7418	return ReplicationLinkListResultPage{
7419		fn:   getNextPage,
7420		rllr: cur,
7421	}
7422}
7423
7424// ReplicationLinkProperties represents the properties of a Sql pool replication link.
7425type ReplicationLinkProperties struct {
7426	// IsTerminationAllowed - READ-ONLY; Legacy value indicating whether termination is allowed.  Currently always returns true.
7427	IsTerminationAllowed *bool `json:"isTerminationAllowed,omitempty"`
7428	// ReplicationMode - READ-ONLY; Replication mode of this replication link.
7429	ReplicationMode *string `json:"replicationMode,omitempty"`
7430	// PartnerServer - READ-ONLY; The name of the workspace hosting the partner Sql pool.
7431	PartnerServer *string `json:"partnerServer,omitempty"`
7432	// PartnerDatabase - READ-ONLY; The name of the partner Sql pool.
7433	PartnerDatabase *string `json:"partnerDatabase,omitempty"`
7434	// PartnerLocation - READ-ONLY; The Azure Region of the partner Sql pool.
7435	PartnerLocation *string `json:"partnerLocation,omitempty"`
7436	// Role - READ-ONLY; The role of the Sql pool in the replication link. Possible values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', 'Copy'
7437	Role ReplicationRole `json:"role,omitempty"`
7438	// PartnerRole - READ-ONLY; The role of the partner Sql pool in the replication link. Possible values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', 'Copy'
7439	PartnerRole ReplicationRole `json:"partnerRole,omitempty"`
7440	// StartTime - READ-ONLY; The start time for the replication link.
7441	StartTime *date.Time `json:"startTime,omitempty"`
7442	// PercentComplete - READ-ONLY; The percentage of seeding complete for the replication link.
7443	PercentComplete *int32 `json:"percentComplete,omitempty"`
7444	// ReplicationState - READ-ONLY; The replication state for the replication link. Possible values include: 'PENDING', 'SEEDING', 'CATCHUP', 'SUSPENDED'
7445	ReplicationState ReplicationState `json:"replicationState,omitempty"`
7446}
7447
7448// Resource common fields that are returned in the response for all Azure Resource Manager resources
7449type Resource struct {
7450	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
7451	ID *string `json:"id,omitempty"`
7452	// Name - READ-ONLY; The name of the resource
7453	Name *string `json:"name,omitempty"`
7454	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
7455	Type *string `json:"type,omitempty"`
7456}
7457
7458// ResourceMoveDefinition contains the information necessary to perform a resource move (rename).
7459type ResourceMoveDefinition struct {
7460	// ID - The target ID for the resource
7461	ID *string `json:"id,omitempty"`
7462}
7463
7464// RestorableDroppedSQLPool a restorable dropped Sql pool
7465type RestorableDroppedSQLPool struct {
7466	autorest.Response `json:"-"`
7467	// Location - READ-ONLY; The geo-location where the resource lives
7468	Location *string `json:"location,omitempty"`
7469	// RestorableDroppedSQLPoolProperties - The properties of a restorable dropped Sql pool
7470	*RestorableDroppedSQLPoolProperties `json:"properties,omitempty"`
7471	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
7472	ID *string `json:"id,omitempty"`
7473	// Name - READ-ONLY; The name of the resource
7474	Name *string `json:"name,omitempty"`
7475	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
7476	Type *string `json:"type,omitempty"`
7477}
7478
7479// MarshalJSON is the custom marshaler for RestorableDroppedSQLPool.
7480func (rdsp RestorableDroppedSQLPool) MarshalJSON() ([]byte, error) {
7481	objectMap := make(map[string]interface{})
7482	if rdsp.RestorableDroppedSQLPoolProperties != nil {
7483		objectMap["properties"] = rdsp.RestorableDroppedSQLPoolProperties
7484	}
7485	return json.Marshal(objectMap)
7486}
7487
7488// UnmarshalJSON is the custom unmarshaler for RestorableDroppedSQLPool struct.
7489func (rdsp *RestorableDroppedSQLPool) UnmarshalJSON(body []byte) error {
7490	var m map[string]*json.RawMessage
7491	err := json.Unmarshal(body, &m)
7492	if err != nil {
7493		return err
7494	}
7495	for k, v := range m {
7496		switch k {
7497		case "location":
7498			if v != nil {
7499				var location string
7500				err = json.Unmarshal(*v, &location)
7501				if err != nil {
7502					return err
7503				}
7504				rdsp.Location = &location
7505			}
7506		case "properties":
7507			if v != nil {
7508				var restorableDroppedSQLPoolProperties RestorableDroppedSQLPoolProperties
7509				err = json.Unmarshal(*v, &restorableDroppedSQLPoolProperties)
7510				if err != nil {
7511					return err
7512				}
7513				rdsp.RestorableDroppedSQLPoolProperties = &restorableDroppedSQLPoolProperties
7514			}
7515		case "id":
7516			if v != nil {
7517				var ID string
7518				err = json.Unmarshal(*v, &ID)
7519				if err != nil {
7520					return err
7521				}
7522				rdsp.ID = &ID
7523			}
7524		case "name":
7525			if v != nil {
7526				var name string
7527				err = json.Unmarshal(*v, &name)
7528				if err != nil {
7529					return err
7530				}
7531				rdsp.Name = &name
7532			}
7533		case "type":
7534			if v != nil {
7535				var typeVar string
7536				err = json.Unmarshal(*v, &typeVar)
7537				if err != nil {
7538					return err
7539				}
7540				rdsp.Type = &typeVar
7541			}
7542		}
7543	}
7544
7545	return nil
7546}
7547
7548// RestorableDroppedSQLPoolListResult the response to a list restorable dropped Sql pools request
7549type RestorableDroppedSQLPoolListResult struct {
7550	autorest.Response `json:"-"`
7551	// Value - A list of restorable dropped Sql pools
7552	Value *[]RestorableDroppedSQLPool `json:"value,omitempty"`
7553}
7554
7555// RestorableDroppedSQLPoolProperties the properties of a restorable dropped Sql pool
7556type RestorableDroppedSQLPoolProperties struct {
7557	// DatabaseName - READ-ONLY; The name of the database
7558	DatabaseName *string `json:"databaseName,omitempty"`
7559	// Edition - READ-ONLY; The edition of the database
7560	Edition *string `json:"edition,omitempty"`
7561	// MaxSizeBytes - READ-ONLY; The max size in bytes of the database
7562	MaxSizeBytes *string `json:"maxSizeBytes,omitempty"`
7563	// ServiceLevelObjective - READ-ONLY; The service level objective name of the database
7564	ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"`
7565	// ElasticPoolName - READ-ONLY; The elastic pool name of the database
7566	ElasticPoolName *string `json:"elasticPoolName,omitempty"`
7567	// CreationDate - READ-ONLY; The creation date of the database (ISO8601 format)
7568	CreationDate *date.Time `json:"creationDate,omitempty"`
7569	// DeletionDate - READ-ONLY; The deletion date of the database (ISO8601 format)
7570	DeletionDate *date.Time `json:"deletionDate,omitempty"`
7571	// EarliestRestoreDate - READ-ONLY; The earliest restore date of the database (ISO8601 format)
7572	EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"`
7573}
7574
7575// RestorePoint database restore points.
7576type RestorePoint struct {
7577	autorest.Response `json:"-"`
7578	// Location - READ-ONLY; Resource location.
7579	Location *string `json:"location,omitempty"`
7580	// RestorePointProperties - Resource properties.
7581	*RestorePointProperties `json:"properties,omitempty"`
7582	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
7583	ID *string `json:"id,omitempty"`
7584	// Name - READ-ONLY; The name of the resource
7585	Name *string `json:"name,omitempty"`
7586	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
7587	Type *string `json:"type,omitempty"`
7588}
7589
7590// MarshalJSON is the custom marshaler for RestorePoint.
7591func (rp RestorePoint) MarshalJSON() ([]byte, error) {
7592	objectMap := make(map[string]interface{})
7593	if rp.RestorePointProperties != nil {
7594		objectMap["properties"] = rp.RestorePointProperties
7595	}
7596	return json.Marshal(objectMap)
7597}
7598
7599// UnmarshalJSON is the custom unmarshaler for RestorePoint struct.
7600func (rp *RestorePoint) UnmarshalJSON(body []byte) error {
7601	var m map[string]*json.RawMessage
7602	err := json.Unmarshal(body, &m)
7603	if err != nil {
7604		return err
7605	}
7606	for k, v := range m {
7607		switch k {
7608		case "location":
7609			if v != nil {
7610				var location string
7611				err = json.Unmarshal(*v, &location)
7612				if err != nil {
7613					return err
7614				}
7615				rp.Location = &location
7616			}
7617		case "properties":
7618			if v != nil {
7619				var restorePointProperties RestorePointProperties
7620				err = json.Unmarshal(*v, &restorePointProperties)
7621				if err != nil {
7622					return err
7623				}
7624				rp.RestorePointProperties = &restorePointProperties
7625			}
7626		case "id":
7627			if v != nil {
7628				var ID string
7629				err = json.Unmarshal(*v, &ID)
7630				if err != nil {
7631					return err
7632				}
7633				rp.ID = &ID
7634			}
7635		case "name":
7636			if v != nil {
7637				var name string
7638				err = json.Unmarshal(*v, &name)
7639				if err != nil {
7640					return err
7641				}
7642				rp.Name = &name
7643			}
7644		case "type":
7645			if v != nil {
7646				var typeVar string
7647				err = json.Unmarshal(*v, &typeVar)
7648				if err != nil {
7649					return err
7650				}
7651				rp.Type = &typeVar
7652			}
7653		}
7654	}
7655
7656	return nil
7657}
7658
7659// RestorePointListResult a list of long term retention backups.
7660type RestorePointListResult struct {
7661	autorest.Response `json:"-"`
7662	// Value - READ-ONLY; Array of results.
7663	Value *[]RestorePoint `json:"value,omitempty"`
7664	// NextLink - READ-ONLY; Link to retrieve next page of results.
7665	NextLink *string `json:"nextLink,omitempty"`
7666}
7667
7668// RestorePointListResultIterator provides access to a complete listing of RestorePoint values.
7669type RestorePointListResultIterator struct {
7670	i    int
7671	page RestorePointListResultPage
7672}
7673
7674// NextWithContext advances to the next value.  If there was an error making
7675// the request the iterator does not advance and the error is returned.
7676func (iter *RestorePointListResultIterator) NextWithContext(ctx context.Context) (err error) {
7677	if tracing.IsEnabled() {
7678		ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointListResultIterator.NextWithContext")
7679		defer func() {
7680			sc := -1
7681			if iter.Response().Response.Response != nil {
7682				sc = iter.Response().Response.Response.StatusCode
7683			}
7684			tracing.EndSpan(ctx, sc, err)
7685		}()
7686	}
7687	iter.i++
7688	if iter.i < len(iter.page.Values()) {
7689		return nil
7690	}
7691	err = iter.page.NextWithContext(ctx)
7692	if err != nil {
7693		iter.i--
7694		return err
7695	}
7696	iter.i = 0
7697	return nil
7698}
7699
7700// Next advances to the next value.  If there was an error making
7701// the request the iterator does not advance and the error is returned.
7702// Deprecated: Use NextWithContext() instead.
7703func (iter *RestorePointListResultIterator) Next() error {
7704	return iter.NextWithContext(context.Background())
7705}
7706
7707// NotDone returns true if the enumeration should be started or is not yet complete.
7708func (iter RestorePointListResultIterator) NotDone() bool {
7709	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7710}
7711
7712// Response returns the raw server response from the last page request.
7713func (iter RestorePointListResultIterator) Response() RestorePointListResult {
7714	return iter.page.Response()
7715}
7716
7717// Value returns the current value or a zero-initialized value if the
7718// iterator has advanced beyond the end of the collection.
7719func (iter RestorePointListResultIterator) Value() RestorePoint {
7720	if !iter.page.NotDone() {
7721		return RestorePoint{}
7722	}
7723	return iter.page.Values()[iter.i]
7724}
7725
7726// Creates a new instance of the RestorePointListResultIterator type.
7727func NewRestorePointListResultIterator(page RestorePointListResultPage) RestorePointListResultIterator {
7728	return RestorePointListResultIterator{page: page}
7729}
7730
7731// IsEmpty returns true if the ListResult contains no values.
7732func (rplr RestorePointListResult) IsEmpty() bool {
7733	return rplr.Value == nil || len(*rplr.Value) == 0
7734}
7735
7736// hasNextLink returns true if the NextLink is not empty.
7737func (rplr RestorePointListResult) hasNextLink() bool {
7738	return rplr.NextLink != nil && len(*rplr.NextLink) != 0
7739}
7740
7741// restorePointListResultPreparer prepares a request to retrieve the next set of results.
7742// It returns nil if no more results exist.
7743func (rplr RestorePointListResult) restorePointListResultPreparer(ctx context.Context) (*http.Request, error) {
7744	if !rplr.hasNextLink() {
7745		return nil, nil
7746	}
7747	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7748		autorest.AsJSON(),
7749		autorest.AsGet(),
7750		autorest.WithBaseURL(to.String(rplr.NextLink)))
7751}
7752
7753// RestorePointListResultPage contains a page of RestorePoint values.
7754type RestorePointListResultPage struct {
7755	fn   func(context.Context, RestorePointListResult) (RestorePointListResult, error)
7756	rplr RestorePointListResult
7757}
7758
7759// NextWithContext advances to the next page of values.  If there was an error making
7760// the request the page does not advance and the error is returned.
7761func (page *RestorePointListResultPage) NextWithContext(ctx context.Context) (err error) {
7762	if tracing.IsEnabled() {
7763		ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointListResultPage.NextWithContext")
7764		defer func() {
7765			sc := -1
7766			if page.Response().Response.Response != nil {
7767				sc = page.Response().Response.Response.StatusCode
7768			}
7769			tracing.EndSpan(ctx, sc, err)
7770		}()
7771	}
7772	for {
7773		next, err := page.fn(ctx, page.rplr)
7774		if err != nil {
7775			return err
7776		}
7777		page.rplr = next
7778		if !next.hasNextLink() || !next.IsEmpty() {
7779			break
7780		}
7781	}
7782	return nil
7783}
7784
7785// Next advances to the next page of values.  If there was an error making
7786// the request the page does not advance and the error is returned.
7787// Deprecated: Use NextWithContext() instead.
7788func (page *RestorePointListResultPage) Next() error {
7789	return page.NextWithContext(context.Background())
7790}
7791
7792// NotDone returns true if the page enumeration should be started or is not yet complete.
7793func (page RestorePointListResultPage) NotDone() bool {
7794	return !page.rplr.IsEmpty()
7795}
7796
7797// Response returns the raw server response from the last page request.
7798func (page RestorePointListResultPage) Response() RestorePointListResult {
7799	return page.rplr
7800}
7801
7802// Values returns the slice of values for the current page or nil if there are no values.
7803func (page RestorePointListResultPage) Values() []RestorePoint {
7804	if page.rplr.IsEmpty() {
7805		return nil
7806	}
7807	return *page.rplr.Value
7808}
7809
7810// Creates a new instance of the RestorePointListResultPage type.
7811func NewRestorePointListResultPage(cur RestorePointListResult, getNextPage func(context.Context, RestorePointListResult) (RestorePointListResult, error)) RestorePointListResultPage {
7812	return RestorePointListResultPage{
7813		fn:   getNextPage,
7814		rplr: cur,
7815	}
7816}
7817
7818// RestorePointProperties properties of a database restore point
7819type RestorePointProperties struct {
7820	// RestorePointType - READ-ONLY; The type of restore point. Possible values include: 'CONTINUOUS', 'DISCRETE'
7821	RestorePointType RestorePointType `json:"restorePointType,omitempty"`
7822	// EarliestRestoreDate - READ-ONLY; The earliest time to which this database can be restored
7823	EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"`
7824	// RestorePointCreationDate - READ-ONLY; The time the backup was taken
7825	RestorePointCreationDate *date.Time `json:"restorePointCreationDate,omitempty"`
7826	// RestorePointLabel - READ-ONLY; The label of restore point for backup request by user
7827	RestorePointLabel *string `json:"restorePointLabel,omitempty"`
7828}
7829
7830// BasicSecretBase the base definition of a secret type.
7831type BasicSecretBase interface {
7832	AsSecureString() (*SecureString, bool)
7833	AsSecretBase() (*SecretBase, bool)
7834}
7835
7836// SecretBase the base definition of a secret type.
7837type SecretBase struct {
7838	// Type - Possible values include: 'TypeSecretBase', 'TypeSecureString'
7839	Type TypeBasicSecretBase `json:"type,omitempty"`
7840}
7841
7842func unmarshalBasicSecretBase(body []byte) (BasicSecretBase, error) {
7843	var m map[string]interface{}
7844	err := json.Unmarshal(body, &m)
7845	if err != nil {
7846		return nil, err
7847	}
7848
7849	switch m["type"] {
7850	case string(TypeSecureString):
7851		var ss SecureString
7852		err := json.Unmarshal(body, &ss)
7853		return ss, err
7854	default:
7855		var sb SecretBase
7856		err := json.Unmarshal(body, &sb)
7857		return sb, err
7858	}
7859}
7860func unmarshalBasicSecretBaseArray(body []byte) ([]BasicSecretBase, error) {
7861	var rawMessages []*json.RawMessage
7862	err := json.Unmarshal(body, &rawMessages)
7863	if err != nil {
7864		return nil, err
7865	}
7866
7867	sbArray := make([]BasicSecretBase, len(rawMessages))
7868
7869	for index, rawMessage := range rawMessages {
7870		sb, err := unmarshalBasicSecretBase(*rawMessage)
7871		if err != nil {
7872			return nil, err
7873		}
7874		sbArray[index] = sb
7875	}
7876	return sbArray, nil
7877}
7878
7879// MarshalJSON is the custom marshaler for SecretBase.
7880func (sb SecretBase) MarshalJSON() ([]byte, error) {
7881	sb.Type = TypeSecretBase
7882	objectMap := make(map[string]interface{})
7883	if sb.Type != "" {
7884		objectMap["type"] = sb.Type
7885	}
7886	return json.Marshal(objectMap)
7887}
7888
7889// AsSecureString is the BasicSecretBase implementation for SecretBase.
7890func (sb SecretBase) AsSecureString() (*SecureString, bool) {
7891	return nil, false
7892}
7893
7894// AsSecretBase is the BasicSecretBase implementation for SecretBase.
7895func (sb SecretBase) AsSecretBase() (*SecretBase, bool) {
7896	return &sb, true
7897}
7898
7899// AsBasicSecretBase is the BasicSecretBase implementation for SecretBase.
7900func (sb SecretBase) AsBasicSecretBase() (BasicSecretBase, bool) {
7901	return &sb, true
7902}
7903
7904// SecureString azure Synapse secure string definition. The string value will be masked with asterisks '*'
7905// during Get or List API calls.
7906type SecureString struct {
7907	// Value - Value of secure string.
7908	Value *string `json:"value,omitempty"`
7909	// Type - Possible values include: 'TypeSecretBase', 'TypeSecureString'
7910	Type TypeBasicSecretBase `json:"type,omitempty"`
7911}
7912
7913// MarshalJSON is the custom marshaler for SecureString.
7914func (ss SecureString) MarshalJSON() ([]byte, error) {
7915	ss.Type = TypeSecureString
7916	objectMap := make(map[string]interface{})
7917	if ss.Value != nil {
7918		objectMap["value"] = ss.Value
7919	}
7920	if ss.Type != "" {
7921		objectMap["type"] = ss.Type
7922	}
7923	return json.Marshal(objectMap)
7924}
7925
7926// AsSecureString is the BasicSecretBase implementation for SecureString.
7927func (ss SecureString) AsSecureString() (*SecureString, bool) {
7928	return &ss, true
7929}
7930
7931// AsSecretBase is the BasicSecretBase implementation for SecureString.
7932func (ss SecureString) AsSecretBase() (*SecretBase, bool) {
7933	return nil, false
7934}
7935
7936// AsBasicSecretBase is the BasicSecretBase implementation for SecureString.
7937func (ss SecureString) AsBasicSecretBase() (BasicSecretBase, bool) {
7938	return &ss, true
7939}
7940
7941// SecurityAlertPolicyProperties properties of a security alert policy.
7942type SecurityAlertPolicyProperties struct {
7943	// State - Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific Sql pool. Possible values include: 'SecurityAlertPolicyStateNew', 'SecurityAlertPolicyStateEnabled', 'SecurityAlertPolicyStateDisabled'
7944	State SecurityAlertPolicyState `json:"state,omitempty"`
7945	// DisabledAlerts - Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action
7946	DisabledAlerts *[]string `json:"disabledAlerts,omitempty"`
7947	// EmailAddresses - Specifies an array of e-mail addresses to which the alert is sent.
7948	EmailAddresses *[]string `json:"emailAddresses,omitempty"`
7949	// EmailAccountAdmins - Specifies that the alert is sent to the account administrators.
7950	EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"`
7951	// StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
7952	StorageEndpoint *string `json:"storageEndpoint,omitempty"`
7953	// StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account.
7954	StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`
7955	// RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs.
7956	RetentionDays *int32 `json:"retentionDays,omitempty"`
7957	// CreationTime - READ-ONLY; Specifies the UTC creation time of the policy.
7958	CreationTime *date.Time `json:"creationTime,omitempty"`
7959}
7960
7961// MarshalJSON is the custom marshaler for SecurityAlertPolicyProperties.
7962func (sapp SecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) {
7963	objectMap := make(map[string]interface{})
7964	if sapp.State != "" {
7965		objectMap["state"] = sapp.State
7966	}
7967	if sapp.DisabledAlerts != nil {
7968		objectMap["disabledAlerts"] = sapp.DisabledAlerts
7969	}
7970	if sapp.EmailAddresses != nil {
7971		objectMap["emailAddresses"] = sapp.EmailAddresses
7972	}
7973	if sapp.EmailAccountAdmins != nil {
7974		objectMap["emailAccountAdmins"] = sapp.EmailAccountAdmins
7975	}
7976	if sapp.StorageEndpoint != nil {
7977		objectMap["storageEndpoint"] = sapp.StorageEndpoint
7978	}
7979	if sapp.StorageAccountAccessKey != nil {
7980		objectMap["storageAccountAccessKey"] = sapp.StorageAccountAccessKey
7981	}
7982	if sapp.RetentionDays != nil {
7983		objectMap["retentionDays"] = sapp.RetentionDays
7984	}
7985	return json.Marshal(objectMap)
7986}
7987
7988// SelfHostedIntegrationRuntime self-hosted integration runtime.
7989type SelfHostedIntegrationRuntime struct {
7990	// SelfHostedIntegrationRuntimeTypeProperties - When this property is not null, means this is a linked integration runtime. The property is used to access original integration runtime.
7991	*SelfHostedIntegrationRuntimeTypeProperties `json:"typeProperties,omitempty"`
7992	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
7993	AdditionalProperties map[string]interface{} `json:""`
7994	// Description - Integration runtime description.
7995	Description *string `json:"description,omitempty"`
7996	// Type - Possible values include: 'TypeIntegrationRuntime', 'TypeManaged', 'TypeSelfHosted'
7997	Type Type `json:"type,omitempty"`
7998}
7999
8000// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntime.
8001func (shir SelfHostedIntegrationRuntime) MarshalJSON() ([]byte, error) {
8002	shir.Type = TypeSelfHosted
8003	objectMap := make(map[string]interface{})
8004	if shir.SelfHostedIntegrationRuntimeTypeProperties != nil {
8005		objectMap["typeProperties"] = shir.SelfHostedIntegrationRuntimeTypeProperties
8006	}
8007	if shir.Description != nil {
8008		objectMap["description"] = shir.Description
8009	}
8010	if shir.Type != "" {
8011		objectMap["type"] = shir.Type
8012	}
8013	for k, v := range shir.AdditionalProperties {
8014		objectMap[k] = v
8015	}
8016	return json.Marshal(objectMap)
8017}
8018
8019// AsManagedIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime.
8020func (shir SelfHostedIntegrationRuntime) AsManagedIntegrationRuntime() (*ManagedIntegrationRuntime, bool) {
8021	return nil, false
8022}
8023
8024// AsSelfHostedIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime.
8025func (shir SelfHostedIntegrationRuntime) AsSelfHostedIntegrationRuntime() (*SelfHostedIntegrationRuntime, bool) {
8026	return &shir, true
8027}
8028
8029// AsIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime.
8030func (shir SelfHostedIntegrationRuntime) AsIntegrationRuntime() (*IntegrationRuntime, bool) {
8031	return nil, false
8032}
8033
8034// AsBasicIntegrationRuntime is the BasicIntegrationRuntime implementation for SelfHostedIntegrationRuntime.
8035func (shir SelfHostedIntegrationRuntime) AsBasicIntegrationRuntime() (BasicIntegrationRuntime, bool) {
8036	return &shir, true
8037}
8038
8039// UnmarshalJSON is the custom unmarshaler for SelfHostedIntegrationRuntime struct.
8040func (shir *SelfHostedIntegrationRuntime) UnmarshalJSON(body []byte) error {
8041	var m map[string]*json.RawMessage
8042	err := json.Unmarshal(body, &m)
8043	if err != nil {
8044		return err
8045	}
8046	for k, v := range m {
8047		switch k {
8048		case "typeProperties":
8049			if v != nil {
8050				var selfHostedIntegrationRuntimeTypeProperties SelfHostedIntegrationRuntimeTypeProperties
8051				err = json.Unmarshal(*v, &selfHostedIntegrationRuntimeTypeProperties)
8052				if err != nil {
8053					return err
8054				}
8055				shir.SelfHostedIntegrationRuntimeTypeProperties = &selfHostedIntegrationRuntimeTypeProperties
8056			}
8057		default:
8058			if v != nil {
8059				var additionalProperties interface{}
8060				err = json.Unmarshal(*v, &additionalProperties)
8061				if err != nil {
8062					return err
8063				}
8064				if shir.AdditionalProperties == nil {
8065					shir.AdditionalProperties = make(map[string]interface{})
8066				}
8067				shir.AdditionalProperties[k] = additionalProperties
8068			}
8069		case "description":
8070			if v != nil {
8071				var description string
8072				err = json.Unmarshal(*v, &description)
8073				if err != nil {
8074					return err
8075				}
8076				shir.Description = &description
8077			}
8078		case "type":
8079			if v != nil {
8080				var typeVar Type
8081				err = json.Unmarshal(*v, &typeVar)
8082				if err != nil {
8083					return err
8084				}
8085				shir.Type = typeVar
8086			}
8087		}
8088	}
8089
8090	return nil
8091}
8092
8093// SelfHostedIntegrationRuntimeNode properties of Self-hosted integration runtime node.
8094type SelfHostedIntegrationRuntimeNode struct {
8095	autorest.Response `json:"-"`
8096	// NodeName - READ-ONLY; Name of the integration runtime node.
8097	NodeName *string `json:"nodeName,omitempty"`
8098	// MachineName - READ-ONLY; Machine name of the integration runtime node.
8099	MachineName *string `json:"machineName,omitempty"`
8100	// HostServiceURI - READ-ONLY; URI for the host machine of the integration runtime.
8101	HostServiceURI *string `json:"hostServiceUri,omitempty"`
8102	// Status - READ-ONLY; Status of the integration runtime node. Possible values include: 'SelfHostedIntegrationRuntimeNodeStatusNeedRegistration', 'SelfHostedIntegrationRuntimeNodeStatusOnline', 'SelfHostedIntegrationRuntimeNodeStatusLimited', 'SelfHostedIntegrationRuntimeNodeStatusOffline', 'SelfHostedIntegrationRuntimeNodeStatusUpgrading', 'SelfHostedIntegrationRuntimeNodeStatusInitializing', 'SelfHostedIntegrationRuntimeNodeStatusInitializeFailed'
8103	Status SelfHostedIntegrationRuntimeNodeStatus `json:"status,omitempty"`
8104	// Capabilities - READ-ONLY; The integration runtime capabilities dictionary
8105	Capabilities map[string]*string `json:"capabilities"`
8106	// VersionStatus - READ-ONLY; Status of the integration runtime node version.
8107	VersionStatus *string `json:"versionStatus,omitempty"`
8108	// Version - READ-ONLY; Version of the integration runtime node.
8109	Version *string `json:"version,omitempty"`
8110	// RegisterTime - READ-ONLY; The time at which the integration runtime node was registered in ISO8601 format.
8111	RegisterTime *date.Time `json:"registerTime,omitempty"`
8112	// LastConnectTime - READ-ONLY; The most recent time at which the integration runtime was connected in ISO8601 format.
8113	LastConnectTime *date.Time `json:"lastConnectTime,omitempty"`
8114	// ExpiryTime - READ-ONLY; The time at which the integration runtime will expire in ISO8601 format.
8115	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
8116	// LastStartTime - READ-ONLY; The time the node last started up.
8117	LastStartTime *date.Time `json:"lastStartTime,omitempty"`
8118	// LastStopTime - READ-ONLY; The integration runtime node last stop time.
8119	LastStopTime *date.Time `json:"lastStopTime,omitempty"`
8120	// LastUpdateResult - READ-ONLY; The result of the last integration runtime node update. Possible values include: 'None', 'Succeed', 'Fail'
8121	LastUpdateResult IntegrationRuntimeUpdateResult `json:"lastUpdateResult,omitempty"`
8122	// LastStartUpdateTime - READ-ONLY; The last time for the integration runtime node update start.
8123	LastStartUpdateTime *date.Time `json:"lastStartUpdateTime,omitempty"`
8124	// LastEndUpdateTime - READ-ONLY; The last time for the integration runtime node update end.
8125	LastEndUpdateTime *date.Time `json:"lastEndUpdateTime,omitempty"`
8126	// IsActiveDispatcher - READ-ONLY; Indicates whether this node is the active dispatcher for integration runtime requests.
8127	IsActiveDispatcher *bool `json:"isActiveDispatcher,omitempty"`
8128	// ConcurrentJobsLimit - READ-ONLY; Maximum concurrent jobs on the integration runtime node.
8129	ConcurrentJobsLimit *int32 `json:"concurrentJobsLimit,omitempty"`
8130	// MaxConcurrentJobs - READ-ONLY; The maximum concurrent jobs in this integration runtime.
8131	MaxConcurrentJobs *int32 `json:"maxConcurrentJobs,omitempty"`
8132}
8133
8134// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntimeNode.
8135func (shirn SelfHostedIntegrationRuntimeNode) MarshalJSON() ([]byte, error) {
8136	objectMap := make(map[string]interface{})
8137	return json.Marshal(objectMap)
8138}
8139
8140// SelfHostedIntegrationRuntimeStatus self-hosted integration runtime status.
8141type SelfHostedIntegrationRuntimeStatus struct {
8142	// SelfHostedIntegrationRuntimeStatusTypeProperties - Self-hosted integration runtime status type properties.
8143	*SelfHostedIntegrationRuntimeStatusTypeProperties `json:"typeProperties,omitempty"`
8144	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
8145	AdditionalProperties map[string]interface{} `json:""`
8146	// DataFactoryName - READ-ONLY; The workspace name which the integration runtime belong to.
8147	DataFactoryName *string `json:"dataFactoryName,omitempty"`
8148	// State - READ-ONLY; The state of integration runtime. Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied'
8149	State IntegrationRuntimeState `json:"state,omitempty"`
8150	// Type - Possible values include: 'TypeBasicIntegrationRuntimeStatusTypeIntegrationRuntimeStatus', 'TypeBasicIntegrationRuntimeStatusTypeManaged', 'TypeBasicIntegrationRuntimeStatusTypeSelfHosted'
8151	Type TypeBasicIntegrationRuntimeStatus `json:"type,omitempty"`
8152}
8153
8154// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntimeStatus.
8155func (shirs SelfHostedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) {
8156	shirs.Type = TypeBasicIntegrationRuntimeStatusTypeSelfHosted
8157	objectMap := make(map[string]interface{})
8158	if shirs.SelfHostedIntegrationRuntimeStatusTypeProperties != nil {
8159		objectMap["typeProperties"] = shirs.SelfHostedIntegrationRuntimeStatusTypeProperties
8160	}
8161	if shirs.Type != "" {
8162		objectMap["type"] = shirs.Type
8163	}
8164	for k, v := range shirs.AdditionalProperties {
8165		objectMap[k] = v
8166	}
8167	return json.Marshal(objectMap)
8168}
8169
8170// AsManagedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus.
8171func (shirs SelfHostedIntegrationRuntimeStatus) AsManagedIntegrationRuntimeStatus() (*ManagedIntegrationRuntimeStatus, bool) {
8172	return nil, false
8173}
8174
8175// AsSelfHostedIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus.
8176func (shirs SelfHostedIntegrationRuntimeStatus) AsSelfHostedIntegrationRuntimeStatus() (*SelfHostedIntegrationRuntimeStatus, bool) {
8177	return &shirs, true
8178}
8179
8180// AsIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus.
8181func (shirs SelfHostedIntegrationRuntimeStatus) AsIntegrationRuntimeStatus() (*IntegrationRuntimeStatus, bool) {
8182	return nil, false
8183}
8184
8185// AsBasicIntegrationRuntimeStatus is the BasicIntegrationRuntimeStatus implementation for SelfHostedIntegrationRuntimeStatus.
8186func (shirs SelfHostedIntegrationRuntimeStatus) AsBasicIntegrationRuntimeStatus() (BasicIntegrationRuntimeStatus, bool) {
8187	return &shirs, true
8188}
8189
8190// UnmarshalJSON is the custom unmarshaler for SelfHostedIntegrationRuntimeStatus struct.
8191func (shirs *SelfHostedIntegrationRuntimeStatus) UnmarshalJSON(body []byte) error {
8192	var m map[string]*json.RawMessage
8193	err := json.Unmarshal(body, &m)
8194	if err != nil {
8195		return err
8196	}
8197	for k, v := range m {
8198		switch k {
8199		case "typeProperties":
8200			if v != nil {
8201				var selfHostedIntegrationRuntimeStatusTypeProperties SelfHostedIntegrationRuntimeStatusTypeProperties
8202				err = json.Unmarshal(*v, &selfHostedIntegrationRuntimeStatusTypeProperties)
8203				if err != nil {
8204					return err
8205				}
8206				shirs.SelfHostedIntegrationRuntimeStatusTypeProperties = &selfHostedIntegrationRuntimeStatusTypeProperties
8207			}
8208		default:
8209			if v != nil {
8210				var additionalProperties interface{}
8211				err = json.Unmarshal(*v, &additionalProperties)
8212				if err != nil {
8213					return err
8214				}
8215				if shirs.AdditionalProperties == nil {
8216					shirs.AdditionalProperties = make(map[string]interface{})
8217				}
8218				shirs.AdditionalProperties[k] = additionalProperties
8219			}
8220		case "dataFactoryName":
8221			if v != nil {
8222				var dataFactoryName string
8223				err = json.Unmarshal(*v, &dataFactoryName)
8224				if err != nil {
8225					return err
8226				}
8227				shirs.DataFactoryName = &dataFactoryName
8228			}
8229		case "state":
8230			if v != nil {
8231				var state IntegrationRuntimeState
8232				err = json.Unmarshal(*v, &state)
8233				if err != nil {
8234					return err
8235				}
8236				shirs.State = state
8237			}
8238		case "type":
8239			if v != nil {
8240				var typeVar TypeBasicIntegrationRuntimeStatus
8241				err = json.Unmarshal(*v, &typeVar)
8242				if err != nil {
8243					return err
8244				}
8245				shirs.Type = typeVar
8246			}
8247		}
8248	}
8249
8250	return nil
8251}
8252
8253// SelfHostedIntegrationRuntimeStatusTypeProperties self-hosted integration runtime status type properties.
8254type SelfHostedIntegrationRuntimeStatusTypeProperties struct {
8255	// CreateTime - READ-ONLY; The time at which the integration runtime was created, in ISO8601 format.
8256	CreateTime *date.Time `json:"createTime,omitempty"`
8257	// TaskQueueID - READ-ONLY; The task queue id of the integration runtime.
8258	TaskQueueID *string `json:"taskQueueId,omitempty"`
8259	// NodeCommunicationChannelEncryptionMode - READ-ONLY; The node communication Channel encryption mode
8260	NodeCommunicationChannelEncryptionMode *string `json:"nodeCommunicationChannelEncryptionMode,omitempty"`
8261	// InternalChannelEncryption - READ-ONLY; It is used to set the encryption mode for node-node communication channel (when more than 2 self-hosted integration runtime nodes exist). Possible values include: 'NotSet', 'SslEncrypted', 'NotEncrypted'
8262	InternalChannelEncryption IntegrationRuntimeInternalChannelEncryptionMode `json:"internalChannelEncryption,omitempty"`
8263	// Version - READ-ONLY; Version of the integration runtime.
8264	Version *string `json:"version,omitempty"`
8265	// Nodes - The list of nodes for this integration runtime.
8266	Nodes *[]SelfHostedIntegrationRuntimeNode `json:"nodes,omitempty"`
8267	// ScheduledUpdateDate - READ-ONLY; The date at which the integration runtime will be scheduled to update, in ISO8601 format.
8268	ScheduledUpdateDate *date.Time `json:"scheduledUpdateDate,omitempty"`
8269	// UpdateDelayOffset - READ-ONLY; The time in the date scheduled by service to update the integration runtime, e.g., PT03H is 3 hours
8270	UpdateDelayOffset *string `json:"updateDelayOffset,omitempty"`
8271	// LocalTimeZoneOffset - READ-ONLY; The local time zone offset in hours.
8272	LocalTimeZoneOffset *string `json:"localTimeZoneOffset,omitempty"`
8273	// Capabilities - READ-ONLY; Object with additional information about integration runtime capabilities.
8274	Capabilities map[string]*string `json:"capabilities"`
8275	// ServiceUrls - READ-ONLY; The URLs for the services used in integration runtime backend service.
8276	ServiceUrls *[]string `json:"serviceUrls,omitempty"`
8277	// AutoUpdate - READ-ONLY; Whether Self-hosted integration runtime auto update has been turned on. Possible values include: 'On', 'Off'
8278	AutoUpdate IntegrationRuntimeAutoUpdate `json:"autoUpdate,omitempty"`
8279	// VersionStatus - READ-ONLY; Status of the integration runtime version.
8280	VersionStatus *string `json:"versionStatus,omitempty"`
8281	// Links - The list of linked integration runtimes that are created to share with this integration runtime.
8282	Links *[]LinkedIntegrationRuntime `json:"links,omitempty"`
8283	// PushedVersion - READ-ONLY; The version that the integration runtime is going to update to.
8284	PushedVersion *string `json:"pushedVersion,omitempty"`
8285	// LatestVersion - READ-ONLY; The latest version on download center.
8286	LatestVersion *string `json:"latestVersion,omitempty"`
8287	// AutoUpdateETA - READ-ONLY; The estimated time when the self-hosted integration runtime will be updated.
8288	AutoUpdateETA *date.Time `json:"autoUpdateETA,omitempty"`
8289}
8290
8291// MarshalJSON is the custom marshaler for SelfHostedIntegrationRuntimeStatusTypeProperties.
8292func (shirstp SelfHostedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, error) {
8293	objectMap := make(map[string]interface{})
8294	if shirstp.Nodes != nil {
8295		objectMap["nodes"] = shirstp.Nodes
8296	}
8297	if shirstp.Links != nil {
8298		objectMap["links"] = shirstp.Links
8299	}
8300	return json.Marshal(objectMap)
8301}
8302
8303// SelfHostedIntegrationRuntimeTypeProperties the self-hosted integration runtime properties.
8304type SelfHostedIntegrationRuntimeTypeProperties struct {
8305	// LinkedInfo - Linked integration runtime type from data factory
8306	LinkedInfo BasicLinkedIntegrationRuntimeType `json:"linkedInfo,omitempty"`
8307}
8308
8309// UnmarshalJSON is the custom unmarshaler for SelfHostedIntegrationRuntimeTypeProperties struct.
8310func (shirtp *SelfHostedIntegrationRuntimeTypeProperties) UnmarshalJSON(body []byte) error {
8311	var m map[string]*json.RawMessage
8312	err := json.Unmarshal(body, &m)
8313	if err != nil {
8314		return err
8315	}
8316	for k, v := range m {
8317		switch k {
8318		case "linkedInfo":
8319			if v != nil {
8320				linkedInfo, err := unmarshalBasicLinkedIntegrationRuntimeType(*v)
8321				if err != nil {
8322					return err
8323				}
8324				shirtp.LinkedInfo = linkedInfo
8325			}
8326		}
8327	}
8328
8329	return nil
8330}
8331
8332// SensitivityLabel a sensitivity label.
8333type SensitivityLabel struct {
8334	autorest.Response `json:"-"`
8335	// SensitivityLabelProperties - Resource properties.
8336	*SensitivityLabelProperties `json:"properties,omitempty"`
8337	// ManagedBy - READ-ONLY; managed by
8338	ManagedBy *string `json:"managedBy,omitempty"`
8339	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
8340	ID *string `json:"id,omitempty"`
8341	// Name - READ-ONLY; The name of the resource
8342	Name *string `json:"name,omitempty"`
8343	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
8344	Type *string `json:"type,omitempty"`
8345}
8346
8347// MarshalJSON is the custom marshaler for SensitivityLabel.
8348func (sl SensitivityLabel) MarshalJSON() ([]byte, error) {
8349	objectMap := make(map[string]interface{})
8350	if sl.SensitivityLabelProperties != nil {
8351		objectMap["properties"] = sl.SensitivityLabelProperties
8352	}
8353	return json.Marshal(objectMap)
8354}
8355
8356// UnmarshalJSON is the custom unmarshaler for SensitivityLabel struct.
8357func (sl *SensitivityLabel) UnmarshalJSON(body []byte) error {
8358	var m map[string]*json.RawMessage
8359	err := json.Unmarshal(body, &m)
8360	if err != nil {
8361		return err
8362	}
8363	for k, v := range m {
8364		switch k {
8365		case "properties":
8366			if v != nil {
8367				var sensitivityLabelProperties SensitivityLabelProperties
8368				err = json.Unmarshal(*v, &sensitivityLabelProperties)
8369				if err != nil {
8370					return err
8371				}
8372				sl.SensitivityLabelProperties = &sensitivityLabelProperties
8373			}
8374		case "managedBy":
8375			if v != nil {
8376				var managedBy string
8377				err = json.Unmarshal(*v, &managedBy)
8378				if err != nil {
8379					return err
8380				}
8381				sl.ManagedBy = &managedBy
8382			}
8383		case "id":
8384			if v != nil {
8385				var ID string
8386				err = json.Unmarshal(*v, &ID)
8387				if err != nil {
8388					return err
8389				}
8390				sl.ID = &ID
8391			}
8392		case "name":
8393			if v != nil {
8394				var name string
8395				err = json.Unmarshal(*v, &name)
8396				if err != nil {
8397					return err
8398				}
8399				sl.Name = &name
8400			}
8401		case "type":
8402			if v != nil {
8403				var typeVar string
8404				err = json.Unmarshal(*v, &typeVar)
8405				if err != nil {
8406					return err
8407				}
8408				sl.Type = &typeVar
8409			}
8410		}
8411	}
8412
8413	return nil
8414}
8415
8416// SensitivityLabelListResult a list of sensitivity labels.
8417type SensitivityLabelListResult struct {
8418	autorest.Response `json:"-"`
8419	// Value - READ-ONLY; Array of results.
8420	Value *[]SensitivityLabel `json:"value,omitempty"`
8421	// NextLink - READ-ONLY; Link to retrieve next page of results.
8422	NextLink *string `json:"nextLink,omitempty"`
8423}
8424
8425// SensitivityLabelListResultIterator provides access to a complete listing of SensitivityLabel values.
8426type SensitivityLabelListResultIterator struct {
8427	i    int
8428	page SensitivityLabelListResultPage
8429}
8430
8431// NextWithContext advances to the next value.  If there was an error making
8432// the request the iterator does not advance and the error is returned.
8433func (iter *SensitivityLabelListResultIterator) NextWithContext(ctx context.Context) (err error) {
8434	if tracing.IsEnabled() {
8435		ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelListResultIterator.NextWithContext")
8436		defer func() {
8437			sc := -1
8438			if iter.Response().Response.Response != nil {
8439				sc = iter.Response().Response.Response.StatusCode
8440			}
8441			tracing.EndSpan(ctx, sc, err)
8442		}()
8443	}
8444	iter.i++
8445	if iter.i < len(iter.page.Values()) {
8446		return nil
8447	}
8448	err = iter.page.NextWithContext(ctx)
8449	if err != nil {
8450		iter.i--
8451		return err
8452	}
8453	iter.i = 0
8454	return nil
8455}
8456
8457// Next advances to the next value.  If there was an error making
8458// the request the iterator does not advance and the error is returned.
8459// Deprecated: Use NextWithContext() instead.
8460func (iter *SensitivityLabelListResultIterator) Next() error {
8461	return iter.NextWithContext(context.Background())
8462}
8463
8464// NotDone returns true if the enumeration should be started or is not yet complete.
8465func (iter SensitivityLabelListResultIterator) NotDone() bool {
8466	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8467}
8468
8469// Response returns the raw server response from the last page request.
8470func (iter SensitivityLabelListResultIterator) Response() SensitivityLabelListResult {
8471	return iter.page.Response()
8472}
8473
8474// Value returns the current value or a zero-initialized value if the
8475// iterator has advanced beyond the end of the collection.
8476func (iter SensitivityLabelListResultIterator) Value() SensitivityLabel {
8477	if !iter.page.NotDone() {
8478		return SensitivityLabel{}
8479	}
8480	return iter.page.Values()[iter.i]
8481}
8482
8483// Creates a new instance of the SensitivityLabelListResultIterator type.
8484func NewSensitivityLabelListResultIterator(page SensitivityLabelListResultPage) SensitivityLabelListResultIterator {
8485	return SensitivityLabelListResultIterator{page: page}
8486}
8487
8488// IsEmpty returns true if the ListResult contains no values.
8489func (sllr SensitivityLabelListResult) IsEmpty() bool {
8490	return sllr.Value == nil || len(*sllr.Value) == 0
8491}
8492
8493// hasNextLink returns true if the NextLink is not empty.
8494func (sllr SensitivityLabelListResult) hasNextLink() bool {
8495	return sllr.NextLink != nil && len(*sllr.NextLink) != 0
8496}
8497
8498// sensitivityLabelListResultPreparer prepares a request to retrieve the next set of results.
8499// It returns nil if no more results exist.
8500func (sllr SensitivityLabelListResult) sensitivityLabelListResultPreparer(ctx context.Context) (*http.Request, error) {
8501	if !sllr.hasNextLink() {
8502		return nil, nil
8503	}
8504	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8505		autorest.AsJSON(),
8506		autorest.AsGet(),
8507		autorest.WithBaseURL(to.String(sllr.NextLink)))
8508}
8509
8510// SensitivityLabelListResultPage contains a page of SensitivityLabel values.
8511type SensitivityLabelListResultPage struct {
8512	fn   func(context.Context, SensitivityLabelListResult) (SensitivityLabelListResult, error)
8513	sllr SensitivityLabelListResult
8514}
8515
8516// NextWithContext advances to the next page of values.  If there was an error making
8517// the request the page does not advance and the error is returned.
8518func (page *SensitivityLabelListResultPage) NextWithContext(ctx context.Context) (err error) {
8519	if tracing.IsEnabled() {
8520		ctx = tracing.StartSpan(ctx, fqdn+"/SensitivityLabelListResultPage.NextWithContext")
8521		defer func() {
8522			sc := -1
8523			if page.Response().Response.Response != nil {
8524				sc = page.Response().Response.Response.StatusCode
8525			}
8526			tracing.EndSpan(ctx, sc, err)
8527		}()
8528	}
8529	for {
8530		next, err := page.fn(ctx, page.sllr)
8531		if err != nil {
8532			return err
8533		}
8534		page.sllr = next
8535		if !next.hasNextLink() || !next.IsEmpty() {
8536			break
8537		}
8538	}
8539	return nil
8540}
8541
8542// Next advances to the next page of values.  If there was an error making
8543// the request the page does not advance and the error is returned.
8544// Deprecated: Use NextWithContext() instead.
8545func (page *SensitivityLabelListResultPage) Next() error {
8546	return page.NextWithContext(context.Background())
8547}
8548
8549// NotDone returns true if the page enumeration should be started or is not yet complete.
8550func (page SensitivityLabelListResultPage) NotDone() bool {
8551	return !page.sllr.IsEmpty()
8552}
8553
8554// Response returns the raw server response from the last page request.
8555func (page SensitivityLabelListResultPage) Response() SensitivityLabelListResult {
8556	return page.sllr
8557}
8558
8559// Values returns the slice of values for the current page or nil if there are no values.
8560func (page SensitivityLabelListResultPage) Values() []SensitivityLabel {
8561	if page.sllr.IsEmpty() {
8562		return nil
8563	}
8564	return *page.sllr.Value
8565}
8566
8567// Creates a new instance of the SensitivityLabelListResultPage type.
8568func NewSensitivityLabelListResultPage(cur SensitivityLabelListResult, getNextPage func(context.Context, SensitivityLabelListResult) (SensitivityLabelListResult, error)) SensitivityLabelListResultPage {
8569	return SensitivityLabelListResultPage{
8570		fn:   getNextPage,
8571		sllr: cur,
8572	}
8573}
8574
8575// SensitivityLabelProperties properties of a sensitivity label.
8576type SensitivityLabelProperties struct {
8577	// SchemaName - READ-ONLY; The schema name.
8578	SchemaName *string `json:"schemaName,omitempty"`
8579	// TableName - READ-ONLY; The table name.
8580	TableName *string `json:"tableName,omitempty"`
8581	// ColumnName - READ-ONLY; The column name.
8582	ColumnName *string `json:"columnName,omitempty"`
8583	// LabelName - The label name.
8584	LabelName *string `json:"labelName,omitempty"`
8585	// LabelID - The label ID.
8586	LabelID *string `json:"labelId,omitempty"`
8587	// InformationType - The information type.
8588	InformationType *string `json:"informationType,omitempty"`
8589	// InformationTypeID - The information type ID.
8590	InformationTypeID *string `json:"informationTypeId,omitempty"`
8591	// IsDisabled - READ-ONLY; Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.
8592	IsDisabled *bool `json:"isDisabled,omitempty"`
8593	// Rank - Possible values include: 'SensitivityLabelRankNone', 'SensitivityLabelRankLow', 'SensitivityLabelRankMedium', 'SensitivityLabelRankHigh', 'SensitivityLabelRankCritical'
8594	Rank SensitivityLabelRank `json:"rank,omitempty"`
8595}
8596
8597// MarshalJSON is the custom marshaler for SensitivityLabelProperties.
8598func (slp SensitivityLabelProperties) MarshalJSON() ([]byte, error) {
8599	objectMap := make(map[string]interface{})
8600	if slp.LabelName != nil {
8601		objectMap["labelName"] = slp.LabelName
8602	}
8603	if slp.LabelID != nil {
8604		objectMap["labelId"] = slp.LabelID
8605	}
8606	if slp.InformationType != nil {
8607		objectMap["informationType"] = slp.InformationType
8608	}
8609	if slp.InformationTypeID != nil {
8610		objectMap["informationTypeId"] = slp.InformationTypeID
8611	}
8612	if slp.Rank != "" {
8613		objectMap["rank"] = slp.Rank
8614	}
8615	return json.Marshal(objectMap)
8616}
8617
8618// SensitivityLabelUpdate a sensitivity label update operation.
8619type SensitivityLabelUpdate struct {
8620	// SensitivityLabelUpdateProperties - Resource properties.
8621	*SensitivityLabelUpdateProperties `json:"properties,omitempty"`
8622	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
8623	ID *string `json:"id,omitempty"`
8624	// Name - READ-ONLY; The name of the resource
8625	Name *string `json:"name,omitempty"`
8626	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
8627	Type *string `json:"type,omitempty"`
8628}
8629
8630// MarshalJSON is the custom marshaler for SensitivityLabelUpdate.
8631func (slu SensitivityLabelUpdate) MarshalJSON() ([]byte, error) {
8632	objectMap := make(map[string]interface{})
8633	if slu.SensitivityLabelUpdateProperties != nil {
8634		objectMap["properties"] = slu.SensitivityLabelUpdateProperties
8635	}
8636	return json.Marshal(objectMap)
8637}
8638
8639// UnmarshalJSON is the custom unmarshaler for SensitivityLabelUpdate struct.
8640func (slu *SensitivityLabelUpdate) UnmarshalJSON(body []byte) error {
8641	var m map[string]*json.RawMessage
8642	err := json.Unmarshal(body, &m)
8643	if err != nil {
8644		return err
8645	}
8646	for k, v := range m {
8647		switch k {
8648		case "properties":
8649			if v != nil {
8650				var sensitivityLabelUpdateProperties SensitivityLabelUpdateProperties
8651				err = json.Unmarshal(*v, &sensitivityLabelUpdateProperties)
8652				if err != nil {
8653					return err
8654				}
8655				slu.SensitivityLabelUpdateProperties = &sensitivityLabelUpdateProperties
8656			}
8657		case "id":
8658			if v != nil {
8659				var ID string
8660				err = json.Unmarshal(*v, &ID)
8661				if err != nil {
8662					return err
8663				}
8664				slu.ID = &ID
8665			}
8666		case "name":
8667			if v != nil {
8668				var name string
8669				err = json.Unmarshal(*v, &name)
8670				if err != nil {
8671					return err
8672				}
8673				slu.Name = &name
8674			}
8675		case "type":
8676			if v != nil {
8677				var typeVar string
8678				err = json.Unmarshal(*v, &typeVar)
8679				if err != nil {
8680					return err
8681				}
8682				slu.Type = &typeVar
8683			}
8684		}
8685	}
8686
8687	return nil
8688}
8689
8690// SensitivityLabelUpdateList a list of sensitivity label update operations.
8691type SensitivityLabelUpdateList struct {
8692	Operations *[]SensitivityLabelUpdate `json:"operations,omitempty"`
8693}
8694
8695// SensitivityLabelUpdateProperties properties of an operation executed on a sensitivity label.
8696type SensitivityLabelUpdateProperties struct {
8697	// Op - Possible values include: 'Set', 'Remove'
8698	Op SensitivityLabelUpdateKind `json:"op,omitempty"`
8699	// Schema - Schema name of the column to update.
8700	Schema *string `json:"schema,omitempty"`
8701	// Table - Table name of the column to update.
8702	Table *string `json:"table,omitempty"`
8703	// Column - Column name to update.
8704	Column *string `json:"column,omitempty"`
8705	// SensitivityLabel - The sensitivity label information to apply on a column.
8706	SensitivityLabel *SensitivityLabel `json:"sensitivityLabel,omitempty"`
8707}
8708
8709// ServerBlobAuditingPolicy a server blob auditing policy.
8710type ServerBlobAuditingPolicy struct {
8711	autorest.Response `json:"-"`
8712	// ServerBlobAuditingPolicyProperties - Resource properties.
8713	*ServerBlobAuditingPolicyProperties `json:"properties,omitempty"`
8714	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
8715	ID *string `json:"id,omitempty"`
8716	// Name - READ-ONLY; The name of the resource
8717	Name *string `json:"name,omitempty"`
8718	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
8719	Type *string `json:"type,omitempty"`
8720}
8721
8722// MarshalJSON is the custom marshaler for ServerBlobAuditingPolicy.
8723func (sbap ServerBlobAuditingPolicy) MarshalJSON() ([]byte, error) {
8724	objectMap := make(map[string]interface{})
8725	if sbap.ServerBlobAuditingPolicyProperties != nil {
8726		objectMap["properties"] = sbap.ServerBlobAuditingPolicyProperties
8727	}
8728	return json.Marshal(objectMap)
8729}
8730
8731// UnmarshalJSON is the custom unmarshaler for ServerBlobAuditingPolicy struct.
8732func (sbap *ServerBlobAuditingPolicy) UnmarshalJSON(body []byte) error {
8733	var m map[string]*json.RawMessage
8734	err := json.Unmarshal(body, &m)
8735	if err != nil {
8736		return err
8737	}
8738	for k, v := range m {
8739		switch k {
8740		case "properties":
8741			if v != nil {
8742				var serverBlobAuditingPolicyProperties ServerBlobAuditingPolicyProperties
8743				err = json.Unmarshal(*v, &serverBlobAuditingPolicyProperties)
8744				if err != nil {
8745					return err
8746				}
8747				sbap.ServerBlobAuditingPolicyProperties = &serverBlobAuditingPolicyProperties
8748			}
8749		case "id":
8750			if v != nil {
8751				var ID string
8752				err = json.Unmarshal(*v, &ID)
8753				if err != nil {
8754					return err
8755				}
8756				sbap.ID = &ID
8757			}
8758		case "name":
8759			if v != nil {
8760				var name string
8761				err = json.Unmarshal(*v, &name)
8762				if err != nil {
8763					return err
8764				}
8765				sbap.Name = &name
8766			}
8767		case "type":
8768			if v != nil {
8769				var typeVar string
8770				err = json.Unmarshal(*v, &typeVar)
8771				if err != nil {
8772					return err
8773				}
8774				sbap.Type = &typeVar
8775			}
8776		}
8777	}
8778
8779	return nil
8780}
8781
8782// ServerBlobAuditingPolicyListResult a list of server auditing settings.
8783type ServerBlobAuditingPolicyListResult struct {
8784	autorest.Response `json:"-"`
8785	// Value - READ-ONLY; Array of results.
8786	Value *[]ServerBlobAuditingPolicy `json:"value,omitempty"`
8787	// NextLink - READ-ONLY; Link to retrieve next page of results.
8788	NextLink *string `json:"nextLink,omitempty"`
8789}
8790
8791// ServerBlobAuditingPolicyListResultIterator provides access to a complete listing of
8792// ServerBlobAuditingPolicy values.
8793type ServerBlobAuditingPolicyListResultIterator struct {
8794	i    int
8795	page ServerBlobAuditingPolicyListResultPage
8796}
8797
8798// NextWithContext advances to the next value.  If there was an error making
8799// the request the iterator does not advance and the error is returned.
8800func (iter *ServerBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
8801	if tracing.IsEnabled() {
8802		ctx = tracing.StartSpan(ctx, fqdn+"/ServerBlobAuditingPolicyListResultIterator.NextWithContext")
8803		defer func() {
8804			sc := -1
8805			if iter.Response().Response.Response != nil {
8806				sc = iter.Response().Response.Response.StatusCode
8807			}
8808			tracing.EndSpan(ctx, sc, err)
8809		}()
8810	}
8811	iter.i++
8812	if iter.i < len(iter.page.Values()) {
8813		return nil
8814	}
8815	err = iter.page.NextWithContext(ctx)
8816	if err != nil {
8817		iter.i--
8818		return err
8819	}
8820	iter.i = 0
8821	return nil
8822}
8823
8824// Next advances to the next value.  If there was an error making
8825// the request the iterator does not advance and the error is returned.
8826// Deprecated: Use NextWithContext() instead.
8827func (iter *ServerBlobAuditingPolicyListResultIterator) Next() error {
8828	return iter.NextWithContext(context.Background())
8829}
8830
8831// NotDone returns true if the enumeration should be started or is not yet complete.
8832func (iter ServerBlobAuditingPolicyListResultIterator) NotDone() bool {
8833	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8834}
8835
8836// Response returns the raw server response from the last page request.
8837func (iter ServerBlobAuditingPolicyListResultIterator) Response() ServerBlobAuditingPolicyListResult {
8838	return iter.page.Response()
8839}
8840
8841// Value returns the current value or a zero-initialized value if the
8842// iterator has advanced beyond the end of the collection.
8843func (iter ServerBlobAuditingPolicyListResultIterator) Value() ServerBlobAuditingPolicy {
8844	if !iter.page.NotDone() {
8845		return ServerBlobAuditingPolicy{}
8846	}
8847	return iter.page.Values()[iter.i]
8848}
8849
8850// Creates a new instance of the ServerBlobAuditingPolicyListResultIterator type.
8851func NewServerBlobAuditingPolicyListResultIterator(page ServerBlobAuditingPolicyListResultPage) ServerBlobAuditingPolicyListResultIterator {
8852	return ServerBlobAuditingPolicyListResultIterator{page: page}
8853}
8854
8855// IsEmpty returns true if the ListResult contains no values.
8856func (sbaplr ServerBlobAuditingPolicyListResult) IsEmpty() bool {
8857	return sbaplr.Value == nil || len(*sbaplr.Value) == 0
8858}
8859
8860// hasNextLink returns true if the NextLink is not empty.
8861func (sbaplr ServerBlobAuditingPolicyListResult) hasNextLink() bool {
8862	return sbaplr.NextLink != nil && len(*sbaplr.NextLink) != 0
8863}
8864
8865// serverBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results.
8866// It returns nil if no more results exist.
8867func (sbaplr ServerBlobAuditingPolicyListResult) serverBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
8868	if !sbaplr.hasNextLink() {
8869		return nil, nil
8870	}
8871	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8872		autorest.AsJSON(),
8873		autorest.AsGet(),
8874		autorest.WithBaseURL(to.String(sbaplr.NextLink)))
8875}
8876
8877// ServerBlobAuditingPolicyListResultPage contains a page of ServerBlobAuditingPolicy values.
8878type ServerBlobAuditingPolicyListResultPage struct {
8879	fn     func(context.Context, ServerBlobAuditingPolicyListResult) (ServerBlobAuditingPolicyListResult, error)
8880	sbaplr ServerBlobAuditingPolicyListResult
8881}
8882
8883// NextWithContext advances to the next page of values.  If there was an error making
8884// the request the page does not advance and the error is returned.
8885func (page *ServerBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
8886	if tracing.IsEnabled() {
8887		ctx = tracing.StartSpan(ctx, fqdn+"/ServerBlobAuditingPolicyListResultPage.NextWithContext")
8888		defer func() {
8889			sc := -1
8890			if page.Response().Response.Response != nil {
8891				sc = page.Response().Response.Response.StatusCode
8892			}
8893			tracing.EndSpan(ctx, sc, err)
8894		}()
8895	}
8896	for {
8897		next, err := page.fn(ctx, page.sbaplr)
8898		if err != nil {
8899			return err
8900		}
8901		page.sbaplr = next
8902		if !next.hasNextLink() || !next.IsEmpty() {
8903			break
8904		}
8905	}
8906	return nil
8907}
8908
8909// Next advances to the next page of values.  If there was an error making
8910// the request the page does not advance and the error is returned.
8911// Deprecated: Use NextWithContext() instead.
8912func (page *ServerBlobAuditingPolicyListResultPage) Next() error {
8913	return page.NextWithContext(context.Background())
8914}
8915
8916// NotDone returns true if the page enumeration should be started or is not yet complete.
8917func (page ServerBlobAuditingPolicyListResultPage) NotDone() bool {
8918	return !page.sbaplr.IsEmpty()
8919}
8920
8921// Response returns the raw server response from the last page request.
8922func (page ServerBlobAuditingPolicyListResultPage) Response() ServerBlobAuditingPolicyListResult {
8923	return page.sbaplr
8924}
8925
8926// Values returns the slice of values for the current page or nil if there are no values.
8927func (page ServerBlobAuditingPolicyListResultPage) Values() []ServerBlobAuditingPolicy {
8928	if page.sbaplr.IsEmpty() {
8929		return nil
8930	}
8931	return *page.sbaplr.Value
8932}
8933
8934// Creates a new instance of the ServerBlobAuditingPolicyListResultPage type.
8935func NewServerBlobAuditingPolicyListResultPage(cur ServerBlobAuditingPolicyListResult, getNextPage func(context.Context, ServerBlobAuditingPolicyListResult) (ServerBlobAuditingPolicyListResult, error)) ServerBlobAuditingPolicyListResultPage {
8936	return ServerBlobAuditingPolicyListResultPage{
8937		fn:     getNextPage,
8938		sbaplr: cur,
8939	}
8940}
8941
8942// ServerBlobAuditingPolicyProperties properties of a server blob auditing policy.
8943type ServerBlobAuditingPolicyProperties struct {
8944	// State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled'
8945	State BlobAuditingPolicyState `json:"state,omitempty"`
8946	// StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
8947	StorageEndpoint *string `json:"storageEndpoint,omitempty"`
8948	// StorageAccountAccessKey - Specifies the identifier key of the auditing storage account.
8949	// If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
8950	// Prerequisites for using managed identity authentication:
8951	// 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
8952	// 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
8953	// For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)
8954	StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`
8955	// RetentionDays - Specifies the number of days to keep in the audit logs in the storage account.
8956	RetentionDays *int32 `json:"retentionDays,omitempty"`
8957	// AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit.
8958	//
8959	// The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:
8960	//
8961	// BATCH_COMPLETED_GROUP,
8962	// SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,
8963	// FAILED_DATABASE_AUTHENTICATION_GROUP.
8964	//
8965	// This above combination is also the set that is configured by default when enabling auditing from the Azure portal.
8966	//
8967	// The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):
8968	//
8969	// APPLICATION_ROLE_CHANGE_PASSWORD_GROUP
8970	// BACKUP_RESTORE_GROUP
8971	// DATABASE_LOGOUT_GROUP
8972	// DATABASE_OBJECT_CHANGE_GROUP
8973	// DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP
8974	// DATABASE_OBJECT_PERMISSION_CHANGE_GROUP
8975	// DATABASE_OPERATION_GROUP
8976	// DATABASE_PERMISSION_CHANGE_GROUP
8977	// DATABASE_PRINCIPAL_CHANGE_GROUP
8978	// DATABASE_PRINCIPAL_IMPERSONATION_GROUP
8979	// DATABASE_ROLE_MEMBER_CHANGE_GROUP
8980	// FAILED_DATABASE_AUTHENTICATION_GROUP
8981	// SCHEMA_OBJECT_ACCESS_GROUP
8982	// SCHEMA_OBJECT_CHANGE_GROUP
8983	// SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP
8984	// SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP
8985	// SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP
8986	// USER_CHANGE_PASSWORD_GROUP
8987	// BATCH_STARTED_GROUP
8988	// BATCH_COMPLETED_GROUP
8989	//
8990	// These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.
8991	//
8992	// For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).
8993	//
8994	// For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:
8995	// SELECT
8996	// UPDATE
8997	// INSERT
8998	// DELETE
8999	// EXECUTE
9000	// RECEIVE
9001	// REFERENCES
9002	//
9003	// The general form for defining an action to be audited is:
9004	// {action} ON {object} BY {principal}
9005	//
9006	// Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.
9007	//
9008	// For example:
9009	// SELECT on dbo.myTable by public
9010	// SELECT on DATABASE::myDatabase by public
9011	// SELECT on SCHEMA::mySchema by public
9012	//
9013	// For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)
9014	AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"`
9015	// StorageAccountSubscriptionID - Specifies the blob storage subscription Id.
9016	StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"`
9017	// IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key.
9018	IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"`
9019	// IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor.
9020	// In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true.
9021	//
9022	// When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.
9023	// Note that for server level audit you should use the 'master' database as {databaseName}.
9024	//
9025	// Diagnostic Settings URI format:
9026	// PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview
9027	//
9028	// For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)
9029	// or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
9030	IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"`
9031	// QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
9032	// The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
9033	QueueDelayMs *int32 `json:"queueDelayMs,omitempty"`
9034}
9035
9036// ServerSecurityAlertPolicy workspace managed Sql server security alert policy.
9037type ServerSecurityAlertPolicy struct {
9038	autorest.Response `json:"-"`
9039	// ServerSecurityAlertPolicyProperties - Resource properties.
9040	*ServerSecurityAlertPolicyProperties `json:"properties,omitempty"`
9041	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
9042	ID *string `json:"id,omitempty"`
9043	// Name - READ-ONLY; The name of the resource
9044	Name *string `json:"name,omitempty"`
9045	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
9046	Type *string `json:"type,omitempty"`
9047}
9048
9049// MarshalJSON is the custom marshaler for ServerSecurityAlertPolicy.
9050func (ssap ServerSecurityAlertPolicy) MarshalJSON() ([]byte, error) {
9051	objectMap := make(map[string]interface{})
9052	if ssap.ServerSecurityAlertPolicyProperties != nil {
9053		objectMap["properties"] = ssap.ServerSecurityAlertPolicyProperties
9054	}
9055	return json.Marshal(objectMap)
9056}
9057
9058// UnmarshalJSON is the custom unmarshaler for ServerSecurityAlertPolicy struct.
9059func (ssap *ServerSecurityAlertPolicy) UnmarshalJSON(body []byte) error {
9060	var m map[string]*json.RawMessage
9061	err := json.Unmarshal(body, &m)
9062	if err != nil {
9063		return err
9064	}
9065	for k, v := range m {
9066		switch k {
9067		case "properties":
9068			if v != nil {
9069				var serverSecurityAlertPolicyProperties ServerSecurityAlertPolicyProperties
9070				err = json.Unmarshal(*v, &serverSecurityAlertPolicyProperties)
9071				if err != nil {
9072					return err
9073				}
9074				ssap.ServerSecurityAlertPolicyProperties = &serverSecurityAlertPolicyProperties
9075			}
9076		case "id":
9077			if v != nil {
9078				var ID string
9079				err = json.Unmarshal(*v, &ID)
9080				if err != nil {
9081					return err
9082				}
9083				ssap.ID = &ID
9084			}
9085		case "name":
9086			if v != nil {
9087				var name string
9088				err = json.Unmarshal(*v, &name)
9089				if err != nil {
9090					return err
9091				}
9092				ssap.Name = &name
9093			}
9094		case "type":
9095			if v != nil {
9096				var typeVar string
9097				err = json.Unmarshal(*v, &typeVar)
9098				if err != nil {
9099					return err
9100				}
9101				ssap.Type = &typeVar
9102			}
9103		}
9104	}
9105
9106	return nil
9107}
9108
9109// ServerSecurityAlertPolicyListResult a list of the workspace managed sql server's security alert
9110// policies.
9111type ServerSecurityAlertPolicyListResult struct {
9112	autorest.Response `json:"-"`
9113	// Value - READ-ONLY; Array of results.
9114	Value *[]ServerSecurityAlertPolicy `json:"value,omitempty"`
9115	// NextLink - READ-ONLY; Link to retrieve next page of results.
9116	NextLink *string `json:"nextLink,omitempty"`
9117}
9118
9119// ServerSecurityAlertPolicyListResultIterator provides access to a complete listing of
9120// ServerSecurityAlertPolicy values.
9121type ServerSecurityAlertPolicyListResultIterator struct {
9122	i    int
9123	page ServerSecurityAlertPolicyListResultPage
9124}
9125
9126// NextWithContext advances to the next value.  If there was an error making
9127// the request the iterator does not advance and the error is returned.
9128func (iter *ServerSecurityAlertPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
9129	if tracing.IsEnabled() {
9130		ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPolicyListResultIterator.NextWithContext")
9131		defer func() {
9132			sc := -1
9133			if iter.Response().Response.Response != nil {
9134				sc = iter.Response().Response.Response.StatusCode
9135			}
9136			tracing.EndSpan(ctx, sc, err)
9137		}()
9138	}
9139	iter.i++
9140	if iter.i < len(iter.page.Values()) {
9141		return nil
9142	}
9143	err = iter.page.NextWithContext(ctx)
9144	if err != nil {
9145		iter.i--
9146		return err
9147	}
9148	iter.i = 0
9149	return nil
9150}
9151
9152// Next advances to the next value.  If there was an error making
9153// the request the iterator does not advance and the error is returned.
9154// Deprecated: Use NextWithContext() instead.
9155func (iter *ServerSecurityAlertPolicyListResultIterator) Next() error {
9156	return iter.NextWithContext(context.Background())
9157}
9158
9159// NotDone returns true if the enumeration should be started or is not yet complete.
9160func (iter ServerSecurityAlertPolicyListResultIterator) NotDone() bool {
9161	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9162}
9163
9164// Response returns the raw server response from the last page request.
9165func (iter ServerSecurityAlertPolicyListResultIterator) Response() ServerSecurityAlertPolicyListResult {
9166	return iter.page.Response()
9167}
9168
9169// Value returns the current value or a zero-initialized value if the
9170// iterator has advanced beyond the end of the collection.
9171func (iter ServerSecurityAlertPolicyListResultIterator) Value() ServerSecurityAlertPolicy {
9172	if !iter.page.NotDone() {
9173		return ServerSecurityAlertPolicy{}
9174	}
9175	return iter.page.Values()[iter.i]
9176}
9177
9178// Creates a new instance of the ServerSecurityAlertPolicyListResultIterator type.
9179func NewServerSecurityAlertPolicyListResultIterator(page ServerSecurityAlertPolicyListResultPage) ServerSecurityAlertPolicyListResultIterator {
9180	return ServerSecurityAlertPolicyListResultIterator{page: page}
9181}
9182
9183// IsEmpty returns true if the ListResult contains no values.
9184func (ssaplr ServerSecurityAlertPolicyListResult) IsEmpty() bool {
9185	return ssaplr.Value == nil || len(*ssaplr.Value) == 0
9186}
9187
9188// hasNextLink returns true if the NextLink is not empty.
9189func (ssaplr ServerSecurityAlertPolicyListResult) hasNextLink() bool {
9190	return ssaplr.NextLink != nil && len(*ssaplr.NextLink) != 0
9191}
9192
9193// serverSecurityAlertPolicyListResultPreparer prepares a request to retrieve the next set of results.
9194// It returns nil if no more results exist.
9195func (ssaplr ServerSecurityAlertPolicyListResult) serverSecurityAlertPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
9196	if !ssaplr.hasNextLink() {
9197		return nil, nil
9198	}
9199	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9200		autorest.AsJSON(),
9201		autorest.AsGet(),
9202		autorest.WithBaseURL(to.String(ssaplr.NextLink)))
9203}
9204
9205// ServerSecurityAlertPolicyListResultPage contains a page of ServerSecurityAlertPolicy values.
9206type ServerSecurityAlertPolicyListResultPage struct {
9207	fn     func(context.Context, ServerSecurityAlertPolicyListResult) (ServerSecurityAlertPolicyListResult, error)
9208	ssaplr ServerSecurityAlertPolicyListResult
9209}
9210
9211// NextWithContext advances to the next page of values.  If there was an error making
9212// the request the page does not advance and the error is returned.
9213func (page *ServerSecurityAlertPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
9214	if tracing.IsEnabled() {
9215		ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPolicyListResultPage.NextWithContext")
9216		defer func() {
9217			sc := -1
9218			if page.Response().Response.Response != nil {
9219				sc = page.Response().Response.Response.StatusCode
9220			}
9221			tracing.EndSpan(ctx, sc, err)
9222		}()
9223	}
9224	for {
9225		next, err := page.fn(ctx, page.ssaplr)
9226		if err != nil {
9227			return err
9228		}
9229		page.ssaplr = next
9230		if !next.hasNextLink() || !next.IsEmpty() {
9231			break
9232		}
9233	}
9234	return nil
9235}
9236
9237// Next advances to the next page of values.  If there was an error making
9238// the request the page does not advance and the error is returned.
9239// Deprecated: Use NextWithContext() instead.
9240func (page *ServerSecurityAlertPolicyListResultPage) Next() error {
9241	return page.NextWithContext(context.Background())
9242}
9243
9244// NotDone returns true if the page enumeration should be started or is not yet complete.
9245func (page ServerSecurityAlertPolicyListResultPage) NotDone() bool {
9246	return !page.ssaplr.IsEmpty()
9247}
9248
9249// Response returns the raw server response from the last page request.
9250func (page ServerSecurityAlertPolicyListResultPage) Response() ServerSecurityAlertPolicyListResult {
9251	return page.ssaplr
9252}
9253
9254// Values returns the slice of values for the current page or nil if there are no values.
9255func (page ServerSecurityAlertPolicyListResultPage) Values() []ServerSecurityAlertPolicy {
9256	if page.ssaplr.IsEmpty() {
9257		return nil
9258	}
9259	return *page.ssaplr.Value
9260}
9261
9262// Creates a new instance of the ServerSecurityAlertPolicyListResultPage type.
9263func NewServerSecurityAlertPolicyListResultPage(cur ServerSecurityAlertPolicyListResult, getNextPage func(context.Context, ServerSecurityAlertPolicyListResult) (ServerSecurityAlertPolicyListResult, error)) ServerSecurityAlertPolicyListResultPage {
9264	return ServerSecurityAlertPolicyListResultPage{
9265		fn:     getNextPage,
9266		ssaplr: cur,
9267	}
9268}
9269
9270// ServerSecurityAlertPolicyProperties properties of a security alert policy.
9271type ServerSecurityAlertPolicyProperties struct {
9272	// State - Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific server. Possible values include: 'SecurityAlertPolicyStateNew', 'SecurityAlertPolicyStateEnabled', 'SecurityAlertPolicyStateDisabled'
9273	State SecurityAlertPolicyState `json:"state,omitempty"`
9274	// DisabledAlerts - Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action
9275	DisabledAlerts *[]string `json:"disabledAlerts,omitempty"`
9276	// EmailAddresses - Specifies an array of e-mail addresses to which the alert is sent.
9277	EmailAddresses *[]string `json:"emailAddresses,omitempty"`
9278	// EmailAccountAdmins - Specifies that the alert is sent to the account administrators.
9279	EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"`
9280	// StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
9281	StorageEndpoint *string `json:"storageEndpoint,omitempty"`
9282	// StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account.
9283	StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`
9284	// RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs.
9285	RetentionDays *int32 `json:"retentionDays,omitempty"`
9286	// CreationTime - READ-ONLY; Specifies the UTC creation time of the policy.
9287	CreationTime *date.Time `json:"creationTime,omitempty"`
9288}
9289
9290// MarshalJSON is the custom marshaler for ServerSecurityAlertPolicyProperties.
9291func (ssapp ServerSecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) {
9292	objectMap := make(map[string]interface{})
9293	if ssapp.State != "" {
9294		objectMap["state"] = ssapp.State
9295	}
9296	if ssapp.DisabledAlerts != nil {
9297		objectMap["disabledAlerts"] = ssapp.DisabledAlerts
9298	}
9299	if ssapp.EmailAddresses != nil {
9300		objectMap["emailAddresses"] = ssapp.EmailAddresses
9301	}
9302	if ssapp.EmailAccountAdmins != nil {
9303		objectMap["emailAccountAdmins"] = ssapp.EmailAccountAdmins
9304	}
9305	if ssapp.StorageEndpoint != nil {
9306		objectMap["storageEndpoint"] = ssapp.StorageEndpoint
9307	}
9308	if ssapp.StorageAccountAccessKey != nil {
9309		objectMap["storageAccountAccessKey"] = ssapp.StorageAccountAccessKey
9310	}
9311	if ssapp.RetentionDays != nil {
9312		objectMap["retentionDays"] = ssapp.RetentionDays
9313	}
9314	return json.Marshal(objectMap)
9315}
9316
9317// ServerUsage represents server metrics.
9318type ServerUsage struct {
9319	// Name - READ-ONLY; Name of the server usage metric.
9320	Name *string `json:"name,omitempty"`
9321	// ResourceName - READ-ONLY; The name of the resource.
9322	ResourceName *string `json:"resourceName,omitempty"`
9323	// DisplayName - READ-ONLY; The metric display name.
9324	DisplayName *string `json:"displayName,omitempty"`
9325	// CurrentValue - READ-ONLY; The current value of the metric.
9326	CurrentValue *float64 `json:"currentValue,omitempty"`
9327	// Limit - READ-ONLY; The current limit of the metric.
9328	Limit *float64 `json:"limit,omitempty"`
9329	// Unit - READ-ONLY; The units of the metric.
9330	Unit *string `json:"unit,omitempty"`
9331	// NextResetTime - READ-ONLY; The next reset time for the metric (ISO8601 format).
9332	NextResetTime *date.Time `json:"nextResetTime,omitempty"`
9333}
9334
9335// ServerUsageListResult represents the response to a list server metrics request.
9336type ServerUsageListResult struct {
9337	autorest.Response `json:"-"`
9338	// Value - The list of server metrics for the server.
9339	Value *[]ServerUsage `json:"value,omitempty"`
9340	// NextLink - READ-ONLY; Link to retrieve next page of results.
9341	NextLink *string `json:"nextLink,omitempty"`
9342}
9343
9344// MarshalJSON is the custom marshaler for ServerUsageListResult.
9345func (sulr ServerUsageListResult) MarshalJSON() ([]byte, error) {
9346	objectMap := make(map[string]interface{})
9347	if sulr.Value != nil {
9348		objectMap["value"] = sulr.Value
9349	}
9350	return json.Marshal(objectMap)
9351}
9352
9353// ServerUsageListResultIterator provides access to a complete listing of ServerUsage values.
9354type ServerUsageListResultIterator struct {
9355	i    int
9356	page ServerUsageListResultPage
9357}
9358
9359// NextWithContext advances to the next value.  If there was an error making
9360// the request the iterator does not advance and the error is returned.
9361func (iter *ServerUsageListResultIterator) NextWithContext(ctx context.Context) (err error) {
9362	if tracing.IsEnabled() {
9363		ctx = tracing.StartSpan(ctx, fqdn+"/ServerUsageListResultIterator.NextWithContext")
9364		defer func() {
9365			sc := -1
9366			if iter.Response().Response.Response != nil {
9367				sc = iter.Response().Response.Response.StatusCode
9368			}
9369			tracing.EndSpan(ctx, sc, err)
9370		}()
9371	}
9372	iter.i++
9373	if iter.i < len(iter.page.Values()) {
9374		return nil
9375	}
9376	err = iter.page.NextWithContext(ctx)
9377	if err != nil {
9378		iter.i--
9379		return err
9380	}
9381	iter.i = 0
9382	return nil
9383}
9384
9385// Next advances to the next value.  If there was an error making
9386// the request the iterator does not advance and the error is returned.
9387// Deprecated: Use NextWithContext() instead.
9388func (iter *ServerUsageListResultIterator) Next() error {
9389	return iter.NextWithContext(context.Background())
9390}
9391
9392// NotDone returns true if the enumeration should be started or is not yet complete.
9393func (iter ServerUsageListResultIterator) NotDone() bool {
9394	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9395}
9396
9397// Response returns the raw server response from the last page request.
9398func (iter ServerUsageListResultIterator) Response() ServerUsageListResult {
9399	return iter.page.Response()
9400}
9401
9402// Value returns the current value or a zero-initialized value if the
9403// iterator has advanced beyond the end of the collection.
9404func (iter ServerUsageListResultIterator) Value() ServerUsage {
9405	if !iter.page.NotDone() {
9406		return ServerUsage{}
9407	}
9408	return iter.page.Values()[iter.i]
9409}
9410
9411// Creates a new instance of the ServerUsageListResultIterator type.
9412func NewServerUsageListResultIterator(page ServerUsageListResultPage) ServerUsageListResultIterator {
9413	return ServerUsageListResultIterator{page: page}
9414}
9415
9416// IsEmpty returns true if the ListResult contains no values.
9417func (sulr ServerUsageListResult) IsEmpty() bool {
9418	return sulr.Value == nil || len(*sulr.Value) == 0
9419}
9420
9421// hasNextLink returns true if the NextLink is not empty.
9422func (sulr ServerUsageListResult) hasNextLink() bool {
9423	return sulr.NextLink != nil && len(*sulr.NextLink) != 0
9424}
9425
9426// serverUsageListResultPreparer prepares a request to retrieve the next set of results.
9427// It returns nil if no more results exist.
9428func (sulr ServerUsageListResult) serverUsageListResultPreparer(ctx context.Context) (*http.Request, error) {
9429	if !sulr.hasNextLink() {
9430		return nil, nil
9431	}
9432	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9433		autorest.AsJSON(),
9434		autorest.AsGet(),
9435		autorest.WithBaseURL(to.String(sulr.NextLink)))
9436}
9437
9438// ServerUsageListResultPage contains a page of ServerUsage values.
9439type ServerUsageListResultPage struct {
9440	fn   func(context.Context, ServerUsageListResult) (ServerUsageListResult, error)
9441	sulr ServerUsageListResult
9442}
9443
9444// NextWithContext advances to the next page of values.  If there was an error making
9445// the request the page does not advance and the error is returned.
9446func (page *ServerUsageListResultPage) NextWithContext(ctx context.Context) (err error) {
9447	if tracing.IsEnabled() {
9448		ctx = tracing.StartSpan(ctx, fqdn+"/ServerUsageListResultPage.NextWithContext")
9449		defer func() {
9450			sc := -1
9451			if page.Response().Response.Response != nil {
9452				sc = page.Response().Response.Response.StatusCode
9453			}
9454			tracing.EndSpan(ctx, sc, err)
9455		}()
9456	}
9457	for {
9458		next, err := page.fn(ctx, page.sulr)
9459		if err != nil {
9460			return err
9461		}
9462		page.sulr = next
9463		if !next.hasNextLink() || !next.IsEmpty() {
9464			break
9465		}
9466	}
9467	return nil
9468}
9469
9470// Next advances to the next page of values.  If there was an error making
9471// the request the page does not advance and the error is returned.
9472// Deprecated: Use NextWithContext() instead.
9473func (page *ServerUsageListResultPage) Next() error {
9474	return page.NextWithContext(context.Background())
9475}
9476
9477// NotDone returns true if the page enumeration should be started or is not yet complete.
9478func (page ServerUsageListResultPage) NotDone() bool {
9479	return !page.sulr.IsEmpty()
9480}
9481
9482// Response returns the raw server response from the last page request.
9483func (page ServerUsageListResultPage) Response() ServerUsageListResult {
9484	return page.sulr
9485}
9486
9487// Values returns the slice of values for the current page or nil if there are no values.
9488func (page ServerUsageListResultPage) Values() []ServerUsage {
9489	if page.sulr.IsEmpty() {
9490		return nil
9491	}
9492	return *page.sulr.Value
9493}
9494
9495// Creates a new instance of the ServerUsageListResultPage type.
9496func NewServerUsageListResultPage(cur ServerUsageListResult, getNextPage func(context.Context, ServerUsageListResult) (ServerUsageListResult, error)) ServerUsageListResultPage {
9497	return ServerUsageListResultPage{
9498		fn:   getNextPage,
9499		sulr: cur,
9500	}
9501}
9502
9503// ServerVulnerabilityAssessment a server vulnerability assessment.
9504type ServerVulnerabilityAssessment struct {
9505	autorest.Response `json:"-"`
9506	// ServerVulnerabilityAssessmentProperties - Resource properties.
9507	*ServerVulnerabilityAssessmentProperties `json:"properties,omitempty"`
9508	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
9509	ID *string `json:"id,omitempty"`
9510	// Name - READ-ONLY; The name of the resource
9511	Name *string `json:"name,omitempty"`
9512	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
9513	Type *string `json:"type,omitempty"`
9514}
9515
9516// MarshalJSON is the custom marshaler for ServerVulnerabilityAssessment.
9517func (sva ServerVulnerabilityAssessment) MarshalJSON() ([]byte, error) {
9518	objectMap := make(map[string]interface{})
9519	if sva.ServerVulnerabilityAssessmentProperties != nil {
9520		objectMap["properties"] = sva.ServerVulnerabilityAssessmentProperties
9521	}
9522	return json.Marshal(objectMap)
9523}
9524
9525// UnmarshalJSON is the custom unmarshaler for ServerVulnerabilityAssessment struct.
9526func (sva *ServerVulnerabilityAssessment) UnmarshalJSON(body []byte) error {
9527	var m map[string]*json.RawMessage
9528	err := json.Unmarshal(body, &m)
9529	if err != nil {
9530		return err
9531	}
9532	for k, v := range m {
9533		switch k {
9534		case "properties":
9535			if v != nil {
9536				var serverVulnerabilityAssessmentProperties ServerVulnerabilityAssessmentProperties
9537				err = json.Unmarshal(*v, &serverVulnerabilityAssessmentProperties)
9538				if err != nil {
9539					return err
9540				}
9541				sva.ServerVulnerabilityAssessmentProperties = &serverVulnerabilityAssessmentProperties
9542			}
9543		case "id":
9544			if v != nil {
9545				var ID string
9546				err = json.Unmarshal(*v, &ID)
9547				if err != nil {
9548					return err
9549				}
9550				sva.ID = &ID
9551			}
9552		case "name":
9553			if v != nil {
9554				var name string
9555				err = json.Unmarshal(*v, &name)
9556				if err != nil {
9557					return err
9558				}
9559				sva.Name = &name
9560			}
9561		case "type":
9562			if v != nil {
9563				var typeVar string
9564				err = json.Unmarshal(*v, &typeVar)
9565				if err != nil {
9566					return err
9567				}
9568				sva.Type = &typeVar
9569			}
9570		}
9571	}
9572
9573	return nil
9574}
9575
9576// ServerVulnerabilityAssessmentListResult a list of the server's vulnerability assessments.
9577type ServerVulnerabilityAssessmentListResult struct {
9578	autorest.Response `json:"-"`
9579	// Value - READ-ONLY; Array of results.
9580	Value *[]ServerVulnerabilityAssessment `json:"value,omitempty"`
9581	// NextLink - READ-ONLY; Link to retrieve next page of results.
9582	NextLink *string `json:"nextLink,omitempty"`
9583}
9584
9585// ServerVulnerabilityAssessmentListResultIterator provides access to a complete listing of
9586// ServerVulnerabilityAssessment values.
9587type ServerVulnerabilityAssessmentListResultIterator struct {
9588	i    int
9589	page ServerVulnerabilityAssessmentListResultPage
9590}
9591
9592// NextWithContext advances to the next value.  If there was an error making
9593// the request the iterator does not advance and the error is returned.
9594func (iter *ServerVulnerabilityAssessmentListResultIterator) NextWithContext(ctx context.Context) (err error) {
9595	if tracing.IsEnabled() {
9596		ctx = tracing.StartSpan(ctx, fqdn+"/ServerVulnerabilityAssessmentListResultIterator.NextWithContext")
9597		defer func() {
9598			sc := -1
9599			if iter.Response().Response.Response != nil {
9600				sc = iter.Response().Response.Response.StatusCode
9601			}
9602			tracing.EndSpan(ctx, sc, err)
9603		}()
9604	}
9605	iter.i++
9606	if iter.i < len(iter.page.Values()) {
9607		return nil
9608	}
9609	err = iter.page.NextWithContext(ctx)
9610	if err != nil {
9611		iter.i--
9612		return err
9613	}
9614	iter.i = 0
9615	return nil
9616}
9617
9618// Next advances to the next value.  If there was an error making
9619// the request the iterator does not advance and the error is returned.
9620// Deprecated: Use NextWithContext() instead.
9621func (iter *ServerVulnerabilityAssessmentListResultIterator) Next() error {
9622	return iter.NextWithContext(context.Background())
9623}
9624
9625// NotDone returns true if the enumeration should be started or is not yet complete.
9626func (iter ServerVulnerabilityAssessmentListResultIterator) NotDone() bool {
9627	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9628}
9629
9630// Response returns the raw server response from the last page request.
9631func (iter ServerVulnerabilityAssessmentListResultIterator) Response() ServerVulnerabilityAssessmentListResult {
9632	return iter.page.Response()
9633}
9634
9635// Value returns the current value or a zero-initialized value if the
9636// iterator has advanced beyond the end of the collection.
9637func (iter ServerVulnerabilityAssessmentListResultIterator) Value() ServerVulnerabilityAssessment {
9638	if !iter.page.NotDone() {
9639		return ServerVulnerabilityAssessment{}
9640	}
9641	return iter.page.Values()[iter.i]
9642}
9643
9644// Creates a new instance of the ServerVulnerabilityAssessmentListResultIterator type.
9645func NewServerVulnerabilityAssessmentListResultIterator(page ServerVulnerabilityAssessmentListResultPage) ServerVulnerabilityAssessmentListResultIterator {
9646	return ServerVulnerabilityAssessmentListResultIterator{page: page}
9647}
9648
9649// IsEmpty returns true if the ListResult contains no values.
9650func (svalr ServerVulnerabilityAssessmentListResult) IsEmpty() bool {
9651	return svalr.Value == nil || len(*svalr.Value) == 0
9652}
9653
9654// hasNextLink returns true if the NextLink is not empty.
9655func (svalr ServerVulnerabilityAssessmentListResult) hasNextLink() bool {
9656	return svalr.NextLink != nil && len(*svalr.NextLink) != 0
9657}
9658
9659// serverVulnerabilityAssessmentListResultPreparer prepares a request to retrieve the next set of results.
9660// It returns nil if no more results exist.
9661func (svalr ServerVulnerabilityAssessmentListResult) serverVulnerabilityAssessmentListResultPreparer(ctx context.Context) (*http.Request, error) {
9662	if !svalr.hasNextLink() {
9663		return nil, nil
9664	}
9665	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9666		autorest.AsJSON(),
9667		autorest.AsGet(),
9668		autorest.WithBaseURL(to.String(svalr.NextLink)))
9669}
9670
9671// ServerVulnerabilityAssessmentListResultPage contains a page of ServerVulnerabilityAssessment values.
9672type ServerVulnerabilityAssessmentListResultPage struct {
9673	fn    func(context.Context, ServerVulnerabilityAssessmentListResult) (ServerVulnerabilityAssessmentListResult, error)
9674	svalr ServerVulnerabilityAssessmentListResult
9675}
9676
9677// NextWithContext advances to the next page of values.  If there was an error making
9678// the request the page does not advance and the error is returned.
9679func (page *ServerVulnerabilityAssessmentListResultPage) NextWithContext(ctx context.Context) (err error) {
9680	if tracing.IsEnabled() {
9681		ctx = tracing.StartSpan(ctx, fqdn+"/ServerVulnerabilityAssessmentListResultPage.NextWithContext")
9682		defer func() {
9683			sc := -1
9684			if page.Response().Response.Response != nil {
9685				sc = page.Response().Response.Response.StatusCode
9686			}
9687			tracing.EndSpan(ctx, sc, err)
9688		}()
9689	}
9690	for {
9691		next, err := page.fn(ctx, page.svalr)
9692		if err != nil {
9693			return err
9694		}
9695		page.svalr = next
9696		if !next.hasNextLink() || !next.IsEmpty() {
9697			break
9698		}
9699	}
9700	return nil
9701}
9702
9703// Next advances to the next page of values.  If there was an error making
9704// the request the page does not advance and the error is returned.
9705// Deprecated: Use NextWithContext() instead.
9706func (page *ServerVulnerabilityAssessmentListResultPage) Next() error {
9707	return page.NextWithContext(context.Background())
9708}
9709
9710// NotDone returns true if the page enumeration should be started or is not yet complete.
9711func (page ServerVulnerabilityAssessmentListResultPage) NotDone() bool {
9712	return !page.svalr.IsEmpty()
9713}
9714
9715// Response returns the raw server response from the last page request.
9716func (page ServerVulnerabilityAssessmentListResultPage) Response() ServerVulnerabilityAssessmentListResult {
9717	return page.svalr
9718}
9719
9720// Values returns the slice of values for the current page or nil if there are no values.
9721func (page ServerVulnerabilityAssessmentListResultPage) Values() []ServerVulnerabilityAssessment {
9722	if page.svalr.IsEmpty() {
9723		return nil
9724	}
9725	return *page.svalr.Value
9726}
9727
9728// Creates a new instance of the ServerVulnerabilityAssessmentListResultPage type.
9729func NewServerVulnerabilityAssessmentListResultPage(cur ServerVulnerabilityAssessmentListResult, getNextPage func(context.Context, ServerVulnerabilityAssessmentListResult) (ServerVulnerabilityAssessmentListResult, error)) ServerVulnerabilityAssessmentListResultPage {
9730	return ServerVulnerabilityAssessmentListResultPage{
9731		fn:    getNextPage,
9732		svalr: cur,
9733	}
9734}
9735
9736// ServerVulnerabilityAssessmentProperties properties of a server Vulnerability Assessment.
9737type ServerVulnerabilityAssessmentProperties struct {
9738	// StorageContainerPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
9739	StorageContainerPath *string `json:"storageContainerPath,omitempty"`
9740	// StorageContainerSasKey - A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required.
9741	StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"`
9742	// StorageAccountAccessKey - Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required.
9743	StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`
9744	// RecurringScans - The recurring scans settings
9745	RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"`
9746}
9747
9748// SetObject ...
9749type SetObject struct {
9750	autorest.Response `json:"-"`
9751	Value             interface{} `json:"value,omitempty"`
9752}
9753
9754// Sku SQL pool SKU
9755type Sku struct {
9756	// Tier - The service tier
9757	Tier *string `json:"tier,omitempty"`
9758	// Name - The SKU name
9759	Name *string `json:"name,omitempty"`
9760	// Capacity - If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.
9761	Capacity *int32 `json:"capacity,omitempty"`
9762}
9763
9764// SQLPool a SQL Analytics pool
9765type SQLPool struct {
9766	autorest.Response `json:"-"`
9767	// Sku - SQL pool SKU
9768	Sku *Sku `json:"sku,omitempty"`
9769	// SQLPoolResourceProperties - SQL pool properties
9770	*SQLPoolResourceProperties `json:"properties,omitempty"`
9771	// Tags - Resource tags.
9772	Tags map[string]*string `json:"tags"`
9773	// Location - The geo-location where the resource lives
9774	Location *string `json:"location,omitempty"`
9775	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
9776	ID *string `json:"id,omitempty"`
9777	// Name - READ-ONLY; The name of the resource
9778	Name *string `json:"name,omitempty"`
9779	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
9780	Type *string `json:"type,omitempty"`
9781}
9782
9783// MarshalJSON is the custom marshaler for SQLPool.
9784func (sp SQLPool) MarshalJSON() ([]byte, error) {
9785	objectMap := make(map[string]interface{})
9786	if sp.Sku != nil {
9787		objectMap["sku"] = sp.Sku
9788	}
9789	if sp.SQLPoolResourceProperties != nil {
9790		objectMap["properties"] = sp.SQLPoolResourceProperties
9791	}
9792	if sp.Tags != nil {
9793		objectMap["tags"] = sp.Tags
9794	}
9795	if sp.Location != nil {
9796		objectMap["location"] = sp.Location
9797	}
9798	return json.Marshal(objectMap)
9799}
9800
9801// UnmarshalJSON is the custom unmarshaler for SQLPool struct.
9802func (sp *SQLPool) UnmarshalJSON(body []byte) error {
9803	var m map[string]*json.RawMessage
9804	err := json.Unmarshal(body, &m)
9805	if err != nil {
9806		return err
9807	}
9808	for k, v := range m {
9809		switch k {
9810		case "sku":
9811			if v != nil {
9812				var sku Sku
9813				err = json.Unmarshal(*v, &sku)
9814				if err != nil {
9815					return err
9816				}
9817				sp.Sku = &sku
9818			}
9819		case "properties":
9820			if v != nil {
9821				var SQLPoolResourceProperties SQLPoolResourceProperties
9822				err = json.Unmarshal(*v, &SQLPoolResourceProperties)
9823				if err != nil {
9824					return err
9825				}
9826				sp.SQLPoolResourceProperties = &SQLPoolResourceProperties
9827			}
9828		case "tags":
9829			if v != nil {
9830				var tags map[string]*string
9831				err = json.Unmarshal(*v, &tags)
9832				if err != nil {
9833					return err
9834				}
9835				sp.Tags = tags
9836			}
9837		case "location":
9838			if v != nil {
9839				var location string
9840				err = json.Unmarshal(*v, &location)
9841				if err != nil {
9842					return err
9843				}
9844				sp.Location = &location
9845			}
9846		case "id":
9847			if v != nil {
9848				var ID string
9849				err = json.Unmarshal(*v, &ID)
9850				if err != nil {
9851					return err
9852				}
9853				sp.ID = &ID
9854			}
9855		case "name":
9856			if v != nil {
9857				var name string
9858				err = json.Unmarshal(*v, &name)
9859				if err != nil {
9860					return err
9861				}
9862				sp.Name = &name
9863			}
9864		case "type":
9865			if v != nil {
9866				var typeVar string
9867				err = json.Unmarshal(*v, &typeVar)
9868				if err != nil {
9869					return err
9870				}
9871				sp.Type = &typeVar
9872			}
9873		}
9874	}
9875
9876	return nil
9877}
9878
9879// SQLPoolBlobAuditingPolicy a Sql pool blob auditing policy.
9880type SQLPoolBlobAuditingPolicy struct {
9881	autorest.Response `json:"-"`
9882	// Kind - READ-ONLY; Resource kind.
9883	Kind *string `json:"kind,omitempty"`
9884	// SQLPoolBlobAuditingPolicyProperties - Resource properties.
9885	*SQLPoolBlobAuditingPolicyProperties `json:"properties,omitempty"`
9886	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
9887	ID *string `json:"id,omitempty"`
9888	// Name - READ-ONLY; The name of the resource
9889	Name *string `json:"name,omitempty"`
9890	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
9891	Type *string `json:"type,omitempty"`
9892}
9893
9894// MarshalJSON is the custom marshaler for SQLPoolBlobAuditingPolicy.
9895func (spbap SQLPoolBlobAuditingPolicy) MarshalJSON() ([]byte, error) {
9896	objectMap := make(map[string]interface{})
9897	if spbap.SQLPoolBlobAuditingPolicyProperties != nil {
9898		objectMap["properties"] = spbap.SQLPoolBlobAuditingPolicyProperties
9899	}
9900	return json.Marshal(objectMap)
9901}
9902
9903// UnmarshalJSON is the custom unmarshaler for SQLPoolBlobAuditingPolicy struct.
9904func (spbap *SQLPoolBlobAuditingPolicy) UnmarshalJSON(body []byte) error {
9905	var m map[string]*json.RawMessage
9906	err := json.Unmarshal(body, &m)
9907	if err != nil {
9908		return err
9909	}
9910	for k, v := range m {
9911		switch k {
9912		case "kind":
9913			if v != nil {
9914				var kind string
9915				err = json.Unmarshal(*v, &kind)
9916				if err != nil {
9917					return err
9918				}
9919				spbap.Kind = &kind
9920			}
9921		case "properties":
9922			if v != nil {
9923				var SQLPoolBlobAuditingPolicyProperties SQLPoolBlobAuditingPolicyProperties
9924				err = json.Unmarshal(*v, &SQLPoolBlobAuditingPolicyProperties)
9925				if err != nil {
9926					return err
9927				}
9928				spbap.SQLPoolBlobAuditingPolicyProperties = &SQLPoolBlobAuditingPolicyProperties
9929			}
9930		case "id":
9931			if v != nil {
9932				var ID string
9933				err = json.Unmarshal(*v, &ID)
9934				if err != nil {
9935					return err
9936				}
9937				spbap.ID = &ID
9938			}
9939		case "name":
9940			if v != nil {
9941				var name string
9942				err = json.Unmarshal(*v, &name)
9943				if err != nil {
9944					return err
9945				}
9946				spbap.Name = &name
9947			}
9948		case "type":
9949			if v != nil {
9950				var typeVar string
9951				err = json.Unmarshal(*v, &typeVar)
9952				if err != nil {
9953					return err
9954				}
9955				spbap.Type = &typeVar
9956			}
9957		}
9958	}
9959
9960	return nil
9961}
9962
9963// SQLPoolBlobAuditingPolicyListResult a list of Sql pool auditing settings.
9964type SQLPoolBlobAuditingPolicyListResult struct {
9965	autorest.Response `json:"-"`
9966	// Value - READ-ONLY; Array of results.
9967	Value *[]SQLPoolBlobAuditingPolicy `json:"value,omitempty"`
9968	// NextLink - READ-ONLY; Link to retrieve next page of results.
9969	NextLink *string `json:"nextLink,omitempty"`
9970}
9971
9972// SQLPoolBlobAuditingPolicyListResultIterator provides access to a complete listing of
9973// SQLPoolBlobAuditingPolicy values.
9974type SQLPoolBlobAuditingPolicyListResultIterator struct {
9975	i    int
9976	page SQLPoolBlobAuditingPolicyListResultPage
9977}
9978
9979// NextWithContext advances to the next value.  If there was an error making
9980// the request the iterator does not advance and the error is returned.
9981func (iter *SQLPoolBlobAuditingPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
9982	if tracing.IsEnabled() {
9983		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPolicyListResultIterator.NextWithContext")
9984		defer func() {
9985			sc := -1
9986			if iter.Response().Response.Response != nil {
9987				sc = iter.Response().Response.Response.StatusCode
9988			}
9989			tracing.EndSpan(ctx, sc, err)
9990		}()
9991	}
9992	iter.i++
9993	if iter.i < len(iter.page.Values()) {
9994		return nil
9995	}
9996	err = iter.page.NextWithContext(ctx)
9997	if err != nil {
9998		iter.i--
9999		return err
10000	}
10001	iter.i = 0
10002	return nil
10003}
10004
10005// Next advances to the next value.  If there was an error making
10006// the request the iterator does not advance and the error is returned.
10007// Deprecated: Use NextWithContext() instead.
10008func (iter *SQLPoolBlobAuditingPolicyListResultIterator) Next() error {
10009	return iter.NextWithContext(context.Background())
10010}
10011
10012// NotDone returns true if the enumeration should be started or is not yet complete.
10013func (iter SQLPoolBlobAuditingPolicyListResultIterator) NotDone() bool {
10014	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10015}
10016
10017// Response returns the raw server response from the last page request.
10018func (iter SQLPoolBlobAuditingPolicyListResultIterator) Response() SQLPoolBlobAuditingPolicyListResult {
10019	return iter.page.Response()
10020}
10021
10022// Value returns the current value or a zero-initialized value if the
10023// iterator has advanced beyond the end of the collection.
10024func (iter SQLPoolBlobAuditingPolicyListResultIterator) Value() SQLPoolBlobAuditingPolicy {
10025	if !iter.page.NotDone() {
10026		return SQLPoolBlobAuditingPolicy{}
10027	}
10028	return iter.page.Values()[iter.i]
10029}
10030
10031// Creates a new instance of the SQLPoolBlobAuditingPolicyListResultIterator type.
10032func NewSQLPoolBlobAuditingPolicyListResultIterator(page SQLPoolBlobAuditingPolicyListResultPage) SQLPoolBlobAuditingPolicyListResultIterator {
10033	return SQLPoolBlobAuditingPolicyListResultIterator{page: page}
10034}
10035
10036// IsEmpty returns true if the ListResult contains no values.
10037func (spbaplr SQLPoolBlobAuditingPolicyListResult) IsEmpty() bool {
10038	return spbaplr.Value == nil || len(*spbaplr.Value) == 0
10039}
10040
10041// hasNextLink returns true if the NextLink is not empty.
10042func (spbaplr SQLPoolBlobAuditingPolicyListResult) hasNextLink() bool {
10043	return spbaplr.NextLink != nil && len(*spbaplr.NextLink) != 0
10044}
10045
10046// sQLPoolBlobAuditingPolicyListResultPreparer prepares a request to retrieve the next set of results.
10047// It returns nil if no more results exist.
10048func (spbaplr SQLPoolBlobAuditingPolicyListResult) sQLPoolBlobAuditingPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
10049	if !spbaplr.hasNextLink() {
10050		return nil, nil
10051	}
10052	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10053		autorest.AsJSON(),
10054		autorest.AsGet(),
10055		autorest.WithBaseURL(to.String(spbaplr.NextLink)))
10056}
10057
10058// SQLPoolBlobAuditingPolicyListResultPage contains a page of SQLPoolBlobAuditingPolicy values.
10059type SQLPoolBlobAuditingPolicyListResultPage struct {
10060	fn      func(context.Context, SQLPoolBlobAuditingPolicyListResult) (SQLPoolBlobAuditingPolicyListResult, error)
10061	spbaplr SQLPoolBlobAuditingPolicyListResult
10062}
10063
10064// NextWithContext advances to the next page of values.  If there was an error making
10065// the request the page does not advance and the error is returned.
10066func (page *SQLPoolBlobAuditingPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
10067	if tracing.IsEnabled() {
10068		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPolicyListResultPage.NextWithContext")
10069		defer func() {
10070			sc := -1
10071			if page.Response().Response.Response != nil {
10072				sc = page.Response().Response.Response.StatusCode
10073			}
10074			tracing.EndSpan(ctx, sc, err)
10075		}()
10076	}
10077	for {
10078		next, err := page.fn(ctx, page.spbaplr)
10079		if err != nil {
10080			return err
10081		}
10082		page.spbaplr = next
10083		if !next.hasNextLink() || !next.IsEmpty() {
10084			break
10085		}
10086	}
10087	return nil
10088}
10089
10090// Next advances to the next page of values.  If there was an error making
10091// the request the page does not advance and the error is returned.
10092// Deprecated: Use NextWithContext() instead.
10093func (page *SQLPoolBlobAuditingPolicyListResultPage) Next() error {
10094	return page.NextWithContext(context.Background())
10095}
10096
10097// NotDone returns true if the page enumeration should be started or is not yet complete.
10098func (page SQLPoolBlobAuditingPolicyListResultPage) NotDone() bool {
10099	return !page.spbaplr.IsEmpty()
10100}
10101
10102// Response returns the raw server response from the last page request.
10103func (page SQLPoolBlobAuditingPolicyListResultPage) Response() SQLPoolBlobAuditingPolicyListResult {
10104	return page.spbaplr
10105}
10106
10107// Values returns the slice of values for the current page or nil if there are no values.
10108func (page SQLPoolBlobAuditingPolicyListResultPage) Values() []SQLPoolBlobAuditingPolicy {
10109	if page.spbaplr.IsEmpty() {
10110		return nil
10111	}
10112	return *page.spbaplr.Value
10113}
10114
10115// Creates a new instance of the SQLPoolBlobAuditingPolicyListResultPage type.
10116func NewSQLPoolBlobAuditingPolicyListResultPage(cur SQLPoolBlobAuditingPolicyListResult, getNextPage func(context.Context, SQLPoolBlobAuditingPolicyListResult) (SQLPoolBlobAuditingPolicyListResult, error)) SQLPoolBlobAuditingPolicyListResultPage {
10117	return SQLPoolBlobAuditingPolicyListResultPage{
10118		fn:      getNextPage,
10119		spbaplr: cur,
10120	}
10121}
10122
10123// SQLPoolBlobAuditingPolicyProperties properties of a Sql pool blob auditing policy.
10124type SQLPoolBlobAuditingPolicyProperties struct {
10125	// State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled'
10126	State BlobAuditingPolicyState `json:"state,omitempty"`
10127	// StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required.
10128	StorageEndpoint *string `json:"storageEndpoint,omitempty"`
10129	// StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required.
10130	StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`
10131	// RetentionDays - Specifies the number of days to keep in the audit logs in the storage account.
10132	RetentionDays *int32 `json:"retentionDays,omitempty"`
10133	// AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit.
10134	//
10135	// The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:
10136	//
10137	// BATCH_COMPLETED_GROUP,
10138	// SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,
10139	// FAILED_DATABASE_AUTHENTICATION_GROUP.
10140	//
10141	// This above combination is also the set that is configured by default when enabling auditing from the Azure portal.
10142	//
10143	// The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):
10144	//
10145	// APPLICATION_ROLE_CHANGE_PASSWORD_GROUP
10146	// BACKUP_RESTORE_GROUP
10147	// DATABASE_LOGOUT_GROUP
10148	// DATABASE_OBJECT_CHANGE_GROUP
10149	// DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP
10150	// DATABASE_OBJECT_PERMISSION_CHANGE_GROUP
10151	// DATABASE_OPERATION_GROUP
10152	// DATABASE_PERMISSION_CHANGE_GROUP
10153	// DATABASE_PRINCIPAL_CHANGE_GROUP
10154	// DATABASE_PRINCIPAL_IMPERSONATION_GROUP
10155	// DATABASE_ROLE_MEMBER_CHANGE_GROUP
10156	// FAILED_DATABASE_AUTHENTICATION_GROUP
10157	// SCHEMA_OBJECT_ACCESS_GROUP
10158	// SCHEMA_OBJECT_CHANGE_GROUP
10159	// SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP
10160	// SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP
10161	// SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP
10162	// USER_CHANGE_PASSWORD_GROUP
10163	// BATCH_STARTED_GROUP
10164	// BATCH_COMPLETED_GROUP
10165	//
10166	// These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.
10167	//
10168	// For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).
10169	//
10170	// For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:
10171	// SELECT
10172	// UPDATE
10173	// INSERT
10174	// DELETE
10175	// EXECUTE
10176	// RECEIVE
10177	// REFERENCES
10178	//
10179	// The general form for defining an action to be audited is:
10180	// {action} ON {object} BY {principal}
10181	//
10182	// Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.
10183	//
10184	// For example:
10185	// SELECT on dbo.myTable by public
10186	// SELECT on DATABASE::myDatabase by public
10187	// SELECT on SCHEMA::mySchema by public
10188	//
10189	// For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)
10190	AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"`
10191	// StorageAccountSubscriptionID - Specifies the blob storage subscription Id.
10192	StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"`
10193	// IsStorageSecondaryKeyInUse - Specifies whether storageAccountAccessKey value is the storage's secondary key.
10194	IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"`
10195	// IsAzureMonitorTargetEnabled - Specifies whether audit events are sent to Azure Monitor.
10196	// In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true.
10197	//
10198	// When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.
10199	// Note that for server level audit you should use the 'master' database as {databaseName}.
10200	//
10201	// Diagnostic Settings URI format:
10202	// PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview
10203	//
10204	// For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)
10205	// or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
10206	IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"`
10207}
10208
10209// SQLPoolBlobAuditingPolicySQLPoolOperationListResult the response to a list Sql pool operations request
10210type SQLPoolBlobAuditingPolicySQLPoolOperationListResult struct {
10211	autorest.Response `json:"-"`
10212	// Value - READ-ONLY; Array of results.
10213	Value *[]SQLPoolOperation `json:"value,omitempty"`
10214	// NextLink - READ-ONLY; Link to retrieve next page of results.
10215	NextLink *string `json:"nextLink,omitempty"`
10216}
10217
10218// SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator provides access to a complete listing of
10219// SQLPoolOperation values.
10220type SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator struct {
10221	i    int
10222	page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage
10223}
10224
10225// NextWithContext advances to the next value.  If there was an error making
10226// the request the iterator does not advance and the error is returned.
10227func (iter *SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
10228	if tracing.IsEnabled() {
10229		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator.NextWithContext")
10230		defer func() {
10231			sc := -1
10232			if iter.Response().Response.Response != nil {
10233				sc = iter.Response().Response.Response.StatusCode
10234			}
10235			tracing.EndSpan(ctx, sc, err)
10236		}()
10237	}
10238	iter.i++
10239	if iter.i < len(iter.page.Values()) {
10240		return nil
10241	}
10242	err = iter.page.NextWithContext(ctx)
10243	if err != nil {
10244		iter.i--
10245		return err
10246	}
10247	iter.i = 0
10248	return nil
10249}
10250
10251// Next advances to the next value.  If there was an error making
10252// the request the iterator does not advance and the error is returned.
10253// Deprecated: Use NextWithContext() instead.
10254func (iter *SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) Next() error {
10255	return iter.NextWithContext(context.Background())
10256}
10257
10258// NotDone returns true if the enumeration should be started or is not yet complete.
10259func (iter SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) NotDone() bool {
10260	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10261}
10262
10263// Response returns the raw server response from the last page request.
10264func (iter SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) Response() SQLPoolBlobAuditingPolicySQLPoolOperationListResult {
10265	return iter.page.Response()
10266}
10267
10268// Value returns the current value or a zero-initialized value if the
10269// iterator has advanced beyond the end of the collection.
10270func (iter SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator) Value() SQLPoolOperation {
10271	if !iter.page.NotDone() {
10272		return SQLPoolOperation{}
10273	}
10274	return iter.page.Values()[iter.i]
10275}
10276
10277// Creates a new instance of the SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator type.
10278func NewSQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator(page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator {
10279	return SQLPoolBlobAuditingPolicySQLPoolOperationListResultIterator{page: page}
10280}
10281
10282// IsEmpty returns true if the ListResult contains no values.
10283func (spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult) IsEmpty() bool {
10284	return spbapspolr.Value == nil || len(*spbapspolr.Value) == 0
10285}
10286
10287// hasNextLink returns true if the NextLink is not empty.
10288func (spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult) hasNextLink() bool {
10289	return spbapspolr.NextLink != nil && len(*spbapspolr.NextLink) != 0
10290}
10291
10292// sQLPoolBlobAuditingPolicySQLPoolOperationListResultPreparer prepares a request to retrieve the next set of results.
10293// It returns nil if no more results exist.
10294func (spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult) sQLPoolBlobAuditingPolicySQLPoolOperationListResultPreparer(ctx context.Context) (*http.Request, error) {
10295	if !spbapspolr.hasNextLink() {
10296		return nil, nil
10297	}
10298	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10299		autorest.AsJSON(),
10300		autorest.AsGet(),
10301		autorest.WithBaseURL(to.String(spbapspolr.NextLink)))
10302}
10303
10304// SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage contains a page of SQLPoolOperation values.
10305type SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage struct {
10306	fn         func(context.Context, SQLPoolBlobAuditingPolicySQLPoolOperationListResult) (SQLPoolBlobAuditingPolicySQLPoolOperationListResult, error)
10307	spbapspolr SQLPoolBlobAuditingPolicySQLPoolOperationListResult
10308}
10309
10310// NextWithContext advances to the next page of values.  If there was an error making
10311// the request the page does not advance and the error is returned.
10312func (page *SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) NextWithContext(ctx context.Context) (err error) {
10313	if tracing.IsEnabled() {
10314		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage.NextWithContext")
10315		defer func() {
10316			sc := -1
10317			if page.Response().Response.Response != nil {
10318				sc = page.Response().Response.Response.StatusCode
10319			}
10320			tracing.EndSpan(ctx, sc, err)
10321		}()
10322	}
10323	for {
10324		next, err := page.fn(ctx, page.spbapspolr)
10325		if err != nil {
10326			return err
10327		}
10328		page.spbapspolr = next
10329		if !next.hasNextLink() || !next.IsEmpty() {
10330			break
10331		}
10332	}
10333	return nil
10334}
10335
10336// Next advances to the next page of values.  If there was an error making
10337// the request the page does not advance and the error is returned.
10338// Deprecated: Use NextWithContext() instead.
10339func (page *SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) Next() error {
10340	return page.NextWithContext(context.Background())
10341}
10342
10343// NotDone returns true if the page enumeration should be started or is not yet complete.
10344func (page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) NotDone() bool {
10345	return !page.spbapspolr.IsEmpty()
10346}
10347
10348// Response returns the raw server response from the last page request.
10349func (page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) Response() SQLPoolBlobAuditingPolicySQLPoolOperationListResult {
10350	return page.spbapspolr
10351}
10352
10353// Values returns the slice of values for the current page or nil if there are no values.
10354func (page SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage) Values() []SQLPoolOperation {
10355	if page.spbapspolr.IsEmpty() {
10356		return nil
10357	}
10358	return *page.spbapspolr.Value
10359}
10360
10361// Creates a new instance of the SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage type.
10362func NewSQLPoolBlobAuditingPolicySQLPoolOperationListResultPage(cur SQLPoolBlobAuditingPolicySQLPoolOperationListResult, getNextPage func(context.Context, SQLPoolBlobAuditingPolicySQLPoolOperationListResult) (SQLPoolBlobAuditingPolicySQLPoolOperationListResult, error)) SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage {
10363	return SQLPoolBlobAuditingPolicySQLPoolOperationListResultPage{
10364		fn:         getNextPage,
10365		spbapspolr: cur,
10366	}
10367}
10368
10369// SQLPoolColumn a Sql pool column resource.
10370type SQLPoolColumn struct {
10371	autorest.Response `json:"-"`
10372	// SQLPoolColumnProperties - Resource properties.
10373	*SQLPoolColumnProperties `json:"properties,omitempty"`
10374	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
10375	ID *string `json:"id,omitempty"`
10376	// Name - READ-ONLY; The name of the resource
10377	Name *string `json:"name,omitempty"`
10378	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
10379	Type *string `json:"type,omitempty"`
10380}
10381
10382// MarshalJSON is the custom marshaler for SQLPoolColumn.
10383func (spc SQLPoolColumn) MarshalJSON() ([]byte, error) {
10384	objectMap := make(map[string]interface{})
10385	if spc.SQLPoolColumnProperties != nil {
10386		objectMap["properties"] = spc.SQLPoolColumnProperties
10387	}
10388	return json.Marshal(objectMap)
10389}
10390
10391// UnmarshalJSON is the custom unmarshaler for SQLPoolColumn struct.
10392func (spc *SQLPoolColumn) UnmarshalJSON(body []byte) error {
10393	var m map[string]*json.RawMessage
10394	err := json.Unmarshal(body, &m)
10395	if err != nil {
10396		return err
10397	}
10398	for k, v := range m {
10399		switch k {
10400		case "properties":
10401			if v != nil {
10402				var SQLPoolColumnProperties SQLPoolColumnProperties
10403				err = json.Unmarshal(*v, &SQLPoolColumnProperties)
10404				if err != nil {
10405					return err
10406				}
10407				spc.SQLPoolColumnProperties = &SQLPoolColumnProperties
10408			}
10409		case "id":
10410			if v != nil {
10411				var ID string
10412				err = json.Unmarshal(*v, &ID)
10413				if err != nil {
10414					return err
10415				}
10416				spc.ID = &ID
10417			}
10418		case "name":
10419			if v != nil {
10420				var name string
10421				err = json.Unmarshal(*v, &name)
10422				if err != nil {
10423					return err
10424				}
10425				spc.Name = &name
10426			}
10427		case "type":
10428			if v != nil {
10429				var typeVar string
10430				err = json.Unmarshal(*v, &typeVar)
10431				if err != nil {
10432					return err
10433				}
10434				spc.Type = &typeVar
10435			}
10436		}
10437	}
10438
10439	return nil
10440}
10441
10442// SQLPoolColumnListResult a list of Sql pool columns.
10443type SQLPoolColumnListResult struct {
10444	autorest.Response `json:"-"`
10445	// Value - READ-ONLY; Array of results.
10446	Value *[]SQLPoolColumn `json:"value,omitempty"`
10447	// NextLink - READ-ONLY; Link to retrieve next page of results.
10448	NextLink *string `json:"nextLink,omitempty"`
10449}
10450
10451// SQLPoolColumnListResultIterator provides access to a complete listing of SQLPoolColumn values.
10452type SQLPoolColumnListResultIterator struct {
10453	i    int
10454	page SQLPoolColumnListResultPage
10455}
10456
10457// NextWithContext advances to the next value.  If there was an error making
10458// the request the iterator does not advance and the error is returned.
10459func (iter *SQLPoolColumnListResultIterator) NextWithContext(ctx context.Context) (err error) {
10460	if tracing.IsEnabled() {
10461		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolColumnListResultIterator.NextWithContext")
10462		defer func() {
10463			sc := -1
10464			if iter.Response().Response.Response != nil {
10465				sc = iter.Response().Response.Response.StatusCode
10466			}
10467			tracing.EndSpan(ctx, sc, err)
10468		}()
10469	}
10470	iter.i++
10471	if iter.i < len(iter.page.Values()) {
10472		return nil
10473	}
10474	err = iter.page.NextWithContext(ctx)
10475	if err != nil {
10476		iter.i--
10477		return err
10478	}
10479	iter.i = 0
10480	return nil
10481}
10482
10483// Next advances to the next value.  If there was an error making
10484// the request the iterator does not advance and the error is returned.
10485// Deprecated: Use NextWithContext() instead.
10486func (iter *SQLPoolColumnListResultIterator) Next() error {
10487	return iter.NextWithContext(context.Background())
10488}
10489
10490// NotDone returns true if the enumeration should be started or is not yet complete.
10491func (iter SQLPoolColumnListResultIterator) NotDone() bool {
10492	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10493}
10494
10495// Response returns the raw server response from the last page request.
10496func (iter SQLPoolColumnListResultIterator) Response() SQLPoolColumnListResult {
10497	return iter.page.Response()
10498}
10499
10500// Value returns the current value or a zero-initialized value if the
10501// iterator has advanced beyond the end of the collection.
10502func (iter SQLPoolColumnListResultIterator) Value() SQLPoolColumn {
10503	if !iter.page.NotDone() {
10504		return SQLPoolColumn{}
10505	}
10506	return iter.page.Values()[iter.i]
10507}
10508
10509// Creates a new instance of the SQLPoolColumnListResultIterator type.
10510func NewSQLPoolColumnListResultIterator(page SQLPoolColumnListResultPage) SQLPoolColumnListResultIterator {
10511	return SQLPoolColumnListResultIterator{page: page}
10512}
10513
10514// IsEmpty returns true if the ListResult contains no values.
10515func (spclr SQLPoolColumnListResult) IsEmpty() bool {
10516	return spclr.Value == nil || len(*spclr.Value) == 0
10517}
10518
10519// hasNextLink returns true if the NextLink is not empty.
10520func (spclr SQLPoolColumnListResult) hasNextLink() bool {
10521	return spclr.NextLink != nil && len(*spclr.NextLink) != 0
10522}
10523
10524// sQLPoolColumnListResultPreparer prepares a request to retrieve the next set of results.
10525// It returns nil if no more results exist.
10526func (spclr SQLPoolColumnListResult) sQLPoolColumnListResultPreparer(ctx context.Context) (*http.Request, error) {
10527	if !spclr.hasNextLink() {
10528		return nil, nil
10529	}
10530	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10531		autorest.AsJSON(),
10532		autorest.AsGet(),
10533		autorest.WithBaseURL(to.String(spclr.NextLink)))
10534}
10535
10536// SQLPoolColumnListResultPage contains a page of SQLPoolColumn values.
10537type SQLPoolColumnListResultPage struct {
10538	fn    func(context.Context, SQLPoolColumnListResult) (SQLPoolColumnListResult, error)
10539	spclr SQLPoolColumnListResult
10540}
10541
10542// NextWithContext advances to the next page of values.  If there was an error making
10543// the request the page does not advance and the error is returned.
10544func (page *SQLPoolColumnListResultPage) NextWithContext(ctx context.Context) (err error) {
10545	if tracing.IsEnabled() {
10546		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolColumnListResultPage.NextWithContext")
10547		defer func() {
10548			sc := -1
10549			if page.Response().Response.Response != nil {
10550				sc = page.Response().Response.Response.StatusCode
10551			}
10552			tracing.EndSpan(ctx, sc, err)
10553		}()
10554	}
10555	for {
10556		next, err := page.fn(ctx, page.spclr)
10557		if err != nil {
10558			return err
10559		}
10560		page.spclr = next
10561		if !next.hasNextLink() || !next.IsEmpty() {
10562			break
10563		}
10564	}
10565	return nil
10566}
10567
10568// Next advances to the next page of values.  If there was an error making
10569// the request the page does not advance and the error is returned.
10570// Deprecated: Use NextWithContext() instead.
10571func (page *SQLPoolColumnListResultPage) Next() error {
10572	return page.NextWithContext(context.Background())
10573}
10574
10575// NotDone returns true if the page enumeration should be started or is not yet complete.
10576func (page SQLPoolColumnListResultPage) NotDone() bool {
10577	return !page.spclr.IsEmpty()
10578}
10579
10580// Response returns the raw server response from the last page request.
10581func (page SQLPoolColumnListResultPage) Response() SQLPoolColumnListResult {
10582	return page.spclr
10583}
10584
10585// Values returns the slice of values for the current page or nil if there are no values.
10586func (page SQLPoolColumnListResultPage) Values() []SQLPoolColumn {
10587	if page.spclr.IsEmpty() {
10588		return nil
10589	}
10590	return *page.spclr.Value
10591}
10592
10593// Creates a new instance of the SQLPoolColumnListResultPage type.
10594func NewSQLPoolColumnListResultPage(cur SQLPoolColumnListResult, getNextPage func(context.Context, SQLPoolColumnListResult) (SQLPoolColumnListResult, error)) SQLPoolColumnListResultPage {
10595	return SQLPoolColumnListResultPage{
10596		fn:    getNextPage,
10597		spclr: cur,
10598	}
10599}
10600
10601// SQLPoolColumnProperties sql pool column properties.
10602type SQLPoolColumnProperties struct {
10603	// ColumnType - The column data type. Possible values include: 'Image', 'Text', 'Uniqueidentifier', 'Date', 'Time', 'Datetime2', 'Datetimeoffset', 'Tinyint', 'Smallint', 'Int', 'Smalldatetime', 'Real', 'Money', 'Datetime', 'Float', 'SQLVariant', 'Ntext', 'Bit', 'Decimal', 'Numeric', 'Smallmoney', 'Bigint', 'Hierarchyid', 'Geometry', 'Geography', 'Varbinary', 'Varchar', 'Binary', 'Char', 'Timestamp', 'Nvarchar', 'Nchar', 'XML', 'Sysname'
10604	ColumnType ColumnDataType `json:"columnType,omitempty"`
10605	// IsComputed - READ-ONLY; Indicates whether column value is computed or not
10606	IsComputed *bool `json:"isComputed,omitempty"`
10607}
10608
10609// MarshalJSON is the custom marshaler for SQLPoolColumnProperties.
10610func (spcp SQLPoolColumnProperties) MarshalJSON() ([]byte, error) {
10611	objectMap := make(map[string]interface{})
10612	if spcp.ColumnType != "" {
10613		objectMap["columnType"] = spcp.ColumnType
10614	}
10615	return json.Marshal(objectMap)
10616}
10617
10618// SQLPoolConnectionPolicy a Sql pool connection policy.
10619type SQLPoolConnectionPolicy struct {
10620	autorest.Response `json:"-"`
10621	// Kind - READ-ONLY; Resource kind.
10622	Kind *string `json:"kind,omitempty"`
10623	// Location - READ-ONLY; Resource location.
10624	Location *string `json:"location,omitempty"`
10625	// SQLPoolConnectionPolicyProperties - Resource properties.
10626	*SQLPoolConnectionPolicyProperties `json:"properties,omitempty"`
10627	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
10628	ID *string `json:"id,omitempty"`
10629	// Name - READ-ONLY; The name of the resource
10630	Name *string `json:"name,omitempty"`
10631	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
10632	Type *string `json:"type,omitempty"`
10633}
10634
10635// MarshalJSON is the custom marshaler for SQLPoolConnectionPolicy.
10636func (spcp SQLPoolConnectionPolicy) MarshalJSON() ([]byte, error) {
10637	objectMap := make(map[string]interface{})
10638	if spcp.SQLPoolConnectionPolicyProperties != nil {
10639		objectMap["properties"] = spcp.SQLPoolConnectionPolicyProperties
10640	}
10641	return json.Marshal(objectMap)
10642}
10643
10644// UnmarshalJSON is the custom unmarshaler for SQLPoolConnectionPolicy struct.
10645func (spcp *SQLPoolConnectionPolicy) UnmarshalJSON(body []byte) error {
10646	var m map[string]*json.RawMessage
10647	err := json.Unmarshal(body, &m)
10648	if err != nil {
10649		return err
10650	}
10651	for k, v := range m {
10652		switch k {
10653		case "kind":
10654			if v != nil {
10655				var kind string
10656				err = json.Unmarshal(*v, &kind)
10657				if err != nil {
10658					return err
10659				}
10660				spcp.Kind = &kind
10661			}
10662		case "location":
10663			if v != nil {
10664				var location string
10665				err = json.Unmarshal(*v, &location)
10666				if err != nil {
10667					return err
10668				}
10669				spcp.Location = &location
10670			}
10671		case "properties":
10672			if v != nil {
10673				var SQLPoolConnectionPolicyProperties SQLPoolConnectionPolicyProperties
10674				err = json.Unmarshal(*v, &SQLPoolConnectionPolicyProperties)
10675				if err != nil {
10676					return err
10677				}
10678				spcp.SQLPoolConnectionPolicyProperties = &SQLPoolConnectionPolicyProperties
10679			}
10680		case "id":
10681			if v != nil {
10682				var ID string
10683				err = json.Unmarshal(*v, &ID)
10684				if err != nil {
10685					return err
10686				}
10687				spcp.ID = &ID
10688			}
10689		case "name":
10690			if v != nil {
10691				var name string
10692				err = json.Unmarshal(*v, &name)
10693				if err != nil {
10694					return err
10695				}
10696				spcp.Name = &name
10697			}
10698		case "type":
10699			if v != nil {
10700				var typeVar string
10701				err = json.Unmarshal(*v, &typeVar)
10702				if err != nil {
10703					return err
10704				}
10705				spcp.Type = &typeVar
10706			}
10707		}
10708	}
10709
10710	return nil
10711}
10712
10713// SQLPoolConnectionPolicyProperties properties of a Sql pool connection policy.
10714type SQLPoolConnectionPolicyProperties struct {
10715	// SecurityEnabledAccess - The state of security access.
10716	SecurityEnabledAccess *string `json:"securityEnabledAccess,omitempty"`
10717	// ProxyDNSName - The fully qualified host name of the auditing proxy.
10718	ProxyDNSName *string `json:"proxyDnsName,omitempty"`
10719	// ProxyPort - The port number of the auditing proxy.
10720	ProxyPort *string `json:"proxyPort,omitempty"`
10721	// Visibility - The visibility of the auditing proxy.
10722	Visibility *string `json:"visibility,omitempty"`
10723	// UseServerDefault - Whether server default is enabled or disabled.
10724	UseServerDefault *string `json:"useServerDefault,omitempty"`
10725	// RedirectionState - The state of proxy redirection.
10726	RedirectionState *string `json:"redirectionState,omitempty"`
10727	// State - The connection policy state.
10728	State *string `json:"state,omitempty"`
10729}
10730
10731// SQLPoolInfoListResult list of SQL pools
10732type SQLPoolInfoListResult struct {
10733	autorest.Response `json:"-"`
10734	// NextLink - Link to the next page of results
10735	NextLink *string `json:"nextLink,omitempty"`
10736	// Value - List of SQL pools
10737	Value *[]SQLPool `json:"value,omitempty"`
10738}
10739
10740// SQLPoolInfoListResultIterator provides access to a complete listing of SQLPool values.
10741type SQLPoolInfoListResultIterator struct {
10742	i    int
10743	page SQLPoolInfoListResultPage
10744}
10745
10746// NextWithContext advances to the next value.  If there was an error making
10747// the request the iterator does not advance and the error is returned.
10748func (iter *SQLPoolInfoListResultIterator) NextWithContext(ctx context.Context) (err error) {
10749	if tracing.IsEnabled() {
10750		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolInfoListResultIterator.NextWithContext")
10751		defer func() {
10752			sc := -1
10753			if iter.Response().Response.Response != nil {
10754				sc = iter.Response().Response.Response.StatusCode
10755			}
10756			tracing.EndSpan(ctx, sc, err)
10757		}()
10758	}
10759	iter.i++
10760	if iter.i < len(iter.page.Values()) {
10761		return nil
10762	}
10763	err = iter.page.NextWithContext(ctx)
10764	if err != nil {
10765		iter.i--
10766		return err
10767	}
10768	iter.i = 0
10769	return nil
10770}
10771
10772// Next advances to the next value.  If there was an error making
10773// the request the iterator does not advance and the error is returned.
10774// Deprecated: Use NextWithContext() instead.
10775func (iter *SQLPoolInfoListResultIterator) Next() error {
10776	return iter.NextWithContext(context.Background())
10777}
10778
10779// NotDone returns true if the enumeration should be started or is not yet complete.
10780func (iter SQLPoolInfoListResultIterator) NotDone() bool {
10781	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10782}
10783
10784// Response returns the raw server response from the last page request.
10785func (iter SQLPoolInfoListResultIterator) Response() SQLPoolInfoListResult {
10786	return iter.page.Response()
10787}
10788
10789// Value returns the current value or a zero-initialized value if the
10790// iterator has advanced beyond the end of the collection.
10791func (iter SQLPoolInfoListResultIterator) Value() SQLPool {
10792	if !iter.page.NotDone() {
10793		return SQLPool{}
10794	}
10795	return iter.page.Values()[iter.i]
10796}
10797
10798// Creates a new instance of the SQLPoolInfoListResultIterator type.
10799func NewSQLPoolInfoListResultIterator(page SQLPoolInfoListResultPage) SQLPoolInfoListResultIterator {
10800	return SQLPoolInfoListResultIterator{page: page}
10801}
10802
10803// IsEmpty returns true if the ListResult contains no values.
10804func (spilr SQLPoolInfoListResult) IsEmpty() bool {
10805	return spilr.Value == nil || len(*spilr.Value) == 0
10806}
10807
10808// hasNextLink returns true if the NextLink is not empty.
10809func (spilr SQLPoolInfoListResult) hasNextLink() bool {
10810	return spilr.NextLink != nil && len(*spilr.NextLink) != 0
10811}
10812
10813// sQLPoolInfoListResultPreparer prepares a request to retrieve the next set of results.
10814// It returns nil if no more results exist.
10815func (spilr SQLPoolInfoListResult) sQLPoolInfoListResultPreparer(ctx context.Context) (*http.Request, error) {
10816	if !spilr.hasNextLink() {
10817		return nil, nil
10818	}
10819	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10820		autorest.AsJSON(),
10821		autorest.AsGet(),
10822		autorest.WithBaseURL(to.String(spilr.NextLink)))
10823}
10824
10825// SQLPoolInfoListResultPage contains a page of SQLPool values.
10826type SQLPoolInfoListResultPage struct {
10827	fn    func(context.Context, SQLPoolInfoListResult) (SQLPoolInfoListResult, error)
10828	spilr SQLPoolInfoListResult
10829}
10830
10831// NextWithContext advances to the next page of values.  If there was an error making
10832// the request the page does not advance and the error is returned.
10833func (page *SQLPoolInfoListResultPage) NextWithContext(ctx context.Context) (err error) {
10834	if tracing.IsEnabled() {
10835		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolInfoListResultPage.NextWithContext")
10836		defer func() {
10837			sc := -1
10838			if page.Response().Response.Response != nil {
10839				sc = page.Response().Response.Response.StatusCode
10840			}
10841			tracing.EndSpan(ctx, sc, err)
10842		}()
10843	}
10844	for {
10845		next, err := page.fn(ctx, page.spilr)
10846		if err != nil {
10847			return err
10848		}
10849		page.spilr = next
10850		if !next.hasNextLink() || !next.IsEmpty() {
10851			break
10852		}
10853	}
10854	return nil
10855}
10856
10857// Next advances to the next page of values.  If there was an error making
10858// the request the page does not advance and the error is returned.
10859// Deprecated: Use NextWithContext() instead.
10860func (page *SQLPoolInfoListResultPage) Next() error {
10861	return page.NextWithContext(context.Background())
10862}
10863
10864// NotDone returns true if the page enumeration should be started or is not yet complete.
10865func (page SQLPoolInfoListResultPage) NotDone() bool {
10866	return !page.spilr.IsEmpty()
10867}
10868
10869// Response returns the raw server response from the last page request.
10870func (page SQLPoolInfoListResultPage) Response() SQLPoolInfoListResult {
10871	return page.spilr
10872}
10873
10874// Values returns the slice of values for the current page or nil if there are no values.
10875func (page SQLPoolInfoListResultPage) Values() []SQLPool {
10876	if page.spilr.IsEmpty() {
10877		return nil
10878	}
10879	return *page.spilr.Value
10880}
10881
10882// Creates a new instance of the SQLPoolInfoListResultPage type.
10883func NewSQLPoolInfoListResultPage(cur SQLPoolInfoListResult, getNextPage func(context.Context, SQLPoolInfoListResult) (SQLPoolInfoListResult, error)) SQLPoolInfoListResultPage {
10884	return SQLPoolInfoListResultPage{
10885		fn:    getNextPage,
10886		spilr: cur,
10887	}
10888}
10889
10890// SQLPoolOperation a Sql pool operation.
10891type SQLPoolOperation struct {
10892	// SQLPoolOperationProperties - Resource properties.
10893	*SQLPoolOperationProperties `json:"properties,omitempty"`
10894	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
10895	ID *string `json:"id,omitempty"`
10896	// Name - READ-ONLY; The name of the resource
10897	Name *string `json:"name,omitempty"`
10898	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
10899	Type *string `json:"type,omitempty"`
10900}
10901
10902// MarshalJSON is the custom marshaler for SQLPoolOperation.
10903func (spo SQLPoolOperation) MarshalJSON() ([]byte, error) {
10904	objectMap := make(map[string]interface{})
10905	if spo.SQLPoolOperationProperties != nil {
10906		objectMap["properties"] = spo.SQLPoolOperationProperties
10907	}
10908	return json.Marshal(objectMap)
10909}
10910
10911// UnmarshalJSON is the custom unmarshaler for SQLPoolOperation struct.
10912func (spo *SQLPoolOperation) UnmarshalJSON(body []byte) error {
10913	var m map[string]*json.RawMessage
10914	err := json.Unmarshal(body, &m)
10915	if err != nil {
10916		return err
10917	}
10918	for k, v := range m {
10919		switch k {
10920		case "properties":
10921			if v != nil {
10922				var SQLPoolOperationProperties SQLPoolOperationProperties
10923				err = json.Unmarshal(*v, &SQLPoolOperationProperties)
10924				if err != nil {
10925					return err
10926				}
10927				spo.SQLPoolOperationProperties = &SQLPoolOperationProperties
10928			}
10929		case "id":
10930			if v != nil {
10931				var ID string
10932				err = json.Unmarshal(*v, &ID)
10933				if err != nil {
10934					return err
10935				}
10936				spo.ID = &ID
10937			}
10938		case "name":
10939			if v != nil {
10940				var name string
10941				err = json.Unmarshal(*v, &name)
10942				if err != nil {
10943					return err
10944				}
10945				spo.Name = &name
10946			}
10947		case "type":
10948			if v != nil {
10949				var typeVar string
10950				err = json.Unmarshal(*v, &typeVar)
10951				if err != nil {
10952					return err
10953				}
10954				spo.Type = &typeVar
10955			}
10956		}
10957	}
10958
10959	return nil
10960}
10961
10962// SQLPoolOperationProperties the properties of a Sql pool operation.
10963type SQLPoolOperationProperties struct {
10964	// DatabaseName - READ-ONLY; The name of the Sql pool the operation is being performed on.
10965	DatabaseName *string `json:"databaseName,omitempty"`
10966	// Operation - READ-ONLY; The name of operation.
10967	Operation *string `json:"operation,omitempty"`
10968	// OperationFriendlyName - READ-ONLY; The friendly name of operation.
10969	OperationFriendlyName *string `json:"operationFriendlyName,omitempty"`
10970	// PercentComplete - READ-ONLY; The percentage of the operation completed.
10971	PercentComplete *int32 `json:"percentComplete,omitempty"`
10972	// ServerName - READ-ONLY; The name of the server.
10973	ServerName *string `json:"serverName,omitempty"`
10974	// StartTime - READ-ONLY; The operation start time.
10975	StartTime *date.Time `json:"startTime,omitempty"`
10976	// State - READ-ONLY; The operation state. Possible values include: 'Pending', 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled'
10977	State ManagementOperationState `json:"state,omitempty"`
10978	// ErrorCode - READ-ONLY; The operation error code.
10979	ErrorCode *int32 `json:"errorCode,omitempty"`
10980	// ErrorDescription - READ-ONLY; The operation error description.
10981	ErrorDescription *string `json:"errorDescription,omitempty"`
10982	// ErrorSeverity - READ-ONLY; The operation error severity.
10983	ErrorSeverity *int32 `json:"errorSeverity,omitempty"`
10984	// IsUserError - READ-ONLY; Whether or not the error is a user error.
10985	IsUserError *bool `json:"isUserError,omitempty"`
10986	// EstimatedCompletionTime - READ-ONLY; The estimated completion time of the operation.
10987	EstimatedCompletionTime *date.Time `json:"estimatedCompletionTime,omitempty"`
10988	// Description - READ-ONLY; The operation description.
10989	Description *string `json:"description,omitempty"`
10990	// IsCancellable - READ-ONLY; Whether the operation can be cancelled.
10991	IsCancellable *bool `json:"isCancellable,omitempty"`
10992}
10993
10994// SQLPoolPatchInfo a SQL Analytics pool patch info
10995type SQLPoolPatchInfo struct {
10996	// Tags - Resource tags.
10997	Tags map[string]*string `json:"tags"`
10998	// Location - The geo-location where the resource lives
10999	Location *string `json:"location,omitempty"`
11000	// Sku - SQL pool SKU
11001	Sku *Sku `json:"sku,omitempty"`
11002	// SQLPoolResourceProperties - SQL pool properties
11003	*SQLPoolResourceProperties `json:"properties,omitempty"`
11004}
11005
11006// MarshalJSON is the custom marshaler for SQLPoolPatchInfo.
11007func (sppi SQLPoolPatchInfo) MarshalJSON() ([]byte, error) {
11008	objectMap := make(map[string]interface{})
11009	if sppi.Tags != nil {
11010		objectMap["tags"] = sppi.Tags
11011	}
11012	if sppi.Location != nil {
11013		objectMap["location"] = sppi.Location
11014	}
11015	if sppi.Sku != nil {
11016		objectMap["sku"] = sppi.Sku
11017	}
11018	if sppi.SQLPoolResourceProperties != nil {
11019		objectMap["properties"] = sppi.SQLPoolResourceProperties
11020	}
11021	return json.Marshal(objectMap)
11022}
11023
11024// UnmarshalJSON is the custom unmarshaler for SQLPoolPatchInfo struct.
11025func (sppi *SQLPoolPatchInfo) UnmarshalJSON(body []byte) error {
11026	var m map[string]*json.RawMessage
11027	err := json.Unmarshal(body, &m)
11028	if err != nil {
11029		return err
11030	}
11031	for k, v := range m {
11032		switch k {
11033		case "tags":
11034			if v != nil {
11035				var tags map[string]*string
11036				err = json.Unmarshal(*v, &tags)
11037				if err != nil {
11038					return err
11039				}
11040				sppi.Tags = tags
11041			}
11042		case "location":
11043			if v != nil {
11044				var location string
11045				err = json.Unmarshal(*v, &location)
11046				if err != nil {
11047					return err
11048				}
11049				sppi.Location = &location
11050			}
11051		case "sku":
11052			if v != nil {
11053				var sku Sku
11054				err = json.Unmarshal(*v, &sku)
11055				if err != nil {
11056					return err
11057				}
11058				sppi.Sku = &sku
11059			}
11060		case "properties":
11061			if v != nil {
11062				var SQLPoolResourceProperties SQLPoolResourceProperties
11063				err = json.Unmarshal(*v, &SQLPoolResourceProperties)
11064				if err != nil {
11065					return err
11066				}
11067				sppi.SQLPoolResourceProperties = &SQLPoolResourceProperties
11068			}
11069		}
11070	}
11071
11072	return nil
11073}
11074
11075// SQLPoolResourceProperties properties of a SQL Analytics pool
11076type SQLPoolResourceProperties struct {
11077	// MaxSizeBytes - Maximum size in bytes
11078	MaxSizeBytes *int64 `json:"maxSizeBytes,omitempty"`
11079	// Collation - Collation mode
11080	Collation *string `json:"collation,omitempty"`
11081	// SourceDatabaseID - Source database to create from
11082	SourceDatabaseID *string `json:"sourceDatabaseId,omitempty"`
11083	// RecoverableDatabaseID - Backup database to restore from
11084	RecoverableDatabaseID *string `json:"recoverableDatabaseId,omitempty"`
11085	// ProvisioningState - Resource state
11086	ProvisioningState *string `json:"provisioningState,omitempty"`
11087	// Status - Resource status
11088	Status *string `json:"status,omitempty"`
11089	// RestorePointInTime - Snapshot time to restore
11090	RestorePointInTime *string `json:"restorePointInTime,omitempty"`
11091	// CreateMode - What is this?
11092	CreateMode *string `json:"createMode,omitempty"`
11093	// CreationDate - Date the SQL pool was created
11094	CreationDate *date.Time `json:"creationDate,omitempty"`
11095	// StorageAccountType - The storage account type used to store backups for this sql pool. Possible values include: 'GRS', 'LRS', 'ZRS'
11096	StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
11097}
11098
11099// SQLPoolRestorePointsCreateFuture an abstraction for monitoring and retrieving the results of a
11100// long-running operation.
11101type SQLPoolRestorePointsCreateFuture struct {
11102	azure.FutureAPI
11103	// Result returns the result of the asynchronous operation.
11104	// If the operation has not completed it will return an error.
11105	Result func(SQLPoolRestorePointsClient) (RestorePoint, error)
11106}
11107
11108// SQLPoolSchema a Sql pool schema resource.
11109type SQLPoolSchema struct {
11110	autorest.Response `json:"-"`
11111	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
11112	ID *string `json:"id,omitempty"`
11113	// Name - READ-ONLY; The name of the resource
11114	Name *string `json:"name,omitempty"`
11115	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
11116	Type *string `json:"type,omitempty"`
11117}
11118
11119// SQLPoolSchemaListResult a list of Sql pool schemas.
11120type SQLPoolSchemaListResult struct {
11121	autorest.Response `json:"-"`
11122	// Value - READ-ONLY; Array of results.
11123	Value *[]SQLPoolSchema `json:"value,omitempty"`
11124	// NextLink - READ-ONLY; Link to retrieve next page of results.
11125	NextLink *string `json:"nextLink,omitempty"`
11126}
11127
11128// SQLPoolSchemaListResultIterator provides access to a complete listing of SQLPoolSchema values.
11129type SQLPoolSchemaListResultIterator struct {
11130	i    int
11131	page SQLPoolSchemaListResultPage
11132}
11133
11134// NextWithContext advances to the next value.  If there was an error making
11135// the request the iterator does not advance and the error is returned.
11136func (iter *SQLPoolSchemaListResultIterator) NextWithContext(ctx context.Context) (err error) {
11137	if tracing.IsEnabled() {
11138		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSchemaListResultIterator.NextWithContext")
11139		defer func() {
11140			sc := -1
11141			if iter.Response().Response.Response != nil {
11142				sc = iter.Response().Response.Response.StatusCode
11143			}
11144			tracing.EndSpan(ctx, sc, err)
11145		}()
11146	}
11147	iter.i++
11148	if iter.i < len(iter.page.Values()) {
11149		return nil
11150	}
11151	err = iter.page.NextWithContext(ctx)
11152	if err != nil {
11153		iter.i--
11154		return err
11155	}
11156	iter.i = 0
11157	return nil
11158}
11159
11160// Next advances to the next value.  If there was an error making
11161// the request the iterator does not advance and the error is returned.
11162// Deprecated: Use NextWithContext() instead.
11163func (iter *SQLPoolSchemaListResultIterator) Next() error {
11164	return iter.NextWithContext(context.Background())
11165}
11166
11167// NotDone returns true if the enumeration should be started or is not yet complete.
11168func (iter SQLPoolSchemaListResultIterator) NotDone() bool {
11169	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11170}
11171
11172// Response returns the raw server response from the last page request.
11173func (iter SQLPoolSchemaListResultIterator) Response() SQLPoolSchemaListResult {
11174	return iter.page.Response()
11175}
11176
11177// Value returns the current value or a zero-initialized value if the
11178// iterator has advanced beyond the end of the collection.
11179func (iter SQLPoolSchemaListResultIterator) Value() SQLPoolSchema {
11180	if !iter.page.NotDone() {
11181		return SQLPoolSchema{}
11182	}
11183	return iter.page.Values()[iter.i]
11184}
11185
11186// Creates a new instance of the SQLPoolSchemaListResultIterator type.
11187func NewSQLPoolSchemaListResultIterator(page SQLPoolSchemaListResultPage) SQLPoolSchemaListResultIterator {
11188	return SQLPoolSchemaListResultIterator{page: page}
11189}
11190
11191// IsEmpty returns true if the ListResult contains no values.
11192func (spslr SQLPoolSchemaListResult) IsEmpty() bool {
11193	return spslr.Value == nil || len(*spslr.Value) == 0
11194}
11195
11196// hasNextLink returns true if the NextLink is not empty.
11197func (spslr SQLPoolSchemaListResult) hasNextLink() bool {
11198	return spslr.NextLink != nil && len(*spslr.NextLink) != 0
11199}
11200
11201// sQLPoolSchemaListResultPreparer prepares a request to retrieve the next set of results.
11202// It returns nil if no more results exist.
11203func (spslr SQLPoolSchemaListResult) sQLPoolSchemaListResultPreparer(ctx context.Context) (*http.Request, error) {
11204	if !spslr.hasNextLink() {
11205		return nil, nil
11206	}
11207	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11208		autorest.AsJSON(),
11209		autorest.AsGet(),
11210		autorest.WithBaseURL(to.String(spslr.NextLink)))
11211}
11212
11213// SQLPoolSchemaListResultPage contains a page of SQLPoolSchema values.
11214type SQLPoolSchemaListResultPage struct {
11215	fn    func(context.Context, SQLPoolSchemaListResult) (SQLPoolSchemaListResult, error)
11216	spslr SQLPoolSchemaListResult
11217}
11218
11219// NextWithContext advances to the next page of values.  If there was an error making
11220// the request the page does not advance and the error is returned.
11221func (page *SQLPoolSchemaListResultPage) NextWithContext(ctx context.Context) (err error) {
11222	if tracing.IsEnabled() {
11223		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolSchemaListResultPage.NextWithContext")
11224		defer func() {
11225			sc := -1
11226			if page.Response().Response.Response != nil {
11227				sc = page.Response().Response.Response.StatusCode
11228			}
11229			tracing.EndSpan(ctx, sc, err)
11230		}()
11231	}
11232	for {
11233		next, err := page.fn(ctx, page.spslr)
11234		if err != nil {
11235			return err
11236		}
11237		page.spslr = next
11238		if !next.hasNextLink() || !next.IsEmpty() {
11239			break
11240		}
11241	}
11242	return nil
11243}
11244
11245// Next advances to the next page of values.  If there was an error making
11246// the request the page does not advance and the error is returned.
11247// Deprecated: Use NextWithContext() instead.
11248func (page *SQLPoolSchemaListResultPage) Next() error {
11249	return page.NextWithContext(context.Background())
11250}
11251
11252// NotDone returns true if the page enumeration should be started or is not yet complete.
11253func (page SQLPoolSchemaListResultPage) NotDone() bool {
11254	return !page.spslr.IsEmpty()
11255}
11256
11257// Response returns the raw server response from the last page request.
11258func (page SQLPoolSchemaListResultPage) Response() SQLPoolSchemaListResult {
11259	return page.spslr
11260}
11261
11262// Values returns the slice of values for the current page or nil if there are no values.
11263func (page SQLPoolSchemaListResultPage) Values() []SQLPoolSchema {
11264	if page.spslr.IsEmpty() {
11265		return nil
11266	}
11267	return *page.spslr.Value
11268}
11269
11270// Creates a new instance of the SQLPoolSchemaListResultPage type.
11271func NewSQLPoolSchemaListResultPage(cur SQLPoolSchemaListResult, getNextPage func(context.Context, SQLPoolSchemaListResult) (SQLPoolSchemaListResult, error)) SQLPoolSchemaListResultPage {
11272	return SQLPoolSchemaListResultPage{
11273		fn:    getNextPage,
11274		spslr: cur,
11275	}
11276}
11277
11278// SQLPoolsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
11279// operation.
11280type SQLPoolsCreateFuture struct {
11281	azure.FutureAPI
11282	// Result returns the result of the asynchronous operation.
11283	// If the operation has not completed it will return an error.
11284	Result func(SQLPoolsClient) (SQLPool, error)
11285}
11286
11287// SQLPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11288// operation.
11289type SQLPoolsDeleteFuture struct {
11290	azure.FutureAPI
11291	// Result returns the result of the asynchronous operation.
11292	// If the operation has not completed it will return an error.
11293	Result func(SQLPoolsClient) (SetObject, error)
11294}
11295
11296// SQLPoolSecurityAlertPolicy a Sql pool security alert policy.
11297type SQLPoolSecurityAlertPolicy struct {
11298	autorest.Response `json:"-"`
11299	// SecurityAlertPolicyProperties - Resource properties.
11300	*SecurityAlertPolicyProperties `json:"properties,omitempty"`
11301	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
11302	ID *string `json:"id,omitempty"`
11303	// Name - READ-ONLY; The name of the resource
11304	Name *string `json:"name,omitempty"`
11305	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
11306	Type *string `json:"type,omitempty"`
11307}
11308
11309// MarshalJSON is the custom marshaler for SQLPoolSecurityAlertPolicy.
11310func (spsap SQLPoolSecurityAlertPolicy) MarshalJSON() ([]byte, error) {
11311	objectMap := make(map[string]interface{})
11312	if spsap.SecurityAlertPolicyProperties != nil {
11313		objectMap["properties"] = spsap.SecurityAlertPolicyProperties
11314	}
11315	return json.Marshal(objectMap)
11316}
11317
11318// UnmarshalJSON is the custom unmarshaler for SQLPoolSecurityAlertPolicy struct.
11319func (spsap *SQLPoolSecurityAlertPolicy) UnmarshalJSON(body []byte) error {
11320	var m map[string]*json.RawMessage
11321	err := json.Unmarshal(body, &m)
11322	if err != nil {
11323		return err
11324	}
11325	for k, v := range m {
11326		switch k {
11327		case "properties":
11328			if v != nil {
11329				var securityAlertPolicyProperties SecurityAlertPolicyProperties
11330				err = json.Unmarshal(*v, &securityAlertPolicyProperties)
11331				if err != nil {
11332					return err
11333				}
11334				spsap.SecurityAlertPolicyProperties = &securityAlertPolicyProperties
11335			}
11336		case "id":
11337			if v != nil {
11338				var ID string
11339				err = json.Unmarshal(*v, &ID)
11340				if err != nil {
11341					return err
11342				}
11343				spsap.ID = &ID
11344			}
11345		case "name":
11346			if v != nil {
11347				var name string
11348				err = json.Unmarshal(*v, &name)
11349				if err != nil {
11350					return err
11351				}
11352				spsap.Name = &name
11353			}
11354		case "type":
11355			if v != nil {
11356				var typeVar string
11357				err = json.Unmarshal(*v, &typeVar)
11358				if err != nil {
11359					return err
11360				}
11361				spsap.Type = &typeVar
11362			}
11363		}
11364	}
11365
11366	return nil
11367}
11368
11369// SQLPoolsPauseFuture an abstraction for monitoring and retrieving the results of a long-running
11370// operation.
11371type SQLPoolsPauseFuture struct {
11372	azure.FutureAPI
11373	// Result returns the result of the asynchronous operation.
11374	// If the operation has not completed it will return an error.
11375	Result func(SQLPoolsClient) (SetObject, error)
11376}
11377
11378// SQLPoolsResumeFuture an abstraction for monitoring and retrieving the results of a long-running
11379// operation.
11380type SQLPoolsResumeFuture struct {
11381	azure.FutureAPI
11382	// Result returns the result of the asynchronous operation.
11383	// If the operation has not completed it will return an error.
11384	Result func(SQLPoolsClient) (SetObject, error)
11385}
11386
11387// SQLPoolTable a Sql pool table resource.
11388type SQLPoolTable struct {
11389	autorest.Response `json:"-"`
11390	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
11391	ID *string `json:"id,omitempty"`
11392	// Name - READ-ONLY; The name of the resource
11393	Name *string `json:"name,omitempty"`
11394	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
11395	Type *string `json:"type,omitempty"`
11396}
11397
11398// SQLPoolTableListResult a list of Sql pool tables.
11399type SQLPoolTableListResult struct {
11400	autorest.Response `json:"-"`
11401	// Value - READ-ONLY; Array of results.
11402	Value *[]SQLPoolTable `json:"value,omitempty"`
11403	// NextLink - READ-ONLY; Link to retrieve next page of results.
11404	NextLink *string `json:"nextLink,omitempty"`
11405}
11406
11407// SQLPoolTableListResultIterator provides access to a complete listing of SQLPoolTable values.
11408type SQLPoolTableListResultIterator struct {
11409	i    int
11410	page SQLPoolTableListResultPage
11411}
11412
11413// NextWithContext advances to the next value.  If there was an error making
11414// the request the iterator does not advance and the error is returned.
11415func (iter *SQLPoolTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
11416	if tracing.IsEnabled() {
11417		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTableListResultIterator.NextWithContext")
11418		defer func() {
11419			sc := -1
11420			if iter.Response().Response.Response != nil {
11421				sc = iter.Response().Response.Response.StatusCode
11422			}
11423			tracing.EndSpan(ctx, sc, err)
11424		}()
11425	}
11426	iter.i++
11427	if iter.i < len(iter.page.Values()) {
11428		return nil
11429	}
11430	err = iter.page.NextWithContext(ctx)
11431	if err != nil {
11432		iter.i--
11433		return err
11434	}
11435	iter.i = 0
11436	return nil
11437}
11438
11439// Next advances to the next value.  If there was an error making
11440// the request the iterator does not advance and the error is returned.
11441// Deprecated: Use NextWithContext() instead.
11442func (iter *SQLPoolTableListResultIterator) Next() error {
11443	return iter.NextWithContext(context.Background())
11444}
11445
11446// NotDone returns true if the enumeration should be started or is not yet complete.
11447func (iter SQLPoolTableListResultIterator) NotDone() bool {
11448	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11449}
11450
11451// Response returns the raw server response from the last page request.
11452func (iter SQLPoolTableListResultIterator) Response() SQLPoolTableListResult {
11453	return iter.page.Response()
11454}
11455
11456// Value returns the current value or a zero-initialized value if the
11457// iterator has advanced beyond the end of the collection.
11458func (iter SQLPoolTableListResultIterator) Value() SQLPoolTable {
11459	if !iter.page.NotDone() {
11460		return SQLPoolTable{}
11461	}
11462	return iter.page.Values()[iter.i]
11463}
11464
11465// Creates a new instance of the SQLPoolTableListResultIterator type.
11466func NewSQLPoolTableListResultIterator(page SQLPoolTableListResultPage) SQLPoolTableListResultIterator {
11467	return SQLPoolTableListResultIterator{page: page}
11468}
11469
11470// IsEmpty returns true if the ListResult contains no values.
11471func (sptlr SQLPoolTableListResult) IsEmpty() bool {
11472	return sptlr.Value == nil || len(*sptlr.Value) == 0
11473}
11474
11475// hasNextLink returns true if the NextLink is not empty.
11476func (sptlr SQLPoolTableListResult) hasNextLink() bool {
11477	return sptlr.NextLink != nil && len(*sptlr.NextLink) != 0
11478}
11479
11480// sQLPoolTableListResultPreparer prepares a request to retrieve the next set of results.
11481// It returns nil if no more results exist.
11482func (sptlr SQLPoolTableListResult) sQLPoolTableListResultPreparer(ctx context.Context) (*http.Request, error) {
11483	if !sptlr.hasNextLink() {
11484		return nil, nil
11485	}
11486	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11487		autorest.AsJSON(),
11488		autorest.AsGet(),
11489		autorest.WithBaseURL(to.String(sptlr.NextLink)))
11490}
11491
11492// SQLPoolTableListResultPage contains a page of SQLPoolTable values.
11493type SQLPoolTableListResultPage struct {
11494	fn    func(context.Context, SQLPoolTableListResult) (SQLPoolTableListResult, error)
11495	sptlr SQLPoolTableListResult
11496}
11497
11498// NextWithContext advances to the next page of values.  If there was an error making
11499// the request the page does not advance and the error is returned.
11500func (page *SQLPoolTableListResultPage) NextWithContext(ctx context.Context) (err error) {
11501	if tracing.IsEnabled() {
11502		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolTableListResultPage.NextWithContext")
11503		defer func() {
11504			sc := -1
11505			if page.Response().Response.Response != nil {
11506				sc = page.Response().Response.Response.StatusCode
11507			}
11508			tracing.EndSpan(ctx, sc, err)
11509		}()
11510	}
11511	for {
11512		next, err := page.fn(ctx, page.sptlr)
11513		if err != nil {
11514			return err
11515		}
11516		page.sptlr = next
11517		if !next.hasNextLink() || !next.IsEmpty() {
11518			break
11519		}
11520	}
11521	return nil
11522}
11523
11524// Next advances to the next page of values.  If there was an error making
11525// the request the page does not advance and the error is returned.
11526// Deprecated: Use NextWithContext() instead.
11527func (page *SQLPoolTableListResultPage) Next() error {
11528	return page.NextWithContext(context.Background())
11529}
11530
11531// NotDone returns true if the page enumeration should be started or is not yet complete.
11532func (page SQLPoolTableListResultPage) NotDone() bool {
11533	return !page.sptlr.IsEmpty()
11534}
11535
11536// Response returns the raw server response from the last page request.
11537func (page SQLPoolTableListResultPage) Response() SQLPoolTableListResult {
11538	return page.sptlr
11539}
11540
11541// Values returns the slice of values for the current page or nil if there are no values.
11542func (page SQLPoolTableListResultPage) Values() []SQLPoolTable {
11543	if page.sptlr.IsEmpty() {
11544		return nil
11545	}
11546	return *page.sptlr.Value
11547}
11548
11549// Creates a new instance of the SQLPoolTableListResultPage type.
11550func NewSQLPoolTableListResultPage(cur SQLPoolTableListResult, getNextPage func(context.Context, SQLPoolTableListResult) (SQLPoolTableListResult, error)) SQLPoolTableListResultPage {
11551	return SQLPoolTableListResultPage{
11552		fn:    getNextPage,
11553		sptlr: cur,
11554	}
11555}
11556
11557// SQLPoolUsage the Sql pool usages.
11558type SQLPoolUsage struct {
11559	// Name - READ-ONLY; The name of the usage metric.
11560	Name *string `json:"name,omitempty"`
11561	// ResourceName - READ-ONLY; The name of the resource.
11562	ResourceName *string `json:"resourceName,omitempty"`
11563	// DisplayName - READ-ONLY; The usage metric display name.
11564	DisplayName *string `json:"displayName,omitempty"`
11565	// CurrentValue - READ-ONLY; The current value of the usage metric.
11566	CurrentValue *float64 `json:"currentValue,omitempty"`
11567	// Limit - READ-ONLY; The current limit of the usage metric.
11568	Limit *float64 `json:"limit,omitempty"`
11569	// Unit - READ-ONLY; The units of the usage metric.
11570	Unit *string `json:"unit,omitempty"`
11571	// NextResetTime - READ-ONLY; The next reset time for the usage metric (ISO8601 format).
11572	NextResetTime *date.Time `json:"nextResetTime,omitempty"`
11573}
11574
11575// SQLPoolUsageListResult the response to a list Sql pool usages request.
11576type SQLPoolUsageListResult struct {
11577	autorest.Response `json:"-"`
11578	// Value - The list of usages for the Sql pool.
11579	Value *[]SQLPoolUsage `json:"value,omitempty"`
11580	// NextLink - READ-ONLY; Link to retrieve next page of results.
11581	NextLink *string `json:"nextLink,omitempty"`
11582}
11583
11584// MarshalJSON is the custom marshaler for SQLPoolUsageListResult.
11585func (spulr SQLPoolUsageListResult) MarshalJSON() ([]byte, error) {
11586	objectMap := make(map[string]interface{})
11587	if spulr.Value != nil {
11588		objectMap["value"] = spulr.Value
11589	}
11590	return json.Marshal(objectMap)
11591}
11592
11593// SQLPoolUsageListResultIterator provides access to a complete listing of SQLPoolUsage values.
11594type SQLPoolUsageListResultIterator struct {
11595	i    int
11596	page SQLPoolUsageListResultPage
11597}
11598
11599// NextWithContext advances to the next value.  If there was an error making
11600// the request the iterator does not advance and the error is returned.
11601func (iter *SQLPoolUsageListResultIterator) NextWithContext(ctx context.Context) (err error) {
11602	if tracing.IsEnabled() {
11603		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolUsageListResultIterator.NextWithContext")
11604		defer func() {
11605			sc := -1
11606			if iter.Response().Response.Response != nil {
11607				sc = iter.Response().Response.Response.StatusCode
11608			}
11609			tracing.EndSpan(ctx, sc, err)
11610		}()
11611	}
11612	iter.i++
11613	if iter.i < len(iter.page.Values()) {
11614		return nil
11615	}
11616	err = iter.page.NextWithContext(ctx)
11617	if err != nil {
11618		iter.i--
11619		return err
11620	}
11621	iter.i = 0
11622	return nil
11623}
11624
11625// Next advances to the next value.  If there was an error making
11626// the request the iterator does not advance and the error is returned.
11627// Deprecated: Use NextWithContext() instead.
11628func (iter *SQLPoolUsageListResultIterator) Next() error {
11629	return iter.NextWithContext(context.Background())
11630}
11631
11632// NotDone returns true if the enumeration should be started or is not yet complete.
11633func (iter SQLPoolUsageListResultIterator) NotDone() bool {
11634	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11635}
11636
11637// Response returns the raw server response from the last page request.
11638func (iter SQLPoolUsageListResultIterator) Response() SQLPoolUsageListResult {
11639	return iter.page.Response()
11640}
11641
11642// Value returns the current value or a zero-initialized value if the
11643// iterator has advanced beyond the end of the collection.
11644func (iter SQLPoolUsageListResultIterator) Value() SQLPoolUsage {
11645	if !iter.page.NotDone() {
11646		return SQLPoolUsage{}
11647	}
11648	return iter.page.Values()[iter.i]
11649}
11650
11651// Creates a new instance of the SQLPoolUsageListResultIterator type.
11652func NewSQLPoolUsageListResultIterator(page SQLPoolUsageListResultPage) SQLPoolUsageListResultIterator {
11653	return SQLPoolUsageListResultIterator{page: page}
11654}
11655
11656// IsEmpty returns true if the ListResult contains no values.
11657func (spulr SQLPoolUsageListResult) IsEmpty() bool {
11658	return spulr.Value == nil || len(*spulr.Value) == 0
11659}
11660
11661// hasNextLink returns true if the NextLink is not empty.
11662func (spulr SQLPoolUsageListResult) hasNextLink() bool {
11663	return spulr.NextLink != nil && len(*spulr.NextLink) != 0
11664}
11665
11666// sQLPoolUsageListResultPreparer prepares a request to retrieve the next set of results.
11667// It returns nil if no more results exist.
11668func (spulr SQLPoolUsageListResult) sQLPoolUsageListResultPreparer(ctx context.Context) (*http.Request, error) {
11669	if !spulr.hasNextLink() {
11670		return nil, nil
11671	}
11672	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11673		autorest.AsJSON(),
11674		autorest.AsGet(),
11675		autorest.WithBaseURL(to.String(spulr.NextLink)))
11676}
11677
11678// SQLPoolUsageListResultPage contains a page of SQLPoolUsage values.
11679type SQLPoolUsageListResultPage struct {
11680	fn    func(context.Context, SQLPoolUsageListResult) (SQLPoolUsageListResult, error)
11681	spulr SQLPoolUsageListResult
11682}
11683
11684// NextWithContext advances to the next page of values.  If there was an error making
11685// the request the page does not advance and the error is returned.
11686func (page *SQLPoolUsageListResultPage) NextWithContext(ctx context.Context) (err error) {
11687	if tracing.IsEnabled() {
11688		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolUsageListResultPage.NextWithContext")
11689		defer func() {
11690			sc := -1
11691			if page.Response().Response.Response != nil {
11692				sc = page.Response().Response.Response.StatusCode
11693			}
11694			tracing.EndSpan(ctx, sc, err)
11695		}()
11696	}
11697	for {
11698		next, err := page.fn(ctx, page.spulr)
11699		if err != nil {
11700			return err
11701		}
11702		page.spulr = next
11703		if !next.hasNextLink() || !next.IsEmpty() {
11704			break
11705		}
11706	}
11707	return nil
11708}
11709
11710// Next advances to the next page of values.  If there was an error making
11711// the request the page does not advance and the error is returned.
11712// Deprecated: Use NextWithContext() instead.
11713func (page *SQLPoolUsageListResultPage) Next() error {
11714	return page.NextWithContext(context.Background())
11715}
11716
11717// NotDone returns true if the page enumeration should be started or is not yet complete.
11718func (page SQLPoolUsageListResultPage) NotDone() bool {
11719	return !page.spulr.IsEmpty()
11720}
11721
11722// Response returns the raw server response from the last page request.
11723func (page SQLPoolUsageListResultPage) Response() SQLPoolUsageListResult {
11724	return page.spulr
11725}
11726
11727// Values returns the slice of values for the current page or nil if there are no values.
11728func (page SQLPoolUsageListResultPage) Values() []SQLPoolUsage {
11729	if page.spulr.IsEmpty() {
11730		return nil
11731	}
11732	return *page.spulr.Value
11733}
11734
11735// Creates a new instance of the SQLPoolUsageListResultPage type.
11736func NewSQLPoolUsageListResultPage(cur SQLPoolUsageListResult, getNextPage func(context.Context, SQLPoolUsageListResult) (SQLPoolUsageListResult, error)) SQLPoolUsageListResultPage {
11737	return SQLPoolUsageListResultPage{
11738		fn:    getNextPage,
11739		spulr: cur,
11740	}
11741}
11742
11743// SQLPoolVulnerabilityAssessment a Sql pool vulnerability assessment.
11744type SQLPoolVulnerabilityAssessment struct {
11745	autorest.Response `json:"-"`
11746	// SQLPoolVulnerabilityAssessmentProperties - Resource properties.
11747	*SQLPoolVulnerabilityAssessmentProperties `json:"properties,omitempty"`
11748	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
11749	ID *string `json:"id,omitempty"`
11750	// Name - READ-ONLY; The name of the resource
11751	Name *string `json:"name,omitempty"`
11752	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
11753	Type *string `json:"type,omitempty"`
11754}
11755
11756// MarshalJSON is the custom marshaler for SQLPoolVulnerabilityAssessment.
11757func (spva SQLPoolVulnerabilityAssessment) MarshalJSON() ([]byte, error) {
11758	objectMap := make(map[string]interface{})
11759	if spva.SQLPoolVulnerabilityAssessmentProperties != nil {
11760		objectMap["properties"] = spva.SQLPoolVulnerabilityAssessmentProperties
11761	}
11762	return json.Marshal(objectMap)
11763}
11764
11765// UnmarshalJSON is the custom unmarshaler for SQLPoolVulnerabilityAssessment struct.
11766func (spva *SQLPoolVulnerabilityAssessment) UnmarshalJSON(body []byte) error {
11767	var m map[string]*json.RawMessage
11768	err := json.Unmarshal(body, &m)
11769	if err != nil {
11770		return err
11771	}
11772	for k, v := range m {
11773		switch k {
11774		case "properties":
11775			if v != nil {
11776				var SQLPoolVulnerabilityAssessmentProperties SQLPoolVulnerabilityAssessmentProperties
11777				err = json.Unmarshal(*v, &SQLPoolVulnerabilityAssessmentProperties)
11778				if err != nil {
11779					return err
11780				}
11781				spva.SQLPoolVulnerabilityAssessmentProperties = &SQLPoolVulnerabilityAssessmentProperties
11782			}
11783		case "id":
11784			if v != nil {
11785				var ID string
11786				err = json.Unmarshal(*v, &ID)
11787				if err != nil {
11788					return err
11789				}
11790				spva.ID = &ID
11791			}
11792		case "name":
11793			if v != nil {
11794				var name string
11795				err = json.Unmarshal(*v, &name)
11796				if err != nil {
11797					return err
11798				}
11799				spva.Name = &name
11800			}
11801		case "type":
11802			if v != nil {
11803				var typeVar string
11804				err = json.Unmarshal(*v, &typeVar)
11805				if err != nil {
11806					return err
11807				}
11808				spva.Type = &typeVar
11809			}
11810		}
11811	}
11812
11813	return nil
11814}
11815
11816// SQLPoolVulnerabilityAssessmentListResult a list of the Sql pool's vulnerability assessments.
11817type SQLPoolVulnerabilityAssessmentListResult struct {
11818	autorest.Response `json:"-"`
11819	// Value - READ-ONLY; Array of results.
11820	Value *[]SQLPoolVulnerabilityAssessment `json:"value,omitempty"`
11821	// NextLink - READ-ONLY; Link to retrieve next page of results.
11822	NextLink *string `json:"nextLink,omitempty"`
11823}
11824
11825// SQLPoolVulnerabilityAssessmentListResultIterator provides access to a complete listing of
11826// SQLPoolVulnerabilityAssessment values.
11827type SQLPoolVulnerabilityAssessmentListResultIterator struct {
11828	i    int
11829	page SQLPoolVulnerabilityAssessmentListResultPage
11830}
11831
11832// NextWithContext advances to the next value.  If there was an error making
11833// the request the iterator does not advance and the error is returned.
11834func (iter *SQLPoolVulnerabilityAssessmentListResultIterator) NextWithContext(ctx context.Context) (err error) {
11835	if tracing.IsEnabled() {
11836		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentListResultIterator.NextWithContext")
11837		defer func() {
11838			sc := -1
11839			if iter.Response().Response.Response != nil {
11840				sc = iter.Response().Response.Response.StatusCode
11841			}
11842			tracing.EndSpan(ctx, sc, err)
11843		}()
11844	}
11845	iter.i++
11846	if iter.i < len(iter.page.Values()) {
11847		return nil
11848	}
11849	err = iter.page.NextWithContext(ctx)
11850	if err != nil {
11851		iter.i--
11852		return err
11853	}
11854	iter.i = 0
11855	return nil
11856}
11857
11858// Next advances to the next value.  If there was an error making
11859// the request the iterator does not advance and the error is returned.
11860// Deprecated: Use NextWithContext() instead.
11861func (iter *SQLPoolVulnerabilityAssessmentListResultIterator) Next() error {
11862	return iter.NextWithContext(context.Background())
11863}
11864
11865// NotDone returns true if the enumeration should be started or is not yet complete.
11866func (iter SQLPoolVulnerabilityAssessmentListResultIterator) NotDone() bool {
11867	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11868}
11869
11870// Response returns the raw server response from the last page request.
11871func (iter SQLPoolVulnerabilityAssessmentListResultIterator) Response() SQLPoolVulnerabilityAssessmentListResult {
11872	return iter.page.Response()
11873}
11874
11875// Value returns the current value or a zero-initialized value if the
11876// iterator has advanced beyond the end of the collection.
11877func (iter SQLPoolVulnerabilityAssessmentListResultIterator) Value() SQLPoolVulnerabilityAssessment {
11878	if !iter.page.NotDone() {
11879		return SQLPoolVulnerabilityAssessment{}
11880	}
11881	return iter.page.Values()[iter.i]
11882}
11883
11884// Creates a new instance of the SQLPoolVulnerabilityAssessmentListResultIterator type.
11885func NewSQLPoolVulnerabilityAssessmentListResultIterator(page SQLPoolVulnerabilityAssessmentListResultPage) SQLPoolVulnerabilityAssessmentListResultIterator {
11886	return SQLPoolVulnerabilityAssessmentListResultIterator{page: page}
11887}
11888
11889// IsEmpty returns true if the ListResult contains no values.
11890func (spvalr SQLPoolVulnerabilityAssessmentListResult) IsEmpty() bool {
11891	return spvalr.Value == nil || len(*spvalr.Value) == 0
11892}
11893
11894// hasNextLink returns true if the NextLink is not empty.
11895func (spvalr SQLPoolVulnerabilityAssessmentListResult) hasNextLink() bool {
11896	return spvalr.NextLink != nil && len(*spvalr.NextLink) != 0
11897}
11898
11899// sQLPoolVulnerabilityAssessmentListResultPreparer prepares a request to retrieve the next set of results.
11900// It returns nil if no more results exist.
11901func (spvalr SQLPoolVulnerabilityAssessmentListResult) sQLPoolVulnerabilityAssessmentListResultPreparer(ctx context.Context) (*http.Request, error) {
11902	if !spvalr.hasNextLink() {
11903		return nil, nil
11904	}
11905	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11906		autorest.AsJSON(),
11907		autorest.AsGet(),
11908		autorest.WithBaseURL(to.String(spvalr.NextLink)))
11909}
11910
11911// SQLPoolVulnerabilityAssessmentListResultPage contains a page of SQLPoolVulnerabilityAssessment values.
11912type SQLPoolVulnerabilityAssessmentListResultPage struct {
11913	fn     func(context.Context, SQLPoolVulnerabilityAssessmentListResult) (SQLPoolVulnerabilityAssessmentListResult, error)
11914	spvalr SQLPoolVulnerabilityAssessmentListResult
11915}
11916
11917// NextWithContext advances to the next page of values.  If there was an error making
11918// the request the page does not advance and the error is returned.
11919func (page *SQLPoolVulnerabilityAssessmentListResultPage) NextWithContext(ctx context.Context) (err error) {
11920	if tracing.IsEnabled() {
11921		ctx = tracing.StartSpan(ctx, fqdn+"/SQLPoolVulnerabilityAssessmentListResultPage.NextWithContext")
11922		defer func() {
11923			sc := -1
11924			if page.Response().Response.Response != nil {
11925				sc = page.Response().Response.Response.StatusCode
11926			}
11927			tracing.EndSpan(ctx, sc, err)
11928		}()
11929	}
11930	for {
11931		next, err := page.fn(ctx, page.spvalr)
11932		if err != nil {
11933			return err
11934		}
11935		page.spvalr = next
11936		if !next.hasNextLink() || !next.IsEmpty() {
11937			break
11938		}
11939	}
11940	return nil
11941}
11942
11943// Next advances to the next page of values.  If there was an error making
11944// the request the page does not advance and the error is returned.
11945// Deprecated: Use NextWithContext() instead.
11946func (page *SQLPoolVulnerabilityAssessmentListResultPage) Next() error {
11947	return page.NextWithContext(context.Background())
11948}
11949
11950// NotDone returns true if the page enumeration should be started or is not yet complete.
11951func (page SQLPoolVulnerabilityAssessmentListResultPage) NotDone() bool {
11952	return !page.spvalr.IsEmpty()
11953}
11954
11955// Response returns the raw server response from the last page request.
11956func (page SQLPoolVulnerabilityAssessmentListResultPage) Response() SQLPoolVulnerabilityAssessmentListResult {
11957	return page.spvalr
11958}
11959
11960// Values returns the slice of values for the current page or nil if there are no values.
11961func (page SQLPoolVulnerabilityAssessmentListResultPage) Values() []SQLPoolVulnerabilityAssessment {
11962	if page.spvalr.IsEmpty() {
11963		return nil
11964	}
11965	return *page.spvalr.Value
11966}
11967
11968// Creates a new instance of the SQLPoolVulnerabilityAssessmentListResultPage type.
11969func NewSQLPoolVulnerabilityAssessmentListResultPage(cur SQLPoolVulnerabilityAssessmentListResult, getNextPage func(context.Context, SQLPoolVulnerabilityAssessmentListResult) (SQLPoolVulnerabilityAssessmentListResult, error)) SQLPoolVulnerabilityAssessmentListResultPage {
11970	return SQLPoolVulnerabilityAssessmentListResultPage{
11971		fn:     getNextPage,
11972		spvalr: cur,
11973	}
11974}
11975
11976// SQLPoolVulnerabilityAssessmentProperties properties of a Sql pool Vulnerability Assessment.
11977type SQLPoolVulnerabilityAssessmentProperties struct {
11978	// StorageContainerPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).  It is required if server level vulnerability assessment policy doesn't set
11979	StorageContainerPath *string `json:"storageContainerPath,omitempty"`
11980	// StorageContainerSasKey - A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required.
11981	StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"`
11982	// StorageAccountAccessKey - Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required.
11983	StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`
11984	// RecurringScans - The recurring scans settings
11985	RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"`
11986}
11987
11988// SQLPoolVulnerabilityAssessmentRuleBaseline a Sql pool vulnerability assessment rule baseline.
11989type SQLPoolVulnerabilityAssessmentRuleBaseline struct {
11990	autorest.Response `json:"-"`
11991	// SQLPoolVulnerabilityAssessmentRuleBaselineProperties - Resource properties.
11992	*SQLPoolVulnerabilityAssessmentRuleBaselineProperties `json:"properties,omitempty"`
11993	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
11994	ID *string `json:"id,omitempty"`
11995	// Name - READ-ONLY; The name of the resource
11996	Name *string `json:"name,omitempty"`
11997	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
11998	Type *string `json:"type,omitempty"`
11999}
12000
12001// MarshalJSON is the custom marshaler for SQLPoolVulnerabilityAssessmentRuleBaseline.
12002func (spvarb SQLPoolVulnerabilityAssessmentRuleBaseline) MarshalJSON() ([]byte, error) {
12003	objectMap := make(map[string]interface{})
12004	if spvarb.SQLPoolVulnerabilityAssessmentRuleBaselineProperties != nil {
12005		objectMap["properties"] = spvarb.SQLPoolVulnerabilityAssessmentRuleBaselineProperties
12006	}
12007	return json.Marshal(objectMap)
12008}
12009
12010// UnmarshalJSON is the custom unmarshaler for SQLPoolVulnerabilityAssessmentRuleBaseline struct.
12011func (spvarb *SQLPoolVulnerabilityAssessmentRuleBaseline) UnmarshalJSON(body []byte) error {
12012	var m map[string]*json.RawMessage
12013	err := json.Unmarshal(body, &m)
12014	if err != nil {
12015		return err
12016	}
12017	for k, v := range m {
12018		switch k {
12019		case "properties":
12020			if v != nil {
12021				var SQLPoolVulnerabilityAssessmentRuleBaselineProperties SQLPoolVulnerabilityAssessmentRuleBaselineProperties
12022				err = json.Unmarshal(*v, &SQLPoolVulnerabilityAssessmentRuleBaselineProperties)
12023				if err != nil {
12024					return err
12025				}
12026				spvarb.SQLPoolVulnerabilityAssessmentRuleBaselineProperties = &SQLPoolVulnerabilityAssessmentRuleBaselineProperties
12027			}
12028		case "id":
12029			if v != nil {
12030				var ID string
12031				err = json.Unmarshal(*v, &ID)
12032				if err != nil {
12033					return err
12034				}
12035				spvarb.ID = &ID
12036			}
12037		case "name":
12038			if v != nil {
12039				var name string
12040				err = json.Unmarshal(*v, &name)
12041				if err != nil {
12042					return err
12043				}
12044				spvarb.Name = &name
12045			}
12046		case "type":
12047			if v != nil {
12048				var typeVar string
12049				err = json.Unmarshal(*v, &typeVar)
12050				if err != nil {
12051					return err
12052				}
12053				spvarb.Type = &typeVar
12054			}
12055		}
12056	}
12057
12058	return nil
12059}
12060
12061// SQLPoolVulnerabilityAssessmentRuleBaselineItem properties for an Sql pool vulnerability assessment rule
12062// baseline's result.
12063type SQLPoolVulnerabilityAssessmentRuleBaselineItem struct {
12064	// Result - The rule baseline result
12065	Result *[]string `json:"result,omitempty"`
12066}
12067
12068// SQLPoolVulnerabilityAssessmentRuleBaselineProperties properties of a Sql pool vulnerability assessment
12069// rule baseline.
12070type SQLPoolVulnerabilityAssessmentRuleBaselineProperties struct {
12071	// BaselineResults - The rule baseline result
12072	BaselineResults *[]SQLPoolVulnerabilityAssessmentRuleBaselineItem `json:"baselineResults,omitempty"`
12073}
12074
12075// SQLPoolVulnerabilityAssessmentScanExportProperties properties of the export operation's result.
12076type SQLPoolVulnerabilityAssessmentScanExportProperties struct {
12077	// ExportedReportLocation - READ-ONLY; Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx).
12078	ExportedReportLocation *string `json:"exportedReportLocation,omitempty"`
12079}
12080
12081// SQLPoolVulnerabilityAssessmentScansExport a Sql pool Vulnerability Assessment scan export resource.
12082type SQLPoolVulnerabilityAssessmentScansExport struct {
12083	autorest.Response `json:"-"`
12084	// SQLPoolVulnerabilityAssessmentScanExportProperties - Resource properties.
12085	*SQLPoolVulnerabilityAssessmentScanExportProperties `json:"properties,omitempty"`
12086	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
12087	ID *string `json:"id,omitempty"`
12088	// Name - READ-ONLY; The name of the resource
12089	Name *string `json:"name,omitempty"`
12090	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
12091	Type *string `json:"type,omitempty"`
12092}
12093
12094// MarshalJSON is the custom marshaler for SQLPoolVulnerabilityAssessmentScansExport.
12095func (spvase SQLPoolVulnerabilityAssessmentScansExport) MarshalJSON() ([]byte, error) {
12096	objectMap := make(map[string]interface{})
12097	if spvase.SQLPoolVulnerabilityAssessmentScanExportProperties != nil {
12098		objectMap["properties"] = spvase.SQLPoolVulnerabilityAssessmentScanExportProperties
12099	}
12100	return json.Marshal(objectMap)
12101}
12102
12103// UnmarshalJSON is the custom unmarshaler for SQLPoolVulnerabilityAssessmentScansExport struct.
12104func (spvase *SQLPoolVulnerabilityAssessmentScansExport) UnmarshalJSON(body []byte) error {
12105	var m map[string]*json.RawMessage
12106	err := json.Unmarshal(body, &m)
12107	if err != nil {
12108		return err
12109	}
12110	for k, v := range m {
12111		switch k {
12112		case "properties":
12113			if v != nil {
12114				var SQLPoolVulnerabilityAssessmentScanExportProperties SQLPoolVulnerabilityAssessmentScanExportProperties
12115				err = json.Unmarshal(*v, &SQLPoolVulnerabilityAssessmentScanExportProperties)
12116				if err != nil {
12117					return err
12118				}
12119				spvase.SQLPoolVulnerabilityAssessmentScanExportProperties = &SQLPoolVulnerabilityAssessmentScanExportProperties
12120			}
12121		case "id":
12122			if v != nil {
12123				var ID string
12124				err = json.Unmarshal(*v, &ID)
12125				if err != nil {
12126					return err
12127				}
12128				spvase.ID = &ID
12129			}
12130		case "name":
12131			if v != nil {
12132				var name string
12133				err = json.Unmarshal(*v, &name)
12134				if err != nil {
12135					return err
12136				}
12137				spvase.Name = &name
12138			}
12139		case "type":
12140			if v != nil {
12141				var typeVar string
12142				err = json.Unmarshal(*v, &typeVar)
12143				if err != nil {
12144					return err
12145				}
12146				spvase.Type = &typeVar
12147			}
12148		}
12149	}
12150
12151	return nil
12152}
12153
12154// SQLPoolVulnerabilityAssessmentScansInitiateScanFuture an abstraction for monitoring and retrieving the
12155// results of a long-running operation.
12156type SQLPoolVulnerabilityAssessmentScansInitiateScanFuture struct {
12157	azure.FutureAPI
12158	// Result returns the result of the asynchronous operation.
12159	// If the operation has not completed it will return an error.
12160	Result func(SQLPoolVulnerabilityAssessmentScansClient) (autorest.Response, error)
12161}
12162
12163// SQLPoolWorkloadClassifierCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
12164// of a long-running operation.
12165type SQLPoolWorkloadClassifierCreateOrUpdateFuture struct {
12166	azure.FutureAPI
12167	// Result returns the result of the asynchronous operation.
12168	// If the operation has not completed it will return an error.
12169	Result func(SQLPoolWorkloadClassifierClient) (WorkloadClassifier, error)
12170}
12171
12172// SQLPoolWorkloadClassifierDeleteFuture an abstraction for monitoring and retrieving the results of a
12173// long-running operation.
12174type SQLPoolWorkloadClassifierDeleteFuture struct {
12175	azure.FutureAPI
12176	// Result returns the result of the asynchronous operation.
12177	// If the operation has not completed it will return an error.
12178	Result func(SQLPoolWorkloadClassifierClient) (autorest.Response, error)
12179}
12180
12181// SQLPoolWorkloadGroupCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12182// long-running operation.
12183type SQLPoolWorkloadGroupCreateOrUpdateFuture struct {
12184	azure.FutureAPI
12185	// Result returns the result of the asynchronous operation.
12186	// If the operation has not completed it will return an error.
12187	Result func(SQLPoolWorkloadGroupClient) (WorkloadGroup, error)
12188}
12189
12190// SQLPoolWorkloadGroupDeleteFuture an abstraction for monitoring and retrieving the results of a
12191// long-running operation.
12192type SQLPoolWorkloadGroupDeleteFuture struct {
12193	azure.FutureAPI
12194	// Result returns the result of the asynchronous operation.
12195	// If the operation has not completed it will return an error.
12196	Result func(SQLPoolWorkloadGroupClient) (autorest.Response, error)
12197}
12198
12199// SsisEnvironment ssis environment.
12200type SsisEnvironment struct {
12201	// FolderID - Folder id which contains environment.
12202	FolderID *int64 `json:"folderId,omitempty"`
12203	// Variables - Variable in environment
12204	Variables *[]SsisVariable `json:"variables,omitempty"`
12205	// ID - Metadata id.
12206	ID *int64 `json:"id,omitempty"`
12207	// Name - Metadata name.
12208	Name *string `json:"name,omitempty"`
12209	// Description - Metadata description.
12210	Description *string `json:"description,omitempty"`
12211	// Type - Possible values include: 'TypeSsisObjectMetadata', 'TypeFolder', 'TypeProject', 'TypePackage', 'TypeEnvironment'
12212	Type TypeBasicSsisObjectMetadata `json:"type,omitempty"`
12213}
12214
12215// MarshalJSON is the custom marshaler for SsisEnvironment.
12216func (se SsisEnvironment) MarshalJSON() ([]byte, error) {
12217	se.Type = TypeEnvironment
12218	objectMap := make(map[string]interface{})
12219	if se.FolderID != nil {
12220		objectMap["folderId"] = se.FolderID
12221	}
12222	if se.Variables != nil {
12223		objectMap["variables"] = se.Variables
12224	}
12225	if se.ID != nil {
12226		objectMap["id"] = se.ID
12227	}
12228	if se.Name != nil {
12229		objectMap["name"] = se.Name
12230	}
12231	if se.Description != nil {
12232		objectMap["description"] = se.Description
12233	}
12234	if se.Type != "" {
12235		objectMap["type"] = se.Type
12236	}
12237	return json.Marshal(objectMap)
12238}
12239
12240// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisEnvironment.
12241func (se SsisEnvironment) AsSsisFolder() (*SsisFolder, bool) {
12242	return nil, false
12243}
12244
12245// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisEnvironment.
12246func (se SsisEnvironment) AsSsisProject() (*SsisProject, bool) {
12247	return nil, false
12248}
12249
12250// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisEnvironment.
12251func (se SsisEnvironment) AsSsisPackage() (*SsisPackage, bool) {
12252	return nil, false
12253}
12254
12255// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisEnvironment.
12256func (se SsisEnvironment) AsSsisEnvironment() (*SsisEnvironment, bool) {
12257	return &se, true
12258}
12259
12260// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisEnvironment.
12261func (se SsisEnvironment) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) {
12262	return nil, false
12263}
12264
12265// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisEnvironment.
12266func (se SsisEnvironment) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) {
12267	return &se, true
12268}
12269
12270// SsisEnvironmentReference ssis environment reference.
12271type SsisEnvironmentReference struct {
12272	// ID - Environment reference id.
12273	ID *int64 `json:"id,omitempty"`
12274	// EnvironmentFolderName - Environment folder name.
12275	EnvironmentFolderName *string `json:"environmentFolderName,omitempty"`
12276	// EnvironmentName - Environment name.
12277	EnvironmentName *string `json:"environmentName,omitempty"`
12278	// ReferenceType - Reference type
12279	ReferenceType *string `json:"referenceType,omitempty"`
12280}
12281
12282// SsisFolder ssis folder.
12283type SsisFolder struct {
12284	// ID - Metadata id.
12285	ID *int64 `json:"id,omitempty"`
12286	// Name - Metadata name.
12287	Name *string `json:"name,omitempty"`
12288	// Description - Metadata description.
12289	Description *string `json:"description,omitempty"`
12290	// Type - Possible values include: 'TypeSsisObjectMetadata', 'TypeFolder', 'TypeProject', 'TypePackage', 'TypeEnvironment'
12291	Type TypeBasicSsisObjectMetadata `json:"type,omitempty"`
12292}
12293
12294// MarshalJSON is the custom marshaler for SsisFolder.
12295func (sf SsisFolder) MarshalJSON() ([]byte, error) {
12296	sf.Type = TypeFolder
12297	objectMap := make(map[string]interface{})
12298	if sf.ID != nil {
12299		objectMap["id"] = sf.ID
12300	}
12301	if sf.Name != nil {
12302		objectMap["name"] = sf.Name
12303	}
12304	if sf.Description != nil {
12305		objectMap["description"] = sf.Description
12306	}
12307	if sf.Type != "" {
12308		objectMap["type"] = sf.Type
12309	}
12310	return json.Marshal(objectMap)
12311}
12312
12313// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisFolder.
12314func (sf SsisFolder) AsSsisFolder() (*SsisFolder, bool) {
12315	return &sf, true
12316}
12317
12318// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisFolder.
12319func (sf SsisFolder) AsSsisProject() (*SsisProject, bool) {
12320	return nil, false
12321}
12322
12323// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisFolder.
12324func (sf SsisFolder) AsSsisPackage() (*SsisPackage, bool) {
12325	return nil, false
12326}
12327
12328// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisFolder.
12329func (sf SsisFolder) AsSsisEnvironment() (*SsisEnvironment, bool) {
12330	return nil, false
12331}
12332
12333// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisFolder.
12334func (sf SsisFolder) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) {
12335	return nil, false
12336}
12337
12338// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisFolder.
12339func (sf SsisFolder) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) {
12340	return &sf, true
12341}
12342
12343// BasicSsisObjectMetadata SSIS object metadata.
12344type BasicSsisObjectMetadata interface {
12345	AsSsisFolder() (*SsisFolder, bool)
12346	AsSsisProject() (*SsisProject, bool)
12347	AsSsisPackage() (*SsisPackage, bool)
12348	AsSsisEnvironment() (*SsisEnvironment, bool)
12349	AsSsisObjectMetadata() (*SsisObjectMetadata, bool)
12350}
12351
12352// SsisObjectMetadata SSIS object metadata.
12353type SsisObjectMetadata struct {
12354	// ID - Metadata id.
12355	ID *int64 `json:"id,omitempty"`
12356	// Name - Metadata name.
12357	Name *string `json:"name,omitempty"`
12358	// Description - Metadata description.
12359	Description *string `json:"description,omitempty"`
12360	// Type - Possible values include: 'TypeSsisObjectMetadata', 'TypeFolder', 'TypeProject', 'TypePackage', 'TypeEnvironment'
12361	Type TypeBasicSsisObjectMetadata `json:"type,omitempty"`
12362}
12363
12364func unmarshalBasicSsisObjectMetadata(body []byte) (BasicSsisObjectMetadata, error) {
12365	var m map[string]interface{}
12366	err := json.Unmarshal(body, &m)
12367	if err != nil {
12368		return nil, err
12369	}
12370
12371	switch m["type"] {
12372	case string(TypeFolder):
12373		var sf SsisFolder
12374		err := json.Unmarshal(body, &sf)
12375		return sf, err
12376	case string(TypeProject):
12377		var sp SsisProject
12378		err := json.Unmarshal(body, &sp)
12379		return sp, err
12380	case string(TypePackage):
12381		var sp SsisPackage
12382		err := json.Unmarshal(body, &sp)
12383		return sp, err
12384	case string(TypeEnvironment):
12385		var se SsisEnvironment
12386		err := json.Unmarshal(body, &se)
12387		return se, err
12388	default:
12389		var som SsisObjectMetadata
12390		err := json.Unmarshal(body, &som)
12391		return som, err
12392	}
12393}
12394func unmarshalBasicSsisObjectMetadataArray(body []byte) ([]BasicSsisObjectMetadata, error) {
12395	var rawMessages []*json.RawMessage
12396	err := json.Unmarshal(body, &rawMessages)
12397	if err != nil {
12398		return nil, err
12399	}
12400
12401	somArray := make([]BasicSsisObjectMetadata, len(rawMessages))
12402
12403	for index, rawMessage := range rawMessages {
12404		som, err := unmarshalBasicSsisObjectMetadata(*rawMessage)
12405		if err != nil {
12406			return nil, err
12407		}
12408		somArray[index] = som
12409	}
12410	return somArray, nil
12411}
12412
12413// MarshalJSON is the custom marshaler for SsisObjectMetadata.
12414func (som SsisObjectMetadata) MarshalJSON() ([]byte, error) {
12415	som.Type = TypeSsisObjectMetadata
12416	objectMap := make(map[string]interface{})
12417	if som.ID != nil {
12418		objectMap["id"] = som.ID
12419	}
12420	if som.Name != nil {
12421		objectMap["name"] = som.Name
12422	}
12423	if som.Description != nil {
12424		objectMap["description"] = som.Description
12425	}
12426	if som.Type != "" {
12427		objectMap["type"] = som.Type
12428	}
12429	return json.Marshal(objectMap)
12430}
12431
12432// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisObjectMetadata.
12433func (som SsisObjectMetadata) AsSsisFolder() (*SsisFolder, bool) {
12434	return nil, false
12435}
12436
12437// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisObjectMetadata.
12438func (som SsisObjectMetadata) AsSsisProject() (*SsisProject, bool) {
12439	return nil, false
12440}
12441
12442// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisObjectMetadata.
12443func (som SsisObjectMetadata) AsSsisPackage() (*SsisPackage, bool) {
12444	return nil, false
12445}
12446
12447// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisObjectMetadata.
12448func (som SsisObjectMetadata) AsSsisEnvironment() (*SsisEnvironment, bool) {
12449	return nil, false
12450}
12451
12452// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisObjectMetadata.
12453func (som SsisObjectMetadata) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) {
12454	return &som, true
12455}
12456
12457// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisObjectMetadata.
12458func (som SsisObjectMetadata) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) {
12459	return &som, true
12460}
12461
12462// SsisObjectMetadataListResponse a list of SSIS object metadata.
12463type SsisObjectMetadataListResponse struct {
12464	autorest.Response `json:"-"`
12465	// Value - List of SSIS object metadata.
12466	Value *[]BasicSsisObjectMetadata `json:"value,omitempty"`
12467	// NextLink - The link to the next page of results, if any remaining results exist.
12468	NextLink *string `json:"nextLink,omitempty"`
12469}
12470
12471// UnmarshalJSON is the custom unmarshaler for SsisObjectMetadataListResponse struct.
12472func (somlr *SsisObjectMetadataListResponse) UnmarshalJSON(body []byte) error {
12473	var m map[string]*json.RawMessage
12474	err := json.Unmarshal(body, &m)
12475	if err != nil {
12476		return err
12477	}
12478	for k, v := range m {
12479		switch k {
12480		case "value":
12481			if v != nil {
12482				value, err := unmarshalBasicSsisObjectMetadataArray(*v)
12483				if err != nil {
12484					return err
12485				}
12486				somlr.Value = &value
12487			}
12488		case "nextLink":
12489			if v != nil {
12490				var nextLink string
12491				err = json.Unmarshal(*v, &nextLink)
12492				if err != nil {
12493					return err
12494				}
12495				somlr.NextLink = &nextLink
12496			}
12497		}
12498	}
12499
12500	return nil
12501}
12502
12503// SsisObjectMetadataStatusResponse the status of the operation.
12504type SsisObjectMetadataStatusResponse struct {
12505	autorest.Response `json:"-"`
12506	// Status - The status of the operation.
12507	Status *string `json:"status,omitempty"`
12508	// Name - The operation name.
12509	Name *string `json:"name,omitempty"`
12510	// Properties - The operation properties.
12511	Properties *string `json:"properties,omitempty"`
12512	// Error - The operation error message.
12513	Error *string `json:"error,omitempty"`
12514}
12515
12516// SsisPackage ssis Package.
12517type SsisPackage struct {
12518	// FolderID - Folder id which contains package.
12519	FolderID *int64 `json:"folderId,omitempty"`
12520	// ProjectVersion - Project version which contains package.
12521	ProjectVersion *int64 `json:"projectVersion,omitempty"`
12522	// ProjectID - Project id which contains package.
12523	ProjectID *int64 `json:"projectId,omitempty"`
12524	// Parameters - Parameters in package
12525	Parameters *[]SsisParameter `json:"parameters,omitempty"`
12526	// ID - Metadata id.
12527	ID *int64 `json:"id,omitempty"`
12528	// Name - Metadata name.
12529	Name *string `json:"name,omitempty"`
12530	// Description - Metadata description.
12531	Description *string `json:"description,omitempty"`
12532	// Type - Possible values include: 'TypeSsisObjectMetadata', 'TypeFolder', 'TypeProject', 'TypePackage', 'TypeEnvironment'
12533	Type TypeBasicSsisObjectMetadata `json:"type,omitempty"`
12534}
12535
12536// MarshalJSON is the custom marshaler for SsisPackage.
12537func (sp SsisPackage) MarshalJSON() ([]byte, error) {
12538	sp.Type = TypePackage
12539	objectMap := make(map[string]interface{})
12540	if sp.FolderID != nil {
12541		objectMap["folderId"] = sp.FolderID
12542	}
12543	if sp.ProjectVersion != nil {
12544		objectMap["projectVersion"] = sp.ProjectVersion
12545	}
12546	if sp.ProjectID != nil {
12547		objectMap["projectId"] = sp.ProjectID
12548	}
12549	if sp.Parameters != nil {
12550		objectMap["parameters"] = sp.Parameters
12551	}
12552	if sp.ID != nil {
12553		objectMap["id"] = sp.ID
12554	}
12555	if sp.Name != nil {
12556		objectMap["name"] = sp.Name
12557	}
12558	if sp.Description != nil {
12559		objectMap["description"] = sp.Description
12560	}
12561	if sp.Type != "" {
12562		objectMap["type"] = sp.Type
12563	}
12564	return json.Marshal(objectMap)
12565}
12566
12567// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisPackage.
12568func (sp SsisPackage) AsSsisFolder() (*SsisFolder, bool) {
12569	return nil, false
12570}
12571
12572// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisPackage.
12573func (sp SsisPackage) AsSsisProject() (*SsisProject, bool) {
12574	return nil, false
12575}
12576
12577// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisPackage.
12578func (sp SsisPackage) AsSsisPackage() (*SsisPackage, bool) {
12579	return &sp, true
12580}
12581
12582// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisPackage.
12583func (sp SsisPackage) AsSsisEnvironment() (*SsisEnvironment, bool) {
12584	return nil, false
12585}
12586
12587// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisPackage.
12588func (sp SsisPackage) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) {
12589	return nil, false
12590}
12591
12592// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisPackage.
12593func (sp SsisPackage) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) {
12594	return &sp, true
12595}
12596
12597// SsisParameter ssis parameter.
12598type SsisParameter struct {
12599	// ID - Parameter id.
12600	ID *int64 `json:"id,omitempty"`
12601	// Name - Parameter name.
12602	Name *string `json:"name,omitempty"`
12603	// Description - Parameter description.
12604	Description *string `json:"description,omitempty"`
12605	// DataType - Parameter type.
12606	DataType *string `json:"dataType,omitempty"`
12607	// Required - Whether parameter is required.
12608	Required *bool `json:"required,omitempty"`
12609	// Sensitive - Whether parameter is sensitive.
12610	Sensitive *bool `json:"sensitive,omitempty"`
12611	// DesignDefaultValue - Design default value of parameter.
12612	DesignDefaultValue *string `json:"designDefaultValue,omitempty"`
12613	// DefaultValue - Default value of parameter.
12614	DefaultValue *string `json:"defaultValue,omitempty"`
12615	// SensitiveDefaultValue - Default sensitive value of parameter.
12616	SensitiveDefaultValue *string `json:"sensitiveDefaultValue,omitempty"`
12617	// ValueType - Parameter value type.
12618	ValueType *string `json:"valueType,omitempty"`
12619	// ValueSet - Parameter value set.
12620	ValueSet *bool `json:"valueSet,omitempty"`
12621	// Variable - Parameter reference variable.
12622	Variable *string `json:"variable,omitempty"`
12623}
12624
12625// SsisProject ssis project.
12626type SsisProject struct {
12627	// FolderID - Folder id which contains project.
12628	FolderID *int64 `json:"folderId,omitempty"`
12629	// Version - Project version.
12630	Version *int64 `json:"version,omitempty"`
12631	// EnvironmentRefs - Environment reference in project
12632	EnvironmentRefs *[]SsisEnvironmentReference `json:"environmentRefs,omitempty"`
12633	// Parameters - Parameters in project
12634	Parameters *[]SsisParameter `json:"parameters,omitempty"`
12635	// ID - Metadata id.
12636	ID *int64 `json:"id,omitempty"`
12637	// Name - Metadata name.
12638	Name *string `json:"name,omitempty"`
12639	// Description - Metadata description.
12640	Description *string `json:"description,omitempty"`
12641	// Type - Possible values include: 'TypeSsisObjectMetadata', 'TypeFolder', 'TypeProject', 'TypePackage', 'TypeEnvironment'
12642	Type TypeBasicSsisObjectMetadata `json:"type,omitempty"`
12643}
12644
12645// MarshalJSON is the custom marshaler for SsisProject.
12646func (sp SsisProject) MarshalJSON() ([]byte, error) {
12647	sp.Type = TypeProject
12648	objectMap := make(map[string]interface{})
12649	if sp.FolderID != nil {
12650		objectMap["folderId"] = sp.FolderID
12651	}
12652	if sp.Version != nil {
12653		objectMap["version"] = sp.Version
12654	}
12655	if sp.EnvironmentRefs != nil {
12656		objectMap["environmentRefs"] = sp.EnvironmentRefs
12657	}
12658	if sp.Parameters != nil {
12659		objectMap["parameters"] = sp.Parameters
12660	}
12661	if sp.ID != nil {
12662		objectMap["id"] = sp.ID
12663	}
12664	if sp.Name != nil {
12665		objectMap["name"] = sp.Name
12666	}
12667	if sp.Description != nil {
12668		objectMap["description"] = sp.Description
12669	}
12670	if sp.Type != "" {
12671		objectMap["type"] = sp.Type
12672	}
12673	return json.Marshal(objectMap)
12674}
12675
12676// AsSsisFolder is the BasicSsisObjectMetadata implementation for SsisProject.
12677func (sp SsisProject) AsSsisFolder() (*SsisFolder, bool) {
12678	return nil, false
12679}
12680
12681// AsSsisProject is the BasicSsisObjectMetadata implementation for SsisProject.
12682func (sp SsisProject) AsSsisProject() (*SsisProject, bool) {
12683	return &sp, true
12684}
12685
12686// AsSsisPackage is the BasicSsisObjectMetadata implementation for SsisProject.
12687func (sp SsisProject) AsSsisPackage() (*SsisPackage, bool) {
12688	return nil, false
12689}
12690
12691// AsSsisEnvironment is the BasicSsisObjectMetadata implementation for SsisProject.
12692func (sp SsisProject) AsSsisEnvironment() (*SsisEnvironment, bool) {
12693	return nil, false
12694}
12695
12696// AsSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisProject.
12697func (sp SsisProject) AsSsisObjectMetadata() (*SsisObjectMetadata, bool) {
12698	return nil, false
12699}
12700
12701// AsBasicSsisObjectMetadata is the BasicSsisObjectMetadata implementation for SsisProject.
12702func (sp SsisProject) AsBasicSsisObjectMetadata() (BasicSsisObjectMetadata, bool) {
12703	return &sp, true
12704}
12705
12706// SsisVariable ssis variable.
12707type SsisVariable struct {
12708	// ID - Variable id.
12709	ID *int64 `json:"id,omitempty"`
12710	// Name - Variable name.
12711	Name *string `json:"name,omitempty"`
12712	// Description - Variable description.
12713	Description *string `json:"description,omitempty"`
12714	// DataType - Variable type.
12715	DataType *string `json:"dataType,omitempty"`
12716	// Sensitive - Whether variable is sensitive.
12717	Sensitive *bool `json:"sensitive,omitempty"`
12718	// Value - Variable value.
12719	Value *string `json:"value,omitempty"`
12720	// SensitiveValue - Variable sensitive value.
12721	SensitiveValue *string `json:"sensitiveValue,omitempty"`
12722}
12723
12724// SubResource azure Synapse nested resource, which belongs to a workspace.
12725type SubResource struct {
12726	// Etag - READ-ONLY; Resource Etag.
12727	Etag *string `json:"etag,omitempty"`
12728	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
12729	ID *string `json:"id,omitempty"`
12730	// Name - READ-ONLY; The name of the resource
12731	Name *string `json:"name,omitempty"`
12732	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
12733	Type *string `json:"type,omitempty"`
12734}
12735
12736// TopQueries a database query.
12737type TopQueries struct {
12738	// AggregationFunction - READ-ONLY; The function that is used to aggregate each query's metrics. Possible values include: 'Min', 'Max', 'Avg', 'Sum'
12739	AggregationFunction QueryAggregationFunction `json:"aggregationFunction,omitempty"`
12740	// 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'
12741	ExecutionType QueryExecutionType `json:"executionType,omitempty"`
12742	// IntervalType - READ-ONLY; The duration of the interval (ISO8601 duration format).
12743	IntervalType *string `json:"intervalType,omitempty"`
12744	// NumberOfTopQueries - READ-ONLY; The number of requested queries.
12745	NumberOfTopQueries *float64 `json:"numberOfTopQueries,omitempty"`
12746	// ObservationStartTime - READ-ONLY; The start time for queries that are returned (ISO8601 format)
12747	ObservationStartTime *date.Time `json:"observationStartTime,omitempty"`
12748	// ObservationEndTime - READ-ONLY; The end time for queries that are returned (ISO8601 format)
12749	ObservationEndTime *date.Time `json:"observationEndTime,omitempty"`
12750	// ObservedMetric - READ-ONLY; The type of metric to use for ordering the top metrics. Possible values include: 'CPU', 'Io', 'Logio', 'Duration', 'ExecutionCount'
12751	ObservedMetric QueryObservedMetricType `json:"observedMetric,omitempty"`
12752	// Queries - READ-ONLY; The list of queries.
12753	Queries *[]QueryStatistic `json:"queries,omitempty"`
12754}
12755
12756// TopQueriesListResult represents the response to a get top queries request.
12757type TopQueriesListResult struct {
12758	// Value - The list of top queries.
12759	Value *[]TopQueries `json:"value,omitempty"`
12760}
12761
12762// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
12763// which has 'tags' and a 'location'
12764type TrackedResource struct {
12765	// Tags - Resource tags.
12766	Tags map[string]*string `json:"tags"`
12767	// Location - The geo-location where the resource lives
12768	Location *string `json:"location,omitempty"`
12769	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
12770	ID *string `json:"id,omitempty"`
12771	// Name - READ-ONLY; The name of the resource
12772	Name *string `json:"name,omitempty"`
12773	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
12774	Type *string `json:"type,omitempty"`
12775}
12776
12777// MarshalJSON is the custom marshaler for TrackedResource.
12778func (tr TrackedResource) MarshalJSON() ([]byte, error) {
12779	objectMap := make(map[string]interface{})
12780	if tr.Tags != nil {
12781		objectMap["tags"] = tr.Tags
12782	}
12783	if tr.Location != nil {
12784		objectMap["location"] = tr.Location
12785	}
12786	return json.Marshal(objectMap)
12787}
12788
12789// TransparentDataEncryption represents a Sql pool transparent data encryption configuration.
12790type TransparentDataEncryption struct {
12791	autorest.Response `json:"-"`
12792	// Location - READ-ONLY; Resource location.
12793	Location *string `json:"location,omitempty"`
12794	// TransparentDataEncryptionProperties - Represents the properties of the resource.
12795	*TransparentDataEncryptionProperties `json:"properties,omitempty"`
12796	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
12797	ID *string `json:"id,omitempty"`
12798	// Name - READ-ONLY; The name of the resource
12799	Name *string `json:"name,omitempty"`
12800	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
12801	Type *string `json:"type,omitempty"`
12802}
12803
12804// MarshalJSON is the custom marshaler for TransparentDataEncryption.
12805func (tde TransparentDataEncryption) MarshalJSON() ([]byte, error) {
12806	objectMap := make(map[string]interface{})
12807	if tde.TransparentDataEncryptionProperties != nil {
12808		objectMap["properties"] = tde.TransparentDataEncryptionProperties
12809	}
12810	return json.Marshal(objectMap)
12811}
12812
12813// UnmarshalJSON is the custom unmarshaler for TransparentDataEncryption struct.
12814func (tde *TransparentDataEncryption) UnmarshalJSON(body []byte) error {
12815	var m map[string]*json.RawMessage
12816	err := json.Unmarshal(body, &m)
12817	if err != nil {
12818		return err
12819	}
12820	for k, v := range m {
12821		switch k {
12822		case "location":
12823			if v != nil {
12824				var location string
12825				err = json.Unmarshal(*v, &location)
12826				if err != nil {
12827					return err
12828				}
12829				tde.Location = &location
12830			}
12831		case "properties":
12832			if v != nil {
12833				var transparentDataEncryptionProperties TransparentDataEncryptionProperties
12834				err = json.Unmarshal(*v, &transparentDataEncryptionProperties)
12835				if err != nil {
12836					return err
12837				}
12838				tde.TransparentDataEncryptionProperties = &transparentDataEncryptionProperties
12839			}
12840		case "id":
12841			if v != nil {
12842				var ID string
12843				err = json.Unmarshal(*v, &ID)
12844				if err != nil {
12845					return err
12846				}
12847				tde.ID = &ID
12848			}
12849		case "name":
12850			if v != nil {
12851				var name string
12852				err = json.Unmarshal(*v, &name)
12853				if err != nil {
12854					return err
12855				}
12856				tde.Name = &name
12857			}
12858		case "type":
12859			if v != nil {
12860				var typeVar string
12861				err = json.Unmarshal(*v, &typeVar)
12862				if err != nil {
12863					return err
12864				}
12865				tde.Type = &typeVar
12866			}
12867		}
12868	}
12869
12870	return nil
12871}
12872
12873// TransparentDataEncryptionListResult a list of transparent data encryption configurations.
12874type TransparentDataEncryptionListResult struct {
12875	autorest.Response `json:"-"`
12876	// Value - READ-ONLY; Array of results.
12877	Value *[]TransparentDataEncryption `json:"value,omitempty"`
12878	// NextLink - READ-ONLY; Link to retrieve next page of results.
12879	NextLink *string `json:"nextLink,omitempty"`
12880}
12881
12882// TransparentDataEncryptionListResultIterator provides access to a complete listing of
12883// TransparentDataEncryption values.
12884type TransparentDataEncryptionListResultIterator struct {
12885	i    int
12886	page TransparentDataEncryptionListResultPage
12887}
12888
12889// NextWithContext advances to the next value.  If there was an error making
12890// the request the iterator does not advance and the error is returned.
12891func (iter *TransparentDataEncryptionListResultIterator) NextWithContext(ctx context.Context) (err error) {
12892	if tracing.IsEnabled() {
12893		ctx = tracing.StartSpan(ctx, fqdn+"/TransparentDataEncryptionListResultIterator.NextWithContext")
12894		defer func() {
12895			sc := -1
12896			if iter.Response().Response.Response != nil {
12897				sc = iter.Response().Response.Response.StatusCode
12898			}
12899			tracing.EndSpan(ctx, sc, err)
12900		}()
12901	}
12902	iter.i++
12903	if iter.i < len(iter.page.Values()) {
12904		return nil
12905	}
12906	err = iter.page.NextWithContext(ctx)
12907	if err != nil {
12908		iter.i--
12909		return err
12910	}
12911	iter.i = 0
12912	return nil
12913}
12914
12915// Next advances to the next value.  If there was an error making
12916// the request the iterator does not advance and the error is returned.
12917// Deprecated: Use NextWithContext() instead.
12918func (iter *TransparentDataEncryptionListResultIterator) Next() error {
12919	return iter.NextWithContext(context.Background())
12920}
12921
12922// NotDone returns true if the enumeration should be started or is not yet complete.
12923func (iter TransparentDataEncryptionListResultIterator) NotDone() bool {
12924	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12925}
12926
12927// Response returns the raw server response from the last page request.
12928func (iter TransparentDataEncryptionListResultIterator) Response() TransparentDataEncryptionListResult {
12929	return iter.page.Response()
12930}
12931
12932// Value returns the current value or a zero-initialized value if the
12933// iterator has advanced beyond the end of the collection.
12934func (iter TransparentDataEncryptionListResultIterator) Value() TransparentDataEncryption {
12935	if !iter.page.NotDone() {
12936		return TransparentDataEncryption{}
12937	}
12938	return iter.page.Values()[iter.i]
12939}
12940
12941// Creates a new instance of the TransparentDataEncryptionListResultIterator type.
12942func NewTransparentDataEncryptionListResultIterator(page TransparentDataEncryptionListResultPage) TransparentDataEncryptionListResultIterator {
12943	return TransparentDataEncryptionListResultIterator{page: page}
12944}
12945
12946// IsEmpty returns true if the ListResult contains no values.
12947func (tdelr TransparentDataEncryptionListResult) IsEmpty() bool {
12948	return tdelr.Value == nil || len(*tdelr.Value) == 0
12949}
12950
12951// hasNextLink returns true if the NextLink is not empty.
12952func (tdelr TransparentDataEncryptionListResult) hasNextLink() bool {
12953	return tdelr.NextLink != nil && len(*tdelr.NextLink) != 0
12954}
12955
12956// transparentDataEncryptionListResultPreparer prepares a request to retrieve the next set of results.
12957// It returns nil if no more results exist.
12958func (tdelr TransparentDataEncryptionListResult) transparentDataEncryptionListResultPreparer(ctx context.Context) (*http.Request, error) {
12959	if !tdelr.hasNextLink() {
12960		return nil, nil
12961	}
12962	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12963		autorest.AsJSON(),
12964		autorest.AsGet(),
12965		autorest.WithBaseURL(to.String(tdelr.NextLink)))
12966}
12967
12968// TransparentDataEncryptionListResultPage contains a page of TransparentDataEncryption values.
12969type TransparentDataEncryptionListResultPage struct {
12970	fn    func(context.Context, TransparentDataEncryptionListResult) (TransparentDataEncryptionListResult, error)
12971	tdelr TransparentDataEncryptionListResult
12972}
12973
12974// NextWithContext advances to the next page of values.  If there was an error making
12975// the request the page does not advance and the error is returned.
12976func (page *TransparentDataEncryptionListResultPage) NextWithContext(ctx context.Context) (err error) {
12977	if tracing.IsEnabled() {
12978		ctx = tracing.StartSpan(ctx, fqdn+"/TransparentDataEncryptionListResultPage.NextWithContext")
12979		defer func() {
12980			sc := -1
12981			if page.Response().Response.Response != nil {
12982				sc = page.Response().Response.Response.StatusCode
12983			}
12984			tracing.EndSpan(ctx, sc, err)
12985		}()
12986	}
12987	for {
12988		next, err := page.fn(ctx, page.tdelr)
12989		if err != nil {
12990			return err
12991		}
12992		page.tdelr = next
12993		if !next.hasNextLink() || !next.IsEmpty() {
12994			break
12995		}
12996	}
12997	return nil
12998}
12999
13000// Next advances to the next page of values.  If there was an error making
13001// the request the page does not advance and the error is returned.
13002// Deprecated: Use NextWithContext() instead.
13003func (page *TransparentDataEncryptionListResultPage) Next() error {
13004	return page.NextWithContext(context.Background())
13005}
13006
13007// NotDone returns true if the page enumeration should be started or is not yet complete.
13008func (page TransparentDataEncryptionListResultPage) NotDone() bool {
13009	return !page.tdelr.IsEmpty()
13010}
13011
13012// Response returns the raw server response from the last page request.
13013func (page TransparentDataEncryptionListResultPage) Response() TransparentDataEncryptionListResult {
13014	return page.tdelr
13015}
13016
13017// Values returns the slice of values for the current page or nil if there are no values.
13018func (page TransparentDataEncryptionListResultPage) Values() []TransparentDataEncryption {
13019	if page.tdelr.IsEmpty() {
13020		return nil
13021	}
13022	return *page.tdelr.Value
13023}
13024
13025// Creates a new instance of the TransparentDataEncryptionListResultPage type.
13026func NewTransparentDataEncryptionListResultPage(cur TransparentDataEncryptionListResult, getNextPage func(context.Context, TransparentDataEncryptionListResult) (TransparentDataEncryptionListResult, error)) TransparentDataEncryptionListResultPage {
13027	return TransparentDataEncryptionListResultPage{
13028		fn:    getNextPage,
13029		tdelr: cur,
13030	}
13031}
13032
13033// TransparentDataEncryptionProperties represents the properties of a database transparent data encryption.
13034type TransparentDataEncryptionProperties struct {
13035	// Status - The status of the database transparent data encryption. Possible values include: 'TransparentDataEncryptionStatusEnabled', 'TransparentDataEncryptionStatusDisabled'
13036	Status TransparentDataEncryptionStatus `json:"status,omitempty"`
13037}
13038
13039// UpdateIntegrationRuntimeNodeRequest update integration runtime node request.
13040type UpdateIntegrationRuntimeNodeRequest struct {
13041	// ConcurrentJobsLimit - The number of concurrent jobs permitted to run on the integration runtime node. Values between 1 and maxConcurrentJobs(inclusive) are allowed.
13042	ConcurrentJobsLimit *int32 `json:"concurrentJobsLimit,omitempty"`
13043}
13044
13045// UpdateIntegrationRuntimeRequest update integration runtime request.
13046type UpdateIntegrationRuntimeRequest struct {
13047	// AutoUpdate - Enables or disables the auto-update feature of the self-hosted integration runtime. See https://go.microsoft.com/fwlink/?linkid=854189. Possible values include: 'On', 'Off'
13048	AutoUpdate IntegrationRuntimeAutoUpdate `json:"autoUpdate,omitempty"`
13049	// UpdateDelayOffset - The time offset (in hours) in the day, e.g., PT03H is 3 hours. The integration runtime auto update will happen on that time.
13050	UpdateDelayOffset *string `json:"updateDelayOffset,omitempty"`
13051}
13052
13053// VirtualNetworkProfile virtual Network Profile
13054type VirtualNetworkProfile struct {
13055	// ComputeSubnetID - Subnet ID used for computes in workspace
13056	ComputeSubnetID *string `json:"computeSubnetId,omitempty"`
13057}
13058
13059// VulnerabilityAssessmentRecurringScansProperties properties of a Vulnerability Assessment recurring
13060// scans.
13061type VulnerabilityAssessmentRecurringScansProperties struct {
13062	// IsEnabled - Recurring scans state.
13063	IsEnabled *bool `json:"isEnabled,omitempty"`
13064	// EmailSubscriptionAdmins - Specifies that the schedule scan notification will be is sent to the subscription administrators.
13065	EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty"`
13066	// Emails - Specifies an array of e-mail addresses to which the scan notification is sent.
13067	Emails *[]string `json:"emails,omitempty"`
13068}
13069
13070// VulnerabilityAssessmentScanError properties of a vulnerability assessment scan error.
13071type VulnerabilityAssessmentScanError struct {
13072	// Code - READ-ONLY; The error code.
13073	Code *string `json:"code,omitempty"`
13074	// Message - READ-ONLY; The error message.
13075	Message *string `json:"message,omitempty"`
13076}
13077
13078// VulnerabilityAssessmentScanRecord a vulnerability assessment scan record.
13079type VulnerabilityAssessmentScanRecord struct {
13080	autorest.Response `json:"-"`
13081	// VulnerabilityAssessmentScanRecordProperties - Resource properties.
13082	*VulnerabilityAssessmentScanRecordProperties `json:"properties,omitempty"`
13083	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
13084	ID *string `json:"id,omitempty"`
13085	// Name - READ-ONLY; The name of the resource
13086	Name *string `json:"name,omitempty"`
13087	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
13088	Type *string `json:"type,omitempty"`
13089}
13090
13091// MarshalJSON is the custom marshaler for VulnerabilityAssessmentScanRecord.
13092func (vasr VulnerabilityAssessmentScanRecord) MarshalJSON() ([]byte, error) {
13093	objectMap := make(map[string]interface{})
13094	if vasr.VulnerabilityAssessmentScanRecordProperties != nil {
13095		objectMap["properties"] = vasr.VulnerabilityAssessmentScanRecordProperties
13096	}
13097	return json.Marshal(objectMap)
13098}
13099
13100// UnmarshalJSON is the custom unmarshaler for VulnerabilityAssessmentScanRecord struct.
13101func (vasr *VulnerabilityAssessmentScanRecord) UnmarshalJSON(body []byte) error {
13102	var m map[string]*json.RawMessage
13103	err := json.Unmarshal(body, &m)
13104	if err != nil {
13105		return err
13106	}
13107	for k, v := range m {
13108		switch k {
13109		case "properties":
13110			if v != nil {
13111				var vulnerabilityAssessmentScanRecordProperties VulnerabilityAssessmentScanRecordProperties
13112				err = json.Unmarshal(*v, &vulnerabilityAssessmentScanRecordProperties)
13113				if err != nil {
13114					return err
13115				}
13116				vasr.VulnerabilityAssessmentScanRecordProperties = &vulnerabilityAssessmentScanRecordProperties
13117			}
13118		case "id":
13119			if v != nil {
13120				var ID string
13121				err = json.Unmarshal(*v, &ID)
13122				if err != nil {
13123					return err
13124				}
13125				vasr.ID = &ID
13126			}
13127		case "name":
13128			if v != nil {
13129				var name string
13130				err = json.Unmarshal(*v, &name)
13131				if err != nil {
13132					return err
13133				}
13134				vasr.Name = &name
13135			}
13136		case "type":
13137			if v != nil {
13138				var typeVar string
13139				err = json.Unmarshal(*v, &typeVar)
13140				if err != nil {
13141					return err
13142				}
13143				vasr.Type = &typeVar
13144			}
13145		}
13146	}
13147
13148	return nil
13149}
13150
13151// VulnerabilityAssessmentScanRecordListResult a list of vulnerability assessment scan records.
13152type VulnerabilityAssessmentScanRecordListResult struct {
13153	autorest.Response `json:"-"`
13154	// Value - READ-ONLY; Array of results.
13155	Value *[]VulnerabilityAssessmentScanRecord `json:"value,omitempty"`
13156	// NextLink - READ-ONLY; Link to retrieve next page of results.
13157	NextLink *string `json:"nextLink,omitempty"`
13158}
13159
13160// VulnerabilityAssessmentScanRecordListResultIterator provides access to a complete listing of
13161// VulnerabilityAssessmentScanRecord values.
13162type VulnerabilityAssessmentScanRecordListResultIterator struct {
13163	i    int
13164	page VulnerabilityAssessmentScanRecordListResultPage
13165}
13166
13167// NextWithContext advances to the next value.  If there was an error making
13168// the request the iterator does not advance and the error is returned.
13169func (iter *VulnerabilityAssessmentScanRecordListResultIterator) NextWithContext(ctx context.Context) (err error) {
13170	if tracing.IsEnabled() {
13171		ctx = tracing.StartSpan(ctx, fqdn+"/VulnerabilityAssessmentScanRecordListResultIterator.NextWithContext")
13172		defer func() {
13173			sc := -1
13174			if iter.Response().Response.Response != nil {
13175				sc = iter.Response().Response.Response.StatusCode
13176			}
13177			tracing.EndSpan(ctx, sc, err)
13178		}()
13179	}
13180	iter.i++
13181	if iter.i < len(iter.page.Values()) {
13182		return nil
13183	}
13184	err = iter.page.NextWithContext(ctx)
13185	if err != nil {
13186		iter.i--
13187		return err
13188	}
13189	iter.i = 0
13190	return nil
13191}
13192
13193// Next advances to the next value.  If there was an error making
13194// the request the iterator does not advance and the error is returned.
13195// Deprecated: Use NextWithContext() instead.
13196func (iter *VulnerabilityAssessmentScanRecordListResultIterator) Next() error {
13197	return iter.NextWithContext(context.Background())
13198}
13199
13200// NotDone returns true if the enumeration should be started or is not yet complete.
13201func (iter VulnerabilityAssessmentScanRecordListResultIterator) NotDone() bool {
13202	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13203}
13204
13205// Response returns the raw server response from the last page request.
13206func (iter VulnerabilityAssessmentScanRecordListResultIterator) Response() VulnerabilityAssessmentScanRecordListResult {
13207	return iter.page.Response()
13208}
13209
13210// Value returns the current value or a zero-initialized value if the
13211// iterator has advanced beyond the end of the collection.
13212func (iter VulnerabilityAssessmentScanRecordListResultIterator) Value() VulnerabilityAssessmentScanRecord {
13213	if !iter.page.NotDone() {
13214		return VulnerabilityAssessmentScanRecord{}
13215	}
13216	return iter.page.Values()[iter.i]
13217}
13218
13219// Creates a new instance of the VulnerabilityAssessmentScanRecordListResultIterator type.
13220func NewVulnerabilityAssessmentScanRecordListResultIterator(page VulnerabilityAssessmentScanRecordListResultPage) VulnerabilityAssessmentScanRecordListResultIterator {
13221	return VulnerabilityAssessmentScanRecordListResultIterator{page: page}
13222}
13223
13224// IsEmpty returns true if the ListResult contains no values.
13225func (vasrlr VulnerabilityAssessmentScanRecordListResult) IsEmpty() bool {
13226	return vasrlr.Value == nil || len(*vasrlr.Value) == 0
13227}
13228
13229// hasNextLink returns true if the NextLink is not empty.
13230func (vasrlr VulnerabilityAssessmentScanRecordListResult) hasNextLink() bool {
13231	return vasrlr.NextLink != nil && len(*vasrlr.NextLink) != 0
13232}
13233
13234// vulnerabilityAssessmentScanRecordListResultPreparer prepares a request to retrieve the next set of results.
13235// It returns nil if no more results exist.
13236func (vasrlr VulnerabilityAssessmentScanRecordListResult) vulnerabilityAssessmentScanRecordListResultPreparer(ctx context.Context) (*http.Request, error) {
13237	if !vasrlr.hasNextLink() {
13238		return nil, nil
13239	}
13240	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13241		autorest.AsJSON(),
13242		autorest.AsGet(),
13243		autorest.WithBaseURL(to.String(vasrlr.NextLink)))
13244}
13245
13246// VulnerabilityAssessmentScanRecordListResultPage contains a page of VulnerabilityAssessmentScanRecord
13247// values.
13248type VulnerabilityAssessmentScanRecordListResultPage struct {
13249	fn     func(context.Context, VulnerabilityAssessmentScanRecordListResult) (VulnerabilityAssessmentScanRecordListResult, error)
13250	vasrlr VulnerabilityAssessmentScanRecordListResult
13251}
13252
13253// NextWithContext advances to the next page of values.  If there was an error making
13254// the request the page does not advance and the error is returned.
13255func (page *VulnerabilityAssessmentScanRecordListResultPage) NextWithContext(ctx context.Context) (err error) {
13256	if tracing.IsEnabled() {
13257		ctx = tracing.StartSpan(ctx, fqdn+"/VulnerabilityAssessmentScanRecordListResultPage.NextWithContext")
13258		defer func() {
13259			sc := -1
13260			if page.Response().Response.Response != nil {
13261				sc = page.Response().Response.Response.StatusCode
13262			}
13263			tracing.EndSpan(ctx, sc, err)
13264		}()
13265	}
13266	for {
13267		next, err := page.fn(ctx, page.vasrlr)
13268		if err != nil {
13269			return err
13270		}
13271		page.vasrlr = next
13272		if !next.hasNextLink() || !next.IsEmpty() {
13273			break
13274		}
13275	}
13276	return nil
13277}
13278
13279// Next advances to the next page of values.  If there was an error making
13280// the request the page does not advance and the error is returned.
13281// Deprecated: Use NextWithContext() instead.
13282func (page *VulnerabilityAssessmentScanRecordListResultPage) Next() error {
13283	return page.NextWithContext(context.Background())
13284}
13285
13286// NotDone returns true if the page enumeration should be started or is not yet complete.
13287func (page VulnerabilityAssessmentScanRecordListResultPage) NotDone() bool {
13288	return !page.vasrlr.IsEmpty()
13289}
13290
13291// Response returns the raw server response from the last page request.
13292func (page VulnerabilityAssessmentScanRecordListResultPage) Response() VulnerabilityAssessmentScanRecordListResult {
13293	return page.vasrlr
13294}
13295
13296// Values returns the slice of values for the current page or nil if there are no values.
13297func (page VulnerabilityAssessmentScanRecordListResultPage) Values() []VulnerabilityAssessmentScanRecord {
13298	if page.vasrlr.IsEmpty() {
13299		return nil
13300	}
13301	return *page.vasrlr.Value
13302}
13303
13304// Creates a new instance of the VulnerabilityAssessmentScanRecordListResultPage type.
13305func NewVulnerabilityAssessmentScanRecordListResultPage(cur VulnerabilityAssessmentScanRecordListResult, getNextPage func(context.Context, VulnerabilityAssessmentScanRecordListResult) (VulnerabilityAssessmentScanRecordListResult, error)) VulnerabilityAssessmentScanRecordListResultPage {
13306	return VulnerabilityAssessmentScanRecordListResultPage{
13307		fn:     getNextPage,
13308		vasrlr: cur,
13309	}
13310}
13311
13312// VulnerabilityAssessmentScanRecordProperties properties of a vulnerability assessment scan record.
13313type VulnerabilityAssessmentScanRecordProperties struct {
13314	// ScanID - READ-ONLY; The scan ID.
13315	ScanID *string `json:"scanId,omitempty"`
13316	// TriggerType - READ-ONLY; The scan trigger type. Possible values include: 'OnDemand', 'Recurring'
13317	TriggerType VulnerabilityAssessmentScanTriggerType `json:"triggerType,omitempty"`
13318	// State - READ-ONLY; The scan status. Possible values include: 'VulnerabilityAssessmentScanStatePassed', 'VulnerabilityAssessmentScanStateFailed', 'VulnerabilityAssessmentScanStateFailedToRun', 'VulnerabilityAssessmentScanStateInProgress'
13319	State VulnerabilityAssessmentScanState `json:"state,omitempty"`
13320	// StartTime - READ-ONLY; The scan start time (UTC).
13321	StartTime *date.Time `json:"startTime,omitempty"`
13322	// EndTime - READ-ONLY; The scan end time (UTC).
13323	EndTime *date.Time `json:"endTime,omitempty"`
13324	// Errors - READ-ONLY; The scan errors.
13325	Errors *[]VulnerabilityAssessmentScanError `json:"errors,omitempty"`
13326	// StorageContainerPath - READ-ONLY; The scan results storage container path.
13327	StorageContainerPath *string `json:"storageContainerPath,omitempty"`
13328	// NumberOfFailedSecurityChecks - READ-ONLY; The number of failed security checks.
13329	NumberOfFailedSecurityChecks *int32 `json:"numberOfFailedSecurityChecks,omitempty"`
13330}
13331
13332// WorkloadClassifier workload classifier operations for a data warehouse
13333type WorkloadClassifier struct {
13334	autorest.Response `json:"-"`
13335	// WorkloadClassifierProperties - Resource properties.
13336	*WorkloadClassifierProperties `json:"properties,omitempty"`
13337	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
13338	ID *string `json:"id,omitempty"`
13339	// Name - READ-ONLY; The name of the resource
13340	Name *string `json:"name,omitempty"`
13341	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
13342	Type *string `json:"type,omitempty"`
13343}
13344
13345// MarshalJSON is the custom marshaler for WorkloadClassifier.
13346func (wc WorkloadClassifier) MarshalJSON() ([]byte, error) {
13347	objectMap := make(map[string]interface{})
13348	if wc.WorkloadClassifierProperties != nil {
13349		objectMap["properties"] = wc.WorkloadClassifierProperties
13350	}
13351	return json.Marshal(objectMap)
13352}
13353
13354// UnmarshalJSON is the custom unmarshaler for WorkloadClassifier struct.
13355func (wc *WorkloadClassifier) UnmarshalJSON(body []byte) error {
13356	var m map[string]*json.RawMessage
13357	err := json.Unmarshal(body, &m)
13358	if err != nil {
13359		return err
13360	}
13361	for k, v := range m {
13362		switch k {
13363		case "properties":
13364			if v != nil {
13365				var workloadClassifierProperties WorkloadClassifierProperties
13366				err = json.Unmarshal(*v, &workloadClassifierProperties)
13367				if err != nil {
13368					return err
13369				}
13370				wc.WorkloadClassifierProperties = &workloadClassifierProperties
13371			}
13372		case "id":
13373			if v != nil {
13374				var ID string
13375				err = json.Unmarshal(*v, &ID)
13376				if err != nil {
13377					return err
13378				}
13379				wc.ID = &ID
13380			}
13381		case "name":
13382			if v != nil {
13383				var name string
13384				err = json.Unmarshal(*v, &name)
13385				if err != nil {
13386					return err
13387				}
13388				wc.Name = &name
13389			}
13390		case "type":
13391			if v != nil {
13392				var typeVar string
13393				err = json.Unmarshal(*v, &typeVar)
13394				if err != nil {
13395					return err
13396				}
13397				wc.Type = &typeVar
13398			}
13399		}
13400	}
13401
13402	return nil
13403}
13404
13405// WorkloadClassifierListResult a list of workload classifiers for a workload group.
13406type WorkloadClassifierListResult struct {
13407	autorest.Response `json:"-"`
13408	// Value - READ-ONLY; Array of results.
13409	Value *[]WorkloadClassifier `json:"value,omitempty"`
13410	// NextLink - READ-ONLY; Link to retrieve next page of results.
13411	NextLink *string `json:"nextLink,omitempty"`
13412}
13413
13414// WorkloadClassifierListResultIterator provides access to a complete listing of WorkloadClassifier values.
13415type WorkloadClassifierListResultIterator struct {
13416	i    int
13417	page WorkloadClassifierListResultPage
13418}
13419
13420// NextWithContext advances to the next value.  If there was an error making
13421// the request the iterator does not advance and the error is returned.
13422func (iter *WorkloadClassifierListResultIterator) NextWithContext(ctx context.Context) (err error) {
13423	if tracing.IsEnabled() {
13424		ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadClassifierListResultIterator.NextWithContext")
13425		defer func() {
13426			sc := -1
13427			if iter.Response().Response.Response != nil {
13428				sc = iter.Response().Response.Response.StatusCode
13429			}
13430			tracing.EndSpan(ctx, sc, err)
13431		}()
13432	}
13433	iter.i++
13434	if iter.i < len(iter.page.Values()) {
13435		return nil
13436	}
13437	err = iter.page.NextWithContext(ctx)
13438	if err != nil {
13439		iter.i--
13440		return err
13441	}
13442	iter.i = 0
13443	return nil
13444}
13445
13446// Next advances to the next value.  If there was an error making
13447// the request the iterator does not advance and the error is returned.
13448// Deprecated: Use NextWithContext() instead.
13449func (iter *WorkloadClassifierListResultIterator) Next() error {
13450	return iter.NextWithContext(context.Background())
13451}
13452
13453// NotDone returns true if the enumeration should be started or is not yet complete.
13454func (iter WorkloadClassifierListResultIterator) NotDone() bool {
13455	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13456}
13457
13458// Response returns the raw server response from the last page request.
13459func (iter WorkloadClassifierListResultIterator) Response() WorkloadClassifierListResult {
13460	return iter.page.Response()
13461}
13462
13463// Value returns the current value or a zero-initialized value if the
13464// iterator has advanced beyond the end of the collection.
13465func (iter WorkloadClassifierListResultIterator) Value() WorkloadClassifier {
13466	if !iter.page.NotDone() {
13467		return WorkloadClassifier{}
13468	}
13469	return iter.page.Values()[iter.i]
13470}
13471
13472// Creates a new instance of the WorkloadClassifierListResultIterator type.
13473func NewWorkloadClassifierListResultIterator(page WorkloadClassifierListResultPage) WorkloadClassifierListResultIterator {
13474	return WorkloadClassifierListResultIterator{page: page}
13475}
13476
13477// IsEmpty returns true if the ListResult contains no values.
13478func (wclr WorkloadClassifierListResult) IsEmpty() bool {
13479	return wclr.Value == nil || len(*wclr.Value) == 0
13480}
13481
13482// hasNextLink returns true if the NextLink is not empty.
13483func (wclr WorkloadClassifierListResult) hasNextLink() bool {
13484	return wclr.NextLink != nil && len(*wclr.NextLink) != 0
13485}
13486
13487// workloadClassifierListResultPreparer prepares a request to retrieve the next set of results.
13488// It returns nil if no more results exist.
13489func (wclr WorkloadClassifierListResult) workloadClassifierListResultPreparer(ctx context.Context) (*http.Request, error) {
13490	if !wclr.hasNextLink() {
13491		return nil, nil
13492	}
13493	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13494		autorest.AsJSON(),
13495		autorest.AsGet(),
13496		autorest.WithBaseURL(to.String(wclr.NextLink)))
13497}
13498
13499// WorkloadClassifierListResultPage contains a page of WorkloadClassifier values.
13500type WorkloadClassifierListResultPage struct {
13501	fn   func(context.Context, WorkloadClassifierListResult) (WorkloadClassifierListResult, error)
13502	wclr WorkloadClassifierListResult
13503}
13504
13505// NextWithContext advances to the next page of values.  If there was an error making
13506// the request the page does not advance and the error is returned.
13507func (page *WorkloadClassifierListResultPage) NextWithContext(ctx context.Context) (err error) {
13508	if tracing.IsEnabled() {
13509		ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadClassifierListResultPage.NextWithContext")
13510		defer func() {
13511			sc := -1
13512			if page.Response().Response.Response != nil {
13513				sc = page.Response().Response.Response.StatusCode
13514			}
13515			tracing.EndSpan(ctx, sc, err)
13516		}()
13517	}
13518	for {
13519		next, err := page.fn(ctx, page.wclr)
13520		if err != nil {
13521			return err
13522		}
13523		page.wclr = next
13524		if !next.hasNextLink() || !next.IsEmpty() {
13525			break
13526		}
13527	}
13528	return nil
13529}
13530
13531// Next advances to the next page of values.  If there was an error making
13532// the request the page does not advance and the error is returned.
13533// Deprecated: Use NextWithContext() instead.
13534func (page *WorkloadClassifierListResultPage) Next() error {
13535	return page.NextWithContext(context.Background())
13536}
13537
13538// NotDone returns true if the page enumeration should be started or is not yet complete.
13539func (page WorkloadClassifierListResultPage) NotDone() bool {
13540	return !page.wclr.IsEmpty()
13541}
13542
13543// Response returns the raw server response from the last page request.
13544func (page WorkloadClassifierListResultPage) Response() WorkloadClassifierListResult {
13545	return page.wclr
13546}
13547
13548// Values returns the slice of values for the current page or nil if there are no values.
13549func (page WorkloadClassifierListResultPage) Values() []WorkloadClassifier {
13550	if page.wclr.IsEmpty() {
13551		return nil
13552	}
13553	return *page.wclr.Value
13554}
13555
13556// Creates a new instance of the WorkloadClassifierListResultPage type.
13557func NewWorkloadClassifierListResultPage(cur WorkloadClassifierListResult, getNextPage func(context.Context, WorkloadClassifierListResult) (WorkloadClassifierListResult, error)) WorkloadClassifierListResultPage {
13558	return WorkloadClassifierListResultPage{
13559		fn:   getNextPage,
13560		wclr: cur,
13561	}
13562}
13563
13564// WorkloadClassifierProperties workload classifier definition. For more information look at
13565// sys.workload_management_workload_classifiers (DMV).
13566type WorkloadClassifierProperties struct {
13567	// MemberName - The workload classifier member name.
13568	MemberName *string `json:"memberName,omitempty"`
13569	// Label - The workload classifier label.
13570	Label *string `json:"label,omitempty"`
13571	// Context - The workload classifier context.
13572	Context *string `json:"context,omitempty"`
13573	// StartTime - The workload classifier start time for classification.
13574	StartTime *string `json:"startTime,omitempty"`
13575	// EndTime - The workload classifier end time for classification.
13576	EndTime *string `json:"endTime,omitempty"`
13577	// Importance - The workload classifier importance.
13578	Importance *string `json:"importance,omitempty"`
13579}
13580
13581// WorkloadGroup workload group operations for a sql pool
13582type WorkloadGroup struct {
13583	autorest.Response `json:"-"`
13584	// WorkloadGroupProperties - Resource properties.
13585	*WorkloadGroupProperties `json:"properties,omitempty"`
13586	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
13587	ID *string `json:"id,omitempty"`
13588	// Name - READ-ONLY; The name of the resource
13589	Name *string `json:"name,omitempty"`
13590	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
13591	Type *string `json:"type,omitempty"`
13592}
13593
13594// MarshalJSON is the custom marshaler for WorkloadGroup.
13595func (wg WorkloadGroup) MarshalJSON() ([]byte, error) {
13596	objectMap := make(map[string]interface{})
13597	if wg.WorkloadGroupProperties != nil {
13598		objectMap["properties"] = wg.WorkloadGroupProperties
13599	}
13600	return json.Marshal(objectMap)
13601}
13602
13603// UnmarshalJSON is the custom unmarshaler for WorkloadGroup struct.
13604func (wg *WorkloadGroup) UnmarshalJSON(body []byte) error {
13605	var m map[string]*json.RawMessage
13606	err := json.Unmarshal(body, &m)
13607	if err != nil {
13608		return err
13609	}
13610	for k, v := range m {
13611		switch k {
13612		case "properties":
13613			if v != nil {
13614				var workloadGroupProperties WorkloadGroupProperties
13615				err = json.Unmarshal(*v, &workloadGroupProperties)
13616				if err != nil {
13617					return err
13618				}
13619				wg.WorkloadGroupProperties = &workloadGroupProperties
13620			}
13621		case "id":
13622			if v != nil {
13623				var ID string
13624				err = json.Unmarshal(*v, &ID)
13625				if err != nil {
13626					return err
13627				}
13628				wg.ID = &ID
13629			}
13630		case "name":
13631			if v != nil {
13632				var name string
13633				err = json.Unmarshal(*v, &name)
13634				if err != nil {
13635					return err
13636				}
13637				wg.Name = &name
13638			}
13639		case "type":
13640			if v != nil {
13641				var typeVar string
13642				err = json.Unmarshal(*v, &typeVar)
13643				if err != nil {
13644					return err
13645				}
13646				wg.Type = &typeVar
13647			}
13648		}
13649	}
13650
13651	return nil
13652}
13653
13654// WorkloadGroupListResult a list of workload groups.
13655type WorkloadGroupListResult struct {
13656	autorest.Response `json:"-"`
13657	// Value - READ-ONLY; Array of results.
13658	Value *[]WorkloadGroup `json:"value,omitempty"`
13659	// NextLink - READ-ONLY; Link to retrieve next page of results.
13660	NextLink *string `json:"nextLink,omitempty"`
13661}
13662
13663// WorkloadGroupListResultIterator provides access to a complete listing of WorkloadGroup values.
13664type WorkloadGroupListResultIterator struct {
13665	i    int
13666	page WorkloadGroupListResultPage
13667}
13668
13669// NextWithContext advances to the next value.  If there was an error making
13670// the request the iterator does not advance and the error is returned.
13671func (iter *WorkloadGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
13672	if tracing.IsEnabled() {
13673		ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadGroupListResultIterator.NextWithContext")
13674		defer func() {
13675			sc := -1
13676			if iter.Response().Response.Response != nil {
13677				sc = iter.Response().Response.Response.StatusCode
13678			}
13679			tracing.EndSpan(ctx, sc, err)
13680		}()
13681	}
13682	iter.i++
13683	if iter.i < len(iter.page.Values()) {
13684		return nil
13685	}
13686	err = iter.page.NextWithContext(ctx)
13687	if err != nil {
13688		iter.i--
13689		return err
13690	}
13691	iter.i = 0
13692	return nil
13693}
13694
13695// Next advances to the next value.  If there was an error making
13696// the request the iterator does not advance and the error is returned.
13697// Deprecated: Use NextWithContext() instead.
13698func (iter *WorkloadGroupListResultIterator) Next() error {
13699	return iter.NextWithContext(context.Background())
13700}
13701
13702// NotDone returns true if the enumeration should be started or is not yet complete.
13703func (iter WorkloadGroupListResultIterator) NotDone() bool {
13704	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13705}
13706
13707// Response returns the raw server response from the last page request.
13708func (iter WorkloadGroupListResultIterator) Response() WorkloadGroupListResult {
13709	return iter.page.Response()
13710}
13711
13712// Value returns the current value or a zero-initialized value if the
13713// iterator has advanced beyond the end of the collection.
13714func (iter WorkloadGroupListResultIterator) Value() WorkloadGroup {
13715	if !iter.page.NotDone() {
13716		return WorkloadGroup{}
13717	}
13718	return iter.page.Values()[iter.i]
13719}
13720
13721// Creates a new instance of the WorkloadGroupListResultIterator type.
13722func NewWorkloadGroupListResultIterator(page WorkloadGroupListResultPage) WorkloadGroupListResultIterator {
13723	return WorkloadGroupListResultIterator{page: page}
13724}
13725
13726// IsEmpty returns true if the ListResult contains no values.
13727func (wglr WorkloadGroupListResult) IsEmpty() bool {
13728	return wglr.Value == nil || len(*wglr.Value) == 0
13729}
13730
13731// hasNextLink returns true if the NextLink is not empty.
13732func (wglr WorkloadGroupListResult) hasNextLink() bool {
13733	return wglr.NextLink != nil && len(*wglr.NextLink) != 0
13734}
13735
13736// workloadGroupListResultPreparer prepares a request to retrieve the next set of results.
13737// It returns nil if no more results exist.
13738func (wglr WorkloadGroupListResult) workloadGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
13739	if !wglr.hasNextLink() {
13740		return nil, nil
13741	}
13742	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13743		autorest.AsJSON(),
13744		autorest.AsGet(),
13745		autorest.WithBaseURL(to.String(wglr.NextLink)))
13746}
13747
13748// WorkloadGroupListResultPage contains a page of WorkloadGroup values.
13749type WorkloadGroupListResultPage struct {
13750	fn   func(context.Context, WorkloadGroupListResult) (WorkloadGroupListResult, error)
13751	wglr WorkloadGroupListResult
13752}
13753
13754// NextWithContext advances to the next page of values.  If there was an error making
13755// the request the page does not advance and the error is returned.
13756func (page *WorkloadGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
13757	if tracing.IsEnabled() {
13758		ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadGroupListResultPage.NextWithContext")
13759		defer func() {
13760			sc := -1
13761			if page.Response().Response.Response != nil {
13762				sc = page.Response().Response.Response.StatusCode
13763			}
13764			tracing.EndSpan(ctx, sc, err)
13765		}()
13766	}
13767	for {
13768		next, err := page.fn(ctx, page.wglr)
13769		if err != nil {
13770			return err
13771		}
13772		page.wglr = next
13773		if !next.hasNextLink() || !next.IsEmpty() {
13774			break
13775		}
13776	}
13777	return nil
13778}
13779
13780// Next advances to the next page of values.  If there was an error making
13781// the request the page does not advance and the error is returned.
13782// Deprecated: Use NextWithContext() instead.
13783func (page *WorkloadGroupListResultPage) Next() error {
13784	return page.NextWithContext(context.Background())
13785}
13786
13787// NotDone returns true if the page enumeration should be started or is not yet complete.
13788func (page WorkloadGroupListResultPage) NotDone() bool {
13789	return !page.wglr.IsEmpty()
13790}
13791
13792// Response returns the raw server response from the last page request.
13793func (page WorkloadGroupListResultPage) Response() WorkloadGroupListResult {
13794	return page.wglr
13795}
13796
13797// Values returns the slice of values for the current page or nil if there are no values.
13798func (page WorkloadGroupListResultPage) Values() []WorkloadGroup {
13799	if page.wglr.IsEmpty() {
13800		return nil
13801	}
13802	return *page.wglr.Value
13803}
13804
13805// Creates a new instance of the WorkloadGroupListResultPage type.
13806func NewWorkloadGroupListResultPage(cur WorkloadGroupListResult, getNextPage func(context.Context, WorkloadGroupListResult) (WorkloadGroupListResult, error)) WorkloadGroupListResultPage {
13807	return WorkloadGroupListResultPage{
13808		fn:   getNextPage,
13809		wglr: cur,
13810	}
13811}
13812
13813// WorkloadGroupProperties workload group definition. For more information look at
13814// sys.workload_management_workload_groups (DMV).
13815type WorkloadGroupProperties struct {
13816	// MinResourcePercent - The workload group minimum percentage resource.
13817	MinResourcePercent *int32 `json:"minResourcePercent,omitempty"`
13818	// MaxResourcePercent - The workload group cap percentage resource.
13819	MaxResourcePercent *int32 `json:"maxResourcePercent,omitempty"`
13820	// MinResourcePercentPerRequest - The workload group request minimum grant percentage.
13821	MinResourcePercentPerRequest *float64 `json:"minResourcePercentPerRequest,omitempty"`
13822	// MaxResourcePercentPerRequest - The workload group request maximum grant percentage.
13823	MaxResourcePercentPerRequest *float64 `json:"maxResourcePercentPerRequest,omitempty"`
13824	// Importance - The workload group importance level.
13825	Importance *string `json:"importance,omitempty"`
13826	// QueryExecutionTimeout - The workload group query execution timeout.
13827	QueryExecutionTimeout *int32 `json:"queryExecutionTimeout,omitempty"`
13828}
13829
13830// Workspace a workspace
13831type Workspace struct {
13832	autorest.Response `json:"-"`
13833	// WorkspaceProperties - Workspace resource properties
13834	*WorkspaceProperties `json:"properties,omitempty"`
13835	// Identity - Identity of the workspace
13836	Identity *ManagedIdentity `json:"identity,omitempty"`
13837	// Tags - Resource tags.
13838	Tags map[string]*string `json:"tags"`
13839	// Location - The geo-location where the resource lives
13840	Location *string `json:"location,omitempty"`
13841	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
13842	ID *string `json:"id,omitempty"`
13843	// Name - READ-ONLY; The name of the resource
13844	Name *string `json:"name,omitempty"`
13845	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
13846	Type *string `json:"type,omitempty"`
13847}
13848
13849// MarshalJSON is the custom marshaler for Workspace.
13850func (w Workspace) MarshalJSON() ([]byte, error) {
13851	objectMap := make(map[string]interface{})
13852	if w.WorkspaceProperties != nil {
13853		objectMap["properties"] = w.WorkspaceProperties
13854	}
13855	if w.Identity != nil {
13856		objectMap["identity"] = w.Identity
13857	}
13858	if w.Tags != nil {
13859		objectMap["tags"] = w.Tags
13860	}
13861	if w.Location != nil {
13862		objectMap["location"] = w.Location
13863	}
13864	return json.Marshal(objectMap)
13865}
13866
13867// UnmarshalJSON is the custom unmarshaler for Workspace struct.
13868func (w *Workspace) UnmarshalJSON(body []byte) error {
13869	var m map[string]*json.RawMessage
13870	err := json.Unmarshal(body, &m)
13871	if err != nil {
13872		return err
13873	}
13874	for k, v := range m {
13875		switch k {
13876		case "properties":
13877			if v != nil {
13878				var workspaceProperties WorkspaceProperties
13879				err = json.Unmarshal(*v, &workspaceProperties)
13880				if err != nil {
13881					return err
13882				}
13883				w.WorkspaceProperties = &workspaceProperties
13884			}
13885		case "identity":
13886			if v != nil {
13887				var identity ManagedIdentity
13888				err = json.Unmarshal(*v, &identity)
13889				if err != nil {
13890					return err
13891				}
13892				w.Identity = &identity
13893			}
13894		case "tags":
13895			if v != nil {
13896				var tags map[string]*string
13897				err = json.Unmarshal(*v, &tags)
13898				if err != nil {
13899					return err
13900				}
13901				w.Tags = tags
13902			}
13903		case "location":
13904			if v != nil {
13905				var location string
13906				err = json.Unmarshal(*v, &location)
13907				if err != nil {
13908					return err
13909				}
13910				w.Location = &location
13911			}
13912		case "id":
13913			if v != nil {
13914				var ID string
13915				err = json.Unmarshal(*v, &ID)
13916				if err != nil {
13917					return err
13918				}
13919				w.ID = &ID
13920			}
13921		case "name":
13922			if v != nil {
13923				var name string
13924				err = json.Unmarshal(*v, &name)
13925				if err != nil {
13926					return err
13927				}
13928				w.Name = &name
13929			}
13930		case "type":
13931			if v != nil {
13932				var typeVar string
13933				err = json.Unmarshal(*v, &typeVar)
13934				if err != nil {
13935					return err
13936				}
13937				w.Type = &typeVar
13938			}
13939		}
13940	}
13941
13942	return nil
13943}
13944
13945// WorkspaceAadAdminInfo workspace active directory administrator
13946type WorkspaceAadAdminInfo struct {
13947	autorest.Response `json:"-"`
13948	// AadAdminProperties - Workspace active directory administrator properties
13949	*AadAdminProperties `json:"properties,omitempty"`
13950	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
13951	ID *string `json:"id,omitempty"`
13952	// Name - READ-ONLY; The name of the resource
13953	Name *string `json:"name,omitempty"`
13954	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
13955	Type *string `json:"type,omitempty"`
13956}
13957
13958// MarshalJSON is the custom marshaler for WorkspaceAadAdminInfo.
13959func (waai WorkspaceAadAdminInfo) MarshalJSON() ([]byte, error) {
13960	objectMap := make(map[string]interface{})
13961	if waai.AadAdminProperties != nil {
13962		objectMap["properties"] = waai.AadAdminProperties
13963	}
13964	return json.Marshal(objectMap)
13965}
13966
13967// UnmarshalJSON is the custom unmarshaler for WorkspaceAadAdminInfo struct.
13968func (waai *WorkspaceAadAdminInfo) UnmarshalJSON(body []byte) error {
13969	var m map[string]*json.RawMessage
13970	err := json.Unmarshal(body, &m)
13971	if err != nil {
13972		return err
13973	}
13974	for k, v := range m {
13975		switch k {
13976		case "properties":
13977			if v != nil {
13978				var aadAdminProperties AadAdminProperties
13979				err = json.Unmarshal(*v, &aadAdminProperties)
13980				if err != nil {
13981					return err
13982				}
13983				waai.AadAdminProperties = &aadAdminProperties
13984			}
13985		case "id":
13986			if v != nil {
13987				var ID string
13988				err = json.Unmarshal(*v, &ID)
13989				if err != nil {
13990					return err
13991				}
13992				waai.ID = &ID
13993			}
13994		case "name":
13995			if v != nil {
13996				var name string
13997				err = json.Unmarshal(*v, &name)
13998				if err != nil {
13999					return err
14000				}
14001				waai.Name = &name
14002			}
14003		case "type":
14004			if v != nil {
14005				var typeVar string
14006				err = json.Unmarshal(*v, &typeVar)
14007				if err != nil {
14008					return err
14009				}
14010				waai.Type = &typeVar
14011			}
14012		}
14013	}
14014
14015	return nil
14016}
14017
14018// WorkspaceAadAdminsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14019// long-running operation.
14020type WorkspaceAadAdminsCreateOrUpdateFuture struct {
14021	azure.FutureAPI
14022	// Result returns the result of the asynchronous operation.
14023	// If the operation has not completed it will return an error.
14024	Result func(WorkspaceAadAdminsClient) (WorkspaceAadAdminInfo, error)
14025}
14026
14027// WorkspaceAadAdminsDeleteFuture an abstraction for monitoring and retrieving the results of a
14028// long-running operation.
14029type WorkspaceAadAdminsDeleteFuture struct {
14030	azure.FutureAPI
14031	// Result returns the result of the asynchronous operation.
14032	// If the operation has not completed it will return an error.
14033	Result func(WorkspaceAadAdminsClient) (autorest.Response, error)
14034}
14035
14036// WorkspaceInfoListResult list of workspaces
14037type WorkspaceInfoListResult struct {
14038	autorest.Response `json:"-"`
14039	// NextLink - Link to the next page of results
14040	NextLink *string `json:"nextLink,omitempty"`
14041	// Value - List of workspaces
14042	Value *[]Workspace `json:"value,omitempty"`
14043}
14044
14045// WorkspaceInfoListResultIterator provides access to a complete listing of Workspace values.
14046type WorkspaceInfoListResultIterator struct {
14047	i    int
14048	page WorkspaceInfoListResultPage
14049}
14050
14051// NextWithContext advances to the next value.  If there was an error making
14052// the request the iterator does not advance and the error is returned.
14053func (iter *WorkspaceInfoListResultIterator) NextWithContext(ctx context.Context) (err error) {
14054	if tracing.IsEnabled() {
14055		ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceInfoListResultIterator.NextWithContext")
14056		defer func() {
14057			sc := -1
14058			if iter.Response().Response.Response != nil {
14059				sc = iter.Response().Response.Response.StatusCode
14060			}
14061			tracing.EndSpan(ctx, sc, err)
14062		}()
14063	}
14064	iter.i++
14065	if iter.i < len(iter.page.Values()) {
14066		return nil
14067	}
14068	err = iter.page.NextWithContext(ctx)
14069	if err != nil {
14070		iter.i--
14071		return err
14072	}
14073	iter.i = 0
14074	return nil
14075}
14076
14077// Next advances to the next value.  If there was an error making
14078// the request the iterator does not advance and the error is returned.
14079// Deprecated: Use NextWithContext() instead.
14080func (iter *WorkspaceInfoListResultIterator) Next() error {
14081	return iter.NextWithContext(context.Background())
14082}
14083
14084// NotDone returns true if the enumeration should be started or is not yet complete.
14085func (iter WorkspaceInfoListResultIterator) NotDone() bool {
14086	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14087}
14088
14089// Response returns the raw server response from the last page request.
14090func (iter WorkspaceInfoListResultIterator) Response() WorkspaceInfoListResult {
14091	return iter.page.Response()
14092}
14093
14094// Value returns the current value or a zero-initialized value if the
14095// iterator has advanced beyond the end of the collection.
14096func (iter WorkspaceInfoListResultIterator) Value() Workspace {
14097	if !iter.page.NotDone() {
14098		return Workspace{}
14099	}
14100	return iter.page.Values()[iter.i]
14101}
14102
14103// Creates a new instance of the WorkspaceInfoListResultIterator type.
14104func NewWorkspaceInfoListResultIterator(page WorkspaceInfoListResultPage) WorkspaceInfoListResultIterator {
14105	return WorkspaceInfoListResultIterator{page: page}
14106}
14107
14108// IsEmpty returns true if the ListResult contains no values.
14109func (wilr WorkspaceInfoListResult) IsEmpty() bool {
14110	return wilr.Value == nil || len(*wilr.Value) == 0
14111}
14112
14113// hasNextLink returns true if the NextLink is not empty.
14114func (wilr WorkspaceInfoListResult) hasNextLink() bool {
14115	return wilr.NextLink != nil && len(*wilr.NextLink) != 0
14116}
14117
14118// workspaceInfoListResultPreparer prepares a request to retrieve the next set of results.
14119// It returns nil if no more results exist.
14120func (wilr WorkspaceInfoListResult) workspaceInfoListResultPreparer(ctx context.Context) (*http.Request, error) {
14121	if !wilr.hasNextLink() {
14122		return nil, nil
14123	}
14124	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14125		autorest.AsJSON(),
14126		autorest.AsGet(),
14127		autorest.WithBaseURL(to.String(wilr.NextLink)))
14128}
14129
14130// WorkspaceInfoListResultPage contains a page of Workspace values.
14131type WorkspaceInfoListResultPage struct {
14132	fn   func(context.Context, WorkspaceInfoListResult) (WorkspaceInfoListResult, error)
14133	wilr WorkspaceInfoListResult
14134}
14135
14136// NextWithContext advances to the next page of values.  If there was an error making
14137// the request the page does not advance and the error is returned.
14138func (page *WorkspaceInfoListResultPage) NextWithContext(ctx context.Context) (err error) {
14139	if tracing.IsEnabled() {
14140		ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceInfoListResultPage.NextWithContext")
14141		defer func() {
14142			sc := -1
14143			if page.Response().Response.Response != nil {
14144				sc = page.Response().Response.Response.StatusCode
14145			}
14146			tracing.EndSpan(ctx, sc, err)
14147		}()
14148	}
14149	for {
14150		next, err := page.fn(ctx, page.wilr)
14151		if err != nil {
14152			return err
14153		}
14154		page.wilr = next
14155		if !next.hasNextLink() || !next.IsEmpty() {
14156			break
14157		}
14158	}
14159	return nil
14160}
14161
14162// Next advances to the next page of values.  If there was an error making
14163// the request the page does not advance and the error is returned.
14164// Deprecated: Use NextWithContext() instead.
14165func (page *WorkspaceInfoListResultPage) Next() error {
14166	return page.NextWithContext(context.Background())
14167}
14168
14169// NotDone returns true if the page enumeration should be started or is not yet complete.
14170func (page WorkspaceInfoListResultPage) NotDone() bool {
14171	return !page.wilr.IsEmpty()
14172}
14173
14174// Response returns the raw server response from the last page request.
14175func (page WorkspaceInfoListResultPage) Response() WorkspaceInfoListResult {
14176	return page.wilr
14177}
14178
14179// Values returns the slice of values for the current page or nil if there are no values.
14180func (page WorkspaceInfoListResultPage) Values() []Workspace {
14181	if page.wilr.IsEmpty() {
14182		return nil
14183	}
14184	return *page.wilr.Value
14185}
14186
14187// Creates a new instance of the WorkspaceInfoListResultPage type.
14188func NewWorkspaceInfoListResultPage(cur WorkspaceInfoListResult, getNextPage func(context.Context, WorkspaceInfoListResult) (WorkspaceInfoListResult, error)) WorkspaceInfoListResultPage {
14189	return WorkspaceInfoListResultPage{
14190		fn:   getNextPage,
14191		wilr: cur,
14192	}
14193}
14194
14195// WorkspaceKeyDetails details of the customer managed key associated with the workspace
14196type WorkspaceKeyDetails struct {
14197	// Name - Workspace Key sub-resource name
14198	Name *string `json:"name,omitempty"`
14199	// KeyVaultURL - Workspace Key sub-resource key vault url
14200	KeyVaultURL *string `json:"keyVaultUrl,omitempty"`
14201}
14202
14203// WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture an abstraction for monitoring and
14204// retrieving the results of a long-running operation.
14205type WorkspaceManagedIdentitySQLControlSettingsCreateOrUpdateFuture struct {
14206	azure.FutureAPI
14207	// Result returns the result of the asynchronous operation.
14208	// If the operation has not completed it will return an error.
14209	Result func(WorkspaceManagedIdentitySQLControlSettingsClient) (ManagedIdentitySQLControlSettingsModel, error)
14210}
14211
14212// WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture an abstraction for monitoring and
14213// retrieving the results of a long-running operation.
14214type WorkspaceManagedSQLServerBlobAuditingPoliciesCreateOrUpdateFuture struct {
14215	azure.FutureAPI
14216	// Result returns the result of the asynchronous operation.
14217	// If the operation has not completed it will return an error.
14218	Result func(WorkspaceManagedSQLServerBlobAuditingPoliciesClient) (ServerBlobAuditingPolicy, error)
14219}
14220
14221// WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture an abstraction for monitoring and
14222// retrieving the results of a long-running operation.
14223type WorkspaceManagedSQLServerEncryptionProtectorCreateOrUpdateFuture struct {
14224	azure.FutureAPI
14225	// Result returns the result of the asynchronous operation.
14226	// If the operation has not completed it will return an error.
14227	Result func(WorkspaceManagedSQLServerEncryptionProtectorClient) (EncryptionProtector, error)
14228}
14229
14230// WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture an abstraction for monitoring and
14231// retrieving the results of a long-running operation.
14232type WorkspaceManagedSQLServerEncryptionProtectorRevalidateFuture struct {
14233	azure.FutureAPI
14234	// Result returns the result of the asynchronous operation.
14235	// If the operation has not completed it will return an error.
14236	Result func(WorkspaceManagedSQLServerEncryptionProtectorClient) (autorest.Response, error)
14237}
14238
14239// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture an abstraction for monitoring
14240// and retrieving the results of a long-running operation.
14241type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesCreateOrUpdateFuture struct {
14242	azure.FutureAPI
14243	// Result returns the result of the asynchronous operation.
14244	// If the operation has not completed it will return an error.
14245	Result func(WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) (ExtendedServerBlobAuditingPolicy, error)
14246}
14247
14248// WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture an abstraction for monitoring and
14249// retrieving the results of a long-running operation.
14250type WorkspaceManagedSQLServerSecurityAlertPolicyCreateOrUpdateFuture struct {
14251	azure.FutureAPI
14252	// Result returns the result of the asynchronous operation.
14253	// If the operation has not completed it will return an error.
14254	Result func(WorkspaceManagedSQLServerSecurityAlertPolicyClient) (ServerSecurityAlertPolicy, error)
14255}
14256
14257// WorkspacePatchInfo workspace patch details
14258type WorkspacePatchInfo struct {
14259	// Tags - Resource tags
14260	Tags map[string]*string `json:"tags"`
14261	// Identity - The identity of the workspace
14262	Identity *ManagedIdentity `json:"identity,omitempty"`
14263	// WorkspacePatchProperties - Workspace patch properties
14264	*WorkspacePatchProperties `json:"properties,omitempty"`
14265}
14266
14267// MarshalJSON is the custom marshaler for WorkspacePatchInfo.
14268func (wpi WorkspacePatchInfo) MarshalJSON() ([]byte, error) {
14269	objectMap := make(map[string]interface{})
14270	if wpi.Tags != nil {
14271		objectMap["tags"] = wpi.Tags
14272	}
14273	if wpi.Identity != nil {
14274		objectMap["identity"] = wpi.Identity
14275	}
14276	if wpi.WorkspacePatchProperties != nil {
14277		objectMap["properties"] = wpi.WorkspacePatchProperties
14278	}
14279	return json.Marshal(objectMap)
14280}
14281
14282// UnmarshalJSON is the custom unmarshaler for WorkspacePatchInfo struct.
14283func (wpi *WorkspacePatchInfo) UnmarshalJSON(body []byte) error {
14284	var m map[string]*json.RawMessage
14285	err := json.Unmarshal(body, &m)
14286	if err != nil {
14287		return err
14288	}
14289	for k, v := range m {
14290		switch k {
14291		case "tags":
14292			if v != nil {
14293				var tags map[string]*string
14294				err = json.Unmarshal(*v, &tags)
14295				if err != nil {
14296					return err
14297				}
14298				wpi.Tags = tags
14299			}
14300		case "identity":
14301			if v != nil {
14302				var identity ManagedIdentity
14303				err = json.Unmarshal(*v, &identity)
14304				if err != nil {
14305					return err
14306				}
14307				wpi.Identity = &identity
14308			}
14309		case "properties":
14310			if v != nil {
14311				var workspacePatchProperties WorkspacePatchProperties
14312				err = json.Unmarshal(*v, &workspacePatchProperties)
14313				if err != nil {
14314					return err
14315				}
14316				wpi.WorkspacePatchProperties = &workspacePatchProperties
14317			}
14318		}
14319	}
14320
14321	return nil
14322}
14323
14324// WorkspacePatchProperties workspace patch properties
14325type WorkspacePatchProperties struct {
14326	// SQLAdministratorLoginPassword - SQL administrator login password
14327	SQLAdministratorLoginPassword *string `json:"sqlAdministratorLoginPassword,omitempty"`
14328	// ManagedVirtualNetworkSettings - Managed Virtual Network Settings
14329	ManagedVirtualNetworkSettings *ManagedVirtualNetworkSettings `json:"managedVirtualNetworkSettings,omitempty"`
14330	// WorkspaceRepositoryConfiguration - Git integration settings
14331	WorkspaceRepositoryConfiguration *WorkspaceRepositoryConfiguration `json:"workspaceRepositoryConfiguration,omitempty"`
14332	// PurviewConfiguration - Purview Configuration
14333	PurviewConfiguration *PurviewConfiguration `json:"purviewConfiguration,omitempty"`
14334	// ProvisioningState - READ-ONLY; Resource provisioning state
14335	ProvisioningState *string `json:"provisioningState,omitempty"`
14336	// Encryption - The encryption details of the workspace
14337	Encryption *EncryptionDetails `json:"encryption,omitempty"`
14338}
14339
14340// MarshalJSON is the custom marshaler for WorkspacePatchProperties.
14341func (wpp WorkspacePatchProperties) MarshalJSON() ([]byte, error) {
14342	objectMap := make(map[string]interface{})
14343	if wpp.SQLAdministratorLoginPassword != nil {
14344		objectMap["sqlAdministratorLoginPassword"] = wpp.SQLAdministratorLoginPassword
14345	}
14346	if wpp.ManagedVirtualNetworkSettings != nil {
14347		objectMap["managedVirtualNetworkSettings"] = wpp.ManagedVirtualNetworkSettings
14348	}
14349	if wpp.WorkspaceRepositoryConfiguration != nil {
14350		objectMap["workspaceRepositoryConfiguration"] = wpp.WorkspaceRepositoryConfiguration
14351	}
14352	if wpp.PurviewConfiguration != nil {
14353		objectMap["purviewConfiguration"] = wpp.PurviewConfiguration
14354	}
14355	if wpp.Encryption != nil {
14356		objectMap["encryption"] = wpp.Encryption
14357	}
14358	return json.Marshal(objectMap)
14359}
14360
14361// WorkspaceProperties workspace properties
14362type WorkspaceProperties struct {
14363	// DefaultDataLakeStorage - Workspace default data lake storage account details
14364	DefaultDataLakeStorage *DataLakeStorageAccountDetails `json:"defaultDataLakeStorage,omitempty"`
14365	// SQLAdministratorLoginPassword - SQL administrator login password
14366	SQLAdministratorLoginPassword *string `json:"sqlAdministratorLoginPassword,omitempty"`
14367	// ManagedResourceGroupName - Workspace managed resource group. The resource group name uniquely identifies the resource group within the user subscriptionId. The resource group name must be no longer than 90 characters long, and must be alphanumeric characters (Char.IsLetterOrDigit()) and '-', '_', '(', ')' and'.'. Note that the name cannot end with '.'
14368	ManagedResourceGroupName *string `json:"managedResourceGroupName,omitempty"`
14369	// ProvisioningState - READ-ONLY; Resource provisioning state
14370	ProvisioningState *string `json:"provisioningState,omitempty"`
14371	// SQLAdministratorLogin - Login for workspace SQL active directory administrator
14372	SQLAdministratorLogin *string `json:"sqlAdministratorLogin,omitempty"`
14373	// VirtualNetworkProfile - Virtual Network profile
14374	VirtualNetworkProfile *VirtualNetworkProfile `json:"virtualNetworkProfile,omitempty"`
14375	// ConnectivityEndpoints - Connectivity endpoints
14376	ConnectivityEndpoints map[string]*string `json:"connectivityEndpoints"`
14377	// ManagedVirtualNetwork - Setting this to 'default' will ensure that all compute for this workspace is in a virtual network managed on behalf of the user.
14378	ManagedVirtualNetwork *string `json:"managedVirtualNetwork,omitempty"`
14379	// PrivateEndpointConnections - Private endpoint connections to the workspace
14380	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
14381	// Encryption - The encryption details of the workspace
14382	Encryption *EncryptionDetails `json:"encryption,omitempty"`
14383	// WorkspaceUID - READ-ONLY; The workspace unique identifier
14384	WorkspaceUID *uuid.UUID `json:"workspaceUID,omitempty"`
14385	// ExtraProperties - READ-ONLY; Workspace level configs and feature flags
14386	ExtraProperties map[string]interface{} `json:"extraProperties"`
14387	// ManagedVirtualNetworkSettings - Managed Virtual Network Settings
14388	ManagedVirtualNetworkSettings *ManagedVirtualNetworkSettings `json:"managedVirtualNetworkSettings,omitempty"`
14389	// WorkspaceRepositoryConfiguration - Git integration settings
14390	WorkspaceRepositoryConfiguration *WorkspaceRepositoryConfiguration `json:"workspaceRepositoryConfiguration,omitempty"`
14391	// PurviewConfiguration - Purview Configuration
14392	PurviewConfiguration *PurviewConfiguration `json:"purviewConfiguration,omitempty"`
14393	// AdlaResourceID - READ-ONLY; The ADLA resource ID.
14394	AdlaResourceID *string `json:"adlaResourceId,omitempty"`
14395}
14396
14397// MarshalJSON is the custom marshaler for WorkspaceProperties.
14398func (wp WorkspaceProperties) MarshalJSON() ([]byte, error) {
14399	objectMap := make(map[string]interface{})
14400	if wp.DefaultDataLakeStorage != nil {
14401		objectMap["defaultDataLakeStorage"] = wp.DefaultDataLakeStorage
14402	}
14403	if wp.SQLAdministratorLoginPassword != nil {
14404		objectMap["sqlAdministratorLoginPassword"] = wp.SQLAdministratorLoginPassword
14405	}
14406	if wp.ManagedResourceGroupName != nil {
14407		objectMap["managedResourceGroupName"] = wp.ManagedResourceGroupName
14408	}
14409	if wp.SQLAdministratorLogin != nil {
14410		objectMap["sqlAdministratorLogin"] = wp.SQLAdministratorLogin
14411	}
14412	if wp.VirtualNetworkProfile != nil {
14413		objectMap["virtualNetworkProfile"] = wp.VirtualNetworkProfile
14414	}
14415	if wp.ConnectivityEndpoints != nil {
14416		objectMap["connectivityEndpoints"] = wp.ConnectivityEndpoints
14417	}
14418	if wp.ManagedVirtualNetwork != nil {
14419		objectMap["managedVirtualNetwork"] = wp.ManagedVirtualNetwork
14420	}
14421	if wp.PrivateEndpointConnections != nil {
14422		objectMap["privateEndpointConnections"] = wp.PrivateEndpointConnections
14423	}
14424	if wp.Encryption != nil {
14425		objectMap["encryption"] = wp.Encryption
14426	}
14427	if wp.ManagedVirtualNetworkSettings != nil {
14428		objectMap["managedVirtualNetworkSettings"] = wp.ManagedVirtualNetworkSettings
14429	}
14430	if wp.WorkspaceRepositoryConfiguration != nil {
14431		objectMap["workspaceRepositoryConfiguration"] = wp.WorkspaceRepositoryConfiguration
14432	}
14433	if wp.PurviewConfiguration != nil {
14434		objectMap["purviewConfiguration"] = wp.PurviewConfiguration
14435	}
14436	return json.Marshal(objectMap)
14437}
14438
14439// WorkspaceRepositoryConfiguration git integration settings
14440type WorkspaceRepositoryConfiguration struct {
14441	// Type - Type of workspace repositoryID configuration. Example WorkspaceVSTSConfiguration, WorkspaceGitHubConfiguration
14442	Type *string `json:"type,omitempty"`
14443	// HostName - GitHub Enterprise host name. For example: https://github.mydomain.com
14444	HostName *string `json:"hostName,omitempty"`
14445	// AccountName - Account name
14446	AccountName *string `json:"accountName,omitempty"`
14447	// ProjectName - VSTS project name
14448	ProjectName *string `json:"projectName,omitempty"`
14449	// RepositoryName - Repository name
14450	RepositoryName *string `json:"repositoryName,omitempty"`
14451	// CollaborationBranch - Collaboration branch
14452	CollaborationBranch *string `json:"collaborationBranch,omitempty"`
14453	// RootFolder - Root folder to use in the repository
14454	RootFolder *string `json:"rootFolder,omitempty"`
14455	// LastCommitID - The last commit ID
14456	LastCommitID *string `json:"lastCommitId,omitempty"`
14457	// TenantID - The VSTS tenant ID
14458	TenantID *uuid.UUID `json:"tenantId,omitempty"`
14459}
14460
14461// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14462// long-running operation.
14463type WorkspacesCreateOrUpdateFuture struct {
14464	azure.FutureAPI
14465	// Result returns the result of the asynchronous operation.
14466	// If the operation has not completed it will return an error.
14467	Result func(WorkspacesClient) (Workspace, error)
14468}
14469
14470// WorkspacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14471// operation.
14472type WorkspacesDeleteFuture struct {
14473	azure.FutureAPI
14474	// Result returns the result of the asynchronous operation.
14475	// If the operation has not completed it will return an error.
14476	Result func(WorkspacesClient) (SetObject, error)
14477}
14478
14479// WorkspaceSQLAadAdminsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14480// long-running operation.
14481type WorkspaceSQLAadAdminsCreateOrUpdateFuture struct {
14482	azure.FutureAPI
14483	// Result returns the result of the asynchronous operation.
14484	// If the operation has not completed it will return an error.
14485	Result func(WorkspaceSQLAadAdminsClient) (WorkspaceAadAdminInfo, error)
14486}
14487
14488// WorkspaceSQLAadAdminsDeleteFuture an abstraction for monitoring and retrieving the results of a
14489// long-running operation.
14490type WorkspaceSQLAadAdminsDeleteFuture struct {
14491	azure.FutureAPI
14492	// Result returns the result of the asynchronous operation.
14493	// If the operation has not completed it will return an error.
14494	Result func(WorkspaceSQLAadAdminsClient) (autorest.Response, error)
14495}
14496
14497// WorkspacesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
14498// operation.
14499type WorkspacesUpdateFuture struct {
14500	azure.FutureAPI
14501	// Result returns the result of the asynchronous operation.
14502	// If the operation has not completed it will return an error.
14503	Result func(WorkspacesClient) (Workspace, error)
14504}
14505