1package machinelearningservices
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"context"
22	"encoding/json"
23	"github.com/Azure/go-autorest/autorest"
24	"github.com/Azure/go-autorest/autorest/azure"
25	"github.com/Azure/go-autorest/autorest/date"
26	"github.com/Azure/go-autorest/autorest/to"
27	"github.com/Azure/go-autorest/tracing"
28	"net/http"
29)
30
31// The package's fully qualified name.
32const fqdn = "github.com/Azure/azure-sdk-for-go/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices"
33
34// AKS a Machine Learning compute based on AKS.
35type AKS struct {
36	// Properties - AKS properties
37	Properties *AKSProperties `json:"properties,omitempty"`
38	// ComputeLocation - Location for the underlying compute
39	ComputeLocation *string `json:"computeLocation,omitempty"`
40	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
41	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
42	// Description - The description of the Machine Learning compute.
43	Description *string `json:"description,omitempty"`
44	// CreatedOn - READ-ONLY; The date and time when the compute was created.
45	CreatedOn *date.Time `json:"createdOn,omitempty"`
46	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
47	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
48	// ResourceID - ARM resource id of the underlying compute
49	ResourceID *string `json:"resourceId,omitempty"`
50	// ProvisioningErrors - READ-ONLY; Errors during provisioning
51	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
52	// 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.
53	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
54	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
55	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
56}
57
58// MarshalJSON is the custom marshaler for AKS.
59func (a AKS) MarshalJSON() ([]byte, error) {
60	a.ComputeType = ComputeTypeAKS1
61	objectMap := make(map[string]interface{})
62	if a.Properties != nil {
63		objectMap["properties"] = a.Properties
64	}
65	if a.ComputeLocation != nil {
66		objectMap["computeLocation"] = a.ComputeLocation
67	}
68	if a.Description != nil {
69		objectMap["description"] = a.Description
70	}
71	if a.ResourceID != nil {
72		objectMap["resourceId"] = a.ResourceID
73	}
74	if a.ComputeType != "" {
75		objectMap["computeType"] = a.ComputeType
76	}
77	return json.Marshal(objectMap)
78}
79
80// AsAKS is the BasicCompute implementation for AKS.
81func (a AKS) AsAKS() (*AKS, bool) {
82	return &a, true
83}
84
85// AsAmlCompute is the BasicCompute implementation for AKS.
86func (a AKS) AsAmlCompute() (*AmlCompute, bool) {
87	return nil, false
88}
89
90// AsVirtualMachine is the BasicCompute implementation for AKS.
91func (a AKS) AsVirtualMachine() (*VirtualMachine, bool) {
92	return nil, false
93}
94
95// AsHDInsight is the BasicCompute implementation for AKS.
96func (a AKS) AsHDInsight() (*HDInsight, bool) {
97	return nil, false
98}
99
100// AsDataFactory is the BasicCompute implementation for AKS.
101func (a AKS) AsDataFactory() (*DataFactory, bool) {
102	return nil, false
103}
104
105// AsDatabricks is the BasicCompute implementation for AKS.
106func (a AKS) AsDatabricks() (*Databricks, bool) {
107	return nil, false
108}
109
110// AsDataLakeAnalytics is the BasicCompute implementation for AKS.
111func (a AKS) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
112	return nil, false
113}
114
115// AsCompute is the BasicCompute implementation for AKS.
116func (a AKS) AsCompute() (*Compute, bool) {
117	return nil, false
118}
119
120// AsBasicCompute is the BasicCompute implementation for AKS.
121func (a AKS) AsBasicCompute() (BasicCompute, bool) {
122	return &a, true
123}
124
125// AksComputeSecrets secrets related to a Machine Learning compute based on AKS.
126type AksComputeSecrets struct {
127	// UserKubeConfig - Content of kubeconfig file that can be used to connect to the Kubernetes cluster.
128	UserKubeConfig *string `json:"userKubeConfig,omitempty"`
129	// AdminKubeConfig - Content of kubeconfig file that can be used to connect to the Kubernetes cluster.
130	AdminKubeConfig *string `json:"adminKubeConfig,omitempty"`
131	// ImagePullSecretName - Image registry pull secret.
132	ImagePullSecretName *string `json:"imagePullSecretName,omitempty"`
133	// ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
134	ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
135}
136
137// MarshalJSON is the custom marshaler for AksComputeSecrets.
138func (acs AksComputeSecrets) MarshalJSON() ([]byte, error) {
139	acs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeAKS
140	objectMap := make(map[string]interface{})
141	if acs.UserKubeConfig != nil {
142		objectMap["userKubeConfig"] = acs.UserKubeConfig
143	}
144	if acs.AdminKubeConfig != nil {
145		objectMap["adminKubeConfig"] = acs.AdminKubeConfig
146	}
147	if acs.ImagePullSecretName != nil {
148		objectMap["imagePullSecretName"] = acs.ImagePullSecretName
149	}
150	if acs.ComputeType != "" {
151		objectMap["computeType"] = acs.ComputeType
152	}
153	return json.Marshal(objectMap)
154}
155
156// AsAksComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
157func (acs AksComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
158	return &acs, true
159}
160
161// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
162func (acs AksComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
163	return nil, false
164}
165
166// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
167func (acs AksComputeSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
168	return nil, false
169}
170
171// AsComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
172func (acs AksComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
173	return nil, false
174}
175
176// AsBasicComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
177func (acs AksComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
178	return &acs, true
179}
180
181// AksNetworkingConfiguration advance configuration for AKS networking
182type AksNetworkingConfiguration struct {
183	// SubnetID - Virtual network subnet resource ID the compute nodes belong to
184	SubnetID *string `json:"subnetId,omitempty"`
185	// ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.
186	ServiceCidr *string `json:"serviceCidr,omitempty"`
187	// DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.
188	DNSServiceIP *string `json:"dnsServiceIP,omitempty"`
189	// 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.
190	DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"`
191}
192
193// AKSProperties AKS properties
194type AKSProperties struct {
195	// ClusterFqdn - Cluster full qualified domain name
196	ClusterFqdn *string `json:"clusterFqdn,omitempty"`
197	// SystemServices - READ-ONLY; System services
198	SystemServices *[]SystemService `json:"systemServices,omitempty"`
199	// AgentCount - Number of agents
200	AgentCount *int32 `json:"agentCount,omitempty"`
201	// AgentVMSize - Agent virtual machine size
202	AgentVMSize *string `json:"agentVMSize,omitempty"`
203	// SslConfiguration - SSL configuration
204	SslConfiguration *SslConfiguration `json:"sslConfiguration,omitempty"`
205	// AksNetworkingConfiguration - AKS networking configuration for vnet
206	AksNetworkingConfiguration *AksNetworkingConfiguration `json:"aksNetworkingConfiguration,omitempty"`
207}
208
209// MarshalJSON is the custom marshaler for AKSProperties.
210func (a AKSProperties) MarshalJSON() ([]byte, error) {
211	objectMap := make(map[string]interface{})
212	if a.ClusterFqdn != nil {
213		objectMap["clusterFqdn"] = a.ClusterFqdn
214	}
215	if a.AgentCount != nil {
216		objectMap["agentCount"] = a.AgentCount
217	}
218	if a.AgentVMSize != nil {
219		objectMap["agentVMSize"] = a.AgentVMSize
220	}
221	if a.SslConfiguration != nil {
222		objectMap["sslConfiguration"] = a.SslConfiguration
223	}
224	if a.AksNetworkingConfiguration != nil {
225		objectMap["aksNetworkingConfiguration"] = a.AksNetworkingConfiguration
226	}
227	return json.Marshal(objectMap)
228}
229
230// AmlCompute an Azure Machine Learning compute.
231type AmlCompute struct {
232	// Properties - AML Compute properties
233	Properties *AmlComputeProperties `json:"properties,omitempty"`
234	// ComputeLocation - Location for the underlying compute
235	ComputeLocation *string `json:"computeLocation,omitempty"`
236	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
237	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
238	// Description - The description of the Machine Learning compute.
239	Description *string `json:"description,omitempty"`
240	// CreatedOn - READ-ONLY; The date and time when the compute was created.
241	CreatedOn *date.Time `json:"createdOn,omitempty"`
242	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
243	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
244	// ResourceID - ARM resource id of the underlying compute
245	ResourceID *string `json:"resourceId,omitempty"`
246	// ProvisioningErrors - READ-ONLY; Errors during provisioning
247	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
248	// 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.
249	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
250	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
251	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
252}
253
254// MarshalJSON is the custom marshaler for AmlCompute.
255func (ac AmlCompute) MarshalJSON() ([]byte, error) {
256	ac.ComputeType = ComputeTypeAmlCompute1
257	objectMap := make(map[string]interface{})
258	if ac.Properties != nil {
259		objectMap["properties"] = ac.Properties
260	}
261	if ac.ComputeLocation != nil {
262		objectMap["computeLocation"] = ac.ComputeLocation
263	}
264	if ac.Description != nil {
265		objectMap["description"] = ac.Description
266	}
267	if ac.ResourceID != nil {
268		objectMap["resourceId"] = ac.ResourceID
269	}
270	if ac.ComputeType != "" {
271		objectMap["computeType"] = ac.ComputeType
272	}
273	return json.Marshal(objectMap)
274}
275
276// AsAKS is the BasicCompute implementation for AmlCompute.
277func (ac AmlCompute) AsAKS() (*AKS, bool) {
278	return nil, false
279}
280
281// AsAmlCompute is the BasicCompute implementation for AmlCompute.
282func (ac AmlCompute) AsAmlCompute() (*AmlCompute, bool) {
283	return &ac, true
284}
285
286// AsVirtualMachine is the BasicCompute implementation for AmlCompute.
287func (ac AmlCompute) AsVirtualMachine() (*VirtualMachine, bool) {
288	return nil, false
289}
290
291// AsHDInsight is the BasicCompute implementation for AmlCompute.
292func (ac AmlCompute) AsHDInsight() (*HDInsight, bool) {
293	return nil, false
294}
295
296// AsDataFactory is the BasicCompute implementation for AmlCompute.
297func (ac AmlCompute) AsDataFactory() (*DataFactory, bool) {
298	return nil, false
299}
300
301// AsDatabricks is the BasicCompute implementation for AmlCompute.
302func (ac AmlCompute) AsDatabricks() (*Databricks, bool) {
303	return nil, false
304}
305
306// AsDataLakeAnalytics is the BasicCompute implementation for AmlCompute.
307func (ac AmlCompute) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
308	return nil, false
309}
310
311// AsCompute is the BasicCompute implementation for AmlCompute.
312func (ac AmlCompute) AsCompute() (*Compute, bool) {
313	return nil, false
314}
315
316// AsBasicCompute is the BasicCompute implementation for AmlCompute.
317func (ac AmlCompute) AsBasicCompute() (BasicCompute, bool) {
318	return &ac, true
319}
320
321// AmlComputeNodeInformation compute node information related to a AmlCompute.
322type AmlComputeNodeInformation struct {
323	// NodeID - READ-ONLY; ID of the compute node.
324	NodeID *string `json:"nodeId,omitempty"`
325	// PrivateIPAddress - READ-ONLY; Private IP address of the compute node.
326	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
327	// PublicIPAddress - READ-ONLY; Public IP address of the compute node.
328	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
329	// Port - READ-ONLY; SSH port number of the node.
330	Port *float64 `json:"port,omitempty"`
331	// NodeState - READ-ONLY; State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. Possible values include: 'Idle', 'Running', 'Preparing', 'Unusable', 'Leaving', 'Preempted'
332	NodeState NodeState `json:"nodeState,omitempty"`
333	// RunID - READ-ONLY; ID of the Experiment running on the node, if any else null.
334	RunID *string `json:"runId,omitempty"`
335}
336
337// AmlComputeNodesInformation compute node information related to a AmlCompute.
338type AmlComputeNodesInformation struct {
339	autorest.Response `json:"-"`
340	// Nodes - READ-ONLY; The collection of returned AmlCompute nodes details.
341	Nodes *[]AmlComputeNodeInformation `json:"nodes,omitempty"`
342	// NextLink - READ-ONLY; The continuation token.
343	NextLink *string `json:"nextLink,omitempty"`
344	// ComputeType - Possible values include: 'ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation', 'ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute'
345	ComputeType ComputeTypeBasicComputeNodesInformation `json:"computeType,omitempty"`
346}
347
348// MarshalJSON is the custom marshaler for AmlComputeNodesInformation.
349func (acni AmlComputeNodesInformation) MarshalJSON() ([]byte, error) {
350	acni.ComputeType = ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute
351	objectMap := make(map[string]interface{})
352	if acni.ComputeType != "" {
353		objectMap["computeType"] = acni.ComputeType
354	}
355	return json.Marshal(objectMap)
356}
357
358// AsAmlComputeNodesInformation is the BasicComputeNodesInformation implementation for AmlComputeNodesInformation.
359func (acni AmlComputeNodesInformation) AsAmlComputeNodesInformation() (*AmlComputeNodesInformation, bool) {
360	return &acni, true
361}
362
363// AsComputeNodesInformation is the BasicComputeNodesInformation implementation for AmlComputeNodesInformation.
364func (acni AmlComputeNodesInformation) AsComputeNodesInformation() (*ComputeNodesInformation, bool) {
365	return nil, false
366}
367
368// AsBasicComputeNodesInformation is the BasicComputeNodesInformation implementation for AmlComputeNodesInformation.
369func (acni AmlComputeNodesInformation) AsBasicComputeNodesInformation() (BasicComputeNodesInformation, bool) {
370	return &acni, true
371}
372
373// AmlComputeProperties AML Compute properties
374type AmlComputeProperties struct {
375	// VMSize - Virtual Machine Size
376	VMSize *string `json:"vmSize,omitempty"`
377	// VMPriority - Virtual Machine priority. Possible values include: 'Dedicated', 'LowPriority'
378	VMPriority VMPriority `json:"vmPriority,omitempty"`
379	// ScaleSettings - Scale settings for AML Compute
380	ScaleSettings *ScaleSettings `json:"scaleSettings,omitempty"`
381	// UserAccountCredentials - Credentials for an administrator user account that will be created on each compute node.
382	UserAccountCredentials *UserAccountCredentials `json:"userAccountCredentials,omitempty"`
383	// Subnet - Virtual network subnet resource ID the compute nodes belong to.
384	Subnet *ResourceID `json:"subnet,omitempty"`
385	// RemoteLoginPortPublicAccess - State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. Possible values include: 'Enabled', 'Disabled', 'NotSpecified'
386	RemoteLoginPortPublicAccess RemoteLoginPortPublicAccess `json:"remoteLoginPortPublicAccess,omitempty"`
387	// AllocationState - READ-ONLY; Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. Possible values include: 'Steady', 'Resizing'
388	AllocationState AllocationState `json:"allocationState,omitempty"`
389	// AllocationStateTransitionTime - READ-ONLY; The time at which the compute entered its current allocation state.
390	AllocationStateTransitionTime *date.Time `json:"allocationStateTransitionTime,omitempty"`
391	// Errors - READ-ONLY; Collection of errors encountered by various compute nodes during node setup.
392	Errors *[]Error `json:"errors,omitempty"`
393	// CurrentNodeCount - READ-ONLY; The number of compute nodes currently assigned to the compute.
394	CurrentNodeCount *int32 `json:"currentNodeCount,omitempty"`
395	// TargetNodeCount - READ-ONLY; The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation.
396	TargetNodeCount *int32 `json:"targetNodeCount,omitempty"`
397	// NodeStateCounts - READ-ONLY; Counts of various node states on the compute.
398	NodeStateCounts *NodeStateCounts `json:"nodeStateCounts,omitempty"`
399}
400
401// MarshalJSON is the custom marshaler for AmlComputeProperties.
402func (ac AmlComputeProperties) MarshalJSON() ([]byte, error) {
403	objectMap := make(map[string]interface{})
404	if ac.VMSize != nil {
405		objectMap["vmSize"] = ac.VMSize
406	}
407	if ac.VMPriority != "" {
408		objectMap["vmPriority"] = ac.VMPriority
409	}
410	if ac.ScaleSettings != nil {
411		objectMap["scaleSettings"] = ac.ScaleSettings
412	}
413	if ac.UserAccountCredentials != nil {
414		objectMap["userAccountCredentials"] = ac.UserAccountCredentials
415	}
416	if ac.Subnet != nil {
417		objectMap["subnet"] = ac.Subnet
418	}
419	if ac.RemoteLoginPortPublicAccess != "" {
420		objectMap["remoteLoginPortPublicAccess"] = ac.RemoteLoginPortPublicAccess
421	}
422	return json.Marshal(objectMap)
423}
424
425// ClusterUpdateParameters amlCompute update parameters.
426type ClusterUpdateParameters struct {
427	// ClusterUpdateProperties - The properties of the amlCompute.
428	*ClusterUpdateProperties `json:"properties,omitempty"`
429}
430
431// MarshalJSON is the custom marshaler for ClusterUpdateParameters.
432func (cup ClusterUpdateParameters) MarshalJSON() ([]byte, error) {
433	objectMap := make(map[string]interface{})
434	if cup.ClusterUpdateProperties != nil {
435		objectMap["properties"] = cup.ClusterUpdateProperties
436	}
437	return json.Marshal(objectMap)
438}
439
440// UnmarshalJSON is the custom unmarshaler for ClusterUpdateParameters struct.
441func (cup *ClusterUpdateParameters) UnmarshalJSON(body []byte) error {
442	var m map[string]*json.RawMessage
443	err := json.Unmarshal(body, &m)
444	if err != nil {
445		return err
446	}
447	for k, v := range m {
448		switch k {
449		case "properties":
450			if v != nil {
451				var clusterUpdateProperties ClusterUpdateProperties
452				err = json.Unmarshal(*v, &clusterUpdateProperties)
453				if err != nil {
454					return err
455				}
456				cup.ClusterUpdateProperties = &clusterUpdateProperties
457			}
458		}
459	}
460
461	return nil
462}
463
464// ClusterUpdateProperties the properties of a amlCompute that need to be updated.
465type ClusterUpdateProperties struct {
466	// ScaleSettings - Desired scale settings for the amlCompute.
467	ScaleSettings *ScaleSettings `json:"scaleSettings,omitempty"`
468}
469
470// BasicCompute machine Learning compute object.
471type BasicCompute interface {
472	AsAKS() (*AKS, bool)
473	AsAmlCompute() (*AmlCompute, bool)
474	AsVirtualMachine() (*VirtualMachine, bool)
475	AsHDInsight() (*HDInsight, bool)
476	AsDataFactory() (*DataFactory, bool)
477	AsDatabricks() (*Databricks, bool)
478	AsDataLakeAnalytics() (*DataLakeAnalytics, bool)
479	AsCompute() (*Compute, bool)
480}
481
482// Compute machine Learning compute object.
483type Compute struct {
484	// ComputeLocation - Location for the underlying compute
485	ComputeLocation *string `json:"computeLocation,omitempty"`
486	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
487	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
488	// Description - The description of the Machine Learning compute.
489	Description *string `json:"description,omitempty"`
490	// CreatedOn - READ-ONLY; The date and time when the compute was created.
491	CreatedOn *date.Time `json:"createdOn,omitempty"`
492	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
493	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
494	// ResourceID - ARM resource id of the underlying compute
495	ResourceID *string `json:"resourceId,omitempty"`
496	// ProvisioningErrors - READ-ONLY; Errors during provisioning
497	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
498	// 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.
499	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
500	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
501	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
502}
503
504func unmarshalBasicCompute(body []byte) (BasicCompute, error) {
505	var m map[string]interface{}
506	err := json.Unmarshal(body, &m)
507	if err != nil {
508		return nil, err
509	}
510
511	switch m["computeType"] {
512	case string(ComputeTypeAKS1):
513		var a AKS
514		err := json.Unmarshal(body, &a)
515		return a, err
516	case string(ComputeTypeAmlCompute1):
517		var ac AmlCompute
518		err := json.Unmarshal(body, &ac)
519		return ac, err
520	case string(ComputeTypeVirtualMachine1):
521		var VM VirtualMachine
522		err := json.Unmarshal(body, &VM)
523		return VM, err
524	case string(ComputeTypeHDInsight1):
525		var hi HDInsight
526		err := json.Unmarshal(body, &hi)
527		return hi, err
528	case string(ComputeTypeDataFactory1):
529		var df DataFactory
530		err := json.Unmarshal(body, &df)
531		return df, err
532	case string(ComputeTypeDatabricks1):
533		var d Databricks
534		err := json.Unmarshal(body, &d)
535		return d, err
536	case string(ComputeTypeDataLakeAnalytics1):
537		var dla DataLakeAnalytics
538		err := json.Unmarshal(body, &dla)
539		return dla, err
540	default:
541		var c Compute
542		err := json.Unmarshal(body, &c)
543		return c, err
544	}
545}
546func unmarshalBasicComputeArray(body []byte) ([]BasicCompute, error) {
547	var rawMessages []*json.RawMessage
548	err := json.Unmarshal(body, &rawMessages)
549	if err != nil {
550		return nil, err
551	}
552
553	cArray := make([]BasicCompute, len(rawMessages))
554
555	for index, rawMessage := range rawMessages {
556		c, err := unmarshalBasicCompute(*rawMessage)
557		if err != nil {
558			return nil, err
559		}
560		cArray[index] = c
561	}
562	return cArray, nil
563}
564
565// MarshalJSON is the custom marshaler for Compute.
566func (c Compute) MarshalJSON() ([]byte, error) {
567	c.ComputeType = ComputeTypeCompute
568	objectMap := make(map[string]interface{})
569	if c.ComputeLocation != nil {
570		objectMap["computeLocation"] = c.ComputeLocation
571	}
572	if c.Description != nil {
573		objectMap["description"] = c.Description
574	}
575	if c.ResourceID != nil {
576		objectMap["resourceId"] = c.ResourceID
577	}
578	if c.ComputeType != "" {
579		objectMap["computeType"] = c.ComputeType
580	}
581	return json.Marshal(objectMap)
582}
583
584// AsAKS is the BasicCompute implementation for Compute.
585func (c Compute) AsAKS() (*AKS, bool) {
586	return nil, false
587}
588
589// AsAmlCompute is the BasicCompute implementation for Compute.
590func (c Compute) AsAmlCompute() (*AmlCompute, bool) {
591	return nil, false
592}
593
594// AsVirtualMachine is the BasicCompute implementation for Compute.
595func (c Compute) AsVirtualMachine() (*VirtualMachine, bool) {
596	return nil, false
597}
598
599// AsHDInsight is the BasicCompute implementation for Compute.
600func (c Compute) AsHDInsight() (*HDInsight, bool) {
601	return nil, false
602}
603
604// AsDataFactory is the BasicCompute implementation for Compute.
605func (c Compute) AsDataFactory() (*DataFactory, bool) {
606	return nil, false
607}
608
609// AsDatabricks is the BasicCompute implementation for Compute.
610func (c Compute) AsDatabricks() (*Databricks, bool) {
611	return nil, false
612}
613
614// AsDataLakeAnalytics is the BasicCompute implementation for Compute.
615func (c Compute) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
616	return nil, false
617}
618
619// AsCompute is the BasicCompute implementation for Compute.
620func (c Compute) AsCompute() (*Compute, bool) {
621	return &c, true
622}
623
624// AsBasicCompute is the BasicCompute implementation for Compute.
625func (c Compute) AsBasicCompute() (BasicCompute, bool) {
626	return &c, true
627}
628
629// BasicComputeNodesInformation compute nodes information related to a Machine Learning compute. Might differ for every
630// type of compute.
631type BasicComputeNodesInformation interface {
632	AsAmlComputeNodesInformation() (*AmlComputeNodesInformation, bool)
633	AsComputeNodesInformation() (*ComputeNodesInformation, bool)
634}
635
636// ComputeNodesInformation compute nodes information related to a Machine Learning compute. Might differ for
637// every type of compute.
638type ComputeNodesInformation struct {
639	// NextLink - READ-ONLY; The continuation token.
640	NextLink *string `json:"nextLink,omitempty"`
641	// ComputeType - Possible values include: 'ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation', 'ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute'
642	ComputeType ComputeTypeBasicComputeNodesInformation `json:"computeType,omitempty"`
643}
644
645func unmarshalBasicComputeNodesInformation(body []byte) (BasicComputeNodesInformation, error) {
646	var m map[string]interface{}
647	err := json.Unmarshal(body, &m)
648	if err != nil {
649		return nil, err
650	}
651
652	switch m["computeType"] {
653	case string(ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute):
654		var acni AmlComputeNodesInformation
655		err := json.Unmarshal(body, &acni)
656		return acni, err
657	default:
658		var cni ComputeNodesInformation
659		err := json.Unmarshal(body, &cni)
660		return cni, err
661	}
662}
663func unmarshalBasicComputeNodesInformationArray(body []byte) ([]BasicComputeNodesInformation, error) {
664	var rawMessages []*json.RawMessage
665	err := json.Unmarshal(body, &rawMessages)
666	if err != nil {
667		return nil, err
668	}
669
670	cniArray := make([]BasicComputeNodesInformation, len(rawMessages))
671
672	for index, rawMessage := range rawMessages {
673		cni, err := unmarshalBasicComputeNodesInformation(*rawMessage)
674		if err != nil {
675			return nil, err
676		}
677		cniArray[index] = cni
678	}
679	return cniArray, nil
680}
681
682// MarshalJSON is the custom marshaler for ComputeNodesInformation.
683func (cni ComputeNodesInformation) MarshalJSON() ([]byte, error) {
684	cni.ComputeType = ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation
685	objectMap := make(map[string]interface{})
686	if cni.ComputeType != "" {
687		objectMap["computeType"] = cni.ComputeType
688	}
689	return json.Marshal(objectMap)
690}
691
692// AsAmlComputeNodesInformation is the BasicComputeNodesInformation implementation for ComputeNodesInformation.
693func (cni ComputeNodesInformation) AsAmlComputeNodesInformation() (*AmlComputeNodesInformation, bool) {
694	return nil, false
695}
696
697// AsComputeNodesInformation is the BasicComputeNodesInformation implementation for ComputeNodesInformation.
698func (cni ComputeNodesInformation) AsComputeNodesInformation() (*ComputeNodesInformation, bool) {
699	return &cni, true
700}
701
702// AsBasicComputeNodesInformation is the BasicComputeNodesInformation implementation for ComputeNodesInformation.
703func (cni ComputeNodesInformation) AsBasicComputeNodesInformation() (BasicComputeNodesInformation, bool) {
704	return &cni, true
705}
706
707// ComputeResource machine Learning compute object wrapped into ARM resource envelope.
708type ComputeResource struct {
709	autorest.Response `json:"-"`
710	// Properties - Compute properties
711	Properties BasicCompute `json:"properties,omitempty"`
712	// ID - READ-ONLY; Specifies the resource ID.
713	ID *string `json:"id,omitempty"`
714	// Name - READ-ONLY; Specifies the name of the resource.
715	Name *string `json:"name,omitempty"`
716	// Identity - The identity of the resource.
717	Identity *Identity `json:"identity,omitempty"`
718	// Location - Specifies the location of the resource.
719	Location *string `json:"location,omitempty"`
720	// Type - READ-ONLY; Specifies the type of the resource.
721	Type *string `json:"type,omitempty"`
722	// Tags - Contains resource tags defined as key/value pairs.
723	Tags map[string]*string `json:"tags"`
724}
725
726// MarshalJSON is the custom marshaler for ComputeResource.
727func (cr ComputeResource) MarshalJSON() ([]byte, error) {
728	objectMap := make(map[string]interface{})
729	objectMap["properties"] = cr.Properties
730	if cr.Identity != nil {
731		objectMap["identity"] = cr.Identity
732	}
733	if cr.Location != nil {
734		objectMap["location"] = cr.Location
735	}
736	if cr.Tags != nil {
737		objectMap["tags"] = cr.Tags
738	}
739	return json.Marshal(objectMap)
740}
741
742// UnmarshalJSON is the custom unmarshaler for ComputeResource struct.
743func (cr *ComputeResource) UnmarshalJSON(body []byte) error {
744	var m map[string]*json.RawMessage
745	err := json.Unmarshal(body, &m)
746	if err != nil {
747		return err
748	}
749	for k, v := range m {
750		switch k {
751		case "properties":
752			if v != nil {
753				properties, err := unmarshalBasicCompute(*v)
754				if err != nil {
755					return err
756				}
757				cr.Properties = properties
758			}
759		case "id":
760			if v != nil {
761				var ID string
762				err = json.Unmarshal(*v, &ID)
763				if err != nil {
764					return err
765				}
766				cr.ID = &ID
767			}
768		case "name":
769			if v != nil {
770				var name string
771				err = json.Unmarshal(*v, &name)
772				if err != nil {
773					return err
774				}
775				cr.Name = &name
776			}
777		case "identity":
778			if v != nil {
779				var identity Identity
780				err = json.Unmarshal(*v, &identity)
781				if err != nil {
782					return err
783				}
784				cr.Identity = &identity
785			}
786		case "location":
787			if v != nil {
788				var location string
789				err = json.Unmarshal(*v, &location)
790				if err != nil {
791					return err
792				}
793				cr.Location = &location
794			}
795		case "type":
796			if v != nil {
797				var typeVar string
798				err = json.Unmarshal(*v, &typeVar)
799				if err != nil {
800					return err
801				}
802				cr.Type = &typeVar
803			}
804		case "tags":
805			if v != nil {
806				var tags map[string]*string
807				err = json.Unmarshal(*v, &tags)
808				if err != nil {
809					return err
810				}
811				cr.Tags = tags
812			}
813		}
814	}
815
816	return nil
817}
818
819// BasicComputeSecrets secrets related to a Machine Learning compute. Might differ for every type of compute.
820type BasicComputeSecrets interface {
821	AsAksComputeSecrets() (*AksComputeSecrets, bool)
822	AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool)
823	AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool)
824	AsComputeSecrets() (*ComputeSecrets, bool)
825}
826
827// ComputeSecrets secrets related to a Machine Learning compute. Might differ for every type of compute.
828type ComputeSecrets struct {
829	autorest.Response `json:"-"`
830	// ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
831	ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
832}
833
834func unmarshalBasicComputeSecrets(body []byte) (BasicComputeSecrets, error) {
835	var m map[string]interface{}
836	err := json.Unmarshal(body, &m)
837	if err != nil {
838		return nil, err
839	}
840
841	switch m["computeType"] {
842	case string(ComputeTypeBasicComputeSecretsComputeTypeAKS):
843		var acs AksComputeSecrets
844		err := json.Unmarshal(body, &acs)
845		return acs, err
846	case string(ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine):
847		var vms VirtualMachineSecrets
848		err := json.Unmarshal(body, &vms)
849		return vms, err
850	case string(ComputeTypeBasicComputeSecretsComputeTypeDatabricks):
851		var dcs DatabricksComputeSecrets
852		err := json.Unmarshal(body, &dcs)
853		return dcs, err
854	default:
855		var cs ComputeSecrets
856		err := json.Unmarshal(body, &cs)
857		return cs, err
858	}
859}
860func unmarshalBasicComputeSecretsArray(body []byte) ([]BasicComputeSecrets, error) {
861	var rawMessages []*json.RawMessage
862	err := json.Unmarshal(body, &rawMessages)
863	if err != nil {
864		return nil, err
865	}
866
867	csArray := make([]BasicComputeSecrets, len(rawMessages))
868
869	for index, rawMessage := range rawMessages {
870		cs, err := unmarshalBasicComputeSecrets(*rawMessage)
871		if err != nil {
872			return nil, err
873		}
874		csArray[index] = cs
875	}
876	return csArray, nil
877}
878
879// MarshalJSON is the custom marshaler for ComputeSecrets.
880func (cs ComputeSecrets) MarshalJSON() ([]byte, error) {
881	cs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets
882	objectMap := make(map[string]interface{})
883	if cs.ComputeType != "" {
884		objectMap["computeType"] = cs.ComputeType
885	}
886	return json.Marshal(objectMap)
887}
888
889// AsAksComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
890func (cs ComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
891	return nil, false
892}
893
894// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
895func (cs ComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
896	return nil, false
897}
898
899// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
900func (cs ComputeSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
901	return nil, false
902}
903
904// AsComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
905func (cs ComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
906	return &cs, true
907}
908
909// AsBasicComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
910func (cs ComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
911	return &cs, true
912}
913
914// ComputeSecretsModel ...
915type ComputeSecretsModel struct {
916	autorest.Response `json:"-"`
917	Value             BasicComputeSecrets `json:"value,omitempty"`
918}
919
920// UnmarshalJSON is the custom unmarshaler for ComputeSecretsModel struct.
921func (csm *ComputeSecretsModel) UnmarshalJSON(body []byte) error {
922	cs, err := unmarshalBasicComputeSecrets(body)
923	if err != nil {
924		return err
925	}
926	csm.Value = cs
927
928	return nil
929}
930
931// Databricks a DataFactory compute.
932type Databricks struct {
933	Properties *DatabricksProperties `json:"properties,omitempty"`
934	// ComputeLocation - Location for the underlying compute
935	ComputeLocation *string `json:"computeLocation,omitempty"`
936	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
937	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
938	// Description - The description of the Machine Learning compute.
939	Description *string `json:"description,omitempty"`
940	// CreatedOn - READ-ONLY; The date and time when the compute was created.
941	CreatedOn *date.Time `json:"createdOn,omitempty"`
942	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
943	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
944	// ResourceID - ARM resource id of the underlying compute
945	ResourceID *string `json:"resourceId,omitempty"`
946	// ProvisioningErrors - READ-ONLY; Errors during provisioning
947	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
948	// 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.
949	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
950	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
951	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
952}
953
954// MarshalJSON is the custom marshaler for Databricks.
955func (d Databricks) MarshalJSON() ([]byte, error) {
956	d.ComputeType = ComputeTypeDatabricks1
957	objectMap := make(map[string]interface{})
958	if d.Properties != nil {
959		objectMap["properties"] = d.Properties
960	}
961	if d.ComputeLocation != nil {
962		objectMap["computeLocation"] = d.ComputeLocation
963	}
964	if d.Description != nil {
965		objectMap["description"] = d.Description
966	}
967	if d.ResourceID != nil {
968		objectMap["resourceId"] = d.ResourceID
969	}
970	if d.ComputeType != "" {
971		objectMap["computeType"] = d.ComputeType
972	}
973	return json.Marshal(objectMap)
974}
975
976// AsAKS is the BasicCompute implementation for Databricks.
977func (d Databricks) AsAKS() (*AKS, bool) {
978	return nil, false
979}
980
981// AsAmlCompute is the BasicCompute implementation for Databricks.
982func (d Databricks) AsAmlCompute() (*AmlCompute, bool) {
983	return nil, false
984}
985
986// AsVirtualMachine is the BasicCompute implementation for Databricks.
987func (d Databricks) AsVirtualMachine() (*VirtualMachine, bool) {
988	return nil, false
989}
990
991// AsHDInsight is the BasicCompute implementation for Databricks.
992func (d Databricks) AsHDInsight() (*HDInsight, bool) {
993	return nil, false
994}
995
996// AsDataFactory is the BasicCompute implementation for Databricks.
997func (d Databricks) AsDataFactory() (*DataFactory, bool) {
998	return nil, false
999}
1000
1001// AsDatabricks is the BasicCompute implementation for Databricks.
1002func (d Databricks) AsDatabricks() (*Databricks, bool) {
1003	return &d, true
1004}
1005
1006// AsDataLakeAnalytics is the BasicCompute implementation for Databricks.
1007func (d Databricks) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
1008	return nil, false
1009}
1010
1011// AsCompute is the BasicCompute implementation for Databricks.
1012func (d Databricks) AsCompute() (*Compute, bool) {
1013	return nil, false
1014}
1015
1016// AsBasicCompute is the BasicCompute implementation for Databricks.
1017func (d Databricks) AsBasicCompute() (BasicCompute, bool) {
1018	return &d, true
1019}
1020
1021// DatabricksComputeSecrets secrets related to a Machine Learning compute based on Databricks.
1022type DatabricksComputeSecrets struct {
1023	// DatabricksAccessToken - access token for databricks account.
1024	DatabricksAccessToken *string `json:"databricksAccessToken,omitempty"`
1025	// ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
1026	ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
1027}
1028
1029// MarshalJSON is the custom marshaler for DatabricksComputeSecrets.
1030func (dcs DatabricksComputeSecrets) MarshalJSON() ([]byte, error) {
1031	dcs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeDatabricks
1032	objectMap := make(map[string]interface{})
1033	if dcs.DatabricksAccessToken != nil {
1034		objectMap["databricksAccessToken"] = dcs.DatabricksAccessToken
1035	}
1036	if dcs.ComputeType != "" {
1037		objectMap["computeType"] = dcs.ComputeType
1038	}
1039	return json.Marshal(objectMap)
1040}
1041
1042// AsAksComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
1043func (dcs DatabricksComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
1044	return nil, false
1045}
1046
1047// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
1048func (dcs DatabricksComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
1049	return nil, false
1050}
1051
1052// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
1053func (dcs DatabricksComputeSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
1054	return &dcs, true
1055}
1056
1057// AsComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
1058func (dcs DatabricksComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
1059	return nil, false
1060}
1061
1062// AsBasicComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
1063func (dcs DatabricksComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
1064	return &dcs, true
1065}
1066
1067// DatabricksProperties ...
1068type DatabricksProperties struct {
1069	// DatabricksAccessToken - Databricks access token
1070	DatabricksAccessToken *string `json:"databricksAccessToken,omitempty"`
1071}
1072
1073// DataFactory a DataFactory compute.
1074type DataFactory struct {
1075	// ComputeLocation - Location for the underlying compute
1076	ComputeLocation *string `json:"computeLocation,omitempty"`
1077	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
1078	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1079	// Description - The description of the Machine Learning compute.
1080	Description *string `json:"description,omitempty"`
1081	// CreatedOn - READ-ONLY; The date and time when the compute was created.
1082	CreatedOn *date.Time `json:"createdOn,omitempty"`
1083	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
1084	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
1085	// ResourceID - ARM resource id of the underlying compute
1086	ResourceID *string `json:"resourceId,omitempty"`
1087	// ProvisioningErrors - READ-ONLY; Errors during provisioning
1088	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
1089	// 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.
1090	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
1091	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
1092	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
1093}
1094
1095// MarshalJSON is the custom marshaler for DataFactory.
1096func (df DataFactory) MarshalJSON() ([]byte, error) {
1097	df.ComputeType = ComputeTypeDataFactory1
1098	objectMap := make(map[string]interface{})
1099	if df.ComputeLocation != nil {
1100		objectMap["computeLocation"] = df.ComputeLocation
1101	}
1102	if df.Description != nil {
1103		objectMap["description"] = df.Description
1104	}
1105	if df.ResourceID != nil {
1106		objectMap["resourceId"] = df.ResourceID
1107	}
1108	if df.ComputeType != "" {
1109		objectMap["computeType"] = df.ComputeType
1110	}
1111	return json.Marshal(objectMap)
1112}
1113
1114// AsAKS is the BasicCompute implementation for DataFactory.
1115func (df DataFactory) AsAKS() (*AKS, bool) {
1116	return nil, false
1117}
1118
1119// AsAmlCompute is the BasicCompute implementation for DataFactory.
1120func (df DataFactory) AsAmlCompute() (*AmlCompute, bool) {
1121	return nil, false
1122}
1123
1124// AsVirtualMachine is the BasicCompute implementation for DataFactory.
1125func (df DataFactory) AsVirtualMachine() (*VirtualMachine, bool) {
1126	return nil, false
1127}
1128
1129// AsHDInsight is the BasicCompute implementation for DataFactory.
1130func (df DataFactory) AsHDInsight() (*HDInsight, bool) {
1131	return nil, false
1132}
1133
1134// AsDataFactory is the BasicCompute implementation for DataFactory.
1135func (df DataFactory) AsDataFactory() (*DataFactory, bool) {
1136	return &df, true
1137}
1138
1139// AsDatabricks is the BasicCompute implementation for DataFactory.
1140func (df DataFactory) AsDatabricks() (*Databricks, bool) {
1141	return nil, false
1142}
1143
1144// AsDataLakeAnalytics is the BasicCompute implementation for DataFactory.
1145func (df DataFactory) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
1146	return nil, false
1147}
1148
1149// AsCompute is the BasicCompute implementation for DataFactory.
1150func (df DataFactory) AsCompute() (*Compute, bool) {
1151	return nil, false
1152}
1153
1154// AsBasicCompute is the BasicCompute implementation for DataFactory.
1155func (df DataFactory) AsBasicCompute() (BasicCompute, bool) {
1156	return &df, true
1157}
1158
1159// DataLakeAnalytics a DataLakeAnalytics compute.
1160type DataLakeAnalytics struct {
1161	Properties *DataLakeAnalyticsProperties `json:"properties,omitempty"`
1162	// ComputeLocation - Location for the underlying compute
1163	ComputeLocation *string `json:"computeLocation,omitempty"`
1164	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
1165	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1166	// Description - The description of the Machine Learning compute.
1167	Description *string `json:"description,omitempty"`
1168	// CreatedOn - READ-ONLY; The date and time when the compute was created.
1169	CreatedOn *date.Time `json:"createdOn,omitempty"`
1170	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
1171	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
1172	// ResourceID - ARM resource id of the underlying compute
1173	ResourceID *string `json:"resourceId,omitempty"`
1174	// ProvisioningErrors - READ-ONLY; Errors during provisioning
1175	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
1176	// 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.
1177	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
1178	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
1179	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
1180}
1181
1182// MarshalJSON is the custom marshaler for DataLakeAnalytics.
1183func (dla DataLakeAnalytics) MarshalJSON() ([]byte, error) {
1184	dla.ComputeType = ComputeTypeDataLakeAnalytics1
1185	objectMap := make(map[string]interface{})
1186	if dla.Properties != nil {
1187		objectMap["properties"] = dla.Properties
1188	}
1189	if dla.ComputeLocation != nil {
1190		objectMap["computeLocation"] = dla.ComputeLocation
1191	}
1192	if dla.Description != nil {
1193		objectMap["description"] = dla.Description
1194	}
1195	if dla.ResourceID != nil {
1196		objectMap["resourceId"] = dla.ResourceID
1197	}
1198	if dla.ComputeType != "" {
1199		objectMap["computeType"] = dla.ComputeType
1200	}
1201	return json.Marshal(objectMap)
1202}
1203
1204// AsAKS is the BasicCompute implementation for DataLakeAnalytics.
1205func (dla DataLakeAnalytics) AsAKS() (*AKS, bool) {
1206	return nil, false
1207}
1208
1209// AsAmlCompute is the BasicCompute implementation for DataLakeAnalytics.
1210func (dla DataLakeAnalytics) AsAmlCompute() (*AmlCompute, bool) {
1211	return nil, false
1212}
1213
1214// AsVirtualMachine is the BasicCompute implementation for DataLakeAnalytics.
1215func (dla DataLakeAnalytics) AsVirtualMachine() (*VirtualMachine, bool) {
1216	return nil, false
1217}
1218
1219// AsHDInsight is the BasicCompute implementation for DataLakeAnalytics.
1220func (dla DataLakeAnalytics) AsHDInsight() (*HDInsight, bool) {
1221	return nil, false
1222}
1223
1224// AsDataFactory is the BasicCompute implementation for DataLakeAnalytics.
1225func (dla DataLakeAnalytics) AsDataFactory() (*DataFactory, bool) {
1226	return nil, false
1227}
1228
1229// AsDatabricks is the BasicCompute implementation for DataLakeAnalytics.
1230func (dla DataLakeAnalytics) AsDatabricks() (*Databricks, bool) {
1231	return nil, false
1232}
1233
1234// AsDataLakeAnalytics is the BasicCompute implementation for DataLakeAnalytics.
1235func (dla DataLakeAnalytics) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
1236	return &dla, true
1237}
1238
1239// AsCompute is the BasicCompute implementation for DataLakeAnalytics.
1240func (dla DataLakeAnalytics) AsCompute() (*Compute, bool) {
1241	return nil, false
1242}
1243
1244// AsBasicCompute is the BasicCompute implementation for DataLakeAnalytics.
1245func (dla DataLakeAnalytics) AsBasicCompute() (BasicCompute, bool) {
1246	return &dla, true
1247}
1248
1249// DataLakeAnalyticsProperties ...
1250type DataLakeAnalyticsProperties struct {
1251	// DataLakeStoreAccountName - DataLake Store Account Name
1252	DataLakeStoreAccountName *string `json:"dataLakeStoreAccountName,omitempty"`
1253}
1254
1255// Error wrapper for error response to follow ARM guidelines.
1256type Error struct {
1257	// Error - READ-ONLY; The error response.
1258	Error *ErrorResponse `json:"error,omitempty"`
1259}
1260
1261// ErrorDetail error detail information.
1262type ErrorDetail struct {
1263	// Code - Error code.
1264	Code *string `json:"code,omitempty"`
1265	// Message - Error message.
1266	Message *string `json:"message,omitempty"`
1267}
1268
1269// ErrorResponse error response information.
1270type ErrorResponse struct {
1271	// Code - READ-ONLY; Error code.
1272	Code *string `json:"code,omitempty"`
1273	// Message - READ-ONLY; Error message.
1274	Message *string `json:"message,omitempty"`
1275	// Details - READ-ONLY; An array of error detail objects.
1276	Details *[]ErrorDetail `json:"details,omitempty"`
1277}
1278
1279// HDInsight a HDInsight compute.
1280type HDInsight struct {
1281	Properties *HDInsightProperties `json:"properties,omitempty"`
1282	// ComputeLocation - Location for the underlying compute
1283	ComputeLocation *string `json:"computeLocation,omitempty"`
1284	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
1285	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1286	// Description - The description of the Machine Learning compute.
1287	Description *string `json:"description,omitempty"`
1288	// CreatedOn - READ-ONLY; The date and time when the compute was created.
1289	CreatedOn *date.Time `json:"createdOn,omitempty"`
1290	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
1291	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
1292	// ResourceID - ARM resource id of the underlying compute
1293	ResourceID *string `json:"resourceId,omitempty"`
1294	// ProvisioningErrors - READ-ONLY; Errors during provisioning
1295	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
1296	// 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.
1297	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
1298	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
1299	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
1300}
1301
1302// MarshalJSON is the custom marshaler for HDInsight.
1303func (hi HDInsight) MarshalJSON() ([]byte, error) {
1304	hi.ComputeType = ComputeTypeHDInsight1
1305	objectMap := make(map[string]interface{})
1306	if hi.Properties != nil {
1307		objectMap["properties"] = hi.Properties
1308	}
1309	if hi.ComputeLocation != nil {
1310		objectMap["computeLocation"] = hi.ComputeLocation
1311	}
1312	if hi.Description != nil {
1313		objectMap["description"] = hi.Description
1314	}
1315	if hi.ResourceID != nil {
1316		objectMap["resourceId"] = hi.ResourceID
1317	}
1318	if hi.ComputeType != "" {
1319		objectMap["computeType"] = hi.ComputeType
1320	}
1321	return json.Marshal(objectMap)
1322}
1323
1324// AsAKS is the BasicCompute implementation for HDInsight.
1325func (hi HDInsight) AsAKS() (*AKS, bool) {
1326	return nil, false
1327}
1328
1329// AsAmlCompute is the BasicCompute implementation for HDInsight.
1330func (hi HDInsight) AsAmlCompute() (*AmlCompute, bool) {
1331	return nil, false
1332}
1333
1334// AsVirtualMachine is the BasicCompute implementation for HDInsight.
1335func (hi HDInsight) AsVirtualMachine() (*VirtualMachine, bool) {
1336	return nil, false
1337}
1338
1339// AsHDInsight is the BasicCompute implementation for HDInsight.
1340func (hi HDInsight) AsHDInsight() (*HDInsight, bool) {
1341	return &hi, true
1342}
1343
1344// AsDataFactory is the BasicCompute implementation for HDInsight.
1345func (hi HDInsight) AsDataFactory() (*DataFactory, bool) {
1346	return nil, false
1347}
1348
1349// AsDatabricks is the BasicCompute implementation for HDInsight.
1350func (hi HDInsight) AsDatabricks() (*Databricks, bool) {
1351	return nil, false
1352}
1353
1354// AsDataLakeAnalytics is the BasicCompute implementation for HDInsight.
1355func (hi HDInsight) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
1356	return nil, false
1357}
1358
1359// AsCompute is the BasicCompute implementation for HDInsight.
1360func (hi HDInsight) AsCompute() (*Compute, bool) {
1361	return nil, false
1362}
1363
1364// AsBasicCompute is the BasicCompute implementation for HDInsight.
1365func (hi HDInsight) AsBasicCompute() (BasicCompute, bool) {
1366	return &hi, true
1367}
1368
1369// HDInsightProperties ...
1370type HDInsightProperties struct {
1371	// SSHPort - Port open for ssh connections on the master node of the cluster.
1372	SSHPort *int32 `json:"sshPort,omitempty"`
1373	// Address - Public IP address of the master node of the cluster.
1374	Address *string `json:"address,omitempty"`
1375	// AdministratorAccount - Admin credentials for master node of the cluster
1376	AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
1377}
1378
1379// Identity identity for the resource.
1380type Identity struct {
1381	// PrincipalID - READ-ONLY; The principal ID of resource identity.
1382	PrincipalID *string `json:"principalId,omitempty"`
1383	// TenantID - READ-ONLY; The tenant ID of resource.
1384	TenantID *string `json:"tenantId,omitempty"`
1385	// Type - The identity type. Possible values include: 'SystemAssigned'
1386	Type ResourceIdentityType `json:"type,omitempty"`
1387}
1388
1389// MarshalJSON is the custom marshaler for Identity.
1390func (i Identity) MarshalJSON() ([]byte, error) {
1391	objectMap := make(map[string]interface{})
1392	if i.Type != "" {
1393		objectMap["type"] = i.Type
1394	}
1395	return json.Marshal(objectMap)
1396}
1397
1398// ListUsagesResult the List Usages operation response.
1399type ListUsagesResult struct {
1400	autorest.Response `json:"-"`
1401	// Value - READ-ONLY; The list of AML resource usages.
1402	Value *[]Usage `json:"value,omitempty"`
1403	// 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.
1404	NextLink *string `json:"nextLink,omitempty"`
1405}
1406
1407// ListUsagesResultIterator provides access to a complete listing of Usage values.
1408type ListUsagesResultIterator struct {
1409	i    int
1410	page ListUsagesResultPage
1411}
1412
1413// NextWithContext advances to the next value.  If there was an error making
1414// the request the iterator does not advance and the error is returned.
1415func (iter *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) {
1416	if tracing.IsEnabled() {
1417		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.NextWithContext")
1418		defer func() {
1419			sc := -1
1420			if iter.Response().Response.Response != nil {
1421				sc = iter.Response().Response.Response.StatusCode
1422			}
1423			tracing.EndSpan(ctx, sc, err)
1424		}()
1425	}
1426	iter.i++
1427	if iter.i < len(iter.page.Values()) {
1428		return nil
1429	}
1430	err = iter.page.NextWithContext(ctx)
1431	if err != nil {
1432		iter.i--
1433		return err
1434	}
1435	iter.i = 0
1436	return nil
1437}
1438
1439// Next advances to the next value.  If there was an error making
1440// the request the iterator does not advance and the error is returned.
1441// Deprecated: Use NextWithContext() instead.
1442func (iter *ListUsagesResultIterator) Next() error {
1443	return iter.NextWithContext(context.Background())
1444}
1445
1446// NotDone returns true if the enumeration should be started or is not yet complete.
1447func (iter ListUsagesResultIterator) NotDone() bool {
1448	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1449}
1450
1451// Response returns the raw server response from the last page request.
1452func (iter ListUsagesResultIterator) Response() ListUsagesResult {
1453	return iter.page.Response()
1454}
1455
1456// Value returns the current value or a zero-initialized value if the
1457// iterator has advanced beyond the end of the collection.
1458func (iter ListUsagesResultIterator) Value() Usage {
1459	if !iter.page.NotDone() {
1460		return Usage{}
1461	}
1462	return iter.page.Values()[iter.i]
1463}
1464
1465// Creates a new instance of the ListUsagesResultIterator type.
1466func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
1467	return ListUsagesResultIterator{page: page}
1468}
1469
1470// IsEmpty returns true if the ListResult contains no values.
1471func (lur ListUsagesResult) IsEmpty() bool {
1472	return lur.Value == nil || len(*lur.Value) == 0
1473}
1474
1475// hasNextLink returns true if the NextLink is not empty.
1476func (lur ListUsagesResult) hasNextLink() bool {
1477	return lur.NextLink != nil && len(*lur.NextLink) != 0
1478}
1479
1480// listUsagesResultPreparer prepares a request to retrieve the next set of results.
1481// It returns nil if no more results exist.
1482func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) {
1483	if !lur.hasNextLink() {
1484		return nil, nil
1485	}
1486	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1487		autorest.AsJSON(),
1488		autorest.AsGet(),
1489		autorest.WithBaseURL(to.String(lur.NextLink)))
1490}
1491
1492// ListUsagesResultPage contains a page of Usage values.
1493type ListUsagesResultPage struct {
1494	fn  func(context.Context, ListUsagesResult) (ListUsagesResult, error)
1495	lur ListUsagesResult
1496}
1497
1498// NextWithContext advances to the next page of values.  If there was an error making
1499// the request the page does not advance and the error is returned.
1500func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) {
1501	if tracing.IsEnabled() {
1502		ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext")
1503		defer func() {
1504			sc := -1
1505			if page.Response().Response.Response != nil {
1506				sc = page.Response().Response.Response.StatusCode
1507			}
1508			tracing.EndSpan(ctx, sc, err)
1509		}()
1510	}
1511	for {
1512		next, err := page.fn(ctx, page.lur)
1513		if err != nil {
1514			return err
1515		}
1516		page.lur = next
1517		if !next.hasNextLink() || !next.IsEmpty() {
1518			break
1519		}
1520	}
1521	return nil
1522}
1523
1524// Next advances to the next page of values.  If there was an error making
1525// the request the page does not advance and the error is returned.
1526// Deprecated: Use NextWithContext() instead.
1527func (page *ListUsagesResultPage) Next() error {
1528	return page.NextWithContext(context.Background())
1529}
1530
1531// NotDone returns true if the page enumeration should be started or is not yet complete.
1532func (page ListUsagesResultPage) NotDone() bool {
1533	return !page.lur.IsEmpty()
1534}
1535
1536// Response returns the raw server response from the last page request.
1537func (page ListUsagesResultPage) Response() ListUsagesResult {
1538	return page.lur
1539}
1540
1541// Values returns the slice of values for the current page or nil if there are no values.
1542func (page ListUsagesResultPage) Values() []Usage {
1543	if page.lur.IsEmpty() {
1544		return nil
1545	}
1546	return *page.lur.Value
1547}
1548
1549// Creates a new instance of the ListUsagesResultPage type.
1550func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
1551	return ListUsagesResultPage{
1552		fn:  getNextPage,
1553		lur: cur,
1554	}
1555}
1556
1557// ListWorkspaceKeysResult ...
1558type ListWorkspaceKeysResult struct {
1559	autorest.Response `json:"-"`
1560	// UserStorageKey - READ-ONLY
1561	UserStorageKey *string `json:"userStorageKey,omitempty"`
1562	// UserStorageResourceID - READ-ONLY
1563	UserStorageResourceID *string `json:"userStorageResourceId,omitempty"`
1564	// AppInsightsInstrumentationKey - READ-ONLY
1565	AppInsightsInstrumentationKey *string `json:"appInsightsInstrumentationKey,omitempty"`
1566	// ContainerRegistryCredentials - READ-ONLY
1567	ContainerRegistryCredentials *RegistryListCredentialsResult `json:"containerRegistryCredentials,omitempty"`
1568}
1569
1570// ListWorkspaceQuotas the List WorkspaceQuotasByVMFamily operation response.
1571type ListWorkspaceQuotas struct {
1572	autorest.Response `json:"-"`
1573	// Value - READ-ONLY; The list of Workspace Quotas by VM Family
1574	Value *[]ResourceQuota `json:"value,omitempty"`
1575	// 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.
1576	NextLink *string `json:"nextLink,omitempty"`
1577}
1578
1579// ListWorkspaceQuotasIterator provides access to a complete listing of ResourceQuota values.
1580type ListWorkspaceQuotasIterator struct {
1581	i    int
1582	page ListWorkspaceQuotasPage
1583}
1584
1585// NextWithContext advances to the next value.  If there was an error making
1586// the request the iterator does not advance and the error is returned.
1587func (iter *ListWorkspaceQuotasIterator) NextWithContext(ctx context.Context) (err error) {
1588	if tracing.IsEnabled() {
1589		ctx = tracing.StartSpan(ctx, fqdn+"/ListWorkspaceQuotasIterator.NextWithContext")
1590		defer func() {
1591			sc := -1
1592			if iter.Response().Response.Response != nil {
1593				sc = iter.Response().Response.Response.StatusCode
1594			}
1595			tracing.EndSpan(ctx, sc, err)
1596		}()
1597	}
1598	iter.i++
1599	if iter.i < len(iter.page.Values()) {
1600		return nil
1601	}
1602	err = iter.page.NextWithContext(ctx)
1603	if err != nil {
1604		iter.i--
1605		return err
1606	}
1607	iter.i = 0
1608	return nil
1609}
1610
1611// Next advances to the next value.  If there was an error making
1612// the request the iterator does not advance and the error is returned.
1613// Deprecated: Use NextWithContext() instead.
1614func (iter *ListWorkspaceQuotasIterator) Next() error {
1615	return iter.NextWithContext(context.Background())
1616}
1617
1618// NotDone returns true if the enumeration should be started or is not yet complete.
1619func (iter ListWorkspaceQuotasIterator) NotDone() bool {
1620	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1621}
1622
1623// Response returns the raw server response from the last page request.
1624func (iter ListWorkspaceQuotasIterator) Response() ListWorkspaceQuotas {
1625	return iter.page.Response()
1626}
1627
1628// Value returns the current value or a zero-initialized value if the
1629// iterator has advanced beyond the end of the collection.
1630func (iter ListWorkspaceQuotasIterator) Value() ResourceQuota {
1631	if !iter.page.NotDone() {
1632		return ResourceQuota{}
1633	}
1634	return iter.page.Values()[iter.i]
1635}
1636
1637// Creates a new instance of the ListWorkspaceQuotasIterator type.
1638func NewListWorkspaceQuotasIterator(page ListWorkspaceQuotasPage) ListWorkspaceQuotasIterator {
1639	return ListWorkspaceQuotasIterator{page: page}
1640}
1641
1642// IsEmpty returns true if the ListResult contains no values.
1643func (lwq ListWorkspaceQuotas) IsEmpty() bool {
1644	return lwq.Value == nil || len(*lwq.Value) == 0
1645}
1646
1647// hasNextLink returns true if the NextLink is not empty.
1648func (lwq ListWorkspaceQuotas) hasNextLink() bool {
1649	return lwq.NextLink != nil && len(*lwq.NextLink) != 0
1650}
1651
1652// listWorkspaceQuotasPreparer prepares a request to retrieve the next set of results.
1653// It returns nil if no more results exist.
1654func (lwq ListWorkspaceQuotas) listWorkspaceQuotasPreparer(ctx context.Context) (*http.Request, error) {
1655	if !lwq.hasNextLink() {
1656		return nil, nil
1657	}
1658	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1659		autorest.AsJSON(),
1660		autorest.AsGet(),
1661		autorest.WithBaseURL(to.String(lwq.NextLink)))
1662}
1663
1664// ListWorkspaceQuotasPage contains a page of ResourceQuota values.
1665type ListWorkspaceQuotasPage struct {
1666	fn  func(context.Context, ListWorkspaceQuotas) (ListWorkspaceQuotas, error)
1667	lwq ListWorkspaceQuotas
1668}
1669
1670// NextWithContext advances to the next page of values.  If there was an error making
1671// the request the page does not advance and the error is returned.
1672func (page *ListWorkspaceQuotasPage) NextWithContext(ctx context.Context) (err error) {
1673	if tracing.IsEnabled() {
1674		ctx = tracing.StartSpan(ctx, fqdn+"/ListWorkspaceQuotasPage.NextWithContext")
1675		defer func() {
1676			sc := -1
1677			if page.Response().Response.Response != nil {
1678				sc = page.Response().Response.Response.StatusCode
1679			}
1680			tracing.EndSpan(ctx, sc, err)
1681		}()
1682	}
1683	for {
1684		next, err := page.fn(ctx, page.lwq)
1685		if err != nil {
1686			return err
1687		}
1688		page.lwq = next
1689		if !next.hasNextLink() || !next.IsEmpty() {
1690			break
1691		}
1692	}
1693	return nil
1694}
1695
1696// Next advances to the next page of values.  If there was an error making
1697// the request the page does not advance and the error is returned.
1698// Deprecated: Use NextWithContext() instead.
1699func (page *ListWorkspaceQuotasPage) Next() error {
1700	return page.NextWithContext(context.Background())
1701}
1702
1703// NotDone returns true if the page enumeration should be started or is not yet complete.
1704func (page ListWorkspaceQuotasPage) NotDone() bool {
1705	return !page.lwq.IsEmpty()
1706}
1707
1708// Response returns the raw server response from the last page request.
1709func (page ListWorkspaceQuotasPage) Response() ListWorkspaceQuotas {
1710	return page.lwq
1711}
1712
1713// Values returns the slice of values for the current page or nil if there are no values.
1714func (page ListWorkspaceQuotasPage) Values() []ResourceQuota {
1715	if page.lwq.IsEmpty() {
1716		return nil
1717	}
1718	return *page.lwq.Value
1719}
1720
1721// Creates a new instance of the ListWorkspaceQuotasPage type.
1722func NewListWorkspaceQuotasPage(cur ListWorkspaceQuotas, getNextPage func(context.Context, ListWorkspaceQuotas) (ListWorkspaceQuotas, error)) ListWorkspaceQuotasPage {
1723	return ListWorkspaceQuotasPage{
1724		fn:  getNextPage,
1725		lwq: cur,
1726	}
1727}
1728
1729// MachineLearningComputeCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1730// long-running operation.
1731type MachineLearningComputeCreateOrUpdateFuture struct {
1732	azure.FutureAPI
1733	// Result returns the result of the asynchronous operation.
1734	// If the operation has not completed it will return an error.
1735	Result func(MachineLearningComputeClient) (ComputeResource, error)
1736}
1737
1738// MachineLearningComputeDeleteFuture an abstraction for monitoring and retrieving the results of a
1739// long-running operation.
1740type MachineLearningComputeDeleteFuture struct {
1741	azure.FutureAPI
1742	// Result returns the result of the asynchronous operation.
1743	// If the operation has not completed it will return an error.
1744	Result func(MachineLearningComputeClient) (autorest.Response, error)
1745}
1746
1747// MachineLearningComputeUpdateFuture an abstraction for monitoring and retrieving the results of a
1748// long-running operation.
1749type MachineLearningComputeUpdateFuture struct {
1750	azure.FutureAPI
1751	// Result returns the result of the asynchronous operation.
1752	// If the operation has not completed it will return an error.
1753	Result func(MachineLearningComputeClient) (ComputeResource, error)
1754}
1755
1756// NodeStateCounts counts of various compute node states on the amlCompute.
1757type NodeStateCounts struct {
1758	// IdleNodeCount - READ-ONLY; Number of compute nodes in idle state.
1759	IdleNodeCount *int32 `json:"idleNodeCount,omitempty"`
1760	// RunningNodeCount - READ-ONLY; Number of compute nodes which are running jobs.
1761	RunningNodeCount *int32 `json:"runningNodeCount,omitempty"`
1762	// PreparingNodeCount - READ-ONLY; Number of compute nodes which are being prepared.
1763	PreparingNodeCount *int32 `json:"preparingNodeCount,omitempty"`
1764	// UnusableNodeCount - READ-ONLY; Number of compute nodes which are in unusable state.
1765	UnusableNodeCount *int32 `json:"unusableNodeCount,omitempty"`
1766	// LeavingNodeCount - READ-ONLY; Number of compute nodes which are leaving the amlCompute.
1767	LeavingNodeCount *int32 `json:"leavingNodeCount,omitempty"`
1768	// PreemptedNodeCount - READ-ONLY; Number of compute nodes which are in preempted state.
1769	PreemptedNodeCount *int32 `json:"preemptedNodeCount,omitempty"`
1770}
1771
1772// Operation azure Machine Learning workspace REST API operation
1773type Operation struct {
1774	// Name - Operation name: {provider}/{resource}/{operation}
1775	Name *string `json:"name,omitempty"`
1776	// Display - Display name of operation
1777	Display *OperationDisplay `json:"display,omitempty"`
1778}
1779
1780// OperationDisplay display name of operation
1781type OperationDisplay struct {
1782	// Provider - The resource provider name: Microsoft.MachineLearningExperimentation
1783	Provider *string `json:"provider,omitempty"`
1784	// Resource - The resource on which the operation is performed.
1785	Resource *string `json:"resource,omitempty"`
1786	// Operation - The operation that users can perform.
1787	Operation *string `json:"operation,omitempty"`
1788	// Description - The description for the operation.
1789	Description *string `json:"description,omitempty"`
1790}
1791
1792// OperationListResult an array of operations supported by the resource provider.
1793type OperationListResult struct {
1794	autorest.Response `json:"-"`
1795	// Value - List of AML workspace operations supported by the AML workspace resource provider.
1796	Value *[]Operation `json:"value,omitempty"`
1797}
1798
1799// PaginatedComputeResourcesList paginated list of Machine Learning compute objects wrapped in ARM resource
1800// envelope.
1801type PaginatedComputeResourcesList struct {
1802	autorest.Response `json:"-"`
1803	// Value - An array of Machine Learning compute objects wrapped in ARM resource envelope.
1804	Value *[]ComputeResource `json:"value,omitempty"`
1805	// NextLink - A continuation link (absolute URI) to the next page of results in the list.
1806	NextLink *string `json:"nextLink,omitempty"`
1807}
1808
1809// PaginatedComputeResourcesListIterator provides access to a complete listing of ComputeResource values.
1810type PaginatedComputeResourcesListIterator struct {
1811	i    int
1812	page PaginatedComputeResourcesListPage
1813}
1814
1815// NextWithContext advances to the next value.  If there was an error making
1816// the request the iterator does not advance and the error is returned.
1817func (iter *PaginatedComputeResourcesListIterator) NextWithContext(ctx context.Context) (err error) {
1818	if tracing.IsEnabled() {
1819		ctx = tracing.StartSpan(ctx, fqdn+"/PaginatedComputeResourcesListIterator.NextWithContext")
1820		defer func() {
1821			sc := -1
1822			if iter.Response().Response.Response != nil {
1823				sc = iter.Response().Response.Response.StatusCode
1824			}
1825			tracing.EndSpan(ctx, sc, err)
1826		}()
1827	}
1828	iter.i++
1829	if iter.i < len(iter.page.Values()) {
1830		return nil
1831	}
1832	err = iter.page.NextWithContext(ctx)
1833	if err != nil {
1834		iter.i--
1835		return err
1836	}
1837	iter.i = 0
1838	return nil
1839}
1840
1841// Next advances to the next value.  If there was an error making
1842// the request the iterator does not advance and the error is returned.
1843// Deprecated: Use NextWithContext() instead.
1844func (iter *PaginatedComputeResourcesListIterator) Next() error {
1845	return iter.NextWithContext(context.Background())
1846}
1847
1848// NotDone returns true if the enumeration should be started or is not yet complete.
1849func (iter PaginatedComputeResourcesListIterator) NotDone() bool {
1850	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1851}
1852
1853// Response returns the raw server response from the last page request.
1854func (iter PaginatedComputeResourcesListIterator) Response() PaginatedComputeResourcesList {
1855	return iter.page.Response()
1856}
1857
1858// Value returns the current value or a zero-initialized value if the
1859// iterator has advanced beyond the end of the collection.
1860func (iter PaginatedComputeResourcesListIterator) Value() ComputeResource {
1861	if !iter.page.NotDone() {
1862		return ComputeResource{}
1863	}
1864	return iter.page.Values()[iter.i]
1865}
1866
1867// Creates a new instance of the PaginatedComputeResourcesListIterator type.
1868func NewPaginatedComputeResourcesListIterator(page PaginatedComputeResourcesListPage) PaginatedComputeResourcesListIterator {
1869	return PaginatedComputeResourcesListIterator{page: page}
1870}
1871
1872// IsEmpty returns true if the ListResult contains no values.
1873func (pcrl PaginatedComputeResourcesList) IsEmpty() bool {
1874	return pcrl.Value == nil || len(*pcrl.Value) == 0
1875}
1876
1877// hasNextLink returns true if the NextLink is not empty.
1878func (pcrl PaginatedComputeResourcesList) hasNextLink() bool {
1879	return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
1880}
1881
1882// paginatedComputeResourcesListPreparer prepares a request to retrieve the next set of results.
1883// It returns nil if no more results exist.
1884func (pcrl PaginatedComputeResourcesList) paginatedComputeResourcesListPreparer(ctx context.Context) (*http.Request, error) {
1885	if !pcrl.hasNextLink() {
1886		return nil, nil
1887	}
1888	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1889		autorest.AsJSON(),
1890		autorest.AsGet(),
1891		autorest.WithBaseURL(to.String(pcrl.NextLink)))
1892}
1893
1894// PaginatedComputeResourcesListPage contains a page of ComputeResource values.
1895type PaginatedComputeResourcesListPage struct {
1896	fn   func(context.Context, PaginatedComputeResourcesList) (PaginatedComputeResourcesList, error)
1897	pcrl PaginatedComputeResourcesList
1898}
1899
1900// NextWithContext advances to the next page of values.  If there was an error making
1901// the request the page does not advance and the error is returned.
1902func (page *PaginatedComputeResourcesListPage) NextWithContext(ctx context.Context) (err error) {
1903	if tracing.IsEnabled() {
1904		ctx = tracing.StartSpan(ctx, fqdn+"/PaginatedComputeResourcesListPage.NextWithContext")
1905		defer func() {
1906			sc := -1
1907			if page.Response().Response.Response != nil {
1908				sc = page.Response().Response.Response.StatusCode
1909			}
1910			tracing.EndSpan(ctx, sc, err)
1911		}()
1912	}
1913	for {
1914		next, err := page.fn(ctx, page.pcrl)
1915		if err != nil {
1916			return err
1917		}
1918		page.pcrl = next
1919		if !next.hasNextLink() || !next.IsEmpty() {
1920			break
1921		}
1922	}
1923	return nil
1924}
1925
1926// Next advances to the next page of values.  If there was an error making
1927// the request the page does not advance and the error is returned.
1928// Deprecated: Use NextWithContext() instead.
1929func (page *PaginatedComputeResourcesListPage) Next() error {
1930	return page.NextWithContext(context.Background())
1931}
1932
1933// NotDone returns true if the page enumeration should be started or is not yet complete.
1934func (page PaginatedComputeResourcesListPage) NotDone() bool {
1935	return !page.pcrl.IsEmpty()
1936}
1937
1938// Response returns the raw server response from the last page request.
1939func (page PaginatedComputeResourcesListPage) Response() PaginatedComputeResourcesList {
1940	return page.pcrl
1941}
1942
1943// Values returns the slice of values for the current page or nil if there are no values.
1944func (page PaginatedComputeResourcesListPage) Values() []ComputeResource {
1945	if page.pcrl.IsEmpty() {
1946		return nil
1947	}
1948	return *page.pcrl.Value
1949}
1950
1951// Creates a new instance of the PaginatedComputeResourcesListPage type.
1952func NewPaginatedComputeResourcesListPage(cur PaginatedComputeResourcesList, getNextPage func(context.Context, PaginatedComputeResourcesList) (PaginatedComputeResourcesList, error)) PaginatedComputeResourcesListPage {
1953	return PaginatedComputeResourcesListPage{
1954		fn:   getNextPage,
1955		pcrl: cur,
1956	}
1957}
1958
1959// Password ...
1960type Password struct {
1961	// Name - READ-ONLY
1962	Name *string `json:"name,omitempty"`
1963	// Value - READ-ONLY
1964	Value *string `json:"value,omitempty"`
1965}
1966
1967// QuotaBaseProperties the properties for Quota update or retrieval.
1968type QuotaBaseProperties struct {
1969	// ID - Specifies the resource ID.
1970	ID *string `json:"id,omitempty"`
1971	// Type - Specifies the resource type.
1972	Type *string `json:"type,omitempty"`
1973	// Limit - The maximum permitted quota of the resource.
1974	Limit *int64 `json:"limit,omitempty"`
1975	// Unit - An enum describing the unit of quota measurement. Possible values include: 'Count'
1976	Unit QuotaUnit `json:"unit,omitempty"`
1977}
1978
1979// QuotaUpdateParameters quota update parameters.
1980type QuotaUpdateParameters struct {
1981	// Value - The list for update quota.
1982	Value *[]QuotaBaseProperties `json:"value,omitempty"`
1983}
1984
1985// RegistryListCredentialsResult ...
1986type RegistryListCredentialsResult struct {
1987	// Location - READ-ONLY
1988	Location *string `json:"location,omitempty"`
1989	// Username - READ-ONLY
1990	Username  *string     `json:"username,omitempty"`
1991	Passwords *[]Password `json:"passwords,omitempty"`
1992}
1993
1994// MarshalJSON is the custom marshaler for RegistryListCredentialsResult.
1995func (rlcr RegistryListCredentialsResult) MarshalJSON() ([]byte, error) {
1996	objectMap := make(map[string]interface{})
1997	if rlcr.Passwords != nil {
1998		objectMap["passwords"] = rlcr.Passwords
1999	}
2000	return json.Marshal(objectMap)
2001}
2002
2003// Resource azure Resource Manager resource envelope.
2004type Resource struct {
2005	// ID - READ-ONLY; Specifies the resource ID.
2006	ID *string `json:"id,omitempty"`
2007	// Name - READ-ONLY; Specifies the name of the resource.
2008	Name *string `json:"name,omitempty"`
2009	// Identity - The identity of the resource.
2010	Identity *Identity `json:"identity,omitempty"`
2011	// Location - Specifies the location of the resource.
2012	Location *string `json:"location,omitempty"`
2013	// Type - READ-ONLY; Specifies the type of the resource.
2014	Type *string `json:"type,omitempty"`
2015	// Tags - Contains resource tags defined as key/value pairs.
2016	Tags map[string]*string `json:"tags"`
2017}
2018
2019// MarshalJSON is the custom marshaler for Resource.
2020func (r Resource) MarshalJSON() ([]byte, error) {
2021	objectMap := make(map[string]interface{})
2022	if r.Identity != nil {
2023		objectMap["identity"] = r.Identity
2024	}
2025	if r.Location != nil {
2026		objectMap["location"] = r.Location
2027	}
2028	if r.Tags != nil {
2029		objectMap["tags"] = r.Tags
2030	}
2031	return json.Marshal(objectMap)
2032}
2033
2034// ResourceID represents a resource ID. For example, for a subnet, it is the resource URL for the subnet.
2035type ResourceID struct {
2036	// ID - The ID of the resource
2037	ID *string `json:"id,omitempty"`
2038}
2039
2040// ResourceName the Resource Name.
2041type ResourceName struct {
2042	// Value - READ-ONLY; The name of the resource.
2043	Value *string `json:"value,omitempty"`
2044	// LocalizedValue - READ-ONLY; The localized name of the resource.
2045	LocalizedValue *string `json:"localizedValue,omitempty"`
2046}
2047
2048// ResourceQuota the quota assigned to a resource.
2049type ResourceQuota struct {
2050	// ID - READ-ONLY; Specifies the resource ID.
2051	ID *string `json:"id,omitempty"`
2052	// Type - READ-ONLY; Specifies the resource type.
2053	Type *string `json:"type,omitempty"`
2054	// Name - READ-ONLY; Name of the resource.
2055	Name *ResourceName `json:"name,omitempty"`
2056	// Limit - READ-ONLY; The maximum permitted quota of the resource.
2057	Limit *int64 `json:"limit,omitempty"`
2058	// Unit - READ-ONLY; An enum describing the unit of quota measurement. Possible values include: 'Count'
2059	Unit QuotaUnit `json:"unit,omitempty"`
2060}
2061
2062// ScaleSettings scale settings for AML Compute
2063type ScaleSettings struct {
2064	// MaxNodeCount - Max number of nodes to use
2065	MaxNodeCount *int32 `json:"maxNodeCount,omitempty"`
2066	// MinNodeCount - Min number of nodes to use
2067	MinNodeCount *int32 `json:"minNodeCount,omitempty"`
2068	// NodeIdleTimeBeforeScaleDown - Node Idle Time before scaling down amlCompute
2069	NodeIdleTimeBeforeScaleDown *string `json:"nodeIdleTimeBeforeScaleDown,omitempty"`
2070}
2071
2072// ServicePrincipalCredentials service principal credentials.
2073type ServicePrincipalCredentials struct {
2074	// ClientID - Client Id
2075	ClientID *string `json:"clientId,omitempty"`
2076	// ClientSecret - Client secret
2077	ClientSecret *string `json:"clientSecret,omitempty"`
2078}
2079
2080// SslConfiguration the ssl configuration for scoring
2081type SslConfiguration struct {
2082	// Status - Enable or disable ssl for scoring. Possible values include: 'Status1Disabled', 'Status1Enabled'
2083	Status Status1 `json:"status,omitempty"`
2084	// Cert - Cert data
2085	Cert *string `json:"cert,omitempty"`
2086	// Key - Key data
2087	Key *string `json:"key,omitempty"`
2088	// Cname - CNAME of the cert
2089	Cname *string `json:"cname,omitempty"`
2090}
2091
2092// SystemService a system service running on a compute.
2093type SystemService struct {
2094	// SystemServiceType - READ-ONLY; The type of this system service.
2095	SystemServiceType *string `json:"systemServiceType,omitempty"`
2096	// PublicIPAddress - READ-ONLY; Public IP address
2097	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
2098	// Version - READ-ONLY; The version for this type.
2099	Version *string `json:"version,omitempty"`
2100}
2101
2102// UpdateWorkspaceQuotas the properties for update Quota response.
2103type UpdateWorkspaceQuotas struct {
2104	// ID - READ-ONLY; Specifies the resource ID.
2105	ID *string `json:"id,omitempty"`
2106	// Type - READ-ONLY; Specifies the resource type.
2107	Type *string `json:"type,omitempty"`
2108	// Limit - The maximum permitted quota of the resource.
2109	Limit *int64 `json:"limit,omitempty"`
2110	// Unit - READ-ONLY; An enum describing the unit of quota measurement. Possible values include: 'Count'
2111	Unit QuotaUnit `json:"unit,omitempty"`
2112	// Status - Status of update workspace quota. Possible values include: 'Undefined', 'Success', 'Failure', 'InvalidQuotaBelowClusterMinimum', 'InvalidQuotaExceedsSubscriptionLimit', 'InvalidVMFamilyName'
2113	Status Status `json:"status,omitempty"`
2114}
2115
2116// MarshalJSON is the custom marshaler for UpdateWorkspaceQuotas.
2117func (uwq UpdateWorkspaceQuotas) MarshalJSON() ([]byte, error) {
2118	objectMap := make(map[string]interface{})
2119	if uwq.Limit != nil {
2120		objectMap["limit"] = uwq.Limit
2121	}
2122	if uwq.Status != "" {
2123		objectMap["status"] = uwq.Status
2124	}
2125	return json.Marshal(objectMap)
2126}
2127
2128// UpdateWorkspaceQuotasResult the result of update workspace quota.
2129type UpdateWorkspaceQuotasResult struct {
2130	autorest.Response `json:"-"`
2131	// Value - READ-ONLY; The list of workspace quota update result.
2132	Value *[]UpdateWorkspaceQuotas `json:"value,omitempty"`
2133	// 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.
2134	NextLink *string `json:"nextLink,omitempty"`
2135}
2136
2137// Usage describes AML Resource Usage.
2138type Usage struct {
2139	// ID - READ-ONLY; Specifies the resource ID.
2140	ID *string `json:"id,omitempty"`
2141	// Type - READ-ONLY; Specifies the resource type.
2142	Type *string `json:"type,omitempty"`
2143	// Unit - READ-ONLY; An enum describing the unit of usage measurement. Possible values include: 'UsageUnitCount'
2144	Unit UsageUnit `json:"unit,omitempty"`
2145	// CurrentValue - READ-ONLY; The current usage of the resource.
2146	CurrentValue *int64 `json:"currentValue,omitempty"`
2147	// Limit - READ-ONLY; The maximum permitted usage of the resource.
2148	Limit *int64 `json:"limit,omitempty"`
2149	// Name - READ-ONLY; The name of the type of usage.
2150	Name *UsageName `json:"name,omitempty"`
2151}
2152
2153// UsageName the Usage Names.
2154type UsageName struct {
2155	// Value - READ-ONLY; The name of the resource.
2156	Value *string `json:"value,omitempty"`
2157	// LocalizedValue - READ-ONLY; The localized name of the resource.
2158	LocalizedValue *string `json:"localizedValue,omitempty"`
2159}
2160
2161// UserAccountCredentials settings for user account that gets created on each on the nodes of a compute.
2162type UserAccountCredentials struct {
2163	// AdminUserName - Name of the administrator user account which can be used to SSH to nodes.
2164	AdminUserName *string `json:"adminUserName,omitempty"`
2165	// AdminUserSSHPublicKey - SSH public key of the administrator user account.
2166	AdminUserSSHPublicKey *string `json:"adminUserSshPublicKey,omitempty"`
2167	// AdminUserPassword - Password of the administrator user account.
2168	AdminUserPassword *string `json:"adminUserPassword,omitempty"`
2169}
2170
2171// VirtualMachine a Machine Learning compute based on Azure Virtual Machines.
2172type VirtualMachine struct {
2173	Properties *VirtualMachineProperties `json:"properties,omitempty"`
2174	// ComputeLocation - Location for the underlying compute
2175	ComputeLocation *string `json:"computeLocation,omitempty"`
2176	// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
2177	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2178	// Description - The description of the Machine Learning compute.
2179	Description *string `json:"description,omitempty"`
2180	// CreatedOn - READ-ONLY; The date and time when the compute was created.
2181	CreatedOn *date.Time `json:"createdOn,omitempty"`
2182	// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
2183	ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
2184	// ResourceID - ARM resource id of the underlying compute
2185	ResourceID *string `json:"resourceId,omitempty"`
2186	// ProvisioningErrors - READ-ONLY; Errors during provisioning
2187	ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
2188	// 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.
2189	IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
2190	// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
2191	ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
2192}
2193
2194// MarshalJSON is the custom marshaler for VirtualMachine.
2195func (VM VirtualMachine) MarshalJSON() ([]byte, error) {
2196	VM.ComputeType = ComputeTypeVirtualMachine1
2197	objectMap := make(map[string]interface{})
2198	if VM.Properties != nil {
2199		objectMap["properties"] = VM.Properties
2200	}
2201	if VM.ComputeLocation != nil {
2202		objectMap["computeLocation"] = VM.ComputeLocation
2203	}
2204	if VM.Description != nil {
2205		objectMap["description"] = VM.Description
2206	}
2207	if VM.ResourceID != nil {
2208		objectMap["resourceId"] = VM.ResourceID
2209	}
2210	if VM.ComputeType != "" {
2211		objectMap["computeType"] = VM.ComputeType
2212	}
2213	return json.Marshal(objectMap)
2214}
2215
2216// AsAKS is the BasicCompute implementation for VirtualMachine.
2217func (VM VirtualMachine) AsAKS() (*AKS, bool) {
2218	return nil, false
2219}
2220
2221// AsAmlCompute is the BasicCompute implementation for VirtualMachine.
2222func (VM VirtualMachine) AsAmlCompute() (*AmlCompute, bool) {
2223	return nil, false
2224}
2225
2226// AsVirtualMachine is the BasicCompute implementation for VirtualMachine.
2227func (VM VirtualMachine) AsVirtualMachine() (*VirtualMachine, bool) {
2228	return &VM, true
2229}
2230
2231// AsHDInsight is the BasicCompute implementation for VirtualMachine.
2232func (VM VirtualMachine) AsHDInsight() (*HDInsight, bool) {
2233	return nil, false
2234}
2235
2236// AsDataFactory is the BasicCompute implementation for VirtualMachine.
2237func (VM VirtualMachine) AsDataFactory() (*DataFactory, bool) {
2238	return nil, false
2239}
2240
2241// AsDatabricks is the BasicCompute implementation for VirtualMachine.
2242func (VM VirtualMachine) AsDatabricks() (*Databricks, bool) {
2243	return nil, false
2244}
2245
2246// AsDataLakeAnalytics is the BasicCompute implementation for VirtualMachine.
2247func (VM VirtualMachine) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
2248	return nil, false
2249}
2250
2251// AsCompute is the BasicCompute implementation for VirtualMachine.
2252func (VM VirtualMachine) AsCompute() (*Compute, bool) {
2253	return nil, false
2254}
2255
2256// AsBasicCompute is the BasicCompute implementation for VirtualMachine.
2257func (VM VirtualMachine) AsBasicCompute() (BasicCompute, bool) {
2258	return &VM, true
2259}
2260
2261// VirtualMachineProperties ...
2262type VirtualMachineProperties struct {
2263	// VirtualMachineSize - Virtual Machine size
2264	VirtualMachineSize *string `json:"virtualMachineSize,omitempty"`
2265	// SSHPort - Port open for ssh connections.
2266	SSHPort *int32 `json:"sshPort,omitempty"`
2267	// Address - Public IP address of the virtual machine.
2268	Address *string `json:"address,omitempty"`
2269	// AdministratorAccount - Admin credentials for virtual machine
2270	AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
2271}
2272
2273// VirtualMachineSecrets secrets related to a Machine Learning compute based on AKS.
2274type VirtualMachineSecrets struct {
2275	// AdministratorAccount - Admin credentials for virtual machine.
2276	AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
2277	// ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
2278	ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
2279}
2280
2281// MarshalJSON is the custom marshaler for VirtualMachineSecrets.
2282func (vms VirtualMachineSecrets) MarshalJSON() ([]byte, error) {
2283	vms.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine
2284	objectMap := make(map[string]interface{})
2285	if vms.AdministratorAccount != nil {
2286		objectMap["administratorAccount"] = vms.AdministratorAccount
2287	}
2288	if vms.ComputeType != "" {
2289		objectMap["computeType"] = vms.ComputeType
2290	}
2291	return json.Marshal(objectMap)
2292}
2293
2294// AsAksComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
2295func (vms VirtualMachineSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
2296	return nil, false
2297}
2298
2299// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
2300func (vms VirtualMachineSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
2301	return &vms, true
2302}
2303
2304// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
2305func (vms VirtualMachineSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
2306	return nil, false
2307}
2308
2309// AsComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
2310func (vms VirtualMachineSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
2311	return nil, false
2312}
2313
2314// AsBasicComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
2315func (vms VirtualMachineSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
2316	return &vms, true
2317}
2318
2319// VirtualMachineSize describes the properties of a VM size.
2320type VirtualMachineSize struct {
2321	// Name - READ-ONLY; The name of the virtual machine size.
2322	Name *string `json:"name,omitempty"`
2323	// Family - READ-ONLY; The family name of the virtual machine size.
2324	Family *string `json:"family,omitempty"`
2325	// VCPUs - READ-ONLY; The number of vCPUs supported by the virtual machine size.
2326	VCPUs *int32 `json:"vCPUs,omitempty"`
2327	// Gpus - READ-ONLY; The number of gPUs supported by the virtual machine size.
2328	Gpus *int32 `json:"gpus,omitempty"`
2329	// OsVhdSizeMB - READ-ONLY; The OS VHD disk size, in MB, allowed by the virtual machine size.
2330	OsVhdSizeMB *int32 `json:"osVhdSizeMB,omitempty"`
2331	// MaxResourceVolumeMB - READ-ONLY; The resource volume size, in MB, allowed by the virtual machine size.
2332	MaxResourceVolumeMB *int32 `json:"maxResourceVolumeMB,omitempty"`
2333	// MemoryGB - READ-ONLY; The amount of memory, in GB, supported by the virtual machine size.
2334	MemoryGB *float64 `json:"memoryGB,omitempty"`
2335	// LowPriorityCapable - READ-ONLY; Specifies if the virtual machine size supports low priority VMs.
2336	LowPriorityCapable *bool `json:"lowPriorityCapable,omitempty"`
2337	// PremiumIO - READ-ONLY; Specifies if the virtual machine size supports premium IO.
2338	PremiumIO *bool `json:"premiumIO,omitempty"`
2339}
2340
2341// VirtualMachineSizeListResult the List Virtual Machine size operation response.
2342type VirtualMachineSizeListResult struct {
2343	autorest.Response `json:"-"`
2344	// AmlCompute - The list of virtual machine sizes supported by AmlCompute.
2345	AmlCompute *[]VirtualMachineSize `json:"amlCompute,omitempty"`
2346}
2347
2348// VirtualMachineSSHCredentials admin credentials for virtual machine
2349type VirtualMachineSSHCredentials struct {
2350	// Username - Username of admin account
2351	Username *string `json:"username,omitempty"`
2352	// Password - Password of admin account
2353	Password *string `json:"password,omitempty"`
2354	// PublicKeyData - Public key data
2355	PublicKeyData *string `json:"publicKeyData,omitempty"`
2356	// PrivateKeyData - Private key data
2357	PrivateKeyData *string `json:"privateKeyData,omitempty"`
2358}
2359
2360// Workspace an object that represents a machine learning workspace.
2361type Workspace struct {
2362	autorest.Response `json:"-"`
2363	// WorkspaceProperties - The properties of the machine learning workspace.
2364	*WorkspaceProperties `json:"properties,omitempty"`
2365	// ID - READ-ONLY; Specifies the resource ID.
2366	ID *string `json:"id,omitempty"`
2367	// Name - READ-ONLY; Specifies the name of the resource.
2368	Name *string `json:"name,omitempty"`
2369	// Identity - The identity of the resource.
2370	Identity *Identity `json:"identity,omitempty"`
2371	// Location - Specifies the location of the resource.
2372	Location *string `json:"location,omitempty"`
2373	// Type - READ-ONLY; Specifies the type of the resource.
2374	Type *string `json:"type,omitempty"`
2375	// Tags - Contains resource tags defined as key/value pairs.
2376	Tags map[string]*string `json:"tags"`
2377}
2378
2379// MarshalJSON is the custom marshaler for Workspace.
2380func (w Workspace) MarshalJSON() ([]byte, error) {
2381	objectMap := make(map[string]interface{})
2382	if w.WorkspaceProperties != nil {
2383		objectMap["properties"] = w.WorkspaceProperties
2384	}
2385	if w.Identity != nil {
2386		objectMap["identity"] = w.Identity
2387	}
2388	if w.Location != nil {
2389		objectMap["location"] = w.Location
2390	}
2391	if w.Tags != nil {
2392		objectMap["tags"] = w.Tags
2393	}
2394	return json.Marshal(objectMap)
2395}
2396
2397// UnmarshalJSON is the custom unmarshaler for Workspace struct.
2398func (w *Workspace) UnmarshalJSON(body []byte) error {
2399	var m map[string]*json.RawMessage
2400	err := json.Unmarshal(body, &m)
2401	if err != nil {
2402		return err
2403	}
2404	for k, v := range m {
2405		switch k {
2406		case "properties":
2407			if v != nil {
2408				var workspaceProperties WorkspaceProperties
2409				err = json.Unmarshal(*v, &workspaceProperties)
2410				if err != nil {
2411					return err
2412				}
2413				w.WorkspaceProperties = &workspaceProperties
2414			}
2415		case "id":
2416			if v != nil {
2417				var ID string
2418				err = json.Unmarshal(*v, &ID)
2419				if err != nil {
2420					return err
2421				}
2422				w.ID = &ID
2423			}
2424		case "name":
2425			if v != nil {
2426				var name string
2427				err = json.Unmarshal(*v, &name)
2428				if err != nil {
2429					return err
2430				}
2431				w.Name = &name
2432			}
2433		case "identity":
2434			if v != nil {
2435				var identity Identity
2436				err = json.Unmarshal(*v, &identity)
2437				if err != nil {
2438					return err
2439				}
2440				w.Identity = &identity
2441			}
2442		case "location":
2443			if v != nil {
2444				var location string
2445				err = json.Unmarshal(*v, &location)
2446				if err != nil {
2447					return err
2448				}
2449				w.Location = &location
2450			}
2451		case "type":
2452			if v != nil {
2453				var typeVar string
2454				err = json.Unmarshal(*v, &typeVar)
2455				if err != nil {
2456					return err
2457				}
2458				w.Type = &typeVar
2459			}
2460		case "tags":
2461			if v != nil {
2462				var tags map[string]*string
2463				err = json.Unmarshal(*v, &tags)
2464				if err != nil {
2465					return err
2466				}
2467				w.Tags = tags
2468			}
2469		}
2470	}
2471
2472	return nil
2473}
2474
2475// WorkspaceListResult the result of a request to list machine learning workspaces.
2476type WorkspaceListResult struct {
2477	autorest.Response `json:"-"`
2478	// 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.
2479	Value *[]Workspace `json:"value,omitempty"`
2480	// NextLink - The URI that can be used to request the next list of machine learning workspaces.
2481	NextLink *string `json:"nextLink,omitempty"`
2482}
2483
2484// WorkspaceListResultIterator provides access to a complete listing of Workspace values.
2485type WorkspaceListResultIterator struct {
2486	i    int
2487	page WorkspaceListResultPage
2488}
2489
2490// NextWithContext advances to the next value.  If there was an error making
2491// the request the iterator does not advance and the error is returned.
2492func (iter *WorkspaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
2493	if tracing.IsEnabled() {
2494		ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceListResultIterator.NextWithContext")
2495		defer func() {
2496			sc := -1
2497			if iter.Response().Response.Response != nil {
2498				sc = iter.Response().Response.Response.StatusCode
2499			}
2500			tracing.EndSpan(ctx, sc, err)
2501		}()
2502	}
2503	iter.i++
2504	if iter.i < len(iter.page.Values()) {
2505		return nil
2506	}
2507	err = iter.page.NextWithContext(ctx)
2508	if err != nil {
2509		iter.i--
2510		return err
2511	}
2512	iter.i = 0
2513	return nil
2514}
2515
2516// Next advances to the next value.  If there was an error making
2517// the request the iterator does not advance and the error is returned.
2518// Deprecated: Use NextWithContext() instead.
2519func (iter *WorkspaceListResultIterator) Next() error {
2520	return iter.NextWithContext(context.Background())
2521}
2522
2523// NotDone returns true if the enumeration should be started or is not yet complete.
2524func (iter WorkspaceListResultIterator) NotDone() bool {
2525	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2526}
2527
2528// Response returns the raw server response from the last page request.
2529func (iter WorkspaceListResultIterator) Response() WorkspaceListResult {
2530	return iter.page.Response()
2531}
2532
2533// Value returns the current value or a zero-initialized value if the
2534// iterator has advanced beyond the end of the collection.
2535func (iter WorkspaceListResultIterator) Value() Workspace {
2536	if !iter.page.NotDone() {
2537		return Workspace{}
2538	}
2539	return iter.page.Values()[iter.i]
2540}
2541
2542// Creates a new instance of the WorkspaceListResultIterator type.
2543func NewWorkspaceListResultIterator(page WorkspaceListResultPage) WorkspaceListResultIterator {
2544	return WorkspaceListResultIterator{page: page}
2545}
2546
2547// IsEmpty returns true if the ListResult contains no values.
2548func (wlr WorkspaceListResult) IsEmpty() bool {
2549	return wlr.Value == nil || len(*wlr.Value) == 0
2550}
2551
2552// hasNextLink returns true if the NextLink is not empty.
2553func (wlr WorkspaceListResult) hasNextLink() bool {
2554	return wlr.NextLink != nil && len(*wlr.NextLink) != 0
2555}
2556
2557// workspaceListResultPreparer prepares a request to retrieve the next set of results.
2558// It returns nil if no more results exist.
2559func (wlr WorkspaceListResult) workspaceListResultPreparer(ctx context.Context) (*http.Request, error) {
2560	if !wlr.hasNextLink() {
2561		return nil, nil
2562	}
2563	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2564		autorest.AsJSON(),
2565		autorest.AsGet(),
2566		autorest.WithBaseURL(to.String(wlr.NextLink)))
2567}
2568
2569// WorkspaceListResultPage contains a page of Workspace values.
2570type WorkspaceListResultPage struct {
2571	fn  func(context.Context, WorkspaceListResult) (WorkspaceListResult, error)
2572	wlr WorkspaceListResult
2573}
2574
2575// NextWithContext advances to the next page of values.  If there was an error making
2576// the request the page does not advance and the error is returned.
2577func (page *WorkspaceListResultPage) NextWithContext(ctx context.Context) (err error) {
2578	if tracing.IsEnabled() {
2579		ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceListResultPage.NextWithContext")
2580		defer func() {
2581			sc := -1
2582			if page.Response().Response.Response != nil {
2583				sc = page.Response().Response.Response.StatusCode
2584			}
2585			tracing.EndSpan(ctx, sc, err)
2586		}()
2587	}
2588	for {
2589		next, err := page.fn(ctx, page.wlr)
2590		if err != nil {
2591			return err
2592		}
2593		page.wlr = next
2594		if !next.hasNextLink() || !next.IsEmpty() {
2595			break
2596		}
2597	}
2598	return nil
2599}
2600
2601// Next advances to the next page of values.  If there was an error making
2602// the request the page does not advance and the error is returned.
2603// Deprecated: Use NextWithContext() instead.
2604func (page *WorkspaceListResultPage) Next() error {
2605	return page.NextWithContext(context.Background())
2606}
2607
2608// NotDone returns true if the page enumeration should be started or is not yet complete.
2609func (page WorkspaceListResultPage) NotDone() bool {
2610	return !page.wlr.IsEmpty()
2611}
2612
2613// Response returns the raw server response from the last page request.
2614func (page WorkspaceListResultPage) Response() WorkspaceListResult {
2615	return page.wlr
2616}
2617
2618// Values returns the slice of values for the current page or nil if there are no values.
2619func (page WorkspaceListResultPage) Values() []Workspace {
2620	if page.wlr.IsEmpty() {
2621		return nil
2622	}
2623	return *page.wlr.Value
2624}
2625
2626// Creates a new instance of the WorkspaceListResultPage type.
2627func NewWorkspaceListResultPage(cur WorkspaceListResult, getNextPage func(context.Context, WorkspaceListResult) (WorkspaceListResult, error)) WorkspaceListResultPage {
2628	return WorkspaceListResultPage{
2629		fn:  getNextPage,
2630		wlr: cur,
2631	}
2632}
2633
2634// WorkspaceProperties the properties of a machine learning workspace.
2635type WorkspaceProperties struct {
2636	// WorkspaceID - READ-ONLY; The immutable id associated with this workspace.
2637	WorkspaceID *string `json:"workspaceId,omitempty"`
2638	// Description - The description of this workspace.
2639	Description *string `json:"description,omitempty"`
2640	// FriendlyName - The friendly name for this workspace. This name in mutable
2641	FriendlyName *string `json:"friendlyName,omitempty"`
2642	// CreationTime - READ-ONLY; The creation time of the machine learning workspace in ISO8601 format.
2643	CreationTime *date.Time `json:"creationTime,omitempty"`
2644	// KeyVault - ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created
2645	KeyVault *string `json:"keyVault,omitempty"`
2646	// ApplicationInsights - ARM id of the application insights associated with this workspace. This cannot be changed once the workspace has been created
2647	ApplicationInsights *string `json:"applicationInsights,omitempty"`
2648	// ContainerRegistry - ARM id of the container registry associated with this workspace. This cannot be changed once the workspace has been created
2649	ContainerRegistry *string `json:"containerRegistry,omitempty"`
2650	// StorageAccount - ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created
2651	StorageAccount *string `json:"storageAccount,omitempty"`
2652	// DiscoveryURL - Url for the discovery service to identify regional endpoints for machine learning experimentation services
2653	DiscoveryURL *string `json:"discoveryUrl,omitempty"`
2654	// ProvisioningState - READ-ONLY; The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
2655	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2656}
2657
2658// MarshalJSON is the custom marshaler for WorkspaceProperties.
2659func (wp WorkspaceProperties) MarshalJSON() ([]byte, error) {
2660	objectMap := make(map[string]interface{})
2661	if wp.Description != nil {
2662		objectMap["description"] = wp.Description
2663	}
2664	if wp.FriendlyName != nil {
2665		objectMap["friendlyName"] = wp.FriendlyName
2666	}
2667	if wp.KeyVault != nil {
2668		objectMap["keyVault"] = wp.KeyVault
2669	}
2670	if wp.ApplicationInsights != nil {
2671		objectMap["applicationInsights"] = wp.ApplicationInsights
2672	}
2673	if wp.ContainerRegistry != nil {
2674		objectMap["containerRegistry"] = wp.ContainerRegistry
2675	}
2676	if wp.StorageAccount != nil {
2677		objectMap["storageAccount"] = wp.StorageAccount
2678	}
2679	if wp.DiscoveryURL != nil {
2680		objectMap["discoveryUrl"] = wp.DiscoveryURL
2681	}
2682	return json.Marshal(objectMap)
2683}
2684
2685// WorkspacePropertiesUpdateParameters the parameters for updating the properties of a machine learning
2686// workspace.
2687type WorkspacePropertiesUpdateParameters struct {
2688	// Description - The description of this workspace.
2689	Description *string `json:"description,omitempty"`
2690	// FriendlyName - The friendly name for this workspace.
2691	FriendlyName *string `json:"friendlyName,omitempty"`
2692}
2693
2694// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2695// long-running operation.
2696type WorkspacesCreateOrUpdateFuture struct {
2697	azure.FutureAPI
2698	// Result returns the result of the asynchronous operation.
2699	// If the operation has not completed it will return an error.
2700	Result func(WorkspacesClient) (Workspace, error)
2701}
2702
2703// WorkspacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
2704// operation.
2705type WorkspacesDeleteFuture struct {
2706	azure.FutureAPI
2707	// Result returns the result of the asynchronous operation.
2708	// If the operation has not completed it will return an error.
2709	Result func(WorkspacesClient) (autorest.Response, error)
2710}
2711
2712// WorkspaceUpdateParameters the parameters for updating a machine learning workspace.
2713type WorkspaceUpdateParameters struct {
2714	// Tags - The resource tags for the machine learning workspace.
2715	Tags map[string]*string `json:"tags"`
2716	// WorkspacePropertiesUpdateParameters - The properties that the machine learning workspace will be updated with.
2717	*WorkspacePropertiesUpdateParameters `json:"properties,omitempty"`
2718}
2719
2720// MarshalJSON is the custom marshaler for WorkspaceUpdateParameters.
2721func (wup WorkspaceUpdateParameters) MarshalJSON() ([]byte, error) {
2722	objectMap := make(map[string]interface{})
2723	if wup.Tags != nil {
2724		objectMap["tags"] = wup.Tags
2725	}
2726	if wup.WorkspacePropertiesUpdateParameters != nil {
2727		objectMap["properties"] = wup.WorkspacePropertiesUpdateParameters
2728	}
2729	return json.Marshal(objectMap)
2730}
2731
2732// UnmarshalJSON is the custom unmarshaler for WorkspaceUpdateParameters struct.
2733func (wup *WorkspaceUpdateParameters) UnmarshalJSON(body []byte) error {
2734	var m map[string]*json.RawMessage
2735	err := json.Unmarshal(body, &m)
2736	if err != nil {
2737		return err
2738	}
2739	for k, v := range m {
2740		switch k {
2741		case "tags":
2742			if v != nil {
2743				var tags map[string]*string
2744				err = json.Unmarshal(*v, &tags)
2745				if err != nil {
2746					return err
2747				}
2748				wup.Tags = tags
2749			}
2750		case "properties":
2751			if v != nil {
2752				var workspacePropertiesUpdateParameters WorkspacePropertiesUpdateParameters
2753				err = json.Unmarshal(*v, &workspacePropertiesUpdateParameters)
2754				if err != nil {
2755					return err
2756				}
2757				wup.WorkspacePropertiesUpdateParameters = &workspacePropertiesUpdateParameters
2758			}
2759		}
2760	}
2761
2762	return nil
2763}
2764