1package machinelearningservices
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/machinelearningservices/mgmt/2020-04-01/machinelearningservices"
22
23// AKS a Machine Learning compute based on AKS.
24type AKS struct {
25	// Properties - AKS properties
26	Properties *AKSProperties `json:"properties,omitempty"`
27	// ComputeLocation - Location for the underlying compute
28	ComputeLocation *string `json:"computeLocation,omitempty"`
29	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
30	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31	// Description - The description of the Machine Learning compute.
32	Description *string `json:"description,omitempty"`
33	// CreatedOn - READ-ONLY; The date and time when the compute was created.
34	CreatedOn *date.Time `json:"createdOn,omitempty"`
35	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
36	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
37	// ResourceID - ARM resource id of the underlying compute
38	ResourceID *string `json:"resourceId,omitempty"`
39	// ProvisioningErrors - READ-ONLY; Errors during provisioning
40	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
41	// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
42	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
43	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
44	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
45}
46
47// MarshalJSON is the custom marshaler for AKS.
48func (a AKS) MarshalJSON() ([]byte, error) {
49	a.ComputeType = ComputeTypeAKS1
50	objectMap := make(map[string]interface{})
51	if a.Properties != nil {
52		objectMap["properties"] = a.Properties
53	}
54	if a.ComputeLocation != nil {
55		objectMap["computeLocation"] = a.ComputeLocation
56	}
57	if a.Description != nil {
58		objectMap["description"] = a.Description
59	}
60	if a.ResourceID != nil {
61		objectMap["resourceId"] = a.ResourceID
62	}
63	if a.ComputeType != "" {
64		objectMap["computeType"] = a.ComputeType
65	}
66	return json.Marshal(objectMap)
67}
68
69// AsAKS is the BasicCompute implementation for AKS.
70func (a AKS) AsAKS() (*AKS, bool) {
71	return &a, true
72}
73
74// AsAmlCompute is the BasicCompute implementation for AKS.
75func (a AKS) AsAmlCompute() (*AmlCompute, bool) {
76	return nil, false
77}
78
79// AsVirtualMachine is the BasicCompute implementation for AKS.
80func (a AKS) AsVirtualMachine() (*VirtualMachine, bool) {
81	return nil, false
82}
83
84// AsHDInsight is the BasicCompute implementation for AKS.
85func (a AKS) AsHDInsight() (*HDInsight, bool) {
86	return nil, false
87}
88
89// AsDataFactory is the BasicCompute implementation for AKS.
90func (a AKS) AsDataFactory() (*DataFactory, bool) {
91	return nil, false
92}
93
94// AsDatabricks is the BasicCompute implementation for AKS.
95func (a AKS) AsDatabricks() (*Databricks, bool) {
96	return nil, false
97}
98
99// AsDataLakeAnalytics is the BasicCompute implementation for AKS.
100func (a AKS) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
101	return nil, false
102}
103
104// AsCompute is the BasicCompute implementation for AKS.
105func (a AKS) AsCompute() (*Compute, bool) {
106	return nil, false
107}
108
109// AsBasicCompute is the BasicCompute implementation for AKS.
110func (a AKS) AsBasicCompute() (BasicCompute, bool) {
111	return &a, true
112}
113
114// AksComputeSecrets secrets related to a Machine Learning compute based on AKS.
115type AksComputeSecrets struct {
116	// UserKubeConfig - Content of kubeconfig file that can be used to connect to the Kubernetes cluster.
117	UserKubeConfig *string `json:"userKubeConfig,omitempty"`
118	// AdminKubeConfig - Content of kubeconfig file that can be used to connect to the Kubernetes cluster.
119	AdminKubeConfig *string `json:"adminKubeConfig,omitempty"`
120	// ImagePullSecretName - Image registry pull secret.
121	ImagePullSecretName *string `json:"imagePullSecretName,omitempty"`
122	// ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
123	ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
124}
125
126// MarshalJSON is the custom marshaler for AksComputeSecrets.
127func (acs AksComputeSecrets) MarshalJSON() ([]byte, error) {
128	acs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeAKS
129	objectMap := make(map[string]interface{})
130	if acs.UserKubeConfig != nil {
131		objectMap["userKubeConfig"] = acs.UserKubeConfig
132	}
133	if acs.AdminKubeConfig != nil {
134		objectMap["adminKubeConfig"] = acs.AdminKubeConfig
135	}
136	if acs.ImagePullSecretName != nil {
137		objectMap["imagePullSecretName"] = acs.ImagePullSecretName
138	}
139	if acs.ComputeType != "" {
140		objectMap["computeType"] = acs.ComputeType
141	}
142	return json.Marshal(objectMap)
143}
144
145// AsAksComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
146func (acs AksComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
147	return &acs, true
148}
149
150// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
151func (acs AksComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
152	return nil, false
153}
154
155// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
156func (acs AksComputeSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
157	return nil, false
158}
159
160// AsComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
161func (acs AksComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
162	return nil, false
163}
164
165// AsBasicComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
166func (acs AksComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
167	return &acs, true
168}
169
170// AksNetworkingConfiguration advance configuration for AKS networking
171type AksNetworkingConfiguration struct {
172	// SubnetID - Virtual network subnet resource ID the compute nodes belong to
173	SubnetID *string `json:"subnetId,omitempty"`
174	// ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.
175	ServiceCidr *string `json:"serviceCidr,omitempty"`
176	// DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.
177	DNSServiceIP *string `json:"dnsServiceIP,omitempty"`
178	// DockerBridgeCidr - A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range.
179	DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"`
180}
181
182// AKSProperties AKS properties
183type AKSProperties struct {
184	// ClusterFqdn - Cluster full qualified domain name
185	ClusterFqdn *string `json:"clusterFqdn,omitempty"`
186	// SystemServices - READ-ONLY; System services
187	SystemServices *[]SystemService `json:"systemServices,omitempty"`
188	// AgentCount - Number of agents
189	AgentCount *int32 `json:"agentCount,omitempty"`
190	// AgentVMSize - Agent virtual machine size
191	AgentVMSize *string `json:"agentVMSize,omitempty"`
192	// SslConfiguration - SSL configuration
193	SslConfiguration *SslConfiguration `json:"sslConfiguration,omitempty"`
194	// AksNetworkingConfiguration - AKS networking configuration for vnet
195	AksNetworkingConfiguration *AksNetworkingConfiguration `json:"aksNetworkingConfiguration,omitempty"`
196	// ClusterPurpose - Possible values include: 'FastProd', 'DenseProd', 'DevTest'
197	ClusterPurpose ClusterPurpose `json:"clusterPurpose,omitempty"`
198}
199
200// MarshalJSON is the custom marshaler for AKSProperties.
201func (a AKSProperties) MarshalJSON() ([]byte, error) {
202	objectMap := make(map[string]interface{})
203	if a.ClusterFqdn != nil {
204		objectMap["clusterFqdn"] = a.ClusterFqdn
205	}
206	if a.AgentCount != nil {
207		objectMap["agentCount"] = a.AgentCount
208	}
209	if a.AgentVMSize != nil {
210		objectMap["agentVMSize"] = a.AgentVMSize
211	}
212	if a.SslConfiguration != nil {
213		objectMap["sslConfiguration"] = a.SslConfiguration
214	}
215	if a.AksNetworkingConfiguration != nil {
216		objectMap["aksNetworkingConfiguration"] = a.AksNetworkingConfiguration
217	}
218	if a.ClusterPurpose != "" {
219		objectMap["clusterPurpose"] = a.ClusterPurpose
220	}
221	return json.Marshal(objectMap)
222}
223
224// AmlCompute an Azure Machine Learning compute.
225type AmlCompute struct {
226	// Properties - AML Compute properties
227	Properties *AmlComputeProperties `json:"properties,omitempty"`
228	// ComputeLocation - Location for the underlying compute
229	ComputeLocation *string `json:"computeLocation,omitempty"`
230	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
231	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
232	// Description - The description of the Machine Learning compute.
233	Description *string `json:"description,omitempty"`
234	// CreatedOn - READ-ONLY; The date and time when the compute was created.
235	CreatedOn *date.Time `json:"createdOn,omitempty"`
236	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
237	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
238	// ResourceID - ARM resource id of the underlying compute
239	ResourceID *string `json:"resourceId,omitempty"`
240	// ProvisioningErrors - READ-ONLY; Errors during provisioning
241	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
242	// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
243	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
244	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
245	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
246}
247
248// MarshalJSON is the custom marshaler for AmlCompute.
249func (ac AmlCompute) MarshalJSON() ([]byte, error) {
250	ac.ComputeType = ComputeTypeAmlCompute1
251	objectMap := make(map[string]interface{})
252	if ac.Properties != nil {
253		objectMap["properties"] = ac.Properties
254	}
255	if ac.ComputeLocation != nil {
256		objectMap["computeLocation"] = ac.ComputeLocation
257	}
258	if ac.Description != nil {
259		objectMap["description"] = ac.Description
260	}
261	if ac.ResourceID != nil {
262		objectMap["resourceId"] = ac.ResourceID
263	}
264	if ac.ComputeType != "" {
265		objectMap["computeType"] = ac.ComputeType
266	}
267	return json.Marshal(objectMap)
268}
269
270// AsAKS is the BasicCompute implementation for AmlCompute.
271func (ac AmlCompute) AsAKS() (*AKS, bool) {
272	return nil, false
273}
274
275// AsAmlCompute is the BasicCompute implementation for AmlCompute.
276func (ac AmlCompute) AsAmlCompute() (*AmlCompute, bool) {
277	return &ac, true
278}
279
280// AsVirtualMachine is the BasicCompute implementation for AmlCompute.
281func (ac AmlCompute) AsVirtualMachine() (*VirtualMachine, bool) {
282	return nil, false
283}
284
285// AsHDInsight is the BasicCompute implementation for AmlCompute.
286func (ac AmlCompute) AsHDInsight() (*HDInsight, bool) {
287	return nil, false
288}
289
290// AsDataFactory is the BasicCompute implementation for AmlCompute.
291func (ac AmlCompute) AsDataFactory() (*DataFactory, bool) {
292	return nil, false
293}
294
295// AsDatabricks is the BasicCompute implementation for AmlCompute.
296func (ac AmlCompute) AsDatabricks() (*Databricks, bool) {
297	return nil, false
298}
299
300// AsDataLakeAnalytics is the BasicCompute implementation for AmlCompute.
301func (ac AmlCompute) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
302	return nil, false
303}
304
305// AsCompute is the BasicCompute implementation for AmlCompute.
306func (ac AmlCompute) AsCompute() (*Compute, bool) {
307	return nil, false
308}
309
310// AsBasicCompute is the BasicCompute implementation for AmlCompute.
311func (ac AmlCompute) AsBasicCompute() (BasicCompute, bool) {
312	return &ac, true
313}
314
315// AmlComputeNodeInformation compute node information related to a AmlCompute.
316type AmlComputeNodeInformation struct {
317	// NodeID - READ-ONLY; ID of the compute node.
318	NodeID *string `json:"nodeId,omitempty"`
319	// PrivateIPAddress - READ-ONLY; Private IP address of the compute node.
320	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
321	// PublicIPAddress - READ-ONLY; Public IP address of the compute node.
322	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
323	// Port - READ-ONLY; SSH port number of the node.
324	Port *float64 `json:"port,omitempty"`
325	// NodeState - READ-ONLY; State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. Possible values include: 'Idle', 'Running', 'Preparing', 'Unusable', 'Leaving', 'Preempted'
326	NodeState NodeState `json:"nodeState,omitempty"`
327	// RunID - READ-ONLY; ID of the Experiment running on the node, if any else null.
328	RunID *string `json:"runId,omitempty"`
329}
330
331// MarshalJSON is the custom marshaler for AmlComputeNodeInformation.
332func (acni AmlComputeNodeInformation) MarshalJSON() ([]byte, error) {
333	objectMap := make(map[string]interface{})
334	return json.Marshal(objectMap)
335}
336
337// AmlComputeNodesInformation compute node information related to a AmlCompute.
338type AmlComputeNodesInformation struct {
339	autorest.Response `json:"-"`
340	// Nodes - READ-ONLY; The collection of returned AmlCompute nodes details.
341	Nodes *[]AmlComputeNodeInformation `json:"nodes,omitempty"`
342	// NextLink - READ-ONLY; The continuation token.
343	NextLink *string `json:"nextLink,omitempty"`
344	// ComputeType - Possible values include: 'ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation', 'ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute'
345	ComputeType ComputeTypeBasicComputeNodesInformation `json:"computeType,omitempty"`
346}
347
348// MarshalJSON is the custom marshaler for AmlComputeNodesInformation.
349func (acni AmlComputeNodesInformation) MarshalJSON() ([]byte, error) {
350	acni.ComputeType = ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute
351	objectMap := make(map[string]interface{})
352	if acni.ComputeType != "" {
353		objectMap["computeType"] = acni.ComputeType
354	}
355	return json.Marshal(objectMap)
356}
357
358// AsAmlComputeNodesInformation is the BasicComputeNodesInformation implementation for AmlComputeNodesInformation.
359func (acni AmlComputeNodesInformation) AsAmlComputeNodesInformation() (*AmlComputeNodesInformation, bool) {
360	return &acni, true
361}
362
363// AsComputeNodesInformation is the BasicComputeNodesInformation implementation for AmlComputeNodesInformation.
364func (acni AmlComputeNodesInformation) AsComputeNodesInformation() (*ComputeNodesInformation, bool) {
365	return nil, false
366}
367
368// AsBasicComputeNodesInformation is the BasicComputeNodesInformation implementation for AmlComputeNodesInformation.
369func (acni AmlComputeNodesInformation) AsBasicComputeNodesInformation() (BasicComputeNodesInformation, bool) {
370	return &acni, true
371}
372
373// AmlComputeProperties AML Compute properties
374type AmlComputeProperties struct {
375	// VMSize - Virtual Machine Size
376	VMSize *string `json:"vmSize,omitempty"`
377	// VMPriority - Virtual Machine priority. Possible values include: 'Dedicated', 'LowPriority'
378	VMPriority VMPriority `json:"vmPriority,omitempty"`
379	// ScaleSettings - Scale settings for AML Compute
380	ScaleSettings *ScaleSettings `json:"scaleSettings,omitempty"`
381	// UserAccountCredentials - Credentials for an administrator user account that will be created on each compute node.
382	UserAccountCredentials *UserAccountCredentials `json:"userAccountCredentials,omitempty"`
383	// Subnet - Virtual network subnet resource ID the compute nodes belong to.
384	Subnet *ResourceID `json:"subnet,omitempty"`
385	// RemoteLoginPortPublicAccess - State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. Possible values include: 'RemoteLoginPortPublicAccessEnabled', 'RemoteLoginPortPublicAccessDisabled', 'RemoteLoginPortPublicAccessNotSpecified'
386	RemoteLoginPortPublicAccess RemoteLoginPortPublicAccess `json:"remoteLoginPortPublicAccess,omitempty"`
387	// AllocationState - READ-ONLY; Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. Possible values include: 'Steady', 'Resizing'
388	AllocationState AllocationState `json:"allocationState,omitempty"`
389	// AllocationStateTransitionTime - READ-ONLY; The time at which the compute entered its current allocation state.
390	AllocationStateTransitionTime *date.Time `json:"allocationStateTransitionTime,omitempty"`
391	// Errors - READ-ONLY; Collection of errors encountered by various compute nodes during node setup.
392	Errors *[]Error `json:"errors,omitempty"`
393	// CurrentNodeCount - READ-ONLY; The number of compute nodes currently assigned to the compute.
394	CurrentNodeCount *int32 `json:"currentNodeCount,omitempty"`
395	// TargetNodeCount - READ-ONLY; The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation.
396	TargetNodeCount *int32 `json:"targetNodeCount,omitempty"`
397	// NodeStateCounts - READ-ONLY; Counts of various node states on the compute.
398	NodeStateCounts *NodeStateCounts `json:"nodeStateCounts,omitempty"`
399}
400
401// MarshalJSON is the custom marshaler for AmlComputeProperties.
402func (ac AmlComputeProperties) MarshalJSON() ([]byte, error) {
403	objectMap := make(map[string]interface{})
404	if ac.VMSize != nil {
405		objectMap["vmSize"] = ac.VMSize
406	}
407	if ac.VMPriority != "" {
408		objectMap["vmPriority"] = ac.VMPriority
409	}
410	if ac.ScaleSettings != nil {
411		objectMap["scaleSettings"] = ac.ScaleSettings
412	}
413	if ac.UserAccountCredentials != nil {
414		objectMap["userAccountCredentials"] = ac.UserAccountCredentials
415	}
416	if ac.Subnet != nil {
417		objectMap["subnet"] = ac.Subnet
418	}
419	if ac.RemoteLoginPortPublicAccess != "" {
420		objectMap["remoteLoginPortPublicAccess"] = ac.RemoteLoginPortPublicAccess
421	}
422	return json.Marshal(objectMap)
423}
424
425// AmlUserFeature features enabled for a workspace
426type AmlUserFeature struct {
427	// ID - Specifies the feature ID
428	ID *string `json:"id,omitempty"`
429	// DisplayName - Specifies the feature name
430	DisplayName *string `json:"displayName,omitempty"`
431	// Description - Describes the feature for user experience
432	Description *string `json:"description,omitempty"`
433}
434
435// ClusterUpdateParameters amlCompute update parameters.
436type ClusterUpdateParameters struct {
437	// ClusterUpdateProperties - The properties of the amlCompute.
438	*ClusterUpdateProperties `json:"properties,omitempty"`
439}
440
441// MarshalJSON is the custom marshaler for ClusterUpdateParameters.
442func (cup ClusterUpdateParameters) MarshalJSON() ([]byte, error) {
443	objectMap := make(map[string]interface{})
444	if cup.ClusterUpdateProperties != nil {
445		objectMap["properties"] = cup.ClusterUpdateProperties
446	}
447	return json.Marshal(objectMap)
448}
449
450// UnmarshalJSON is the custom unmarshaler for ClusterUpdateParameters struct.
451func (cup *ClusterUpdateParameters) UnmarshalJSON(body []byte) error {
452	var m map[string]*json.RawMessage
453	err := json.Unmarshal(body, &m)
454	if err != nil {
455		return err
456	}
457	for k, v := range m {
458		switch k {
459		case "properties":
460			if v != nil {
461				var clusterUpdateProperties ClusterUpdateProperties
462				err = json.Unmarshal(*v, &clusterUpdateProperties)
463				if err != nil {
464					return err
465				}
466				cup.ClusterUpdateProperties = &clusterUpdateProperties
467			}
468		}
469	}
470
471	return nil
472}
473
474// ClusterUpdateProperties the properties of a amlCompute that need to be updated.
475type ClusterUpdateProperties struct {
476	// ScaleSettings - Desired scale settings for the amlCompute.
477	ScaleSettings *ScaleSettings `json:"scaleSettings,omitempty"`
478}
479
480// BasicCompute machine Learning compute object.
481type BasicCompute interface {
482	AsAKS() (*AKS, bool)
483	AsAmlCompute() (*AmlCompute, bool)
484	AsVirtualMachine() (*VirtualMachine, bool)
485	AsHDInsight() (*HDInsight, bool)
486	AsDataFactory() (*DataFactory, bool)
487	AsDatabricks() (*Databricks, bool)
488	AsDataLakeAnalytics() (*DataLakeAnalytics, bool)
489	AsCompute() (*Compute, bool)
490}
491
492// Compute machine Learning compute object.
493type Compute struct {
494	// ComputeLocation - Location for the underlying compute
495	ComputeLocation *string `json:"computeLocation,omitempty"`
496	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
497	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
498	// Description - The description of the Machine Learning compute.
499	Description *string `json:"description,omitempty"`
500	// CreatedOn - READ-ONLY; The date and time when the compute was created.
501	CreatedOn *date.Time `json:"createdOn,omitempty"`
502	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
503	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
504	// ResourceID - ARM resource id of the underlying compute
505	ResourceID *string `json:"resourceId,omitempty"`
506	// ProvisioningErrors - READ-ONLY; Errors during provisioning
507	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
508	// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
509	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
510	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
511	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
512}
513
514func unmarshalBasicCompute(body []byte) (BasicCompute, error) {
515	var m map[string]interface{}
516	err := json.Unmarshal(body, &m)
517	if err != nil {
518		return nil, err
519	}
520
521	switch m["computeType"] {
522	case string(ComputeTypeAKS1):
523		var a AKS
524		err := json.Unmarshal(body, &a)
525		return a, err
526	case string(ComputeTypeAmlCompute1):
527		var ac AmlCompute
528		err := json.Unmarshal(body, &ac)
529		return ac, err
530	case string(ComputeTypeVirtualMachine1):
531		var VM VirtualMachine
532		err := json.Unmarshal(body, &VM)
533		return VM, err
534	case string(ComputeTypeHDInsight1):
535		var hi HDInsight
536		err := json.Unmarshal(body, &hi)
537		return hi, err
538	case string(ComputeTypeDataFactory1):
539		var df DataFactory
540		err := json.Unmarshal(body, &df)
541		return df, err
542	case string(ComputeTypeDatabricks1):
543		var d Databricks
544		err := json.Unmarshal(body, &d)
545		return d, err
546	case string(ComputeTypeDataLakeAnalytics1):
547		var dla DataLakeAnalytics
548		err := json.Unmarshal(body, &dla)
549		return dla, err
550	default:
551		var c Compute
552		err := json.Unmarshal(body, &c)
553		return c, err
554	}
555}
556func unmarshalBasicComputeArray(body []byte) ([]BasicCompute, error) {
557	var rawMessages []*json.RawMessage
558	err := json.Unmarshal(body, &rawMessages)
559	if err != nil {
560		return nil, err
561	}
562
563	cArray := make([]BasicCompute, len(rawMessages))
564
565	for index, rawMessage := range rawMessages {
566		c, err := unmarshalBasicCompute(*rawMessage)
567		if err != nil {
568			return nil, err
569		}
570		cArray[index] = c
571	}
572	return cArray, nil
573}
574
575// MarshalJSON is the custom marshaler for Compute.
576func (c Compute) MarshalJSON() ([]byte, error) {
577	c.ComputeType = ComputeTypeCompute
578	objectMap := make(map[string]interface{})
579	if c.ComputeLocation != nil {
580		objectMap["computeLocation"] = c.ComputeLocation
581	}
582	if c.Description != nil {
583		objectMap["description"] = c.Description
584	}
585	if c.ResourceID != nil {
586		objectMap["resourceId"] = c.ResourceID
587	}
588	if c.ComputeType != "" {
589		objectMap["computeType"] = c.ComputeType
590	}
591	return json.Marshal(objectMap)
592}
593
594// AsAKS is the BasicCompute implementation for Compute.
595func (c Compute) AsAKS() (*AKS, bool) {
596	return nil, false
597}
598
599// AsAmlCompute is the BasicCompute implementation for Compute.
600func (c Compute) AsAmlCompute() (*AmlCompute, bool) {
601	return nil, false
602}
603
604// AsVirtualMachine is the BasicCompute implementation for Compute.
605func (c Compute) AsVirtualMachine() (*VirtualMachine, bool) {
606	return nil, false
607}
608
609// AsHDInsight is the BasicCompute implementation for Compute.
610func (c Compute) AsHDInsight() (*HDInsight, bool) {
611	return nil, false
612}
613
614// AsDataFactory is the BasicCompute implementation for Compute.
615func (c Compute) AsDataFactory() (*DataFactory, bool) {
616	return nil, false
617}
618
619// AsDatabricks is the BasicCompute implementation for Compute.
620func (c Compute) AsDatabricks() (*Databricks, bool) {
621	return nil, false
622}
623
624// AsDataLakeAnalytics is the BasicCompute implementation for Compute.
625func (c Compute) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
626	return nil, false
627}
628
629// AsCompute is the BasicCompute implementation for Compute.
630func (c Compute) AsCompute() (*Compute, bool) {
631	return &c, true
632}
633
634// AsBasicCompute is the BasicCompute implementation for Compute.
635func (c Compute) AsBasicCompute() (BasicCompute, bool) {
636	return &c, true
637}
638
639// BasicComputeNodesInformation compute nodes information related to a Machine Learning compute. Might differ for every
640// type of compute.
641type BasicComputeNodesInformation interface {
642	AsAmlComputeNodesInformation() (*AmlComputeNodesInformation, bool)
643	AsComputeNodesInformation() (*ComputeNodesInformation, bool)
644}
645
646// ComputeNodesInformation compute nodes information related to a Machine Learning compute. Might differ for
647// every type of compute.
648type ComputeNodesInformation struct {
649	// NextLink - READ-ONLY; The continuation token.
650	NextLink *string `json:"nextLink,omitempty"`
651	// ComputeType - Possible values include: 'ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation', 'ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute'
652	ComputeType ComputeTypeBasicComputeNodesInformation `json:"computeType,omitempty"`
653}
654
655func unmarshalBasicComputeNodesInformation(body []byte) (BasicComputeNodesInformation, error) {
656	var m map[string]interface{}
657	err := json.Unmarshal(body, &m)
658	if err != nil {
659		return nil, err
660	}
661
662	switch m["computeType"] {
663	case string(ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute):
664		var acni AmlComputeNodesInformation
665		err := json.Unmarshal(body, &acni)
666		return acni, err
667	default:
668		var cni ComputeNodesInformation
669		err := json.Unmarshal(body, &cni)
670		return cni, err
671	}
672}
673func unmarshalBasicComputeNodesInformationArray(body []byte) ([]BasicComputeNodesInformation, error) {
674	var rawMessages []*json.RawMessage
675	err := json.Unmarshal(body, &rawMessages)
676	if err != nil {
677		return nil, err
678	}
679
680	cniArray := make([]BasicComputeNodesInformation, len(rawMessages))
681
682	for index, rawMessage := range rawMessages {
683		cni, err := unmarshalBasicComputeNodesInformation(*rawMessage)
684		if err != nil {
685			return nil, err
686		}
687		cniArray[index] = cni
688	}
689	return cniArray, nil
690}
691
692// MarshalJSON is the custom marshaler for ComputeNodesInformation.
693func (cni ComputeNodesInformation) MarshalJSON() ([]byte, error) {
694	cni.ComputeType = ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation
695	objectMap := make(map[string]interface{})
696	if cni.ComputeType != "" {
697		objectMap["computeType"] = cni.ComputeType
698	}
699	return json.Marshal(objectMap)
700}
701
702// AsAmlComputeNodesInformation is the BasicComputeNodesInformation implementation for ComputeNodesInformation.
703func (cni ComputeNodesInformation) AsAmlComputeNodesInformation() (*AmlComputeNodesInformation, bool) {
704	return nil, false
705}
706
707// AsComputeNodesInformation is the BasicComputeNodesInformation implementation for ComputeNodesInformation.
708func (cni ComputeNodesInformation) AsComputeNodesInformation() (*ComputeNodesInformation, bool) {
709	return &cni, true
710}
711
712// AsBasicComputeNodesInformation is the BasicComputeNodesInformation implementation for ComputeNodesInformation.
713func (cni ComputeNodesInformation) AsBasicComputeNodesInformation() (BasicComputeNodesInformation, bool) {
714	return &cni, true
715}
716
717// ComputeResource machine Learning compute object wrapped into ARM resource envelope.
718type ComputeResource struct {
719	autorest.Response `json:"-"`
720	// Properties - Compute properties
721	Properties BasicCompute `json:"properties,omitempty"`
722	// ID - READ-ONLY; Specifies the resource ID.
723	ID *string `json:"id,omitempty"`
724	// Name - READ-ONLY; Specifies the name of the resource.
725	Name *string `json:"name,omitempty"`
726	// Identity - The identity of the resource.
727	Identity *Identity `json:"identity,omitempty"`
728	// Location - Specifies the location of the resource.
729	Location *string `json:"location,omitempty"`
730	// Type - READ-ONLY; Specifies the type of the resource.
731	Type *string `json:"type,omitempty"`
732	// Tags - Contains resource tags defined as key/value pairs.
733	Tags map[string]*string `json:"tags"`
734	// Sku - The sku of the workspace.
735	Sku *Sku `json:"sku,omitempty"`
736}
737
738// MarshalJSON is the custom marshaler for ComputeResource.
739func (cr ComputeResource) MarshalJSON() ([]byte, error) {
740	objectMap := make(map[string]interface{})
741	objectMap["properties"] = cr.Properties
742	if cr.Identity != nil {
743		objectMap["identity"] = cr.Identity
744	}
745	if cr.Location != nil {
746		objectMap["location"] = cr.Location
747	}
748	if cr.Tags != nil {
749		objectMap["tags"] = cr.Tags
750	}
751	if cr.Sku != nil {
752		objectMap["sku"] = cr.Sku
753	}
754	return json.Marshal(objectMap)
755}
756
757// UnmarshalJSON is the custom unmarshaler for ComputeResource struct.
758func (cr *ComputeResource) UnmarshalJSON(body []byte) error {
759	var m map[string]*json.RawMessage
760	err := json.Unmarshal(body, &m)
761	if err != nil {
762		return err
763	}
764	for k, v := range m {
765		switch k {
766		case "properties":
767			if v != nil {
768				properties, err := unmarshalBasicCompute(*v)
769				if err != nil {
770					return err
771				}
772				cr.Properties = properties
773			}
774		case "id":
775			if v != nil {
776				var ID string
777				err = json.Unmarshal(*v, &ID)
778				if err != nil {
779					return err
780				}
781				cr.ID = &ID
782			}
783		case "name":
784			if v != nil {
785				var name string
786				err = json.Unmarshal(*v, &name)
787				if err != nil {
788					return err
789				}
790				cr.Name = &name
791			}
792		case "identity":
793			if v != nil {
794				var identity Identity
795				err = json.Unmarshal(*v, &identity)
796				if err != nil {
797					return err
798				}
799				cr.Identity = &identity
800			}
801		case "location":
802			if v != nil {
803				var location string
804				err = json.Unmarshal(*v, &location)
805				if err != nil {
806					return err
807				}
808				cr.Location = &location
809			}
810		case "type":
811			if v != nil {
812				var typeVar string
813				err = json.Unmarshal(*v, &typeVar)
814				if err != nil {
815					return err
816				}
817				cr.Type = &typeVar
818			}
819		case "tags":
820			if v != nil {
821				var tags map[string]*string
822				err = json.Unmarshal(*v, &tags)
823				if err != nil {
824					return err
825				}
826				cr.Tags = tags
827			}
828		case "sku":
829			if v != nil {
830				var sku Sku
831				err = json.Unmarshal(*v, &sku)
832				if err != nil {
833					return err
834				}
835				cr.Sku = &sku
836			}
837		}
838	}
839
840	return nil
841}
842
843// BasicComputeSecrets secrets related to a Machine Learning compute. Might differ for every type of compute.
844type BasicComputeSecrets interface {
845	AsAksComputeSecrets() (*AksComputeSecrets, bool)
846	AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool)
847	AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool)
848	AsComputeSecrets() (*ComputeSecrets, bool)
849}
850
851// ComputeSecrets secrets related to a Machine Learning compute. Might differ for every type of compute.
852type ComputeSecrets struct {
853	autorest.Response `json:"-"`
854	// ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
855	ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
856}
857
858func unmarshalBasicComputeSecrets(body []byte) (BasicComputeSecrets, error) {
859	var m map[string]interface{}
860	err := json.Unmarshal(body, &m)
861	if err != nil {
862		return nil, err
863	}
864
865	switch m["computeType"] {
866	case string(ComputeTypeBasicComputeSecretsComputeTypeAKS):
867		var acs AksComputeSecrets
868		err := json.Unmarshal(body, &acs)
869		return acs, err
870	case string(ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine):
871		var vms VirtualMachineSecrets
872		err := json.Unmarshal(body, &vms)
873		return vms, err
874	case string(ComputeTypeBasicComputeSecretsComputeTypeDatabricks):
875		var dcs DatabricksComputeSecrets
876		err := json.Unmarshal(body, &dcs)
877		return dcs, err
878	default:
879		var cs ComputeSecrets
880		err := json.Unmarshal(body, &cs)
881		return cs, err
882	}
883}
884func unmarshalBasicComputeSecretsArray(body []byte) ([]BasicComputeSecrets, error) {
885	var rawMessages []*json.RawMessage
886	err := json.Unmarshal(body, &rawMessages)
887	if err != nil {
888		return nil, err
889	}
890
891	csArray := make([]BasicComputeSecrets, len(rawMessages))
892
893	for index, rawMessage := range rawMessages {
894		cs, err := unmarshalBasicComputeSecrets(*rawMessage)
895		if err != nil {
896			return nil, err
897		}
898		csArray[index] = cs
899	}
900	return csArray, nil
901}
902
903// MarshalJSON is the custom marshaler for ComputeSecrets.
904func (cs ComputeSecrets) MarshalJSON() ([]byte, error) {
905	cs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets
906	objectMap := make(map[string]interface{})
907	if cs.ComputeType != "" {
908		objectMap["computeType"] = cs.ComputeType
909	}
910	return json.Marshal(objectMap)
911}
912
913// AsAksComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
914func (cs ComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
915	return nil, false
916}
917
918// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
919func (cs ComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
920	return nil, false
921}
922
923// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
924func (cs ComputeSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
925	return nil, false
926}
927
928// AsComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
929func (cs ComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
930	return &cs, true
931}
932
933// AsBasicComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
934func (cs ComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
935	return &cs, true
936}
937
938// ComputeSecretsModel ...
939type ComputeSecretsModel struct {
940	autorest.Response `json:"-"`
941	Value             BasicComputeSecrets `json:"value,omitempty"`
942}
943
944// UnmarshalJSON is the custom unmarshaler for ComputeSecretsModel struct.
945func (csm *ComputeSecretsModel) UnmarshalJSON(body []byte) error {
946	cs, err := unmarshalBasicComputeSecrets(body)
947	if err != nil {
948		return err
949	}
950	csm.Value = cs
951
952	return nil
953}
954
955// Databricks a DataFactory compute.
956type Databricks struct {
957	Properties *DatabricksProperties `json:"properties,omitempty"`
958	// ComputeLocation - Location for the underlying compute
959	ComputeLocation *string `json:"computeLocation,omitempty"`
960	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
961	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
962	// Description - The description of the Machine Learning compute.
963	Description *string `json:"description,omitempty"`
964	// CreatedOn - READ-ONLY; The date and time when the compute was created.
965	CreatedOn *date.Time `json:"createdOn,omitempty"`
966	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
967	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
968	// ResourceID - ARM resource id of the underlying compute
969	ResourceID *string `json:"resourceId,omitempty"`
970	// ProvisioningErrors - READ-ONLY; Errors during provisioning
971	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
972	// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
973	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
974	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
975	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
976}
977
978// MarshalJSON is the custom marshaler for Databricks.
979func (d Databricks) MarshalJSON() ([]byte, error) {
980	d.ComputeType = ComputeTypeDatabricks1
981	objectMap := make(map[string]interface{})
982	if d.Properties != nil {
983		objectMap["properties"] = d.Properties
984	}
985	if d.ComputeLocation != nil {
986		objectMap["computeLocation"] = d.ComputeLocation
987	}
988	if d.Description != nil {
989		objectMap["description"] = d.Description
990	}
991	if d.ResourceID != nil {
992		objectMap["resourceId"] = d.ResourceID
993	}
994	if d.ComputeType != "" {
995		objectMap["computeType"] = d.ComputeType
996	}
997	return json.Marshal(objectMap)
998}
999
1000// AsAKS is the BasicCompute implementation for Databricks.
1001func (d Databricks) AsAKS() (*AKS, bool) {
1002	return nil, false
1003}
1004
1005// AsAmlCompute is the BasicCompute implementation for Databricks.
1006func (d Databricks) AsAmlCompute() (*AmlCompute, bool) {
1007	return nil, false
1008}
1009
1010// AsVirtualMachine is the BasicCompute implementation for Databricks.
1011func (d Databricks) AsVirtualMachine() (*VirtualMachine, bool) {
1012	return nil, false
1013}
1014
1015// AsHDInsight is the BasicCompute implementation for Databricks.
1016func (d Databricks) AsHDInsight() (*HDInsight, bool) {
1017	return nil, false
1018}
1019
1020// AsDataFactory is the BasicCompute implementation for Databricks.
1021func (d Databricks) AsDataFactory() (*DataFactory, bool) {
1022	return nil, false
1023}
1024
1025// AsDatabricks is the BasicCompute implementation for Databricks.
1026func (d Databricks) AsDatabricks() (*Databricks, bool) {
1027	return &d, true
1028}
1029
1030// AsDataLakeAnalytics is the BasicCompute implementation for Databricks.
1031func (d Databricks) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
1032	return nil, false
1033}
1034
1035// AsCompute is the BasicCompute implementation for Databricks.
1036func (d Databricks) AsCompute() (*Compute, bool) {
1037	return nil, false
1038}
1039
1040// AsBasicCompute is the BasicCompute implementation for Databricks.
1041func (d Databricks) AsBasicCompute() (BasicCompute, bool) {
1042	return &d, true
1043}
1044
1045// DatabricksComputeSecrets secrets related to a Machine Learning compute based on Databricks.
1046type DatabricksComputeSecrets struct {
1047	// DatabricksAccessToken - access token for databricks account.
1048	DatabricksAccessToken *string `json:"databricksAccessToken,omitempty"`
1049	// ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
1050	ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
1051}
1052
1053// MarshalJSON is the custom marshaler for DatabricksComputeSecrets.
1054func (dcs DatabricksComputeSecrets) MarshalJSON() ([]byte, error) {
1055	dcs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeDatabricks
1056	objectMap := make(map[string]interface{})
1057	if dcs.DatabricksAccessToken != nil {
1058		objectMap["databricksAccessToken"] = dcs.DatabricksAccessToken
1059	}
1060	if dcs.ComputeType != "" {
1061		objectMap["computeType"] = dcs.ComputeType
1062	}
1063	return json.Marshal(objectMap)
1064}
1065
1066// AsAksComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
1067func (dcs DatabricksComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
1068	return nil, false
1069}
1070
1071// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
1072func (dcs DatabricksComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
1073	return nil, false
1074}
1075
1076// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
1077func (dcs DatabricksComputeSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
1078	return &dcs, true
1079}
1080
1081// AsComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
1082func (dcs DatabricksComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
1083	return nil, false
1084}
1085
1086// AsBasicComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
1087func (dcs DatabricksComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
1088	return &dcs, true
1089}
1090
1091// DatabricksProperties ...
1092type DatabricksProperties struct {
1093	// DatabricksAccessToken - Databricks access token
1094	DatabricksAccessToken *string `json:"databricksAccessToken,omitempty"`
1095}
1096
1097// DataFactory a DataFactory compute.
1098type DataFactory struct {
1099	// ComputeLocation - Location for the underlying compute
1100	ComputeLocation *string `json:"computeLocation,omitempty"`
1101	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
1102	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1103	// Description - The description of the Machine Learning compute.
1104	Description *string `json:"description,omitempty"`
1105	// CreatedOn - READ-ONLY; The date and time when the compute was created.
1106	CreatedOn *date.Time `json:"createdOn,omitempty"`
1107	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
1108	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
1109	// ResourceID - ARM resource id of the underlying compute
1110	ResourceID *string `json:"resourceId,omitempty"`
1111	// ProvisioningErrors - READ-ONLY; Errors during provisioning
1112	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
1113	// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
1114	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
1115	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
1116	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
1117}
1118
1119// MarshalJSON is the custom marshaler for DataFactory.
1120func (df DataFactory) MarshalJSON() ([]byte, error) {
1121	df.ComputeType = ComputeTypeDataFactory1
1122	objectMap := make(map[string]interface{})
1123	if df.ComputeLocation != nil {
1124		objectMap["computeLocation"] = df.ComputeLocation
1125	}
1126	if df.Description != nil {
1127		objectMap["description"] = df.Description
1128	}
1129	if df.ResourceID != nil {
1130		objectMap["resourceId"] = df.ResourceID
1131	}
1132	if df.ComputeType != "" {
1133		objectMap["computeType"] = df.ComputeType
1134	}
1135	return json.Marshal(objectMap)
1136}
1137
1138// AsAKS is the BasicCompute implementation for DataFactory.
1139func (df DataFactory) AsAKS() (*AKS, bool) {
1140	return nil, false
1141}
1142
1143// AsAmlCompute is the BasicCompute implementation for DataFactory.
1144func (df DataFactory) AsAmlCompute() (*AmlCompute, bool) {
1145	return nil, false
1146}
1147
1148// AsVirtualMachine is the BasicCompute implementation for DataFactory.
1149func (df DataFactory) AsVirtualMachine() (*VirtualMachine, bool) {
1150	return nil, false
1151}
1152
1153// AsHDInsight is the BasicCompute implementation for DataFactory.
1154func (df DataFactory) AsHDInsight() (*HDInsight, bool) {
1155	return nil, false
1156}
1157
1158// AsDataFactory is the BasicCompute implementation for DataFactory.
1159func (df DataFactory) AsDataFactory() (*DataFactory, bool) {
1160	return &df, true
1161}
1162
1163// AsDatabricks is the BasicCompute implementation for DataFactory.
1164func (df DataFactory) AsDatabricks() (*Databricks, bool) {
1165	return nil, false
1166}
1167
1168// AsDataLakeAnalytics is the BasicCompute implementation for DataFactory.
1169func (df DataFactory) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
1170	return nil, false
1171}
1172
1173// AsCompute is the BasicCompute implementation for DataFactory.
1174func (df DataFactory) AsCompute() (*Compute, bool) {
1175	return nil, false
1176}
1177
1178// AsBasicCompute is the BasicCompute implementation for DataFactory.
1179func (df DataFactory) AsBasicCompute() (BasicCompute, bool) {
1180	return &df, true
1181}
1182
1183// DataLakeAnalytics a DataLakeAnalytics compute.
1184type DataLakeAnalytics struct {
1185	Properties *DataLakeAnalyticsProperties `json:"properties,omitempty"`
1186	// ComputeLocation - Location for the underlying compute
1187	ComputeLocation *string `json:"computeLocation,omitempty"`
1188	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
1189	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1190	// Description - The description of the Machine Learning compute.
1191	Description *string `json:"description,omitempty"`
1192	// CreatedOn - READ-ONLY; The date and time when the compute was created.
1193	CreatedOn *date.Time `json:"createdOn,omitempty"`
1194	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
1195	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
1196	// ResourceID - ARM resource id of the underlying compute
1197	ResourceID *string `json:"resourceId,omitempty"`
1198	// ProvisioningErrors - READ-ONLY; Errors during provisioning
1199	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
1200	// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
1201	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
1202	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
1203	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
1204}
1205
1206// MarshalJSON is the custom marshaler for DataLakeAnalytics.
1207func (dla DataLakeAnalytics) MarshalJSON() ([]byte, error) {
1208	dla.ComputeType = ComputeTypeDataLakeAnalytics1
1209	objectMap := make(map[string]interface{})
1210	if dla.Properties != nil {
1211		objectMap["properties"] = dla.Properties
1212	}
1213	if dla.ComputeLocation != nil {
1214		objectMap["computeLocation"] = dla.ComputeLocation
1215	}
1216	if dla.Description != nil {
1217		objectMap["description"] = dla.Description
1218	}
1219	if dla.ResourceID != nil {
1220		objectMap["resourceId"] = dla.ResourceID
1221	}
1222	if dla.ComputeType != "" {
1223		objectMap["computeType"] = dla.ComputeType
1224	}
1225	return json.Marshal(objectMap)
1226}
1227
1228// AsAKS is the BasicCompute implementation for DataLakeAnalytics.
1229func (dla DataLakeAnalytics) AsAKS() (*AKS, bool) {
1230	return nil, false
1231}
1232
1233// AsAmlCompute is the BasicCompute implementation for DataLakeAnalytics.
1234func (dla DataLakeAnalytics) AsAmlCompute() (*AmlCompute, bool) {
1235	return nil, false
1236}
1237
1238// AsVirtualMachine is the BasicCompute implementation for DataLakeAnalytics.
1239func (dla DataLakeAnalytics) AsVirtualMachine() (*VirtualMachine, bool) {
1240	return nil, false
1241}
1242
1243// AsHDInsight is the BasicCompute implementation for DataLakeAnalytics.
1244func (dla DataLakeAnalytics) AsHDInsight() (*HDInsight, bool) {
1245	return nil, false
1246}
1247
1248// AsDataFactory is the BasicCompute implementation for DataLakeAnalytics.
1249func (dla DataLakeAnalytics) AsDataFactory() (*DataFactory, bool) {
1250	return nil, false
1251}
1252
1253// AsDatabricks is the BasicCompute implementation for DataLakeAnalytics.
1254func (dla DataLakeAnalytics) AsDatabricks() (*Databricks, bool) {
1255	return nil, false
1256}
1257
1258// AsDataLakeAnalytics is the BasicCompute implementation for DataLakeAnalytics.
1259func (dla DataLakeAnalytics) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
1260	return &dla, true
1261}
1262
1263// AsCompute is the BasicCompute implementation for DataLakeAnalytics.
1264func (dla DataLakeAnalytics) AsCompute() (*Compute, bool) {
1265	return nil, false
1266}
1267
1268// AsBasicCompute is the BasicCompute implementation for DataLakeAnalytics.
1269func (dla DataLakeAnalytics) AsBasicCompute() (BasicCompute, bool) {
1270	return &dla, true
1271}
1272
1273// DataLakeAnalyticsProperties ...
1274type DataLakeAnalyticsProperties struct {
1275	// DataLakeStoreAccountName - DataLake Store Account Name
1276	DataLakeStoreAccountName *string `json:"dataLakeStoreAccountName,omitempty"`
1277}
1278
1279// EncryptionProperty ...
1280type EncryptionProperty struct {
1281	// Status - Indicates whether or not the encryption is enabled for the workspace. Possible values include: 'Enabled', 'Disabled'
1282	Status EncryptionStatus `json:"status,omitempty"`
1283	// KeyVaultProperties - Customer Key vault properties.
1284	KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"`
1285}
1286
1287// Error wrapper for error response to follow ARM guidelines.
1288type Error struct {
1289	// Error - READ-ONLY; The error response.
1290	Error *ErrorResponse `json:"error,omitempty"`
1291}
1292
1293// MarshalJSON is the custom marshaler for Error.
1294func (e Error) MarshalJSON() ([]byte, error) {
1295	objectMap := make(map[string]interface{})
1296	return json.Marshal(objectMap)
1297}
1298
1299// ErrorDetail error detail information.
1300type ErrorDetail struct {
1301	// Code - Error code.
1302	Code *string `json:"code,omitempty"`
1303	// Message - Error message.
1304	Message *string `json:"message,omitempty"`
1305}
1306
1307// ErrorResponse error response information.
1308type ErrorResponse struct {
1309	// Code - READ-ONLY; Error code.
1310	Code *string `json:"code,omitempty"`
1311	// Message - READ-ONLY; Error message.
1312	Message *string `json:"message,omitempty"`
1313	// Details - READ-ONLY; An array of error detail objects.
1314	Details *[]ErrorDetail `json:"details,omitempty"`
1315}
1316
1317// MarshalJSON is the custom marshaler for ErrorResponse.
1318func (er ErrorResponse) MarshalJSON() ([]byte, error) {
1319	objectMap := make(map[string]interface{})
1320	return json.Marshal(objectMap)
1321}
1322
1323// HDInsight a HDInsight compute.
1324type HDInsight struct {
1325	Properties *HDInsightProperties `json:"properties,omitempty"`
1326	// ComputeLocation - Location for the underlying compute
1327	ComputeLocation *string `json:"computeLocation,omitempty"`
1328	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
1329	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1330	// Description - The description of the Machine Learning compute.
1331	Description *string `json:"description,omitempty"`
1332	// CreatedOn - READ-ONLY; The date and time when the compute was created.
1333	CreatedOn *date.Time `json:"createdOn,omitempty"`
1334	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
1335	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
1336	// ResourceID - ARM resource id of the underlying compute
1337	ResourceID *string `json:"resourceId,omitempty"`
1338	// ProvisioningErrors - READ-ONLY; Errors during provisioning
1339	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
1340	// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
1341	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
1342	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
1343	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
1344}
1345
1346// MarshalJSON is the custom marshaler for HDInsight.
1347func (hi HDInsight) MarshalJSON() ([]byte, error) {
1348	hi.ComputeType = ComputeTypeHDInsight1
1349	objectMap := make(map[string]interface{})
1350	if hi.Properties != nil {
1351		objectMap["properties"] = hi.Properties
1352	}
1353	if hi.ComputeLocation != nil {
1354		objectMap["computeLocation"] = hi.ComputeLocation
1355	}
1356	if hi.Description != nil {
1357		objectMap["description"] = hi.Description
1358	}
1359	if hi.ResourceID != nil {
1360		objectMap["resourceId"] = hi.ResourceID
1361	}
1362	if hi.ComputeType != "" {
1363		objectMap["computeType"] = hi.ComputeType
1364	}
1365	return json.Marshal(objectMap)
1366}
1367
1368// AsAKS is the BasicCompute implementation for HDInsight.
1369func (hi HDInsight) AsAKS() (*AKS, bool) {
1370	return nil, false
1371}
1372
1373// AsAmlCompute is the BasicCompute implementation for HDInsight.
1374func (hi HDInsight) AsAmlCompute() (*AmlCompute, bool) {
1375	return nil, false
1376}
1377
1378// AsVirtualMachine is the BasicCompute implementation for HDInsight.
1379func (hi HDInsight) AsVirtualMachine() (*VirtualMachine, bool) {
1380	return nil, false
1381}
1382
1383// AsHDInsight is the BasicCompute implementation for HDInsight.
1384func (hi HDInsight) AsHDInsight() (*HDInsight, bool) {
1385	return &hi, true
1386}
1387
1388// AsDataFactory is the BasicCompute implementation for HDInsight.
1389func (hi HDInsight) AsDataFactory() (*DataFactory, bool) {
1390	return nil, false
1391}
1392
1393// AsDatabricks is the BasicCompute implementation for HDInsight.
1394func (hi HDInsight) AsDatabricks() (*Databricks, bool) {
1395	return nil, false
1396}
1397
1398// AsDataLakeAnalytics is the BasicCompute implementation for HDInsight.
1399func (hi HDInsight) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
1400	return nil, false
1401}
1402
1403// AsCompute is the BasicCompute implementation for HDInsight.
1404func (hi HDInsight) AsCompute() (*Compute, bool) {
1405	return nil, false
1406}
1407
1408// AsBasicCompute is the BasicCompute implementation for HDInsight.
1409func (hi HDInsight) AsBasicCompute() (BasicCompute, bool) {
1410	return &hi, true
1411}
1412
1413// HDInsightProperties ...
1414type HDInsightProperties struct {
1415	// SSHPort - Port open for ssh connections on the master node of the cluster.
1416	SSHPort *int32 `json:"sshPort,omitempty"`
1417	// Address - Public IP address of the master node of the cluster.
1418	Address *string `json:"address,omitempty"`
1419	// AdministratorAccount - Admin credentials for master node of the cluster
1420	AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
1421}
1422
1423// Identity identity for the resource.
1424type Identity struct {
1425	// PrincipalID - READ-ONLY; The principal ID of resource identity.
1426	PrincipalID *string `json:"principalId,omitempty"`
1427	// TenantID - READ-ONLY; The tenant ID of resource.
1428	TenantID *string `json:"tenantId,omitempty"`
1429	// Type - The identity type. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssignedUserAssigned', 'None'
1430	Type ResourceIdentityType `json:"type,omitempty"`
1431	// UserAssignedIdentities - The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
1432	UserAssignedIdentities map[string]*IdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
1433}
1434
1435// MarshalJSON is the custom marshaler for Identity.
1436func (i Identity) MarshalJSON() ([]byte, error) {
1437	objectMap := make(map[string]interface{})
1438	if i.Type != "" {
1439		objectMap["type"] = i.Type
1440	}
1441	if i.UserAssignedIdentities != nil {
1442		objectMap["userAssignedIdentities"] = i.UserAssignedIdentities
1443	}
1444	return json.Marshal(objectMap)
1445}
1446
1447// IdentityUserAssignedIdentitiesValue ...
1448type IdentityUserAssignedIdentitiesValue struct {
1449	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
1450	PrincipalID *string `json:"principalId,omitempty"`
1451	// ClientID - READ-ONLY; The client id of user assigned identity.
1452	ClientID *string `json:"clientId,omitempty"`
1453}
1454
1455// MarshalJSON is the custom marshaler for IdentityUserAssignedIdentitiesValue.
1456func (iAiv IdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
1457	objectMap := make(map[string]interface{})
1458	return json.Marshal(objectMap)
1459}
1460
1461// KeyVaultProperties ...
1462type KeyVaultProperties struct {
1463	// KeyVaultArmID - The ArmId of the keyVault where the customer owned encryption key is present.
1464	KeyVaultArmID *string `json:"keyVaultArmId,omitempty"`
1465	// KeyIdentifier - Key vault uri to access the encryption key.
1466	KeyIdentifier *string `json:"keyIdentifier,omitempty"`
1467	// IdentityClientID - For future use - The client id of the identity which will be used to access key vault.
1468	IdentityClientID *string `json:"identityClientId,omitempty"`
1469}
1470
1471// ListAmlUserFeatureResult the List Aml user feature operation response.
1472type ListAmlUserFeatureResult struct {
1473	autorest.Response `json:"-"`
1474	// Value - READ-ONLY; The list of AML user facing features.
1475	Value *[]AmlUserFeature `json:"value,omitempty"`
1476	// NextLink - READ-ONLY; The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next page of AML user features information.
1477	NextLink *string `json:"nextLink,omitempty"`
1478}
1479
1480// MarshalJSON is the custom marshaler for ListAmlUserFeatureResult.
1481func (laufr ListAmlUserFeatureResult) MarshalJSON() ([]byte, error) {
1482	objectMap := make(map[string]interface{})
1483	return json.Marshal(objectMap)
1484}
1485
1486// ListAmlUserFeatureResultIterator provides access to a complete listing of AmlUserFeature values.
1487type ListAmlUserFeatureResultIterator struct {
1488	i    int
1489	page ListAmlUserFeatureResultPage
1490}
1491
1492// NextWithContext advances to the next value.  If there was an error making
1493// the request the iterator does not advance and the error is returned.
1494func (iter *ListAmlUserFeatureResultIterator) NextWithContext(ctx context.Context) (err error) {
1495	if tracing.IsEnabled() {
1496		ctx = tracing.StartSpan(ctx, fqdn+"/ListAmlUserFeatureResultIterator.NextWithContext")
1497		defer func() {
1498			sc := -1
1499			if iter.Response().Response.Response != nil {
1500				sc = iter.Response().Response.Response.StatusCode
1501			}
1502			tracing.EndSpan(ctx, sc, err)
1503		}()
1504	}
1505	iter.i++
1506	if iter.i < len(iter.page.Values()) {
1507		return nil
1508	}
1509	err = iter.page.NextWithContext(ctx)
1510	if err != nil {
1511		iter.i--
1512		return err
1513	}
1514	iter.i = 0
1515	return nil
1516}
1517
1518// Next advances to the next value.  If there was an error making
1519// the request the iterator does not advance and the error is returned.
1520// Deprecated: Use NextWithContext() instead.
1521func (iter *ListAmlUserFeatureResultIterator) Next() error {
1522	return iter.NextWithContext(context.Background())
1523}
1524
1525// NotDone returns true if the enumeration should be started or is not yet complete.
1526func (iter ListAmlUserFeatureResultIterator) NotDone() bool {
1527	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1528}
1529
1530// Response returns the raw server response from the last page request.
1531func (iter ListAmlUserFeatureResultIterator) Response() ListAmlUserFeatureResult {
1532	return iter.page.Response()
1533}
1534
1535// Value returns the current value or a zero-initialized value if the
1536// iterator has advanced beyond the end of the collection.
1537func (iter ListAmlUserFeatureResultIterator) Value() AmlUserFeature {
1538	if !iter.page.NotDone() {
1539		return AmlUserFeature{}
1540	}
1541	return iter.page.Values()[iter.i]
1542}
1543
1544// Creates a new instance of the ListAmlUserFeatureResultIterator type.
1545func NewListAmlUserFeatureResultIterator(page ListAmlUserFeatureResultPage) ListAmlUserFeatureResultIterator {
1546	return ListAmlUserFeatureResultIterator{page: page}
1547}
1548
1549// IsEmpty returns true if the ListResult contains no values.
1550func (laufr ListAmlUserFeatureResult) IsEmpty() bool {
1551	return laufr.Value == nil || len(*laufr.Value) == 0
1552}
1553
1554// hasNextLink returns true if the NextLink is not empty.
1555func (laufr ListAmlUserFeatureResult) hasNextLink() bool {
1556	return laufr.NextLink != nil && len(*laufr.NextLink) != 0
1557}
1558
1559// listAmlUserFeatureResultPreparer prepares a request to retrieve the next set of results.
1560// It returns nil if no more results exist.
1561func (laufr ListAmlUserFeatureResult) listAmlUserFeatureResultPreparer(ctx context.Context) (*http.Request, error) {
1562	if !laufr.hasNextLink() {
1563		return nil, nil
1564	}
1565	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1566		autorest.AsJSON(),
1567		autorest.AsGet(),
1568		autorest.WithBaseURL(to.String(laufr.NextLink)))
1569}
1570
1571// ListAmlUserFeatureResultPage contains a page of AmlUserFeature values.
1572type ListAmlUserFeatureResultPage struct {
1573	fn    func(context.Context, ListAmlUserFeatureResult) (ListAmlUserFeatureResult, error)
1574	laufr ListAmlUserFeatureResult
1575}
1576
1577// NextWithContext advances to the next page of values.  If there was an error making
1578// the request the page does not advance and the error is returned.
1579func (page *ListAmlUserFeatureResultPage) NextWithContext(ctx context.Context) (err error) {
1580	if tracing.IsEnabled() {
1581		ctx = tracing.StartSpan(ctx, fqdn+"/ListAmlUserFeatureResultPage.NextWithContext")
1582		defer func() {
1583			sc := -1
1584			if page.Response().Response.Response != nil {
1585				sc = page.Response().Response.Response.StatusCode
1586			}
1587			tracing.EndSpan(ctx, sc, err)
1588		}()
1589	}
1590	for {
1591		next, err := page.fn(ctx, page.laufr)
1592		if err != nil {
1593			return err
1594		}
1595		page.laufr = next
1596		if !next.hasNextLink() || !next.IsEmpty() {
1597			break
1598		}
1599	}
1600	return nil
1601}
1602
1603// Next advances to the next page of values.  If there was an error making
1604// the request the page does not advance and the error is returned.
1605// Deprecated: Use NextWithContext() instead.
1606func (page *ListAmlUserFeatureResultPage) Next() error {
1607	return page.NextWithContext(context.Background())
1608}
1609
1610// NotDone returns true if the page enumeration should be started or is not yet complete.
1611func (page ListAmlUserFeatureResultPage) NotDone() bool {
1612	return !page.laufr.IsEmpty()
1613}
1614
1615// Response returns the raw server response from the last page request.
1616func (page ListAmlUserFeatureResultPage) Response() ListAmlUserFeatureResult {
1617	return page.laufr
1618}
1619
1620// Values returns the slice of values for the current page or nil if there are no values.
1621func (page ListAmlUserFeatureResultPage) Values() []AmlUserFeature {
1622	if page.laufr.IsEmpty() {
1623		return nil
1624	}
1625	return *page.laufr.Value
1626}
1627
1628// Creates a new instance of the ListAmlUserFeatureResultPage type.
1629func NewListAmlUserFeatureResultPage(cur ListAmlUserFeatureResult, getNextPage func(context.Context, ListAmlUserFeatureResult) (ListAmlUserFeatureResult, error)) ListAmlUserFeatureResultPage {
1630	return ListAmlUserFeatureResultPage{
1631		fn:    getNextPage,
1632		laufr: cur,
1633	}
1634}
1635
1636// ListUsagesResult the List Usages operation response.
1637type ListUsagesResult struct {
1638	autorest.Response `json:"-"`
1639	// Value - READ-ONLY; The list of AML resource usages.
1640	Value *[]Usage `json:"value,omitempty"`
1641	// NextLink - READ-ONLY; The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next page of AML resource usage information.
1642	NextLink *string `json:"nextLink,omitempty"`
1643}
1644
1645// MarshalJSON is the custom marshaler for ListUsagesResult.
1646func (lur ListUsagesResult) MarshalJSON() ([]byte, error) {
1647	objectMap := make(map[string]interface{})
1648	return json.Marshal(objectMap)
1649}
1650
1651// ListUsagesResultIterator provides access to a complete listing of Usage values.
1652type ListUsagesResultIterator struct {
1653	i    int
1654	page ListUsagesResultPage
1655}
1656
1657// NextWithContext advances to the next value.  If there was an error making
1658// the request the iterator does not advance and the error is returned.
1659func (iter *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) {
1660	if tracing.IsEnabled() {
1661		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.NextWithContext")
1662		defer func() {
1663			sc := -1
1664			if iter.Response().Response.Response != nil {
1665				sc = iter.Response().Response.Response.StatusCode
1666			}
1667			tracing.EndSpan(ctx, sc, err)
1668		}()
1669	}
1670	iter.i++
1671	if iter.i < len(iter.page.Values()) {
1672		return nil
1673	}
1674	err = iter.page.NextWithContext(ctx)
1675	if err != nil {
1676		iter.i--
1677		return err
1678	}
1679	iter.i = 0
1680	return nil
1681}
1682
1683// Next advances to the next value.  If there was an error making
1684// the request the iterator does not advance and the error is returned.
1685// Deprecated: Use NextWithContext() instead.
1686func (iter *ListUsagesResultIterator) Next() error {
1687	return iter.NextWithContext(context.Background())
1688}
1689
1690// NotDone returns true if the enumeration should be started or is not yet complete.
1691func (iter ListUsagesResultIterator) NotDone() bool {
1692	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1693}
1694
1695// Response returns the raw server response from the last page request.
1696func (iter ListUsagesResultIterator) Response() ListUsagesResult {
1697	return iter.page.Response()
1698}
1699
1700// Value returns the current value or a zero-initialized value if the
1701// iterator has advanced beyond the end of the collection.
1702func (iter ListUsagesResultIterator) Value() Usage {
1703	if !iter.page.NotDone() {
1704		return Usage{}
1705	}
1706	return iter.page.Values()[iter.i]
1707}
1708
1709// Creates a new instance of the ListUsagesResultIterator type.
1710func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
1711	return ListUsagesResultIterator{page: page}
1712}
1713
1714// IsEmpty returns true if the ListResult contains no values.
1715func (lur ListUsagesResult) IsEmpty() bool {
1716	return lur.Value == nil || len(*lur.Value) == 0
1717}
1718
1719// hasNextLink returns true if the NextLink is not empty.
1720func (lur ListUsagesResult) hasNextLink() bool {
1721	return lur.NextLink != nil && len(*lur.NextLink) != 0
1722}
1723
1724// listUsagesResultPreparer prepares a request to retrieve the next set of results.
1725// It returns nil if no more results exist.
1726func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) {
1727	if !lur.hasNextLink() {
1728		return nil, nil
1729	}
1730	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1731		autorest.AsJSON(),
1732		autorest.AsGet(),
1733		autorest.WithBaseURL(to.String(lur.NextLink)))
1734}
1735
1736// ListUsagesResultPage contains a page of Usage values.
1737type ListUsagesResultPage struct {
1738	fn  func(context.Context, ListUsagesResult) (ListUsagesResult, error)
1739	lur ListUsagesResult
1740}
1741
1742// NextWithContext advances to the next page of values.  If there was an error making
1743// the request the page does not advance and the error is returned.
1744func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) {
1745	if tracing.IsEnabled() {
1746		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext")
1747		defer func() {
1748			sc := -1
1749			if page.Response().Response.Response != nil {
1750				sc = page.Response().Response.Response.StatusCode
1751			}
1752			tracing.EndSpan(ctx, sc, err)
1753		}()
1754	}
1755	for {
1756		next, err := page.fn(ctx, page.lur)
1757		if err != nil {
1758			return err
1759		}
1760		page.lur = next
1761		if !next.hasNextLink() || !next.IsEmpty() {
1762			break
1763		}
1764	}
1765	return nil
1766}
1767
1768// Next advances to the next page of values.  If there was an error making
1769// the request the page does not advance and the error is returned.
1770// Deprecated: Use NextWithContext() instead.
1771func (page *ListUsagesResultPage) Next() error {
1772	return page.NextWithContext(context.Background())
1773}
1774
1775// NotDone returns true if the page enumeration should be started or is not yet complete.
1776func (page ListUsagesResultPage) NotDone() bool {
1777	return !page.lur.IsEmpty()
1778}
1779
1780// Response returns the raw server response from the last page request.
1781func (page ListUsagesResultPage) Response() ListUsagesResult {
1782	return page.lur
1783}
1784
1785// Values returns the slice of values for the current page or nil if there are no values.
1786func (page ListUsagesResultPage) Values() []Usage {
1787	if page.lur.IsEmpty() {
1788		return nil
1789	}
1790	return *page.lur.Value
1791}
1792
1793// Creates a new instance of the ListUsagesResultPage type.
1794func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
1795	return ListUsagesResultPage{
1796		fn:  getNextPage,
1797		lur: cur,
1798	}
1799}
1800
1801// ListWorkspaceKeysResult ...
1802type ListWorkspaceKeysResult struct {
1803	autorest.Response `json:"-"`
1804	// UserStorageKey - READ-ONLY
1805	UserStorageKey *string `json:"userStorageKey,omitempty"`
1806	// UserStorageResourceID - READ-ONLY
1807	UserStorageResourceID *string `json:"userStorageResourceId,omitempty"`
1808	// AppInsightsInstrumentationKey - READ-ONLY
1809	AppInsightsInstrumentationKey *string `json:"appInsightsInstrumentationKey,omitempty"`
1810	// ContainerRegistryCredentials - READ-ONLY
1811	ContainerRegistryCredentials *RegistryListCredentialsResult `json:"containerRegistryCredentials,omitempty"`
1812	NotebookAccessKeys           *NotebookListCredentialsResult `json:"notebookAccessKeys,omitempty"`
1813}
1814
1815// MarshalJSON is the custom marshaler for ListWorkspaceKeysResult.
1816func (lwkr ListWorkspaceKeysResult) MarshalJSON() ([]byte, error) {
1817	objectMap := make(map[string]interface{})
1818	if lwkr.NotebookAccessKeys != nil {
1819		objectMap["notebookAccessKeys"] = lwkr.NotebookAccessKeys
1820	}
1821	return json.Marshal(objectMap)
1822}
1823
1824// ListWorkspaceQuotas the List WorkspaceQuotasByVMFamily operation response.
1825type ListWorkspaceQuotas struct {
1826	autorest.Response `json:"-"`
1827	// Value - READ-ONLY; The list of Workspace Quotas by VM Family
1828	Value *[]ResourceQuota `json:"value,omitempty"`
1829	// NextLink - READ-ONLY; The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch the next page of Workspace Quota information.
1830	NextLink *string `json:"nextLink,omitempty"`
1831}
1832
1833// MarshalJSON is the custom marshaler for ListWorkspaceQuotas.
1834func (lwq ListWorkspaceQuotas) MarshalJSON() ([]byte, error) {
1835	objectMap := make(map[string]interface{})
1836	return json.Marshal(objectMap)
1837}
1838
1839// ListWorkspaceQuotasIterator provides access to a complete listing of ResourceQuota values.
1840type ListWorkspaceQuotasIterator struct {
1841	i    int
1842	page ListWorkspaceQuotasPage
1843}
1844
1845// NextWithContext advances to the next value.  If there was an error making
1846// the request the iterator does not advance and the error is returned.
1847func (iter *ListWorkspaceQuotasIterator) NextWithContext(ctx context.Context) (err error) {
1848	if tracing.IsEnabled() {
1849		ctx = tracing.StartSpan(ctx, fqdn+"/ListWorkspaceQuotasIterator.NextWithContext")
1850		defer func() {
1851			sc := -1
1852			if iter.Response().Response.Response != nil {
1853				sc = iter.Response().Response.Response.StatusCode
1854			}
1855			tracing.EndSpan(ctx, sc, err)
1856		}()
1857	}
1858	iter.i++
1859	if iter.i < len(iter.page.Values()) {
1860		return nil
1861	}
1862	err = iter.page.NextWithContext(ctx)
1863	if err != nil {
1864		iter.i--
1865		return err
1866	}
1867	iter.i = 0
1868	return nil
1869}
1870
1871// Next advances to the next value.  If there was an error making
1872// the request the iterator does not advance and the error is returned.
1873// Deprecated: Use NextWithContext() instead.
1874func (iter *ListWorkspaceQuotasIterator) Next() error {
1875	return iter.NextWithContext(context.Background())
1876}
1877
1878// NotDone returns true if the enumeration should be started or is not yet complete.
1879func (iter ListWorkspaceQuotasIterator) NotDone() bool {
1880	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1881}
1882
1883// Response returns the raw server response from the last page request.
1884func (iter ListWorkspaceQuotasIterator) Response() ListWorkspaceQuotas {
1885	return iter.page.Response()
1886}
1887
1888// Value returns the current value or a zero-initialized value if the
1889// iterator has advanced beyond the end of the collection.
1890func (iter ListWorkspaceQuotasIterator) Value() ResourceQuota {
1891	if !iter.page.NotDone() {
1892		return ResourceQuota{}
1893	}
1894	return iter.page.Values()[iter.i]
1895}
1896
1897// Creates a new instance of the ListWorkspaceQuotasIterator type.
1898func NewListWorkspaceQuotasIterator(page ListWorkspaceQuotasPage) ListWorkspaceQuotasIterator {
1899	return ListWorkspaceQuotasIterator{page: page}
1900}
1901
1902// IsEmpty returns true if the ListResult contains no values.
1903func (lwq ListWorkspaceQuotas) IsEmpty() bool {
1904	return lwq.Value == nil || len(*lwq.Value) == 0
1905}
1906
1907// hasNextLink returns true if the NextLink is not empty.
1908func (lwq ListWorkspaceQuotas) hasNextLink() bool {
1909	return lwq.NextLink != nil && len(*lwq.NextLink) != 0
1910}
1911
1912// listWorkspaceQuotasPreparer prepares a request to retrieve the next set of results.
1913// It returns nil if no more results exist.
1914func (lwq ListWorkspaceQuotas) listWorkspaceQuotasPreparer(ctx context.Context) (*http.Request, error) {
1915	if !lwq.hasNextLink() {
1916		return nil, nil
1917	}
1918	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1919		autorest.AsJSON(),
1920		autorest.AsGet(),
1921		autorest.WithBaseURL(to.String(lwq.NextLink)))
1922}
1923
1924// ListWorkspaceQuotasPage contains a page of ResourceQuota values.
1925type ListWorkspaceQuotasPage struct {
1926	fn  func(context.Context, ListWorkspaceQuotas) (ListWorkspaceQuotas, error)
1927	lwq ListWorkspaceQuotas
1928}
1929
1930// NextWithContext advances to the next page of values.  If there was an error making
1931// the request the page does not advance and the error is returned.
1932func (page *ListWorkspaceQuotasPage) NextWithContext(ctx context.Context) (err error) {
1933	if tracing.IsEnabled() {
1934		ctx = tracing.StartSpan(ctx, fqdn+"/ListWorkspaceQuotasPage.NextWithContext")
1935		defer func() {
1936			sc := -1
1937			if page.Response().Response.Response != nil {
1938				sc = page.Response().Response.Response.StatusCode
1939			}
1940			tracing.EndSpan(ctx, sc, err)
1941		}()
1942	}
1943	for {
1944		next, err := page.fn(ctx, page.lwq)
1945		if err != nil {
1946			return err
1947		}
1948		page.lwq = next
1949		if !next.hasNextLink() || !next.IsEmpty() {
1950			break
1951		}
1952	}
1953	return nil
1954}
1955
1956// Next advances to the next page of values.  If there was an error making
1957// the request the page does not advance and the error is returned.
1958// Deprecated: Use NextWithContext() instead.
1959func (page *ListWorkspaceQuotasPage) Next() error {
1960	return page.NextWithContext(context.Background())
1961}
1962
1963// NotDone returns true if the page enumeration should be started or is not yet complete.
1964func (page ListWorkspaceQuotasPage) NotDone() bool {
1965	return !page.lwq.IsEmpty()
1966}
1967
1968// Response returns the raw server response from the last page request.
1969func (page ListWorkspaceQuotasPage) Response() ListWorkspaceQuotas {
1970	return page.lwq
1971}
1972
1973// Values returns the slice of values for the current page or nil if there are no values.
1974func (page ListWorkspaceQuotasPage) Values() []ResourceQuota {
1975	if page.lwq.IsEmpty() {
1976		return nil
1977	}
1978	return *page.lwq.Value
1979}
1980
1981// Creates a new instance of the ListWorkspaceQuotasPage type.
1982func NewListWorkspaceQuotasPage(cur ListWorkspaceQuotas, getNextPage func(context.Context, ListWorkspaceQuotas) (ListWorkspaceQuotas, error)) ListWorkspaceQuotasPage {
1983	return ListWorkspaceQuotasPage{
1984		fn:  getNextPage,
1985		lwq: cur,
1986	}
1987}
1988
1989// MachineLearningComputeCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1990// long-running operation.
1991type MachineLearningComputeCreateOrUpdateFuture struct {
1992	azure.FutureAPI
1993	// Result returns the result of the asynchronous operation.
1994	// If the operation has not completed it will return an error.
1995	Result func(MachineLearningComputeClient) (ComputeResource, error)
1996}
1997
1998// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1999func (future *MachineLearningComputeCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2000	var azFuture azure.Future
2001	if err := json.Unmarshal(body, &azFuture); err != nil {
2002		return err
2003	}
2004	future.FutureAPI = &azFuture
2005	future.Result = future.result
2006	return nil
2007}
2008
2009// result is the default implementation for MachineLearningComputeCreateOrUpdateFuture.Result.
2010func (future *MachineLearningComputeCreateOrUpdateFuture) result(client MachineLearningComputeClient) (cr ComputeResource, err error) {
2011	var done bool
2012	done, err = future.DoneWithContext(context.Background(), client)
2013	if err != nil {
2014		err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2015		return
2016	}
2017	if !done {
2018		cr.Response.Response = future.Response()
2019		err = azure.NewAsyncOpIncompleteError("machinelearningservices.MachineLearningComputeCreateOrUpdateFuture")
2020		return
2021	}
2022	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2023	if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
2024		cr, err = client.CreateOrUpdateResponder(cr.Response.Response)
2025		if err != nil {
2026			err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeCreateOrUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
2027		}
2028	}
2029	return
2030}
2031
2032// MachineLearningComputeDeleteFuture an abstraction for monitoring and retrieving the results of a
2033// long-running operation.
2034type MachineLearningComputeDeleteFuture struct {
2035	azure.FutureAPI
2036	// Result returns the result of the asynchronous operation.
2037	// If the operation has not completed it will return an error.
2038	Result func(MachineLearningComputeClient) (autorest.Response, error)
2039}
2040
2041// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2042func (future *MachineLearningComputeDeleteFuture) UnmarshalJSON(body []byte) error {
2043	var azFuture azure.Future
2044	if err := json.Unmarshal(body, &azFuture); err != nil {
2045		return err
2046	}
2047	future.FutureAPI = &azFuture
2048	future.Result = future.result
2049	return nil
2050}
2051
2052// result is the default implementation for MachineLearningComputeDeleteFuture.Result.
2053func (future *MachineLearningComputeDeleteFuture) result(client MachineLearningComputeClient) (ar autorest.Response, err error) {
2054	var done bool
2055	done, err = future.DoneWithContext(context.Background(), client)
2056	if err != nil {
2057		err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeDeleteFuture", "Result", future.Response(), "Polling failure")
2058		return
2059	}
2060	if !done {
2061		ar.Response = future.Response()
2062		err = azure.NewAsyncOpIncompleteError("machinelearningservices.MachineLearningComputeDeleteFuture")
2063		return
2064	}
2065	ar.Response = future.Response()
2066	return
2067}
2068
2069// MachineLearningComputeUpdateFuture an abstraction for monitoring and retrieving the results of a
2070// long-running operation.
2071type MachineLearningComputeUpdateFuture struct {
2072	azure.FutureAPI
2073	// Result returns the result of the asynchronous operation.
2074	// If the operation has not completed it will return an error.
2075	Result func(MachineLearningComputeClient) (ComputeResource, error)
2076}
2077
2078// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2079func (future *MachineLearningComputeUpdateFuture) UnmarshalJSON(body []byte) error {
2080	var azFuture azure.Future
2081	if err := json.Unmarshal(body, &azFuture); err != nil {
2082		return err
2083	}
2084	future.FutureAPI = &azFuture
2085	future.Result = future.result
2086	return nil
2087}
2088
2089// result is the default implementation for MachineLearningComputeUpdateFuture.Result.
2090func (future *MachineLearningComputeUpdateFuture) result(client MachineLearningComputeClient) (cr ComputeResource, err error) {
2091	var done bool
2092	done, err = future.DoneWithContext(context.Background(), client)
2093	if err != nil {
2094		err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeUpdateFuture", "Result", future.Response(), "Polling failure")
2095		return
2096	}
2097	if !done {
2098		cr.Response.Response = future.Response()
2099		err = azure.NewAsyncOpIncompleteError("machinelearningservices.MachineLearningComputeUpdateFuture")
2100		return
2101	}
2102	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2103	if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
2104		cr, err = client.UpdateResponder(cr.Response.Response)
2105		if err != nil {
2106			err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
2107		}
2108	}
2109	return
2110}
2111
2112// NodeStateCounts counts of various compute node states on the amlCompute.
2113type NodeStateCounts struct {
2114	// IdleNodeCount - READ-ONLY; Number of compute nodes in idle state.
2115	IdleNodeCount *int32 `json:"idleNodeCount,omitempty"`
2116	// RunningNodeCount - READ-ONLY; Number of compute nodes which are running jobs.
2117	RunningNodeCount *int32 `json:"runningNodeCount,omitempty"`
2118	// PreparingNodeCount - READ-ONLY; Number of compute nodes which are being prepared.
2119	PreparingNodeCount *int32 `json:"preparingNodeCount,omitempty"`
2120	// UnusableNodeCount - READ-ONLY; Number of compute nodes which are in unusable state.
2121	UnusableNodeCount *int32 `json:"unusableNodeCount,omitempty"`
2122	// LeavingNodeCount - READ-ONLY; Number of compute nodes which are leaving the amlCompute.
2123	LeavingNodeCount *int32 `json:"leavingNodeCount,omitempty"`
2124	// PreemptedNodeCount - READ-ONLY; Number of compute nodes which are in preempted state.
2125	PreemptedNodeCount *int32 `json:"preemptedNodeCount,omitempty"`
2126}
2127
2128// MarshalJSON is the custom marshaler for NodeStateCounts.
2129func (nsc NodeStateCounts) MarshalJSON() ([]byte, error) {
2130	objectMap := make(map[string]interface{})
2131	return json.Marshal(objectMap)
2132}
2133
2134// NotebookListCredentialsResult ...
2135type NotebookListCredentialsResult struct {
2136	PrimaryAccessKey   *string `json:"primaryAccessKey,omitempty"`
2137	SecondaryAccessKey *string `json:"secondaryAccessKey,omitempty"`
2138}
2139
2140// NotebookPreparationError ...
2141type NotebookPreparationError struct {
2142	ErrorMessage *string `json:"errorMessage,omitempty"`
2143	StatusCode   *int32  `json:"statusCode,omitempty"`
2144}
2145
2146// NotebookResourceInfo ...
2147type NotebookResourceInfo struct {
2148	autorest.Response `json:"-"`
2149	Fqdn              *string `json:"fqdn,omitempty"`
2150	// ResourceID - the data plane resourceId that used to initialize notebook component
2151	ResourceID *string `json:"resourceId,omitempty"`
2152	// NotebookPreparationError - The error that occurs when preparing notebook.
2153	NotebookPreparationError *NotebookPreparationError `json:"notebookPreparationError,omitempty"`
2154}
2155
2156// NotebooksPrepareFuture an abstraction for monitoring and retrieving the results of a long-running
2157// operation.
2158type NotebooksPrepareFuture struct {
2159	azure.FutureAPI
2160	// Result returns the result of the asynchronous operation.
2161	// If the operation has not completed it will return an error.
2162	Result func(NotebooksClient) (NotebookResourceInfo, error)
2163}
2164
2165// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2166func (future *NotebooksPrepareFuture) UnmarshalJSON(body []byte) error {
2167	var azFuture azure.Future
2168	if err := json.Unmarshal(body, &azFuture); err != nil {
2169		return err
2170	}
2171	future.FutureAPI = &azFuture
2172	future.Result = future.result
2173	return nil
2174}
2175
2176// result is the default implementation for NotebooksPrepareFuture.Result.
2177func (future *NotebooksPrepareFuture) result(client NotebooksClient) (nri NotebookResourceInfo, err error) {
2178	var done bool
2179	done, err = future.DoneWithContext(context.Background(), client)
2180	if err != nil {
2181		err = autorest.NewErrorWithError(err, "machinelearningservices.NotebooksPrepareFuture", "Result", future.Response(), "Polling failure")
2182		return
2183	}
2184	if !done {
2185		nri.Response.Response = future.Response()
2186		err = azure.NewAsyncOpIncompleteError("machinelearningservices.NotebooksPrepareFuture")
2187		return
2188	}
2189	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2190	if nri.Response.Response, err = future.GetResult(sender); err == nil && nri.Response.Response.StatusCode != http.StatusNoContent {
2191		nri, err = client.PrepareResponder(nri.Response.Response)
2192		if err != nil {
2193			err = autorest.NewErrorWithError(err, "machinelearningservices.NotebooksPrepareFuture", "Result", nri.Response.Response, "Failure responding to request")
2194		}
2195	}
2196	return
2197}
2198
2199// Operation azure Machine Learning workspace REST API operation
2200type Operation struct {
2201	// Name - Operation name: {provider}/{resource}/{operation}
2202	Name *string `json:"name,omitempty"`
2203	// Display - Display name of operation
2204	Display *OperationDisplay `json:"display,omitempty"`
2205}
2206
2207// OperationDisplay display name of operation
2208type OperationDisplay struct {
2209	// Provider - The resource provider name: Microsoft.MachineLearningExperimentation
2210	Provider *string `json:"provider,omitempty"`
2211	// Resource - The resource on which the operation is performed.
2212	Resource *string `json:"resource,omitempty"`
2213	// Operation - The operation that users can perform.
2214	Operation *string `json:"operation,omitempty"`
2215	// Description - The description for the operation.
2216	Description *string `json:"description,omitempty"`
2217}
2218
2219// OperationListResult an array of operations supported by the resource provider.
2220type OperationListResult struct {
2221	autorest.Response `json:"-"`
2222	// Value - List of AML workspace operations supported by the AML workspace resource provider.
2223	Value *[]Operation `json:"value,omitempty"`
2224}
2225
2226// PaginatedComputeResourcesList paginated list of Machine Learning compute objects wrapped in ARM resource
2227// envelope.
2228type PaginatedComputeResourcesList struct {
2229	autorest.Response `json:"-"`
2230	// Value - An array of Machine Learning compute objects wrapped in ARM resource envelope.
2231	Value *[]ComputeResource `json:"value,omitempty"`
2232	// NextLink - A continuation link (absolute URI) to the next page of results in the list.
2233	NextLink *string `json:"nextLink,omitempty"`
2234}
2235
2236// PaginatedComputeResourcesListIterator provides access to a complete listing of ComputeResource values.
2237type PaginatedComputeResourcesListIterator struct {
2238	i    int
2239	page PaginatedComputeResourcesListPage
2240}
2241
2242// NextWithContext advances to the next value.  If there was an error making
2243// the request the iterator does not advance and the error is returned.
2244func (iter *PaginatedComputeResourcesListIterator) NextWithContext(ctx context.Context) (err error) {
2245	if tracing.IsEnabled() {
2246		ctx = tracing.StartSpan(ctx, fqdn+"/PaginatedComputeResourcesListIterator.NextWithContext")
2247		defer func() {
2248			sc := -1
2249			if iter.Response().Response.Response != nil {
2250				sc = iter.Response().Response.Response.StatusCode
2251			}
2252			tracing.EndSpan(ctx, sc, err)
2253		}()
2254	}
2255	iter.i++
2256	if iter.i < len(iter.page.Values()) {
2257		return nil
2258	}
2259	err = iter.page.NextWithContext(ctx)
2260	if err != nil {
2261		iter.i--
2262		return err
2263	}
2264	iter.i = 0
2265	return nil
2266}
2267
2268// Next advances to the next value.  If there was an error making
2269// the request the iterator does not advance and the error is returned.
2270// Deprecated: Use NextWithContext() instead.
2271func (iter *PaginatedComputeResourcesListIterator) Next() error {
2272	return iter.NextWithContext(context.Background())
2273}
2274
2275// NotDone returns true if the enumeration should be started or is not yet complete.
2276func (iter PaginatedComputeResourcesListIterator) NotDone() bool {
2277	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2278}
2279
2280// Response returns the raw server response from the last page request.
2281func (iter PaginatedComputeResourcesListIterator) Response() PaginatedComputeResourcesList {
2282	return iter.page.Response()
2283}
2284
2285// Value returns the current value or a zero-initialized value if the
2286// iterator has advanced beyond the end of the collection.
2287func (iter PaginatedComputeResourcesListIterator) Value() ComputeResource {
2288	if !iter.page.NotDone() {
2289		return ComputeResource{}
2290	}
2291	return iter.page.Values()[iter.i]
2292}
2293
2294// Creates a new instance of the PaginatedComputeResourcesListIterator type.
2295func NewPaginatedComputeResourcesListIterator(page PaginatedComputeResourcesListPage) PaginatedComputeResourcesListIterator {
2296	return PaginatedComputeResourcesListIterator{page: page}
2297}
2298
2299// IsEmpty returns true if the ListResult contains no values.
2300func (pcrl PaginatedComputeResourcesList) IsEmpty() bool {
2301	return pcrl.Value == nil || len(*pcrl.Value) == 0
2302}
2303
2304// hasNextLink returns true if the NextLink is not empty.
2305func (pcrl PaginatedComputeResourcesList) hasNextLink() bool {
2306	return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
2307}
2308
2309// paginatedComputeResourcesListPreparer prepares a request to retrieve the next set of results.
2310// It returns nil if no more results exist.
2311func (pcrl PaginatedComputeResourcesList) paginatedComputeResourcesListPreparer(ctx context.Context) (*http.Request, error) {
2312	if !pcrl.hasNextLink() {
2313		return nil, nil
2314	}
2315	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2316		autorest.AsJSON(),
2317		autorest.AsGet(),
2318		autorest.WithBaseURL(to.String(pcrl.NextLink)))
2319}
2320
2321// PaginatedComputeResourcesListPage contains a page of ComputeResource values.
2322type PaginatedComputeResourcesListPage struct {
2323	fn   func(context.Context, PaginatedComputeResourcesList) (PaginatedComputeResourcesList, error)
2324	pcrl PaginatedComputeResourcesList
2325}
2326
2327// NextWithContext advances to the next page of values.  If there was an error making
2328// the request the page does not advance and the error is returned.
2329func (page *PaginatedComputeResourcesListPage) NextWithContext(ctx context.Context) (err error) {
2330	if tracing.IsEnabled() {
2331		ctx = tracing.StartSpan(ctx, fqdn+"/PaginatedComputeResourcesListPage.NextWithContext")
2332		defer func() {
2333			sc := -1
2334			if page.Response().Response.Response != nil {
2335				sc = page.Response().Response.Response.StatusCode
2336			}
2337			tracing.EndSpan(ctx, sc, err)
2338		}()
2339	}
2340	for {
2341		next, err := page.fn(ctx, page.pcrl)
2342		if err != nil {
2343			return err
2344		}
2345		page.pcrl = next
2346		if !next.hasNextLink() || !next.IsEmpty() {
2347			break
2348		}
2349	}
2350	return nil
2351}
2352
2353// Next advances to the next page of values.  If there was an error making
2354// the request the page does not advance and the error is returned.
2355// Deprecated: Use NextWithContext() instead.
2356func (page *PaginatedComputeResourcesListPage) Next() error {
2357	return page.NextWithContext(context.Background())
2358}
2359
2360// NotDone returns true if the page enumeration should be started or is not yet complete.
2361func (page PaginatedComputeResourcesListPage) NotDone() bool {
2362	return !page.pcrl.IsEmpty()
2363}
2364
2365// Response returns the raw server response from the last page request.
2366func (page PaginatedComputeResourcesListPage) Response() PaginatedComputeResourcesList {
2367	return page.pcrl
2368}
2369
2370// Values returns the slice of values for the current page or nil if there are no values.
2371func (page PaginatedComputeResourcesListPage) Values() []ComputeResource {
2372	if page.pcrl.IsEmpty() {
2373		return nil
2374	}
2375	return *page.pcrl.Value
2376}
2377
2378// Creates a new instance of the PaginatedComputeResourcesListPage type.
2379func NewPaginatedComputeResourcesListPage(cur PaginatedComputeResourcesList, getNextPage func(context.Context, PaginatedComputeResourcesList) (PaginatedComputeResourcesList, error)) PaginatedComputeResourcesListPage {
2380	return PaginatedComputeResourcesListPage{
2381		fn:   getNextPage,
2382		pcrl: cur,
2383	}
2384}
2385
2386// Password ...
2387type Password struct {
2388	// Name - READ-ONLY
2389	Name *string `json:"name,omitempty"`
2390	// Value - READ-ONLY
2391	Value *string `json:"value,omitempty"`
2392}
2393
2394// MarshalJSON is the custom marshaler for Password.
2395func (p Password) MarshalJSON() ([]byte, error) {
2396	objectMap := make(map[string]interface{})
2397	return json.Marshal(objectMap)
2398}
2399
2400// PrivateEndpoint the Private Endpoint resource.
2401type PrivateEndpoint struct {
2402	// ID - READ-ONLY; The ARM identifier for Private Endpoint
2403	ID *string `json:"id,omitempty"`
2404}
2405
2406// MarshalJSON is the custom marshaler for PrivateEndpoint.
2407func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
2408	objectMap := make(map[string]interface{})
2409	return json.Marshal(objectMap)
2410}
2411
2412// PrivateEndpointConnection the Private Endpoint Connection resource.
2413type PrivateEndpointConnection struct {
2414	autorest.Response `json:"-"`
2415	// PrivateEndpointConnectionProperties - Resource properties.
2416	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
2417	// ID - READ-ONLY; Specifies the resource ID.
2418	ID *string `json:"id,omitempty"`
2419	// Name - READ-ONLY; Specifies the name of the resource.
2420	Name *string `json:"name,omitempty"`
2421	// Identity - The identity of the resource.
2422	Identity *Identity `json:"identity,omitempty"`
2423	// Location - Specifies the location of the resource.
2424	Location *string `json:"location,omitempty"`
2425	// Type - READ-ONLY; Specifies the type of the resource.
2426	Type *string `json:"type,omitempty"`
2427	// Tags - Contains resource tags defined as key/value pairs.
2428	Tags map[string]*string `json:"tags"`
2429	// Sku - The sku of the workspace.
2430	Sku *Sku `json:"sku,omitempty"`
2431}
2432
2433// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
2434func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
2435	objectMap := make(map[string]interface{})
2436	if pec.PrivateEndpointConnectionProperties != nil {
2437		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
2438	}
2439	if pec.Identity != nil {
2440		objectMap["identity"] = pec.Identity
2441	}
2442	if pec.Location != nil {
2443		objectMap["location"] = pec.Location
2444	}
2445	if pec.Tags != nil {
2446		objectMap["tags"] = pec.Tags
2447	}
2448	if pec.Sku != nil {
2449		objectMap["sku"] = pec.Sku
2450	}
2451	return json.Marshal(objectMap)
2452}
2453
2454// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
2455func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
2456	var m map[string]*json.RawMessage
2457	err := json.Unmarshal(body, &m)
2458	if err != nil {
2459		return err
2460	}
2461	for k, v := range m {
2462		switch k {
2463		case "properties":
2464			if v != nil {
2465				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
2466				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
2467				if err != nil {
2468					return err
2469				}
2470				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
2471			}
2472		case "id":
2473			if v != nil {
2474				var ID string
2475				err = json.Unmarshal(*v, &ID)
2476				if err != nil {
2477					return err
2478				}
2479				pec.ID = &ID
2480			}
2481		case "name":
2482			if v != nil {
2483				var name string
2484				err = json.Unmarshal(*v, &name)
2485				if err != nil {
2486					return err
2487				}
2488				pec.Name = &name
2489			}
2490		case "identity":
2491			if v != nil {
2492				var identity Identity
2493				err = json.Unmarshal(*v, &identity)
2494				if err != nil {
2495					return err
2496				}
2497				pec.Identity = &identity
2498			}
2499		case "location":
2500			if v != nil {
2501				var location string
2502				err = json.Unmarshal(*v, &location)
2503				if err != nil {
2504					return err
2505				}
2506				pec.Location = &location
2507			}
2508		case "type":
2509			if v != nil {
2510				var typeVar string
2511				err = json.Unmarshal(*v, &typeVar)
2512				if err != nil {
2513					return err
2514				}
2515				pec.Type = &typeVar
2516			}
2517		case "tags":
2518			if v != nil {
2519				var tags map[string]*string
2520				err = json.Unmarshal(*v, &tags)
2521				if err != nil {
2522					return err
2523				}
2524				pec.Tags = tags
2525			}
2526		case "sku":
2527			if v != nil {
2528				var sku Sku
2529				err = json.Unmarshal(*v, &sku)
2530				if err != nil {
2531					return err
2532				}
2533				pec.Sku = &sku
2534			}
2535		}
2536	}
2537
2538	return nil
2539}
2540
2541// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
2542type PrivateEndpointConnectionProperties struct {
2543	// PrivateEndpoint - The resource of private end point.
2544	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
2545	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
2546	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
2547	// ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed'
2548	ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
2549}
2550
2551// PrivateLinkResource a private link resource
2552type PrivateLinkResource struct {
2553	// PrivateLinkResourceProperties - Resource properties.
2554	*PrivateLinkResourceProperties `json:"properties,omitempty"`
2555	// ID - READ-ONLY; Specifies the resource ID.
2556	ID *string `json:"id,omitempty"`
2557	// Name - READ-ONLY; Specifies the name of the resource.
2558	Name *string `json:"name,omitempty"`
2559	// Identity - The identity of the resource.
2560	Identity *Identity `json:"identity,omitempty"`
2561	// Location - Specifies the location of the resource.
2562	Location *string `json:"location,omitempty"`
2563	// Type - READ-ONLY; Specifies the type of the resource.
2564	Type *string `json:"type,omitempty"`
2565	// Tags - Contains resource tags defined as key/value pairs.
2566	Tags map[string]*string `json:"tags"`
2567	// Sku - The sku of the workspace.
2568	Sku *Sku `json:"sku,omitempty"`
2569}
2570
2571// MarshalJSON is the custom marshaler for PrivateLinkResource.
2572func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
2573	objectMap := make(map[string]interface{})
2574	if plr.PrivateLinkResourceProperties != nil {
2575		objectMap["properties"] = plr.PrivateLinkResourceProperties
2576	}
2577	if plr.Identity != nil {
2578		objectMap["identity"] = plr.Identity
2579	}
2580	if plr.Location != nil {
2581		objectMap["location"] = plr.Location
2582	}
2583	if plr.Tags != nil {
2584		objectMap["tags"] = plr.Tags
2585	}
2586	if plr.Sku != nil {
2587		objectMap["sku"] = plr.Sku
2588	}
2589	return json.Marshal(objectMap)
2590}
2591
2592// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
2593func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
2594	var m map[string]*json.RawMessage
2595	err := json.Unmarshal(body, &m)
2596	if err != nil {
2597		return err
2598	}
2599	for k, v := range m {
2600		switch k {
2601		case "properties":
2602			if v != nil {
2603				var privateLinkResourceProperties PrivateLinkResourceProperties
2604				err = json.Unmarshal(*v, &privateLinkResourceProperties)
2605				if err != nil {
2606					return err
2607				}
2608				plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
2609			}
2610		case "id":
2611			if v != nil {
2612				var ID string
2613				err = json.Unmarshal(*v, &ID)
2614				if err != nil {
2615					return err
2616				}
2617				plr.ID = &ID
2618			}
2619		case "name":
2620			if v != nil {
2621				var name string
2622				err = json.Unmarshal(*v, &name)
2623				if err != nil {
2624					return err
2625				}
2626				plr.Name = &name
2627			}
2628		case "identity":
2629			if v != nil {
2630				var identity Identity
2631				err = json.Unmarshal(*v, &identity)
2632				if err != nil {
2633					return err
2634				}
2635				plr.Identity = &identity
2636			}
2637		case "location":
2638			if v != nil {
2639				var location string
2640				err = json.Unmarshal(*v, &location)
2641				if err != nil {
2642					return err
2643				}
2644				plr.Location = &location
2645			}
2646		case "type":
2647			if v != nil {
2648				var typeVar string
2649				err = json.Unmarshal(*v, &typeVar)
2650				if err != nil {
2651					return err
2652				}
2653				plr.Type = &typeVar
2654			}
2655		case "tags":
2656			if v != nil {
2657				var tags map[string]*string
2658				err = json.Unmarshal(*v, &tags)
2659				if err != nil {
2660					return err
2661				}
2662				plr.Tags = tags
2663			}
2664		case "sku":
2665			if v != nil {
2666				var sku Sku
2667				err = json.Unmarshal(*v, &sku)
2668				if err != nil {
2669					return err
2670				}
2671				plr.Sku = &sku
2672			}
2673		}
2674	}
2675
2676	return nil
2677}
2678
2679// PrivateLinkResourceListResult a list of private link resources
2680type PrivateLinkResourceListResult struct {
2681	autorest.Response `json:"-"`
2682	// Value - Array of private link resources
2683	Value *[]PrivateLinkResource `json:"value,omitempty"`
2684}
2685
2686// PrivateLinkResourceProperties properties of a private link resource.
2687type PrivateLinkResourceProperties struct {
2688	// GroupID - READ-ONLY; The private link resource group id.
2689	GroupID *string `json:"groupId,omitempty"`
2690	// RequiredMembers - READ-ONLY; The private link resource required member names.
2691	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
2692	// RequiredZoneNames - The private link resource Private link DNS zone name.
2693	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
2694}
2695
2696// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties.
2697func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
2698	objectMap := make(map[string]interface{})
2699	if plrp.RequiredZoneNames != nil {
2700		objectMap["requiredZoneNames"] = plrp.RequiredZoneNames
2701	}
2702	return json.Marshal(objectMap)
2703}
2704
2705// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
2706// service consumer and provider.
2707type PrivateLinkServiceConnectionState struct {
2708	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout'
2709	Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
2710	// Description - The reason for approval/rejection of the connection.
2711	Description *string `json:"description,omitempty"`
2712	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
2713	ActionsRequired *string `json:"actionsRequired,omitempty"`
2714}
2715
2716// QuotaBaseProperties the properties for Quota update or retrieval.
2717type QuotaBaseProperties struct {
2718	// ID - Specifies the resource ID.
2719	ID *string `json:"id,omitempty"`
2720	// Type - Specifies the resource type.
2721	Type *string `json:"type,omitempty"`
2722	// Limit - The maximum permitted quota of the resource.
2723	Limit *int64 `json:"limit,omitempty"`
2724	// Unit - An enum describing the unit of quota measurement. Possible values include: 'Count'
2725	Unit QuotaUnit `json:"unit,omitempty"`
2726}
2727
2728// QuotaUpdateParameters quota update parameters.
2729type QuotaUpdateParameters struct {
2730	// Value - The list for update quota.
2731	Value *[]QuotaBaseProperties `json:"value,omitempty"`
2732}
2733
2734// RegistryListCredentialsResult ...
2735type RegistryListCredentialsResult struct {
2736	// Location - READ-ONLY
2737	Location *string `json:"location,omitempty"`
2738	// Username - READ-ONLY
2739	Username  *string     `json:"username,omitempty"`
2740	Passwords *[]Password `json:"passwords,omitempty"`
2741}
2742
2743// MarshalJSON is the custom marshaler for RegistryListCredentialsResult.
2744func (rlcr RegistryListCredentialsResult) MarshalJSON() ([]byte, error) {
2745	objectMap := make(map[string]interface{})
2746	if rlcr.Passwords != nil {
2747		objectMap["passwords"] = rlcr.Passwords
2748	}
2749	return json.Marshal(objectMap)
2750}
2751
2752// Resource azure Resource Manager resource envelope.
2753type Resource struct {
2754	// ID - READ-ONLY; Specifies the resource ID.
2755	ID *string `json:"id,omitempty"`
2756	// Name - READ-ONLY; Specifies the name of the resource.
2757	Name *string `json:"name,omitempty"`
2758	// Identity - The identity of the resource.
2759	Identity *Identity `json:"identity,omitempty"`
2760	// Location - Specifies the location of the resource.
2761	Location *string `json:"location,omitempty"`
2762	// Type - READ-ONLY; Specifies the type of the resource.
2763	Type *string `json:"type,omitempty"`
2764	// Tags - Contains resource tags defined as key/value pairs.
2765	Tags map[string]*string `json:"tags"`
2766	// Sku - The sku of the workspace.
2767	Sku *Sku `json:"sku,omitempty"`
2768}
2769
2770// MarshalJSON is the custom marshaler for Resource.
2771func (r Resource) MarshalJSON() ([]byte, error) {
2772	objectMap := make(map[string]interface{})
2773	if r.Identity != nil {
2774		objectMap["identity"] = r.Identity
2775	}
2776	if r.Location != nil {
2777		objectMap["location"] = r.Location
2778	}
2779	if r.Tags != nil {
2780		objectMap["tags"] = r.Tags
2781	}
2782	if r.Sku != nil {
2783		objectMap["sku"] = r.Sku
2784	}
2785	return json.Marshal(objectMap)
2786}
2787
2788// ResourceID represents a resource ID. For example, for a subnet, it is the resource URL for the subnet.
2789type ResourceID struct {
2790	// ID - The ID of the resource
2791	ID *string `json:"id,omitempty"`
2792}
2793
2794// ResourceName the Resource Name.
2795type ResourceName struct {
2796	// Value - READ-ONLY; The name of the resource.
2797	Value *string `json:"value,omitempty"`
2798	// LocalizedValue - READ-ONLY; The localized name of the resource.
2799	LocalizedValue *string `json:"localizedValue,omitempty"`
2800}
2801
2802// MarshalJSON is the custom marshaler for ResourceName.
2803func (rn ResourceName) MarshalJSON() ([]byte, error) {
2804	objectMap := make(map[string]interface{})
2805	return json.Marshal(objectMap)
2806}
2807
2808// ResourceQuota the quota assigned to a resource.
2809type ResourceQuota struct {
2810	// ID - READ-ONLY; Specifies the resource ID.
2811	ID *string `json:"id,omitempty"`
2812	// Type - READ-ONLY; Specifies the resource type.
2813	Type *string `json:"type,omitempty"`
2814	// Name - READ-ONLY; Name of the resource.
2815	Name *ResourceName `json:"name,omitempty"`
2816	// Limit - READ-ONLY; The maximum permitted quota of the resource.
2817	Limit *int64 `json:"limit,omitempty"`
2818	// Unit - READ-ONLY; An enum describing the unit of quota measurement. Possible values include: 'Count'
2819	Unit QuotaUnit `json:"unit,omitempty"`
2820}
2821
2822// MarshalJSON is the custom marshaler for ResourceQuota.
2823func (rq ResourceQuota) MarshalJSON() ([]byte, error) {
2824	objectMap := make(map[string]interface{})
2825	return json.Marshal(objectMap)
2826}
2827
2828// ResourceSkuLocationInfo ...
2829type ResourceSkuLocationInfo struct {
2830	// Location - READ-ONLY; Location of the SKU
2831	Location *string `json:"location,omitempty"`
2832	// Zones - READ-ONLY; List of availability zones where the SKU is supported.
2833	Zones *[]string `json:"zones,omitempty"`
2834	// ZoneDetails - READ-ONLY; Details of capabilities available to a SKU in specific zones.
2835	ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"`
2836}
2837
2838// MarshalJSON is the custom marshaler for ResourceSkuLocationInfo.
2839func (rsli ResourceSkuLocationInfo) MarshalJSON() ([]byte, error) {
2840	objectMap := make(map[string]interface{})
2841	return json.Marshal(objectMap)
2842}
2843
2844// ResourceSkuZoneDetails describes The zonal capabilities of a SKU.
2845type ResourceSkuZoneDetails struct {
2846	// Name - READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
2847	Name *[]string `json:"name,omitempty"`
2848	// Capabilities - READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
2849	Capabilities *[]SKUCapability `json:"capabilities,omitempty"`
2850}
2851
2852// MarshalJSON is the custom marshaler for ResourceSkuZoneDetails.
2853func (rszd ResourceSkuZoneDetails) MarshalJSON() ([]byte, error) {
2854	objectMap := make(map[string]interface{})
2855	return json.Marshal(objectMap)
2856}
2857
2858// Restriction the restriction because of which SKU cannot be used.
2859type Restriction struct {
2860	// Type - READ-ONLY; The type of restrictions. As of now only possible value for this is location.
2861	Type *string `json:"type,omitempty"`
2862	// Values - READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
2863	Values *[]string `json:"values,omitempty"`
2864	// ReasonCode - The reason for the restriction. Possible values include: 'NotSpecified', 'NotAvailableForRegion', 'NotAvailableForSubscription'
2865	ReasonCode ReasonCode `json:"reasonCode,omitempty"`
2866}
2867
2868// MarshalJSON is the custom marshaler for Restriction.
2869func (r Restriction) MarshalJSON() ([]byte, error) {
2870	objectMap := make(map[string]interface{})
2871	if r.ReasonCode != "" {
2872		objectMap["reasonCode"] = r.ReasonCode
2873	}
2874	return json.Marshal(objectMap)
2875}
2876
2877// ScaleSettings scale settings for AML Compute
2878type ScaleSettings struct {
2879	// MaxNodeCount - Max number of nodes to use
2880	MaxNodeCount *int32 `json:"maxNodeCount,omitempty"`
2881	// MinNodeCount - Min number of nodes to use
2882	MinNodeCount *int32 `json:"minNodeCount,omitempty"`
2883	// NodeIdleTimeBeforeScaleDown - Node Idle Time before scaling down amlCompute
2884	NodeIdleTimeBeforeScaleDown *string `json:"nodeIdleTimeBeforeScaleDown,omitempty"`
2885}
2886
2887// ServicePrincipalCredentials service principal credentials.
2888type ServicePrincipalCredentials struct {
2889	// ClientID - Client Id
2890	ClientID *string `json:"clientId,omitempty"`
2891	// ClientSecret - Client secret
2892	ClientSecret *string `json:"clientSecret,omitempty"`
2893}
2894
2895// SharedPrivateLinkResource ...
2896type SharedPrivateLinkResource struct {
2897	// Name - Unique name of the private link.
2898	Name *string `json:"name,omitempty"`
2899	// SharedPrivateLinkResourceProperty - Resource properties.
2900	*SharedPrivateLinkResourceProperty `json:"properties,omitempty"`
2901}
2902
2903// MarshalJSON is the custom marshaler for SharedPrivateLinkResource.
2904func (splr SharedPrivateLinkResource) MarshalJSON() ([]byte, error) {
2905	objectMap := make(map[string]interface{})
2906	if splr.Name != nil {
2907		objectMap["name"] = splr.Name
2908	}
2909	if splr.SharedPrivateLinkResourceProperty != nil {
2910		objectMap["properties"] = splr.SharedPrivateLinkResourceProperty
2911	}
2912	return json.Marshal(objectMap)
2913}
2914
2915// UnmarshalJSON is the custom unmarshaler for SharedPrivateLinkResource struct.
2916func (splr *SharedPrivateLinkResource) UnmarshalJSON(body []byte) error {
2917	var m map[string]*json.RawMessage
2918	err := json.Unmarshal(body, &m)
2919	if err != nil {
2920		return err
2921	}
2922	for k, v := range m {
2923		switch k {
2924		case "name":
2925			if v != nil {
2926				var name string
2927				err = json.Unmarshal(*v, &name)
2928				if err != nil {
2929					return err
2930				}
2931				splr.Name = &name
2932			}
2933		case "properties":
2934			if v != nil {
2935				var sharedPrivateLinkResourceProperty SharedPrivateLinkResourceProperty
2936				err = json.Unmarshal(*v, &sharedPrivateLinkResourceProperty)
2937				if err != nil {
2938					return err
2939				}
2940				splr.SharedPrivateLinkResourceProperty = &sharedPrivateLinkResourceProperty
2941			}
2942		}
2943	}
2944
2945	return nil
2946}
2947
2948// SharedPrivateLinkResourceProperty properties of a shared private link resource.
2949type SharedPrivateLinkResourceProperty struct {
2950	// PrivateLinkResourceID - The resource id that private link links to.
2951	PrivateLinkResourceID *string `json:"privateLinkResourceId,omitempty"`
2952	// GroupID - The private link resource group id.
2953	GroupID *string `json:"groupId,omitempty"`
2954	// RequestMessage - Request message.
2955	RequestMessage *string `json:"requestMessage,omitempty"`
2956	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout'
2957	Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
2958}
2959
2960// Sku sku of the resource
2961type Sku struct {
2962	// Name - Name of the sku
2963	Name *string `json:"name,omitempty"`
2964	// Tier - Tier of the sku like Basic or Enterprise
2965	Tier *string `json:"tier,omitempty"`
2966}
2967
2968// SKUCapability features/user capabilities associated with the sku
2969type SKUCapability struct {
2970	// Name - Capability/Feature ID
2971	Name *string `json:"name,omitempty"`
2972	// Value - Details about the feature/capability
2973	Value *string `json:"value,omitempty"`
2974}
2975
2976// SkuListResult list of skus with features
2977type SkuListResult struct {
2978	autorest.Response `json:"-"`
2979	Value             *[]WorkspaceSku `json:"value,omitempty"`
2980	// NextLink - The URI to fetch the next page of Workspace Skus. Call ListNext() with this URI to fetch the next page of Workspace Skus
2981	NextLink *string `json:"nextLink,omitempty"`
2982}
2983
2984// SkuListResultIterator provides access to a complete listing of WorkspaceSku values.
2985type SkuListResultIterator struct {
2986	i    int
2987	page SkuListResultPage
2988}
2989
2990// NextWithContext advances to the next value.  If there was an error making
2991// the request the iterator does not advance and the error is returned.
2992func (iter *SkuListResultIterator) NextWithContext(ctx context.Context) (err error) {
2993	if tracing.IsEnabled() {
2994		ctx = tracing.StartSpan(ctx, fqdn+"/SkuListResultIterator.NextWithContext")
2995		defer func() {
2996			sc := -1
2997			if iter.Response().Response.Response != nil {
2998				sc = iter.Response().Response.Response.StatusCode
2999			}
3000			tracing.EndSpan(ctx, sc, err)
3001		}()
3002	}
3003	iter.i++
3004	if iter.i < len(iter.page.Values()) {
3005		return nil
3006	}
3007	err = iter.page.NextWithContext(ctx)
3008	if err != nil {
3009		iter.i--
3010		return err
3011	}
3012	iter.i = 0
3013	return nil
3014}
3015
3016// Next advances to the next value.  If there was an error making
3017// the request the iterator does not advance and the error is returned.
3018// Deprecated: Use NextWithContext() instead.
3019func (iter *SkuListResultIterator) Next() error {
3020	return iter.NextWithContext(context.Background())
3021}
3022
3023// NotDone returns true if the enumeration should be started or is not yet complete.
3024func (iter SkuListResultIterator) NotDone() bool {
3025	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3026}
3027
3028// Response returns the raw server response from the last page request.
3029func (iter SkuListResultIterator) Response() SkuListResult {
3030	return iter.page.Response()
3031}
3032
3033// Value returns the current value or a zero-initialized value if the
3034// iterator has advanced beyond the end of the collection.
3035func (iter SkuListResultIterator) Value() WorkspaceSku {
3036	if !iter.page.NotDone() {
3037		return WorkspaceSku{}
3038	}
3039	return iter.page.Values()[iter.i]
3040}
3041
3042// Creates a new instance of the SkuListResultIterator type.
3043func NewSkuListResultIterator(page SkuListResultPage) SkuListResultIterator {
3044	return SkuListResultIterator{page: page}
3045}
3046
3047// IsEmpty returns true if the ListResult contains no values.
3048func (slr SkuListResult) IsEmpty() bool {
3049	return slr.Value == nil || len(*slr.Value) == 0
3050}
3051
3052// hasNextLink returns true if the NextLink is not empty.
3053func (slr SkuListResult) hasNextLink() bool {
3054	return slr.NextLink != nil && len(*slr.NextLink) != 0
3055}
3056
3057// skuListResultPreparer prepares a request to retrieve the next set of results.
3058// It returns nil if no more results exist.
3059func (slr SkuListResult) skuListResultPreparer(ctx context.Context) (*http.Request, error) {
3060	if !slr.hasNextLink() {
3061		return nil, nil
3062	}
3063	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3064		autorest.AsJSON(),
3065		autorest.AsGet(),
3066		autorest.WithBaseURL(to.String(slr.NextLink)))
3067}
3068
3069// SkuListResultPage contains a page of WorkspaceSku values.
3070type SkuListResultPage struct {
3071	fn  func(context.Context, SkuListResult) (SkuListResult, error)
3072	slr SkuListResult
3073}
3074
3075// NextWithContext advances to the next page of values.  If there was an error making
3076// the request the page does not advance and the error is returned.
3077func (page *SkuListResultPage) NextWithContext(ctx context.Context) (err error) {
3078	if tracing.IsEnabled() {
3079		ctx = tracing.StartSpan(ctx, fqdn+"/SkuListResultPage.NextWithContext")
3080		defer func() {
3081			sc := -1
3082			if page.Response().Response.Response != nil {
3083				sc = page.Response().Response.Response.StatusCode
3084			}
3085			tracing.EndSpan(ctx, sc, err)
3086		}()
3087	}
3088	for {
3089		next, err := page.fn(ctx, page.slr)
3090		if err != nil {
3091			return err
3092		}
3093		page.slr = next
3094		if !next.hasNextLink() || !next.IsEmpty() {
3095			break
3096		}
3097	}
3098	return nil
3099}
3100
3101// Next advances to the next page of values.  If there was an error making
3102// the request the page does not advance and the error is returned.
3103// Deprecated: Use NextWithContext() instead.
3104func (page *SkuListResultPage) Next() error {
3105	return page.NextWithContext(context.Background())
3106}
3107
3108// NotDone returns true if the page enumeration should be started or is not yet complete.
3109func (page SkuListResultPage) NotDone() bool {
3110	return !page.slr.IsEmpty()
3111}
3112
3113// Response returns the raw server response from the last page request.
3114func (page SkuListResultPage) Response() SkuListResult {
3115	return page.slr
3116}
3117
3118// Values returns the slice of values for the current page or nil if there are no values.
3119func (page SkuListResultPage) Values() []WorkspaceSku {
3120	if page.slr.IsEmpty() {
3121		return nil
3122	}
3123	return *page.slr.Value
3124}
3125
3126// Creates a new instance of the SkuListResultPage type.
3127func NewSkuListResultPage(cur SkuListResult, getNextPage func(context.Context, SkuListResult) (SkuListResult, error)) SkuListResultPage {
3128	return SkuListResultPage{
3129		fn:  getNextPage,
3130		slr: cur,
3131	}
3132}
3133
3134// SslConfiguration the ssl configuration for scoring
3135type SslConfiguration struct {
3136	// Status - Enable or disable ssl for scoring. Possible values include: 'Status1Disabled', 'Status1Enabled', 'Status1Auto'
3137	Status Status1 `json:"status,omitempty"`
3138	// Cert - Cert data
3139	Cert *string `json:"cert,omitempty"`
3140	// Key - Key data
3141	Key *string `json:"key,omitempty"`
3142	// Cname - CNAME of the cert
3143	Cname *string `json:"cname,omitempty"`
3144	// LeafDomainLabel - The leaf domain label name
3145	LeafDomainLabel *string `json:"leafDomainLabel,omitempty"`
3146	// OverwriteExistingDomain - Boolean value for overwriting the domain
3147	OverwriteExistingDomain *bool `json:"overwriteExistingDomain,omitempty"`
3148}
3149
3150// SystemService a system service running on a compute.
3151type SystemService struct {
3152	// SystemServiceType - READ-ONLY; The type of this system service.
3153	SystemServiceType *string `json:"systemServiceType,omitempty"`
3154	// PublicIPAddress - READ-ONLY; Public IP address
3155	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
3156	// Version - READ-ONLY; The version for this type.
3157	Version *string `json:"version,omitempty"`
3158}
3159
3160// MarshalJSON is the custom marshaler for SystemService.
3161func (ss SystemService) MarshalJSON() ([]byte, error) {
3162	objectMap := make(map[string]interface{})
3163	return json.Marshal(objectMap)
3164}
3165
3166// UpdateWorkspaceQuotas the properties for update Quota response.
3167type UpdateWorkspaceQuotas struct {
3168	// ID - READ-ONLY; Specifies the resource ID.
3169	ID *string `json:"id,omitempty"`
3170	// Type - READ-ONLY; Specifies the resource type.
3171	Type *string `json:"type,omitempty"`
3172	// Limit - The maximum permitted quota of the resource.
3173	Limit *int64 `json:"limit,omitempty"`
3174	// Unit - READ-ONLY; An enum describing the unit of quota measurement. Possible values include: 'Count'
3175	Unit QuotaUnit `json:"unit,omitempty"`
3176	// Status - Status of update workspace quota. Possible values include: 'Undefined', 'Success', 'Failure', 'InvalidQuotaBelowClusterMinimum', 'InvalidQuotaExceedsSubscriptionLimit', 'InvalidVMFamilyName', 'OperationNotSupportedForSku', 'OperationNotEnabledForRegion'
3177	Status Status `json:"status,omitempty"`
3178}
3179
3180// MarshalJSON is the custom marshaler for UpdateWorkspaceQuotas.
3181func (uwq UpdateWorkspaceQuotas) MarshalJSON() ([]byte, error) {
3182	objectMap := make(map[string]interface{})
3183	if uwq.Limit != nil {
3184		objectMap["limit"] = uwq.Limit
3185	}
3186	if uwq.Status != "" {
3187		objectMap["status"] = uwq.Status
3188	}
3189	return json.Marshal(objectMap)
3190}
3191
3192// UpdateWorkspaceQuotasResult the result of update workspace quota.
3193type UpdateWorkspaceQuotasResult struct {
3194	autorest.Response `json:"-"`
3195	// Value - READ-ONLY; The list of workspace quota update result.
3196	Value *[]UpdateWorkspaceQuotas `json:"value,omitempty"`
3197	// NextLink - READ-ONLY; The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result.
3198	NextLink *string `json:"nextLink,omitempty"`
3199}
3200
3201// MarshalJSON is the custom marshaler for UpdateWorkspaceQuotasResult.
3202func (uwqr UpdateWorkspaceQuotasResult) MarshalJSON() ([]byte, error) {
3203	objectMap := make(map[string]interface{})
3204	return json.Marshal(objectMap)
3205}
3206
3207// Usage describes AML Resource Usage.
3208type Usage struct {
3209	// ID - READ-ONLY; Specifies the resource ID.
3210	ID *string `json:"id,omitempty"`
3211	// Type - READ-ONLY; Specifies the resource type.
3212	Type *string `json:"type,omitempty"`
3213	// Unit - READ-ONLY; An enum describing the unit of usage measurement. Possible values include: 'UsageUnitCount'
3214	Unit UsageUnit `json:"unit,omitempty"`
3215	// CurrentValue - READ-ONLY; The current usage of the resource.
3216	CurrentValue *int64 `json:"currentValue,omitempty"`
3217	// Limit - READ-ONLY; The maximum permitted usage of the resource.
3218	Limit *int64 `json:"limit,omitempty"`
3219	// Name - READ-ONLY; The name of the type of usage.
3220	Name *UsageName `json:"name,omitempty"`
3221}
3222
3223// MarshalJSON is the custom marshaler for Usage.
3224func (u Usage) MarshalJSON() ([]byte, error) {
3225	objectMap := make(map[string]interface{})
3226	return json.Marshal(objectMap)
3227}
3228
3229// UsageName the Usage Names.
3230type UsageName struct {
3231	// Value - READ-ONLY; The name of the resource.
3232	Value *string `json:"value,omitempty"`
3233	// LocalizedValue - READ-ONLY; The localized name of the resource.
3234	LocalizedValue *string `json:"localizedValue,omitempty"`
3235}
3236
3237// MarshalJSON is the custom marshaler for UsageName.
3238func (un UsageName) MarshalJSON() ([]byte, error) {
3239	objectMap := make(map[string]interface{})
3240	return json.Marshal(objectMap)
3241}
3242
3243// UserAccountCredentials settings for user account that gets created on each on the nodes of a compute.
3244type UserAccountCredentials struct {
3245	// AdminUserName - Name of the administrator user account which can be used to SSH to nodes.
3246	AdminUserName *string `json:"adminUserName,omitempty"`
3247	// AdminUserSSHPublicKey - SSH public key of the administrator user account.
3248	AdminUserSSHPublicKey *string `json:"adminUserSshPublicKey,omitempty"`
3249	// AdminUserPassword - Password of the administrator user account.
3250	AdminUserPassword *string `json:"adminUserPassword,omitempty"`
3251}
3252
3253// VirtualMachine a Machine Learning compute based on Azure Virtual Machines.
3254type VirtualMachine struct {
3255	Properties *VirtualMachineProperties `json:"properties,omitempty"`
3256	// ComputeLocation - Location for the underlying compute
3257	ComputeLocation *string `json:"computeLocation,omitempty"`
3258	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
3259	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3260	// Description - The description of the Machine Learning compute.
3261	Description *string `json:"description,omitempty"`
3262	// CreatedOn - READ-ONLY; The date and time when the compute was created.
3263	CreatedOn *date.Time `json:"createdOn,omitempty"`
3264	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
3265	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
3266	// ResourceID - ARM resource id of the underlying compute
3267	ResourceID *string `json:"resourceId,omitempty"`
3268	// ProvisioningErrors - READ-ONLY; Errors during provisioning
3269	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
3270	// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
3271	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
3272	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
3273	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
3274}
3275
3276// MarshalJSON is the custom marshaler for VirtualMachine.
3277func (VM VirtualMachine) MarshalJSON() ([]byte, error) {
3278	VM.ComputeType = ComputeTypeVirtualMachine1
3279	objectMap := make(map[string]interface{})
3280	if VM.Properties != nil {
3281		objectMap["properties"] = VM.Properties
3282	}
3283	if VM.ComputeLocation != nil {
3284		objectMap["computeLocation"] = VM.ComputeLocation
3285	}
3286	if VM.Description != nil {
3287		objectMap["description"] = VM.Description
3288	}
3289	if VM.ResourceID != nil {
3290		objectMap["resourceId"] = VM.ResourceID
3291	}
3292	if VM.ComputeType != "" {
3293		objectMap["computeType"] = VM.ComputeType
3294	}
3295	return json.Marshal(objectMap)
3296}
3297
3298// AsAKS is the BasicCompute implementation for VirtualMachine.
3299func (VM VirtualMachine) AsAKS() (*AKS, bool) {
3300	return nil, false
3301}
3302
3303// AsAmlCompute is the BasicCompute implementation for VirtualMachine.
3304func (VM VirtualMachine) AsAmlCompute() (*AmlCompute, bool) {
3305	return nil, false
3306}
3307
3308// AsVirtualMachine is the BasicCompute implementation for VirtualMachine.
3309func (VM VirtualMachine) AsVirtualMachine() (*VirtualMachine, bool) {
3310	return &VM, true
3311}
3312
3313// AsHDInsight is the BasicCompute implementation for VirtualMachine.
3314func (VM VirtualMachine) AsHDInsight() (*HDInsight, bool) {
3315	return nil, false
3316}
3317
3318// AsDataFactory is the BasicCompute implementation for VirtualMachine.
3319func (VM VirtualMachine) AsDataFactory() (*DataFactory, bool) {
3320	return nil, false
3321}
3322
3323// AsDatabricks is the BasicCompute implementation for VirtualMachine.
3324func (VM VirtualMachine) AsDatabricks() (*Databricks, bool) {
3325	return nil, false
3326}
3327
3328// AsDataLakeAnalytics is the BasicCompute implementation for VirtualMachine.
3329func (VM VirtualMachine) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
3330	return nil, false
3331}
3332
3333// AsCompute is the BasicCompute implementation for VirtualMachine.
3334func (VM VirtualMachine) AsCompute() (*Compute, bool) {
3335	return nil, false
3336}
3337
3338// AsBasicCompute is the BasicCompute implementation for VirtualMachine.
3339func (VM VirtualMachine) AsBasicCompute() (BasicCompute, bool) {
3340	return &VM, true
3341}
3342
3343// VirtualMachineProperties ...
3344type VirtualMachineProperties struct {
3345	// VirtualMachineSize - Virtual Machine size
3346	VirtualMachineSize *string `json:"virtualMachineSize,omitempty"`
3347	// SSHPort - Port open for ssh connections.
3348	SSHPort *int32 `json:"sshPort,omitempty"`
3349	// Address - Public IP address of the virtual machine.
3350	Address *string `json:"address,omitempty"`
3351	// AdministratorAccount - Admin credentials for virtual machine
3352	AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
3353}
3354
3355// VirtualMachineSecrets secrets related to a Machine Learning compute based on AKS.
3356type VirtualMachineSecrets struct {
3357	// AdministratorAccount - Admin credentials for virtual machine.
3358	AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
3359	// ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
3360	ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
3361}
3362
3363// MarshalJSON is the custom marshaler for VirtualMachineSecrets.
3364func (vms VirtualMachineSecrets) MarshalJSON() ([]byte, error) {
3365	vms.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine
3366	objectMap := make(map[string]interface{})
3367	if vms.AdministratorAccount != nil {
3368		objectMap["administratorAccount"] = vms.AdministratorAccount
3369	}
3370	if vms.ComputeType != "" {
3371		objectMap["computeType"] = vms.ComputeType
3372	}
3373	return json.Marshal(objectMap)
3374}
3375
3376// AsAksComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
3377func (vms VirtualMachineSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
3378	return nil, false
3379}
3380
3381// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
3382func (vms VirtualMachineSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
3383	return &vms, true
3384}
3385
3386// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
3387func (vms VirtualMachineSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
3388	return nil, false
3389}
3390
3391// AsComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
3392func (vms VirtualMachineSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
3393	return nil, false
3394}
3395
3396// AsBasicComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
3397func (vms VirtualMachineSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
3398	return &vms, true
3399}
3400
3401// VirtualMachineSize describes the properties of a VM size.
3402type VirtualMachineSize struct {
3403	// Name - READ-ONLY; The name of the virtual machine size.
3404	Name *string `json:"name,omitempty"`
3405	// Family - READ-ONLY; The family name of the virtual machine size.
3406	Family *string `json:"family,omitempty"`
3407	// VCPUs - READ-ONLY; The number of vCPUs supported by the virtual machine size.
3408	VCPUs *int32 `json:"vCPUs,omitempty"`
3409	// Gpus - READ-ONLY; The number of gPUs supported by the virtual machine size.
3410	Gpus *int32 `json:"gpus,omitempty"`
3411	// OsVhdSizeMB - READ-ONLY; The OS VHD disk size, in MB, allowed by the virtual machine size.
3412	OsVhdSizeMB *int32 `json:"osVhdSizeMB,omitempty"`
3413	// MaxResourceVolumeMB - READ-ONLY; The resource volume size, in MB, allowed by the virtual machine size.
3414	MaxResourceVolumeMB *int32 `json:"maxResourceVolumeMB,omitempty"`
3415	// MemoryGB - READ-ONLY; The amount of memory, in GB, supported by the virtual machine size.
3416	MemoryGB *float64 `json:"memoryGB,omitempty"`
3417	// LowPriorityCapable - READ-ONLY; Specifies if the virtual machine size supports low priority VMs.
3418	LowPriorityCapable *bool `json:"lowPriorityCapable,omitempty"`
3419	// PremiumIO - READ-ONLY; Specifies if the virtual machine size supports premium IO.
3420	PremiumIO *bool `json:"premiumIO,omitempty"`
3421}
3422
3423// MarshalJSON is the custom marshaler for VirtualMachineSize.
3424func (vms VirtualMachineSize) MarshalJSON() ([]byte, error) {
3425	objectMap := make(map[string]interface{})
3426	return json.Marshal(objectMap)
3427}
3428
3429// VirtualMachineSizeListResult the List Virtual Machine size operation response.
3430type VirtualMachineSizeListResult struct {
3431	autorest.Response `json:"-"`
3432	// AmlCompute - The list of virtual machine sizes supported by AmlCompute.
3433	AmlCompute *[]VirtualMachineSize `json:"amlCompute,omitempty"`
3434}
3435
3436// VirtualMachineSSHCredentials admin credentials for virtual machine
3437type VirtualMachineSSHCredentials struct {
3438	// Username - Username of admin account
3439	Username *string `json:"username,omitempty"`
3440	// Password - Password of admin account
3441	Password *string `json:"password,omitempty"`
3442	// PublicKeyData - Public key data
3443	PublicKeyData *string `json:"publicKeyData,omitempty"`
3444	// PrivateKeyData - Private key data
3445	PrivateKeyData *string `json:"privateKeyData,omitempty"`
3446}
3447
3448// Workspace an object that represents a machine learning workspace.
3449type Workspace struct {
3450	autorest.Response `json:"-"`
3451	// WorkspaceProperties - The properties of the machine learning workspace.
3452	*WorkspaceProperties `json:"properties,omitempty"`
3453	// ID - READ-ONLY; Specifies the resource ID.
3454	ID *string `json:"id,omitempty"`
3455	// Name - READ-ONLY; Specifies the name of the resource.
3456	Name *string `json:"name,omitempty"`
3457	// Identity - The identity of the resource.
3458	Identity *Identity `json:"identity,omitempty"`
3459	// Location - Specifies the location of the resource.
3460	Location *string `json:"location,omitempty"`
3461	// Type - READ-ONLY; Specifies the type of the resource.
3462	Type *string `json:"type,omitempty"`
3463	// Tags - Contains resource tags defined as key/value pairs.
3464	Tags map[string]*string `json:"tags"`
3465	// Sku - The sku of the workspace.
3466	Sku *Sku `json:"sku,omitempty"`
3467}
3468
3469// MarshalJSON is the custom marshaler for Workspace.
3470func (w Workspace) MarshalJSON() ([]byte, error) {
3471	objectMap := make(map[string]interface{})
3472	if w.WorkspaceProperties != nil {
3473		objectMap["properties"] = w.WorkspaceProperties
3474	}
3475	if w.Identity != nil {
3476		objectMap["identity"] = w.Identity
3477	}
3478	if w.Location != nil {
3479		objectMap["location"] = w.Location
3480	}
3481	if w.Tags != nil {
3482		objectMap["tags"] = w.Tags
3483	}
3484	if w.Sku != nil {
3485		objectMap["sku"] = w.Sku
3486	}
3487	return json.Marshal(objectMap)
3488}
3489
3490// UnmarshalJSON is the custom unmarshaler for Workspace struct.
3491func (w *Workspace) UnmarshalJSON(body []byte) error {
3492	var m map[string]*json.RawMessage
3493	err := json.Unmarshal(body, &m)
3494	if err != nil {
3495		return err
3496	}
3497	for k, v := range m {
3498		switch k {
3499		case "properties":
3500			if v != nil {
3501				var workspaceProperties WorkspaceProperties
3502				err = json.Unmarshal(*v, &workspaceProperties)
3503				if err != nil {
3504					return err
3505				}
3506				w.WorkspaceProperties = &workspaceProperties
3507			}
3508		case "id":
3509			if v != nil {
3510				var ID string
3511				err = json.Unmarshal(*v, &ID)
3512				if err != nil {
3513					return err
3514				}
3515				w.ID = &ID
3516			}
3517		case "name":
3518			if v != nil {
3519				var name string
3520				err = json.Unmarshal(*v, &name)
3521				if err != nil {
3522					return err
3523				}
3524				w.Name = &name
3525			}
3526		case "identity":
3527			if v != nil {
3528				var identity Identity
3529				err = json.Unmarshal(*v, &identity)
3530				if err != nil {
3531					return err
3532				}
3533				w.Identity = &identity
3534			}
3535		case "location":
3536			if v != nil {
3537				var location string
3538				err = json.Unmarshal(*v, &location)
3539				if err != nil {
3540					return err
3541				}
3542				w.Location = &location
3543			}
3544		case "type":
3545			if v != nil {
3546				var typeVar string
3547				err = json.Unmarshal(*v, &typeVar)
3548				if err != nil {
3549					return err
3550				}
3551				w.Type = &typeVar
3552			}
3553		case "tags":
3554			if v != nil {
3555				var tags map[string]*string
3556				err = json.Unmarshal(*v, &tags)
3557				if err != nil {
3558					return err
3559				}
3560				w.Tags = tags
3561			}
3562		case "sku":
3563			if v != nil {
3564				var sku Sku
3565				err = json.Unmarshal(*v, &sku)
3566				if err != nil {
3567					return err
3568				}
3569				w.Sku = &sku
3570			}
3571		}
3572	}
3573
3574	return nil
3575}
3576
3577// WorkspaceListResult the result of a request to list machine learning workspaces.
3578type WorkspaceListResult struct {
3579	autorest.Response `json:"-"`
3580	// Value - The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to request the next list of machine learning workspaces.
3581	Value *[]Workspace `json:"value,omitempty"`
3582	// NextLink - The URI that can be used to request the next list of machine learning workspaces.
3583	NextLink *string `json:"nextLink,omitempty"`
3584}
3585
3586// WorkspaceListResultIterator provides access to a complete listing of Workspace values.
3587type WorkspaceListResultIterator struct {
3588	i    int
3589	page WorkspaceListResultPage
3590}
3591
3592// NextWithContext advances to the next value.  If there was an error making
3593// the request the iterator does not advance and the error is returned.
3594func (iter *WorkspaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
3595	if tracing.IsEnabled() {
3596		ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceListResultIterator.NextWithContext")
3597		defer func() {
3598			sc := -1
3599			if iter.Response().Response.Response != nil {
3600				sc = iter.Response().Response.Response.StatusCode
3601			}
3602			tracing.EndSpan(ctx, sc, err)
3603		}()
3604	}
3605	iter.i++
3606	if iter.i < len(iter.page.Values()) {
3607		return nil
3608	}
3609	err = iter.page.NextWithContext(ctx)
3610	if err != nil {
3611		iter.i--
3612		return err
3613	}
3614	iter.i = 0
3615	return nil
3616}
3617
3618// Next advances to the next value.  If there was an error making
3619// the request the iterator does not advance and the error is returned.
3620// Deprecated: Use NextWithContext() instead.
3621func (iter *WorkspaceListResultIterator) Next() error {
3622	return iter.NextWithContext(context.Background())
3623}
3624
3625// NotDone returns true if the enumeration should be started or is not yet complete.
3626func (iter WorkspaceListResultIterator) NotDone() bool {
3627	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3628}
3629
3630// Response returns the raw server response from the last page request.
3631func (iter WorkspaceListResultIterator) Response() WorkspaceListResult {
3632	return iter.page.Response()
3633}
3634
3635// Value returns the current value or a zero-initialized value if the
3636// iterator has advanced beyond the end of the collection.
3637func (iter WorkspaceListResultIterator) Value() Workspace {
3638	if !iter.page.NotDone() {
3639		return Workspace{}
3640	}
3641	return iter.page.Values()[iter.i]
3642}
3643
3644// Creates a new instance of the WorkspaceListResultIterator type.
3645func NewWorkspaceListResultIterator(page WorkspaceListResultPage) WorkspaceListResultIterator {
3646	return WorkspaceListResultIterator{page: page}
3647}
3648
3649// IsEmpty returns true if the ListResult contains no values.
3650func (wlr WorkspaceListResult) IsEmpty() bool {
3651	return wlr.Value == nil || len(*wlr.Value) == 0
3652}
3653
3654// hasNextLink returns true if the NextLink is not empty.
3655func (wlr WorkspaceListResult) hasNextLink() bool {
3656	return wlr.NextLink != nil && len(*wlr.NextLink) != 0
3657}
3658
3659// workspaceListResultPreparer prepares a request to retrieve the next set of results.
3660// It returns nil if no more results exist.
3661func (wlr WorkspaceListResult) workspaceListResultPreparer(ctx context.Context) (*http.Request, error) {
3662	if !wlr.hasNextLink() {
3663		return nil, nil
3664	}
3665	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3666		autorest.AsJSON(),
3667		autorest.AsGet(),
3668		autorest.WithBaseURL(to.String(wlr.NextLink)))
3669}
3670
3671// WorkspaceListResultPage contains a page of Workspace values.
3672type WorkspaceListResultPage struct {
3673	fn  func(context.Context, WorkspaceListResult) (WorkspaceListResult, error)
3674	wlr WorkspaceListResult
3675}
3676
3677// NextWithContext advances to the next page of values.  If there was an error making
3678// the request the page does not advance and the error is returned.
3679func (page *WorkspaceListResultPage) NextWithContext(ctx context.Context) (err error) {
3680	if tracing.IsEnabled() {
3681		ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceListResultPage.NextWithContext")
3682		defer func() {
3683			sc := -1
3684			if page.Response().Response.Response != nil {
3685				sc = page.Response().Response.Response.StatusCode
3686			}
3687			tracing.EndSpan(ctx, sc, err)
3688		}()
3689	}
3690	for {
3691		next, err := page.fn(ctx, page.wlr)
3692		if err != nil {
3693			return err
3694		}
3695		page.wlr = next
3696		if !next.hasNextLink() || !next.IsEmpty() {
3697			break
3698		}
3699	}
3700	return nil
3701}
3702
3703// Next advances to the next page of values.  If there was an error making
3704// the request the page does not advance and the error is returned.
3705// Deprecated: Use NextWithContext() instead.
3706func (page *WorkspaceListResultPage) Next() error {
3707	return page.NextWithContext(context.Background())
3708}
3709
3710// NotDone returns true if the page enumeration should be started or is not yet complete.
3711func (page WorkspaceListResultPage) NotDone() bool {
3712	return !page.wlr.IsEmpty()
3713}
3714
3715// Response returns the raw server response from the last page request.
3716func (page WorkspaceListResultPage) Response() WorkspaceListResult {
3717	return page.wlr
3718}
3719
3720// Values returns the slice of values for the current page or nil if there are no values.
3721func (page WorkspaceListResultPage) Values() []Workspace {
3722	if page.wlr.IsEmpty() {
3723		return nil
3724	}
3725	return *page.wlr.Value
3726}
3727
3728// Creates a new instance of the WorkspaceListResultPage type.
3729func NewWorkspaceListResultPage(cur WorkspaceListResult, getNextPage func(context.Context, WorkspaceListResult) (WorkspaceListResult, error)) WorkspaceListResultPage {
3730	return WorkspaceListResultPage{
3731		fn:  getNextPage,
3732		wlr: cur,
3733	}
3734}
3735
3736// WorkspaceProperties the properties of a machine learning workspace.
3737type WorkspaceProperties struct {
3738	// WorkspaceID - READ-ONLY; The immutable id associated with this workspace.
3739	WorkspaceID *string `json:"workspaceId,omitempty"`
3740	// Description - The description of this workspace.
3741	Description *string `json:"description,omitempty"`
3742	// FriendlyName - The friendly name for this workspace. This name in mutable
3743	FriendlyName *string `json:"friendlyName,omitempty"`
3744	// CreationTime - READ-ONLY; The creation time of the machine learning workspace in ISO8601 format.
3745	CreationTime *date.Time `json:"creationTime,omitempty"`
3746	// KeyVault - ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created
3747	KeyVault *string `json:"keyVault,omitempty"`
3748	// ApplicationInsights - ARM id of the application insights associated with this workspace. This cannot be changed once the workspace has been created
3749	ApplicationInsights *string `json:"applicationInsights,omitempty"`
3750	// ContainerRegistry - ARM id of the container registry associated with this workspace. This cannot be changed once the workspace has been created
3751	ContainerRegistry *string `json:"containerRegistry,omitempty"`
3752	// StorageAccount - ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created
3753	StorageAccount *string `json:"storageAccount,omitempty"`
3754	// DiscoveryURL - Url for the discovery service to identify regional endpoints for machine learning experimentation services
3755	DiscoveryURL *string `json:"discoveryUrl,omitempty"`
3756	// ProvisioningState - READ-ONLY; The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
3757	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3758	// Encryption - The encryption settings of Azure ML workspace.
3759	Encryption *EncryptionProperty `json:"encryption,omitempty"`
3760	// HbiWorkspace - The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service
3761	HbiWorkspace *bool `json:"hbiWorkspace,omitempty"`
3762	// ServiceProvisionedResourceGroup - READ-ONLY; The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace
3763	ServiceProvisionedResourceGroup *string `json:"serviceProvisionedResourceGroup,omitempty"`
3764	// PrivateLinkCount - READ-ONLY; Count of private connections in the workspace
3765	PrivateLinkCount *int32 `json:"privateLinkCount,omitempty"`
3766	// ImageBuildCompute - The compute name for image build
3767	ImageBuildCompute *string `json:"imageBuildCompute,omitempty"`
3768	// AllowPublicAccessWhenBehindVnet - The flag to indicate whether to allow public access when behind VNet.
3769	AllowPublicAccessWhenBehindVnet *bool `json:"allowPublicAccessWhenBehindVnet,omitempty"`
3770	// PrivateEndpointConnections - READ-ONLY; The list of private endpoint connections in the workspace.
3771	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
3772	// SharedPrivateLinkResources - The list of shared private link resources in this workspace.
3773	SharedPrivateLinkResources *[]SharedPrivateLinkResource `json:"sharedPrivateLinkResources,omitempty"`
3774	// NotebookInfo - READ-ONLY; The notebook info of Azure ML workspace.
3775	NotebookInfo *NotebookResourceInfo `json:"notebookInfo,omitempty"`
3776}
3777
3778// MarshalJSON is the custom marshaler for WorkspaceProperties.
3779func (wp WorkspaceProperties) MarshalJSON() ([]byte, error) {
3780	objectMap := make(map[string]interface{})
3781	if wp.Description != nil {
3782		objectMap["description"] = wp.Description
3783	}
3784	if wp.FriendlyName != nil {
3785		objectMap["friendlyName"] = wp.FriendlyName
3786	}
3787	if wp.KeyVault != nil {
3788		objectMap["keyVault"] = wp.KeyVault
3789	}
3790	if wp.ApplicationInsights != nil {
3791		objectMap["applicationInsights"] = wp.ApplicationInsights
3792	}
3793	if wp.ContainerRegistry != nil {
3794		objectMap["containerRegistry"] = wp.ContainerRegistry
3795	}
3796	if wp.StorageAccount != nil {
3797		objectMap["storageAccount"] = wp.StorageAccount
3798	}
3799	if wp.DiscoveryURL != nil {
3800		objectMap["discoveryUrl"] = wp.DiscoveryURL
3801	}
3802	if wp.Encryption != nil {
3803		objectMap["encryption"] = wp.Encryption
3804	}
3805	if wp.HbiWorkspace != nil {
3806		objectMap["hbiWorkspace"] = wp.HbiWorkspace
3807	}
3808	if wp.ImageBuildCompute != nil {
3809		objectMap["imageBuildCompute"] = wp.ImageBuildCompute
3810	}
3811	if wp.AllowPublicAccessWhenBehindVnet != nil {
3812		objectMap["allowPublicAccessWhenBehindVnet"] = wp.AllowPublicAccessWhenBehindVnet
3813	}
3814	if wp.SharedPrivateLinkResources != nil {
3815		objectMap["sharedPrivateLinkResources"] = wp.SharedPrivateLinkResources
3816	}
3817	return json.Marshal(objectMap)
3818}
3819
3820// WorkspacePropertiesUpdateParameters the parameters for updating the properties of a machine learning
3821// workspace.
3822type WorkspacePropertiesUpdateParameters struct {
3823	// Description - The description of this workspace.
3824	Description *string `json:"description,omitempty"`
3825	// FriendlyName - The friendly name for this workspace.
3826	FriendlyName *string `json:"friendlyName,omitempty"`
3827}
3828
3829// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3830// long-running operation.
3831type WorkspacesCreateOrUpdateFuture struct {
3832	azure.FutureAPI
3833	// Result returns the result of the asynchronous operation.
3834	// If the operation has not completed it will return an error.
3835	Result func(WorkspacesClient) (Workspace, error)
3836}
3837
3838// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3839func (future *WorkspacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3840	var azFuture azure.Future
3841	if err := json.Unmarshal(body, &azFuture); err != nil {
3842		return err
3843	}
3844	future.FutureAPI = &azFuture
3845	future.Result = future.result
3846	return nil
3847}
3848
3849// result is the default implementation for WorkspacesCreateOrUpdateFuture.Result.
3850func (future *WorkspacesCreateOrUpdateFuture) result(client WorkspacesClient) (w Workspace, err error) {
3851	var done bool
3852	done, err = future.DoneWithContext(context.Background(), client)
3853	if err != nil {
3854		err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3855		return
3856	}
3857	if !done {
3858		w.Response.Response = future.Response()
3859		err = azure.NewAsyncOpIncompleteError("machinelearningservices.WorkspacesCreateOrUpdateFuture")
3860		return
3861	}
3862	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3863	if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent {
3864		w, err = client.CreateOrUpdateResponder(w.Response.Response)
3865		if err != nil {
3866			err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", w.Response.Response, "Failure responding to request")
3867		}
3868	}
3869	return
3870}
3871
3872// WorkspacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
3873// operation.
3874type WorkspacesDeleteFuture struct {
3875	azure.FutureAPI
3876	// Result returns the result of the asynchronous operation.
3877	// If the operation has not completed it will return an error.
3878	Result func(WorkspacesClient) (autorest.Response, error)
3879}
3880
3881// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3882func (future *WorkspacesDeleteFuture) UnmarshalJSON(body []byte) error {
3883	var azFuture azure.Future
3884	if err := json.Unmarshal(body, &azFuture); err != nil {
3885		return err
3886	}
3887	future.FutureAPI = &azFuture
3888	future.Result = future.result
3889	return nil
3890}
3891
3892// result is the default implementation for WorkspacesDeleteFuture.Result.
3893func (future *WorkspacesDeleteFuture) result(client WorkspacesClient) (ar autorest.Response, err error) {
3894	var done bool
3895	done, err = future.DoneWithContext(context.Background(), client)
3896	if err != nil {
3897		err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesDeleteFuture", "Result", future.Response(), "Polling failure")
3898		return
3899	}
3900	if !done {
3901		ar.Response = future.Response()
3902		err = azure.NewAsyncOpIncompleteError("machinelearningservices.WorkspacesDeleteFuture")
3903		return
3904	}
3905	ar.Response = future.Response()
3906	return
3907}
3908
3909// WorkspaceSku describes Workspace Sku details and features
3910type WorkspaceSku struct {
3911	// Locations - READ-ONLY; The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.).
3912	Locations *[]string `json:"locations,omitempty"`
3913	// LocationInfo - READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
3914	LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"`
3915	// Tier - READ-ONLY; Sku Tier like Basic or Enterprise
3916	Tier *string `json:"tier,omitempty"`
3917	// ResourceType - READ-ONLY
3918	ResourceType *string `json:"resourceType,omitempty"`
3919	// Name - READ-ONLY
3920	Name *string `json:"name,omitempty"`
3921	// Capabilities - READ-ONLY; List of features/user capabilities associated with the sku
3922	Capabilities *[]SKUCapability `json:"capabilities,omitempty"`
3923	// Restrictions - The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
3924	Restrictions *[]Restriction `json:"restrictions,omitempty"`
3925}
3926
3927// MarshalJSON is the custom marshaler for WorkspaceSku.
3928func (ws WorkspaceSku) MarshalJSON() ([]byte, error) {
3929	objectMap := make(map[string]interface{})
3930	if ws.Restrictions != nil {
3931		objectMap["restrictions"] = ws.Restrictions
3932	}
3933	return json.Marshal(objectMap)
3934}
3935
3936// WorkspaceUpdateParameters the parameters for updating a machine learning workspace.
3937type WorkspaceUpdateParameters struct {
3938	// Tags - The resource tags for the machine learning workspace.
3939	Tags map[string]*string `json:"tags"`
3940	// Sku - The sku of the workspace.
3941	Sku *Sku `json:"sku,omitempty"`
3942	// WorkspacePropertiesUpdateParameters - The properties that the machine learning workspace will be updated with.
3943	*WorkspacePropertiesUpdateParameters `json:"properties,omitempty"`
3944}
3945
3946// MarshalJSON is the custom marshaler for WorkspaceUpdateParameters.
3947func (wup WorkspaceUpdateParameters) MarshalJSON() ([]byte, error) {
3948	objectMap := make(map[string]interface{})
3949	if wup.Tags != nil {
3950		objectMap["tags"] = wup.Tags
3951	}
3952	if wup.Sku != nil {
3953		objectMap["sku"] = wup.Sku
3954	}
3955	if wup.WorkspacePropertiesUpdateParameters != nil {
3956		objectMap["properties"] = wup.WorkspacePropertiesUpdateParameters
3957	}
3958	return json.Marshal(objectMap)
3959}
3960
3961// UnmarshalJSON is the custom unmarshaler for WorkspaceUpdateParameters struct.
3962func (wup *WorkspaceUpdateParameters) UnmarshalJSON(body []byte) error {
3963	var m map[string]*json.RawMessage
3964	err := json.Unmarshal(body, &m)
3965	if err != nil {
3966		return err
3967	}
3968	for k, v := range m {
3969		switch k {
3970		case "tags":
3971			if v != nil {
3972				var tags map[string]*string
3973				err = json.Unmarshal(*v, &tags)
3974				if err != nil {
3975					return err
3976				}
3977				wup.Tags = tags
3978			}
3979		case "sku":
3980			if v != nil {
3981				var sku Sku
3982				err = json.Unmarshal(*v, &sku)
3983				if err != nil {
3984					return err
3985				}
3986				wup.Sku = &sku
3987			}
3988		case "properties":
3989			if v != nil {
3990				var workspacePropertiesUpdateParameters WorkspacePropertiesUpdateParameters
3991				err = json.Unmarshal(*v, &workspacePropertiesUpdateParameters)
3992				if err != nil {
3993					return err
3994				}
3995				wup.WorkspacePropertiesUpdateParameters = &workspacePropertiesUpdateParameters
3996			}
3997		}
3998	}
3999
4000	return nil
4001}
4002