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