...

Source file src/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl

     1  package dtl
     2  
     3  // Copyright (c) Microsoft Corporation. All rights reserved.
     4  // Licensed under the MIT License. See License.txt in the project root for license information.
     5  //
     6  // Code generated by Microsoft (R) AutoRest Code Generator.
     7  // Changes may cause incorrect behavior and will be lost if the code is regenerated.
     8  
     9  import (
    10  	"context"
    11  	"encoding/json"
    12  	"github.com/Azure/go-autorest/autorest"
    13  	"github.com/Azure/go-autorest/autorest/azure"
    14  	"github.com/Azure/go-autorest/autorest/date"
    15  	"github.com/Azure/go-autorest/autorest/to"
    16  	"github.com/Azure/go-autorest/tracing"
    17  	"net/http"
    18  )
    19  
    20  // The package's fully qualified name.
    21  const fqdn = "github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl"
    22  
    23  // ApplicableSchedule schedules applicable to a virtual machine. The schedules may have been defined on a
    24  // VM or on lab level.
    25  type ApplicableSchedule struct {
    26  	autorest.Response `json:"-"`
    27  	// ApplicableScheduleProperties - The properties of the resource.
    28  	*ApplicableScheduleProperties `json:"properties,omitempty"`
    29  	// ID - READ-ONLY; The identifier of the resource.
    30  	ID *string `json:"id,omitempty"`
    31  	// Name - READ-ONLY; The name of the resource.
    32  	Name *string `json:"name,omitempty"`
    33  	// Type - READ-ONLY; The type of the resource.
    34  	Type *string `json:"type,omitempty"`
    35  	// Location - The location of the resource.
    36  	Location *string `json:"location,omitempty"`
    37  	// Tags - The tags of the resource.
    38  	Tags map[string]*string `json:"tags"`
    39  }
    40  
    41  // MarshalJSON is the custom marshaler for ApplicableSchedule.
    42  func (as ApplicableSchedule) MarshalJSON() ([]byte, error) {
    43  	objectMap := make(map[string]interface{})
    44  	if as.ApplicableScheduleProperties != nil {
    45  		objectMap["properties"] = as.ApplicableScheduleProperties
    46  	}
    47  	if as.Location != nil {
    48  		objectMap["location"] = as.Location
    49  	}
    50  	if as.Tags != nil {
    51  		objectMap["tags"] = as.Tags
    52  	}
    53  	return json.Marshal(objectMap)
    54  }
    55  
    56  // UnmarshalJSON is the custom unmarshaler for ApplicableSchedule struct.
    57  func (as *ApplicableSchedule) UnmarshalJSON(body []byte) error {
    58  	var m map[string]*json.RawMessage
    59  	err := json.Unmarshal(body, &m)
    60  	if err != nil {
    61  		return err
    62  	}
    63  	for k, v := range m {
    64  		switch k {
    65  		case "properties":
    66  			if v != nil {
    67  				var applicableScheduleProperties ApplicableScheduleProperties
    68  				err = json.Unmarshal(*v, &applicableScheduleProperties)
    69  				if err != nil {
    70  					return err
    71  				}
    72  				as.ApplicableScheduleProperties = &applicableScheduleProperties
    73  			}
    74  		case "id":
    75  			if v != nil {
    76  				var ID string
    77  				err = json.Unmarshal(*v, &ID)
    78  				if err != nil {
    79  					return err
    80  				}
    81  				as.ID = &ID
    82  			}
    83  		case "name":
    84  			if v != nil {
    85  				var name string
    86  				err = json.Unmarshal(*v, &name)
    87  				if err != nil {
    88  					return err
    89  				}
    90  				as.Name = &name
    91  			}
    92  		case "type":
    93  			if v != nil {
    94  				var typeVar string
    95  				err = json.Unmarshal(*v, &typeVar)
    96  				if err != nil {
    97  					return err
    98  				}
    99  				as.Type = &typeVar
   100  			}
   101  		case "location":
   102  			if v != nil {
   103  				var location string
   104  				err = json.Unmarshal(*v, &location)
   105  				if err != nil {
   106  					return err
   107  				}
   108  				as.Location = &location
   109  			}
   110  		case "tags":
   111  			if v != nil {
   112  				var tags map[string]*string
   113  				err = json.Unmarshal(*v, &tags)
   114  				if err != nil {
   115  					return err
   116  				}
   117  				as.Tags = tags
   118  			}
   119  		}
   120  	}
   121  
   122  	return nil
   123  }
   124  
   125  // ApplicableScheduleFragment schedules applicable to a virtual machine. The schedules may have been
   126  // defined on a VM or on lab level.
   127  type ApplicableScheduleFragment struct {
   128  	// ApplicableSchedulePropertiesFragment - The properties of the resource.
   129  	*ApplicableSchedulePropertiesFragment `json:"properties,omitempty"`
   130  	// ID - READ-ONLY; The identifier of the resource.
   131  	ID *string `json:"id,omitempty"`
   132  	// Name - READ-ONLY; The name of the resource.
   133  	Name *string `json:"name,omitempty"`
   134  	// Type - READ-ONLY; The type of the resource.
   135  	Type *string `json:"type,omitempty"`
   136  	// Location - The location of the resource.
   137  	Location *string `json:"location,omitempty"`
   138  	// Tags - The tags of the resource.
   139  	Tags map[string]*string `json:"tags"`
   140  }
   141  
   142  // MarshalJSON is the custom marshaler for ApplicableScheduleFragment.
   143  func (asf ApplicableScheduleFragment) MarshalJSON() ([]byte, error) {
   144  	objectMap := make(map[string]interface{})
   145  	if asf.ApplicableSchedulePropertiesFragment != nil {
   146  		objectMap["properties"] = asf.ApplicableSchedulePropertiesFragment
   147  	}
   148  	if asf.Location != nil {
   149  		objectMap["location"] = asf.Location
   150  	}
   151  	if asf.Tags != nil {
   152  		objectMap["tags"] = asf.Tags
   153  	}
   154  	return json.Marshal(objectMap)
   155  }
   156  
   157  // UnmarshalJSON is the custom unmarshaler for ApplicableScheduleFragment struct.
   158  func (asf *ApplicableScheduleFragment) UnmarshalJSON(body []byte) error {
   159  	var m map[string]*json.RawMessage
   160  	err := json.Unmarshal(body, &m)
   161  	if err != nil {
   162  		return err
   163  	}
   164  	for k, v := range m {
   165  		switch k {
   166  		case "properties":
   167  			if v != nil {
   168  				var applicableSchedulePropertiesFragment ApplicableSchedulePropertiesFragment
   169  				err = json.Unmarshal(*v, &applicableSchedulePropertiesFragment)
   170  				if err != nil {
   171  					return err
   172  				}
   173  				asf.ApplicableSchedulePropertiesFragment = &applicableSchedulePropertiesFragment
   174  			}
   175  		case "id":
   176  			if v != nil {
   177  				var ID string
   178  				err = json.Unmarshal(*v, &ID)
   179  				if err != nil {
   180  					return err
   181  				}
   182  				asf.ID = &ID
   183  			}
   184  		case "name":
   185  			if v != nil {
   186  				var name string
   187  				err = json.Unmarshal(*v, &name)
   188  				if err != nil {
   189  					return err
   190  				}
   191  				asf.Name = &name
   192  			}
   193  		case "type":
   194  			if v != nil {
   195  				var typeVar string
   196  				err = json.Unmarshal(*v, &typeVar)
   197  				if err != nil {
   198  					return err
   199  				}
   200  				asf.Type = &typeVar
   201  			}
   202  		case "location":
   203  			if v != nil {
   204  				var location string
   205  				err = json.Unmarshal(*v, &location)
   206  				if err != nil {
   207  					return err
   208  				}
   209  				asf.Location = &location
   210  			}
   211  		case "tags":
   212  			if v != nil {
   213  				var tags map[string]*string
   214  				err = json.Unmarshal(*v, &tags)
   215  				if err != nil {
   216  					return err
   217  				}
   218  				asf.Tags = tags
   219  			}
   220  		}
   221  	}
   222  
   223  	return nil
   224  }
   225  
   226  // ApplicableScheduleProperties properties of a schedules applicable to a virtual machine.
   227  type ApplicableScheduleProperties struct {
   228  	// LabVmsShutdown - The auto-shutdown schedule, if one has been set at the lab or lab resource level.
   229  	LabVmsShutdown *Schedule `json:"labVmsShutdown,omitempty"`
   230  	// LabVmsStartup - The auto-startup schedule, if one has been set at the lab or lab resource level.
   231  	LabVmsStartup *Schedule `json:"labVmsStartup,omitempty"`
   232  }
   233  
   234  // ApplicableSchedulePropertiesFragment properties of a schedules applicable to a virtual machine.
   235  type ApplicableSchedulePropertiesFragment struct {
   236  	// LabVmsShutdown - The auto-shutdown schedule, if one has been set at the lab or lab resource level.
   237  	LabVmsShutdown *ScheduleFragment `json:"labVmsShutdown,omitempty"`
   238  	// LabVmsStartup - The auto-startup schedule, if one has been set at the lab or lab resource level.
   239  	LabVmsStartup *ScheduleFragment `json:"labVmsStartup,omitempty"`
   240  }
   241  
   242  // ApplyArtifactsRequest request body for applying artifacts to a virtual machine.
   243  type ApplyArtifactsRequest struct {
   244  	// Artifacts - The list of artifacts to apply.
   245  	Artifacts *[]ArtifactInstallProperties `json:"artifacts,omitempty"`
   246  }
   247  
   248  // ArmTemplate an Azure Resource Manager template.
   249  type ArmTemplate struct {
   250  	autorest.Response `json:"-"`
   251  	// ArmTemplateProperties - The properties of the resource.
   252  	*ArmTemplateProperties `json:"properties,omitempty"`
   253  	// ID - READ-ONLY; The identifier of the resource.
   254  	ID *string `json:"id,omitempty"`
   255  	// Name - READ-ONLY; The name of the resource.
   256  	Name *string `json:"name,omitempty"`
   257  	// Type - READ-ONLY; The type of the resource.
   258  	Type *string `json:"type,omitempty"`
   259  	// Location - The location of the resource.
   260  	Location *string `json:"location,omitempty"`
   261  	// Tags - The tags of the resource.
   262  	Tags map[string]*string `json:"tags"`
   263  }
   264  
   265  // MarshalJSON is the custom marshaler for ArmTemplate.
   266  func (at ArmTemplate) MarshalJSON() ([]byte, error) {
   267  	objectMap := make(map[string]interface{})
   268  	if at.ArmTemplateProperties != nil {
   269  		objectMap["properties"] = at.ArmTemplateProperties
   270  	}
   271  	if at.Location != nil {
   272  		objectMap["location"] = at.Location
   273  	}
   274  	if at.Tags != nil {
   275  		objectMap["tags"] = at.Tags
   276  	}
   277  	return json.Marshal(objectMap)
   278  }
   279  
   280  // UnmarshalJSON is the custom unmarshaler for ArmTemplate struct.
   281  func (at *ArmTemplate) UnmarshalJSON(body []byte) error {
   282  	var m map[string]*json.RawMessage
   283  	err := json.Unmarshal(body, &m)
   284  	if err != nil {
   285  		return err
   286  	}
   287  	for k, v := range m {
   288  		switch k {
   289  		case "properties":
   290  			if v != nil {
   291  				var armTemplateProperties ArmTemplateProperties
   292  				err = json.Unmarshal(*v, &armTemplateProperties)
   293  				if err != nil {
   294  					return err
   295  				}
   296  				at.ArmTemplateProperties = &armTemplateProperties
   297  			}
   298  		case "id":
   299  			if v != nil {
   300  				var ID string
   301  				err = json.Unmarshal(*v, &ID)
   302  				if err != nil {
   303  					return err
   304  				}
   305  				at.ID = &ID
   306  			}
   307  		case "name":
   308  			if v != nil {
   309  				var name string
   310  				err = json.Unmarshal(*v, &name)
   311  				if err != nil {
   312  					return err
   313  				}
   314  				at.Name = &name
   315  			}
   316  		case "type":
   317  			if v != nil {
   318  				var typeVar string
   319  				err = json.Unmarshal(*v, &typeVar)
   320  				if err != nil {
   321  					return err
   322  				}
   323  				at.Type = &typeVar
   324  			}
   325  		case "location":
   326  			if v != nil {
   327  				var location string
   328  				err = json.Unmarshal(*v, &location)
   329  				if err != nil {
   330  					return err
   331  				}
   332  				at.Location = &location
   333  			}
   334  		case "tags":
   335  			if v != nil {
   336  				var tags map[string]*string
   337  				err = json.Unmarshal(*v, &tags)
   338  				if err != nil {
   339  					return err
   340  				}
   341  				at.Tags = tags
   342  			}
   343  		}
   344  	}
   345  
   346  	return nil
   347  }
   348  
   349  // ArmTemplateInfo information about a generated ARM template.
   350  type ArmTemplateInfo struct {
   351  	autorest.Response `json:"-"`
   352  	// Template - The template's contents.
   353  	Template interface{} `json:"template,omitempty"`
   354  	// Parameters - The parameters of the ARM template.
   355  	Parameters interface{} `json:"parameters,omitempty"`
   356  }
   357  
   358  // ArmTemplateParameterProperties properties of an Azure Resource Manager template parameter.
   359  type ArmTemplateParameterProperties struct {
   360  	// Name - The name of the template parameter.
   361  	Name *string `json:"name,omitempty"`
   362  	// Value - The value of the template parameter.
   363  	Value *string `json:"value,omitempty"`
   364  }
   365  
   366  // ArmTemplateProperties properties of an Azure Resource Manager template.
   367  type ArmTemplateProperties struct {
   368  	// DisplayName - READ-ONLY; The display name of the ARM template.
   369  	DisplayName *string `json:"displayName,omitempty"`
   370  	// Description - READ-ONLY; The description of the ARM template.
   371  	Description *string `json:"description,omitempty"`
   372  	// Publisher - READ-ONLY; The publisher of the ARM template.
   373  	Publisher *string `json:"publisher,omitempty"`
   374  	// Icon - READ-ONLY; The URI to the icon of the ARM template.
   375  	Icon *string `json:"icon,omitempty"`
   376  	// Contents - READ-ONLY; The contents of the ARM template.
   377  	Contents interface{} `json:"contents,omitempty"`
   378  	// CreatedDate - READ-ONLY; The creation date of the armTemplate.
   379  	CreatedDate *date.Time `json:"createdDate,omitempty"`
   380  	// ParametersValueFilesInfo - READ-ONLY; File name and parameter values information from all azuredeploy.*.parameters.json for the ARM template.
   381  	ParametersValueFilesInfo *[]ParametersValueFileInfo `json:"parametersValueFilesInfo,omitempty"`
   382  }
   383  
   384  // MarshalJSON is the custom marshaler for ArmTemplateProperties.
   385  func (atp ArmTemplateProperties) MarshalJSON() ([]byte, error) {
   386  	objectMap := make(map[string]interface{})
   387  	return json.Marshal(objectMap)
   388  }
   389  
   390  // Artifact an artifact.
   391  type Artifact struct {
   392  	autorest.Response `json:"-"`
   393  	// ArtifactProperties - The properties of the resource.
   394  	*ArtifactProperties `json:"properties,omitempty"`
   395  	// ID - READ-ONLY; The identifier of the resource.
   396  	ID *string `json:"id,omitempty"`
   397  	// Name - READ-ONLY; The name of the resource.
   398  	Name *string `json:"name,omitempty"`
   399  	// Type - READ-ONLY; The type of the resource.
   400  	Type *string `json:"type,omitempty"`
   401  	// Location - The location of the resource.
   402  	Location *string `json:"location,omitempty"`
   403  	// Tags - The tags of the resource.
   404  	Tags map[string]*string `json:"tags"`
   405  }
   406  
   407  // MarshalJSON is the custom marshaler for Artifact.
   408  func (a Artifact) MarshalJSON() ([]byte, error) {
   409  	objectMap := make(map[string]interface{})
   410  	if a.ArtifactProperties != nil {
   411  		objectMap["properties"] = a.ArtifactProperties
   412  	}
   413  	if a.Location != nil {
   414  		objectMap["location"] = a.Location
   415  	}
   416  	if a.Tags != nil {
   417  		objectMap["tags"] = a.Tags
   418  	}
   419  	return json.Marshal(objectMap)
   420  }
   421  
   422  // UnmarshalJSON is the custom unmarshaler for Artifact struct.
   423  func (a *Artifact) UnmarshalJSON(body []byte) error {
   424  	var m map[string]*json.RawMessage
   425  	err := json.Unmarshal(body, &m)
   426  	if err != nil {
   427  		return err
   428  	}
   429  	for k, v := range m {
   430  		switch k {
   431  		case "properties":
   432  			if v != nil {
   433  				var artifactProperties ArtifactProperties
   434  				err = json.Unmarshal(*v, &artifactProperties)
   435  				if err != nil {
   436  					return err
   437  				}
   438  				a.ArtifactProperties = &artifactProperties
   439  			}
   440  		case "id":
   441  			if v != nil {
   442  				var ID string
   443  				err = json.Unmarshal(*v, &ID)
   444  				if err != nil {
   445  					return err
   446  				}
   447  				a.ID = &ID
   448  			}
   449  		case "name":
   450  			if v != nil {
   451  				var name string
   452  				err = json.Unmarshal(*v, &name)
   453  				if err != nil {
   454  					return err
   455  				}
   456  				a.Name = &name
   457  			}
   458  		case "type":
   459  			if v != nil {
   460  				var typeVar string
   461  				err = json.Unmarshal(*v, &typeVar)
   462  				if err != nil {
   463  					return err
   464  				}
   465  				a.Type = &typeVar
   466  			}
   467  		case "location":
   468  			if v != nil {
   469  				var location string
   470  				err = json.Unmarshal(*v, &location)
   471  				if err != nil {
   472  					return err
   473  				}
   474  				a.Location = &location
   475  			}
   476  		case "tags":
   477  			if v != nil {
   478  				var tags map[string]*string
   479  				err = json.Unmarshal(*v, &tags)
   480  				if err != nil {
   481  					return err
   482  				}
   483  				a.Tags = tags
   484  			}
   485  		}
   486  	}
   487  
   488  	return nil
   489  }
   490  
   491  // ArtifactDeploymentStatusProperties properties of an artifact deployment.
   492  type ArtifactDeploymentStatusProperties struct {
   493  	// DeploymentStatus - The deployment status of the artifact.
   494  	DeploymentStatus *string `json:"deploymentStatus,omitempty"`
   495  	// ArtifactsApplied - The total count of the artifacts that were successfully applied.
   496  	ArtifactsApplied *int32 `json:"artifactsApplied,omitempty"`
   497  	// TotalArtifacts - The total count of the artifacts that were tentatively applied.
   498  	TotalArtifacts *int32 `json:"totalArtifacts,omitempty"`
   499  }
   500  
   501  // ArtifactDeploymentStatusPropertiesFragment properties of an artifact deployment.
   502  type ArtifactDeploymentStatusPropertiesFragment struct {
   503  	// DeploymentStatus - The deployment status of the artifact.
   504  	DeploymentStatus *string `json:"deploymentStatus,omitempty"`
   505  	// ArtifactsApplied - The total count of the artifacts that were successfully applied.
   506  	ArtifactsApplied *int32 `json:"artifactsApplied,omitempty"`
   507  	// TotalArtifacts - The total count of the artifacts that were tentatively applied.
   508  	TotalArtifacts *int32 `json:"totalArtifacts,omitempty"`
   509  }
   510  
   511  // ArtifactInstallProperties properties of an artifact.
   512  type ArtifactInstallProperties struct {
   513  	// ArtifactID - The artifact's identifier.
   514  	ArtifactID *string `json:"artifactId,omitempty"`
   515  	// Parameters - The parameters of the artifact.
   516  	Parameters *[]ArtifactParameterProperties `json:"parameters,omitempty"`
   517  	// Status - The status of the artifact.
   518  	Status *string `json:"status,omitempty"`
   519  	// DeploymentStatusMessage - The status message from the deployment.
   520  	DeploymentStatusMessage *string `json:"deploymentStatusMessage,omitempty"`
   521  	// VMExtensionStatusMessage - The status message from the virtual machine extension.
   522  	VMExtensionStatusMessage *string `json:"vmExtensionStatusMessage,omitempty"`
   523  	// InstallTime - The time that the artifact starts to install on the virtual machine.
   524  	InstallTime *date.Time `json:"installTime,omitempty"`
   525  }
   526  
   527  // ArtifactInstallPropertiesFragment properties of an artifact.
   528  type ArtifactInstallPropertiesFragment struct {
   529  	// ArtifactID - The artifact's identifier.
   530  	ArtifactID *string `json:"artifactId,omitempty"`
   531  	// Parameters - The parameters of the artifact.
   532  	Parameters *[]ArtifactParameterPropertiesFragment `json:"parameters,omitempty"`
   533  	// Status - The status of the artifact.
   534  	Status *string `json:"status,omitempty"`
   535  	// DeploymentStatusMessage - The status message from the deployment.
   536  	DeploymentStatusMessage *string `json:"deploymentStatusMessage,omitempty"`
   537  	// VMExtensionStatusMessage - The status message from the virtual machine extension.
   538  	VMExtensionStatusMessage *string `json:"vmExtensionStatusMessage,omitempty"`
   539  	// InstallTime - The time that the artifact starts to install on the virtual machine.
   540  	InstallTime *date.Time `json:"installTime,omitempty"`
   541  }
   542  
   543  // ArtifactParameterProperties properties of an artifact parameter.
   544  type ArtifactParameterProperties struct {
   545  	// Name - The name of the artifact parameter.
   546  	Name *string `json:"name,omitempty"`
   547  	// Value - The value of the artifact parameter.
   548  	Value *string `json:"value,omitempty"`
   549  }
   550  
   551  // ArtifactParameterPropertiesFragment properties of an artifact parameter.
   552  type ArtifactParameterPropertiesFragment struct {
   553  	// Name - The name of the artifact parameter.
   554  	Name *string `json:"name,omitempty"`
   555  	// Value - The value of the artifact parameter.
   556  	Value *string `json:"value,omitempty"`
   557  }
   558  
   559  // ArtifactProperties properties of an artifact.
   560  type ArtifactProperties struct {
   561  	// Title - READ-ONLY; The artifact's title.
   562  	Title *string `json:"title,omitempty"`
   563  	// Description - READ-ONLY; The artifact's description.
   564  	Description *string `json:"description,omitempty"`
   565  	// Publisher - READ-ONLY; The artifact's publisher.
   566  	Publisher *string `json:"publisher,omitempty"`
   567  	// FilePath - READ-ONLY; The file path to the artifact.
   568  	FilePath *string `json:"filePath,omitempty"`
   569  	// Icon - READ-ONLY; The URI to the artifact icon.
   570  	Icon *string `json:"icon,omitempty"`
   571  	// TargetOsType - READ-ONLY; The artifact's target OS.
   572  	TargetOsType *string `json:"targetOsType,omitempty"`
   573  	// Parameters - READ-ONLY; The artifact's parameters.
   574  	Parameters interface{} `json:"parameters,omitempty"`
   575  	// CreatedDate - READ-ONLY; The artifact's creation date.
   576  	CreatedDate *date.Time `json:"createdDate,omitempty"`
   577  }
   578  
   579  // MarshalJSON is the custom marshaler for ArtifactProperties.
   580  func (ap ArtifactProperties) MarshalJSON() ([]byte, error) {
   581  	objectMap := make(map[string]interface{})
   582  	return json.Marshal(objectMap)
   583  }
   584  
   585  // ArtifactSource properties of an artifact source.
   586  type ArtifactSource struct {
   587  	autorest.Response `json:"-"`
   588  	// ArtifactSourceProperties - The properties of the resource.
   589  	*ArtifactSourceProperties `json:"properties,omitempty"`
   590  	// ID - READ-ONLY; The identifier of the resource.
   591  	ID *string `json:"id,omitempty"`
   592  	// Name - READ-ONLY; The name of the resource.
   593  	Name *string `json:"name,omitempty"`
   594  	// Type - READ-ONLY; The type of the resource.
   595  	Type *string `json:"type,omitempty"`
   596  	// Location - The location of the resource.
   597  	Location *string `json:"location,omitempty"`
   598  	// Tags - The tags of the resource.
   599  	Tags map[string]*string `json:"tags"`
   600  }
   601  
   602  // MarshalJSON is the custom marshaler for ArtifactSource.
   603  func (as ArtifactSource) MarshalJSON() ([]byte, error) {
   604  	objectMap := make(map[string]interface{})
   605  	if as.ArtifactSourceProperties != nil {
   606  		objectMap["properties"] = as.ArtifactSourceProperties
   607  	}
   608  	if as.Location != nil {
   609  		objectMap["location"] = as.Location
   610  	}
   611  	if as.Tags != nil {
   612  		objectMap["tags"] = as.Tags
   613  	}
   614  	return json.Marshal(objectMap)
   615  }
   616  
   617  // UnmarshalJSON is the custom unmarshaler for ArtifactSource struct.
   618  func (as *ArtifactSource) UnmarshalJSON(body []byte) error {
   619  	var m map[string]*json.RawMessage
   620  	err := json.Unmarshal(body, &m)
   621  	if err != nil {
   622  		return err
   623  	}
   624  	for k, v := range m {
   625  		switch k {
   626  		case "properties":
   627  			if v != nil {
   628  				var artifactSourceProperties ArtifactSourceProperties
   629  				err = json.Unmarshal(*v, &artifactSourceProperties)
   630  				if err != nil {
   631  					return err
   632  				}
   633  				as.ArtifactSourceProperties = &artifactSourceProperties
   634  			}
   635  		case "id":
   636  			if v != nil {
   637  				var ID string
   638  				err = json.Unmarshal(*v, &ID)
   639  				if err != nil {
   640  					return err
   641  				}
   642  				as.ID = &ID
   643  			}
   644  		case "name":
   645  			if v != nil {
   646  				var name string
   647  				err = json.Unmarshal(*v, &name)
   648  				if err != nil {
   649  					return err
   650  				}
   651  				as.Name = &name
   652  			}
   653  		case "type":
   654  			if v != nil {
   655  				var typeVar string
   656  				err = json.Unmarshal(*v, &typeVar)
   657  				if err != nil {
   658  					return err
   659  				}
   660  				as.Type = &typeVar
   661  			}
   662  		case "location":
   663  			if v != nil {
   664  				var location string
   665  				err = json.Unmarshal(*v, &location)
   666  				if err != nil {
   667  					return err
   668  				}
   669  				as.Location = &location
   670  			}
   671  		case "tags":
   672  			if v != nil {
   673  				var tags map[string]*string
   674  				err = json.Unmarshal(*v, &tags)
   675  				if err != nil {
   676  					return err
   677  				}
   678  				as.Tags = tags
   679  			}
   680  		}
   681  	}
   682  
   683  	return nil
   684  }
   685  
   686  // ArtifactSourceFragment properties of an artifact source.
   687  type ArtifactSourceFragment struct {
   688  	// ArtifactSourcePropertiesFragment - The properties of the resource.
   689  	*ArtifactSourcePropertiesFragment `json:"properties,omitempty"`
   690  	// ID - READ-ONLY; The identifier of the resource.
   691  	ID *string `json:"id,omitempty"`
   692  	// Name - READ-ONLY; The name of the resource.
   693  	Name *string `json:"name,omitempty"`
   694  	// Type - READ-ONLY; The type of the resource.
   695  	Type *string `json:"type,omitempty"`
   696  	// Location - The location of the resource.
   697  	Location *string `json:"location,omitempty"`
   698  	// Tags - The tags of the resource.
   699  	Tags map[string]*string `json:"tags"`
   700  }
   701  
   702  // MarshalJSON is the custom marshaler for ArtifactSourceFragment.
   703  func (asf ArtifactSourceFragment) MarshalJSON() ([]byte, error) {
   704  	objectMap := make(map[string]interface{})
   705  	if asf.ArtifactSourcePropertiesFragment != nil {
   706  		objectMap["properties"] = asf.ArtifactSourcePropertiesFragment
   707  	}
   708  	if asf.Location != nil {
   709  		objectMap["location"] = asf.Location
   710  	}
   711  	if asf.Tags != nil {
   712  		objectMap["tags"] = asf.Tags
   713  	}
   714  	return json.Marshal(objectMap)
   715  }
   716  
   717  // UnmarshalJSON is the custom unmarshaler for ArtifactSourceFragment struct.
   718  func (asf *ArtifactSourceFragment) UnmarshalJSON(body []byte) error {
   719  	var m map[string]*json.RawMessage
   720  	err := json.Unmarshal(body, &m)
   721  	if err != nil {
   722  		return err
   723  	}
   724  	for k, v := range m {
   725  		switch k {
   726  		case "properties":
   727  			if v != nil {
   728  				var artifactSourcePropertiesFragment ArtifactSourcePropertiesFragment
   729  				err = json.Unmarshal(*v, &artifactSourcePropertiesFragment)
   730  				if err != nil {
   731  					return err
   732  				}
   733  				asf.ArtifactSourcePropertiesFragment = &artifactSourcePropertiesFragment
   734  			}
   735  		case "id":
   736  			if v != nil {
   737  				var ID string
   738  				err = json.Unmarshal(*v, &ID)
   739  				if err != nil {
   740  					return err
   741  				}
   742  				asf.ID = &ID
   743  			}
   744  		case "name":
   745  			if v != nil {
   746  				var name string
   747  				err = json.Unmarshal(*v, &name)
   748  				if err != nil {
   749  					return err
   750  				}
   751  				asf.Name = &name
   752  			}
   753  		case "type":
   754  			if v != nil {
   755  				var typeVar string
   756  				err = json.Unmarshal(*v, &typeVar)
   757  				if err != nil {
   758  					return err
   759  				}
   760  				asf.Type = &typeVar
   761  			}
   762  		case "location":
   763  			if v != nil {
   764  				var location string
   765  				err = json.Unmarshal(*v, &location)
   766  				if err != nil {
   767  					return err
   768  				}
   769  				asf.Location = &location
   770  			}
   771  		case "tags":
   772  			if v != nil {
   773  				var tags map[string]*string
   774  				err = json.Unmarshal(*v, &tags)
   775  				if err != nil {
   776  					return err
   777  				}
   778  				asf.Tags = tags
   779  			}
   780  		}
   781  	}
   782  
   783  	return nil
   784  }
   785  
   786  // ArtifactSourceProperties properties of an artifact source.
   787  type ArtifactSourceProperties struct {
   788  	// DisplayName - The artifact source's display name.
   789  	DisplayName *string `json:"displayName,omitempty"`
   790  	// URI - The artifact source's URI.
   791  	URI *string `json:"uri,omitempty"`
   792  	// SourceType - The artifact source's type. Possible values include: 'VsoGit', 'GitHub'
   793  	SourceType SourceControlType `json:"sourceType,omitempty"`
   794  	// FolderPath - The folder containing artifacts.
   795  	FolderPath *string `json:"folderPath,omitempty"`
   796  	// ArmTemplateFolderPath - The folder containing Azure Resource Manager templates.
   797  	ArmTemplateFolderPath *string `json:"armTemplateFolderPath,omitempty"`
   798  	// BranchRef - The artifact source's branch reference.
   799  	BranchRef *string `json:"branchRef,omitempty"`
   800  	// SecurityToken - The security token to authenticate to the artifact source.
   801  	SecurityToken *string `json:"securityToken,omitempty"`
   802  	// Status - Indicates if the artifact source is enabled (values: Enabled, Disabled). Possible values include: 'EnableStatusEnabled', 'EnableStatusDisabled'
   803  	Status EnableStatus `json:"status,omitempty"`
   804  	// CreatedDate - READ-ONLY; The artifact source's creation date.
   805  	CreatedDate *date.Time `json:"createdDate,omitempty"`
   806  	// ProvisioningState - The provisioning status of the resource.
   807  	ProvisioningState *string `json:"provisioningState,omitempty"`
   808  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
   809  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
   810  }
   811  
   812  // MarshalJSON is the custom marshaler for ArtifactSourceProperties.
   813  func (asp ArtifactSourceProperties) MarshalJSON() ([]byte, error) {
   814  	objectMap := make(map[string]interface{})
   815  	if asp.DisplayName != nil {
   816  		objectMap["displayName"] = asp.DisplayName
   817  	}
   818  	if asp.URI != nil {
   819  		objectMap["uri"] = asp.URI
   820  	}
   821  	if asp.SourceType != "" {
   822  		objectMap["sourceType"] = asp.SourceType
   823  	}
   824  	if asp.FolderPath != nil {
   825  		objectMap["folderPath"] = asp.FolderPath
   826  	}
   827  	if asp.ArmTemplateFolderPath != nil {
   828  		objectMap["armTemplateFolderPath"] = asp.ArmTemplateFolderPath
   829  	}
   830  	if asp.BranchRef != nil {
   831  		objectMap["branchRef"] = asp.BranchRef
   832  	}
   833  	if asp.SecurityToken != nil {
   834  		objectMap["securityToken"] = asp.SecurityToken
   835  	}
   836  	if asp.Status != "" {
   837  		objectMap["status"] = asp.Status
   838  	}
   839  	if asp.ProvisioningState != nil {
   840  		objectMap["provisioningState"] = asp.ProvisioningState
   841  	}
   842  	if asp.UniqueIdentifier != nil {
   843  		objectMap["uniqueIdentifier"] = asp.UniqueIdentifier
   844  	}
   845  	return json.Marshal(objectMap)
   846  }
   847  
   848  // ArtifactSourcePropertiesFragment properties of an artifact source.
   849  type ArtifactSourcePropertiesFragment struct {
   850  	// DisplayName - The artifact source's display name.
   851  	DisplayName *string `json:"displayName,omitempty"`
   852  	// URI - The artifact source's URI.
   853  	URI *string `json:"uri,omitempty"`
   854  	// SourceType - The artifact source's type. Possible values include: 'VsoGit', 'GitHub'
   855  	SourceType SourceControlType `json:"sourceType,omitempty"`
   856  	// FolderPath - The folder containing artifacts.
   857  	FolderPath *string `json:"folderPath,omitempty"`
   858  	// ArmTemplateFolderPath - The folder containing Azure Resource Manager templates.
   859  	ArmTemplateFolderPath *string `json:"armTemplateFolderPath,omitempty"`
   860  	// BranchRef - The artifact source's branch reference.
   861  	BranchRef *string `json:"branchRef,omitempty"`
   862  	// SecurityToken - The security token to authenticate to the artifact source.
   863  	SecurityToken *string `json:"securityToken,omitempty"`
   864  	// Status - Indicates if the artifact source is enabled (values: Enabled, Disabled). Possible values include: 'EnableStatusEnabled', 'EnableStatusDisabled'
   865  	Status EnableStatus `json:"status,omitempty"`
   866  	// ProvisioningState - The provisioning status of the resource.
   867  	ProvisioningState *string `json:"provisioningState,omitempty"`
   868  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
   869  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
   870  }
   871  
   872  // AttachDiskProperties properties of the disk to attach.
   873  type AttachDiskProperties struct {
   874  	// LeasedByLabVMID - The resource ID of the Lab virtual machine to which the disk is attached.
   875  	LeasedByLabVMID *string `json:"leasedByLabVmId,omitempty"`
   876  }
   877  
   878  // AttachNewDataDiskOptions properties to attach new disk to the Virtual Machine.
   879  type AttachNewDataDiskOptions struct {
   880  	// DiskSizeGiB - Size of the disk to be attached in Gibibytes.
   881  	DiskSizeGiB *int32 `json:"diskSizeGiB,omitempty"`
   882  	// DiskName - The name of the disk to be attached.
   883  	DiskName *string `json:"diskName,omitempty"`
   884  	// DiskType - The storage type for the disk (i.e. Standard, Premium). Possible values include: 'Standard', 'Premium'
   885  	DiskType StorageType `json:"diskType,omitempty"`
   886  }
   887  
   888  // BulkCreationParameters parameters for creating multiple virtual machines as a single action.
   889  type BulkCreationParameters struct {
   890  	// InstanceCount - The number of virtual machine instances to create.
   891  	InstanceCount *int32 `json:"instanceCount,omitempty"`
   892  }
   893  
   894  // CloudError error from a REST request.
   895  type CloudError struct {
   896  	Error *CloudErrorBody `json:"error,omitempty"`
   897  }
   898  
   899  // CloudErrorBody body of an error from a REST request.
   900  type CloudErrorBody struct {
   901  	Code    *string `json:"code,omitempty"`
   902  	Message *string `json:"message,omitempty"`
   903  	Target  *string `json:"target,omitempty"`
   904  	// Details - Inner errors.
   905  	Details *[]CloudErrorBody `json:"details,omitempty"`
   906  }
   907  
   908  // ComputeDataDisk a data disks attached to a virtual machine.
   909  type ComputeDataDisk struct {
   910  	// Name - Gets data disk name.
   911  	Name *string `json:"name,omitempty"`
   912  	// DiskURI - When backed by a blob, the URI of underlying blob.
   913  	DiskURI *string `json:"diskUri,omitempty"`
   914  	// ManagedDiskID - When backed by managed disk, this is the ID of the compute disk resource.
   915  	ManagedDiskID *string `json:"managedDiskId,omitempty"`
   916  	// DiskSizeGiB - Gets data disk size in GiB.
   917  	DiskSizeGiB *int32 `json:"diskSizeGiB,omitempty"`
   918  }
   919  
   920  // ComputeDataDiskFragment a data disks attached to a virtual machine.
   921  type ComputeDataDiskFragment struct {
   922  	// Name - Gets data disk name.
   923  	Name *string `json:"name,omitempty"`
   924  	// DiskURI - When backed by a blob, the URI of underlying blob.
   925  	DiskURI *string `json:"diskUri,omitempty"`
   926  	// ManagedDiskID - When backed by managed disk, this is the ID of the compute disk resource.
   927  	ManagedDiskID *string `json:"managedDiskId,omitempty"`
   928  	// DiskSizeGiB - Gets data disk size in GiB.
   929  	DiskSizeGiB *int32 `json:"diskSizeGiB,omitempty"`
   930  }
   931  
   932  // ComputeVMInstanceViewStatus status information about a virtual machine.
   933  type ComputeVMInstanceViewStatus struct {
   934  	// Code - Gets the status Code.
   935  	Code *string `json:"code,omitempty"`
   936  	// DisplayStatus - Gets the short localizable label for the status.
   937  	DisplayStatus *string `json:"displayStatus,omitempty"`
   938  	// Message - Gets the message associated with the status.
   939  	Message *string `json:"message,omitempty"`
   940  }
   941  
   942  // ComputeVMInstanceViewStatusFragment status information about a virtual machine.
   943  type ComputeVMInstanceViewStatusFragment struct {
   944  	// Code - Gets the status Code.
   945  	Code *string `json:"code,omitempty"`
   946  	// DisplayStatus - Gets the short localizable label for the status.
   947  	DisplayStatus *string `json:"displayStatus,omitempty"`
   948  	// Message - Gets the message associated with the status.
   949  	Message *string `json:"message,omitempty"`
   950  }
   951  
   952  // ComputeVMProperties properties of a virtual machine returned by the Microsoft.Compute API.
   953  type ComputeVMProperties struct {
   954  	// Statuses - Gets the statuses of the virtual machine.
   955  	Statuses *[]ComputeVMInstanceViewStatus `json:"statuses,omitempty"`
   956  	// OsType - Gets the OS type of the virtual machine.
   957  	OsType *string `json:"osType,omitempty"`
   958  	// VMSize - Gets the size of the virtual machine.
   959  	VMSize *string `json:"vmSize,omitempty"`
   960  	// NetworkInterfaceID - Gets the network interface ID of the virtual machine.
   961  	NetworkInterfaceID *string `json:"networkInterfaceId,omitempty"`
   962  	// OsDiskID - Gets OS disk blob uri for the virtual machine.
   963  	OsDiskID *string `json:"osDiskId,omitempty"`
   964  	// DataDiskIds - Gets data disks blob uri for the virtual machine.
   965  	DataDiskIds *[]string `json:"dataDiskIds,omitempty"`
   966  	// DataDisks - Gets all data disks attached to the virtual machine.
   967  	DataDisks *[]ComputeDataDisk `json:"dataDisks,omitempty"`
   968  }
   969  
   970  // ComputeVMPropertiesFragment properties of a virtual machine returned by the Microsoft.Compute API.
   971  type ComputeVMPropertiesFragment struct {
   972  	// Statuses - Gets the statuses of the virtual machine.
   973  	Statuses *[]ComputeVMInstanceViewStatusFragment `json:"statuses,omitempty"`
   974  	// OsType - Gets the OS type of the virtual machine.
   975  	OsType *string `json:"osType,omitempty"`
   976  	// VMSize - Gets the size of the virtual machine.
   977  	VMSize *string `json:"vmSize,omitempty"`
   978  	// NetworkInterfaceID - Gets the network interface ID of the virtual machine.
   979  	NetworkInterfaceID *string `json:"networkInterfaceId,omitempty"`
   980  	// OsDiskID - Gets OS disk blob uri for the virtual machine.
   981  	OsDiskID *string `json:"osDiskId,omitempty"`
   982  	// DataDiskIds - Gets data disks blob uri for the virtual machine.
   983  	DataDiskIds *[]string `json:"dataDiskIds,omitempty"`
   984  	// DataDisks - Gets all data disks attached to the virtual machine.
   985  	DataDisks *[]ComputeDataDiskFragment `json:"dataDisks,omitempty"`
   986  }
   987  
   988  // CostThresholdProperties properties of a cost threshold item.
   989  type CostThresholdProperties struct {
   990  	// ThresholdID - The ID of the cost threshold item.
   991  	ThresholdID *string `json:"thresholdId,omitempty"`
   992  	// PercentageThreshold - The value of the percentage cost threshold.
   993  	PercentageThreshold *PercentageCostThresholdProperties `json:"percentageThreshold,omitempty"`
   994  	// DisplayOnChart - Indicates whether this threshold will be displayed on cost charts. Possible values include: 'Enabled', 'Disabled'
   995  	DisplayOnChart CostThresholdStatus `json:"displayOnChart,omitempty"`
   996  	// SendNotificationWhenExceeded - Indicates whether notifications will be sent when this threshold is exceeded. Possible values include: 'Enabled', 'Disabled'
   997  	SendNotificationWhenExceeded CostThresholdStatus `json:"sendNotificationWhenExceeded,omitempty"`
   998  	// NotificationSent - Indicates the datetime when notifications were last sent for this threshold.
   999  	NotificationSent *string `json:"notificationSent,omitempty"`
  1000  }
  1001  
  1002  // CustomImage a custom image.
  1003  type CustomImage struct {
  1004  	autorest.Response `json:"-"`
  1005  	// CustomImageProperties - The properties of the resource.
  1006  	*CustomImageProperties `json:"properties,omitempty"`
  1007  	// ID - READ-ONLY; The identifier of the resource.
  1008  	ID *string `json:"id,omitempty"`
  1009  	// Name - READ-ONLY; The name of the resource.
  1010  	Name *string `json:"name,omitempty"`
  1011  	// Type - READ-ONLY; The type of the resource.
  1012  	Type *string `json:"type,omitempty"`
  1013  	// Location - The location of the resource.
  1014  	Location *string `json:"location,omitempty"`
  1015  	// Tags - The tags of the resource.
  1016  	Tags map[string]*string `json:"tags"`
  1017  }
  1018  
  1019  // MarshalJSON is the custom marshaler for CustomImage.
  1020  func (ci CustomImage) MarshalJSON() ([]byte, error) {
  1021  	objectMap := make(map[string]interface{})
  1022  	if ci.CustomImageProperties != nil {
  1023  		objectMap["properties"] = ci.CustomImageProperties
  1024  	}
  1025  	if ci.Location != nil {
  1026  		objectMap["location"] = ci.Location
  1027  	}
  1028  	if ci.Tags != nil {
  1029  		objectMap["tags"] = ci.Tags
  1030  	}
  1031  	return json.Marshal(objectMap)
  1032  }
  1033  
  1034  // UnmarshalJSON is the custom unmarshaler for CustomImage struct.
  1035  func (ci *CustomImage) UnmarshalJSON(body []byte) error {
  1036  	var m map[string]*json.RawMessage
  1037  	err := json.Unmarshal(body, &m)
  1038  	if err != nil {
  1039  		return err
  1040  	}
  1041  	for k, v := range m {
  1042  		switch k {
  1043  		case "properties":
  1044  			if v != nil {
  1045  				var customImageProperties CustomImageProperties
  1046  				err = json.Unmarshal(*v, &customImageProperties)
  1047  				if err != nil {
  1048  					return err
  1049  				}
  1050  				ci.CustomImageProperties = &customImageProperties
  1051  			}
  1052  		case "id":
  1053  			if v != nil {
  1054  				var ID string
  1055  				err = json.Unmarshal(*v, &ID)
  1056  				if err != nil {
  1057  					return err
  1058  				}
  1059  				ci.ID = &ID
  1060  			}
  1061  		case "name":
  1062  			if v != nil {
  1063  				var name string
  1064  				err = json.Unmarshal(*v, &name)
  1065  				if err != nil {
  1066  					return err
  1067  				}
  1068  				ci.Name = &name
  1069  			}
  1070  		case "type":
  1071  			if v != nil {
  1072  				var typeVar string
  1073  				err = json.Unmarshal(*v, &typeVar)
  1074  				if err != nil {
  1075  					return err
  1076  				}
  1077  				ci.Type = &typeVar
  1078  			}
  1079  		case "location":
  1080  			if v != nil {
  1081  				var location string
  1082  				err = json.Unmarshal(*v, &location)
  1083  				if err != nil {
  1084  					return err
  1085  				}
  1086  				ci.Location = &location
  1087  			}
  1088  		case "tags":
  1089  			if v != nil {
  1090  				var tags map[string]*string
  1091  				err = json.Unmarshal(*v, &tags)
  1092  				if err != nil {
  1093  					return err
  1094  				}
  1095  				ci.Tags = tags
  1096  			}
  1097  		}
  1098  	}
  1099  
  1100  	return nil
  1101  }
  1102  
  1103  // CustomImageProperties properties of a custom image.
  1104  type CustomImageProperties struct {
  1105  	// VM - The virtual machine from which the image is to be created.
  1106  	VM *CustomImagePropertiesFromVM `json:"vm,omitempty"`
  1107  	// Vhd - The VHD from which the image is to be created.
  1108  	Vhd *CustomImagePropertiesCustom `json:"vhd,omitempty"`
  1109  	// Description - The description of the custom image.
  1110  	Description *string `json:"description,omitempty"`
  1111  	// Author - The author of the custom image.
  1112  	Author *string `json:"author,omitempty"`
  1113  	// CreationDate - READ-ONLY; The creation date of the custom image.
  1114  	CreationDate *date.Time `json:"creationDate,omitempty"`
  1115  	// ManagedImageID - The Managed Image Id backing the custom image.
  1116  	ManagedImageID *string `json:"managedImageId,omitempty"`
  1117  	// ProvisioningState - The provisioning status of the resource.
  1118  	ProvisioningState *string `json:"provisioningState,omitempty"`
  1119  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  1120  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  1121  }
  1122  
  1123  // MarshalJSON is the custom marshaler for CustomImageProperties.
  1124  func (cip CustomImageProperties) MarshalJSON() ([]byte, error) {
  1125  	objectMap := make(map[string]interface{})
  1126  	if cip.VM != nil {
  1127  		objectMap["vm"] = cip.VM
  1128  	}
  1129  	if cip.Vhd != nil {
  1130  		objectMap["vhd"] = cip.Vhd
  1131  	}
  1132  	if cip.Description != nil {
  1133  		objectMap["description"] = cip.Description
  1134  	}
  1135  	if cip.Author != nil {
  1136  		objectMap["author"] = cip.Author
  1137  	}
  1138  	if cip.ManagedImageID != nil {
  1139  		objectMap["managedImageId"] = cip.ManagedImageID
  1140  	}
  1141  	if cip.ProvisioningState != nil {
  1142  		objectMap["provisioningState"] = cip.ProvisioningState
  1143  	}
  1144  	if cip.UniqueIdentifier != nil {
  1145  		objectMap["uniqueIdentifier"] = cip.UniqueIdentifier
  1146  	}
  1147  	return json.Marshal(objectMap)
  1148  }
  1149  
  1150  // CustomImagePropertiesCustom properties for creating a custom image from a VHD.
  1151  type CustomImagePropertiesCustom struct {
  1152  	// ImageName - The image name.
  1153  	ImageName *string `json:"imageName,omitempty"`
  1154  	// SysPrep - Indicates whether sysprep has been run on the VHD.
  1155  	SysPrep *bool `json:"sysPrep,omitempty"`
  1156  	// OsType - The OS type of the custom image (i.e. Windows, Linux). Possible values include: 'Windows', 'Linux', 'None'
  1157  	OsType CustomImageOsType `json:"osType,omitempty"`
  1158  }
  1159  
  1160  // CustomImagePropertiesFromVM properties for creating a custom image from a virtual machine.
  1161  type CustomImagePropertiesFromVM struct {
  1162  	// SourceVMID - The source vm identifier.
  1163  	SourceVMID *string `json:"sourceVmId,omitempty"`
  1164  	// WindowsOsInfo - The Windows OS information of the VM.
  1165  	WindowsOsInfo *WindowsOsInfo `json:"windowsOsInfo,omitempty"`
  1166  	// LinuxOsInfo - The Linux OS information of the VM.
  1167  	LinuxOsInfo *LinuxOsInfo `json:"linuxOsInfo,omitempty"`
  1168  }
  1169  
  1170  // CustomImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  1171  // long-running operation.
  1172  type CustomImagesCreateOrUpdateFuture struct {
  1173  	azure.FutureAPI
  1174  	// Result returns the result of the asynchronous operation.
  1175  	// If the operation has not completed it will return an error.
  1176  	Result func(CustomImagesClient) (CustomImage, error)
  1177  }
  1178  
  1179  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1180  func (future *CustomImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  1181  	var azFuture azure.Future
  1182  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1183  		return err
  1184  	}
  1185  	future.FutureAPI = &azFuture
  1186  	future.Result = future.result
  1187  	return nil
  1188  }
  1189  
  1190  // result is the default implementation for CustomImagesCreateOrUpdateFuture.Result.
  1191  func (future *CustomImagesCreateOrUpdateFuture) result(client CustomImagesClient) (ci CustomImage, err error) {
  1192  	var done bool
  1193  	done, err = future.DoneWithContext(context.Background(), client)
  1194  	if err != nil {
  1195  		err = autorest.NewErrorWithError(err, "dtl.CustomImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  1196  		return
  1197  	}
  1198  	if !done {
  1199  		ci.Response.Response = future.Response()
  1200  		err = azure.NewAsyncOpIncompleteError("dtl.CustomImagesCreateOrUpdateFuture")
  1201  		return
  1202  	}
  1203  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1204  	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
  1205  		ci, err = client.CreateOrUpdateResponder(ci.Response.Response)
  1206  		if err != nil {
  1207  			err = autorest.NewErrorWithError(err, "dtl.CustomImagesCreateOrUpdateFuture", "Result", ci.Response.Response, "Failure responding to request")
  1208  		}
  1209  	}
  1210  	return
  1211  }
  1212  
  1213  // CustomImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  1214  // operation.
  1215  type CustomImagesDeleteFuture struct {
  1216  	azure.FutureAPI
  1217  	// Result returns the result of the asynchronous operation.
  1218  	// If the operation has not completed it will return an error.
  1219  	Result func(CustomImagesClient) (autorest.Response, error)
  1220  }
  1221  
  1222  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1223  func (future *CustomImagesDeleteFuture) UnmarshalJSON(body []byte) error {
  1224  	var azFuture azure.Future
  1225  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1226  		return err
  1227  	}
  1228  	future.FutureAPI = &azFuture
  1229  	future.Result = future.result
  1230  	return nil
  1231  }
  1232  
  1233  // result is the default implementation for CustomImagesDeleteFuture.Result.
  1234  func (future *CustomImagesDeleteFuture) result(client CustomImagesClient) (ar autorest.Response, err error) {
  1235  	var done bool
  1236  	done, err = future.DoneWithContext(context.Background(), client)
  1237  	if err != nil {
  1238  		err = autorest.NewErrorWithError(err, "dtl.CustomImagesDeleteFuture", "Result", future.Response(), "Polling failure")
  1239  		return
  1240  	}
  1241  	if !done {
  1242  		ar.Response = future.Response()
  1243  		err = azure.NewAsyncOpIncompleteError("dtl.CustomImagesDeleteFuture")
  1244  		return
  1245  	}
  1246  	ar.Response = future.Response()
  1247  	return
  1248  }
  1249  
  1250  // DataDiskProperties request body for adding a new or existing data disk to a virtual machine.
  1251  type DataDiskProperties struct {
  1252  	// AttachNewDataDiskOptions - Specifies options to attach a new disk to the virtual machine.
  1253  	AttachNewDataDiskOptions *AttachNewDataDiskOptions `json:"attachNewDataDiskOptions,omitempty"`
  1254  	// ExistingLabDiskID - Specifies the existing lab disk id to attach to virtual machine.
  1255  	ExistingLabDiskID *string `json:"existingLabDiskId,omitempty"`
  1256  	// HostCaching - Caching option for a data disk (i.e. None, ReadOnly, ReadWrite). Possible values include: 'HostCachingOptionsNone', 'HostCachingOptionsReadOnly', 'HostCachingOptionsReadWrite'
  1257  	HostCaching HostCachingOptions `json:"hostCaching,omitempty"`
  1258  }
  1259  
  1260  // DayDetails properties of a daily schedule.
  1261  type DayDetails struct {
  1262  	// Time - The time of day the schedule will occur.
  1263  	Time *string `json:"time,omitempty"`
  1264  }
  1265  
  1266  // DayDetailsFragment properties of a daily schedule.
  1267  type DayDetailsFragment struct {
  1268  	// Time - The time of day the schedule will occur.
  1269  	Time *string `json:"time,omitempty"`
  1270  }
  1271  
  1272  // DetachDataDiskProperties request body for detaching data disk from a virtual machine.
  1273  type DetachDataDiskProperties struct {
  1274  	// ExistingLabDiskID - Specifies the disk resource ID to detach from virtual machine.
  1275  	ExistingLabDiskID *string `json:"existingLabDiskId,omitempty"`
  1276  }
  1277  
  1278  // DetachDiskProperties properties of the disk to detach.
  1279  type DetachDiskProperties struct {
  1280  	// LeasedByLabVMID - The resource ID of the Lab VM to which the disk is attached.
  1281  	LeasedByLabVMID *string `json:"leasedByLabVmId,omitempty"`
  1282  }
  1283  
  1284  // Disk a Disk.
  1285  type Disk struct {
  1286  	autorest.Response `json:"-"`
  1287  	// DiskProperties - The properties of the resource.
  1288  	*DiskProperties `json:"properties,omitempty"`
  1289  	// ID - READ-ONLY; The identifier of the resource.
  1290  	ID *string `json:"id,omitempty"`
  1291  	// Name - READ-ONLY; The name of the resource.
  1292  	Name *string `json:"name,omitempty"`
  1293  	// Type - READ-ONLY; The type of the resource.
  1294  	Type *string `json:"type,omitempty"`
  1295  	// Location - The location of the resource.
  1296  	Location *string `json:"location,omitempty"`
  1297  	// Tags - The tags of the resource.
  1298  	Tags map[string]*string `json:"tags"`
  1299  }
  1300  
  1301  // MarshalJSON is the custom marshaler for Disk.
  1302  func (d Disk) MarshalJSON() ([]byte, error) {
  1303  	objectMap := make(map[string]interface{})
  1304  	if d.DiskProperties != nil {
  1305  		objectMap["properties"] = d.DiskProperties
  1306  	}
  1307  	if d.Location != nil {
  1308  		objectMap["location"] = d.Location
  1309  	}
  1310  	if d.Tags != nil {
  1311  		objectMap["tags"] = d.Tags
  1312  	}
  1313  	return json.Marshal(objectMap)
  1314  }
  1315  
  1316  // UnmarshalJSON is the custom unmarshaler for Disk struct.
  1317  func (d *Disk) UnmarshalJSON(body []byte) error {
  1318  	var m map[string]*json.RawMessage
  1319  	err := json.Unmarshal(body, &m)
  1320  	if err != nil {
  1321  		return err
  1322  	}
  1323  	for k, v := range m {
  1324  		switch k {
  1325  		case "properties":
  1326  			if v != nil {
  1327  				var diskProperties DiskProperties
  1328  				err = json.Unmarshal(*v, &diskProperties)
  1329  				if err != nil {
  1330  					return err
  1331  				}
  1332  				d.DiskProperties = &diskProperties
  1333  			}
  1334  		case "id":
  1335  			if v != nil {
  1336  				var ID string
  1337  				err = json.Unmarshal(*v, &ID)
  1338  				if err != nil {
  1339  					return err
  1340  				}
  1341  				d.ID = &ID
  1342  			}
  1343  		case "name":
  1344  			if v != nil {
  1345  				var name string
  1346  				err = json.Unmarshal(*v, &name)
  1347  				if err != nil {
  1348  					return err
  1349  				}
  1350  				d.Name = &name
  1351  			}
  1352  		case "type":
  1353  			if v != nil {
  1354  				var typeVar string
  1355  				err = json.Unmarshal(*v, &typeVar)
  1356  				if err != nil {
  1357  					return err
  1358  				}
  1359  				d.Type = &typeVar
  1360  			}
  1361  		case "location":
  1362  			if v != nil {
  1363  				var location string
  1364  				err = json.Unmarshal(*v, &location)
  1365  				if err != nil {
  1366  					return err
  1367  				}
  1368  				d.Location = &location
  1369  			}
  1370  		case "tags":
  1371  			if v != nil {
  1372  				var tags map[string]*string
  1373  				err = json.Unmarshal(*v, &tags)
  1374  				if err != nil {
  1375  					return err
  1376  				}
  1377  				d.Tags = tags
  1378  			}
  1379  		}
  1380  	}
  1381  
  1382  	return nil
  1383  }
  1384  
  1385  // DiskProperties properties of a disk.
  1386  type DiskProperties struct {
  1387  	// DiskType - The storage type for the disk (i.e. Standard, Premium). Possible values include: 'Standard', 'Premium'
  1388  	DiskType StorageType `json:"diskType,omitempty"`
  1389  	// DiskSizeGiB - The size of the disk in Gibibytes.
  1390  	DiskSizeGiB *int32 `json:"diskSizeGiB,omitempty"`
  1391  	// LeasedByLabVMID - The resource ID of the VM to which this disk is leased.
  1392  	LeasedByLabVMID *string `json:"leasedByLabVmId,omitempty"`
  1393  	// DiskBlobName - When backed by a blob, the name of the VHD blob without extension.
  1394  	DiskBlobName *string `json:"diskBlobName,omitempty"`
  1395  	// DiskURI - When backed by a blob, the URI of underlying blob.
  1396  	DiskURI *string `json:"diskUri,omitempty"`
  1397  	// CreatedDate - READ-ONLY; The creation date of the disk.
  1398  	CreatedDate *date.Time `json:"createdDate,omitempty"`
  1399  	// HostCaching - The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite).
  1400  	HostCaching *string `json:"hostCaching,omitempty"`
  1401  	// ManagedDiskID - When backed by managed disk, this is the ID of the compute disk resource.
  1402  	ManagedDiskID *string `json:"managedDiskId,omitempty"`
  1403  	// ProvisioningState - The provisioning status of the resource.
  1404  	ProvisioningState *string `json:"provisioningState,omitempty"`
  1405  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  1406  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  1407  }
  1408  
  1409  // MarshalJSON is the custom marshaler for DiskProperties.
  1410  func (dp DiskProperties) MarshalJSON() ([]byte, error) {
  1411  	objectMap := make(map[string]interface{})
  1412  	if dp.DiskType != "" {
  1413  		objectMap["diskType"] = dp.DiskType
  1414  	}
  1415  	if dp.DiskSizeGiB != nil {
  1416  		objectMap["diskSizeGiB"] = dp.DiskSizeGiB
  1417  	}
  1418  	if dp.LeasedByLabVMID != nil {
  1419  		objectMap["leasedByLabVmId"] = dp.LeasedByLabVMID
  1420  	}
  1421  	if dp.DiskBlobName != nil {
  1422  		objectMap["diskBlobName"] = dp.DiskBlobName
  1423  	}
  1424  	if dp.DiskURI != nil {
  1425  		objectMap["diskUri"] = dp.DiskURI
  1426  	}
  1427  	if dp.HostCaching != nil {
  1428  		objectMap["hostCaching"] = dp.HostCaching
  1429  	}
  1430  	if dp.ManagedDiskID != nil {
  1431  		objectMap["managedDiskId"] = dp.ManagedDiskID
  1432  	}
  1433  	if dp.ProvisioningState != nil {
  1434  		objectMap["provisioningState"] = dp.ProvisioningState
  1435  	}
  1436  	if dp.UniqueIdentifier != nil {
  1437  		objectMap["uniqueIdentifier"] = dp.UniqueIdentifier
  1438  	}
  1439  	return json.Marshal(objectMap)
  1440  }
  1441  
  1442  // DisksAttachFuture an abstraction for monitoring and retrieving the results of a long-running operation.
  1443  type DisksAttachFuture struct {
  1444  	azure.FutureAPI
  1445  	// Result returns the result of the asynchronous operation.
  1446  	// If the operation has not completed it will return an error.
  1447  	Result func(DisksClient) (autorest.Response, error)
  1448  }
  1449  
  1450  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1451  func (future *DisksAttachFuture) UnmarshalJSON(body []byte) error {
  1452  	var azFuture azure.Future
  1453  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1454  		return err
  1455  	}
  1456  	future.FutureAPI = &azFuture
  1457  	future.Result = future.result
  1458  	return nil
  1459  }
  1460  
  1461  // result is the default implementation for DisksAttachFuture.Result.
  1462  func (future *DisksAttachFuture) result(client DisksClient) (ar autorest.Response, err error) {
  1463  	var done bool
  1464  	done, err = future.DoneWithContext(context.Background(), client)
  1465  	if err != nil {
  1466  		err = autorest.NewErrorWithError(err, "dtl.DisksAttachFuture", "Result", future.Response(), "Polling failure")
  1467  		return
  1468  	}
  1469  	if !done {
  1470  		ar.Response = future.Response()
  1471  		err = azure.NewAsyncOpIncompleteError("dtl.DisksAttachFuture")
  1472  		return
  1473  	}
  1474  	ar.Response = future.Response()
  1475  	return
  1476  }
  1477  
  1478  // DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
  1479  // operation.
  1480  type DisksCreateOrUpdateFuture struct {
  1481  	azure.FutureAPI
  1482  	// Result returns the result of the asynchronous operation.
  1483  	// If the operation has not completed it will return an error.
  1484  	Result func(DisksClient) (Disk, error)
  1485  }
  1486  
  1487  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1488  func (future *DisksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  1489  	var azFuture azure.Future
  1490  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1491  		return err
  1492  	}
  1493  	future.FutureAPI = &azFuture
  1494  	future.Result = future.result
  1495  	return nil
  1496  }
  1497  
  1498  // result is the default implementation for DisksCreateOrUpdateFuture.Result.
  1499  func (future *DisksCreateOrUpdateFuture) result(client DisksClient) (d Disk, err error) {
  1500  	var done bool
  1501  	done, err = future.DoneWithContext(context.Background(), client)
  1502  	if err != nil {
  1503  		err = autorest.NewErrorWithError(err, "dtl.DisksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  1504  		return
  1505  	}
  1506  	if !done {
  1507  		d.Response.Response = future.Response()
  1508  		err = azure.NewAsyncOpIncompleteError("dtl.DisksCreateOrUpdateFuture")
  1509  		return
  1510  	}
  1511  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1512  	if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
  1513  		d, err = client.CreateOrUpdateResponder(d.Response.Response)
  1514  		if err != nil {
  1515  			err = autorest.NewErrorWithError(err, "dtl.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
  1516  		}
  1517  	}
  1518  	return
  1519  }
  1520  
  1521  // DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
  1522  type DisksDeleteFuture struct {
  1523  	azure.FutureAPI
  1524  	// Result returns the result of the asynchronous operation.
  1525  	// If the operation has not completed it will return an error.
  1526  	Result func(DisksClient) (autorest.Response, error)
  1527  }
  1528  
  1529  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1530  func (future *DisksDeleteFuture) UnmarshalJSON(body []byte) error {
  1531  	var azFuture azure.Future
  1532  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1533  		return err
  1534  	}
  1535  	future.FutureAPI = &azFuture
  1536  	future.Result = future.result
  1537  	return nil
  1538  }
  1539  
  1540  // result is the default implementation for DisksDeleteFuture.Result.
  1541  func (future *DisksDeleteFuture) result(client DisksClient) (ar autorest.Response, err error) {
  1542  	var done bool
  1543  	done, err = future.DoneWithContext(context.Background(), client)
  1544  	if err != nil {
  1545  		err = autorest.NewErrorWithError(err, "dtl.DisksDeleteFuture", "Result", future.Response(), "Polling failure")
  1546  		return
  1547  	}
  1548  	if !done {
  1549  		ar.Response = future.Response()
  1550  		err = azure.NewAsyncOpIncompleteError("dtl.DisksDeleteFuture")
  1551  		return
  1552  	}
  1553  	ar.Response = future.Response()
  1554  	return
  1555  }
  1556  
  1557  // DisksDetachFuture an abstraction for monitoring and retrieving the results of a long-running operation.
  1558  type DisksDetachFuture struct {
  1559  	azure.FutureAPI
  1560  	// Result returns the result of the asynchronous operation.
  1561  	// If the operation has not completed it will return an error.
  1562  	Result func(DisksClient) (autorest.Response, error)
  1563  }
  1564  
  1565  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1566  func (future *DisksDetachFuture) UnmarshalJSON(body []byte) error {
  1567  	var azFuture azure.Future
  1568  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1569  		return err
  1570  	}
  1571  	future.FutureAPI = &azFuture
  1572  	future.Result = future.result
  1573  	return nil
  1574  }
  1575  
  1576  // result is the default implementation for DisksDetachFuture.Result.
  1577  func (future *DisksDetachFuture) result(client DisksClient) (ar autorest.Response, err error) {
  1578  	var done bool
  1579  	done, err = future.DoneWithContext(context.Background(), client)
  1580  	if err != nil {
  1581  		err = autorest.NewErrorWithError(err, "dtl.DisksDetachFuture", "Result", future.Response(), "Polling failure")
  1582  		return
  1583  	}
  1584  	if !done {
  1585  		ar.Response = future.Response()
  1586  		err = azure.NewAsyncOpIncompleteError("dtl.DisksDetachFuture")
  1587  		return
  1588  	}
  1589  	ar.Response = future.Response()
  1590  	return
  1591  }
  1592  
  1593  // Environment an environment, which is essentially an ARM template deployment.
  1594  type Environment struct {
  1595  	autorest.Response `json:"-"`
  1596  	// EnvironmentProperties - The properties of the resource.
  1597  	*EnvironmentProperties `json:"properties,omitempty"`
  1598  	// ID - READ-ONLY; The identifier of the resource.
  1599  	ID *string `json:"id,omitempty"`
  1600  	// Name - READ-ONLY; The name of the resource.
  1601  	Name *string `json:"name,omitempty"`
  1602  	// Type - READ-ONLY; The type of the resource.
  1603  	Type *string `json:"type,omitempty"`
  1604  	// Location - The location of the resource.
  1605  	Location *string `json:"location,omitempty"`
  1606  	// Tags - The tags of the resource.
  1607  	Tags map[string]*string `json:"tags"`
  1608  }
  1609  
  1610  // MarshalJSON is the custom marshaler for Environment.
  1611  func (e Environment) MarshalJSON() ([]byte, error) {
  1612  	objectMap := make(map[string]interface{})
  1613  	if e.EnvironmentProperties != nil {
  1614  		objectMap["properties"] = e.EnvironmentProperties
  1615  	}
  1616  	if e.Location != nil {
  1617  		objectMap["location"] = e.Location
  1618  	}
  1619  	if e.Tags != nil {
  1620  		objectMap["tags"] = e.Tags
  1621  	}
  1622  	return json.Marshal(objectMap)
  1623  }
  1624  
  1625  // UnmarshalJSON is the custom unmarshaler for Environment struct.
  1626  func (e *Environment) UnmarshalJSON(body []byte) error {
  1627  	var m map[string]*json.RawMessage
  1628  	err := json.Unmarshal(body, &m)
  1629  	if err != nil {
  1630  		return err
  1631  	}
  1632  	for k, v := range m {
  1633  		switch k {
  1634  		case "properties":
  1635  			if v != nil {
  1636  				var environmentProperties EnvironmentProperties
  1637  				err = json.Unmarshal(*v, &environmentProperties)
  1638  				if err != nil {
  1639  					return err
  1640  				}
  1641  				e.EnvironmentProperties = &environmentProperties
  1642  			}
  1643  		case "id":
  1644  			if v != nil {
  1645  				var ID string
  1646  				err = json.Unmarshal(*v, &ID)
  1647  				if err != nil {
  1648  					return err
  1649  				}
  1650  				e.ID = &ID
  1651  			}
  1652  		case "name":
  1653  			if v != nil {
  1654  				var name string
  1655  				err = json.Unmarshal(*v, &name)
  1656  				if err != nil {
  1657  					return err
  1658  				}
  1659  				e.Name = &name
  1660  			}
  1661  		case "type":
  1662  			if v != nil {
  1663  				var typeVar string
  1664  				err = json.Unmarshal(*v, &typeVar)
  1665  				if err != nil {
  1666  					return err
  1667  				}
  1668  				e.Type = &typeVar
  1669  			}
  1670  		case "location":
  1671  			if v != nil {
  1672  				var location string
  1673  				err = json.Unmarshal(*v, &location)
  1674  				if err != nil {
  1675  					return err
  1676  				}
  1677  				e.Location = &location
  1678  			}
  1679  		case "tags":
  1680  			if v != nil {
  1681  				var tags map[string]*string
  1682  				err = json.Unmarshal(*v, &tags)
  1683  				if err != nil {
  1684  					return err
  1685  				}
  1686  				e.Tags = tags
  1687  			}
  1688  		}
  1689  	}
  1690  
  1691  	return nil
  1692  }
  1693  
  1694  // EnvironmentDeploymentProperties properties of an environment deployment.
  1695  type EnvironmentDeploymentProperties struct {
  1696  	// ArmTemplateID - The Azure Resource Manager template's identifier.
  1697  	ArmTemplateID *string `json:"armTemplateId,omitempty"`
  1698  	// Parameters - The parameters of the Azure Resource Manager template.
  1699  	Parameters *[]ArmTemplateParameterProperties `json:"parameters,omitempty"`
  1700  }
  1701  
  1702  // EnvironmentProperties properties of an environment.
  1703  type EnvironmentProperties struct {
  1704  	// DeploymentProperties - The deployment properties of the environment.
  1705  	DeploymentProperties *EnvironmentDeploymentProperties `json:"deploymentProperties,omitempty"`
  1706  	// ArmTemplateDisplayName - The display name of the Azure Resource Manager template that produced the environment.
  1707  	ArmTemplateDisplayName *string `json:"armTemplateDisplayName,omitempty"`
  1708  	// ResourceGroupID - READ-ONLY; The identifier of the resource group containing the environment's resources.
  1709  	ResourceGroupID *string `json:"resourceGroupId,omitempty"`
  1710  	// CreatedByUser - READ-ONLY; The creator of the environment.
  1711  	CreatedByUser *string `json:"createdByUser,omitempty"`
  1712  	// ProvisioningState - The provisioning status of the resource.
  1713  	ProvisioningState *string `json:"provisioningState,omitempty"`
  1714  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  1715  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  1716  }
  1717  
  1718  // MarshalJSON is the custom marshaler for EnvironmentProperties.
  1719  func (ep EnvironmentProperties) MarshalJSON() ([]byte, error) {
  1720  	objectMap := make(map[string]interface{})
  1721  	if ep.DeploymentProperties != nil {
  1722  		objectMap["deploymentProperties"] = ep.DeploymentProperties
  1723  	}
  1724  	if ep.ArmTemplateDisplayName != nil {
  1725  		objectMap["armTemplateDisplayName"] = ep.ArmTemplateDisplayName
  1726  	}
  1727  	if ep.ProvisioningState != nil {
  1728  		objectMap["provisioningState"] = ep.ProvisioningState
  1729  	}
  1730  	if ep.UniqueIdentifier != nil {
  1731  		objectMap["uniqueIdentifier"] = ep.UniqueIdentifier
  1732  	}
  1733  	return json.Marshal(objectMap)
  1734  }
  1735  
  1736  // EnvironmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  1737  // long-running operation.
  1738  type EnvironmentsCreateOrUpdateFuture struct {
  1739  	azure.FutureAPI
  1740  	// Result returns the result of the asynchronous operation.
  1741  	// If the operation has not completed it will return an error.
  1742  	Result func(EnvironmentsClient) (Environment, error)
  1743  }
  1744  
  1745  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1746  func (future *EnvironmentsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  1747  	var azFuture azure.Future
  1748  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1749  		return err
  1750  	}
  1751  	future.FutureAPI = &azFuture
  1752  	future.Result = future.result
  1753  	return nil
  1754  }
  1755  
  1756  // result is the default implementation for EnvironmentsCreateOrUpdateFuture.Result.
  1757  func (future *EnvironmentsCreateOrUpdateFuture) result(client EnvironmentsClient) (e Environment, err error) {
  1758  	var done bool
  1759  	done, err = future.DoneWithContext(context.Background(), client)
  1760  	if err != nil {
  1761  		err = autorest.NewErrorWithError(err, "dtl.EnvironmentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  1762  		return
  1763  	}
  1764  	if !done {
  1765  		e.Response.Response = future.Response()
  1766  		err = azure.NewAsyncOpIncompleteError("dtl.EnvironmentsCreateOrUpdateFuture")
  1767  		return
  1768  	}
  1769  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1770  	if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent {
  1771  		e, err = client.CreateOrUpdateResponder(e.Response.Response)
  1772  		if err != nil {
  1773  			err = autorest.NewErrorWithError(err, "dtl.EnvironmentsCreateOrUpdateFuture", "Result", e.Response.Response, "Failure responding to request")
  1774  		}
  1775  	}
  1776  	return
  1777  }
  1778  
  1779  // EnvironmentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  1780  // operation.
  1781  type EnvironmentsDeleteFuture struct {
  1782  	azure.FutureAPI
  1783  	// Result returns the result of the asynchronous operation.
  1784  	// If the operation has not completed it will return an error.
  1785  	Result func(EnvironmentsClient) (autorest.Response, error)
  1786  }
  1787  
  1788  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  1789  func (future *EnvironmentsDeleteFuture) UnmarshalJSON(body []byte) error {
  1790  	var azFuture azure.Future
  1791  	if err := json.Unmarshal(body, &azFuture); err != nil {
  1792  		return err
  1793  	}
  1794  	future.FutureAPI = &azFuture
  1795  	future.Result = future.result
  1796  	return nil
  1797  }
  1798  
  1799  // result is the default implementation for EnvironmentsDeleteFuture.Result.
  1800  func (future *EnvironmentsDeleteFuture) result(client EnvironmentsClient) (ar autorest.Response, err error) {
  1801  	var done bool
  1802  	done, err = future.DoneWithContext(context.Background(), client)
  1803  	if err != nil {
  1804  		err = autorest.NewErrorWithError(err, "dtl.EnvironmentsDeleteFuture", "Result", future.Response(), "Polling failure")
  1805  		return
  1806  	}
  1807  	if !done {
  1808  		ar.Response = future.Response()
  1809  		err = azure.NewAsyncOpIncompleteError("dtl.EnvironmentsDeleteFuture")
  1810  		return
  1811  	}
  1812  	ar.Response = future.Response()
  1813  	return
  1814  }
  1815  
  1816  // EvaluatePoliciesProperties properties for evaluating a policy set.
  1817  type EvaluatePoliciesProperties struct {
  1818  	// FactName - The fact name.
  1819  	FactName *string `json:"factName,omitempty"`
  1820  	// FactData - The fact data.
  1821  	FactData *string `json:"factData,omitempty"`
  1822  	// ValueOffset - The value offset.
  1823  	ValueOffset *string `json:"valueOffset,omitempty"`
  1824  }
  1825  
  1826  // EvaluatePoliciesRequest request body for evaluating a policy set.
  1827  type EvaluatePoliciesRequest struct {
  1828  	// Policies - Policies to evaluate.
  1829  	Policies *[]EvaluatePoliciesProperties `json:"policies,omitempty"`
  1830  }
  1831  
  1832  // EvaluatePoliciesResponse response body for evaluating a policy set.
  1833  type EvaluatePoliciesResponse struct {
  1834  	autorest.Response `json:"-"`
  1835  	// Results - Results of evaluating a policy set.
  1836  	Results *[]PolicySetResult `json:"results,omitempty"`
  1837  }
  1838  
  1839  // Event an event to be notified for.
  1840  type Event struct {
  1841  	// EventName - The event type for which this notification is enabled (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost'
  1842  	EventName NotificationChannelEventType `json:"eventName,omitempty"`
  1843  }
  1844  
  1845  // EventFragment an event to be notified for.
  1846  type EventFragment struct {
  1847  	// EventName - The event type for which this notification is enabled (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost'
  1848  	EventName NotificationChannelEventType `json:"eventName,omitempty"`
  1849  }
  1850  
  1851  // ExportResourceUsageParameters the parameters of the export operation.
  1852  type ExportResourceUsageParameters struct {
  1853  	// BlobStorageAbsoluteSasURI - The blob storage absolute sas uri with write permission to the container which the usage data needs to be uploaded to.
  1854  	BlobStorageAbsoluteSasURI *string `json:"blobStorageAbsoluteSasUri,omitempty"`
  1855  	// UsageStartDate - The start time of the usage. If not provided, usage will be reported since the beginning of data collection.
  1856  	UsageStartDate *date.Time `json:"usageStartDate,omitempty"`
  1857  }
  1858  
  1859  // ExternalSubnet subnet information as returned by the Microsoft.Network API.
  1860  type ExternalSubnet struct {
  1861  	// ID - Gets or sets the identifier.
  1862  	ID *string `json:"id,omitempty"`
  1863  	// Name - Gets or sets the name.
  1864  	Name *string `json:"name,omitempty"`
  1865  }
  1866  
  1867  // ExternalSubnetFragment subnet information as returned by the Microsoft.Network API.
  1868  type ExternalSubnetFragment struct {
  1869  	// ID - Gets or sets the identifier.
  1870  	ID *string `json:"id,omitempty"`
  1871  	// Name - Gets or sets the name.
  1872  	Name *string `json:"name,omitempty"`
  1873  }
  1874  
  1875  // Formula a formula for creating a VM, specifying an image base and other parameters
  1876  type Formula struct {
  1877  	autorest.Response `json:"-"`
  1878  	// FormulaProperties - The properties of the resource.
  1879  	*FormulaProperties `json:"properties,omitempty"`
  1880  	// ID - READ-ONLY; The identifier of the resource.
  1881  	ID *string `json:"id,omitempty"`
  1882  	// Name - READ-ONLY; The name of the resource.
  1883  	Name *string `json:"name,omitempty"`
  1884  	// Type - READ-ONLY; The type of the resource.
  1885  	Type *string `json:"type,omitempty"`
  1886  	// Location - The location of the resource.
  1887  	Location *string `json:"location,omitempty"`
  1888  	// Tags - The tags of the resource.
  1889  	Tags map[string]*string `json:"tags"`
  1890  }
  1891  
  1892  // MarshalJSON is the custom marshaler for Formula.
  1893  func (f Formula) MarshalJSON() ([]byte, error) {
  1894  	objectMap := make(map[string]interface{})
  1895  	if f.FormulaProperties != nil {
  1896  		objectMap["properties"] = f.FormulaProperties
  1897  	}
  1898  	if f.Location != nil {
  1899  		objectMap["location"] = f.Location
  1900  	}
  1901  	if f.Tags != nil {
  1902  		objectMap["tags"] = f.Tags
  1903  	}
  1904  	return json.Marshal(objectMap)
  1905  }
  1906  
  1907  // UnmarshalJSON is the custom unmarshaler for Formula struct.
  1908  func (f *Formula) UnmarshalJSON(body []byte) error {
  1909  	var m map[string]*json.RawMessage
  1910  	err := json.Unmarshal(body, &m)
  1911  	if err != nil {
  1912  		return err
  1913  	}
  1914  	for k, v := range m {
  1915  		switch k {
  1916  		case "properties":
  1917  			if v != nil {
  1918  				var formulaProperties FormulaProperties
  1919  				err = json.Unmarshal(*v, &formulaProperties)
  1920  				if err != nil {
  1921  					return err
  1922  				}
  1923  				f.FormulaProperties = &formulaProperties
  1924  			}
  1925  		case "id":
  1926  			if v != nil {
  1927  				var ID string
  1928  				err = json.Unmarshal(*v, &ID)
  1929  				if err != nil {
  1930  					return err
  1931  				}
  1932  				f.ID = &ID
  1933  			}
  1934  		case "name":
  1935  			if v != nil {
  1936  				var name string
  1937  				err = json.Unmarshal(*v, &name)
  1938  				if err != nil {
  1939  					return err
  1940  				}
  1941  				f.Name = &name
  1942  			}
  1943  		case "type":
  1944  			if v != nil {
  1945  				var typeVar string
  1946  				err = json.Unmarshal(*v, &typeVar)
  1947  				if err != nil {
  1948  					return err
  1949  				}
  1950  				f.Type = &typeVar
  1951  			}
  1952  		case "location":
  1953  			if v != nil {
  1954  				var location string
  1955  				err = json.Unmarshal(*v, &location)
  1956  				if err != nil {
  1957  					return err
  1958  				}
  1959  				f.Location = &location
  1960  			}
  1961  		case "tags":
  1962  			if v != nil {
  1963  				var tags map[string]*string
  1964  				err = json.Unmarshal(*v, &tags)
  1965  				if err != nil {
  1966  					return err
  1967  				}
  1968  				f.Tags = tags
  1969  			}
  1970  		}
  1971  	}
  1972  
  1973  	return nil
  1974  }
  1975  
  1976  // FormulaProperties properties of a formula.
  1977  type FormulaProperties struct {
  1978  	// Description - The description of the formula.
  1979  	Description *string `json:"description,omitempty"`
  1980  	// Author - The author of the formula.
  1981  	Author *string `json:"author,omitempty"`
  1982  	// OsType - The OS type of the formula.
  1983  	OsType *string `json:"osType,omitempty"`
  1984  	// CreationDate - READ-ONLY; The creation date of the formula.
  1985  	CreationDate *date.Time `json:"creationDate,omitempty"`
  1986  	// FormulaContent - The content of the formula.
  1987  	FormulaContent *LabVirtualMachineCreationParameter `json:"formulaContent,omitempty"`
  1988  	// VM - Information about a VM from which a formula is to be created.
  1989  	VM *FormulaPropertiesFromVM `json:"vm,omitempty"`
  1990  	// ProvisioningState - The provisioning status of the resource.
  1991  	ProvisioningState *string `json:"provisioningState,omitempty"`
  1992  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  1993  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  1994  }
  1995  
  1996  // MarshalJSON is the custom marshaler for FormulaProperties.
  1997  func (fp FormulaProperties) MarshalJSON() ([]byte, error) {
  1998  	objectMap := make(map[string]interface{})
  1999  	if fp.Description != nil {
  2000  		objectMap["description"] = fp.Description
  2001  	}
  2002  	if fp.Author != nil {
  2003  		objectMap["author"] = fp.Author
  2004  	}
  2005  	if fp.OsType != nil {
  2006  		objectMap["osType"] = fp.OsType
  2007  	}
  2008  	if fp.FormulaContent != nil {
  2009  		objectMap["formulaContent"] = fp.FormulaContent
  2010  	}
  2011  	if fp.VM != nil {
  2012  		objectMap["vm"] = fp.VM
  2013  	}
  2014  	if fp.ProvisioningState != nil {
  2015  		objectMap["provisioningState"] = fp.ProvisioningState
  2016  	}
  2017  	if fp.UniqueIdentifier != nil {
  2018  		objectMap["uniqueIdentifier"] = fp.UniqueIdentifier
  2019  	}
  2020  	return json.Marshal(objectMap)
  2021  }
  2022  
  2023  // FormulaPropertiesFromVM information about a VM from which a formula is to be created.
  2024  type FormulaPropertiesFromVM struct {
  2025  	// LabVMID - The identifier of the VM from which a formula is to be created.
  2026  	LabVMID *string `json:"labVmId,omitempty"`
  2027  }
  2028  
  2029  // FormulasCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
  2030  // operation.
  2031  type FormulasCreateOrUpdateFuture struct {
  2032  	azure.FutureAPI
  2033  	// Result returns the result of the asynchronous operation.
  2034  	// If the operation has not completed it will return an error.
  2035  	Result func(FormulasClient) (Formula, error)
  2036  }
  2037  
  2038  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2039  func (future *FormulasCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  2040  	var azFuture azure.Future
  2041  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2042  		return err
  2043  	}
  2044  	future.FutureAPI = &azFuture
  2045  	future.Result = future.result
  2046  	return nil
  2047  }
  2048  
  2049  // result is the default implementation for FormulasCreateOrUpdateFuture.Result.
  2050  func (future *FormulasCreateOrUpdateFuture) result(client FormulasClient) (f Formula, err error) {
  2051  	var done bool
  2052  	done, err = future.DoneWithContext(context.Background(), client)
  2053  	if err != nil {
  2054  		err = autorest.NewErrorWithError(err, "dtl.FormulasCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  2055  		return
  2056  	}
  2057  	if !done {
  2058  		f.Response.Response = future.Response()
  2059  		err = azure.NewAsyncOpIncompleteError("dtl.FormulasCreateOrUpdateFuture")
  2060  		return
  2061  	}
  2062  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2063  	if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent {
  2064  		f, err = client.CreateOrUpdateResponder(f.Response.Response)
  2065  		if err != nil {
  2066  			err = autorest.NewErrorWithError(err, "dtl.FormulasCreateOrUpdateFuture", "Result", f.Response.Response, "Failure responding to request")
  2067  		}
  2068  	}
  2069  	return
  2070  }
  2071  
  2072  // GalleryImage a gallery image.
  2073  type GalleryImage struct {
  2074  	// GalleryImageProperties - The properties of the resource.
  2075  	*GalleryImageProperties `json:"properties,omitempty"`
  2076  	// ID - READ-ONLY; The identifier of the resource.
  2077  	ID *string `json:"id,omitempty"`
  2078  	// Name - READ-ONLY; The name of the resource.
  2079  	Name *string `json:"name,omitempty"`
  2080  	// Type - READ-ONLY; The type of the resource.
  2081  	Type *string `json:"type,omitempty"`
  2082  	// Location - The location of the resource.
  2083  	Location *string `json:"location,omitempty"`
  2084  	// Tags - The tags of the resource.
  2085  	Tags map[string]*string `json:"tags"`
  2086  }
  2087  
  2088  // MarshalJSON is the custom marshaler for GalleryImage.
  2089  func (gi GalleryImage) MarshalJSON() ([]byte, error) {
  2090  	objectMap := make(map[string]interface{})
  2091  	if gi.GalleryImageProperties != nil {
  2092  		objectMap["properties"] = gi.GalleryImageProperties
  2093  	}
  2094  	if gi.Location != nil {
  2095  		objectMap["location"] = gi.Location
  2096  	}
  2097  	if gi.Tags != nil {
  2098  		objectMap["tags"] = gi.Tags
  2099  	}
  2100  	return json.Marshal(objectMap)
  2101  }
  2102  
  2103  // UnmarshalJSON is the custom unmarshaler for GalleryImage struct.
  2104  func (gi *GalleryImage) UnmarshalJSON(body []byte) error {
  2105  	var m map[string]*json.RawMessage
  2106  	err := json.Unmarshal(body, &m)
  2107  	if err != nil {
  2108  		return err
  2109  	}
  2110  	for k, v := range m {
  2111  		switch k {
  2112  		case "properties":
  2113  			if v != nil {
  2114  				var galleryImageProperties GalleryImageProperties
  2115  				err = json.Unmarshal(*v, &galleryImageProperties)
  2116  				if err != nil {
  2117  					return err
  2118  				}
  2119  				gi.GalleryImageProperties = &galleryImageProperties
  2120  			}
  2121  		case "id":
  2122  			if v != nil {
  2123  				var ID string
  2124  				err = json.Unmarshal(*v, &ID)
  2125  				if err != nil {
  2126  					return err
  2127  				}
  2128  				gi.ID = &ID
  2129  			}
  2130  		case "name":
  2131  			if v != nil {
  2132  				var name string
  2133  				err = json.Unmarshal(*v, &name)
  2134  				if err != nil {
  2135  					return err
  2136  				}
  2137  				gi.Name = &name
  2138  			}
  2139  		case "type":
  2140  			if v != nil {
  2141  				var typeVar string
  2142  				err = json.Unmarshal(*v, &typeVar)
  2143  				if err != nil {
  2144  					return err
  2145  				}
  2146  				gi.Type = &typeVar
  2147  			}
  2148  		case "location":
  2149  			if v != nil {
  2150  				var location string
  2151  				err = json.Unmarshal(*v, &location)
  2152  				if err != nil {
  2153  					return err
  2154  				}
  2155  				gi.Location = &location
  2156  			}
  2157  		case "tags":
  2158  			if v != nil {
  2159  				var tags map[string]*string
  2160  				err = json.Unmarshal(*v, &tags)
  2161  				if err != nil {
  2162  					return err
  2163  				}
  2164  				gi.Tags = tags
  2165  			}
  2166  		}
  2167  	}
  2168  
  2169  	return nil
  2170  }
  2171  
  2172  // GalleryImageProperties properties of a gallery image.
  2173  type GalleryImageProperties struct {
  2174  	// Author - The author of the gallery image.
  2175  	Author *string `json:"author,omitempty"`
  2176  	// CreatedDate - READ-ONLY; The creation date of the gallery image.
  2177  	CreatedDate *date.Time `json:"createdDate,omitempty"`
  2178  	// Description - The description of the gallery image.
  2179  	Description *string `json:"description,omitempty"`
  2180  	// ImageReference - The image reference of the gallery image.
  2181  	ImageReference *GalleryImageReference `json:"imageReference,omitempty"`
  2182  	// Icon - The icon of the gallery image.
  2183  	Icon *string `json:"icon,omitempty"`
  2184  	// Enabled - Indicates whether this gallery image is enabled.
  2185  	Enabled *bool `json:"enabled,omitempty"`
  2186  }
  2187  
  2188  // MarshalJSON is the custom marshaler for GalleryImageProperties.
  2189  func (gip GalleryImageProperties) MarshalJSON() ([]byte, error) {
  2190  	objectMap := make(map[string]interface{})
  2191  	if gip.Author != nil {
  2192  		objectMap["author"] = gip.Author
  2193  	}
  2194  	if gip.Description != nil {
  2195  		objectMap["description"] = gip.Description
  2196  	}
  2197  	if gip.ImageReference != nil {
  2198  		objectMap["imageReference"] = gip.ImageReference
  2199  	}
  2200  	if gip.Icon != nil {
  2201  		objectMap["icon"] = gip.Icon
  2202  	}
  2203  	if gip.Enabled != nil {
  2204  		objectMap["enabled"] = gip.Enabled
  2205  	}
  2206  	return json.Marshal(objectMap)
  2207  }
  2208  
  2209  // GalleryImageReference the reference information for an Azure Marketplace image.
  2210  type GalleryImageReference struct {
  2211  	// Offer - The offer of the gallery image.
  2212  	Offer *string `json:"offer,omitempty"`
  2213  	// Publisher - The publisher of the gallery image.
  2214  	Publisher *string `json:"publisher,omitempty"`
  2215  	// Sku - The SKU of the gallery image.
  2216  	Sku *string `json:"sku,omitempty"`
  2217  	// OsType - The OS type of the gallery image.
  2218  	OsType *string `json:"osType,omitempty"`
  2219  	// Version - The version of the gallery image.
  2220  	Version *string `json:"version,omitempty"`
  2221  }
  2222  
  2223  // GalleryImageReferenceFragment the reference information for an Azure Marketplace image.
  2224  type GalleryImageReferenceFragment struct {
  2225  	// Offer - The offer of the gallery image.
  2226  	Offer *string `json:"offer,omitempty"`
  2227  	// Publisher - The publisher of the gallery image.
  2228  	Publisher *string `json:"publisher,omitempty"`
  2229  	// Sku - The SKU of the gallery image.
  2230  	Sku *string `json:"sku,omitempty"`
  2231  	// OsType - The OS type of the gallery image.
  2232  	OsType *string `json:"osType,omitempty"`
  2233  	// Version - The version of the gallery image.
  2234  	Version *string `json:"version,omitempty"`
  2235  }
  2236  
  2237  // GenerateArmTemplateRequest parameters for generating an ARM template for deploying artifacts.
  2238  type GenerateArmTemplateRequest struct {
  2239  	// VirtualMachineName - The resource name of the virtual machine.
  2240  	VirtualMachineName *string `json:"virtualMachineName,omitempty"`
  2241  	// Parameters - The parameters of the ARM template.
  2242  	Parameters *[]ParameterInfo `json:"parameters,omitempty"`
  2243  	// Location - The location of the virtual machine.
  2244  	Location *string `json:"location,omitempty"`
  2245  	// FileUploadOptions - Options for uploading the files for the artifact. UploadFilesAndGenerateSasTokens is the default value. Possible values include: 'FileUploadOptionsUploadFilesAndGenerateSasTokens', 'FileUploadOptionsNone'
  2246  	FileUploadOptions FileUploadOptions `json:"fileUploadOptions,omitempty"`
  2247  }
  2248  
  2249  // GenerateUploadURIParameter properties for generating an upload URI.
  2250  type GenerateUploadURIParameter struct {
  2251  	// BlobName - The blob name of the upload URI.
  2252  	BlobName *string `json:"blobName,omitempty"`
  2253  }
  2254  
  2255  // GenerateUploadURIResponse response body for generating an upload URI.
  2256  type GenerateUploadURIResponse struct {
  2257  	autorest.Response `json:"-"`
  2258  	// UploadURI - The upload URI for the VHD.
  2259  	UploadURI *string `json:"uploadUri,omitempty"`
  2260  }
  2261  
  2262  // GlobalSchedulesExecuteFuture an abstraction for monitoring and retrieving the results of a long-running
  2263  // operation.
  2264  type GlobalSchedulesExecuteFuture struct {
  2265  	azure.FutureAPI
  2266  	// Result returns the result of the asynchronous operation.
  2267  	// If the operation has not completed it will return an error.
  2268  	Result func(GlobalSchedulesClient) (autorest.Response, error)
  2269  }
  2270  
  2271  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2272  func (future *GlobalSchedulesExecuteFuture) UnmarshalJSON(body []byte) error {
  2273  	var azFuture azure.Future
  2274  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2275  		return err
  2276  	}
  2277  	future.FutureAPI = &azFuture
  2278  	future.Result = future.result
  2279  	return nil
  2280  }
  2281  
  2282  // result is the default implementation for GlobalSchedulesExecuteFuture.Result.
  2283  func (future *GlobalSchedulesExecuteFuture) result(client GlobalSchedulesClient) (ar autorest.Response, err error) {
  2284  	var done bool
  2285  	done, err = future.DoneWithContext(context.Background(), client)
  2286  	if err != nil {
  2287  		err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesExecuteFuture", "Result", future.Response(), "Polling failure")
  2288  		return
  2289  	}
  2290  	if !done {
  2291  		ar.Response = future.Response()
  2292  		err = azure.NewAsyncOpIncompleteError("dtl.GlobalSchedulesExecuteFuture")
  2293  		return
  2294  	}
  2295  	ar.Response = future.Response()
  2296  	return
  2297  }
  2298  
  2299  // GlobalSchedulesRetargetFuture an abstraction for monitoring and retrieving the results of a long-running
  2300  // operation.
  2301  type GlobalSchedulesRetargetFuture struct {
  2302  	azure.FutureAPI
  2303  	// Result returns the result of the asynchronous operation.
  2304  	// If the operation has not completed it will return an error.
  2305  	Result func(GlobalSchedulesClient) (autorest.Response, error)
  2306  }
  2307  
  2308  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2309  func (future *GlobalSchedulesRetargetFuture) UnmarshalJSON(body []byte) error {
  2310  	var azFuture azure.Future
  2311  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2312  		return err
  2313  	}
  2314  	future.FutureAPI = &azFuture
  2315  	future.Result = future.result
  2316  	return nil
  2317  }
  2318  
  2319  // result is the default implementation for GlobalSchedulesRetargetFuture.Result.
  2320  func (future *GlobalSchedulesRetargetFuture) result(client GlobalSchedulesClient) (ar autorest.Response, err error) {
  2321  	var done bool
  2322  	done, err = future.DoneWithContext(context.Background(), client)
  2323  	if err != nil {
  2324  		err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesRetargetFuture", "Result", future.Response(), "Polling failure")
  2325  		return
  2326  	}
  2327  	if !done {
  2328  		ar.Response = future.Response()
  2329  		err = azure.NewAsyncOpIncompleteError("dtl.GlobalSchedulesRetargetFuture")
  2330  		return
  2331  	}
  2332  	ar.Response = future.Response()
  2333  	return
  2334  }
  2335  
  2336  // HourDetails properties of an hourly schedule.
  2337  type HourDetails struct {
  2338  	// Minute - Minutes of the hour the schedule will run.
  2339  	Minute *int32 `json:"minute,omitempty"`
  2340  }
  2341  
  2342  // HourDetailsFragment properties of an hourly schedule.
  2343  type HourDetailsFragment struct {
  2344  	// Minute - Minutes of the hour the schedule will run.
  2345  	Minute *int32 `json:"minute,omitempty"`
  2346  }
  2347  
  2348  // IdentityProperties properties of a managed identity
  2349  type IdentityProperties struct {
  2350  	// Type - Managed identity.
  2351  	Type *string `json:"type,omitempty"`
  2352  	// PrincipalID - The principal id of resource identity.
  2353  	PrincipalID *string `json:"principalId,omitempty"`
  2354  	// TenantID - The tenant identifier of resource.
  2355  	TenantID *string `json:"tenantId,omitempty"`
  2356  	// ClientSecretURL - The client secret URL of the identity.
  2357  	ClientSecretURL *string `json:"clientSecretUrl,omitempty"`
  2358  }
  2359  
  2360  // InboundNatRule a rule for NAT - exposing a VM's port (backendPort) on the public IP address using a load
  2361  // balancer.
  2362  type InboundNatRule struct {
  2363  	// TransportProtocol - The transport protocol for the endpoint. Possible values include: 'TCP', 'UDP'
  2364  	TransportProtocol TransportProtocol `json:"transportProtocol,omitempty"`
  2365  	// FrontendPort - The external endpoint port of the inbound connection. Possible values range between 1 and 65535, inclusive. If unspecified, a value will be allocated automatically.
  2366  	FrontendPort *int32 `json:"frontendPort,omitempty"`
  2367  	// BackendPort - The port to which the external traffic will be redirected.
  2368  	BackendPort *int32 `json:"backendPort,omitempty"`
  2369  }
  2370  
  2371  // InboundNatRuleFragment a rule for NAT - exposing a VM's port (backendPort) on the public IP address
  2372  // using a load balancer.
  2373  type InboundNatRuleFragment struct {
  2374  	// TransportProtocol - The transport protocol for the endpoint. Possible values include: 'TCP', 'UDP'
  2375  	TransportProtocol TransportProtocol `json:"transportProtocol,omitempty"`
  2376  	// FrontendPort - The external endpoint port of the inbound connection. Possible values range between 1 and 65535, inclusive. If unspecified, a value will be allocated automatically.
  2377  	FrontendPort *int32 `json:"frontendPort,omitempty"`
  2378  	// BackendPort - The port to which the external traffic will be redirected.
  2379  	BackendPort *int32 `json:"backendPort,omitempty"`
  2380  }
  2381  
  2382  // Lab a lab.
  2383  type Lab struct {
  2384  	autorest.Response `json:"-"`
  2385  	// LabProperties - The properties of the resource.
  2386  	*LabProperties `json:"properties,omitempty"`
  2387  	// ID - READ-ONLY; The identifier of the resource.
  2388  	ID *string `json:"id,omitempty"`
  2389  	// Name - READ-ONLY; The name of the resource.
  2390  	Name *string `json:"name,omitempty"`
  2391  	// Type - READ-ONLY; The type of the resource.
  2392  	Type *string `json:"type,omitempty"`
  2393  	// Location - The location of the resource.
  2394  	Location *string `json:"location,omitempty"`
  2395  	// Tags - The tags of the resource.
  2396  	Tags map[string]*string `json:"tags"`
  2397  }
  2398  
  2399  // MarshalJSON is the custom marshaler for Lab.
  2400  func (l Lab) MarshalJSON() ([]byte, error) {
  2401  	objectMap := make(map[string]interface{})
  2402  	if l.LabProperties != nil {
  2403  		objectMap["properties"] = l.LabProperties
  2404  	}
  2405  	if l.Location != nil {
  2406  		objectMap["location"] = l.Location
  2407  	}
  2408  	if l.Tags != nil {
  2409  		objectMap["tags"] = l.Tags
  2410  	}
  2411  	return json.Marshal(objectMap)
  2412  }
  2413  
  2414  // UnmarshalJSON is the custom unmarshaler for Lab struct.
  2415  func (l *Lab) UnmarshalJSON(body []byte) error {
  2416  	var m map[string]*json.RawMessage
  2417  	err := json.Unmarshal(body, &m)
  2418  	if err != nil {
  2419  		return err
  2420  	}
  2421  	for k, v := range m {
  2422  		switch k {
  2423  		case "properties":
  2424  			if v != nil {
  2425  				var labProperties LabProperties
  2426  				err = json.Unmarshal(*v, &labProperties)
  2427  				if err != nil {
  2428  					return err
  2429  				}
  2430  				l.LabProperties = &labProperties
  2431  			}
  2432  		case "id":
  2433  			if v != nil {
  2434  				var ID string
  2435  				err = json.Unmarshal(*v, &ID)
  2436  				if err != nil {
  2437  					return err
  2438  				}
  2439  				l.ID = &ID
  2440  			}
  2441  		case "name":
  2442  			if v != nil {
  2443  				var name string
  2444  				err = json.Unmarshal(*v, &name)
  2445  				if err != nil {
  2446  					return err
  2447  				}
  2448  				l.Name = &name
  2449  			}
  2450  		case "type":
  2451  			if v != nil {
  2452  				var typeVar string
  2453  				err = json.Unmarshal(*v, &typeVar)
  2454  				if err != nil {
  2455  					return err
  2456  				}
  2457  				l.Type = &typeVar
  2458  			}
  2459  		case "location":
  2460  			if v != nil {
  2461  				var location string
  2462  				err = json.Unmarshal(*v, &location)
  2463  				if err != nil {
  2464  					return err
  2465  				}
  2466  				l.Location = &location
  2467  			}
  2468  		case "tags":
  2469  			if v != nil {
  2470  				var tags map[string]*string
  2471  				err = json.Unmarshal(*v, &tags)
  2472  				if err != nil {
  2473  					return err
  2474  				}
  2475  				l.Tags = tags
  2476  			}
  2477  		}
  2478  	}
  2479  
  2480  	return nil
  2481  }
  2482  
  2483  // LabCost a cost item.
  2484  type LabCost struct {
  2485  	autorest.Response `json:"-"`
  2486  	// LabCostProperties - The properties of the resource.
  2487  	*LabCostProperties `json:"properties,omitempty"`
  2488  	// ID - READ-ONLY; The identifier of the resource.
  2489  	ID *string `json:"id,omitempty"`
  2490  	// Name - READ-ONLY; The name of the resource.
  2491  	Name *string `json:"name,omitempty"`
  2492  	// Type - READ-ONLY; The type of the resource.
  2493  	Type *string `json:"type,omitempty"`
  2494  	// Location - The location of the resource.
  2495  	Location *string `json:"location,omitempty"`
  2496  	// Tags - The tags of the resource.
  2497  	Tags map[string]*string `json:"tags"`
  2498  }
  2499  
  2500  // MarshalJSON is the custom marshaler for LabCost.
  2501  func (lc LabCost) MarshalJSON() ([]byte, error) {
  2502  	objectMap := make(map[string]interface{})
  2503  	if lc.LabCostProperties != nil {
  2504  		objectMap["properties"] = lc.LabCostProperties
  2505  	}
  2506  	if lc.Location != nil {
  2507  		objectMap["location"] = lc.Location
  2508  	}
  2509  	if lc.Tags != nil {
  2510  		objectMap["tags"] = lc.Tags
  2511  	}
  2512  	return json.Marshal(objectMap)
  2513  }
  2514  
  2515  // UnmarshalJSON is the custom unmarshaler for LabCost struct.
  2516  func (lc *LabCost) UnmarshalJSON(body []byte) error {
  2517  	var m map[string]*json.RawMessage
  2518  	err := json.Unmarshal(body, &m)
  2519  	if err != nil {
  2520  		return err
  2521  	}
  2522  	for k, v := range m {
  2523  		switch k {
  2524  		case "properties":
  2525  			if v != nil {
  2526  				var labCostProperties LabCostProperties
  2527  				err = json.Unmarshal(*v, &labCostProperties)
  2528  				if err != nil {
  2529  					return err
  2530  				}
  2531  				lc.LabCostProperties = &labCostProperties
  2532  			}
  2533  		case "id":
  2534  			if v != nil {
  2535  				var ID string
  2536  				err = json.Unmarshal(*v, &ID)
  2537  				if err != nil {
  2538  					return err
  2539  				}
  2540  				lc.ID = &ID
  2541  			}
  2542  		case "name":
  2543  			if v != nil {
  2544  				var name string
  2545  				err = json.Unmarshal(*v, &name)
  2546  				if err != nil {
  2547  					return err
  2548  				}
  2549  				lc.Name = &name
  2550  			}
  2551  		case "type":
  2552  			if v != nil {
  2553  				var typeVar string
  2554  				err = json.Unmarshal(*v, &typeVar)
  2555  				if err != nil {
  2556  					return err
  2557  				}
  2558  				lc.Type = &typeVar
  2559  			}
  2560  		case "location":
  2561  			if v != nil {
  2562  				var location string
  2563  				err = json.Unmarshal(*v, &location)
  2564  				if err != nil {
  2565  					return err
  2566  				}
  2567  				lc.Location = &location
  2568  			}
  2569  		case "tags":
  2570  			if v != nil {
  2571  				var tags map[string]*string
  2572  				err = json.Unmarshal(*v, &tags)
  2573  				if err != nil {
  2574  					return err
  2575  				}
  2576  				lc.Tags = tags
  2577  			}
  2578  		}
  2579  	}
  2580  
  2581  	return nil
  2582  }
  2583  
  2584  // LabCostDetailsProperties the properties of a lab cost item.
  2585  type LabCostDetailsProperties struct {
  2586  	// Date - The date of the cost item.
  2587  	Date *date.Time `json:"date,omitempty"`
  2588  	// Cost - The cost component of the cost item.
  2589  	Cost *float64 `json:"cost,omitempty"`
  2590  	// CostType - The type of the cost. Possible values include: 'Unavailable', 'Reported', 'Projected'
  2591  	CostType CostType `json:"costType,omitempty"`
  2592  }
  2593  
  2594  // LabCostProperties properties of a cost item.
  2595  type LabCostProperties struct {
  2596  	// TargetCost - The target cost properties
  2597  	TargetCost *TargetCostProperties `json:"targetCost,omitempty"`
  2598  	// LabCostSummary - READ-ONLY; The lab cost summary component of the cost data.
  2599  	LabCostSummary *LabCostSummaryProperties `json:"labCostSummary,omitempty"`
  2600  	// LabCostDetails - READ-ONLY; The lab cost details component of the cost data.
  2601  	LabCostDetails *[]LabCostDetailsProperties `json:"labCostDetails,omitempty"`
  2602  	// ResourceCosts - READ-ONLY; The resource cost component of the cost data.
  2603  	ResourceCosts *[]LabResourceCostProperties `json:"resourceCosts,omitempty"`
  2604  	// CurrencyCode - The currency code of the cost.
  2605  	CurrencyCode *string `json:"currencyCode,omitempty"`
  2606  	// StartDateTime - The start time of the cost data.
  2607  	StartDateTime *date.Time `json:"startDateTime,omitempty"`
  2608  	// EndDateTime - The end time of the cost data.
  2609  	EndDateTime *date.Time `json:"endDateTime,omitempty"`
  2610  	// CreatedDate - The creation date of the cost.
  2611  	CreatedDate *date.Time `json:"createdDate,omitempty"`
  2612  	// ProvisioningState - The provisioning status of the resource.
  2613  	ProvisioningState *string `json:"provisioningState,omitempty"`
  2614  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  2615  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  2616  }
  2617  
  2618  // MarshalJSON is the custom marshaler for LabCostProperties.
  2619  func (lcp LabCostProperties) MarshalJSON() ([]byte, error) {
  2620  	objectMap := make(map[string]interface{})
  2621  	if lcp.TargetCost != nil {
  2622  		objectMap["targetCost"] = lcp.TargetCost
  2623  	}
  2624  	if lcp.CurrencyCode != nil {
  2625  		objectMap["currencyCode"] = lcp.CurrencyCode
  2626  	}
  2627  	if lcp.StartDateTime != nil {
  2628  		objectMap["startDateTime"] = lcp.StartDateTime
  2629  	}
  2630  	if lcp.EndDateTime != nil {
  2631  		objectMap["endDateTime"] = lcp.EndDateTime
  2632  	}
  2633  	if lcp.CreatedDate != nil {
  2634  		objectMap["createdDate"] = lcp.CreatedDate
  2635  	}
  2636  	if lcp.ProvisioningState != nil {
  2637  		objectMap["provisioningState"] = lcp.ProvisioningState
  2638  	}
  2639  	if lcp.UniqueIdentifier != nil {
  2640  		objectMap["uniqueIdentifier"] = lcp.UniqueIdentifier
  2641  	}
  2642  	return json.Marshal(objectMap)
  2643  }
  2644  
  2645  // LabCostSummaryProperties the properties of the cost summary.
  2646  type LabCostSummaryProperties struct {
  2647  	// EstimatedLabCost - The cost component of the cost item.
  2648  	EstimatedLabCost *float64 `json:"estimatedLabCost,omitempty"`
  2649  }
  2650  
  2651  // LabFragment a lab.
  2652  type LabFragment struct {
  2653  	// LabPropertiesFragment - The properties of the resource.
  2654  	*LabPropertiesFragment `json:"properties,omitempty"`
  2655  	// ID - READ-ONLY; The identifier of the resource.
  2656  	ID *string `json:"id,omitempty"`
  2657  	// Name - READ-ONLY; The name of the resource.
  2658  	Name *string `json:"name,omitempty"`
  2659  	// Type - READ-ONLY; The type of the resource.
  2660  	Type *string `json:"type,omitempty"`
  2661  	// Location - The location of the resource.
  2662  	Location *string `json:"location,omitempty"`
  2663  	// Tags - The tags of the resource.
  2664  	Tags map[string]*string `json:"tags"`
  2665  }
  2666  
  2667  // MarshalJSON is the custom marshaler for LabFragment.
  2668  func (lf LabFragment) MarshalJSON() ([]byte, error) {
  2669  	objectMap := make(map[string]interface{})
  2670  	if lf.LabPropertiesFragment != nil {
  2671  		objectMap["properties"] = lf.LabPropertiesFragment
  2672  	}
  2673  	if lf.Location != nil {
  2674  		objectMap["location"] = lf.Location
  2675  	}
  2676  	if lf.Tags != nil {
  2677  		objectMap["tags"] = lf.Tags
  2678  	}
  2679  	return json.Marshal(objectMap)
  2680  }
  2681  
  2682  // UnmarshalJSON is the custom unmarshaler for LabFragment struct.
  2683  func (lf *LabFragment) UnmarshalJSON(body []byte) error {
  2684  	var m map[string]*json.RawMessage
  2685  	err := json.Unmarshal(body, &m)
  2686  	if err != nil {
  2687  		return err
  2688  	}
  2689  	for k, v := range m {
  2690  		switch k {
  2691  		case "properties":
  2692  			if v != nil {
  2693  				var labPropertiesFragment LabPropertiesFragment
  2694  				err = json.Unmarshal(*v, &labPropertiesFragment)
  2695  				if err != nil {
  2696  					return err
  2697  				}
  2698  				lf.LabPropertiesFragment = &labPropertiesFragment
  2699  			}
  2700  		case "id":
  2701  			if v != nil {
  2702  				var ID string
  2703  				err = json.Unmarshal(*v, &ID)
  2704  				if err != nil {
  2705  					return err
  2706  				}
  2707  				lf.ID = &ID
  2708  			}
  2709  		case "name":
  2710  			if v != nil {
  2711  				var name string
  2712  				err = json.Unmarshal(*v, &name)
  2713  				if err != nil {
  2714  					return err
  2715  				}
  2716  				lf.Name = &name
  2717  			}
  2718  		case "type":
  2719  			if v != nil {
  2720  				var typeVar string
  2721  				err = json.Unmarshal(*v, &typeVar)
  2722  				if err != nil {
  2723  					return err
  2724  				}
  2725  				lf.Type = &typeVar
  2726  			}
  2727  		case "location":
  2728  			if v != nil {
  2729  				var location string
  2730  				err = json.Unmarshal(*v, &location)
  2731  				if err != nil {
  2732  					return err
  2733  				}
  2734  				lf.Location = &location
  2735  			}
  2736  		case "tags":
  2737  			if v != nil {
  2738  				var tags map[string]*string
  2739  				err = json.Unmarshal(*v, &tags)
  2740  				if err != nil {
  2741  					return err
  2742  				}
  2743  				lf.Tags = tags
  2744  			}
  2745  		}
  2746  	}
  2747  
  2748  	return nil
  2749  }
  2750  
  2751  // LabProperties properties of a lab.
  2752  type LabProperties struct {
  2753  	// DefaultStorageAccount - READ-ONLY; The lab's default storage account.
  2754  	DefaultStorageAccount *string `json:"defaultStorageAccount,omitempty"`
  2755  	// DefaultPremiumStorageAccount - READ-ONLY; The lab's default premium storage account.
  2756  	DefaultPremiumStorageAccount *string `json:"defaultPremiumStorageAccount,omitempty"`
  2757  	// ArtifactsStorageAccount - READ-ONLY; The lab's artifact storage account.
  2758  	ArtifactsStorageAccount *string `json:"artifactsStorageAccount,omitempty"`
  2759  	// PremiumDataDiskStorageAccount - READ-ONLY; The lab's premium data disk storage account.
  2760  	PremiumDataDiskStorageAccount *string `json:"premiumDataDiskStorageAccount,omitempty"`
  2761  	// VaultName - READ-ONLY; The lab's Key vault.
  2762  	VaultName *string `json:"vaultName,omitempty"`
  2763  	// LabStorageType - Type of storage used by the lab. It can be either Premium or Standard. Default is Premium. Possible values include: 'Standard', 'Premium'
  2764  	LabStorageType StorageType `json:"labStorageType,omitempty"`
  2765  	// CreatedDate - READ-ONLY; The creation date of the lab.
  2766  	CreatedDate *date.Time `json:"createdDate,omitempty"`
  2767  	// PremiumDataDisks - The setting to enable usage of premium data disks.
  2768  	// When its value is 'Enabled', creation of standard or premium data disks is allowed.
  2769  	// When its value is 'Disabled', only creation of standard data disks is allowed. Possible values include: 'PremiumDataDiskDisabled', 'PremiumDataDiskEnabled'
  2770  	PremiumDataDisks PremiumDataDisk `json:"premiumDataDisks,omitempty"`
  2771  	// ProvisioningState - The provisioning status of the resource.
  2772  	ProvisioningState *string `json:"provisioningState,omitempty"`
  2773  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  2774  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  2775  }
  2776  
  2777  // MarshalJSON is the custom marshaler for LabProperties.
  2778  func (lp LabProperties) MarshalJSON() ([]byte, error) {
  2779  	objectMap := make(map[string]interface{})
  2780  	if lp.LabStorageType != "" {
  2781  		objectMap["labStorageType"] = lp.LabStorageType
  2782  	}
  2783  	if lp.PremiumDataDisks != "" {
  2784  		objectMap["premiumDataDisks"] = lp.PremiumDataDisks
  2785  	}
  2786  	if lp.ProvisioningState != nil {
  2787  		objectMap["provisioningState"] = lp.ProvisioningState
  2788  	}
  2789  	if lp.UniqueIdentifier != nil {
  2790  		objectMap["uniqueIdentifier"] = lp.UniqueIdentifier
  2791  	}
  2792  	return json.Marshal(objectMap)
  2793  }
  2794  
  2795  // LabPropertiesFragment properties of a lab.
  2796  type LabPropertiesFragment struct {
  2797  	// LabStorageType - Type of storage used by the lab. It can be either Premium or Standard. Default is Premium. Possible values include: 'Standard', 'Premium'
  2798  	LabStorageType StorageType `json:"labStorageType,omitempty"`
  2799  	// PremiumDataDisks - The setting to enable usage of premium data disks.
  2800  	// When its value is 'Enabled', creation of standard or premium data disks is allowed.
  2801  	// When its value is 'Disabled', only creation of standard data disks is allowed. Possible values include: 'PremiumDataDiskDisabled', 'PremiumDataDiskEnabled'
  2802  	PremiumDataDisks PremiumDataDisk `json:"premiumDataDisks,omitempty"`
  2803  	// ProvisioningState - The provisioning status of the resource.
  2804  	ProvisioningState *string `json:"provisioningState,omitempty"`
  2805  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  2806  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  2807  }
  2808  
  2809  // LabResourceCostProperties the properties of a resource cost item.
  2810  type LabResourceCostProperties struct {
  2811  	// Resourcename - The name of the resource.
  2812  	Resourcename *string `json:"resourcename,omitempty"`
  2813  	// ResourceUID - The unique identifier of the resource.
  2814  	ResourceUID *string `json:"resourceUId,omitempty"`
  2815  	// ResourceCost - The cost component of the resource cost item.
  2816  	ResourceCost *float64 `json:"resourceCost,omitempty"`
  2817  	// ResourceType - The logical resource type (ex. virtualmachine, storageaccount)
  2818  	ResourceType *string `json:"resourceType,omitempty"`
  2819  	// ResourceOwner - The owner of the resource (ex. janedoe@microsoft.com)
  2820  	ResourceOwner *string `json:"resourceOwner,omitempty"`
  2821  	// ResourcePricingTier - The category of the resource (ex. Premium_LRS, Standard_DS1)
  2822  	ResourcePricingTier *string `json:"resourcePricingTier,omitempty"`
  2823  	// ResourceStatus - The status of the resource (ex. Active)
  2824  	ResourceStatus *string `json:"resourceStatus,omitempty"`
  2825  	// ResourceID - The ID of the resource
  2826  	ResourceID *string `json:"resourceId,omitempty"`
  2827  	// ExternalResourceID - The ID of the external resource
  2828  	ExternalResourceID *string `json:"externalResourceId,omitempty"`
  2829  }
  2830  
  2831  // LabsClaimAnyVMFuture an abstraction for monitoring and retrieving the results of a long-running
  2832  // operation.
  2833  type LabsClaimAnyVMFuture struct {
  2834  	azure.FutureAPI
  2835  	// Result returns the result of the asynchronous operation.
  2836  	// If the operation has not completed it will return an error.
  2837  	Result func(LabsClient) (autorest.Response, error)
  2838  }
  2839  
  2840  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2841  func (future *LabsClaimAnyVMFuture) UnmarshalJSON(body []byte) error {
  2842  	var azFuture azure.Future
  2843  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2844  		return err
  2845  	}
  2846  	future.FutureAPI = &azFuture
  2847  	future.Result = future.result
  2848  	return nil
  2849  }
  2850  
  2851  // result is the default implementation for LabsClaimAnyVMFuture.Result.
  2852  func (future *LabsClaimAnyVMFuture) result(client LabsClient) (ar autorest.Response, err error) {
  2853  	var done bool
  2854  	done, err = future.DoneWithContext(context.Background(), client)
  2855  	if err != nil {
  2856  		err = autorest.NewErrorWithError(err, "dtl.LabsClaimAnyVMFuture", "Result", future.Response(), "Polling failure")
  2857  		return
  2858  	}
  2859  	if !done {
  2860  		ar.Response = future.Response()
  2861  		err = azure.NewAsyncOpIncompleteError("dtl.LabsClaimAnyVMFuture")
  2862  		return
  2863  	}
  2864  	ar.Response = future.Response()
  2865  	return
  2866  }
  2867  
  2868  // LabsCreateEnvironmentFuture an abstraction for monitoring and retrieving the results of a long-running
  2869  // operation.
  2870  type LabsCreateEnvironmentFuture struct {
  2871  	azure.FutureAPI
  2872  	// Result returns the result of the asynchronous operation.
  2873  	// If the operation has not completed it will return an error.
  2874  	Result func(LabsClient) (autorest.Response, error)
  2875  }
  2876  
  2877  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2878  func (future *LabsCreateEnvironmentFuture) UnmarshalJSON(body []byte) error {
  2879  	var azFuture azure.Future
  2880  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2881  		return err
  2882  	}
  2883  	future.FutureAPI = &azFuture
  2884  	future.Result = future.result
  2885  	return nil
  2886  }
  2887  
  2888  // result is the default implementation for LabsCreateEnvironmentFuture.Result.
  2889  func (future *LabsCreateEnvironmentFuture) result(client LabsClient) (ar autorest.Response, err error) {
  2890  	var done bool
  2891  	done, err = future.DoneWithContext(context.Background(), client)
  2892  	if err != nil {
  2893  		err = autorest.NewErrorWithError(err, "dtl.LabsCreateEnvironmentFuture", "Result", future.Response(), "Polling failure")
  2894  		return
  2895  	}
  2896  	if !done {
  2897  		ar.Response = future.Response()
  2898  		err = azure.NewAsyncOpIncompleteError("dtl.LabsCreateEnvironmentFuture")
  2899  		return
  2900  	}
  2901  	ar.Response = future.Response()
  2902  	return
  2903  }
  2904  
  2905  // LabsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
  2906  // operation.
  2907  type LabsCreateOrUpdateFuture struct {
  2908  	azure.FutureAPI
  2909  	// Result returns the result of the asynchronous operation.
  2910  	// If the operation has not completed it will return an error.
  2911  	Result func(LabsClient) (Lab, error)
  2912  }
  2913  
  2914  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2915  func (future *LabsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  2916  	var azFuture azure.Future
  2917  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2918  		return err
  2919  	}
  2920  	future.FutureAPI = &azFuture
  2921  	future.Result = future.result
  2922  	return nil
  2923  }
  2924  
  2925  // result is the default implementation for LabsCreateOrUpdateFuture.Result.
  2926  func (future *LabsCreateOrUpdateFuture) result(client LabsClient) (l Lab, err error) {
  2927  	var done bool
  2928  	done, err = future.DoneWithContext(context.Background(), client)
  2929  	if err != nil {
  2930  		err = autorest.NewErrorWithError(err, "dtl.LabsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  2931  		return
  2932  	}
  2933  	if !done {
  2934  		l.Response.Response = future.Response()
  2935  		err = azure.NewAsyncOpIncompleteError("dtl.LabsCreateOrUpdateFuture")
  2936  		return
  2937  	}
  2938  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2939  	if l.Response.Response, err = future.GetResult(sender); err == nil && l.Response.Response.StatusCode != http.StatusNoContent {
  2940  		l, err = client.CreateOrUpdateResponder(l.Response.Response)
  2941  		if err != nil {
  2942  			err = autorest.NewErrorWithError(err, "dtl.LabsCreateOrUpdateFuture", "Result", l.Response.Response, "Failure responding to request")
  2943  		}
  2944  	}
  2945  	return
  2946  }
  2947  
  2948  // LabsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
  2949  type LabsDeleteFuture struct {
  2950  	azure.FutureAPI
  2951  	// Result returns the result of the asynchronous operation.
  2952  	// If the operation has not completed it will return an error.
  2953  	Result func(LabsClient) (autorest.Response, error)
  2954  }
  2955  
  2956  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2957  func (future *LabsDeleteFuture) UnmarshalJSON(body []byte) error {
  2958  	var azFuture azure.Future
  2959  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2960  		return err
  2961  	}
  2962  	future.FutureAPI = &azFuture
  2963  	future.Result = future.result
  2964  	return nil
  2965  }
  2966  
  2967  // result is the default implementation for LabsDeleteFuture.Result.
  2968  func (future *LabsDeleteFuture) result(client LabsClient) (ar autorest.Response, err error) {
  2969  	var done bool
  2970  	done, err = future.DoneWithContext(context.Background(), client)
  2971  	if err != nil {
  2972  		err = autorest.NewErrorWithError(err, "dtl.LabsDeleteFuture", "Result", future.Response(), "Polling failure")
  2973  		return
  2974  	}
  2975  	if !done {
  2976  		ar.Response = future.Response()
  2977  		err = azure.NewAsyncOpIncompleteError("dtl.LabsDeleteFuture")
  2978  		return
  2979  	}
  2980  	ar.Response = future.Response()
  2981  	return
  2982  }
  2983  
  2984  // LabsExportResourceUsageFuture an abstraction for monitoring and retrieving the results of a long-running
  2985  // operation.
  2986  type LabsExportResourceUsageFuture struct {
  2987  	azure.FutureAPI
  2988  	// Result returns the result of the asynchronous operation.
  2989  	// If the operation has not completed it will return an error.
  2990  	Result func(LabsClient) (autorest.Response, error)
  2991  }
  2992  
  2993  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  2994  func (future *LabsExportResourceUsageFuture) UnmarshalJSON(body []byte) error {
  2995  	var azFuture azure.Future
  2996  	if err := json.Unmarshal(body, &azFuture); err != nil {
  2997  		return err
  2998  	}
  2999  	future.FutureAPI = &azFuture
  3000  	future.Result = future.result
  3001  	return nil
  3002  }
  3003  
  3004  // result is the default implementation for LabsExportResourceUsageFuture.Result.
  3005  func (future *LabsExportResourceUsageFuture) result(client LabsClient) (ar autorest.Response, err error) {
  3006  	var done bool
  3007  	done, err = future.DoneWithContext(context.Background(), client)
  3008  	if err != nil {
  3009  		err = autorest.NewErrorWithError(err, "dtl.LabsExportResourceUsageFuture", "Result", future.Response(), "Polling failure")
  3010  		return
  3011  	}
  3012  	if !done {
  3013  		ar.Response = future.Response()
  3014  		err = azure.NewAsyncOpIncompleteError("dtl.LabsExportResourceUsageFuture")
  3015  		return
  3016  	}
  3017  	ar.Response = future.Response()
  3018  	return
  3019  }
  3020  
  3021  // LabVhd properties of a VHD in the lab.
  3022  type LabVhd struct {
  3023  	// ID - The URI to the VHD.
  3024  	ID *string `json:"id,omitempty"`
  3025  }
  3026  
  3027  // LabVirtualMachine a virtual machine.
  3028  type LabVirtualMachine struct {
  3029  	autorest.Response `json:"-"`
  3030  	// LabVirtualMachineProperties - The properties of the resource.
  3031  	*LabVirtualMachineProperties `json:"properties,omitempty"`
  3032  	// ID - READ-ONLY; The identifier of the resource.
  3033  	ID *string `json:"id,omitempty"`
  3034  	// Name - READ-ONLY; The name of the resource.
  3035  	Name *string `json:"name,omitempty"`
  3036  	// Type - READ-ONLY; The type of the resource.
  3037  	Type *string `json:"type,omitempty"`
  3038  	// Location - The location of the resource.
  3039  	Location *string `json:"location,omitempty"`
  3040  	// Tags - The tags of the resource.
  3041  	Tags map[string]*string `json:"tags"`
  3042  }
  3043  
  3044  // MarshalJSON is the custom marshaler for LabVirtualMachine.
  3045  func (lvm LabVirtualMachine) MarshalJSON() ([]byte, error) {
  3046  	objectMap := make(map[string]interface{})
  3047  	if lvm.LabVirtualMachineProperties != nil {
  3048  		objectMap["properties"] = lvm.LabVirtualMachineProperties
  3049  	}
  3050  	if lvm.Location != nil {
  3051  		objectMap["location"] = lvm.Location
  3052  	}
  3053  	if lvm.Tags != nil {
  3054  		objectMap["tags"] = lvm.Tags
  3055  	}
  3056  	return json.Marshal(objectMap)
  3057  }
  3058  
  3059  // UnmarshalJSON is the custom unmarshaler for LabVirtualMachine struct.
  3060  func (lvm *LabVirtualMachine) UnmarshalJSON(body []byte) error {
  3061  	var m map[string]*json.RawMessage
  3062  	err := json.Unmarshal(body, &m)
  3063  	if err != nil {
  3064  		return err
  3065  	}
  3066  	for k, v := range m {
  3067  		switch k {
  3068  		case "properties":
  3069  			if v != nil {
  3070  				var labVirtualMachineProperties LabVirtualMachineProperties
  3071  				err = json.Unmarshal(*v, &labVirtualMachineProperties)
  3072  				if err != nil {
  3073  					return err
  3074  				}
  3075  				lvm.LabVirtualMachineProperties = &labVirtualMachineProperties
  3076  			}
  3077  		case "id":
  3078  			if v != nil {
  3079  				var ID string
  3080  				err = json.Unmarshal(*v, &ID)
  3081  				if err != nil {
  3082  					return err
  3083  				}
  3084  				lvm.ID = &ID
  3085  			}
  3086  		case "name":
  3087  			if v != nil {
  3088  				var name string
  3089  				err = json.Unmarshal(*v, &name)
  3090  				if err != nil {
  3091  					return err
  3092  				}
  3093  				lvm.Name = &name
  3094  			}
  3095  		case "type":
  3096  			if v != nil {
  3097  				var typeVar string
  3098  				err = json.Unmarshal(*v, &typeVar)
  3099  				if err != nil {
  3100  					return err
  3101  				}
  3102  				lvm.Type = &typeVar
  3103  			}
  3104  		case "location":
  3105  			if v != nil {
  3106  				var location string
  3107  				err = json.Unmarshal(*v, &location)
  3108  				if err != nil {
  3109  					return err
  3110  				}
  3111  				lvm.Location = &location
  3112  			}
  3113  		case "tags":
  3114  			if v != nil {
  3115  				var tags map[string]*string
  3116  				err = json.Unmarshal(*v, &tags)
  3117  				if err != nil {
  3118  					return err
  3119  				}
  3120  				lvm.Tags = tags
  3121  			}
  3122  		}
  3123  	}
  3124  
  3125  	return nil
  3126  }
  3127  
  3128  // LabVirtualMachineCreationParameter properties for creating a virtual machine.
  3129  type LabVirtualMachineCreationParameter struct {
  3130  	// LabVirtualMachineCreationParameterProperties - The properties of the resource.
  3131  	*LabVirtualMachineCreationParameterProperties `json:"properties,omitempty"`
  3132  	// Name - The name of the virtual machine or environment
  3133  	Name *string `json:"name,omitempty"`
  3134  	// Location - The location of the new virtual machine or environment
  3135  	Location *string `json:"location,omitempty"`
  3136  	// Tags - The tags of the resource.
  3137  	Tags map[string]*string `json:"tags"`
  3138  }
  3139  
  3140  // MarshalJSON is the custom marshaler for LabVirtualMachineCreationParameter.
  3141  func (lvmcp LabVirtualMachineCreationParameter) MarshalJSON() ([]byte, error) {
  3142  	objectMap := make(map[string]interface{})
  3143  	if lvmcp.LabVirtualMachineCreationParameterProperties != nil {
  3144  		objectMap["properties"] = lvmcp.LabVirtualMachineCreationParameterProperties
  3145  	}
  3146  	if lvmcp.Name != nil {
  3147  		objectMap["name"] = lvmcp.Name
  3148  	}
  3149  	if lvmcp.Location != nil {
  3150  		objectMap["location"] = lvmcp.Location
  3151  	}
  3152  	if lvmcp.Tags != nil {
  3153  		objectMap["tags"] = lvmcp.Tags
  3154  	}
  3155  	return json.Marshal(objectMap)
  3156  }
  3157  
  3158  // UnmarshalJSON is the custom unmarshaler for LabVirtualMachineCreationParameter struct.
  3159  func (lvmcp *LabVirtualMachineCreationParameter) UnmarshalJSON(body []byte) error {
  3160  	var m map[string]*json.RawMessage
  3161  	err := json.Unmarshal(body, &m)
  3162  	if err != nil {
  3163  		return err
  3164  	}
  3165  	for k, v := range m {
  3166  		switch k {
  3167  		case "properties":
  3168  			if v != nil {
  3169  				var labVirtualMachineCreationParameterProperties LabVirtualMachineCreationParameterProperties
  3170  				err = json.Unmarshal(*v, &labVirtualMachineCreationParameterProperties)
  3171  				if err != nil {
  3172  					return err
  3173  				}
  3174  				lvmcp.LabVirtualMachineCreationParameterProperties = &labVirtualMachineCreationParameterProperties
  3175  			}
  3176  		case "name":
  3177  			if v != nil {
  3178  				var name string
  3179  				err = json.Unmarshal(*v, &name)
  3180  				if err != nil {
  3181  					return err
  3182  				}
  3183  				lvmcp.Name = &name
  3184  			}
  3185  		case "location":
  3186  			if v != nil {
  3187  				var location string
  3188  				err = json.Unmarshal(*v, &location)
  3189  				if err != nil {
  3190  					return err
  3191  				}
  3192  				lvmcp.Location = &location
  3193  			}
  3194  		case "tags":
  3195  			if v != nil {
  3196  				var tags map[string]*string
  3197  				err = json.Unmarshal(*v, &tags)
  3198  				if err != nil {
  3199  					return err
  3200  				}
  3201  				lvmcp.Tags = tags
  3202  			}
  3203  		}
  3204  	}
  3205  
  3206  	return nil
  3207  }
  3208  
  3209  // LabVirtualMachineCreationParameterProperties properties for virtual machine creation.
  3210  type LabVirtualMachineCreationParameterProperties struct {
  3211  	// BulkCreationParameters - The number of virtual machine instances to create.
  3212  	BulkCreationParameters *BulkCreationParameters `json:"bulkCreationParameters,omitempty"`
  3213  	// Notes - The notes of the virtual machine.
  3214  	Notes *string `json:"notes,omitempty"`
  3215  	// OwnerObjectID - The object identifier of the owner of the virtual machine.
  3216  	OwnerObjectID *string `json:"ownerObjectId,omitempty"`
  3217  	// OwnerUserPrincipalName - The user principal name of the virtual machine owner.
  3218  	OwnerUserPrincipalName *string `json:"ownerUserPrincipalName,omitempty"`
  3219  	// CreatedByUserID - The object identifier of the creator of the virtual machine.
  3220  	CreatedByUserID *string `json:"createdByUserId,omitempty"`
  3221  	// CreatedByUser - The email address of creator of the virtual machine.
  3222  	CreatedByUser *string `json:"createdByUser,omitempty"`
  3223  	// CreatedDate - The creation date of the virtual machine.
  3224  	CreatedDate *date.Time `json:"createdDate,omitempty"`
  3225  	// CustomImageID - The custom image identifier of the virtual machine.
  3226  	CustomImageID *string `json:"customImageId,omitempty"`
  3227  	// OsType - The OS type of the virtual machine.
  3228  	OsType *string `json:"osType,omitempty"`
  3229  	// Size - The size of the virtual machine.
  3230  	Size *string `json:"size,omitempty"`
  3231  	// UserName - The user name of the virtual machine.
  3232  	UserName *string `json:"userName,omitempty"`
  3233  	// Password - The password of the virtual machine administrator.
  3234  	Password *string `json:"password,omitempty"`
  3235  	// SSHKey - The SSH key of the virtual machine administrator.
  3236  	SSHKey *string `json:"sshKey,omitempty"`
  3237  	// IsAuthenticationWithSSHKey - Indicates whether this virtual machine uses an SSH key for authentication.
  3238  	IsAuthenticationWithSSHKey *bool `json:"isAuthenticationWithSshKey,omitempty"`
  3239  	// Fqdn - The fully-qualified domain name of the virtual machine.
  3240  	Fqdn *string `json:"fqdn,omitempty"`
  3241  	// LabSubnetName - The lab subnet name of the virtual machine.
  3242  	LabSubnetName *string `json:"labSubnetName,omitempty"`
  3243  	// LabVirtualNetworkID - The lab virtual network identifier of the virtual machine.
  3244  	LabVirtualNetworkID *string `json:"labVirtualNetworkId,omitempty"`
  3245  	// DisallowPublicIPAddress - Indicates whether the virtual machine is to be created without a public IP address.
  3246  	DisallowPublicIPAddress *bool `json:"disallowPublicIpAddress,omitempty"`
  3247  	// Artifacts - The artifacts to be installed on the virtual machine.
  3248  	Artifacts *[]ArtifactInstallProperties `json:"artifacts,omitempty"`
  3249  	// ArtifactDeploymentStatus - The artifact deployment status for the virtual machine.
  3250  	ArtifactDeploymentStatus *ArtifactDeploymentStatusProperties `json:"artifactDeploymentStatus,omitempty"`
  3251  	// GalleryImageReference - The Microsoft Azure Marketplace image reference of the virtual machine.
  3252  	GalleryImageReference *GalleryImageReference `json:"galleryImageReference,omitempty"`
  3253  	// ComputeVM - The compute virtual machine properties.
  3254  	ComputeVM *ComputeVMProperties `json:"computeVm,omitempty"`
  3255  	// NetworkInterface - The network interface properties.
  3256  	NetworkInterface *NetworkInterfaceProperties `json:"networkInterface,omitempty"`
  3257  	// ApplicableSchedule - The applicable schedule for the virtual machine.
  3258  	ApplicableSchedule *ApplicableSchedule `json:"applicableSchedule,omitempty"`
  3259  	// ExpirationDate - The expiration date for VM.
  3260  	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
  3261  	// AllowClaim - Indicates whether another user can take ownership of the virtual machine
  3262  	AllowClaim *bool `json:"allowClaim,omitempty"`
  3263  	// StorageType - Storage type to use for virtual machine (i.e. Standard, Premium).
  3264  	StorageType *string `json:"storageType,omitempty"`
  3265  	// VirtualMachineCreationSource - Tells source of creation of lab virtual machine. Output property only. Possible values include: 'FromCustomImage', 'FromGalleryImage'
  3266  	VirtualMachineCreationSource VirtualMachineCreationSource `json:"virtualMachineCreationSource,omitempty"`
  3267  	// EnvironmentID - The resource ID of the environment that contains this virtual machine, if any.
  3268  	EnvironmentID *string `json:"environmentId,omitempty"`
  3269  	// ProvisioningState - The provisioning status of the resource.
  3270  	ProvisioningState *string `json:"provisioningState,omitempty"`
  3271  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  3272  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  3273  }
  3274  
  3275  // LabVirtualMachineFragment a virtual machine.
  3276  type LabVirtualMachineFragment struct {
  3277  	// LabVirtualMachinePropertiesFragment - The properties of the resource.
  3278  	*LabVirtualMachinePropertiesFragment `json:"properties,omitempty"`
  3279  	// ID - READ-ONLY; The identifier of the resource.
  3280  	ID *string `json:"id,omitempty"`
  3281  	// Name - READ-ONLY; The name of the resource.
  3282  	Name *string `json:"name,omitempty"`
  3283  	// Type - READ-ONLY; The type of the resource.
  3284  	Type *string `json:"type,omitempty"`
  3285  	// Location - The location of the resource.
  3286  	Location *string `json:"location,omitempty"`
  3287  	// Tags - The tags of the resource.
  3288  	Tags map[string]*string `json:"tags"`
  3289  }
  3290  
  3291  // MarshalJSON is the custom marshaler for LabVirtualMachineFragment.
  3292  func (lvmf LabVirtualMachineFragment) MarshalJSON() ([]byte, error) {
  3293  	objectMap := make(map[string]interface{})
  3294  	if lvmf.LabVirtualMachinePropertiesFragment != nil {
  3295  		objectMap["properties"] = lvmf.LabVirtualMachinePropertiesFragment
  3296  	}
  3297  	if lvmf.Location != nil {
  3298  		objectMap["location"] = lvmf.Location
  3299  	}
  3300  	if lvmf.Tags != nil {
  3301  		objectMap["tags"] = lvmf.Tags
  3302  	}
  3303  	return json.Marshal(objectMap)
  3304  }
  3305  
  3306  // UnmarshalJSON is the custom unmarshaler for LabVirtualMachineFragment struct.
  3307  func (lvmf *LabVirtualMachineFragment) UnmarshalJSON(body []byte) error {
  3308  	var m map[string]*json.RawMessage
  3309  	err := json.Unmarshal(body, &m)
  3310  	if err != nil {
  3311  		return err
  3312  	}
  3313  	for k, v := range m {
  3314  		switch k {
  3315  		case "properties":
  3316  			if v != nil {
  3317  				var labVirtualMachinePropertiesFragment LabVirtualMachinePropertiesFragment
  3318  				err = json.Unmarshal(*v, &labVirtualMachinePropertiesFragment)
  3319  				if err != nil {
  3320  					return err
  3321  				}
  3322  				lvmf.LabVirtualMachinePropertiesFragment = &labVirtualMachinePropertiesFragment
  3323  			}
  3324  		case "id":
  3325  			if v != nil {
  3326  				var ID string
  3327  				err = json.Unmarshal(*v, &ID)
  3328  				if err != nil {
  3329  					return err
  3330  				}
  3331  				lvmf.ID = &ID
  3332  			}
  3333  		case "name":
  3334  			if v != nil {
  3335  				var name string
  3336  				err = json.Unmarshal(*v, &name)
  3337  				if err != nil {
  3338  					return err
  3339  				}
  3340  				lvmf.Name = &name
  3341  			}
  3342  		case "type":
  3343  			if v != nil {
  3344  				var typeVar string
  3345  				err = json.Unmarshal(*v, &typeVar)
  3346  				if err != nil {
  3347  					return err
  3348  				}
  3349  				lvmf.Type = &typeVar
  3350  			}
  3351  		case "location":
  3352  			if v != nil {
  3353  				var location string
  3354  				err = json.Unmarshal(*v, &location)
  3355  				if err != nil {
  3356  					return err
  3357  				}
  3358  				lvmf.Location = &location
  3359  			}
  3360  		case "tags":
  3361  			if v != nil {
  3362  				var tags map[string]*string
  3363  				err = json.Unmarshal(*v, &tags)
  3364  				if err != nil {
  3365  					return err
  3366  				}
  3367  				lvmf.Tags = tags
  3368  			}
  3369  		}
  3370  	}
  3371  
  3372  	return nil
  3373  }
  3374  
  3375  // LabVirtualMachineProperties properties of a virtual machine.
  3376  type LabVirtualMachineProperties struct {
  3377  	// Notes - The notes of the virtual machine.
  3378  	Notes *string `json:"notes,omitempty"`
  3379  	// OwnerObjectID - The object identifier of the owner of the virtual machine.
  3380  	OwnerObjectID *string `json:"ownerObjectId,omitempty"`
  3381  	// OwnerUserPrincipalName - The user principal name of the virtual machine owner.
  3382  	OwnerUserPrincipalName *string `json:"ownerUserPrincipalName,omitempty"`
  3383  	// CreatedByUserID - The object identifier of the creator of the virtual machine.
  3384  	CreatedByUserID *string `json:"createdByUserId,omitempty"`
  3385  	// CreatedByUser - The email address of creator of the virtual machine.
  3386  	CreatedByUser *string `json:"createdByUser,omitempty"`
  3387  	// CreatedDate - The creation date of the virtual machine.
  3388  	CreatedDate *date.Time `json:"createdDate,omitempty"`
  3389  	// ComputeID - READ-ONLY; The resource identifier (Microsoft.Compute) of the virtual machine.
  3390  	ComputeID *string `json:"computeId,omitempty"`
  3391  	// CustomImageID - The custom image identifier of the virtual machine.
  3392  	CustomImageID *string `json:"customImageId,omitempty"`
  3393  	// OsType - The OS type of the virtual machine.
  3394  	OsType *string `json:"osType,omitempty"`
  3395  	// Size - The size of the virtual machine.
  3396  	Size *string `json:"size,omitempty"`
  3397  	// UserName - The user name of the virtual machine.
  3398  	UserName *string `json:"userName,omitempty"`
  3399  	// Password - The password of the virtual machine administrator.
  3400  	Password *string `json:"password,omitempty"`
  3401  	// SSHKey - The SSH key of the virtual machine administrator.
  3402  	SSHKey *string `json:"sshKey,omitempty"`
  3403  	// IsAuthenticationWithSSHKey - Indicates whether this virtual machine uses an SSH key for authentication.
  3404  	IsAuthenticationWithSSHKey *bool `json:"isAuthenticationWithSshKey,omitempty"`
  3405  	// Fqdn - The fully-qualified domain name of the virtual machine.
  3406  	Fqdn *string `json:"fqdn,omitempty"`
  3407  	// LabSubnetName - The lab subnet name of the virtual machine.
  3408  	LabSubnetName *string `json:"labSubnetName,omitempty"`
  3409  	// LabVirtualNetworkID - The lab virtual network identifier of the virtual machine.
  3410  	LabVirtualNetworkID *string `json:"labVirtualNetworkId,omitempty"`
  3411  	// DisallowPublicIPAddress - Indicates whether the virtual machine is to be created without a public IP address.
  3412  	DisallowPublicIPAddress *bool `json:"disallowPublicIpAddress,omitempty"`
  3413  	// Artifacts - The artifacts to be installed on the virtual machine.
  3414  	Artifacts *[]ArtifactInstallProperties `json:"artifacts,omitempty"`
  3415  	// ArtifactDeploymentStatus - The artifact deployment status for the virtual machine.
  3416  	ArtifactDeploymentStatus *ArtifactDeploymentStatusProperties `json:"artifactDeploymentStatus,omitempty"`
  3417  	// GalleryImageReference - The Microsoft Azure Marketplace image reference of the virtual machine.
  3418  	GalleryImageReference *GalleryImageReference `json:"galleryImageReference,omitempty"`
  3419  	// ComputeVM - The compute virtual machine properties.
  3420  	ComputeVM *ComputeVMProperties `json:"computeVm,omitempty"`
  3421  	// NetworkInterface - The network interface properties.
  3422  	NetworkInterface *NetworkInterfaceProperties `json:"networkInterface,omitempty"`
  3423  	// ApplicableSchedule - The applicable schedule for the virtual machine.
  3424  	ApplicableSchedule *ApplicableSchedule `json:"applicableSchedule,omitempty"`
  3425  	// ExpirationDate - The expiration date for VM.
  3426  	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
  3427  	// AllowClaim - Indicates whether another user can take ownership of the virtual machine
  3428  	AllowClaim *bool `json:"allowClaim,omitempty"`
  3429  	// StorageType - Storage type to use for virtual machine (i.e. Standard, Premium).
  3430  	StorageType *string `json:"storageType,omitempty"`
  3431  	// VirtualMachineCreationSource - Tells source of creation of lab virtual machine. Output property only. Possible values include: 'FromCustomImage', 'FromGalleryImage'
  3432  	VirtualMachineCreationSource VirtualMachineCreationSource `json:"virtualMachineCreationSource,omitempty"`
  3433  	// EnvironmentID - The resource ID of the environment that contains this virtual machine, if any.
  3434  	EnvironmentID *string `json:"environmentId,omitempty"`
  3435  	// ProvisioningState - The provisioning status of the resource.
  3436  	ProvisioningState *string `json:"provisioningState,omitempty"`
  3437  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  3438  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  3439  }
  3440  
  3441  // MarshalJSON is the custom marshaler for LabVirtualMachineProperties.
  3442  func (lvmp LabVirtualMachineProperties) MarshalJSON() ([]byte, error) {
  3443  	objectMap := make(map[string]interface{})
  3444  	if lvmp.Notes != nil {
  3445  		objectMap["notes"] = lvmp.Notes
  3446  	}
  3447  	if lvmp.OwnerObjectID != nil {
  3448  		objectMap["ownerObjectId"] = lvmp.OwnerObjectID
  3449  	}
  3450  	if lvmp.OwnerUserPrincipalName != nil {
  3451  		objectMap["ownerUserPrincipalName"] = lvmp.OwnerUserPrincipalName
  3452  	}
  3453  	if lvmp.CreatedByUserID != nil {
  3454  		objectMap["createdByUserId"] = lvmp.CreatedByUserID
  3455  	}
  3456  	if lvmp.CreatedByUser != nil {
  3457  		objectMap["createdByUser"] = lvmp.CreatedByUser
  3458  	}
  3459  	if lvmp.CreatedDate != nil {
  3460  		objectMap["createdDate"] = lvmp.CreatedDate
  3461  	}
  3462  	if lvmp.CustomImageID != nil {
  3463  		objectMap["customImageId"] = lvmp.CustomImageID
  3464  	}
  3465  	if lvmp.OsType != nil {
  3466  		objectMap["osType"] = lvmp.OsType
  3467  	}
  3468  	if lvmp.Size != nil {
  3469  		objectMap["size"] = lvmp.Size
  3470  	}
  3471  	if lvmp.UserName != nil {
  3472  		objectMap["userName"] = lvmp.UserName
  3473  	}
  3474  	if lvmp.Password != nil {
  3475  		objectMap["password"] = lvmp.Password
  3476  	}
  3477  	if lvmp.SSHKey != nil {
  3478  		objectMap["sshKey"] = lvmp.SSHKey
  3479  	}
  3480  	if lvmp.IsAuthenticationWithSSHKey != nil {
  3481  		objectMap["isAuthenticationWithSshKey"] = lvmp.IsAuthenticationWithSSHKey
  3482  	}
  3483  	if lvmp.Fqdn != nil {
  3484  		objectMap["fqdn"] = lvmp.Fqdn
  3485  	}
  3486  	if lvmp.LabSubnetName != nil {
  3487  		objectMap["labSubnetName"] = lvmp.LabSubnetName
  3488  	}
  3489  	if lvmp.LabVirtualNetworkID != nil {
  3490  		objectMap["labVirtualNetworkId"] = lvmp.LabVirtualNetworkID
  3491  	}
  3492  	if lvmp.DisallowPublicIPAddress != nil {
  3493  		objectMap["disallowPublicIpAddress"] = lvmp.DisallowPublicIPAddress
  3494  	}
  3495  	if lvmp.Artifacts != nil {
  3496  		objectMap["artifacts"] = lvmp.Artifacts
  3497  	}
  3498  	if lvmp.ArtifactDeploymentStatus != nil {
  3499  		objectMap["artifactDeploymentStatus"] = lvmp.ArtifactDeploymentStatus
  3500  	}
  3501  	if lvmp.GalleryImageReference != nil {
  3502  		objectMap["galleryImageReference"] = lvmp.GalleryImageReference
  3503  	}
  3504  	if lvmp.ComputeVM != nil {
  3505  		objectMap["computeVm"] = lvmp.ComputeVM
  3506  	}
  3507  	if lvmp.NetworkInterface != nil {
  3508  		objectMap["networkInterface"] = lvmp.NetworkInterface
  3509  	}
  3510  	if lvmp.ApplicableSchedule != nil {
  3511  		objectMap["applicableSchedule"] = lvmp.ApplicableSchedule
  3512  	}
  3513  	if lvmp.ExpirationDate != nil {
  3514  		objectMap["expirationDate"] = lvmp.ExpirationDate
  3515  	}
  3516  	if lvmp.AllowClaim != nil {
  3517  		objectMap["allowClaim"] = lvmp.AllowClaim
  3518  	}
  3519  	if lvmp.StorageType != nil {
  3520  		objectMap["storageType"] = lvmp.StorageType
  3521  	}
  3522  	if lvmp.VirtualMachineCreationSource != "" {
  3523  		objectMap["virtualMachineCreationSource"] = lvmp.VirtualMachineCreationSource
  3524  	}
  3525  	if lvmp.EnvironmentID != nil {
  3526  		objectMap["environmentId"] = lvmp.EnvironmentID
  3527  	}
  3528  	if lvmp.ProvisioningState != nil {
  3529  		objectMap["provisioningState"] = lvmp.ProvisioningState
  3530  	}
  3531  	if lvmp.UniqueIdentifier != nil {
  3532  		objectMap["uniqueIdentifier"] = lvmp.UniqueIdentifier
  3533  	}
  3534  	return json.Marshal(objectMap)
  3535  }
  3536  
  3537  // LabVirtualMachinePropertiesFragment properties of a virtual machine.
  3538  type LabVirtualMachinePropertiesFragment struct {
  3539  	// Notes - The notes of the virtual machine.
  3540  	Notes *string `json:"notes,omitempty"`
  3541  	// OwnerObjectID - The object identifier of the owner of the virtual machine.
  3542  	OwnerObjectID *string `json:"ownerObjectId,omitempty"`
  3543  	// OwnerUserPrincipalName - The user principal name of the virtual machine owner.
  3544  	OwnerUserPrincipalName *string `json:"ownerUserPrincipalName,omitempty"`
  3545  	// CreatedByUserID - The object identifier of the creator of the virtual machine.
  3546  	CreatedByUserID *string `json:"createdByUserId,omitempty"`
  3547  	// CreatedByUser - The email address of creator of the virtual machine.
  3548  	CreatedByUser *string `json:"createdByUser,omitempty"`
  3549  	// CreatedDate - The creation date of the virtual machine.
  3550  	CreatedDate *date.Time `json:"createdDate,omitempty"`
  3551  	// CustomImageID - The custom image identifier of the virtual machine.
  3552  	CustomImageID *string `json:"customImageId,omitempty"`
  3553  	// OsType - The OS type of the virtual machine.
  3554  	OsType *string `json:"osType,omitempty"`
  3555  	// Size - The size of the virtual machine.
  3556  	Size *string `json:"size,omitempty"`
  3557  	// UserName - The user name of the virtual machine.
  3558  	UserName *string `json:"userName,omitempty"`
  3559  	// Password - The password of the virtual machine administrator.
  3560  	Password *string `json:"password,omitempty"`
  3561  	// SSHKey - The SSH key of the virtual machine administrator.
  3562  	SSHKey *string `json:"sshKey,omitempty"`
  3563  	// IsAuthenticationWithSSHKey - Indicates whether this virtual machine uses an SSH key for authentication.
  3564  	IsAuthenticationWithSSHKey *bool `json:"isAuthenticationWithSshKey,omitempty"`
  3565  	// Fqdn - The fully-qualified domain name of the virtual machine.
  3566  	Fqdn *string `json:"fqdn,omitempty"`
  3567  	// LabSubnetName - The lab subnet name of the virtual machine.
  3568  	LabSubnetName *string `json:"labSubnetName,omitempty"`
  3569  	// LabVirtualNetworkID - The lab virtual network identifier of the virtual machine.
  3570  	LabVirtualNetworkID *string `json:"labVirtualNetworkId,omitempty"`
  3571  	// DisallowPublicIPAddress - Indicates whether the virtual machine is to be created without a public IP address.
  3572  	DisallowPublicIPAddress *bool `json:"disallowPublicIpAddress,omitempty"`
  3573  	// Artifacts - The artifacts to be installed on the virtual machine.
  3574  	Artifacts *[]ArtifactInstallPropertiesFragment `json:"artifacts,omitempty"`
  3575  	// ArtifactDeploymentStatus - The artifact deployment status for the virtual machine.
  3576  	ArtifactDeploymentStatus *ArtifactDeploymentStatusPropertiesFragment `json:"artifactDeploymentStatus,omitempty"`
  3577  	// GalleryImageReference - The Microsoft Azure Marketplace image reference of the virtual machine.
  3578  	GalleryImageReference *GalleryImageReferenceFragment `json:"galleryImageReference,omitempty"`
  3579  	// ComputeVM - The compute virtual machine properties.
  3580  	ComputeVM *ComputeVMPropertiesFragment `json:"computeVm,omitempty"`
  3581  	// NetworkInterface - The network interface properties.
  3582  	NetworkInterface *NetworkInterfacePropertiesFragment `json:"networkInterface,omitempty"`
  3583  	// ApplicableSchedule - The applicable schedule for the virtual machine.
  3584  	ApplicableSchedule *ApplicableScheduleFragment `json:"applicableSchedule,omitempty"`
  3585  	// ExpirationDate - The expiration date for VM.
  3586  	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
  3587  	// AllowClaim - Indicates whether another user can take ownership of the virtual machine
  3588  	AllowClaim *bool `json:"allowClaim,omitempty"`
  3589  	// StorageType - Storage type to use for virtual machine (i.e. Standard, Premium).
  3590  	StorageType *string `json:"storageType,omitempty"`
  3591  	// VirtualMachineCreationSource - Tells source of creation of lab virtual machine. Output property only. Possible values include: 'FromCustomImage', 'FromGalleryImage'
  3592  	VirtualMachineCreationSource VirtualMachineCreationSource `json:"virtualMachineCreationSource,omitempty"`
  3593  	// EnvironmentID - The resource ID of the environment that contains this virtual machine, if any.
  3594  	EnvironmentID *string `json:"environmentId,omitempty"`
  3595  	// ProvisioningState - The provisioning status of the resource.
  3596  	ProvisioningState *string `json:"provisioningState,omitempty"`
  3597  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  3598  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  3599  }
  3600  
  3601  // LinuxOsInfo information about a Linux OS.
  3602  type LinuxOsInfo struct {
  3603  	// LinuxOsState - The state of the Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). Possible values include: 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied'
  3604  	LinuxOsState LinuxOsState `json:"linuxOsState,omitempty"`
  3605  }
  3606  
  3607  // NetworkInterfaceProperties properties of a network interface.
  3608  type NetworkInterfaceProperties struct {
  3609  	// VirtualNetworkID - The resource ID of the virtual network.
  3610  	VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
  3611  	// SubnetID - The resource ID of the sub net.
  3612  	SubnetID *string `json:"subnetId,omitempty"`
  3613  	// PublicIPAddressID - The resource ID of the public IP address.
  3614  	PublicIPAddressID *string `json:"publicIpAddressId,omitempty"`
  3615  	// PublicIPAddress - The public IP address.
  3616  	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
  3617  	// PrivateIPAddress - The private IP address.
  3618  	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
  3619  	// DNSName - The DNS name.
  3620  	DNSName *string `json:"dnsName,omitempty"`
  3621  	// RdpAuthority - The RdpAuthority property is a server DNS host name or IP address followed by the service port number for RDP (Remote Desktop Protocol).
  3622  	RdpAuthority *string `json:"rdpAuthority,omitempty"`
  3623  	// SSHAuthority - The SshAuthority property is a server DNS host name or IP address followed by the service port number for SSH.
  3624  	SSHAuthority *string `json:"sshAuthority,omitempty"`
  3625  	// SharedPublicIPAddressConfiguration - The configuration for sharing a public IP address across multiple virtual machines.
  3626  	SharedPublicIPAddressConfiguration *SharedPublicIPAddressConfiguration `json:"sharedPublicIpAddressConfiguration,omitempty"`
  3627  }
  3628  
  3629  // NetworkInterfacePropertiesFragment properties of a network interface.
  3630  type NetworkInterfacePropertiesFragment struct {
  3631  	// VirtualNetworkID - The resource ID of the virtual network.
  3632  	VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
  3633  	// SubnetID - The resource ID of the sub net.
  3634  	SubnetID *string `json:"subnetId,omitempty"`
  3635  	// PublicIPAddressID - The resource ID of the public IP address.
  3636  	PublicIPAddressID *string `json:"publicIpAddressId,omitempty"`
  3637  	// PublicIPAddress - The public IP address.
  3638  	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
  3639  	// PrivateIPAddress - The private IP address.
  3640  	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
  3641  	// DNSName - The DNS name.
  3642  	DNSName *string `json:"dnsName,omitempty"`
  3643  	// RdpAuthority - The RdpAuthority property is a server DNS host name or IP address followed by the service port number for RDP (Remote Desktop Protocol).
  3644  	RdpAuthority *string `json:"rdpAuthority,omitempty"`
  3645  	// SSHAuthority - The SshAuthority property is a server DNS host name or IP address followed by the service port number for SSH.
  3646  	SSHAuthority *string `json:"sshAuthority,omitempty"`
  3647  	// SharedPublicIPAddressConfiguration - The configuration for sharing a public IP address across multiple virtual machines.
  3648  	SharedPublicIPAddressConfiguration *SharedPublicIPAddressConfigurationFragment `json:"sharedPublicIpAddressConfiguration,omitempty"`
  3649  }
  3650  
  3651  // NotificationChannel a notification.
  3652  type NotificationChannel struct {
  3653  	autorest.Response `json:"-"`
  3654  	// NotificationChannelProperties - The properties of the resource.
  3655  	*NotificationChannelProperties `json:"properties,omitempty"`
  3656  	// ID - READ-ONLY; The identifier of the resource.
  3657  	ID *string `json:"id,omitempty"`
  3658  	// Name - READ-ONLY; The name of the resource.
  3659  	Name *string `json:"name,omitempty"`
  3660  	// Type - READ-ONLY; The type of the resource.
  3661  	Type *string `json:"type,omitempty"`
  3662  	// Location - The location of the resource.
  3663  	Location *string `json:"location,omitempty"`
  3664  	// Tags - The tags of the resource.
  3665  	Tags map[string]*string `json:"tags"`
  3666  }
  3667  
  3668  // MarshalJSON is the custom marshaler for NotificationChannel.
  3669  func (nc NotificationChannel) MarshalJSON() ([]byte, error) {
  3670  	objectMap := make(map[string]interface{})
  3671  	if nc.NotificationChannelProperties != nil {
  3672  		objectMap["properties"] = nc.NotificationChannelProperties
  3673  	}
  3674  	if nc.Location != nil {
  3675  		objectMap["location"] = nc.Location
  3676  	}
  3677  	if nc.Tags != nil {
  3678  		objectMap["tags"] = nc.Tags
  3679  	}
  3680  	return json.Marshal(objectMap)
  3681  }
  3682  
  3683  // UnmarshalJSON is the custom unmarshaler for NotificationChannel struct.
  3684  func (nc *NotificationChannel) UnmarshalJSON(body []byte) error {
  3685  	var m map[string]*json.RawMessage
  3686  	err := json.Unmarshal(body, &m)
  3687  	if err != nil {
  3688  		return err
  3689  	}
  3690  	for k, v := range m {
  3691  		switch k {
  3692  		case "properties":
  3693  			if v != nil {
  3694  				var notificationChannelProperties NotificationChannelProperties
  3695  				err = json.Unmarshal(*v, &notificationChannelProperties)
  3696  				if err != nil {
  3697  					return err
  3698  				}
  3699  				nc.NotificationChannelProperties = &notificationChannelProperties
  3700  			}
  3701  		case "id":
  3702  			if v != nil {
  3703  				var ID string
  3704  				err = json.Unmarshal(*v, &ID)
  3705  				if err != nil {
  3706  					return err
  3707  				}
  3708  				nc.ID = &ID
  3709  			}
  3710  		case "name":
  3711  			if v != nil {
  3712  				var name string
  3713  				err = json.Unmarshal(*v, &name)
  3714  				if err != nil {
  3715  					return err
  3716  				}
  3717  				nc.Name = &name
  3718  			}
  3719  		case "type":
  3720  			if v != nil {
  3721  				var typeVar string
  3722  				err = json.Unmarshal(*v, &typeVar)
  3723  				if err != nil {
  3724  					return err
  3725  				}
  3726  				nc.Type = &typeVar
  3727  			}
  3728  		case "location":
  3729  			if v != nil {
  3730  				var location string
  3731  				err = json.Unmarshal(*v, &location)
  3732  				if err != nil {
  3733  					return err
  3734  				}
  3735  				nc.Location = &location
  3736  			}
  3737  		case "tags":
  3738  			if v != nil {
  3739  				var tags map[string]*string
  3740  				err = json.Unmarshal(*v, &tags)
  3741  				if err != nil {
  3742  					return err
  3743  				}
  3744  				nc.Tags = tags
  3745  			}
  3746  		}
  3747  	}
  3748  
  3749  	return nil
  3750  }
  3751  
  3752  // NotificationChannelFragment a notification.
  3753  type NotificationChannelFragment struct {
  3754  	// NotificationChannelPropertiesFragment - The properties of the resource.
  3755  	*NotificationChannelPropertiesFragment `json:"properties,omitempty"`
  3756  	// ID - READ-ONLY; The identifier of the resource.
  3757  	ID *string `json:"id,omitempty"`
  3758  	// Name - READ-ONLY; The name of the resource.
  3759  	Name *string `json:"name,omitempty"`
  3760  	// Type - READ-ONLY; The type of the resource.
  3761  	Type *string `json:"type,omitempty"`
  3762  	// Location - The location of the resource.
  3763  	Location *string `json:"location,omitempty"`
  3764  	// Tags - The tags of the resource.
  3765  	Tags map[string]*string `json:"tags"`
  3766  }
  3767  
  3768  // MarshalJSON is the custom marshaler for NotificationChannelFragment.
  3769  func (ncf NotificationChannelFragment) MarshalJSON() ([]byte, error) {
  3770  	objectMap := make(map[string]interface{})
  3771  	if ncf.NotificationChannelPropertiesFragment != nil {
  3772  		objectMap["properties"] = ncf.NotificationChannelPropertiesFragment
  3773  	}
  3774  	if ncf.Location != nil {
  3775  		objectMap["location"] = ncf.Location
  3776  	}
  3777  	if ncf.Tags != nil {
  3778  		objectMap["tags"] = ncf.Tags
  3779  	}
  3780  	return json.Marshal(objectMap)
  3781  }
  3782  
  3783  // UnmarshalJSON is the custom unmarshaler for NotificationChannelFragment struct.
  3784  func (ncf *NotificationChannelFragment) UnmarshalJSON(body []byte) error {
  3785  	var m map[string]*json.RawMessage
  3786  	err := json.Unmarshal(body, &m)
  3787  	if err != nil {
  3788  		return err
  3789  	}
  3790  	for k, v := range m {
  3791  		switch k {
  3792  		case "properties":
  3793  			if v != nil {
  3794  				var notificationChannelPropertiesFragment NotificationChannelPropertiesFragment
  3795  				err = json.Unmarshal(*v, &notificationChannelPropertiesFragment)
  3796  				if err != nil {
  3797  					return err
  3798  				}
  3799  				ncf.NotificationChannelPropertiesFragment = &notificationChannelPropertiesFragment
  3800  			}
  3801  		case "id":
  3802  			if v != nil {
  3803  				var ID string
  3804  				err = json.Unmarshal(*v, &ID)
  3805  				if err != nil {
  3806  					return err
  3807  				}
  3808  				ncf.ID = &ID
  3809  			}
  3810  		case "name":
  3811  			if v != nil {
  3812  				var name string
  3813  				err = json.Unmarshal(*v, &name)
  3814  				if err != nil {
  3815  					return err
  3816  				}
  3817  				ncf.Name = &name
  3818  			}
  3819  		case "type":
  3820  			if v != nil {
  3821  				var typeVar string
  3822  				err = json.Unmarshal(*v, &typeVar)
  3823  				if err != nil {
  3824  					return err
  3825  				}
  3826  				ncf.Type = &typeVar
  3827  			}
  3828  		case "location":
  3829  			if v != nil {
  3830  				var location string
  3831  				err = json.Unmarshal(*v, &location)
  3832  				if err != nil {
  3833  					return err
  3834  				}
  3835  				ncf.Location = &location
  3836  			}
  3837  		case "tags":
  3838  			if v != nil {
  3839  				var tags map[string]*string
  3840  				err = json.Unmarshal(*v, &tags)
  3841  				if err != nil {
  3842  					return err
  3843  				}
  3844  				ncf.Tags = tags
  3845  			}
  3846  		}
  3847  	}
  3848  
  3849  	return nil
  3850  }
  3851  
  3852  // NotificationChannelProperties properties of a schedule.
  3853  type NotificationChannelProperties struct {
  3854  	// WebHookURL - The webhook URL to send notifications to.
  3855  	WebHookURL *string `json:"webHookUrl,omitempty"`
  3856  	// Description - Description of notification.
  3857  	Description *string `json:"description,omitempty"`
  3858  	// Events - The list of event for which this notification is enabled.
  3859  	Events *[]Event `json:"events,omitempty"`
  3860  	// CreatedDate - READ-ONLY; The creation date of the notification channel.
  3861  	CreatedDate *date.Time `json:"createdDate,omitempty"`
  3862  	// ProvisioningState - The provisioning status of the resource.
  3863  	ProvisioningState *string `json:"provisioningState,omitempty"`
  3864  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  3865  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  3866  }
  3867  
  3868  // MarshalJSON is the custom marshaler for NotificationChannelProperties.
  3869  func (ncp NotificationChannelProperties) MarshalJSON() ([]byte, error) {
  3870  	objectMap := make(map[string]interface{})
  3871  	if ncp.WebHookURL != nil {
  3872  		objectMap["webHookUrl"] = ncp.WebHookURL
  3873  	}
  3874  	if ncp.Description != nil {
  3875  		objectMap["description"] = ncp.Description
  3876  	}
  3877  	if ncp.Events != nil {
  3878  		objectMap["events"] = ncp.Events
  3879  	}
  3880  	if ncp.ProvisioningState != nil {
  3881  		objectMap["provisioningState"] = ncp.ProvisioningState
  3882  	}
  3883  	if ncp.UniqueIdentifier != nil {
  3884  		objectMap["uniqueIdentifier"] = ncp.UniqueIdentifier
  3885  	}
  3886  	return json.Marshal(objectMap)
  3887  }
  3888  
  3889  // NotificationChannelPropertiesFragment properties of a schedule.
  3890  type NotificationChannelPropertiesFragment struct {
  3891  	// WebHookURL - The webhook URL to send notifications to.
  3892  	WebHookURL *string `json:"webHookUrl,omitempty"`
  3893  	// Description - Description of notification.
  3894  	Description *string `json:"description,omitempty"`
  3895  	// Events - The list of event for which this notification is enabled.
  3896  	Events *[]EventFragment `json:"events,omitempty"`
  3897  	// ProvisioningState - The provisioning status of the resource.
  3898  	ProvisioningState *string `json:"provisioningState,omitempty"`
  3899  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  3900  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  3901  }
  3902  
  3903  // NotificationSettings notification settings for a schedule.
  3904  type NotificationSettings struct {
  3905  	// Status - If notifications are enabled for this schedule (i.e. Enabled, Disabled). Possible values include: 'NotificationStatusDisabled', 'NotificationStatusEnabled'
  3906  	Status NotificationStatus `json:"status,omitempty"`
  3907  	// TimeInMinutes - Time in minutes before event at which notification will be sent.
  3908  	TimeInMinutes *int32 `json:"timeInMinutes,omitempty"`
  3909  	// WebhookURL - The webhook URL to which the notification will be sent.
  3910  	WebhookURL *string `json:"webhookUrl,omitempty"`
  3911  }
  3912  
  3913  // NotificationSettingsFragment notification settings for a schedule.
  3914  type NotificationSettingsFragment struct {
  3915  	// Status - If notifications are enabled for this schedule (i.e. Enabled, Disabled). Possible values include: 'NotificationStatusDisabled', 'NotificationStatusEnabled'
  3916  	Status NotificationStatus `json:"status,omitempty"`
  3917  	// TimeInMinutes - Time in minutes before event at which notification will be sent.
  3918  	TimeInMinutes *int32 `json:"timeInMinutes,omitempty"`
  3919  	// WebhookURL - The webhook URL to which the notification will be sent.
  3920  	WebhookURL *string `json:"webhookUrl,omitempty"`
  3921  }
  3922  
  3923  // NotifyParameters properties for generating a Notification.
  3924  type NotifyParameters struct {
  3925  	// EventName - The type of event (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost'
  3926  	EventName NotificationChannelEventType `json:"eventName,omitempty"`
  3927  	// JSONPayload - Properties for the notification in json format.
  3928  	JSONPayload *string `json:"jsonPayload,omitempty"`
  3929  }
  3930  
  3931  // OperationError error details for the operation in case of a failure.
  3932  type OperationError struct {
  3933  	// Code - The error code of the operation error.
  3934  	Code *string `json:"code,omitempty"`
  3935  	// Message - The error message of the operation error.
  3936  	Message *string `json:"message,omitempty"`
  3937  }
  3938  
  3939  // OperationMetadata the REST API operation supported by DevTestLab ResourceProvider.
  3940  type OperationMetadata struct {
  3941  	// Name - Operation name: {provider}/{resource}/{operation}
  3942  	Name *string `json:"name,omitempty"`
  3943  	// Display - The object that describes the operations
  3944  	Display *OperationMetadataDisplay `json:"display,omitempty"`
  3945  }
  3946  
  3947  // OperationMetadataDisplay the object that describes the operations
  3948  type OperationMetadataDisplay struct {
  3949  	// Provider - Friendly name of the resource provider
  3950  	Provider *string `json:"provider,omitempty"`
  3951  	// Resource - Resource type on which the operation is performed.
  3952  	Resource *string `json:"resource,omitempty"`
  3953  	// Operation - Operation type: read, write, delete, listKeys/action, etc.
  3954  	Operation *string `json:"operation,omitempty"`
  3955  	// Description - Friendly name of the operation
  3956  	Description *string `json:"description,omitempty"`
  3957  }
  3958  
  3959  // OperationResult an Operation Result
  3960  type OperationResult struct {
  3961  	autorest.Response `json:"-"`
  3962  	// Status - The operation status.
  3963  	Status *string `json:"status,omitempty"`
  3964  	// StatusCode - The status code for the operation. Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestURITooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HTTPVersionNotSupported'
  3965  	StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
  3966  	// Error - Error details for the operation in case of a failure.
  3967  	Error *OperationError `json:"error,omitempty"`
  3968  }
  3969  
  3970  // ParameterInfo information about an artifact's parameter.
  3971  type ParameterInfo struct {
  3972  	// Name - The name of the artifact parameter.
  3973  	Name *string `json:"name,omitempty"`
  3974  	// Value - The value of the artifact parameter.
  3975  	Value *string `json:"value,omitempty"`
  3976  }
  3977  
  3978  // ParametersValueFileInfo a file containing a set of parameter values for an ARM template.
  3979  type ParametersValueFileInfo struct {
  3980  	// FileName - File name.
  3981  	FileName *string `json:"fileName,omitempty"`
  3982  	// ParametersValueInfo - Contents of the file.
  3983  	ParametersValueInfo interface{} `json:"parametersValueInfo,omitempty"`
  3984  }
  3985  
  3986  // PercentageCostThresholdProperties properties of a percentage cost threshold.
  3987  type PercentageCostThresholdProperties struct {
  3988  	// ThresholdValue - The cost threshold value.
  3989  	ThresholdValue *float64 `json:"thresholdValue,omitempty"`
  3990  }
  3991  
  3992  // Policy a Policy.
  3993  type Policy struct {
  3994  	autorest.Response `json:"-"`
  3995  	// PolicyProperties - The properties of the resource.
  3996  	*PolicyProperties `json:"properties,omitempty"`
  3997  	// ID - READ-ONLY; The identifier of the resource.
  3998  	ID *string `json:"id,omitempty"`
  3999  	// Name - READ-ONLY; The name of the resource.
  4000  	Name *string `json:"name,omitempty"`
  4001  	// Type - READ-ONLY; The type of the resource.
  4002  	Type *string `json:"type,omitempty"`
  4003  	// Location - The location of the resource.
  4004  	Location *string `json:"location,omitempty"`
  4005  	// Tags - The tags of the resource.
  4006  	Tags map[string]*string `json:"tags"`
  4007  }
  4008  
  4009  // MarshalJSON is the custom marshaler for Policy.
  4010  func (p Policy) MarshalJSON() ([]byte, error) {
  4011  	objectMap := make(map[string]interface{})
  4012  	if p.PolicyProperties != nil {
  4013  		objectMap["properties"] = p.PolicyProperties
  4014  	}
  4015  	if p.Location != nil {
  4016  		objectMap["location"] = p.Location
  4017  	}
  4018  	if p.Tags != nil {
  4019  		objectMap["tags"] = p.Tags
  4020  	}
  4021  	return json.Marshal(objectMap)
  4022  }
  4023  
  4024  // UnmarshalJSON is the custom unmarshaler for Policy struct.
  4025  func (p *Policy) UnmarshalJSON(body []byte) error {
  4026  	var m map[string]*json.RawMessage
  4027  	err := json.Unmarshal(body, &m)
  4028  	if err != nil {
  4029  		return err
  4030  	}
  4031  	for k, v := range m {
  4032  		switch k {
  4033  		case "properties":
  4034  			if v != nil {
  4035  				var policyProperties PolicyProperties
  4036  				err = json.Unmarshal(*v, &policyProperties)
  4037  				if err != nil {
  4038  					return err
  4039  				}
  4040  				p.PolicyProperties = &policyProperties
  4041  			}
  4042  		case "id":
  4043  			if v != nil {
  4044  				var ID string
  4045  				err = json.Unmarshal(*v, &ID)
  4046  				if err != nil {
  4047  					return err
  4048  				}
  4049  				p.ID = &ID
  4050  			}
  4051  		case "name":
  4052  			if v != nil {
  4053  				var name string
  4054  				err = json.Unmarshal(*v, &name)
  4055  				if err != nil {
  4056  					return err
  4057  				}
  4058  				p.Name = &name
  4059  			}
  4060  		case "type":
  4061  			if v != nil {
  4062  				var typeVar string
  4063  				err = json.Unmarshal(*v, &typeVar)
  4064  				if err != nil {
  4065  					return err
  4066  				}
  4067  				p.Type = &typeVar
  4068  			}
  4069  		case "location":
  4070  			if v != nil {
  4071  				var location string
  4072  				err = json.Unmarshal(*v, &location)
  4073  				if err != nil {
  4074  					return err
  4075  				}
  4076  				p.Location = &location
  4077  			}
  4078  		case "tags":
  4079  			if v != nil {
  4080  				var tags map[string]*string
  4081  				err = json.Unmarshal(*v, &tags)
  4082  				if err != nil {
  4083  					return err
  4084  				}
  4085  				p.Tags = tags
  4086  			}
  4087  		}
  4088  	}
  4089  
  4090  	return nil
  4091  }
  4092  
  4093  // PolicyFragment a Policy.
  4094  type PolicyFragment struct {
  4095  	// PolicyPropertiesFragment - The properties of the resource.
  4096  	*PolicyPropertiesFragment `json:"properties,omitempty"`
  4097  	// ID - READ-ONLY; The identifier of the resource.
  4098  	ID *string `json:"id,omitempty"`
  4099  	// Name - READ-ONLY; The name of the resource.
  4100  	Name *string `json:"name,omitempty"`
  4101  	// Type - READ-ONLY; The type of the resource.
  4102  	Type *string `json:"type,omitempty"`
  4103  	// Location - The location of the resource.
  4104  	Location *string `json:"location,omitempty"`
  4105  	// Tags - The tags of the resource.
  4106  	Tags map[string]*string `json:"tags"`
  4107  }
  4108  
  4109  // MarshalJSON is the custom marshaler for PolicyFragment.
  4110  func (pf PolicyFragment) MarshalJSON() ([]byte, error) {
  4111  	objectMap := make(map[string]interface{})
  4112  	if pf.PolicyPropertiesFragment != nil {
  4113  		objectMap["properties"] = pf.PolicyPropertiesFragment
  4114  	}
  4115  	if pf.Location != nil {
  4116  		objectMap["location"] = pf.Location
  4117  	}
  4118  	if pf.Tags != nil {
  4119  		objectMap["tags"] = pf.Tags
  4120  	}
  4121  	return json.Marshal(objectMap)
  4122  }
  4123  
  4124  // UnmarshalJSON is the custom unmarshaler for PolicyFragment struct.
  4125  func (pf *PolicyFragment) UnmarshalJSON(body []byte) error {
  4126  	var m map[string]*json.RawMessage
  4127  	err := json.Unmarshal(body, &m)
  4128  	if err != nil {
  4129  		return err
  4130  	}
  4131  	for k, v := range m {
  4132  		switch k {
  4133  		case "properties":
  4134  			if v != nil {
  4135  				var policyPropertiesFragment PolicyPropertiesFragment
  4136  				err = json.Unmarshal(*v, &policyPropertiesFragment)
  4137  				if err != nil {
  4138  					return err
  4139  				}
  4140  				pf.PolicyPropertiesFragment = &policyPropertiesFragment
  4141  			}
  4142  		case "id":
  4143  			if v != nil {
  4144  				var ID string
  4145  				err = json.Unmarshal(*v, &ID)
  4146  				if err != nil {
  4147  					return err
  4148  				}
  4149  				pf.ID = &ID
  4150  			}
  4151  		case "name":
  4152  			if v != nil {
  4153  				var name string
  4154  				err = json.Unmarshal(*v, &name)
  4155  				if err != nil {
  4156  					return err
  4157  				}
  4158  				pf.Name = &name
  4159  			}
  4160  		case "type":
  4161  			if v != nil {
  4162  				var typeVar string
  4163  				err = json.Unmarshal(*v, &typeVar)
  4164  				if err != nil {
  4165  					return err
  4166  				}
  4167  				pf.Type = &typeVar
  4168  			}
  4169  		case "location":
  4170  			if v != nil {
  4171  				var location string
  4172  				err = json.Unmarshal(*v, &location)
  4173  				if err != nil {
  4174  					return err
  4175  				}
  4176  				pf.Location = &location
  4177  			}
  4178  		case "tags":
  4179  			if v != nil {
  4180  				var tags map[string]*string
  4181  				err = json.Unmarshal(*v, &tags)
  4182  				if err != nil {
  4183  					return err
  4184  				}
  4185  				pf.Tags = tags
  4186  			}
  4187  		}
  4188  	}
  4189  
  4190  	return nil
  4191  }
  4192  
  4193  // PolicyProperties properties of a Policy.
  4194  type PolicyProperties struct {
  4195  	// Description - The description of the policy.
  4196  	Description *string `json:"description,omitempty"`
  4197  	// Status - The status of the policy. Possible values include: 'PolicyStatusEnabled', 'PolicyStatusDisabled'
  4198  	Status PolicyStatus `json:"status,omitempty"`
  4199  	// FactName - The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: 'PolicyFactNameUserOwnedLabVMCount', 'PolicyFactNameUserOwnedLabPremiumVMCount', 'PolicyFactNameLabVMCount', 'PolicyFactNameLabPremiumVMCount', 'PolicyFactNameLabVMSize', 'PolicyFactNameGalleryImage', 'PolicyFactNameUserOwnedLabVMCountInSubnet', 'PolicyFactNameLabTargetCost'
  4200  	FactName PolicyFactName `json:"factName,omitempty"`
  4201  	// FactData - The fact data of the policy.
  4202  	FactData *string `json:"factData,omitempty"`
  4203  	// Threshold - The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).
  4204  	Threshold *string `json:"threshold,omitempty"`
  4205  	// EvaluatorType - The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'
  4206  	EvaluatorType PolicyEvaluatorType `json:"evaluatorType,omitempty"`
  4207  	// CreatedDate - READ-ONLY; The creation date of the policy.
  4208  	CreatedDate *date.Time `json:"createdDate,omitempty"`
  4209  	// ProvisioningState - The provisioning status of the resource.
  4210  	ProvisioningState *string `json:"provisioningState,omitempty"`
  4211  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  4212  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  4213  }
  4214  
  4215  // MarshalJSON is the custom marshaler for PolicyProperties.
  4216  func (pp PolicyProperties) MarshalJSON() ([]byte, error) {
  4217  	objectMap := make(map[string]interface{})
  4218  	if pp.Description != nil {
  4219  		objectMap["description"] = pp.Description
  4220  	}
  4221  	if pp.Status != "" {
  4222  		objectMap["status"] = pp.Status
  4223  	}
  4224  	if pp.FactName != "" {
  4225  		objectMap["factName"] = pp.FactName
  4226  	}
  4227  	if pp.FactData != nil {
  4228  		objectMap["factData"] = pp.FactData
  4229  	}
  4230  	if pp.Threshold != nil {
  4231  		objectMap["threshold"] = pp.Threshold
  4232  	}
  4233  	if pp.EvaluatorType != "" {
  4234  		objectMap["evaluatorType"] = pp.EvaluatorType
  4235  	}
  4236  	if pp.ProvisioningState != nil {
  4237  		objectMap["provisioningState"] = pp.ProvisioningState
  4238  	}
  4239  	if pp.UniqueIdentifier != nil {
  4240  		objectMap["uniqueIdentifier"] = pp.UniqueIdentifier
  4241  	}
  4242  	return json.Marshal(objectMap)
  4243  }
  4244  
  4245  // PolicyPropertiesFragment properties of a Policy.
  4246  type PolicyPropertiesFragment struct {
  4247  	// Description - The description of the policy.
  4248  	Description *string `json:"description,omitempty"`
  4249  	// Status - The status of the policy. Possible values include: 'PolicyStatusEnabled', 'PolicyStatusDisabled'
  4250  	Status PolicyStatus `json:"status,omitempty"`
  4251  	// FactName - The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. Possible values include: 'PolicyFactNameUserOwnedLabVMCount', 'PolicyFactNameUserOwnedLabPremiumVMCount', 'PolicyFactNameLabVMCount', 'PolicyFactNameLabPremiumVMCount', 'PolicyFactNameLabVMSize', 'PolicyFactNameGalleryImage', 'PolicyFactNameUserOwnedLabVMCountInSubnet', 'PolicyFactNameLabTargetCost'
  4252  	FactName PolicyFactName `json:"factName,omitempty"`
  4253  	// FactData - The fact data of the policy.
  4254  	FactData *string `json:"factData,omitempty"`
  4255  	// Threshold - The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).
  4256  	Threshold *string `json:"threshold,omitempty"`
  4257  	// EvaluatorType - The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy). Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'
  4258  	EvaluatorType PolicyEvaluatorType `json:"evaluatorType,omitempty"`
  4259  	// ProvisioningState - The provisioning status of the resource.
  4260  	ProvisioningState *string `json:"provisioningState,omitempty"`
  4261  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  4262  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  4263  }
  4264  
  4265  // PolicySetResult result of a policy set evaluation.
  4266  type PolicySetResult struct {
  4267  	// HasError - A value indicating whether this policy set evaluation has discovered violations.
  4268  	HasError *bool `json:"hasError,omitempty"`
  4269  	// PolicyViolations - The list of policy violations.
  4270  	PolicyViolations *[]PolicyViolation `json:"policyViolations,omitempty"`
  4271  }
  4272  
  4273  // PolicyViolation policy violation.
  4274  type PolicyViolation struct {
  4275  	// Code - The code of the policy violation.
  4276  	Code *string `json:"code,omitempty"`
  4277  	// Message - The message of the policy violation.
  4278  	Message *string `json:"message,omitempty"`
  4279  }
  4280  
  4281  // Port properties of a network port.
  4282  type Port struct {
  4283  	// TransportProtocol - Protocol type of the port. Possible values include: 'TCP', 'UDP'
  4284  	TransportProtocol TransportProtocol `json:"transportProtocol,omitempty"`
  4285  	// BackendPort - Backend port of the target virtual machine.
  4286  	BackendPort *int32 `json:"backendPort,omitempty"`
  4287  }
  4288  
  4289  // PortFragment properties of a network port.
  4290  type PortFragment struct {
  4291  	// TransportProtocol - Protocol type of the port. Possible values include: 'TCP', 'UDP'
  4292  	TransportProtocol TransportProtocol `json:"transportProtocol,omitempty"`
  4293  	// BackendPort - Backend port of the target virtual machine.
  4294  	BackendPort *int32 `json:"backendPort,omitempty"`
  4295  }
  4296  
  4297  // ProviderOperationResult result of the request to list REST API operations
  4298  type ProviderOperationResult struct {
  4299  	autorest.Response `json:"-"`
  4300  	// Value - List of operations supported by the resource provider.
  4301  	Value *[]OperationMetadata `json:"value,omitempty"`
  4302  	// NextLink - READ-ONLY; URL to get the next set of operation list results if there are any.
  4303  	NextLink *string `json:"nextLink,omitempty"`
  4304  }
  4305  
  4306  // MarshalJSON is the custom marshaler for ProviderOperationResult.
  4307  func (por ProviderOperationResult) MarshalJSON() ([]byte, error) {
  4308  	objectMap := make(map[string]interface{})
  4309  	if por.Value != nil {
  4310  		objectMap["value"] = por.Value
  4311  	}
  4312  	return json.Marshal(objectMap)
  4313  }
  4314  
  4315  // ProviderOperationResultIterator provides access to a complete listing of OperationMetadata values.
  4316  type ProviderOperationResultIterator struct {
  4317  	i    int
  4318  	page ProviderOperationResultPage
  4319  }
  4320  
  4321  // NextWithContext advances to the next value.  If there was an error making
  4322  // the request the iterator does not advance and the error is returned.
  4323  func (iter *ProviderOperationResultIterator) NextWithContext(ctx context.Context) (err error) {
  4324  	if tracing.IsEnabled() {
  4325  		ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationResultIterator.NextWithContext")
  4326  		defer func() {
  4327  			sc := -1
  4328  			if iter.Response().Response.Response != nil {
  4329  				sc = iter.Response().Response.Response.StatusCode
  4330  			}
  4331  			tracing.EndSpan(ctx, sc, err)
  4332  		}()
  4333  	}
  4334  	iter.i++
  4335  	if iter.i < len(iter.page.Values()) {
  4336  		return nil
  4337  	}
  4338  	err = iter.page.NextWithContext(ctx)
  4339  	if err != nil {
  4340  		iter.i--
  4341  		return err
  4342  	}
  4343  	iter.i = 0
  4344  	return nil
  4345  }
  4346  
  4347  // Next advances to the next value.  If there was an error making
  4348  // the request the iterator does not advance and the error is returned.
  4349  // Deprecated: Use NextWithContext() instead.
  4350  func (iter *ProviderOperationResultIterator) Next() error {
  4351  	return iter.NextWithContext(context.Background())
  4352  }
  4353  
  4354  // NotDone returns true if the enumeration should be started or is not yet complete.
  4355  func (iter ProviderOperationResultIterator) NotDone() bool {
  4356  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  4357  }
  4358  
  4359  // Response returns the raw server response from the last page request.
  4360  func (iter ProviderOperationResultIterator) Response() ProviderOperationResult {
  4361  	return iter.page.Response()
  4362  }
  4363  
  4364  // Value returns the current value or a zero-initialized value if the
  4365  // iterator has advanced beyond the end of the collection.
  4366  func (iter ProviderOperationResultIterator) Value() OperationMetadata {
  4367  	if !iter.page.NotDone() {
  4368  		return OperationMetadata{}
  4369  	}
  4370  	return iter.page.Values()[iter.i]
  4371  }
  4372  
  4373  // Creates a new instance of the ProviderOperationResultIterator type.
  4374  func NewProviderOperationResultIterator(page ProviderOperationResultPage) ProviderOperationResultIterator {
  4375  	return ProviderOperationResultIterator{page: page}
  4376  }
  4377  
  4378  // IsEmpty returns true if the ListResult contains no values.
  4379  func (por ProviderOperationResult) IsEmpty() bool {
  4380  	return por.Value == nil || len(*por.Value) == 0
  4381  }
  4382  
  4383  // hasNextLink returns true if the NextLink is not empty.
  4384  func (por ProviderOperationResult) hasNextLink() bool {
  4385  	return por.NextLink != nil && len(*por.NextLink) != 0
  4386  }
  4387  
  4388  // providerOperationResultPreparer prepares a request to retrieve the next set of results.
  4389  // It returns nil if no more results exist.
  4390  func (por ProviderOperationResult) providerOperationResultPreparer(ctx context.Context) (*http.Request, error) {
  4391  	if !por.hasNextLink() {
  4392  		return nil, nil
  4393  	}
  4394  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  4395  		autorest.AsJSON(),
  4396  		autorest.AsGet(),
  4397  		autorest.WithBaseURL(to.String(por.NextLink)))
  4398  }
  4399  
  4400  // ProviderOperationResultPage contains a page of OperationMetadata values.
  4401  type ProviderOperationResultPage struct {
  4402  	fn  func(context.Context, ProviderOperationResult) (ProviderOperationResult, error)
  4403  	por ProviderOperationResult
  4404  }
  4405  
  4406  // NextWithContext advances to the next page of values.  If there was an error making
  4407  // the request the page does not advance and the error is returned.
  4408  func (page *ProviderOperationResultPage) NextWithContext(ctx context.Context) (err error) {
  4409  	if tracing.IsEnabled() {
  4410  		ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationResultPage.NextWithContext")
  4411  		defer func() {
  4412  			sc := -1
  4413  			if page.Response().Response.Response != nil {
  4414  				sc = page.Response().Response.Response.StatusCode
  4415  			}
  4416  			tracing.EndSpan(ctx, sc, err)
  4417  		}()
  4418  	}
  4419  	for {
  4420  		next, err := page.fn(ctx, page.por)
  4421  		if err != nil {
  4422  			return err
  4423  		}
  4424  		page.por = next
  4425  		if !next.hasNextLink() || !next.IsEmpty() {
  4426  			break
  4427  		}
  4428  	}
  4429  	return nil
  4430  }
  4431  
  4432  // Next advances to the next page of values.  If there was an error making
  4433  // the request the page does not advance and the error is returned.
  4434  // Deprecated: Use NextWithContext() instead.
  4435  func (page *ProviderOperationResultPage) Next() error {
  4436  	return page.NextWithContext(context.Background())
  4437  }
  4438  
  4439  // NotDone returns true if the page enumeration should be started or is not yet complete.
  4440  func (page ProviderOperationResultPage) NotDone() bool {
  4441  	return !page.por.IsEmpty()
  4442  }
  4443  
  4444  // Response returns the raw server response from the last page request.
  4445  func (page ProviderOperationResultPage) Response() ProviderOperationResult {
  4446  	return page.por
  4447  }
  4448  
  4449  // Values returns the slice of values for the current page or nil if there are no values.
  4450  func (page ProviderOperationResultPage) Values() []OperationMetadata {
  4451  	if page.por.IsEmpty() {
  4452  		return nil
  4453  	}
  4454  	return *page.por.Value
  4455  }
  4456  
  4457  // Creates a new instance of the ProviderOperationResultPage type.
  4458  func NewProviderOperationResultPage(cur ProviderOperationResult, getNextPage func(context.Context, ProviderOperationResult) (ProviderOperationResult, error)) ProviderOperationResultPage {
  4459  	return ProviderOperationResultPage{
  4460  		fn:  getNextPage,
  4461  		por: cur,
  4462  	}
  4463  }
  4464  
  4465  // Resource an Azure resource.
  4466  type Resource struct {
  4467  	// ID - READ-ONLY; The identifier of the resource.
  4468  	ID *string `json:"id,omitempty"`
  4469  	// Name - READ-ONLY; The name of the resource.
  4470  	Name *string `json:"name,omitempty"`
  4471  	// Type - READ-ONLY; The type of the resource.
  4472  	Type *string `json:"type,omitempty"`
  4473  	// Location - The location of the resource.
  4474  	Location *string `json:"location,omitempty"`
  4475  	// Tags - The tags of the resource.
  4476  	Tags map[string]*string `json:"tags"`
  4477  }
  4478  
  4479  // MarshalJSON is the custom marshaler for Resource.
  4480  func (r Resource) MarshalJSON() ([]byte, error) {
  4481  	objectMap := make(map[string]interface{})
  4482  	if r.Location != nil {
  4483  		objectMap["location"] = r.Location
  4484  	}
  4485  	if r.Tags != nil {
  4486  		objectMap["tags"] = r.Tags
  4487  	}
  4488  	return json.Marshal(objectMap)
  4489  }
  4490  
  4491  // ResponseWithContinuationArmTemplate the response of a list operation.
  4492  type ResponseWithContinuationArmTemplate struct {
  4493  	autorest.Response `json:"-"`
  4494  	// Value - Results of the list operation.
  4495  	Value *[]ArmTemplate `json:"value,omitempty"`
  4496  	// NextLink - Link for next set of results.
  4497  	NextLink *string `json:"nextLink,omitempty"`
  4498  }
  4499  
  4500  // ResponseWithContinuationArmTemplateIterator provides access to a complete listing of ArmTemplate values.
  4501  type ResponseWithContinuationArmTemplateIterator struct {
  4502  	i    int
  4503  	page ResponseWithContinuationArmTemplatePage
  4504  }
  4505  
  4506  // NextWithContext advances to the next value.  If there was an error making
  4507  // the request the iterator does not advance and the error is returned.
  4508  func (iter *ResponseWithContinuationArmTemplateIterator) NextWithContext(ctx context.Context) (err error) {
  4509  	if tracing.IsEnabled() {
  4510  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArmTemplateIterator.NextWithContext")
  4511  		defer func() {
  4512  			sc := -1
  4513  			if iter.Response().Response.Response != nil {
  4514  				sc = iter.Response().Response.Response.StatusCode
  4515  			}
  4516  			tracing.EndSpan(ctx, sc, err)
  4517  		}()
  4518  	}
  4519  	iter.i++
  4520  	if iter.i < len(iter.page.Values()) {
  4521  		return nil
  4522  	}
  4523  	err = iter.page.NextWithContext(ctx)
  4524  	if err != nil {
  4525  		iter.i--
  4526  		return err
  4527  	}
  4528  	iter.i = 0
  4529  	return nil
  4530  }
  4531  
  4532  // Next advances to the next value.  If there was an error making
  4533  // the request the iterator does not advance and the error is returned.
  4534  // Deprecated: Use NextWithContext() instead.
  4535  func (iter *ResponseWithContinuationArmTemplateIterator) Next() error {
  4536  	return iter.NextWithContext(context.Background())
  4537  }
  4538  
  4539  // NotDone returns true if the enumeration should be started or is not yet complete.
  4540  func (iter ResponseWithContinuationArmTemplateIterator) NotDone() bool {
  4541  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  4542  }
  4543  
  4544  // Response returns the raw server response from the last page request.
  4545  func (iter ResponseWithContinuationArmTemplateIterator) Response() ResponseWithContinuationArmTemplate {
  4546  	return iter.page.Response()
  4547  }
  4548  
  4549  // Value returns the current value or a zero-initialized value if the
  4550  // iterator has advanced beyond the end of the collection.
  4551  func (iter ResponseWithContinuationArmTemplateIterator) Value() ArmTemplate {
  4552  	if !iter.page.NotDone() {
  4553  		return ArmTemplate{}
  4554  	}
  4555  	return iter.page.Values()[iter.i]
  4556  }
  4557  
  4558  // Creates a new instance of the ResponseWithContinuationArmTemplateIterator type.
  4559  func NewResponseWithContinuationArmTemplateIterator(page ResponseWithContinuationArmTemplatePage) ResponseWithContinuationArmTemplateIterator {
  4560  	return ResponseWithContinuationArmTemplateIterator{page: page}
  4561  }
  4562  
  4563  // IsEmpty returns true if the ListResult contains no values.
  4564  func (rwcAt ResponseWithContinuationArmTemplate) IsEmpty() bool {
  4565  	return rwcAt.Value == nil || len(*rwcAt.Value) == 0
  4566  }
  4567  
  4568  // hasNextLink returns true if the NextLink is not empty.
  4569  func (rwcAt ResponseWithContinuationArmTemplate) hasNextLink() bool {
  4570  	return rwcAt.NextLink != nil && len(*rwcAt.NextLink) != 0
  4571  }
  4572  
  4573  // responseWithContinuationArmTemplatePreparer prepares a request to retrieve the next set of results.
  4574  // It returns nil if no more results exist.
  4575  func (rwcAt ResponseWithContinuationArmTemplate) responseWithContinuationArmTemplatePreparer(ctx context.Context) (*http.Request, error) {
  4576  	if !rwcAt.hasNextLink() {
  4577  		return nil, nil
  4578  	}
  4579  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  4580  		autorest.AsJSON(),
  4581  		autorest.AsGet(),
  4582  		autorest.WithBaseURL(to.String(rwcAt.NextLink)))
  4583  }
  4584  
  4585  // ResponseWithContinuationArmTemplatePage contains a page of ArmTemplate values.
  4586  type ResponseWithContinuationArmTemplatePage struct {
  4587  	fn    func(context.Context, ResponseWithContinuationArmTemplate) (ResponseWithContinuationArmTemplate, error)
  4588  	rwcat ResponseWithContinuationArmTemplate
  4589  }
  4590  
  4591  // NextWithContext advances to the next page of values.  If there was an error making
  4592  // the request the page does not advance and the error is returned.
  4593  func (page *ResponseWithContinuationArmTemplatePage) NextWithContext(ctx context.Context) (err error) {
  4594  	if tracing.IsEnabled() {
  4595  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArmTemplatePage.NextWithContext")
  4596  		defer func() {
  4597  			sc := -1
  4598  			if page.Response().Response.Response != nil {
  4599  				sc = page.Response().Response.Response.StatusCode
  4600  			}
  4601  			tracing.EndSpan(ctx, sc, err)
  4602  		}()
  4603  	}
  4604  	for {
  4605  		next, err := page.fn(ctx, page.rwcat)
  4606  		if err != nil {
  4607  			return err
  4608  		}
  4609  		page.rwcat = next
  4610  		if !next.hasNextLink() || !next.IsEmpty() {
  4611  			break
  4612  		}
  4613  	}
  4614  	return nil
  4615  }
  4616  
  4617  // Next advances to the next page of values.  If there was an error making
  4618  // the request the page does not advance and the error is returned.
  4619  // Deprecated: Use NextWithContext() instead.
  4620  func (page *ResponseWithContinuationArmTemplatePage) Next() error {
  4621  	return page.NextWithContext(context.Background())
  4622  }
  4623  
  4624  // NotDone returns true if the page enumeration should be started or is not yet complete.
  4625  func (page ResponseWithContinuationArmTemplatePage) NotDone() bool {
  4626  	return !page.rwcat.IsEmpty()
  4627  }
  4628  
  4629  // Response returns the raw server response from the last page request.
  4630  func (page ResponseWithContinuationArmTemplatePage) Response() ResponseWithContinuationArmTemplate {
  4631  	return page.rwcat
  4632  }
  4633  
  4634  // Values returns the slice of values for the current page or nil if there are no values.
  4635  func (page ResponseWithContinuationArmTemplatePage) Values() []ArmTemplate {
  4636  	if page.rwcat.IsEmpty() {
  4637  		return nil
  4638  	}
  4639  	return *page.rwcat.Value
  4640  }
  4641  
  4642  // Creates a new instance of the ResponseWithContinuationArmTemplatePage type.
  4643  func NewResponseWithContinuationArmTemplatePage(cur ResponseWithContinuationArmTemplate, getNextPage func(context.Context, ResponseWithContinuationArmTemplate) (ResponseWithContinuationArmTemplate, error)) ResponseWithContinuationArmTemplatePage {
  4644  	return ResponseWithContinuationArmTemplatePage{
  4645  		fn:    getNextPage,
  4646  		rwcat: cur,
  4647  	}
  4648  }
  4649  
  4650  // ResponseWithContinuationArtifact the response of a list operation.
  4651  type ResponseWithContinuationArtifact struct {
  4652  	autorest.Response `json:"-"`
  4653  	// Value - Results of the list operation.
  4654  	Value *[]Artifact `json:"value,omitempty"`
  4655  	// NextLink - Link for next set of results.
  4656  	NextLink *string `json:"nextLink,omitempty"`
  4657  }
  4658  
  4659  // ResponseWithContinuationArtifactIterator provides access to a complete listing of Artifact values.
  4660  type ResponseWithContinuationArtifactIterator struct {
  4661  	i    int
  4662  	page ResponseWithContinuationArtifactPage
  4663  }
  4664  
  4665  // NextWithContext advances to the next value.  If there was an error making
  4666  // the request the iterator does not advance and the error is returned.
  4667  func (iter *ResponseWithContinuationArtifactIterator) NextWithContext(ctx context.Context) (err error) {
  4668  	if tracing.IsEnabled() {
  4669  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArtifactIterator.NextWithContext")
  4670  		defer func() {
  4671  			sc := -1
  4672  			if iter.Response().Response.Response != nil {
  4673  				sc = iter.Response().Response.Response.StatusCode
  4674  			}
  4675  			tracing.EndSpan(ctx, sc, err)
  4676  		}()
  4677  	}
  4678  	iter.i++
  4679  	if iter.i < len(iter.page.Values()) {
  4680  		return nil
  4681  	}
  4682  	err = iter.page.NextWithContext(ctx)
  4683  	if err != nil {
  4684  		iter.i--
  4685  		return err
  4686  	}
  4687  	iter.i = 0
  4688  	return nil
  4689  }
  4690  
  4691  // Next advances to the next value.  If there was an error making
  4692  // the request the iterator does not advance and the error is returned.
  4693  // Deprecated: Use NextWithContext() instead.
  4694  func (iter *ResponseWithContinuationArtifactIterator) Next() error {
  4695  	return iter.NextWithContext(context.Background())
  4696  }
  4697  
  4698  // NotDone returns true if the enumeration should be started or is not yet complete.
  4699  func (iter ResponseWithContinuationArtifactIterator) NotDone() bool {
  4700  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  4701  }
  4702  
  4703  // Response returns the raw server response from the last page request.
  4704  func (iter ResponseWithContinuationArtifactIterator) Response() ResponseWithContinuationArtifact {
  4705  	return iter.page.Response()
  4706  }
  4707  
  4708  // Value returns the current value or a zero-initialized value if the
  4709  // iterator has advanced beyond the end of the collection.
  4710  func (iter ResponseWithContinuationArtifactIterator) Value() Artifact {
  4711  	if !iter.page.NotDone() {
  4712  		return Artifact{}
  4713  	}
  4714  	return iter.page.Values()[iter.i]
  4715  }
  4716  
  4717  // Creates a new instance of the ResponseWithContinuationArtifactIterator type.
  4718  func NewResponseWithContinuationArtifactIterator(page ResponseWithContinuationArtifactPage) ResponseWithContinuationArtifactIterator {
  4719  	return ResponseWithContinuationArtifactIterator{page: page}
  4720  }
  4721  
  4722  // IsEmpty returns true if the ListResult contains no values.
  4723  func (rwcA ResponseWithContinuationArtifact) IsEmpty() bool {
  4724  	return rwcA.Value == nil || len(*rwcA.Value) == 0
  4725  }
  4726  
  4727  // hasNextLink returns true if the NextLink is not empty.
  4728  func (rwcA ResponseWithContinuationArtifact) hasNextLink() bool {
  4729  	return rwcA.NextLink != nil && len(*rwcA.NextLink) != 0
  4730  }
  4731  
  4732  // responseWithContinuationArtifactPreparer prepares a request to retrieve the next set of results.
  4733  // It returns nil if no more results exist.
  4734  func (rwcA ResponseWithContinuationArtifact) responseWithContinuationArtifactPreparer(ctx context.Context) (*http.Request, error) {
  4735  	if !rwcA.hasNextLink() {
  4736  		return nil, nil
  4737  	}
  4738  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  4739  		autorest.AsJSON(),
  4740  		autorest.AsGet(),
  4741  		autorest.WithBaseURL(to.String(rwcA.NextLink)))
  4742  }
  4743  
  4744  // ResponseWithContinuationArtifactPage contains a page of Artifact values.
  4745  type ResponseWithContinuationArtifactPage struct {
  4746  	fn   func(context.Context, ResponseWithContinuationArtifact) (ResponseWithContinuationArtifact, error)
  4747  	rwca ResponseWithContinuationArtifact
  4748  }
  4749  
  4750  // NextWithContext advances to the next page of values.  If there was an error making
  4751  // the request the page does not advance and the error is returned.
  4752  func (page *ResponseWithContinuationArtifactPage) NextWithContext(ctx context.Context) (err error) {
  4753  	if tracing.IsEnabled() {
  4754  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArtifactPage.NextWithContext")
  4755  		defer func() {
  4756  			sc := -1
  4757  			if page.Response().Response.Response != nil {
  4758  				sc = page.Response().Response.Response.StatusCode
  4759  			}
  4760  			tracing.EndSpan(ctx, sc, err)
  4761  		}()
  4762  	}
  4763  	for {
  4764  		next, err := page.fn(ctx, page.rwca)
  4765  		if err != nil {
  4766  			return err
  4767  		}
  4768  		page.rwca = next
  4769  		if !next.hasNextLink() || !next.IsEmpty() {
  4770  			break
  4771  		}
  4772  	}
  4773  	return nil
  4774  }
  4775  
  4776  // Next advances to the next page of values.  If there was an error making
  4777  // the request the page does not advance and the error is returned.
  4778  // Deprecated: Use NextWithContext() instead.
  4779  func (page *ResponseWithContinuationArtifactPage) Next() error {
  4780  	return page.NextWithContext(context.Background())
  4781  }
  4782  
  4783  // NotDone returns true if the page enumeration should be started or is not yet complete.
  4784  func (page ResponseWithContinuationArtifactPage) NotDone() bool {
  4785  	return !page.rwca.IsEmpty()
  4786  }
  4787  
  4788  // Response returns the raw server response from the last page request.
  4789  func (page ResponseWithContinuationArtifactPage) Response() ResponseWithContinuationArtifact {
  4790  	return page.rwca
  4791  }
  4792  
  4793  // Values returns the slice of values for the current page or nil if there are no values.
  4794  func (page ResponseWithContinuationArtifactPage) Values() []Artifact {
  4795  	if page.rwca.IsEmpty() {
  4796  		return nil
  4797  	}
  4798  	return *page.rwca.Value
  4799  }
  4800  
  4801  // Creates a new instance of the ResponseWithContinuationArtifactPage type.
  4802  func NewResponseWithContinuationArtifactPage(cur ResponseWithContinuationArtifact, getNextPage func(context.Context, ResponseWithContinuationArtifact) (ResponseWithContinuationArtifact, error)) ResponseWithContinuationArtifactPage {
  4803  	return ResponseWithContinuationArtifactPage{
  4804  		fn:   getNextPage,
  4805  		rwca: cur,
  4806  	}
  4807  }
  4808  
  4809  // ResponseWithContinuationArtifactSource the response of a list operation.
  4810  type ResponseWithContinuationArtifactSource struct {
  4811  	autorest.Response `json:"-"`
  4812  	// Value - Results of the list operation.
  4813  	Value *[]ArtifactSource `json:"value,omitempty"`
  4814  	// NextLink - Link for next set of results.
  4815  	NextLink *string `json:"nextLink,omitempty"`
  4816  }
  4817  
  4818  // ResponseWithContinuationArtifactSourceIterator provides access to a complete listing of ArtifactSource
  4819  // values.
  4820  type ResponseWithContinuationArtifactSourceIterator struct {
  4821  	i    int
  4822  	page ResponseWithContinuationArtifactSourcePage
  4823  }
  4824  
  4825  // NextWithContext advances to the next value.  If there was an error making
  4826  // the request the iterator does not advance and the error is returned.
  4827  func (iter *ResponseWithContinuationArtifactSourceIterator) NextWithContext(ctx context.Context) (err error) {
  4828  	if tracing.IsEnabled() {
  4829  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArtifactSourceIterator.NextWithContext")
  4830  		defer func() {
  4831  			sc := -1
  4832  			if iter.Response().Response.Response != nil {
  4833  				sc = iter.Response().Response.Response.StatusCode
  4834  			}
  4835  			tracing.EndSpan(ctx, sc, err)
  4836  		}()
  4837  	}
  4838  	iter.i++
  4839  	if iter.i < len(iter.page.Values()) {
  4840  		return nil
  4841  	}
  4842  	err = iter.page.NextWithContext(ctx)
  4843  	if err != nil {
  4844  		iter.i--
  4845  		return err
  4846  	}
  4847  	iter.i = 0
  4848  	return nil
  4849  }
  4850  
  4851  // Next advances to the next value.  If there was an error making
  4852  // the request the iterator does not advance and the error is returned.
  4853  // Deprecated: Use NextWithContext() instead.
  4854  func (iter *ResponseWithContinuationArtifactSourceIterator) Next() error {
  4855  	return iter.NextWithContext(context.Background())
  4856  }
  4857  
  4858  // NotDone returns true if the enumeration should be started or is not yet complete.
  4859  func (iter ResponseWithContinuationArtifactSourceIterator) NotDone() bool {
  4860  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  4861  }
  4862  
  4863  // Response returns the raw server response from the last page request.
  4864  func (iter ResponseWithContinuationArtifactSourceIterator) Response() ResponseWithContinuationArtifactSource {
  4865  	return iter.page.Response()
  4866  }
  4867  
  4868  // Value returns the current value or a zero-initialized value if the
  4869  // iterator has advanced beyond the end of the collection.
  4870  func (iter ResponseWithContinuationArtifactSourceIterator) Value() ArtifactSource {
  4871  	if !iter.page.NotDone() {
  4872  		return ArtifactSource{}
  4873  	}
  4874  	return iter.page.Values()[iter.i]
  4875  }
  4876  
  4877  // Creates a new instance of the ResponseWithContinuationArtifactSourceIterator type.
  4878  func NewResponseWithContinuationArtifactSourceIterator(page ResponseWithContinuationArtifactSourcePage) ResponseWithContinuationArtifactSourceIterator {
  4879  	return ResponseWithContinuationArtifactSourceIterator{page: page}
  4880  }
  4881  
  4882  // IsEmpty returns true if the ListResult contains no values.
  4883  func (rwcAs ResponseWithContinuationArtifactSource) IsEmpty() bool {
  4884  	return rwcAs.Value == nil || len(*rwcAs.Value) == 0
  4885  }
  4886  
  4887  // hasNextLink returns true if the NextLink is not empty.
  4888  func (rwcAs ResponseWithContinuationArtifactSource) hasNextLink() bool {
  4889  	return rwcAs.NextLink != nil && len(*rwcAs.NextLink) != 0
  4890  }
  4891  
  4892  // responseWithContinuationArtifactSourcePreparer prepares a request to retrieve the next set of results.
  4893  // It returns nil if no more results exist.
  4894  func (rwcAs ResponseWithContinuationArtifactSource) responseWithContinuationArtifactSourcePreparer(ctx context.Context) (*http.Request, error) {
  4895  	if !rwcAs.hasNextLink() {
  4896  		return nil, nil
  4897  	}
  4898  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  4899  		autorest.AsJSON(),
  4900  		autorest.AsGet(),
  4901  		autorest.WithBaseURL(to.String(rwcAs.NextLink)))
  4902  }
  4903  
  4904  // ResponseWithContinuationArtifactSourcePage contains a page of ArtifactSource values.
  4905  type ResponseWithContinuationArtifactSourcePage struct {
  4906  	fn    func(context.Context, ResponseWithContinuationArtifactSource) (ResponseWithContinuationArtifactSource, error)
  4907  	rwcas ResponseWithContinuationArtifactSource
  4908  }
  4909  
  4910  // NextWithContext advances to the next page of values.  If there was an error making
  4911  // the request the page does not advance and the error is returned.
  4912  func (page *ResponseWithContinuationArtifactSourcePage) NextWithContext(ctx context.Context) (err error) {
  4913  	if tracing.IsEnabled() {
  4914  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArtifactSourcePage.NextWithContext")
  4915  		defer func() {
  4916  			sc := -1
  4917  			if page.Response().Response.Response != nil {
  4918  				sc = page.Response().Response.Response.StatusCode
  4919  			}
  4920  			tracing.EndSpan(ctx, sc, err)
  4921  		}()
  4922  	}
  4923  	for {
  4924  		next, err := page.fn(ctx, page.rwcas)
  4925  		if err != nil {
  4926  			return err
  4927  		}
  4928  		page.rwcas = next
  4929  		if !next.hasNextLink() || !next.IsEmpty() {
  4930  			break
  4931  		}
  4932  	}
  4933  	return nil
  4934  }
  4935  
  4936  // Next advances to the next page of values.  If there was an error making
  4937  // the request the page does not advance and the error is returned.
  4938  // Deprecated: Use NextWithContext() instead.
  4939  func (page *ResponseWithContinuationArtifactSourcePage) Next() error {
  4940  	return page.NextWithContext(context.Background())
  4941  }
  4942  
  4943  // NotDone returns true if the page enumeration should be started or is not yet complete.
  4944  func (page ResponseWithContinuationArtifactSourcePage) NotDone() bool {
  4945  	return !page.rwcas.IsEmpty()
  4946  }
  4947  
  4948  // Response returns the raw server response from the last page request.
  4949  func (page ResponseWithContinuationArtifactSourcePage) Response() ResponseWithContinuationArtifactSource {
  4950  	return page.rwcas
  4951  }
  4952  
  4953  // Values returns the slice of values for the current page or nil if there are no values.
  4954  func (page ResponseWithContinuationArtifactSourcePage) Values() []ArtifactSource {
  4955  	if page.rwcas.IsEmpty() {
  4956  		return nil
  4957  	}
  4958  	return *page.rwcas.Value
  4959  }
  4960  
  4961  // Creates a new instance of the ResponseWithContinuationArtifactSourcePage type.
  4962  func NewResponseWithContinuationArtifactSourcePage(cur ResponseWithContinuationArtifactSource, getNextPage func(context.Context, ResponseWithContinuationArtifactSource) (ResponseWithContinuationArtifactSource, error)) ResponseWithContinuationArtifactSourcePage {
  4963  	return ResponseWithContinuationArtifactSourcePage{
  4964  		fn:    getNextPage,
  4965  		rwcas: cur,
  4966  	}
  4967  }
  4968  
  4969  // ResponseWithContinuationCustomImage the response of a list operation.
  4970  type ResponseWithContinuationCustomImage struct {
  4971  	autorest.Response `json:"-"`
  4972  	// Value - Results of the list operation.
  4973  	Value *[]CustomImage `json:"value,omitempty"`
  4974  	// NextLink - Link for next set of results.
  4975  	NextLink *string `json:"nextLink,omitempty"`
  4976  }
  4977  
  4978  // ResponseWithContinuationCustomImageIterator provides access to a complete listing of CustomImage values.
  4979  type ResponseWithContinuationCustomImageIterator struct {
  4980  	i    int
  4981  	page ResponseWithContinuationCustomImagePage
  4982  }
  4983  
  4984  // NextWithContext advances to the next value.  If there was an error making
  4985  // the request the iterator does not advance and the error is returned.
  4986  func (iter *ResponseWithContinuationCustomImageIterator) NextWithContext(ctx context.Context) (err error) {
  4987  	if tracing.IsEnabled() {
  4988  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationCustomImageIterator.NextWithContext")
  4989  		defer func() {
  4990  			sc := -1
  4991  			if iter.Response().Response.Response != nil {
  4992  				sc = iter.Response().Response.Response.StatusCode
  4993  			}
  4994  			tracing.EndSpan(ctx, sc, err)
  4995  		}()
  4996  	}
  4997  	iter.i++
  4998  	if iter.i < len(iter.page.Values()) {
  4999  		return nil
  5000  	}
  5001  	err = iter.page.NextWithContext(ctx)
  5002  	if err != nil {
  5003  		iter.i--
  5004  		return err
  5005  	}
  5006  	iter.i = 0
  5007  	return nil
  5008  }
  5009  
  5010  // Next advances to the next value.  If there was an error making
  5011  // the request the iterator does not advance and the error is returned.
  5012  // Deprecated: Use NextWithContext() instead.
  5013  func (iter *ResponseWithContinuationCustomImageIterator) Next() error {
  5014  	return iter.NextWithContext(context.Background())
  5015  }
  5016  
  5017  // NotDone returns true if the enumeration should be started or is not yet complete.
  5018  func (iter ResponseWithContinuationCustomImageIterator) NotDone() bool {
  5019  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  5020  }
  5021  
  5022  // Response returns the raw server response from the last page request.
  5023  func (iter ResponseWithContinuationCustomImageIterator) Response() ResponseWithContinuationCustomImage {
  5024  	return iter.page.Response()
  5025  }
  5026  
  5027  // Value returns the current value or a zero-initialized value if the
  5028  // iterator has advanced beyond the end of the collection.
  5029  func (iter ResponseWithContinuationCustomImageIterator) Value() CustomImage {
  5030  	if !iter.page.NotDone() {
  5031  		return CustomImage{}
  5032  	}
  5033  	return iter.page.Values()[iter.i]
  5034  }
  5035  
  5036  // Creates a new instance of the ResponseWithContinuationCustomImageIterator type.
  5037  func NewResponseWithContinuationCustomImageIterator(page ResponseWithContinuationCustomImagePage) ResponseWithContinuationCustomImageIterator {
  5038  	return ResponseWithContinuationCustomImageIterator{page: page}
  5039  }
  5040  
  5041  // IsEmpty returns true if the ListResult contains no values.
  5042  func (rwcCi ResponseWithContinuationCustomImage) IsEmpty() bool {
  5043  	return rwcCi.Value == nil || len(*rwcCi.Value) == 0
  5044  }
  5045  
  5046  // hasNextLink returns true if the NextLink is not empty.
  5047  func (rwcCi ResponseWithContinuationCustomImage) hasNextLink() bool {
  5048  	return rwcCi.NextLink != nil && len(*rwcCi.NextLink) != 0
  5049  }
  5050  
  5051  // responseWithContinuationCustomImagePreparer prepares a request to retrieve the next set of results.
  5052  // It returns nil if no more results exist.
  5053  func (rwcCi ResponseWithContinuationCustomImage) responseWithContinuationCustomImagePreparer(ctx context.Context) (*http.Request, error) {
  5054  	if !rwcCi.hasNextLink() {
  5055  		return nil, nil
  5056  	}
  5057  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  5058  		autorest.AsJSON(),
  5059  		autorest.AsGet(),
  5060  		autorest.WithBaseURL(to.String(rwcCi.NextLink)))
  5061  }
  5062  
  5063  // ResponseWithContinuationCustomImagePage contains a page of CustomImage values.
  5064  type ResponseWithContinuationCustomImagePage struct {
  5065  	fn    func(context.Context, ResponseWithContinuationCustomImage) (ResponseWithContinuationCustomImage, error)
  5066  	rwcci ResponseWithContinuationCustomImage
  5067  }
  5068  
  5069  // NextWithContext advances to the next page of values.  If there was an error making
  5070  // the request the page does not advance and the error is returned.
  5071  func (page *ResponseWithContinuationCustomImagePage) NextWithContext(ctx context.Context) (err error) {
  5072  	if tracing.IsEnabled() {
  5073  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationCustomImagePage.NextWithContext")
  5074  		defer func() {
  5075  			sc := -1
  5076  			if page.Response().Response.Response != nil {
  5077  				sc = page.Response().Response.Response.StatusCode
  5078  			}
  5079  			tracing.EndSpan(ctx, sc, err)
  5080  		}()
  5081  	}
  5082  	for {
  5083  		next, err := page.fn(ctx, page.rwcci)
  5084  		if err != nil {
  5085  			return err
  5086  		}
  5087  		page.rwcci = next
  5088  		if !next.hasNextLink() || !next.IsEmpty() {
  5089  			break
  5090  		}
  5091  	}
  5092  	return nil
  5093  }
  5094  
  5095  // Next advances to the next page of values.  If there was an error making
  5096  // the request the page does not advance and the error is returned.
  5097  // Deprecated: Use NextWithContext() instead.
  5098  func (page *ResponseWithContinuationCustomImagePage) Next() error {
  5099  	return page.NextWithContext(context.Background())
  5100  }
  5101  
  5102  // NotDone returns true if the page enumeration should be started or is not yet complete.
  5103  func (page ResponseWithContinuationCustomImagePage) NotDone() bool {
  5104  	return !page.rwcci.IsEmpty()
  5105  }
  5106  
  5107  // Response returns the raw server response from the last page request.
  5108  func (page ResponseWithContinuationCustomImagePage) Response() ResponseWithContinuationCustomImage {
  5109  	return page.rwcci
  5110  }
  5111  
  5112  // Values returns the slice of values for the current page or nil if there are no values.
  5113  func (page ResponseWithContinuationCustomImagePage) Values() []CustomImage {
  5114  	if page.rwcci.IsEmpty() {
  5115  		return nil
  5116  	}
  5117  	return *page.rwcci.Value
  5118  }
  5119  
  5120  // Creates a new instance of the ResponseWithContinuationCustomImagePage type.
  5121  func NewResponseWithContinuationCustomImagePage(cur ResponseWithContinuationCustomImage, getNextPage func(context.Context, ResponseWithContinuationCustomImage) (ResponseWithContinuationCustomImage, error)) ResponseWithContinuationCustomImagePage {
  5122  	return ResponseWithContinuationCustomImagePage{
  5123  		fn:    getNextPage,
  5124  		rwcci: cur,
  5125  	}
  5126  }
  5127  
  5128  // ResponseWithContinuationDisk the response of a list operation.
  5129  type ResponseWithContinuationDisk struct {
  5130  	autorest.Response `json:"-"`
  5131  	// Value - Results of the list operation.
  5132  	Value *[]Disk `json:"value,omitempty"`
  5133  	// NextLink - Link for next set of results.
  5134  	NextLink *string `json:"nextLink,omitempty"`
  5135  }
  5136  
  5137  // ResponseWithContinuationDiskIterator provides access to a complete listing of Disk values.
  5138  type ResponseWithContinuationDiskIterator struct {
  5139  	i    int
  5140  	page ResponseWithContinuationDiskPage
  5141  }
  5142  
  5143  // NextWithContext advances to the next value.  If there was an error making
  5144  // the request the iterator does not advance and the error is returned.
  5145  func (iter *ResponseWithContinuationDiskIterator) NextWithContext(ctx context.Context) (err error) {
  5146  	if tracing.IsEnabled() {
  5147  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationDiskIterator.NextWithContext")
  5148  		defer func() {
  5149  			sc := -1
  5150  			if iter.Response().Response.Response != nil {
  5151  				sc = iter.Response().Response.Response.StatusCode
  5152  			}
  5153  			tracing.EndSpan(ctx, sc, err)
  5154  		}()
  5155  	}
  5156  	iter.i++
  5157  	if iter.i < len(iter.page.Values()) {
  5158  		return nil
  5159  	}
  5160  	err = iter.page.NextWithContext(ctx)
  5161  	if err != nil {
  5162  		iter.i--
  5163  		return err
  5164  	}
  5165  	iter.i = 0
  5166  	return nil
  5167  }
  5168  
  5169  // Next advances to the next value.  If there was an error making
  5170  // the request the iterator does not advance and the error is returned.
  5171  // Deprecated: Use NextWithContext() instead.
  5172  func (iter *ResponseWithContinuationDiskIterator) Next() error {
  5173  	return iter.NextWithContext(context.Background())
  5174  }
  5175  
  5176  // NotDone returns true if the enumeration should be started or is not yet complete.
  5177  func (iter ResponseWithContinuationDiskIterator) NotDone() bool {
  5178  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  5179  }
  5180  
  5181  // Response returns the raw server response from the last page request.
  5182  func (iter ResponseWithContinuationDiskIterator) Response() ResponseWithContinuationDisk {
  5183  	return iter.page.Response()
  5184  }
  5185  
  5186  // Value returns the current value or a zero-initialized value if the
  5187  // iterator has advanced beyond the end of the collection.
  5188  func (iter ResponseWithContinuationDiskIterator) Value() Disk {
  5189  	if !iter.page.NotDone() {
  5190  		return Disk{}
  5191  	}
  5192  	return iter.page.Values()[iter.i]
  5193  }
  5194  
  5195  // Creates a new instance of the ResponseWithContinuationDiskIterator type.
  5196  func NewResponseWithContinuationDiskIterator(page ResponseWithContinuationDiskPage) ResponseWithContinuationDiskIterator {
  5197  	return ResponseWithContinuationDiskIterator{page: page}
  5198  }
  5199  
  5200  // IsEmpty returns true if the ListResult contains no values.
  5201  func (rwcD ResponseWithContinuationDisk) IsEmpty() bool {
  5202  	return rwcD.Value == nil || len(*rwcD.Value) == 0
  5203  }
  5204  
  5205  // hasNextLink returns true if the NextLink is not empty.
  5206  func (rwcD ResponseWithContinuationDisk) hasNextLink() bool {
  5207  	return rwcD.NextLink != nil && len(*rwcD.NextLink) != 0
  5208  }
  5209  
  5210  // responseWithContinuationDiskPreparer prepares a request to retrieve the next set of results.
  5211  // It returns nil if no more results exist.
  5212  func (rwcD ResponseWithContinuationDisk) responseWithContinuationDiskPreparer(ctx context.Context) (*http.Request, error) {
  5213  	if !rwcD.hasNextLink() {
  5214  		return nil, nil
  5215  	}
  5216  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  5217  		autorest.AsJSON(),
  5218  		autorest.AsGet(),
  5219  		autorest.WithBaseURL(to.String(rwcD.NextLink)))
  5220  }
  5221  
  5222  // ResponseWithContinuationDiskPage contains a page of Disk values.
  5223  type ResponseWithContinuationDiskPage struct {
  5224  	fn   func(context.Context, ResponseWithContinuationDisk) (ResponseWithContinuationDisk, error)
  5225  	rwcd ResponseWithContinuationDisk
  5226  }
  5227  
  5228  // NextWithContext advances to the next page of values.  If there was an error making
  5229  // the request the page does not advance and the error is returned.
  5230  func (page *ResponseWithContinuationDiskPage) NextWithContext(ctx context.Context) (err error) {
  5231  	if tracing.IsEnabled() {
  5232  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationDiskPage.NextWithContext")
  5233  		defer func() {
  5234  			sc := -1
  5235  			if page.Response().Response.Response != nil {
  5236  				sc = page.Response().Response.Response.StatusCode
  5237  			}
  5238  			tracing.EndSpan(ctx, sc, err)
  5239  		}()
  5240  	}
  5241  	for {
  5242  		next, err := page.fn(ctx, page.rwcd)
  5243  		if err != nil {
  5244  			return err
  5245  		}
  5246  		page.rwcd = next
  5247  		if !next.hasNextLink() || !next.IsEmpty() {
  5248  			break
  5249  		}
  5250  	}
  5251  	return nil
  5252  }
  5253  
  5254  // Next advances to the next page of values.  If there was an error making
  5255  // the request the page does not advance and the error is returned.
  5256  // Deprecated: Use NextWithContext() instead.
  5257  func (page *ResponseWithContinuationDiskPage) Next() error {
  5258  	return page.NextWithContext(context.Background())
  5259  }
  5260  
  5261  // NotDone returns true if the page enumeration should be started or is not yet complete.
  5262  func (page ResponseWithContinuationDiskPage) NotDone() bool {
  5263  	return !page.rwcd.IsEmpty()
  5264  }
  5265  
  5266  // Response returns the raw server response from the last page request.
  5267  func (page ResponseWithContinuationDiskPage) Response() ResponseWithContinuationDisk {
  5268  	return page.rwcd
  5269  }
  5270  
  5271  // Values returns the slice of values for the current page or nil if there are no values.
  5272  func (page ResponseWithContinuationDiskPage) Values() []Disk {
  5273  	if page.rwcd.IsEmpty() {
  5274  		return nil
  5275  	}
  5276  	return *page.rwcd.Value
  5277  }
  5278  
  5279  // Creates a new instance of the ResponseWithContinuationDiskPage type.
  5280  func NewResponseWithContinuationDiskPage(cur ResponseWithContinuationDisk, getNextPage func(context.Context, ResponseWithContinuationDisk) (ResponseWithContinuationDisk, error)) ResponseWithContinuationDiskPage {
  5281  	return ResponseWithContinuationDiskPage{
  5282  		fn:   getNextPage,
  5283  		rwcd: cur,
  5284  	}
  5285  }
  5286  
  5287  // ResponseWithContinuationDtlEnvironment the response of a list operation.
  5288  type ResponseWithContinuationDtlEnvironment struct {
  5289  	autorest.Response `json:"-"`
  5290  	// Value - Results of the list operation.
  5291  	Value *[]Environment `json:"value,omitempty"`
  5292  	// NextLink - Link for next set of results.
  5293  	NextLink *string `json:"nextLink,omitempty"`
  5294  }
  5295  
  5296  // ResponseWithContinuationDtlEnvironmentIterator provides access to a complete listing of Environment
  5297  // values.
  5298  type ResponseWithContinuationDtlEnvironmentIterator struct {
  5299  	i    int
  5300  	page ResponseWithContinuationDtlEnvironmentPage
  5301  }
  5302  
  5303  // NextWithContext advances to the next value.  If there was an error making
  5304  // the request the iterator does not advance and the error is returned.
  5305  func (iter *ResponseWithContinuationDtlEnvironmentIterator) NextWithContext(ctx context.Context) (err error) {
  5306  	if tracing.IsEnabled() {
  5307  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationDtlEnvironmentIterator.NextWithContext")
  5308  		defer func() {
  5309  			sc := -1
  5310  			if iter.Response().Response.Response != nil {
  5311  				sc = iter.Response().Response.Response.StatusCode
  5312  			}
  5313  			tracing.EndSpan(ctx, sc, err)
  5314  		}()
  5315  	}
  5316  	iter.i++
  5317  	if iter.i < len(iter.page.Values()) {
  5318  		return nil
  5319  	}
  5320  	err = iter.page.NextWithContext(ctx)
  5321  	if err != nil {
  5322  		iter.i--
  5323  		return err
  5324  	}
  5325  	iter.i = 0
  5326  	return nil
  5327  }
  5328  
  5329  // Next advances to the next value.  If there was an error making
  5330  // the request the iterator does not advance and the error is returned.
  5331  // Deprecated: Use NextWithContext() instead.
  5332  func (iter *ResponseWithContinuationDtlEnvironmentIterator) Next() error {
  5333  	return iter.NextWithContext(context.Background())
  5334  }
  5335  
  5336  // NotDone returns true if the enumeration should be started or is not yet complete.
  5337  func (iter ResponseWithContinuationDtlEnvironmentIterator) NotDone() bool {
  5338  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  5339  }
  5340  
  5341  // Response returns the raw server response from the last page request.
  5342  func (iter ResponseWithContinuationDtlEnvironmentIterator) Response() ResponseWithContinuationDtlEnvironment {
  5343  	return iter.page.Response()
  5344  }
  5345  
  5346  // Value returns the current value or a zero-initialized value if the
  5347  // iterator has advanced beyond the end of the collection.
  5348  func (iter ResponseWithContinuationDtlEnvironmentIterator) Value() Environment {
  5349  	if !iter.page.NotDone() {
  5350  		return Environment{}
  5351  	}
  5352  	return iter.page.Values()[iter.i]
  5353  }
  5354  
  5355  // Creates a new instance of the ResponseWithContinuationDtlEnvironmentIterator type.
  5356  func NewResponseWithContinuationDtlEnvironmentIterator(page ResponseWithContinuationDtlEnvironmentPage) ResponseWithContinuationDtlEnvironmentIterator {
  5357  	return ResponseWithContinuationDtlEnvironmentIterator{page: page}
  5358  }
  5359  
  5360  // IsEmpty returns true if the ListResult contains no values.
  5361  func (rwcDe ResponseWithContinuationDtlEnvironment) IsEmpty() bool {
  5362  	return rwcDe.Value == nil || len(*rwcDe.Value) == 0
  5363  }
  5364  
  5365  // hasNextLink returns true if the NextLink is not empty.
  5366  func (rwcDe ResponseWithContinuationDtlEnvironment) hasNextLink() bool {
  5367  	return rwcDe.NextLink != nil && len(*rwcDe.NextLink) != 0
  5368  }
  5369  
  5370  // responseWithContinuationDtlEnvironmentPreparer prepares a request to retrieve the next set of results.
  5371  // It returns nil if no more results exist.
  5372  func (rwcDe ResponseWithContinuationDtlEnvironment) responseWithContinuationDtlEnvironmentPreparer(ctx context.Context) (*http.Request, error) {
  5373  	if !rwcDe.hasNextLink() {
  5374  		return nil, nil
  5375  	}
  5376  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  5377  		autorest.AsJSON(),
  5378  		autorest.AsGet(),
  5379  		autorest.WithBaseURL(to.String(rwcDe.NextLink)))
  5380  }
  5381  
  5382  // ResponseWithContinuationDtlEnvironmentPage contains a page of Environment values.
  5383  type ResponseWithContinuationDtlEnvironmentPage struct {
  5384  	fn    func(context.Context, ResponseWithContinuationDtlEnvironment) (ResponseWithContinuationDtlEnvironment, error)
  5385  	rwcde ResponseWithContinuationDtlEnvironment
  5386  }
  5387  
  5388  // NextWithContext advances to the next page of values.  If there was an error making
  5389  // the request the page does not advance and the error is returned.
  5390  func (page *ResponseWithContinuationDtlEnvironmentPage) NextWithContext(ctx context.Context) (err error) {
  5391  	if tracing.IsEnabled() {
  5392  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationDtlEnvironmentPage.NextWithContext")
  5393  		defer func() {
  5394  			sc := -1
  5395  			if page.Response().Response.Response != nil {
  5396  				sc = page.Response().Response.Response.StatusCode
  5397  			}
  5398  			tracing.EndSpan(ctx, sc, err)
  5399  		}()
  5400  	}
  5401  	for {
  5402  		next, err := page.fn(ctx, page.rwcde)
  5403  		if err != nil {
  5404  			return err
  5405  		}
  5406  		page.rwcde = next
  5407  		if !next.hasNextLink() || !next.IsEmpty() {
  5408  			break
  5409  		}
  5410  	}
  5411  	return nil
  5412  }
  5413  
  5414  // Next advances to the next page of values.  If there was an error making
  5415  // the request the page does not advance and the error is returned.
  5416  // Deprecated: Use NextWithContext() instead.
  5417  func (page *ResponseWithContinuationDtlEnvironmentPage) Next() error {
  5418  	return page.NextWithContext(context.Background())
  5419  }
  5420  
  5421  // NotDone returns true if the page enumeration should be started or is not yet complete.
  5422  func (page ResponseWithContinuationDtlEnvironmentPage) NotDone() bool {
  5423  	return !page.rwcde.IsEmpty()
  5424  }
  5425  
  5426  // Response returns the raw server response from the last page request.
  5427  func (page ResponseWithContinuationDtlEnvironmentPage) Response() ResponseWithContinuationDtlEnvironment {
  5428  	return page.rwcde
  5429  }
  5430  
  5431  // Values returns the slice of values for the current page or nil if there are no values.
  5432  func (page ResponseWithContinuationDtlEnvironmentPage) Values() []Environment {
  5433  	if page.rwcde.IsEmpty() {
  5434  		return nil
  5435  	}
  5436  	return *page.rwcde.Value
  5437  }
  5438  
  5439  // Creates a new instance of the ResponseWithContinuationDtlEnvironmentPage type.
  5440  func NewResponseWithContinuationDtlEnvironmentPage(cur ResponseWithContinuationDtlEnvironment, getNextPage func(context.Context, ResponseWithContinuationDtlEnvironment) (ResponseWithContinuationDtlEnvironment, error)) ResponseWithContinuationDtlEnvironmentPage {
  5441  	return ResponseWithContinuationDtlEnvironmentPage{
  5442  		fn:    getNextPage,
  5443  		rwcde: cur,
  5444  	}
  5445  }
  5446  
  5447  // ResponseWithContinuationFormula the response of a list operation.
  5448  type ResponseWithContinuationFormula struct {
  5449  	autorest.Response `json:"-"`
  5450  	// Value - Results of the list operation.
  5451  	Value *[]Formula `json:"value,omitempty"`
  5452  	// NextLink - Link for next set of results.
  5453  	NextLink *string `json:"nextLink,omitempty"`
  5454  }
  5455  
  5456  // ResponseWithContinuationFormulaIterator provides access to a complete listing of Formula values.
  5457  type ResponseWithContinuationFormulaIterator struct {
  5458  	i    int
  5459  	page ResponseWithContinuationFormulaPage
  5460  }
  5461  
  5462  // NextWithContext advances to the next value.  If there was an error making
  5463  // the request the iterator does not advance and the error is returned.
  5464  func (iter *ResponseWithContinuationFormulaIterator) NextWithContext(ctx context.Context) (err error) {
  5465  	if tracing.IsEnabled() {
  5466  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationFormulaIterator.NextWithContext")
  5467  		defer func() {
  5468  			sc := -1
  5469  			if iter.Response().Response.Response != nil {
  5470  				sc = iter.Response().Response.Response.StatusCode
  5471  			}
  5472  			tracing.EndSpan(ctx, sc, err)
  5473  		}()
  5474  	}
  5475  	iter.i++
  5476  	if iter.i < len(iter.page.Values()) {
  5477  		return nil
  5478  	}
  5479  	err = iter.page.NextWithContext(ctx)
  5480  	if err != nil {
  5481  		iter.i--
  5482  		return err
  5483  	}
  5484  	iter.i = 0
  5485  	return nil
  5486  }
  5487  
  5488  // Next advances to the next value.  If there was an error making
  5489  // the request the iterator does not advance and the error is returned.
  5490  // Deprecated: Use NextWithContext() instead.
  5491  func (iter *ResponseWithContinuationFormulaIterator) Next() error {
  5492  	return iter.NextWithContext(context.Background())
  5493  }
  5494  
  5495  // NotDone returns true if the enumeration should be started or is not yet complete.
  5496  func (iter ResponseWithContinuationFormulaIterator) NotDone() bool {
  5497  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  5498  }
  5499  
  5500  // Response returns the raw server response from the last page request.
  5501  func (iter ResponseWithContinuationFormulaIterator) Response() ResponseWithContinuationFormula {
  5502  	return iter.page.Response()
  5503  }
  5504  
  5505  // Value returns the current value or a zero-initialized value if the
  5506  // iterator has advanced beyond the end of the collection.
  5507  func (iter ResponseWithContinuationFormulaIterator) Value() Formula {
  5508  	if !iter.page.NotDone() {
  5509  		return Formula{}
  5510  	}
  5511  	return iter.page.Values()[iter.i]
  5512  }
  5513  
  5514  // Creates a new instance of the ResponseWithContinuationFormulaIterator type.
  5515  func NewResponseWithContinuationFormulaIterator(page ResponseWithContinuationFormulaPage) ResponseWithContinuationFormulaIterator {
  5516  	return ResponseWithContinuationFormulaIterator{page: page}
  5517  }
  5518  
  5519  // IsEmpty returns true if the ListResult contains no values.
  5520  func (rwcF ResponseWithContinuationFormula) IsEmpty() bool {
  5521  	return rwcF.Value == nil || len(*rwcF.Value) == 0
  5522  }
  5523  
  5524  // hasNextLink returns true if the NextLink is not empty.
  5525  func (rwcF ResponseWithContinuationFormula) hasNextLink() bool {
  5526  	return rwcF.NextLink != nil && len(*rwcF.NextLink) != 0
  5527  }
  5528  
  5529  // responseWithContinuationFormulaPreparer prepares a request to retrieve the next set of results.
  5530  // It returns nil if no more results exist.
  5531  func (rwcF ResponseWithContinuationFormula) responseWithContinuationFormulaPreparer(ctx context.Context) (*http.Request, error) {
  5532  	if !rwcF.hasNextLink() {
  5533  		return nil, nil
  5534  	}
  5535  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  5536  		autorest.AsJSON(),
  5537  		autorest.AsGet(),
  5538  		autorest.WithBaseURL(to.String(rwcF.NextLink)))
  5539  }
  5540  
  5541  // ResponseWithContinuationFormulaPage contains a page of Formula values.
  5542  type ResponseWithContinuationFormulaPage struct {
  5543  	fn   func(context.Context, ResponseWithContinuationFormula) (ResponseWithContinuationFormula, error)
  5544  	rwcf ResponseWithContinuationFormula
  5545  }
  5546  
  5547  // NextWithContext advances to the next page of values.  If there was an error making
  5548  // the request the page does not advance and the error is returned.
  5549  func (page *ResponseWithContinuationFormulaPage) NextWithContext(ctx context.Context) (err error) {
  5550  	if tracing.IsEnabled() {
  5551  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationFormulaPage.NextWithContext")
  5552  		defer func() {
  5553  			sc := -1
  5554  			if page.Response().Response.Response != nil {
  5555  				sc = page.Response().Response.Response.StatusCode
  5556  			}
  5557  			tracing.EndSpan(ctx, sc, err)
  5558  		}()
  5559  	}
  5560  	for {
  5561  		next, err := page.fn(ctx, page.rwcf)
  5562  		if err != nil {
  5563  			return err
  5564  		}
  5565  		page.rwcf = next
  5566  		if !next.hasNextLink() || !next.IsEmpty() {
  5567  			break
  5568  		}
  5569  	}
  5570  	return nil
  5571  }
  5572  
  5573  // Next advances to the next page of values.  If there was an error making
  5574  // the request the page does not advance and the error is returned.
  5575  // Deprecated: Use NextWithContext() instead.
  5576  func (page *ResponseWithContinuationFormulaPage) Next() error {
  5577  	return page.NextWithContext(context.Background())
  5578  }
  5579  
  5580  // NotDone returns true if the page enumeration should be started or is not yet complete.
  5581  func (page ResponseWithContinuationFormulaPage) NotDone() bool {
  5582  	return !page.rwcf.IsEmpty()
  5583  }
  5584  
  5585  // Response returns the raw server response from the last page request.
  5586  func (page ResponseWithContinuationFormulaPage) Response() ResponseWithContinuationFormula {
  5587  	return page.rwcf
  5588  }
  5589  
  5590  // Values returns the slice of values for the current page or nil if there are no values.
  5591  func (page ResponseWithContinuationFormulaPage) Values() []Formula {
  5592  	if page.rwcf.IsEmpty() {
  5593  		return nil
  5594  	}
  5595  	return *page.rwcf.Value
  5596  }
  5597  
  5598  // Creates a new instance of the ResponseWithContinuationFormulaPage type.
  5599  func NewResponseWithContinuationFormulaPage(cur ResponseWithContinuationFormula, getNextPage func(context.Context, ResponseWithContinuationFormula) (ResponseWithContinuationFormula, error)) ResponseWithContinuationFormulaPage {
  5600  	return ResponseWithContinuationFormulaPage{
  5601  		fn:   getNextPage,
  5602  		rwcf: cur,
  5603  	}
  5604  }
  5605  
  5606  // ResponseWithContinuationGalleryImage the response of a list operation.
  5607  type ResponseWithContinuationGalleryImage struct {
  5608  	autorest.Response `json:"-"`
  5609  	// Value - Results of the list operation.
  5610  	Value *[]GalleryImage `json:"value,omitempty"`
  5611  	// NextLink - Link for next set of results.
  5612  	NextLink *string `json:"nextLink,omitempty"`
  5613  }
  5614  
  5615  // ResponseWithContinuationGalleryImageIterator provides access to a complete listing of GalleryImage
  5616  // values.
  5617  type ResponseWithContinuationGalleryImageIterator struct {
  5618  	i    int
  5619  	page ResponseWithContinuationGalleryImagePage
  5620  }
  5621  
  5622  // NextWithContext advances to the next value.  If there was an error making
  5623  // the request the iterator does not advance and the error is returned.
  5624  func (iter *ResponseWithContinuationGalleryImageIterator) NextWithContext(ctx context.Context) (err error) {
  5625  	if tracing.IsEnabled() {
  5626  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationGalleryImageIterator.NextWithContext")
  5627  		defer func() {
  5628  			sc := -1
  5629  			if iter.Response().Response.Response != nil {
  5630  				sc = iter.Response().Response.Response.StatusCode
  5631  			}
  5632  			tracing.EndSpan(ctx, sc, err)
  5633  		}()
  5634  	}
  5635  	iter.i++
  5636  	if iter.i < len(iter.page.Values()) {
  5637  		return nil
  5638  	}
  5639  	err = iter.page.NextWithContext(ctx)
  5640  	if err != nil {
  5641  		iter.i--
  5642  		return err
  5643  	}
  5644  	iter.i = 0
  5645  	return nil
  5646  }
  5647  
  5648  // Next advances to the next value.  If there was an error making
  5649  // the request the iterator does not advance and the error is returned.
  5650  // Deprecated: Use NextWithContext() instead.
  5651  func (iter *ResponseWithContinuationGalleryImageIterator) Next() error {
  5652  	return iter.NextWithContext(context.Background())
  5653  }
  5654  
  5655  // NotDone returns true if the enumeration should be started or is not yet complete.
  5656  func (iter ResponseWithContinuationGalleryImageIterator) NotDone() bool {
  5657  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  5658  }
  5659  
  5660  // Response returns the raw server response from the last page request.
  5661  func (iter ResponseWithContinuationGalleryImageIterator) Response() ResponseWithContinuationGalleryImage {
  5662  	return iter.page.Response()
  5663  }
  5664  
  5665  // Value returns the current value or a zero-initialized value if the
  5666  // iterator has advanced beyond the end of the collection.
  5667  func (iter ResponseWithContinuationGalleryImageIterator) Value() GalleryImage {
  5668  	if !iter.page.NotDone() {
  5669  		return GalleryImage{}
  5670  	}
  5671  	return iter.page.Values()[iter.i]
  5672  }
  5673  
  5674  // Creates a new instance of the ResponseWithContinuationGalleryImageIterator type.
  5675  func NewResponseWithContinuationGalleryImageIterator(page ResponseWithContinuationGalleryImagePage) ResponseWithContinuationGalleryImageIterator {
  5676  	return ResponseWithContinuationGalleryImageIterator{page: page}
  5677  }
  5678  
  5679  // IsEmpty returns true if the ListResult contains no values.
  5680  func (rwcGi ResponseWithContinuationGalleryImage) IsEmpty() bool {
  5681  	return rwcGi.Value == nil || len(*rwcGi.Value) == 0
  5682  }
  5683  
  5684  // hasNextLink returns true if the NextLink is not empty.
  5685  func (rwcGi ResponseWithContinuationGalleryImage) hasNextLink() bool {
  5686  	return rwcGi.NextLink != nil && len(*rwcGi.NextLink) != 0
  5687  }
  5688  
  5689  // responseWithContinuationGalleryImagePreparer prepares a request to retrieve the next set of results.
  5690  // It returns nil if no more results exist.
  5691  func (rwcGi ResponseWithContinuationGalleryImage) responseWithContinuationGalleryImagePreparer(ctx context.Context) (*http.Request, error) {
  5692  	if !rwcGi.hasNextLink() {
  5693  		return nil, nil
  5694  	}
  5695  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  5696  		autorest.AsJSON(),
  5697  		autorest.AsGet(),
  5698  		autorest.WithBaseURL(to.String(rwcGi.NextLink)))
  5699  }
  5700  
  5701  // ResponseWithContinuationGalleryImagePage contains a page of GalleryImage values.
  5702  type ResponseWithContinuationGalleryImagePage struct {
  5703  	fn    func(context.Context, ResponseWithContinuationGalleryImage) (ResponseWithContinuationGalleryImage, error)
  5704  	rwcgi ResponseWithContinuationGalleryImage
  5705  }
  5706  
  5707  // NextWithContext advances to the next page of values.  If there was an error making
  5708  // the request the page does not advance and the error is returned.
  5709  func (page *ResponseWithContinuationGalleryImagePage) NextWithContext(ctx context.Context) (err error) {
  5710  	if tracing.IsEnabled() {
  5711  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationGalleryImagePage.NextWithContext")
  5712  		defer func() {
  5713  			sc := -1
  5714  			if page.Response().Response.Response != nil {
  5715  				sc = page.Response().Response.Response.StatusCode
  5716  			}
  5717  			tracing.EndSpan(ctx, sc, err)
  5718  		}()
  5719  	}
  5720  	for {
  5721  		next, err := page.fn(ctx, page.rwcgi)
  5722  		if err != nil {
  5723  			return err
  5724  		}
  5725  		page.rwcgi = next
  5726  		if !next.hasNextLink() || !next.IsEmpty() {
  5727  			break
  5728  		}
  5729  	}
  5730  	return nil
  5731  }
  5732  
  5733  // Next advances to the next page of values.  If there was an error making
  5734  // the request the page does not advance and the error is returned.
  5735  // Deprecated: Use NextWithContext() instead.
  5736  func (page *ResponseWithContinuationGalleryImagePage) Next() error {
  5737  	return page.NextWithContext(context.Background())
  5738  }
  5739  
  5740  // NotDone returns true if the page enumeration should be started or is not yet complete.
  5741  func (page ResponseWithContinuationGalleryImagePage) NotDone() bool {
  5742  	return !page.rwcgi.IsEmpty()
  5743  }
  5744  
  5745  // Response returns the raw server response from the last page request.
  5746  func (page ResponseWithContinuationGalleryImagePage) Response() ResponseWithContinuationGalleryImage {
  5747  	return page.rwcgi
  5748  }
  5749  
  5750  // Values returns the slice of values for the current page or nil if there are no values.
  5751  func (page ResponseWithContinuationGalleryImagePage) Values() []GalleryImage {
  5752  	if page.rwcgi.IsEmpty() {
  5753  		return nil
  5754  	}
  5755  	return *page.rwcgi.Value
  5756  }
  5757  
  5758  // Creates a new instance of the ResponseWithContinuationGalleryImagePage type.
  5759  func NewResponseWithContinuationGalleryImagePage(cur ResponseWithContinuationGalleryImage, getNextPage func(context.Context, ResponseWithContinuationGalleryImage) (ResponseWithContinuationGalleryImage, error)) ResponseWithContinuationGalleryImagePage {
  5760  	return ResponseWithContinuationGalleryImagePage{
  5761  		fn:    getNextPage,
  5762  		rwcgi: cur,
  5763  	}
  5764  }
  5765  
  5766  // ResponseWithContinuationLab the response of a list operation.
  5767  type ResponseWithContinuationLab struct {
  5768  	autorest.Response `json:"-"`
  5769  	// Value - Results of the list operation.
  5770  	Value *[]Lab `json:"value,omitempty"`
  5771  	// NextLink - Link for next set of results.
  5772  	NextLink *string `json:"nextLink,omitempty"`
  5773  }
  5774  
  5775  // ResponseWithContinuationLabIterator provides access to a complete listing of Lab values.
  5776  type ResponseWithContinuationLabIterator struct {
  5777  	i    int
  5778  	page ResponseWithContinuationLabPage
  5779  }
  5780  
  5781  // NextWithContext advances to the next value.  If there was an error making
  5782  // the request the iterator does not advance and the error is returned.
  5783  func (iter *ResponseWithContinuationLabIterator) NextWithContext(ctx context.Context) (err error) {
  5784  	if tracing.IsEnabled() {
  5785  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabIterator.NextWithContext")
  5786  		defer func() {
  5787  			sc := -1
  5788  			if iter.Response().Response.Response != nil {
  5789  				sc = iter.Response().Response.Response.StatusCode
  5790  			}
  5791  			tracing.EndSpan(ctx, sc, err)
  5792  		}()
  5793  	}
  5794  	iter.i++
  5795  	if iter.i < len(iter.page.Values()) {
  5796  		return nil
  5797  	}
  5798  	err = iter.page.NextWithContext(ctx)
  5799  	if err != nil {
  5800  		iter.i--
  5801  		return err
  5802  	}
  5803  	iter.i = 0
  5804  	return nil
  5805  }
  5806  
  5807  // Next advances to the next value.  If there was an error making
  5808  // the request the iterator does not advance and the error is returned.
  5809  // Deprecated: Use NextWithContext() instead.
  5810  func (iter *ResponseWithContinuationLabIterator) Next() error {
  5811  	return iter.NextWithContext(context.Background())
  5812  }
  5813  
  5814  // NotDone returns true if the enumeration should be started or is not yet complete.
  5815  func (iter ResponseWithContinuationLabIterator) NotDone() bool {
  5816  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  5817  }
  5818  
  5819  // Response returns the raw server response from the last page request.
  5820  func (iter ResponseWithContinuationLabIterator) Response() ResponseWithContinuationLab {
  5821  	return iter.page.Response()
  5822  }
  5823  
  5824  // Value returns the current value or a zero-initialized value if the
  5825  // iterator has advanced beyond the end of the collection.
  5826  func (iter ResponseWithContinuationLabIterator) Value() Lab {
  5827  	if !iter.page.NotDone() {
  5828  		return Lab{}
  5829  	}
  5830  	return iter.page.Values()[iter.i]
  5831  }
  5832  
  5833  // Creates a new instance of the ResponseWithContinuationLabIterator type.
  5834  func NewResponseWithContinuationLabIterator(page ResponseWithContinuationLabPage) ResponseWithContinuationLabIterator {
  5835  	return ResponseWithContinuationLabIterator{page: page}
  5836  }
  5837  
  5838  // IsEmpty returns true if the ListResult contains no values.
  5839  func (rwcL ResponseWithContinuationLab) IsEmpty() bool {
  5840  	return rwcL.Value == nil || len(*rwcL.Value) == 0
  5841  }
  5842  
  5843  // hasNextLink returns true if the NextLink is not empty.
  5844  func (rwcL ResponseWithContinuationLab) hasNextLink() bool {
  5845  	return rwcL.NextLink != nil && len(*rwcL.NextLink) != 0
  5846  }
  5847  
  5848  // responseWithContinuationLabPreparer prepares a request to retrieve the next set of results.
  5849  // It returns nil if no more results exist.
  5850  func (rwcL ResponseWithContinuationLab) responseWithContinuationLabPreparer(ctx context.Context) (*http.Request, error) {
  5851  	if !rwcL.hasNextLink() {
  5852  		return nil, nil
  5853  	}
  5854  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  5855  		autorest.AsJSON(),
  5856  		autorest.AsGet(),
  5857  		autorest.WithBaseURL(to.String(rwcL.NextLink)))
  5858  }
  5859  
  5860  // ResponseWithContinuationLabPage contains a page of Lab values.
  5861  type ResponseWithContinuationLabPage struct {
  5862  	fn   func(context.Context, ResponseWithContinuationLab) (ResponseWithContinuationLab, error)
  5863  	rwcl ResponseWithContinuationLab
  5864  }
  5865  
  5866  // NextWithContext advances to the next page of values.  If there was an error making
  5867  // the request the page does not advance and the error is returned.
  5868  func (page *ResponseWithContinuationLabPage) NextWithContext(ctx context.Context) (err error) {
  5869  	if tracing.IsEnabled() {
  5870  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabPage.NextWithContext")
  5871  		defer func() {
  5872  			sc := -1
  5873  			if page.Response().Response.Response != nil {
  5874  				sc = page.Response().Response.Response.StatusCode
  5875  			}
  5876  			tracing.EndSpan(ctx, sc, err)
  5877  		}()
  5878  	}
  5879  	for {
  5880  		next, err := page.fn(ctx, page.rwcl)
  5881  		if err != nil {
  5882  			return err
  5883  		}
  5884  		page.rwcl = next
  5885  		if !next.hasNextLink() || !next.IsEmpty() {
  5886  			break
  5887  		}
  5888  	}
  5889  	return nil
  5890  }
  5891  
  5892  // Next advances to the next page of values.  If there was an error making
  5893  // the request the page does not advance and the error is returned.
  5894  // Deprecated: Use NextWithContext() instead.
  5895  func (page *ResponseWithContinuationLabPage) Next() error {
  5896  	return page.NextWithContext(context.Background())
  5897  }
  5898  
  5899  // NotDone returns true if the page enumeration should be started or is not yet complete.
  5900  func (page ResponseWithContinuationLabPage) NotDone() bool {
  5901  	return !page.rwcl.IsEmpty()
  5902  }
  5903  
  5904  // Response returns the raw server response from the last page request.
  5905  func (page ResponseWithContinuationLabPage) Response() ResponseWithContinuationLab {
  5906  	return page.rwcl
  5907  }
  5908  
  5909  // Values returns the slice of values for the current page or nil if there are no values.
  5910  func (page ResponseWithContinuationLabPage) Values() []Lab {
  5911  	if page.rwcl.IsEmpty() {
  5912  		return nil
  5913  	}
  5914  	return *page.rwcl.Value
  5915  }
  5916  
  5917  // Creates a new instance of the ResponseWithContinuationLabPage type.
  5918  func NewResponseWithContinuationLabPage(cur ResponseWithContinuationLab, getNextPage func(context.Context, ResponseWithContinuationLab) (ResponseWithContinuationLab, error)) ResponseWithContinuationLabPage {
  5919  	return ResponseWithContinuationLabPage{
  5920  		fn:   getNextPage,
  5921  		rwcl: cur,
  5922  	}
  5923  }
  5924  
  5925  // ResponseWithContinuationLabVhd the response of a list operation.
  5926  type ResponseWithContinuationLabVhd struct {
  5927  	autorest.Response `json:"-"`
  5928  	// Value - Results of the list operation.
  5929  	Value *[]LabVhd `json:"value,omitempty"`
  5930  	// NextLink - Link for next set of results.
  5931  	NextLink *string `json:"nextLink,omitempty"`
  5932  }
  5933  
  5934  // ResponseWithContinuationLabVhdIterator provides access to a complete listing of LabVhd values.
  5935  type ResponseWithContinuationLabVhdIterator struct {
  5936  	i    int
  5937  	page ResponseWithContinuationLabVhdPage
  5938  }
  5939  
  5940  // NextWithContext advances to the next value.  If there was an error making
  5941  // the request the iterator does not advance and the error is returned.
  5942  func (iter *ResponseWithContinuationLabVhdIterator) NextWithContext(ctx context.Context) (err error) {
  5943  	if tracing.IsEnabled() {
  5944  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabVhdIterator.NextWithContext")
  5945  		defer func() {
  5946  			sc := -1
  5947  			if iter.Response().Response.Response != nil {
  5948  				sc = iter.Response().Response.Response.StatusCode
  5949  			}
  5950  			tracing.EndSpan(ctx, sc, err)
  5951  		}()
  5952  	}
  5953  	iter.i++
  5954  	if iter.i < len(iter.page.Values()) {
  5955  		return nil
  5956  	}
  5957  	err = iter.page.NextWithContext(ctx)
  5958  	if err != nil {
  5959  		iter.i--
  5960  		return err
  5961  	}
  5962  	iter.i = 0
  5963  	return nil
  5964  }
  5965  
  5966  // Next advances to the next value.  If there was an error making
  5967  // the request the iterator does not advance and the error is returned.
  5968  // Deprecated: Use NextWithContext() instead.
  5969  func (iter *ResponseWithContinuationLabVhdIterator) Next() error {
  5970  	return iter.NextWithContext(context.Background())
  5971  }
  5972  
  5973  // NotDone returns true if the enumeration should be started or is not yet complete.
  5974  func (iter ResponseWithContinuationLabVhdIterator) NotDone() bool {
  5975  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  5976  }
  5977  
  5978  // Response returns the raw server response from the last page request.
  5979  func (iter ResponseWithContinuationLabVhdIterator) Response() ResponseWithContinuationLabVhd {
  5980  	return iter.page.Response()
  5981  }
  5982  
  5983  // Value returns the current value or a zero-initialized value if the
  5984  // iterator has advanced beyond the end of the collection.
  5985  func (iter ResponseWithContinuationLabVhdIterator) Value() LabVhd {
  5986  	if !iter.page.NotDone() {
  5987  		return LabVhd{}
  5988  	}
  5989  	return iter.page.Values()[iter.i]
  5990  }
  5991  
  5992  // Creates a new instance of the ResponseWithContinuationLabVhdIterator type.
  5993  func NewResponseWithContinuationLabVhdIterator(page ResponseWithContinuationLabVhdPage) ResponseWithContinuationLabVhdIterator {
  5994  	return ResponseWithContinuationLabVhdIterator{page: page}
  5995  }
  5996  
  5997  // IsEmpty returns true if the ListResult contains no values.
  5998  func (rwcLv ResponseWithContinuationLabVhd) IsEmpty() bool {
  5999  	return rwcLv.Value == nil || len(*rwcLv.Value) == 0
  6000  }
  6001  
  6002  // hasNextLink returns true if the NextLink is not empty.
  6003  func (rwcLv ResponseWithContinuationLabVhd) hasNextLink() bool {
  6004  	return rwcLv.NextLink != nil && len(*rwcLv.NextLink) != 0
  6005  }
  6006  
  6007  // responseWithContinuationLabVhdPreparer prepares a request to retrieve the next set of results.
  6008  // It returns nil if no more results exist.
  6009  func (rwcLv ResponseWithContinuationLabVhd) responseWithContinuationLabVhdPreparer(ctx context.Context) (*http.Request, error) {
  6010  	if !rwcLv.hasNextLink() {
  6011  		return nil, nil
  6012  	}
  6013  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  6014  		autorest.AsJSON(),
  6015  		autorest.AsGet(),
  6016  		autorest.WithBaseURL(to.String(rwcLv.NextLink)))
  6017  }
  6018  
  6019  // ResponseWithContinuationLabVhdPage contains a page of LabVhd values.
  6020  type ResponseWithContinuationLabVhdPage struct {
  6021  	fn    func(context.Context, ResponseWithContinuationLabVhd) (ResponseWithContinuationLabVhd, error)
  6022  	rwclv ResponseWithContinuationLabVhd
  6023  }
  6024  
  6025  // NextWithContext advances to the next page of values.  If there was an error making
  6026  // the request the page does not advance and the error is returned.
  6027  func (page *ResponseWithContinuationLabVhdPage) NextWithContext(ctx context.Context) (err error) {
  6028  	if tracing.IsEnabled() {
  6029  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabVhdPage.NextWithContext")
  6030  		defer func() {
  6031  			sc := -1
  6032  			if page.Response().Response.Response != nil {
  6033  				sc = page.Response().Response.Response.StatusCode
  6034  			}
  6035  			tracing.EndSpan(ctx, sc, err)
  6036  		}()
  6037  	}
  6038  	for {
  6039  		next, err := page.fn(ctx, page.rwclv)
  6040  		if err != nil {
  6041  			return err
  6042  		}
  6043  		page.rwclv = next
  6044  		if !next.hasNextLink() || !next.IsEmpty() {
  6045  			break
  6046  		}
  6047  	}
  6048  	return nil
  6049  }
  6050  
  6051  // Next advances to the next page of values.  If there was an error making
  6052  // the request the page does not advance and the error is returned.
  6053  // Deprecated: Use NextWithContext() instead.
  6054  func (page *ResponseWithContinuationLabVhdPage) Next() error {
  6055  	return page.NextWithContext(context.Background())
  6056  }
  6057  
  6058  // NotDone returns true if the page enumeration should be started or is not yet complete.
  6059  func (page ResponseWithContinuationLabVhdPage) NotDone() bool {
  6060  	return !page.rwclv.IsEmpty()
  6061  }
  6062  
  6063  // Response returns the raw server response from the last page request.
  6064  func (page ResponseWithContinuationLabVhdPage) Response() ResponseWithContinuationLabVhd {
  6065  	return page.rwclv
  6066  }
  6067  
  6068  // Values returns the slice of values for the current page or nil if there are no values.
  6069  func (page ResponseWithContinuationLabVhdPage) Values() []LabVhd {
  6070  	if page.rwclv.IsEmpty() {
  6071  		return nil
  6072  	}
  6073  	return *page.rwclv.Value
  6074  }
  6075  
  6076  // Creates a new instance of the ResponseWithContinuationLabVhdPage type.
  6077  func NewResponseWithContinuationLabVhdPage(cur ResponseWithContinuationLabVhd, getNextPage func(context.Context, ResponseWithContinuationLabVhd) (ResponseWithContinuationLabVhd, error)) ResponseWithContinuationLabVhdPage {
  6078  	return ResponseWithContinuationLabVhdPage{
  6079  		fn:    getNextPage,
  6080  		rwclv: cur,
  6081  	}
  6082  }
  6083  
  6084  // ResponseWithContinuationLabVirtualMachine the response of a list operation.
  6085  type ResponseWithContinuationLabVirtualMachine struct {
  6086  	autorest.Response `json:"-"`
  6087  	// Value - Results of the list operation.
  6088  	Value *[]LabVirtualMachine `json:"value,omitempty"`
  6089  	// NextLink - Link for next set of results.
  6090  	NextLink *string `json:"nextLink,omitempty"`
  6091  }
  6092  
  6093  // ResponseWithContinuationLabVirtualMachineIterator provides access to a complete listing of
  6094  // LabVirtualMachine values.
  6095  type ResponseWithContinuationLabVirtualMachineIterator struct {
  6096  	i    int
  6097  	page ResponseWithContinuationLabVirtualMachinePage
  6098  }
  6099  
  6100  // NextWithContext advances to the next value.  If there was an error making
  6101  // the request the iterator does not advance and the error is returned.
  6102  func (iter *ResponseWithContinuationLabVirtualMachineIterator) NextWithContext(ctx context.Context) (err error) {
  6103  	if tracing.IsEnabled() {
  6104  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabVirtualMachineIterator.NextWithContext")
  6105  		defer func() {
  6106  			sc := -1
  6107  			if iter.Response().Response.Response != nil {
  6108  				sc = iter.Response().Response.Response.StatusCode
  6109  			}
  6110  			tracing.EndSpan(ctx, sc, err)
  6111  		}()
  6112  	}
  6113  	iter.i++
  6114  	if iter.i < len(iter.page.Values()) {
  6115  		return nil
  6116  	}
  6117  	err = iter.page.NextWithContext(ctx)
  6118  	if err != nil {
  6119  		iter.i--
  6120  		return err
  6121  	}
  6122  	iter.i = 0
  6123  	return nil
  6124  }
  6125  
  6126  // Next advances to the next value.  If there was an error making
  6127  // the request the iterator does not advance and the error is returned.
  6128  // Deprecated: Use NextWithContext() instead.
  6129  func (iter *ResponseWithContinuationLabVirtualMachineIterator) Next() error {
  6130  	return iter.NextWithContext(context.Background())
  6131  }
  6132  
  6133  // NotDone returns true if the enumeration should be started or is not yet complete.
  6134  func (iter ResponseWithContinuationLabVirtualMachineIterator) NotDone() bool {
  6135  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  6136  }
  6137  
  6138  // Response returns the raw server response from the last page request.
  6139  func (iter ResponseWithContinuationLabVirtualMachineIterator) Response() ResponseWithContinuationLabVirtualMachine {
  6140  	return iter.page.Response()
  6141  }
  6142  
  6143  // Value returns the current value or a zero-initialized value if the
  6144  // iterator has advanced beyond the end of the collection.
  6145  func (iter ResponseWithContinuationLabVirtualMachineIterator) Value() LabVirtualMachine {
  6146  	if !iter.page.NotDone() {
  6147  		return LabVirtualMachine{}
  6148  	}
  6149  	return iter.page.Values()[iter.i]
  6150  }
  6151  
  6152  // Creates a new instance of the ResponseWithContinuationLabVirtualMachineIterator type.
  6153  func NewResponseWithContinuationLabVirtualMachineIterator(page ResponseWithContinuationLabVirtualMachinePage) ResponseWithContinuationLabVirtualMachineIterator {
  6154  	return ResponseWithContinuationLabVirtualMachineIterator{page: page}
  6155  }
  6156  
  6157  // IsEmpty returns true if the ListResult contains no values.
  6158  func (rwcLvm ResponseWithContinuationLabVirtualMachine) IsEmpty() bool {
  6159  	return rwcLvm.Value == nil || len(*rwcLvm.Value) == 0
  6160  }
  6161  
  6162  // hasNextLink returns true if the NextLink is not empty.
  6163  func (rwcLvm ResponseWithContinuationLabVirtualMachine) hasNextLink() bool {
  6164  	return rwcLvm.NextLink != nil && len(*rwcLvm.NextLink) != 0
  6165  }
  6166  
  6167  // responseWithContinuationLabVirtualMachinePreparer prepares a request to retrieve the next set of results.
  6168  // It returns nil if no more results exist.
  6169  func (rwcLvm ResponseWithContinuationLabVirtualMachine) responseWithContinuationLabVirtualMachinePreparer(ctx context.Context) (*http.Request, error) {
  6170  	if !rwcLvm.hasNextLink() {
  6171  		return nil, nil
  6172  	}
  6173  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  6174  		autorest.AsJSON(),
  6175  		autorest.AsGet(),
  6176  		autorest.WithBaseURL(to.String(rwcLvm.NextLink)))
  6177  }
  6178  
  6179  // ResponseWithContinuationLabVirtualMachinePage contains a page of LabVirtualMachine values.
  6180  type ResponseWithContinuationLabVirtualMachinePage struct {
  6181  	fn     func(context.Context, ResponseWithContinuationLabVirtualMachine) (ResponseWithContinuationLabVirtualMachine, error)
  6182  	rwclvm ResponseWithContinuationLabVirtualMachine
  6183  }
  6184  
  6185  // NextWithContext advances to the next page of values.  If there was an error making
  6186  // the request the page does not advance and the error is returned.
  6187  func (page *ResponseWithContinuationLabVirtualMachinePage) NextWithContext(ctx context.Context) (err error) {
  6188  	if tracing.IsEnabled() {
  6189  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabVirtualMachinePage.NextWithContext")
  6190  		defer func() {
  6191  			sc := -1
  6192  			if page.Response().Response.Response != nil {
  6193  				sc = page.Response().Response.Response.StatusCode
  6194  			}
  6195  			tracing.EndSpan(ctx, sc, err)
  6196  		}()
  6197  	}
  6198  	for {
  6199  		next, err := page.fn(ctx, page.rwclvm)
  6200  		if err != nil {
  6201  			return err
  6202  		}
  6203  		page.rwclvm = next
  6204  		if !next.hasNextLink() || !next.IsEmpty() {
  6205  			break
  6206  		}
  6207  	}
  6208  	return nil
  6209  }
  6210  
  6211  // Next advances to the next page of values.  If there was an error making
  6212  // the request the page does not advance and the error is returned.
  6213  // Deprecated: Use NextWithContext() instead.
  6214  func (page *ResponseWithContinuationLabVirtualMachinePage) Next() error {
  6215  	return page.NextWithContext(context.Background())
  6216  }
  6217  
  6218  // NotDone returns true if the page enumeration should be started or is not yet complete.
  6219  func (page ResponseWithContinuationLabVirtualMachinePage) NotDone() bool {
  6220  	return !page.rwclvm.IsEmpty()
  6221  }
  6222  
  6223  // Response returns the raw server response from the last page request.
  6224  func (page ResponseWithContinuationLabVirtualMachinePage) Response() ResponseWithContinuationLabVirtualMachine {
  6225  	return page.rwclvm
  6226  }
  6227  
  6228  // Values returns the slice of values for the current page or nil if there are no values.
  6229  func (page ResponseWithContinuationLabVirtualMachinePage) Values() []LabVirtualMachine {
  6230  	if page.rwclvm.IsEmpty() {
  6231  		return nil
  6232  	}
  6233  	return *page.rwclvm.Value
  6234  }
  6235  
  6236  // Creates a new instance of the ResponseWithContinuationLabVirtualMachinePage type.
  6237  func NewResponseWithContinuationLabVirtualMachinePage(cur ResponseWithContinuationLabVirtualMachine, getNextPage func(context.Context, ResponseWithContinuationLabVirtualMachine) (ResponseWithContinuationLabVirtualMachine, error)) ResponseWithContinuationLabVirtualMachinePage {
  6238  	return ResponseWithContinuationLabVirtualMachinePage{
  6239  		fn:     getNextPage,
  6240  		rwclvm: cur,
  6241  	}
  6242  }
  6243  
  6244  // ResponseWithContinuationNotificationChannel the response of a list operation.
  6245  type ResponseWithContinuationNotificationChannel struct {
  6246  	autorest.Response `json:"-"`
  6247  	// Value - Results of the list operation.
  6248  	Value *[]NotificationChannel `json:"value,omitempty"`
  6249  	// NextLink - Link for next set of results.
  6250  	NextLink *string `json:"nextLink,omitempty"`
  6251  }
  6252  
  6253  // ResponseWithContinuationNotificationChannelIterator provides access to a complete listing of
  6254  // NotificationChannel values.
  6255  type ResponseWithContinuationNotificationChannelIterator struct {
  6256  	i    int
  6257  	page ResponseWithContinuationNotificationChannelPage
  6258  }
  6259  
  6260  // NextWithContext advances to the next value.  If there was an error making
  6261  // the request the iterator does not advance and the error is returned.
  6262  func (iter *ResponseWithContinuationNotificationChannelIterator) NextWithContext(ctx context.Context) (err error) {
  6263  	if tracing.IsEnabled() {
  6264  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationNotificationChannelIterator.NextWithContext")
  6265  		defer func() {
  6266  			sc := -1
  6267  			if iter.Response().Response.Response != nil {
  6268  				sc = iter.Response().Response.Response.StatusCode
  6269  			}
  6270  			tracing.EndSpan(ctx, sc, err)
  6271  		}()
  6272  	}
  6273  	iter.i++
  6274  	if iter.i < len(iter.page.Values()) {
  6275  		return nil
  6276  	}
  6277  	err = iter.page.NextWithContext(ctx)
  6278  	if err != nil {
  6279  		iter.i--
  6280  		return err
  6281  	}
  6282  	iter.i = 0
  6283  	return nil
  6284  }
  6285  
  6286  // Next advances to the next value.  If there was an error making
  6287  // the request the iterator does not advance and the error is returned.
  6288  // Deprecated: Use NextWithContext() instead.
  6289  func (iter *ResponseWithContinuationNotificationChannelIterator) Next() error {
  6290  	return iter.NextWithContext(context.Background())
  6291  }
  6292  
  6293  // NotDone returns true if the enumeration should be started or is not yet complete.
  6294  func (iter ResponseWithContinuationNotificationChannelIterator) NotDone() bool {
  6295  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  6296  }
  6297  
  6298  // Response returns the raw server response from the last page request.
  6299  func (iter ResponseWithContinuationNotificationChannelIterator) Response() ResponseWithContinuationNotificationChannel {
  6300  	return iter.page.Response()
  6301  }
  6302  
  6303  // Value returns the current value or a zero-initialized value if the
  6304  // iterator has advanced beyond the end of the collection.
  6305  func (iter ResponseWithContinuationNotificationChannelIterator) Value() NotificationChannel {
  6306  	if !iter.page.NotDone() {
  6307  		return NotificationChannel{}
  6308  	}
  6309  	return iter.page.Values()[iter.i]
  6310  }
  6311  
  6312  // Creates a new instance of the ResponseWithContinuationNotificationChannelIterator type.
  6313  func NewResponseWithContinuationNotificationChannelIterator(page ResponseWithContinuationNotificationChannelPage) ResponseWithContinuationNotificationChannelIterator {
  6314  	return ResponseWithContinuationNotificationChannelIterator{page: page}
  6315  }
  6316  
  6317  // IsEmpty returns true if the ListResult contains no values.
  6318  func (rwcNc ResponseWithContinuationNotificationChannel) IsEmpty() bool {
  6319  	return rwcNc.Value == nil || len(*rwcNc.Value) == 0
  6320  }
  6321  
  6322  // hasNextLink returns true if the NextLink is not empty.
  6323  func (rwcNc ResponseWithContinuationNotificationChannel) hasNextLink() bool {
  6324  	return rwcNc.NextLink != nil && len(*rwcNc.NextLink) != 0
  6325  }
  6326  
  6327  // responseWithContinuationNotificationChannelPreparer prepares a request to retrieve the next set of results.
  6328  // It returns nil if no more results exist.
  6329  func (rwcNc ResponseWithContinuationNotificationChannel) responseWithContinuationNotificationChannelPreparer(ctx context.Context) (*http.Request, error) {
  6330  	if !rwcNc.hasNextLink() {
  6331  		return nil, nil
  6332  	}
  6333  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  6334  		autorest.AsJSON(),
  6335  		autorest.AsGet(),
  6336  		autorest.WithBaseURL(to.String(rwcNc.NextLink)))
  6337  }
  6338  
  6339  // ResponseWithContinuationNotificationChannelPage contains a page of NotificationChannel values.
  6340  type ResponseWithContinuationNotificationChannelPage struct {
  6341  	fn    func(context.Context, ResponseWithContinuationNotificationChannel) (ResponseWithContinuationNotificationChannel, error)
  6342  	rwcnc ResponseWithContinuationNotificationChannel
  6343  }
  6344  
  6345  // NextWithContext advances to the next page of values.  If there was an error making
  6346  // the request the page does not advance and the error is returned.
  6347  func (page *ResponseWithContinuationNotificationChannelPage) NextWithContext(ctx context.Context) (err error) {
  6348  	if tracing.IsEnabled() {
  6349  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationNotificationChannelPage.NextWithContext")
  6350  		defer func() {
  6351  			sc := -1
  6352  			if page.Response().Response.Response != nil {
  6353  				sc = page.Response().Response.Response.StatusCode
  6354  			}
  6355  			tracing.EndSpan(ctx, sc, err)
  6356  		}()
  6357  	}
  6358  	for {
  6359  		next, err := page.fn(ctx, page.rwcnc)
  6360  		if err != nil {
  6361  			return err
  6362  		}
  6363  		page.rwcnc = next
  6364  		if !next.hasNextLink() || !next.IsEmpty() {
  6365  			break
  6366  		}
  6367  	}
  6368  	return nil
  6369  }
  6370  
  6371  // Next advances to the next page of values.  If there was an error making
  6372  // the request the page does not advance and the error is returned.
  6373  // Deprecated: Use NextWithContext() instead.
  6374  func (page *ResponseWithContinuationNotificationChannelPage) Next() error {
  6375  	return page.NextWithContext(context.Background())
  6376  }
  6377  
  6378  // NotDone returns true if the page enumeration should be started or is not yet complete.
  6379  func (page ResponseWithContinuationNotificationChannelPage) NotDone() bool {
  6380  	return !page.rwcnc.IsEmpty()
  6381  }
  6382  
  6383  // Response returns the raw server response from the last page request.
  6384  func (page ResponseWithContinuationNotificationChannelPage) Response() ResponseWithContinuationNotificationChannel {
  6385  	return page.rwcnc
  6386  }
  6387  
  6388  // Values returns the slice of values for the current page or nil if there are no values.
  6389  func (page ResponseWithContinuationNotificationChannelPage) Values() []NotificationChannel {
  6390  	if page.rwcnc.IsEmpty() {
  6391  		return nil
  6392  	}
  6393  	return *page.rwcnc.Value
  6394  }
  6395  
  6396  // Creates a new instance of the ResponseWithContinuationNotificationChannelPage type.
  6397  func NewResponseWithContinuationNotificationChannelPage(cur ResponseWithContinuationNotificationChannel, getNextPage func(context.Context, ResponseWithContinuationNotificationChannel) (ResponseWithContinuationNotificationChannel, error)) ResponseWithContinuationNotificationChannelPage {
  6398  	return ResponseWithContinuationNotificationChannelPage{
  6399  		fn:    getNextPage,
  6400  		rwcnc: cur,
  6401  	}
  6402  }
  6403  
  6404  // ResponseWithContinuationPolicy the response of a list operation.
  6405  type ResponseWithContinuationPolicy struct {
  6406  	autorest.Response `json:"-"`
  6407  	// Value - Results of the list operation.
  6408  	Value *[]Policy `json:"value,omitempty"`
  6409  	// NextLink - Link for next set of results.
  6410  	NextLink *string `json:"nextLink,omitempty"`
  6411  }
  6412  
  6413  // ResponseWithContinuationPolicyIterator provides access to a complete listing of Policy values.
  6414  type ResponseWithContinuationPolicyIterator struct {
  6415  	i    int
  6416  	page ResponseWithContinuationPolicyPage
  6417  }
  6418  
  6419  // NextWithContext advances to the next value.  If there was an error making
  6420  // the request the iterator does not advance and the error is returned.
  6421  func (iter *ResponseWithContinuationPolicyIterator) NextWithContext(ctx context.Context) (err error) {
  6422  	if tracing.IsEnabled() {
  6423  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationPolicyIterator.NextWithContext")
  6424  		defer func() {
  6425  			sc := -1
  6426  			if iter.Response().Response.Response != nil {
  6427  				sc = iter.Response().Response.Response.StatusCode
  6428  			}
  6429  			tracing.EndSpan(ctx, sc, err)
  6430  		}()
  6431  	}
  6432  	iter.i++
  6433  	if iter.i < len(iter.page.Values()) {
  6434  		return nil
  6435  	}
  6436  	err = iter.page.NextWithContext(ctx)
  6437  	if err != nil {
  6438  		iter.i--
  6439  		return err
  6440  	}
  6441  	iter.i = 0
  6442  	return nil
  6443  }
  6444  
  6445  // Next advances to the next value.  If there was an error making
  6446  // the request the iterator does not advance and the error is returned.
  6447  // Deprecated: Use NextWithContext() instead.
  6448  func (iter *ResponseWithContinuationPolicyIterator) Next() error {
  6449  	return iter.NextWithContext(context.Background())
  6450  }
  6451  
  6452  // NotDone returns true if the enumeration should be started or is not yet complete.
  6453  func (iter ResponseWithContinuationPolicyIterator) NotDone() bool {
  6454  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  6455  }
  6456  
  6457  // Response returns the raw server response from the last page request.
  6458  func (iter ResponseWithContinuationPolicyIterator) Response() ResponseWithContinuationPolicy {
  6459  	return iter.page.Response()
  6460  }
  6461  
  6462  // Value returns the current value or a zero-initialized value if the
  6463  // iterator has advanced beyond the end of the collection.
  6464  func (iter ResponseWithContinuationPolicyIterator) Value() Policy {
  6465  	if !iter.page.NotDone() {
  6466  		return Policy{}
  6467  	}
  6468  	return iter.page.Values()[iter.i]
  6469  }
  6470  
  6471  // Creates a new instance of the ResponseWithContinuationPolicyIterator type.
  6472  func NewResponseWithContinuationPolicyIterator(page ResponseWithContinuationPolicyPage) ResponseWithContinuationPolicyIterator {
  6473  	return ResponseWithContinuationPolicyIterator{page: page}
  6474  }
  6475  
  6476  // IsEmpty returns true if the ListResult contains no values.
  6477  func (rwcP ResponseWithContinuationPolicy) IsEmpty() bool {
  6478  	return rwcP.Value == nil || len(*rwcP.Value) == 0
  6479  }
  6480  
  6481  // hasNextLink returns true if the NextLink is not empty.
  6482  func (rwcP ResponseWithContinuationPolicy) hasNextLink() bool {
  6483  	return rwcP.NextLink != nil && len(*rwcP.NextLink) != 0
  6484  }
  6485  
  6486  // responseWithContinuationPolicyPreparer prepares a request to retrieve the next set of results.
  6487  // It returns nil if no more results exist.
  6488  func (rwcP ResponseWithContinuationPolicy) responseWithContinuationPolicyPreparer(ctx context.Context) (*http.Request, error) {
  6489  	if !rwcP.hasNextLink() {
  6490  		return nil, nil
  6491  	}
  6492  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  6493  		autorest.AsJSON(),
  6494  		autorest.AsGet(),
  6495  		autorest.WithBaseURL(to.String(rwcP.NextLink)))
  6496  }
  6497  
  6498  // ResponseWithContinuationPolicyPage contains a page of Policy values.
  6499  type ResponseWithContinuationPolicyPage struct {
  6500  	fn   func(context.Context, ResponseWithContinuationPolicy) (ResponseWithContinuationPolicy, error)
  6501  	rwcp ResponseWithContinuationPolicy
  6502  }
  6503  
  6504  // NextWithContext advances to the next page of values.  If there was an error making
  6505  // the request the page does not advance and the error is returned.
  6506  func (page *ResponseWithContinuationPolicyPage) NextWithContext(ctx context.Context) (err error) {
  6507  	if tracing.IsEnabled() {
  6508  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationPolicyPage.NextWithContext")
  6509  		defer func() {
  6510  			sc := -1
  6511  			if page.Response().Response.Response != nil {
  6512  				sc = page.Response().Response.Response.StatusCode
  6513  			}
  6514  			tracing.EndSpan(ctx, sc, err)
  6515  		}()
  6516  	}
  6517  	for {
  6518  		next, err := page.fn(ctx, page.rwcp)
  6519  		if err != nil {
  6520  			return err
  6521  		}
  6522  		page.rwcp = next
  6523  		if !next.hasNextLink() || !next.IsEmpty() {
  6524  			break
  6525  		}
  6526  	}
  6527  	return nil
  6528  }
  6529  
  6530  // Next advances to the next page of values.  If there was an error making
  6531  // the request the page does not advance and the error is returned.
  6532  // Deprecated: Use NextWithContext() instead.
  6533  func (page *ResponseWithContinuationPolicyPage) Next() error {
  6534  	return page.NextWithContext(context.Background())
  6535  }
  6536  
  6537  // NotDone returns true if the page enumeration should be started or is not yet complete.
  6538  func (page ResponseWithContinuationPolicyPage) NotDone() bool {
  6539  	return !page.rwcp.IsEmpty()
  6540  }
  6541  
  6542  // Response returns the raw server response from the last page request.
  6543  func (page ResponseWithContinuationPolicyPage) Response() ResponseWithContinuationPolicy {
  6544  	return page.rwcp
  6545  }
  6546  
  6547  // Values returns the slice of values for the current page or nil if there are no values.
  6548  func (page ResponseWithContinuationPolicyPage) Values() []Policy {
  6549  	if page.rwcp.IsEmpty() {
  6550  		return nil
  6551  	}
  6552  	return *page.rwcp.Value
  6553  }
  6554  
  6555  // Creates a new instance of the ResponseWithContinuationPolicyPage type.
  6556  func NewResponseWithContinuationPolicyPage(cur ResponseWithContinuationPolicy, getNextPage func(context.Context, ResponseWithContinuationPolicy) (ResponseWithContinuationPolicy, error)) ResponseWithContinuationPolicyPage {
  6557  	return ResponseWithContinuationPolicyPage{
  6558  		fn:   getNextPage,
  6559  		rwcp: cur,
  6560  	}
  6561  }
  6562  
  6563  // ResponseWithContinuationSchedule the response of a list operation.
  6564  type ResponseWithContinuationSchedule struct {
  6565  	autorest.Response `json:"-"`
  6566  	// Value - Results of the list operation.
  6567  	Value *[]Schedule `json:"value,omitempty"`
  6568  	// NextLink - Link for next set of results.
  6569  	NextLink *string `json:"nextLink,omitempty"`
  6570  }
  6571  
  6572  // ResponseWithContinuationScheduleIterator provides access to a complete listing of Schedule values.
  6573  type ResponseWithContinuationScheduleIterator struct {
  6574  	i    int
  6575  	page ResponseWithContinuationSchedulePage
  6576  }
  6577  
  6578  // NextWithContext advances to the next value.  If there was an error making
  6579  // the request the iterator does not advance and the error is returned.
  6580  func (iter *ResponseWithContinuationScheduleIterator) NextWithContext(ctx context.Context) (err error) {
  6581  	if tracing.IsEnabled() {
  6582  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationScheduleIterator.NextWithContext")
  6583  		defer func() {
  6584  			sc := -1
  6585  			if iter.Response().Response.Response != nil {
  6586  				sc = iter.Response().Response.Response.StatusCode
  6587  			}
  6588  			tracing.EndSpan(ctx, sc, err)
  6589  		}()
  6590  	}
  6591  	iter.i++
  6592  	if iter.i < len(iter.page.Values()) {
  6593  		return nil
  6594  	}
  6595  	err = iter.page.NextWithContext(ctx)
  6596  	if err != nil {
  6597  		iter.i--
  6598  		return err
  6599  	}
  6600  	iter.i = 0
  6601  	return nil
  6602  }
  6603  
  6604  // Next advances to the next value.  If there was an error making
  6605  // the request the iterator does not advance and the error is returned.
  6606  // Deprecated: Use NextWithContext() instead.
  6607  func (iter *ResponseWithContinuationScheduleIterator) Next() error {
  6608  	return iter.NextWithContext(context.Background())
  6609  }
  6610  
  6611  // NotDone returns true if the enumeration should be started or is not yet complete.
  6612  func (iter ResponseWithContinuationScheduleIterator) NotDone() bool {
  6613  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  6614  }
  6615  
  6616  // Response returns the raw server response from the last page request.
  6617  func (iter ResponseWithContinuationScheduleIterator) Response() ResponseWithContinuationSchedule {
  6618  	return iter.page.Response()
  6619  }
  6620  
  6621  // Value returns the current value or a zero-initialized value if the
  6622  // iterator has advanced beyond the end of the collection.
  6623  func (iter ResponseWithContinuationScheduleIterator) Value() Schedule {
  6624  	if !iter.page.NotDone() {
  6625  		return Schedule{}
  6626  	}
  6627  	return iter.page.Values()[iter.i]
  6628  }
  6629  
  6630  // Creates a new instance of the ResponseWithContinuationScheduleIterator type.
  6631  func NewResponseWithContinuationScheduleIterator(page ResponseWithContinuationSchedulePage) ResponseWithContinuationScheduleIterator {
  6632  	return ResponseWithContinuationScheduleIterator{page: page}
  6633  }
  6634  
  6635  // IsEmpty returns true if the ListResult contains no values.
  6636  func (rwcS ResponseWithContinuationSchedule) IsEmpty() bool {
  6637  	return rwcS.Value == nil || len(*rwcS.Value) == 0
  6638  }
  6639  
  6640  // hasNextLink returns true if the NextLink is not empty.
  6641  func (rwcS ResponseWithContinuationSchedule) hasNextLink() bool {
  6642  	return rwcS.NextLink != nil && len(*rwcS.NextLink) != 0
  6643  }
  6644  
  6645  // responseWithContinuationSchedulePreparer prepares a request to retrieve the next set of results.
  6646  // It returns nil if no more results exist.
  6647  func (rwcS ResponseWithContinuationSchedule) responseWithContinuationSchedulePreparer(ctx context.Context) (*http.Request, error) {
  6648  	if !rwcS.hasNextLink() {
  6649  		return nil, nil
  6650  	}
  6651  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  6652  		autorest.AsJSON(),
  6653  		autorest.AsGet(),
  6654  		autorest.WithBaseURL(to.String(rwcS.NextLink)))
  6655  }
  6656  
  6657  // ResponseWithContinuationSchedulePage contains a page of Schedule values.
  6658  type ResponseWithContinuationSchedulePage struct {
  6659  	fn   func(context.Context, ResponseWithContinuationSchedule) (ResponseWithContinuationSchedule, error)
  6660  	rwcs ResponseWithContinuationSchedule
  6661  }
  6662  
  6663  // NextWithContext advances to the next page of values.  If there was an error making
  6664  // the request the page does not advance and the error is returned.
  6665  func (page *ResponseWithContinuationSchedulePage) NextWithContext(ctx context.Context) (err error) {
  6666  	if tracing.IsEnabled() {
  6667  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationSchedulePage.NextWithContext")
  6668  		defer func() {
  6669  			sc := -1
  6670  			if page.Response().Response.Response != nil {
  6671  				sc = page.Response().Response.Response.StatusCode
  6672  			}
  6673  			tracing.EndSpan(ctx, sc, err)
  6674  		}()
  6675  	}
  6676  	for {
  6677  		next, err := page.fn(ctx, page.rwcs)
  6678  		if err != nil {
  6679  			return err
  6680  		}
  6681  		page.rwcs = next
  6682  		if !next.hasNextLink() || !next.IsEmpty() {
  6683  			break
  6684  		}
  6685  	}
  6686  	return nil
  6687  }
  6688  
  6689  // Next advances to the next page of values.  If there was an error making
  6690  // the request the page does not advance and the error is returned.
  6691  // Deprecated: Use NextWithContext() instead.
  6692  func (page *ResponseWithContinuationSchedulePage) Next() error {
  6693  	return page.NextWithContext(context.Background())
  6694  }
  6695  
  6696  // NotDone returns true if the page enumeration should be started or is not yet complete.
  6697  func (page ResponseWithContinuationSchedulePage) NotDone() bool {
  6698  	return !page.rwcs.IsEmpty()
  6699  }
  6700  
  6701  // Response returns the raw server response from the last page request.
  6702  func (page ResponseWithContinuationSchedulePage) Response() ResponseWithContinuationSchedule {
  6703  	return page.rwcs
  6704  }
  6705  
  6706  // Values returns the slice of values for the current page or nil if there are no values.
  6707  func (page ResponseWithContinuationSchedulePage) Values() []Schedule {
  6708  	if page.rwcs.IsEmpty() {
  6709  		return nil
  6710  	}
  6711  	return *page.rwcs.Value
  6712  }
  6713  
  6714  // Creates a new instance of the ResponseWithContinuationSchedulePage type.
  6715  func NewResponseWithContinuationSchedulePage(cur ResponseWithContinuationSchedule, getNextPage func(context.Context, ResponseWithContinuationSchedule) (ResponseWithContinuationSchedule, error)) ResponseWithContinuationSchedulePage {
  6716  	return ResponseWithContinuationSchedulePage{
  6717  		fn:   getNextPage,
  6718  		rwcs: cur,
  6719  	}
  6720  }
  6721  
  6722  // ResponseWithContinuationSecret the response of a list operation.
  6723  type ResponseWithContinuationSecret struct {
  6724  	autorest.Response `json:"-"`
  6725  	// Value - Results of the list operation.
  6726  	Value *[]Secret `json:"value,omitempty"`
  6727  	// NextLink - Link for next set of results.
  6728  	NextLink *string `json:"nextLink,omitempty"`
  6729  }
  6730  
  6731  // ResponseWithContinuationSecretIterator provides access to a complete listing of Secret values.
  6732  type ResponseWithContinuationSecretIterator struct {
  6733  	i    int
  6734  	page ResponseWithContinuationSecretPage
  6735  }
  6736  
  6737  // NextWithContext advances to the next value.  If there was an error making
  6738  // the request the iterator does not advance and the error is returned.
  6739  func (iter *ResponseWithContinuationSecretIterator) NextWithContext(ctx context.Context) (err error) {
  6740  	if tracing.IsEnabled() {
  6741  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationSecretIterator.NextWithContext")
  6742  		defer func() {
  6743  			sc := -1
  6744  			if iter.Response().Response.Response != nil {
  6745  				sc = iter.Response().Response.Response.StatusCode
  6746  			}
  6747  			tracing.EndSpan(ctx, sc, err)
  6748  		}()
  6749  	}
  6750  	iter.i++
  6751  	if iter.i < len(iter.page.Values()) {
  6752  		return nil
  6753  	}
  6754  	err = iter.page.NextWithContext(ctx)
  6755  	if err != nil {
  6756  		iter.i--
  6757  		return err
  6758  	}
  6759  	iter.i = 0
  6760  	return nil
  6761  }
  6762  
  6763  // Next advances to the next value.  If there was an error making
  6764  // the request the iterator does not advance and the error is returned.
  6765  // Deprecated: Use NextWithContext() instead.
  6766  func (iter *ResponseWithContinuationSecretIterator) Next() error {
  6767  	return iter.NextWithContext(context.Background())
  6768  }
  6769  
  6770  // NotDone returns true if the enumeration should be started or is not yet complete.
  6771  func (iter ResponseWithContinuationSecretIterator) NotDone() bool {
  6772  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  6773  }
  6774  
  6775  // Response returns the raw server response from the last page request.
  6776  func (iter ResponseWithContinuationSecretIterator) Response() ResponseWithContinuationSecret {
  6777  	return iter.page.Response()
  6778  }
  6779  
  6780  // Value returns the current value or a zero-initialized value if the
  6781  // iterator has advanced beyond the end of the collection.
  6782  func (iter ResponseWithContinuationSecretIterator) Value() Secret {
  6783  	if !iter.page.NotDone() {
  6784  		return Secret{}
  6785  	}
  6786  	return iter.page.Values()[iter.i]
  6787  }
  6788  
  6789  // Creates a new instance of the ResponseWithContinuationSecretIterator type.
  6790  func NewResponseWithContinuationSecretIterator(page ResponseWithContinuationSecretPage) ResponseWithContinuationSecretIterator {
  6791  	return ResponseWithContinuationSecretIterator{page: page}
  6792  }
  6793  
  6794  // IsEmpty returns true if the ListResult contains no values.
  6795  func (rwcS ResponseWithContinuationSecret) IsEmpty() bool {
  6796  	return rwcS.Value == nil || len(*rwcS.Value) == 0
  6797  }
  6798  
  6799  // hasNextLink returns true if the NextLink is not empty.
  6800  func (rwcS ResponseWithContinuationSecret) hasNextLink() bool {
  6801  	return rwcS.NextLink != nil && len(*rwcS.NextLink) != 0
  6802  }
  6803  
  6804  // responseWithContinuationSecretPreparer prepares a request to retrieve the next set of results.
  6805  // It returns nil if no more results exist.
  6806  func (rwcS ResponseWithContinuationSecret) responseWithContinuationSecretPreparer(ctx context.Context) (*http.Request, error) {
  6807  	if !rwcS.hasNextLink() {
  6808  		return nil, nil
  6809  	}
  6810  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  6811  		autorest.AsJSON(),
  6812  		autorest.AsGet(),
  6813  		autorest.WithBaseURL(to.String(rwcS.NextLink)))
  6814  }
  6815  
  6816  // ResponseWithContinuationSecretPage contains a page of Secret values.
  6817  type ResponseWithContinuationSecretPage struct {
  6818  	fn   func(context.Context, ResponseWithContinuationSecret) (ResponseWithContinuationSecret, error)
  6819  	rwcs ResponseWithContinuationSecret
  6820  }
  6821  
  6822  // NextWithContext advances to the next page of values.  If there was an error making
  6823  // the request the page does not advance and the error is returned.
  6824  func (page *ResponseWithContinuationSecretPage) NextWithContext(ctx context.Context) (err error) {
  6825  	if tracing.IsEnabled() {
  6826  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationSecretPage.NextWithContext")
  6827  		defer func() {
  6828  			sc := -1
  6829  			if page.Response().Response.Response != nil {
  6830  				sc = page.Response().Response.Response.StatusCode
  6831  			}
  6832  			tracing.EndSpan(ctx, sc, err)
  6833  		}()
  6834  	}
  6835  	for {
  6836  		next, err := page.fn(ctx, page.rwcs)
  6837  		if err != nil {
  6838  			return err
  6839  		}
  6840  		page.rwcs = next
  6841  		if !next.hasNextLink() || !next.IsEmpty() {
  6842  			break
  6843  		}
  6844  	}
  6845  	return nil
  6846  }
  6847  
  6848  // Next advances to the next page of values.  If there was an error making
  6849  // the request the page does not advance and the error is returned.
  6850  // Deprecated: Use NextWithContext() instead.
  6851  func (page *ResponseWithContinuationSecretPage) Next() error {
  6852  	return page.NextWithContext(context.Background())
  6853  }
  6854  
  6855  // NotDone returns true if the page enumeration should be started or is not yet complete.
  6856  func (page ResponseWithContinuationSecretPage) NotDone() bool {
  6857  	return !page.rwcs.IsEmpty()
  6858  }
  6859  
  6860  // Response returns the raw server response from the last page request.
  6861  func (page ResponseWithContinuationSecretPage) Response() ResponseWithContinuationSecret {
  6862  	return page.rwcs
  6863  }
  6864  
  6865  // Values returns the slice of values for the current page or nil if there are no values.
  6866  func (page ResponseWithContinuationSecretPage) Values() []Secret {
  6867  	if page.rwcs.IsEmpty() {
  6868  		return nil
  6869  	}
  6870  	return *page.rwcs.Value
  6871  }
  6872  
  6873  // Creates a new instance of the ResponseWithContinuationSecretPage type.
  6874  func NewResponseWithContinuationSecretPage(cur ResponseWithContinuationSecret, getNextPage func(context.Context, ResponseWithContinuationSecret) (ResponseWithContinuationSecret, error)) ResponseWithContinuationSecretPage {
  6875  	return ResponseWithContinuationSecretPage{
  6876  		fn:   getNextPage,
  6877  		rwcs: cur,
  6878  	}
  6879  }
  6880  
  6881  // ResponseWithContinuationServiceRunner the response of a list operation.
  6882  type ResponseWithContinuationServiceRunner struct {
  6883  	autorest.Response `json:"-"`
  6884  	// Value - Results of the list operation.
  6885  	Value *[]ServiceRunner `json:"value,omitempty"`
  6886  	// NextLink - Link for next set of results.
  6887  	NextLink *string `json:"nextLink,omitempty"`
  6888  }
  6889  
  6890  // ResponseWithContinuationServiceRunnerIterator provides access to a complete listing of ServiceRunner
  6891  // values.
  6892  type ResponseWithContinuationServiceRunnerIterator struct {
  6893  	i    int
  6894  	page ResponseWithContinuationServiceRunnerPage
  6895  }
  6896  
  6897  // NextWithContext advances to the next value.  If there was an error making
  6898  // the request the iterator does not advance and the error is returned.
  6899  func (iter *ResponseWithContinuationServiceRunnerIterator) NextWithContext(ctx context.Context) (err error) {
  6900  	if tracing.IsEnabled() {
  6901  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationServiceRunnerIterator.NextWithContext")
  6902  		defer func() {
  6903  			sc := -1
  6904  			if iter.Response().Response.Response != nil {
  6905  				sc = iter.Response().Response.Response.StatusCode
  6906  			}
  6907  			tracing.EndSpan(ctx, sc, err)
  6908  		}()
  6909  	}
  6910  	iter.i++
  6911  	if iter.i < len(iter.page.Values()) {
  6912  		return nil
  6913  	}
  6914  	err = iter.page.NextWithContext(ctx)
  6915  	if err != nil {
  6916  		iter.i--
  6917  		return err
  6918  	}
  6919  	iter.i = 0
  6920  	return nil
  6921  }
  6922  
  6923  // Next advances to the next value.  If there was an error making
  6924  // the request the iterator does not advance and the error is returned.
  6925  // Deprecated: Use NextWithContext() instead.
  6926  func (iter *ResponseWithContinuationServiceRunnerIterator) Next() error {
  6927  	return iter.NextWithContext(context.Background())
  6928  }
  6929  
  6930  // NotDone returns true if the enumeration should be started or is not yet complete.
  6931  func (iter ResponseWithContinuationServiceRunnerIterator) NotDone() bool {
  6932  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  6933  }
  6934  
  6935  // Response returns the raw server response from the last page request.
  6936  func (iter ResponseWithContinuationServiceRunnerIterator) Response() ResponseWithContinuationServiceRunner {
  6937  	return iter.page.Response()
  6938  }
  6939  
  6940  // Value returns the current value or a zero-initialized value if the
  6941  // iterator has advanced beyond the end of the collection.
  6942  func (iter ResponseWithContinuationServiceRunnerIterator) Value() ServiceRunner {
  6943  	if !iter.page.NotDone() {
  6944  		return ServiceRunner{}
  6945  	}
  6946  	return iter.page.Values()[iter.i]
  6947  }
  6948  
  6949  // Creates a new instance of the ResponseWithContinuationServiceRunnerIterator type.
  6950  func NewResponseWithContinuationServiceRunnerIterator(page ResponseWithContinuationServiceRunnerPage) ResponseWithContinuationServiceRunnerIterator {
  6951  	return ResponseWithContinuationServiceRunnerIterator{page: page}
  6952  }
  6953  
  6954  // IsEmpty returns true if the ListResult contains no values.
  6955  func (rwcSr ResponseWithContinuationServiceRunner) IsEmpty() bool {
  6956  	return rwcSr.Value == nil || len(*rwcSr.Value) == 0
  6957  }
  6958  
  6959  // hasNextLink returns true if the NextLink is not empty.
  6960  func (rwcSr ResponseWithContinuationServiceRunner) hasNextLink() bool {
  6961  	return rwcSr.NextLink != nil && len(*rwcSr.NextLink) != 0
  6962  }
  6963  
  6964  // responseWithContinuationServiceRunnerPreparer prepares a request to retrieve the next set of results.
  6965  // It returns nil if no more results exist.
  6966  func (rwcSr ResponseWithContinuationServiceRunner) responseWithContinuationServiceRunnerPreparer(ctx context.Context) (*http.Request, error) {
  6967  	if !rwcSr.hasNextLink() {
  6968  		return nil, nil
  6969  	}
  6970  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  6971  		autorest.AsJSON(),
  6972  		autorest.AsGet(),
  6973  		autorest.WithBaseURL(to.String(rwcSr.NextLink)))
  6974  }
  6975  
  6976  // ResponseWithContinuationServiceRunnerPage contains a page of ServiceRunner values.
  6977  type ResponseWithContinuationServiceRunnerPage struct {
  6978  	fn    func(context.Context, ResponseWithContinuationServiceRunner) (ResponseWithContinuationServiceRunner, error)
  6979  	rwcsr ResponseWithContinuationServiceRunner
  6980  }
  6981  
  6982  // NextWithContext advances to the next page of values.  If there was an error making
  6983  // the request the page does not advance and the error is returned.
  6984  func (page *ResponseWithContinuationServiceRunnerPage) NextWithContext(ctx context.Context) (err error) {
  6985  	if tracing.IsEnabled() {
  6986  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationServiceRunnerPage.NextWithContext")
  6987  		defer func() {
  6988  			sc := -1
  6989  			if page.Response().Response.Response != nil {
  6990  				sc = page.Response().Response.Response.StatusCode
  6991  			}
  6992  			tracing.EndSpan(ctx, sc, err)
  6993  		}()
  6994  	}
  6995  	for {
  6996  		next, err := page.fn(ctx, page.rwcsr)
  6997  		if err != nil {
  6998  			return err
  6999  		}
  7000  		page.rwcsr = next
  7001  		if !next.hasNextLink() || !next.IsEmpty() {
  7002  			break
  7003  		}
  7004  	}
  7005  	return nil
  7006  }
  7007  
  7008  // Next advances to the next page of values.  If there was an error making
  7009  // the request the page does not advance and the error is returned.
  7010  // Deprecated: Use NextWithContext() instead.
  7011  func (page *ResponseWithContinuationServiceRunnerPage) Next() error {
  7012  	return page.NextWithContext(context.Background())
  7013  }
  7014  
  7015  // NotDone returns true if the page enumeration should be started or is not yet complete.
  7016  func (page ResponseWithContinuationServiceRunnerPage) NotDone() bool {
  7017  	return !page.rwcsr.IsEmpty()
  7018  }
  7019  
  7020  // Response returns the raw server response from the last page request.
  7021  func (page ResponseWithContinuationServiceRunnerPage) Response() ResponseWithContinuationServiceRunner {
  7022  	return page.rwcsr
  7023  }
  7024  
  7025  // Values returns the slice of values for the current page or nil if there are no values.
  7026  func (page ResponseWithContinuationServiceRunnerPage) Values() []ServiceRunner {
  7027  	if page.rwcsr.IsEmpty() {
  7028  		return nil
  7029  	}
  7030  	return *page.rwcsr.Value
  7031  }
  7032  
  7033  // Creates a new instance of the ResponseWithContinuationServiceRunnerPage type.
  7034  func NewResponseWithContinuationServiceRunnerPage(cur ResponseWithContinuationServiceRunner, getNextPage func(context.Context, ResponseWithContinuationServiceRunner) (ResponseWithContinuationServiceRunner, error)) ResponseWithContinuationServiceRunnerPage {
  7035  	return ResponseWithContinuationServiceRunnerPage{
  7036  		fn:    getNextPage,
  7037  		rwcsr: cur,
  7038  	}
  7039  }
  7040  
  7041  // ResponseWithContinuationUser the response of a list operation.
  7042  type ResponseWithContinuationUser struct {
  7043  	autorest.Response `json:"-"`
  7044  	// Value - Results of the list operation.
  7045  	Value *[]User `json:"value,omitempty"`
  7046  	// NextLink - Link for next set of results.
  7047  	NextLink *string `json:"nextLink,omitempty"`
  7048  }
  7049  
  7050  // ResponseWithContinuationUserIterator provides access to a complete listing of User values.
  7051  type ResponseWithContinuationUserIterator struct {
  7052  	i    int
  7053  	page ResponseWithContinuationUserPage
  7054  }
  7055  
  7056  // NextWithContext advances to the next value.  If there was an error making
  7057  // the request the iterator does not advance and the error is returned.
  7058  func (iter *ResponseWithContinuationUserIterator) NextWithContext(ctx context.Context) (err error) {
  7059  	if tracing.IsEnabled() {
  7060  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationUserIterator.NextWithContext")
  7061  		defer func() {
  7062  			sc := -1
  7063  			if iter.Response().Response.Response != nil {
  7064  				sc = iter.Response().Response.Response.StatusCode
  7065  			}
  7066  			tracing.EndSpan(ctx, sc, err)
  7067  		}()
  7068  	}
  7069  	iter.i++
  7070  	if iter.i < len(iter.page.Values()) {
  7071  		return nil
  7072  	}
  7073  	err = iter.page.NextWithContext(ctx)
  7074  	if err != nil {
  7075  		iter.i--
  7076  		return err
  7077  	}
  7078  	iter.i = 0
  7079  	return nil
  7080  }
  7081  
  7082  // Next advances to the next value.  If there was an error making
  7083  // the request the iterator does not advance and the error is returned.
  7084  // Deprecated: Use NextWithContext() instead.
  7085  func (iter *ResponseWithContinuationUserIterator) Next() error {
  7086  	return iter.NextWithContext(context.Background())
  7087  }
  7088  
  7089  // NotDone returns true if the enumeration should be started or is not yet complete.
  7090  func (iter ResponseWithContinuationUserIterator) NotDone() bool {
  7091  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  7092  }
  7093  
  7094  // Response returns the raw server response from the last page request.
  7095  func (iter ResponseWithContinuationUserIterator) Response() ResponseWithContinuationUser {
  7096  	return iter.page.Response()
  7097  }
  7098  
  7099  // Value returns the current value or a zero-initialized value if the
  7100  // iterator has advanced beyond the end of the collection.
  7101  func (iter ResponseWithContinuationUserIterator) Value() User {
  7102  	if !iter.page.NotDone() {
  7103  		return User{}
  7104  	}
  7105  	return iter.page.Values()[iter.i]
  7106  }
  7107  
  7108  // Creates a new instance of the ResponseWithContinuationUserIterator type.
  7109  func NewResponseWithContinuationUserIterator(page ResponseWithContinuationUserPage) ResponseWithContinuationUserIterator {
  7110  	return ResponseWithContinuationUserIterator{page: page}
  7111  }
  7112  
  7113  // IsEmpty returns true if the ListResult contains no values.
  7114  func (rwcU ResponseWithContinuationUser) IsEmpty() bool {
  7115  	return rwcU.Value == nil || len(*rwcU.Value) == 0
  7116  }
  7117  
  7118  // hasNextLink returns true if the NextLink is not empty.
  7119  func (rwcU ResponseWithContinuationUser) hasNextLink() bool {
  7120  	return rwcU.NextLink != nil && len(*rwcU.NextLink) != 0
  7121  }
  7122  
  7123  // responseWithContinuationUserPreparer prepares a request to retrieve the next set of results.
  7124  // It returns nil if no more results exist.
  7125  func (rwcU ResponseWithContinuationUser) responseWithContinuationUserPreparer(ctx context.Context) (*http.Request, error) {
  7126  	if !rwcU.hasNextLink() {
  7127  		return nil, nil
  7128  	}
  7129  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  7130  		autorest.AsJSON(),
  7131  		autorest.AsGet(),
  7132  		autorest.WithBaseURL(to.String(rwcU.NextLink)))
  7133  }
  7134  
  7135  // ResponseWithContinuationUserPage contains a page of User values.
  7136  type ResponseWithContinuationUserPage struct {
  7137  	fn   func(context.Context, ResponseWithContinuationUser) (ResponseWithContinuationUser, error)
  7138  	rwcu ResponseWithContinuationUser
  7139  }
  7140  
  7141  // NextWithContext advances to the next page of values.  If there was an error making
  7142  // the request the page does not advance and the error is returned.
  7143  func (page *ResponseWithContinuationUserPage) NextWithContext(ctx context.Context) (err error) {
  7144  	if tracing.IsEnabled() {
  7145  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationUserPage.NextWithContext")
  7146  		defer func() {
  7147  			sc := -1
  7148  			if page.Response().Response.Response != nil {
  7149  				sc = page.Response().Response.Response.StatusCode
  7150  			}
  7151  			tracing.EndSpan(ctx, sc, err)
  7152  		}()
  7153  	}
  7154  	for {
  7155  		next, err := page.fn(ctx, page.rwcu)
  7156  		if err != nil {
  7157  			return err
  7158  		}
  7159  		page.rwcu = next
  7160  		if !next.hasNextLink() || !next.IsEmpty() {
  7161  			break
  7162  		}
  7163  	}
  7164  	return nil
  7165  }
  7166  
  7167  // Next advances to the next page of values.  If there was an error making
  7168  // the request the page does not advance and the error is returned.
  7169  // Deprecated: Use NextWithContext() instead.
  7170  func (page *ResponseWithContinuationUserPage) Next() error {
  7171  	return page.NextWithContext(context.Background())
  7172  }
  7173  
  7174  // NotDone returns true if the page enumeration should be started or is not yet complete.
  7175  func (page ResponseWithContinuationUserPage) NotDone() bool {
  7176  	return !page.rwcu.IsEmpty()
  7177  }
  7178  
  7179  // Response returns the raw server response from the last page request.
  7180  func (page ResponseWithContinuationUserPage) Response() ResponseWithContinuationUser {
  7181  	return page.rwcu
  7182  }
  7183  
  7184  // Values returns the slice of values for the current page or nil if there are no values.
  7185  func (page ResponseWithContinuationUserPage) Values() []User {
  7186  	if page.rwcu.IsEmpty() {
  7187  		return nil
  7188  	}
  7189  	return *page.rwcu.Value
  7190  }
  7191  
  7192  // Creates a new instance of the ResponseWithContinuationUserPage type.
  7193  func NewResponseWithContinuationUserPage(cur ResponseWithContinuationUser, getNextPage func(context.Context, ResponseWithContinuationUser) (ResponseWithContinuationUser, error)) ResponseWithContinuationUserPage {
  7194  	return ResponseWithContinuationUserPage{
  7195  		fn:   getNextPage,
  7196  		rwcu: cur,
  7197  	}
  7198  }
  7199  
  7200  // ResponseWithContinuationVirtualNetwork the response of a list operation.
  7201  type ResponseWithContinuationVirtualNetwork struct {
  7202  	autorest.Response `json:"-"`
  7203  	// Value - Results of the list operation.
  7204  	Value *[]VirtualNetwork `json:"value,omitempty"`
  7205  	// NextLink - Link for next set of results.
  7206  	NextLink *string `json:"nextLink,omitempty"`
  7207  }
  7208  
  7209  // ResponseWithContinuationVirtualNetworkIterator provides access to a complete listing of VirtualNetwork
  7210  // values.
  7211  type ResponseWithContinuationVirtualNetworkIterator struct {
  7212  	i    int
  7213  	page ResponseWithContinuationVirtualNetworkPage
  7214  }
  7215  
  7216  // NextWithContext advances to the next value.  If there was an error making
  7217  // the request the iterator does not advance and the error is returned.
  7218  func (iter *ResponseWithContinuationVirtualNetworkIterator) NextWithContext(ctx context.Context) (err error) {
  7219  	if tracing.IsEnabled() {
  7220  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationVirtualNetworkIterator.NextWithContext")
  7221  		defer func() {
  7222  			sc := -1
  7223  			if iter.Response().Response.Response != nil {
  7224  				sc = iter.Response().Response.Response.StatusCode
  7225  			}
  7226  			tracing.EndSpan(ctx, sc, err)
  7227  		}()
  7228  	}
  7229  	iter.i++
  7230  	if iter.i < len(iter.page.Values()) {
  7231  		return nil
  7232  	}
  7233  	err = iter.page.NextWithContext(ctx)
  7234  	if err != nil {
  7235  		iter.i--
  7236  		return err
  7237  	}
  7238  	iter.i = 0
  7239  	return nil
  7240  }
  7241  
  7242  // Next advances to the next value.  If there was an error making
  7243  // the request the iterator does not advance and the error is returned.
  7244  // Deprecated: Use NextWithContext() instead.
  7245  func (iter *ResponseWithContinuationVirtualNetworkIterator) Next() error {
  7246  	return iter.NextWithContext(context.Background())
  7247  }
  7248  
  7249  // NotDone returns true if the enumeration should be started or is not yet complete.
  7250  func (iter ResponseWithContinuationVirtualNetworkIterator) NotDone() bool {
  7251  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  7252  }
  7253  
  7254  // Response returns the raw server response from the last page request.
  7255  func (iter ResponseWithContinuationVirtualNetworkIterator) Response() ResponseWithContinuationVirtualNetwork {
  7256  	return iter.page.Response()
  7257  }
  7258  
  7259  // Value returns the current value or a zero-initialized value if the
  7260  // iterator has advanced beyond the end of the collection.
  7261  func (iter ResponseWithContinuationVirtualNetworkIterator) Value() VirtualNetwork {
  7262  	if !iter.page.NotDone() {
  7263  		return VirtualNetwork{}
  7264  	}
  7265  	return iter.page.Values()[iter.i]
  7266  }
  7267  
  7268  // Creates a new instance of the ResponseWithContinuationVirtualNetworkIterator type.
  7269  func NewResponseWithContinuationVirtualNetworkIterator(page ResponseWithContinuationVirtualNetworkPage) ResponseWithContinuationVirtualNetworkIterator {
  7270  	return ResponseWithContinuationVirtualNetworkIterator{page: page}
  7271  }
  7272  
  7273  // IsEmpty returns true if the ListResult contains no values.
  7274  func (rwcVn ResponseWithContinuationVirtualNetwork) IsEmpty() bool {
  7275  	return rwcVn.Value == nil || len(*rwcVn.Value) == 0
  7276  }
  7277  
  7278  // hasNextLink returns true if the NextLink is not empty.
  7279  func (rwcVn ResponseWithContinuationVirtualNetwork) hasNextLink() bool {
  7280  	return rwcVn.NextLink != nil && len(*rwcVn.NextLink) != 0
  7281  }
  7282  
  7283  // responseWithContinuationVirtualNetworkPreparer prepares a request to retrieve the next set of results.
  7284  // It returns nil if no more results exist.
  7285  func (rwcVn ResponseWithContinuationVirtualNetwork) responseWithContinuationVirtualNetworkPreparer(ctx context.Context) (*http.Request, error) {
  7286  	if !rwcVn.hasNextLink() {
  7287  		return nil, nil
  7288  	}
  7289  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  7290  		autorest.AsJSON(),
  7291  		autorest.AsGet(),
  7292  		autorest.WithBaseURL(to.String(rwcVn.NextLink)))
  7293  }
  7294  
  7295  // ResponseWithContinuationVirtualNetworkPage contains a page of VirtualNetwork values.
  7296  type ResponseWithContinuationVirtualNetworkPage struct {
  7297  	fn    func(context.Context, ResponseWithContinuationVirtualNetwork) (ResponseWithContinuationVirtualNetwork, error)
  7298  	rwcvn ResponseWithContinuationVirtualNetwork
  7299  }
  7300  
  7301  // NextWithContext advances to the next page of values.  If there was an error making
  7302  // the request the page does not advance and the error is returned.
  7303  func (page *ResponseWithContinuationVirtualNetworkPage) NextWithContext(ctx context.Context) (err error) {
  7304  	if tracing.IsEnabled() {
  7305  		ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationVirtualNetworkPage.NextWithContext")
  7306  		defer func() {
  7307  			sc := -1
  7308  			if page.Response().Response.Response != nil {
  7309  				sc = page.Response().Response.Response.StatusCode
  7310  			}
  7311  			tracing.EndSpan(ctx, sc, err)
  7312  		}()
  7313  	}
  7314  	for {
  7315  		next, err := page.fn(ctx, page.rwcvn)
  7316  		if err != nil {
  7317  			return err
  7318  		}
  7319  		page.rwcvn = next
  7320  		if !next.hasNextLink() || !next.IsEmpty() {
  7321  			break
  7322  		}
  7323  	}
  7324  	return nil
  7325  }
  7326  
  7327  // Next advances to the next page of values.  If there was an error making
  7328  // the request the page does not advance and the error is returned.
  7329  // Deprecated: Use NextWithContext() instead.
  7330  func (page *ResponseWithContinuationVirtualNetworkPage) Next() error {
  7331  	return page.NextWithContext(context.Background())
  7332  }
  7333  
  7334  // NotDone returns true if the page enumeration should be started or is not yet complete.
  7335  func (page ResponseWithContinuationVirtualNetworkPage) NotDone() bool {
  7336  	return !page.rwcvn.IsEmpty()
  7337  }
  7338  
  7339  // Response returns the raw server response from the last page request.
  7340  func (page ResponseWithContinuationVirtualNetworkPage) Response() ResponseWithContinuationVirtualNetwork {
  7341  	return page.rwcvn
  7342  }
  7343  
  7344  // Values returns the slice of values for the current page or nil if there are no values.
  7345  func (page ResponseWithContinuationVirtualNetworkPage) Values() []VirtualNetwork {
  7346  	if page.rwcvn.IsEmpty() {
  7347  		return nil
  7348  	}
  7349  	return *page.rwcvn.Value
  7350  }
  7351  
  7352  // Creates a new instance of the ResponseWithContinuationVirtualNetworkPage type.
  7353  func NewResponseWithContinuationVirtualNetworkPage(cur ResponseWithContinuationVirtualNetwork, getNextPage func(context.Context, ResponseWithContinuationVirtualNetwork) (ResponseWithContinuationVirtualNetwork, error)) ResponseWithContinuationVirtualNetworkPage {
  7354  	return ResponseWithContinuationVirtualNetworkPage{
  7355  		fn:    getNextPage,
  7356  		rwcvn: cur,
  7357  	}
  7358  }
  7359  
  7360  // RetargetScheduleProperties properties for retargeting a virtual machine schedule.
  7361  type RetargetScheduleProperties struct {
  7362  	// CurrentResourceID - The resource Id of the virtual machine on which the schedule operates
  7363  	CurrentResourceID *string `json:"currentResourceId,omitempty"`
  7364  	// TargetResourceID - The resource Id of the virtual machine that the schedule should be retargeted to
  7365  	TargetResourceID *string `json:"targetResourceId,omitempty"`
  7366  }
  7367  
  7368  // Schedule a schedule.
  7369  type Schedule struct {
  7370  	autorest.Response `json:"-"`
  7371  	// ScheduleProperties - The properties of the resource.
  7372  	*ScheduleProperties `json:"properties,omitempty"`
  7373  	// ID - READ-ONLY; The identifier of the resource.
  7374  	ID *string `json:"id,omitempty"`
  7375  	// Name - READ-ONLY; The name of the resource.
  7376  	Name *string `json:"name,omitempty"`
  7377  	// Type - READ-ONLY; The type of the resource.
  7378  	Type *string `json:"type,omitempty"`
  7379  	// Location - The location of the resource.
  7380  	Location *string `json:"location,omitempty"`
  7381  	// Tags - The tags of the resource.
  7382  	Tags map[string]*string `json:"tags"`
  7383  }
  7384  
  7385  // MarshalJSON is the custom marshaler for Schedule.
  7386  func (s Schedule) MarshalJSON() ([]byte, error) {
  7387  	objectMap := make(map[string]interface{})
  7388  	if s.ScheduleProperties != nil {
  7389  		objectMap["properties"] = s.ScheduleProperties
  7390  	}
  7391  	if s.Location != nil {
  7392  		objectMap["location"] = s.Location
  7393  	}
  7394  	if s.Tags != nil {
  7395  		objectMap["tags"] = s.Tags
  7396  	}
  7397  	return json.Marshal(objectMap)
  7398  }
  7399  
  7400  // UnmarshalJSON is the custom unmarshaler for Schedule struct.
  7401  func (s *Schedule) UnmarshalJSON(body []byte) error {
  7402  	var m map[string]*json.RawMessage
  7403  	err := json.Unmarshal(body, &m)
  7404  	if err != nil {
  7405  		return err
  7406  	}
  7407  	for k, v := range m {
  7408  		switch k {
  7409  		case "properties":
  7410  			if v != nil {
  7411  				var scheduleProperties ScheduleProperties
  7412  				err = json.Unmarshal(*v, &scheduleProperties)
  7413  				if err != nil {
  7414  					return err
  7415  				}
  7416  				s.ScheduleProperties = &scheduleProperties
  7417  			}
  7418  		case "id":
  7419  			if v != nil {
  7420  				var ID string
  7421  				err = json.Unmarshal(*v, &ID)
  7422  				if err != nil {
  7423  					return err
  7424  				}
  7425  				s.ID = &ID
  7426  			}
  7427  		case "name":
  7428  			if v != nil {
  7429  				var name string
  7430  				err = json.Unmarshal(*v, &name)
  7431  				if err != nil {
  7432  					return err
  7433  				}
  7434  				s.Name = &name
  7435  			}
  7436  		case "type":
  7437  			if v != nil {
  7438  				var typeVar string
  7439  				err = json.Unmarshal(*v, &typeVar)
  7440  				if err != nil {
  7441  					return err
  7442  				}
  7443  				s.Type = &typeVar
  7444  			}
  7445  		case "location":
  7446  			if v != nil {
  7447  				var location string
  7448  				err = json.Unmarshal(*v, &location)
  7449  				if err != nil {
  7450  					return err
  7451  				}
  7452  				s.Location = &location
  7453  			}
  7454  		case "tags":
  7455  			if v != nil {
  7456  				var tags map[string]*string
  7457  				err = json.Unmarshal(*v, &tags)
  7458  				if err != nil {
  7459  					return err
  7460  				}
  7461  				s.Tags = tags
  7462  			}
  7463  		}
  7464  	}
  7465  
  7466  	return nil
  7467  }
  7468  
  7469  // ScheduleFragment a schedule.
  7470  type ScheduleFragment struct {
  7471  	// SchedulePropertiesFragment - The properties of the resource.
  7472  	*SchedulePropertiesFragment `json:"properties,omitempty"`
  7473  	// ID - READ-ONLY; The identifier of the resource.
  7474  	ID *string `json:"id,omitempty"`
  7475  	// Name - READ-ONLY; The name of the resource.
  7476  	Name *string `json:"name,omitempty"`
  7477  	// Type - READ-ONLY; The type of the resource.
  7478  	Type *string `json:"type,omitempty"`
  7479  	// Location - The location of the resource.
  7480  	Location *string `json:"location,omitempty"`
  7481  	// Tags - The tags of the resource.
  7482  	Tags map[string]*string `json:"tags"`
  7483  }
  7484  
  7485  // MarshalJSON is the custom marshaler for ScheduleFragment.
  7486  func (sf ScheduleFragment) MarshalJSON() ([]byte, error) {
  7487  	objectMap := make(map[string]interface{})
  7488  	if sf.SchedulePropertiesFragment != nil {
  7489  		objectMap["properties"] = sf.SchedulePropertiesFragment
  7490  	}
  7491  	if sf.Location != nil {
  7492  		objectMap["location"] = sf.Location
  7493  	}
  7494  	if sf.Tags != nil {
  7495  		objectMap["tags"] = sf.Tags
  7496  	}
  7497  	return json.Marshal(objectMap)
  7498  }
  7499  
  7500  // UnmarshalJSON is the custom unmarshaler for ScheduleFragment struct.
  7501  func (sf *ScheduleFragment) UnmarshalJSON(body []byte) error {
  7502  	var m map[string]*json.RawMessage
  7503  	err := json.Unmarshal(body, &m)
  7504  	if err != nil {
  7505  		return err
  7506  	}
  7507  	for k, v := range m {
  7508  		switch k {
  7509  		case "properties":
  7510  			if v != nil {
  7511  				var schedulePropertiesFragment SchedulePropertiesFragment
  7512  				err = json.Unmarshal(*v, &schedulePropertiesFragment)
  7513  				if err != nil {
  7514  					return err
  7515  				}
  7516  				sf.SchedulePropertiesFragment = &schedulePropertiesFragment
  7517  			}
  7518  		case "id":
  7519  			if v != nil {
  7520  				var ID string
  7521  				err = json.Unmarshal(*v, &ID)
  7522  				if err != nil {
  7523  					return err
  7524  				}
  7525  				sf.ID = &ID
  7526  			}
  7527  		case "name":
  7528  			if v != nil {
  7529  				var name string
  7530  				err = json.Unmarshal(*v, &name)
  7531  				if err != nil {
  7532  					return err
  7533  				}
  7534  				sf.Name = &name
  7535  			}
  7536  		case "type":
  7537  			if v != nil {
  7538  				var typeVar string
  7539  				err = json.Unmarshal(*v, &typeVar)
  7540  				if err != nil {
  7541  					return err
  7542  				}
  7543  				sf.Type = &typeVar
  7544  			}
  7545  		case "location":
  7546  			if v != nil {
  7547  				var location string
  7548  				err = json.Unmarshal(*v, &location)
  7549  				if err != nil {
  7550  					return err
  7551  				}
  7552  				sf.Location = &location
  7553  			}
  7554  		case "tags":
  7555  			if v != nil {
  7556  				var tags map[string]*string
  7557  				err = json.Unmarshal(*v, &tags)
  7558  				if err != nil {
  7559  					return err
  7560  				}
  7561  				sf.Tags = tags
  7562  			}
  7563  		}
  7564  	}
  7565  
  7566  	return nil
  7567  }
  7568  
  7569  // ScheduleProperties properties of a schedule.
  7570  type ScheduleProperties struct {
  7571  	// Status - The status of the schedule (i.e. Enabled, Disabled). Possible values include: 'EnableStatusEnabled', 'EnableStatusDisabled'
  7572  	Status EnableStatus `json:"status,omitempty"`
  7573  	// TaskType - The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart).
  7574  	TaskType *string `json:"taskType,omitempty"`
  7575  	// WeeklyRecurrence - If the schedule will occur only some days of the week, specify the weekly recurrence.
  7576  	WeeklyRecurrence *WeekDetails `json:"weeklyRecurrence,omitempty"`
  7577  	// DailyRecurrence - If the schedule will occur once each day of the week, specify the daily recurrence.
  7578  	DailyRecurrence *DayDetails `json:"dailyRecurrence,omitempty"`
  7579  	// HourlyRecurrence - If the schedule will occur multiple times a day, specify the hourly recurrence.
  7580  	HourlyRecurrence *HourDetails `json:"hourlyRecurrence,omitempty"`
  7581  	// TimeZoneID - The time zone ID (e.g. Pacific Standard time).
  7582  	TimeZoneID *string `json:"timeZoneId,omitempty"`
  7583  	// NotificationSettings - Notification settings.
  7584  	NotificationSettings *NotificationSettings `json:"notificationSettings,omitempty"`
  7585  	// CreatedDate - READ-ONLY; The creation date of the schedule.
  7586  	CreatedDate *date.Time `json:"createdDate,omitempty"`
  7587  	// TargetResourceID - The resource ID to which the schedule belongs
  7588  	TargetResourceID *string `json:"targetResourceId,omitempty"`
  7589  	// ProvisioningState - The provisioning status of the resource.
  7590  	ProvisioningState *string `json:"provisioningState,omitempty"`
  7591  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  7592  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  7593  }
  7594  
  7595  // MarshalJSON is the custom marshaler for ScheduleProperties.
  7596  func (sp ScheduleProperties) MarshalJSON() ([]byte, error) {
  7597  	objectMap := make(map[string]interface{})
  7598  	if sp.Status != "" {
  7599  		objectMap["status"] = sp.Status
  7600  	}
  7601  	if sp.TaskType != nil {
  7602  		objectMap["taskType"] = sp.TaskType
  7603  	}
  7604  	if sp.WeeklyRecurrence != nil {
  7605  		objectMap["weeklyRecurrence"] = sp.WeeklyRecurrence
  7606  	}
  7607  	if sp.DailyRecurrence != nil {
  7608  		objectMap["dailyRecurrence"] = sp.DailyRecurrence
  7609  	}
  7610  	if sp.HourlyRecurrence != nil {
  7611  		objectMap["hourlyRecurrence"] = sp.HourlyRecurrence
  7612  	}
  7613  	if sp.TimeZoneID != nil {
  7614  		objectMap["timeZoneId"] = sp.TimeZoneID
  7615  	}
  7616  	if sp.NotificationSettings != nil {
  7617  		objectMap["notificationSettings"] = sp.NotificationSettings
  7618  	}
  7619  	if sp.TargetResourceID != nil {
  7620  		objectMap["targetResourceId"] = sp.TargetResourceID
  7621  	}
  7622  	if sp.ProvisioningState != nil {
  7623  		objectMap["provisioningState"] = sp.ProvisioningState
  7624  	}
  7625  	if sp.UniqueIdentifier != nil {
  7626  		objectMap["uniqueIdentifier"] = sp.UniqueIdentifier
  7627  	}
  7628  	return json.Marshal(objectMap)
  7629  }
  7630  
  7631  // SchedulePropertiesFragment properties of a schedule.
  7632  type SchedulePropertiesFragment struct {
  7633  	// Status - The status of the schedule (i.e. Enabled, Disabled). Possible values include: 'EnableStatusEnabled', 'EnableStatusDisabled'
  7634  	Status EnableStatus `json:"status,omitempty"`
  7635  	// TaskType - The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart).
  7636  	TaskType *string `json:"taskType,omitempty"`
  7637  	// WeeklyRecurrence - If the schedule will occur only some days of the week, specify the weekly recurrence.
  7638  	WeeklyRecurrence *WeekDetailsFragment `json:"weeklyRecurrence,omitempty"`
  7639  	// DailyRecurrence - If the schedule will occur once each day of the week, specify the daily recurrence.
  7640  	DailyRecurrence *DayDetailsFragment `json:"dailyRecurrence,omitempty"`
  7641  	// HourlyRecurrence - If the schedule will occur multiple times a day, specify the hourly recurrence.
  7642  	HourlyRecurrence *HourDetailsFragment `json:"hourlyRecurrence,omitempty"`
  7643  	// TimeZoneID - The time zone ID (e.g. Pacific Standard time).
  7644  	TimeZoneID *string `json:"timeZoneId,omitempty"`
  7645  	// NotificationSettings - Notification settings.
  7646  	NotificationSettings *NotificationSettingsFragment `json:"notificationSettings,omitempty"`
  7647  	// TargetResourceID - The resource ID to which the schedule belongs
  7648  	TargetResourceID *string `json:"targetResourceId,omitempty"`
  7649  	// ProvisioningState - The provisioning status of the resource.
  7650  	ProvisioningState *string `json:"provisioningState,omitempty"`
  7651  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  7652  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  7653  }
  7654  
  7655  // SchedulesExecuteFuture an abstraction for monitoring and retrieving the results of a long-running
  7656  // operation.
  7657  type SchedulesExecuteFuture struct {
  7658  	azure.FutureAPI
  7659  	// Result returns the result of the asynchronous operation.
  7660  	// If the operation has not completed it will return an error.
  7661  	Result func(SchedulesClient) (autorest.Response, error)
  7662  }
  7663  
  7664  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  7665  func (future *SchedulesExecuteFuture) UnmarshalJSON(body []byte) error {
  7666  	var azFuture azure.Future
  7667  	if err := json.Unmarshal(body, &azFuture); err != nil {
  7668  		return err
  7669  	}
  7670  	future.FutureAPI = &azFuture
  7671  	future.Result = future.result
  7672  	return nil
  7673  }
  7674  
  7675  // result is the default implementation for SchedulesExecuteFuture.Result.
  7676  func (future *SchedulesExecuteFuture) result(client SchedulesClient) (ar autorest.Response, err error) {
  7677  	var done bool
  7678  	done, err = future.DoneWithContext(context.Background(), client)
  7679  	if err != nil {
  7680  		err = autorest.NewErrorWithError(err, "dtl.SchedulesExecuteFuture", "Result", future.Response(), "Polling failure")
  7681  		return
  7682  	}
  7683  	if !done {
  7684  		ar.Response = future.Response()
  7685  		err = azure.NewAsyncOpIncompleteError("dtl.SchedulesExecuteFuture")
  7686  		return
  7687  	}
  7688  	ar.Response = future.Response()
  7689  	return
  7690  }
  7691  
  7692  // Secret a secret.
  7693  type Secret struct {
  7694  	autorest.Response `json:"-"`
  7695  	// SecretProperties - The properties of the resource.
  7696  	*SecretProperties `json:"properties,omitempty"`
  7697  	// ID - READ-ONLY; The identifier of the resource.
  7698  	ID *string `json:"id,omitempty"`
  7699  	// Name - READ-ONLY; The name of the resource.
  7700  	Name *string `json:"name,omitempty"`
  7701  	// Type - READ-ONLY; The type of the resource.
  7702  	Type *string `json:"type,omitempty"`
  7703  	// Location - The location of the resource.
  7704  	Location *string `json:"location,omitempty"`
  7705  	// Tags - The tags of the resource.
  7706  	Tags map[string]*string `json:"tags"`
  7707  }
  7708  
  7709  // MarshalJSON is the custom marshaler for Secret.
  7710  func (s Secret) MarshalJSON() ([]byte, error) {
  7711  	objectMap := make(map[string]interface{})
  7712  	if s.SecretProperties != nil {
  7713  		objectMap["properties"] = s.SecretProperties
  7714  	}
  7715  	if s.Location != nil {
  7716  		objectMap["location"] = s.Location
  7717  	}
  7718  	if s.Tags != nil {
  7719  		objectMap["tags"] = s.Tags
  7720  	}
  7721  	return json.Marshal(objectMap)
  7722  }
  7723  
  7724  // UnmarshalJSON is the custom unmarshaler for Secret struct.
  7725  func (s *Secret) UnmarshalJSON(body []byte) error {
  7726  	var m map[string]*json.RawMessage
  7727  	err := json.Unmarshal(body, &m)
  7728  	if err != nil {
  7729  		return err
  7730  	}
  7731  	for k, v := range m {
  7732  		switch k {
  7733  		case "properties":
  7734  			if v != nil {
  7735  				var secretProperties SecretProperties
  7736  				err = json.Unmarshal(*v, &secretProperties)
  7737  				if err != nil {
  7738  					return err
  7739  				}
  7740  				s.SecretProperties = &secretProperties
  7741  			}
  7742  		case "id":
  7743  			if v != nil {
  7744  				var ID string
  7745  				err = json.Unmarshal(*v, &ID)
  7746  				if err != nil {
  7747  					return err
  7748  				}
  7749  				s.ID = &ID
  7750  			}
  7751  		case "name":
  7752  			if v != nil {
  7753  				var name string
  7754  				err = json.Unmarshal(*v, &name)
  7755  				if err != nil {
  7756  					return err
  7757  				}
  7758  				s.Name = &name
  7759  			}
  7760  		case "type":
  7761  			if v != nil {
  7762  				var typeVar string
  7763  				err = json.Unmarshal(*v, &typeVar)
  7764  				if err != nil {
  7765  					return err
  7766  				}
  7767  				s.Type = &typeVar
  7768  			}
  7769  		case "location":
  7770  			if v != nil {
  7771  				var location string
  7772  				err = json.Unmarshal(*v, &location)
  7773  				if err != nil {
  7774  					return err
  7775  				}
  7776  				s.Location = &location
  7777  			}
  7778  		case "tags":
  7779  			if v != nil {
  7780  				var tags map[string]*string
  7781  				err = json.Unmarshal(*v, &tags)
  7782  				if err != nil {
  7783  					return err
  7784  				}
  7785  				s.Tags = tags
  7786  			}
  7787  		}
  7788  	}
  7789  
  7790  	return nil
  7791  }
  7792  
  7793  // SecretProperties properties of a secret.
  7794  type SecretProperties struct {
  7795  	// Value - The value of the secret for secret creation.
  7796  	Value *string `json:"value,omitempty"`
  7797  	// ProvisioningState - The provisioning status of the resource.
  7798  	ProvisioningState *string `json:"provisioningState,omitempty"`
  7799  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  7800  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  7801  }
  7802  
  7803  // ServiceRunner a container for a managed identity to execute DevTest lab services.
  7804  type ServiceRunner struct {
  7805  	autorest.Response `json:"-"`
  7806  	// Identity - The identity of the resource.
  7807  	Identity *IdentityProperties `json:"identity,omitempty"`
  7808  	// ID - READ-ONLY; The identifier of the resource.
  7809  	ID *string `json:"id,omitempty"`
  7810  	// Name - READ-ONLY; The name of the resource.
  7811  	Name *string `json:"name,omitempty"`
  7812  	// Type - READ-ONLY; The type of the resource.
  7813  	Type *string `json:"type,omitempty"`
  7814  	// Location - The location of the resource.
  7815  	Location *string `json:"location,omitempty"`
  7816  	// Tags - The tags of the resource.
  7817  	Tags map[string]*string `json:"tags"`
  7818  }
  7819  
  7820  // MarshalJSON is the custom marshaler for ServiceRunner.
  7821  func (sr ServiceRunner) MarshalJSON() ([]byte, error) {
  7822  	objectMap := make(map[string]interface{})
  7823  	if sr.Identity != nil {
  7824  		objectMap["identity"] = sr.Identity
  7825  	}
  7826  	if sr.Location != nil {
  7827  		objectMap["location"] = sr.Location
  7828  	}
  7829  	if sr.Tags != nil {
  7830  		objectMap["tags"] = sr.Tags
  7831  	}
  7832  	return json.Marshal(objectMap)
  7833  }
  7834  
  7835  // SharedPublicIPAddressConfiguration properties of a virtual machine that determine how it is connected to
  7836  // a load balancer.
  7837  type SharedPublicIPAddressConfiguration struct {
  7838  	// InboundNatRules - The incoming NAT rules
  7839  	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
  7840  }
  7841  
  7842  // SharedPublicIPAddressConfigurationFragment properties of a virtual machine that determine how it is
  7843  // connected to a load balancer.
  7844  type SharedPublicIPAddressConfigurationFragment struct {
  7845  	// InboundNatRules - The incoming NAT rules
  7846  	InboundNatRules *[]InboundNatRuleFragment `json:"inboundNatRules,omitempty"`
  7847  }
  7848  
  7849  // ShutdownNotificationContent the contents of a shutdown notification. Webhooks can use this type to
  7850  // deserialize the request body when they get notified of an imminent shutdown.
  7851  type ShutdownNotificationContent struct {
  7852  	// SkipURL - The URL to skip auto-shutdown.
  7853  	SkipURL *string `json:"skipUrl,omitempty"`
  7854  	// DelayURL60 - The URL to delay shutdown by 60 minutes.
  7855  	DelayURL60 *string `json:"delayUrl60,omitempty"`
  7856  	// DelayURL120 - The URL to delay shutdown by 2 hours.
  7857  	DelayURL120 *string `json:"delayUrl120,omitempty"`
  7858  	// VMName - The virtual machine to be shut down.
  7859  	VMName *string `json:"vmName,omitempty"`
  7860  	// GUID - The GUID for the virtual machine to be shut down.
  7861  	GUID *string `json:"guid,omitempty"`
  7862  	// Owner - The owner of the virtual machine.
  7863  	Owner *string `json:"owner,omitempty"`
  7864  	// EventType - The event for which a notification will be sent.
  7865  	EventType *string `json:"eventType,omitempty"`
  7866  	// Text - The text for the notification.
  7867  	Text *string `json:"text,omitempty"`
  7868  	// SubscriptionID - The subscription ID for the schedule.
  7869  	SubscriptionID *string `json:"subscriptionId,omitempty"`
  7870  	// ResourceGroupName - The resource group name for the schedule.
  7871  	ResourceGroupName *string `json:"resourceGroupName,omitempty"`
  7872  	// LabName - The lab for the schedule.
  7873  	LabName *string `json:"labName,omitempty"`
  7874  }
  7875  
  7876  // Subnet subnet information.
  7877  type Subnet struct {
  7878  	// ResourceID - The resource ID of the subnet.
  7879  	ResourceID *string `json:"resourceId,omitempty"`
  7880  	// LabSubnetName - The name of the subnet as seen in the lab.
  7881  	LabSubnetName *string `json:"labSubnetName,omitempty"`
  7882  	// AllowPublicIP - The permission policy of the subnet for allowing public IP addresses (i.e. Allow, Deny)). Possible values include: 'Default', 'Deny', 'Allow'
  7883  	AllowPublicIP UsagePermissionType `json:"allowPublicIp,omitempty"`
  7884  }
  7885  
  7886  // SubnetFragment subnet information.
  7887  type SubnetFragment struct {
  7888  	// ResourceID - The resource ID of the subnet.
  7889  	ResourceID *string `json:"resourceId,omitempty"`
  7890  	// LabSubnetName - The name of the subnet as seen in the lab.
  7891  	LabSubnetName *string `json:"labSubnetName,omitempty"`
  7892  	// AllowPublicIP - The permission policy of the subnet for allowing public IP addresses (i.e. Allow, Deny)). Possible values include: 'Default', 'Deny', 'Allow'
  7893  	AllowPublicIP UsagePermissionType `json:"allowPublicIp,omitempty"`
  7894  }
  7895  
  7896  // SubnetOverride property overrides on a subnet of a virtual network.
  7897  type SubnetOverride struct {
  7898  	// ResourceID - The resource ID of the subnet.
  7899  	ResourceID *string `json:"resourceId,omitempty"`
  7900  	// LabSubnetName - The name given to the subnet within the lab.
  7901  	LabSubnetName *string `json:"labSubnetName,omitempty"`
  7902  	// UseInVMCreationPermission - Indicates whether this subnet can be used during virtual machine creation (i.e. Allow, Deny). Possible values include: 'Default', 'Deny', 'Allow'
  7903  	UseInVMCreationPermission UsagePermissionType `json:"useInVmCreationPermission,omitempty"`
  7904  	// UsePublicIPAddressPermission - Indicates whether public IP addresses can be assigned to virtual machines on this subnet (i.e. Allow, Deny). Possible values include: 'Default', 'Deny', 'Allow'
  7905  	UsePublicIPAddressPermission UsagePermissionType `json:"usePublicIpAddressPermission,omitempty"`
  7906  	// SharedPublicIPAddressConfiguration - Properties that virtual machines on this subnet will share.
  7907  	SharedPublicIPAddressConfiguration *SubnetSharedPublicIPAddressConfiguration `json:"sharedPublicIpAddressConfiguration,omitempty"`
  7908  	// VirtualNetworkPoolName - The virtual network pool associated with this subnet.
  7909  	VirtualNetworkPoolName *string `json:"virtualNetworkPoolName,omitempty"`
  7910  }
  7911  
  7912  // SubnetOverrideFragment property overrides on a subnet of a virtual network.
  7913  type SubnetOverrideFragment struct {
  7914  	// ResourceID - The resource ID of the subnet.
  7915  	ResourceID *string `json:"resourceId,omitempty"`
  7916  	// LabSubnetName - The name given to the subnet within the lab.
  7917  	LabSubnetName *string `json:"labSubnetName,omitempty"`
  7918  	// UseInVMCreationPermission - Indicates whether this subnet can be used during virtual machine creation (i.e. Allow, Deny). Possible values include: 'Default', 'Deny', 'Allow'
  7919  	UseInVMCreationPermission UsagePermissionType `json:"useInVmCreationPermission,omitempty"`
  7920  	// UsePublicIPAddressPermission - Indicates whether public IP addresses can be assigned to virtual machines on this subnet (i.e. Allow, Deny). Possible values include: 'Default', 'Deny', 'Allow'
  7921  	UsePublicIPAddressPermission UsagePermissionType `json:"usePublicIpAddressPermission,omitempty"`
  7922  	// SharedPublicIPAddressConfiguration - Properties that virtual machines on this subnet will share.
  7923  	SharedPublicIPAddressConfiguration *SubnetSharedPublicIPAddressConfigurationFragment `json:"sharedPublicIpAddressConfiguration,omitempty"`
  7924  	// VirtualNetworkPoolName - The virtual network pool associated with this subnet.
  7925  	VirtualNetworkPoolName *string `json:"virtualNetworkPoolName,omitempty"`
  7926  }
  7927  
  7928  // SubnetSharedPublicIPAddressConfiguration configuration for public IP address sharing.
  7929  type SubnetSharedPublicIPAddressConfiguration struct {
  7930  	// AllowedPorts - Backend ports that virtual machines on this subnet are allowed to expose
  7931  	AllowedPorts *[]Port `json:"allowedPorts,omitempty"`
  7932  }
  7933  
  7934  // SubnetSharedPublicIPAddressConfigurationFragment configuration for public IP address sharing.
  7935  type SubnetSharedPublicIPAddressConfigurationFragment struct {
  7936  	// AllowedPorts - Backend ports that virtual machines on this subnet are allowed to expose
  7937  	AllowedPorts *[]PortFragment `json:"allowedPorts,omitempty"`
  7938  }
  7939  
  7940  // TargetCostProperties properties of a cost target.
  7941  type TargetCostProperties struct {
  7942  	// Status - Target cost status. Possible values include: 'TargetCostStatusEnabled', 'TargetCostStatusDisabled'
  7943  	Status TargetCostStatus `json:"status,omitempty"`
  7944  	// Target - Lab target cost
  7945  	Target *int32 `json:"target,omitempty"`
  7946  	// CostThresholds - Cost thresholds.
  7947  	CostThresholds *[]CostThresholdProperties `json:"costThresholds,omitempty"`
  7948  	// CycleStartDateTime - Reporting cycle start date.
  7949  	CycleStartDateTime *date.Time `json:"cycleStartDateTime,omitempty"`
  7950  	// CycleEndDateTime - Reporting cycle end date.
  7951  	CycleEndDateTime *date.Time `json:"cycleEndDateTime,omitempty"`
  7952  	// CycleType - Reporting cycle type. Possible values include: 'CalendarMonth', 'Custom'
  7953  	CycleType ReportingCycleType `json:"cycleType,omitempty"`
  7954  }
  7955  
  7956  // User profile of a lab user.
  7957  type User struct {
  7958  	autorest.Response `json:"-"`
  7959  	// UserProperties - The properties of the resource.
  7960  	*UserProperties `json:"properties,omitempty"`
  7961  	// ID - READ-ONLY; The identifier of the resource.
  7962  	ID *string `json:"id,omitempty"`
  7963  	// Name - READ-ONLY; The name of the resource.
  7964  	Name *string `json:"name,omitempty"`
  7965  	// Type - READ-ONLY; The type of the resource.
  7966  	Type *string `json:"type,omitempty"`
  7967  	// Location - The location of the resource.
  7968  	Location *string `json:"location,omitempty"`
  7969  	// Tags - The tags of the resource.
  7970  	Tags map[string]*string `json:"tags"`
  7971  }
  7972  
  7973  // MarshalJSON is the custom marshaler for User.
  7974  func (u User) MarshalJSON() ([]byte, error) {
  7975  	objectMap := make(map[string]interface{})
  7976  	if u.UserProperties != nil {
  7977  		objectMap["properties"] = u.UserProperties
  7978  	}
  7979  	if u.Location != nil {
  7980  		objectMap["location"] = u.Location
  7981  	}
  7982  	if u.Tags != nil {
  7983  		objectMap["tags"] = u.Tags
  7984  	}
  7985  	return json.Marshal(objectMap)
  7986  }
  7987  
  7988  // UnmarshalJSON is the custom unmarshaler for User struct.
  7989  func (u *User) UnmarshalJSON(body []byte) error {
  7990  	var m map[string]*json.RawMessage
  7991  	err := json.Unmarshal(body, &m)
  7992  	if err != nil {
  7993  		return err
  7994  	}
  7995  	for k, v := range m {
  7996  		switch k {
  7997  		case "properties":
  7998  			if v != nil {
  7999  				var userProperties UserProperties
  8000  				err = json.Unmarshal(*v, &userProperties)
  8001  				if err != nil {
  8002  					return err
  8003  				}
  8004  				u.UserProperties = &userProperties
  8005  			}
  8006  		case "id":
  8007  			if v != nil {
  8008  				var ID string
  8009  				err = json.Unmarshal(*v, &ID)
  8010  				if err != nil {
  8011  					return err
  8012  				}
  8013  				u.ID = &ID
  8014  			}
  8015  		case "name":
  8016  			if v != nil {
  8017  				var name string
  8018  				err = json.Unmarshal(*v, &name)
  8019  				if err != nil {
  8020  					return err
  8021  				}
  8022  				u.Name = &name
  8023  			}
  8024  		case "type":
  8025  			if v != nil {
  8026  				var typeVar string
  8027  				err = json.Unmarshal(*v, &typeVar)
  8028  				if err != nil {
  8029  					return err
  8030  				}
  8031  				u.Type = &typeVar
  8032  			}
  8033  		case "location":
  8034  			if v != nil {
  8035  				var location string
  8036  				err = json.Unmarshal(*v, &location)
  8037  				if err != nil {
  8038  					return err
  8039  				}
  8040  				u.Location = &location
  8041  			}
  8042  		case "tags":
  8043  			if v != nil {
  8044  				var tags map[string]*string
  8045  				err = json.Unmarshal(*v, &tags)
  8046  				if err != nil {
  8047  					return err
  8048  				}
  8049  				u.Tags = tags
  8050  			}
  8051  		}
  8052  	}
  8053  
  8054  	return nil
  8055  }
  8056  
  8057  // UserFragment profile of a lab user.
  8058  type UserFragment struct {
  8059  	// UserPropertiesFragment - The properties of the resource.
  8060  	*UserPropertiesFragment `json:"properties,omitempty"`
  8061  	// ID - READ-ONLY; The identifier of the resource.
  8062  	ID *string `json:"id,omitempty"`
  8063  	// Name - READ-ONLY; The name of the resource.
  8064  	Name *string `json:"name,omitempty"`
  8065  	// Type - READ-ONLY; The type of the resource.
  8066  	Type *string `json:"type,omitempty"`
  8067  	// Location - The location of the resource.
  8068  	Location *string `json:"location,omitempty"`
  8069  	// Tags - The tags of the resource.
  8070  	Tags map[string]*string `json:"tags"`
  8071  }
  8072  
  8073  // MarshalJSON is the custom marshaler for UserFragment.
  8074  func (uf UserFragment) MarshalJSON() ([]byte, error) {
  8075  	objectMap := make(map[string]interface{})
  8076  	if uf.UserPropertiesFragment != nil {
  8077  		objectMap["properties"] = uf.UserPropertiesFragment
  8078  	}
  8079  	if uf.Location != nil {
  8080  		objectMap["location"] = uf.Location
  8081  	}
  8082  	if uf.Tags != nil {
  8083  		objectMap["tags"] = uf.Tags
  8084  	}
  8085  	return json.Marshal(objectMap)
  8086  }
  8087  
  8088  // UnmarshalJSON is the custom unmarshaler for UserFragment struct.
  8089  func (uf *UserFragment) UnmarshalJSON(body []byte) error {
  8090  	var m map[string]*json.RawMessage
  8091  	err := json.Unmarshal(body, &m)
  8092  	if err != nil {
  8093  		return err
  8094  	}
  8095  	for k, v := range m {
  8096  		switch k {
  8097  		case "properties":
  8098  			if v != nil {
  8099  				var userPropertiesFragment UserPropertiesFragment
  8100  				err = json.Unmarshal(*v, &userPropertiesFragment)
  8101  				if err != nil {
  8102  					return err
  8103  				}
  8104  				uf.UserPropertiesFragment = &userPropertiesFragment
  8105  			}
  8106  		case "id":
  8107  			if v != nil {
  8108  				var ID string
  8109  				err = json.Unmarshal(*v, &ID)
  8110  				if err != nil {
  8111  					return err
  8112  				}
  8113  				uf.ID = &ID
  8114  			}
  8115  		case "name":
  8116  			if v != nil {
  8117  				var name string
  8118  				err = json.Unmarshal(*v, &name)
  8119  				if err != nil {
  8120  					return err
  8121  				}
  8122  				uf.Name = &name
  8123  			}
  8124  		case "type":
  8125  			if v != nil {
  8126  				var typeVar string
  8127  				err = json.Unmarshal(*v, &typeVar)
  8128  				if err != nil {
  8129  					return err
  8130  				}
  8131  				uf.Type = &typeVar
  8132  			}
  8133  		case "location":
  8134  			if v != nil {
  8135  				var location string
  8136  				err = json.Unmarshal(*v, &location)
  8137  				if err != nil {
  8138  					return err
  8139  				}
  8140  				uf.Location = &location
  8141  			}
  8142  		case "tags":
  8143  			if v != nil {
  8144  				var tags map[string]*string
  8145  				err = json.Unmarshal(*v, &tags)
  8146  				if err != nil {
  8147  					return err
  8148  				}
  8149  				uf.Tags = tags
  8150  			}
  8151  		}
  8152  	}
  8153  
  8154  	return nil
  8155  }
  8156  
  8157  // UserIdentity identity attributes of a lab user.
  8158  type UserIdentity struct {
  8159  	// PrincipalName - Set to the principal name / UPN of the client JWT making the request.
  8160  	PrincipalName *string `json:"principalName,omitempty"`
  8161  	// PrincipalID - Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
  8162  	PrincipalID *string `json:"principalId,omitempty"`
  8163  	// TenantID - Set to the tenant ID of the client JWT making the request.
  8164  	TenantID *string `json:"tenantId,omitempty"`
  8165  	// ObjectID - Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
  8166  	ObjectID *string `json:"objectId,omitempty"`
  8167  	// AppID - Set to the app Id of the client JWT making the request.
  8168  	AppID *string `json:"appId,omitempty"`
  8169  }
  8170  
  8171  // UserIdentityFragment identity attributes of a lab user.
  8172  type UserIdentityFragment struct {
  8173  	// PrincipalName - Set to the principal name / UPN of the client JWT making the request.
  8174  	PrincipalName *string `json:"principalName,omitempty"`
  8175  	// PrincipalID - Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
  8176  	PrincipalID *string `json:"principalId,omitempty"`
  8177  	// TenantID - Set to the tenant ID of the client JWT making the request.
  8178  	TenantID *string `json:"tenantId,omitempty"`
  8179  	// ObjectID - Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
  8180  	ObjectID *string `json:"objectId,omitempty"`
  8181  	// AppID - Set to the app Id of the client JWT making the request.
  8182  	AppID *string `json:"appId,omitempty"`
  8183  }
  8184  
  8185  // UserProperties properties of a lab user profile.
  8186  type UserProperties struct {
  8187  	// Identity - The identity of the user.
  8188  	Identity *UserIdentity `json:"identity,omitempty"`
  8189  	// SecretStore - The secret store of the user.
  8190  	SecretStore *UserSecretStore `json:"secretStore,omitempty"`
  8191  	// CreatedDate - READ-ONLY; The creation date of the user profile.
  8192  	CreatedDate *date.Time `json:"createdDate,omitempty"`
  8193  	// ProvisioningState - The provisioning status of the resource.
  8194  	ProvisioningState *string `json:"provisioningState,omitempty"`
  8195  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  8196  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  8197  }
  8198  
  8199  // MarshalJSON is the custom marshaler for UserProperties.
  8200  func (up UserProperties) MarshalJSON() ([]byte, error) {
  8201  	objectMap := make(map[string]interface{})
  8202  	if up.Identity != nil {
  8203  		objectMap["identity"] = up.Identity
  8204  	}
  8205  	if up.SecretStore != nil {
  8206  		objectMap["secretStore"] = up.SecretStore
  8207  	}
  8208  	if up.ProvisioningState != nil {
  8209  		objectMap["provisioningState"] = up.ProvisioningState
  8210  	}
  8211  	if up.UniqueIdentifier != nil {
  8212  		objectMap["uniqueIdentifier"] = up.UniqueIdentifier
  8213  	}
  8214  	return json.Marshal(objectMap)
  8215  }
  8216  
  8217  // UserPropertiesFragment properties of a lab user profile.
  8218  type UserPropertiesFragment struct {
  8219  	// Identity - The identity of the user.
  8220  	Identity *UserIdentityFragment `json:"identity,omitempty"`
  8221  	// SecretStore - The secret store of the user.
  8222  	SecretStore *UserSecretStoreFragment `json:"secretStore,omitempty"`
  8223  	// ProvisioningState - The provisioning status of the resource.
  8224  	ProvisioningState *string `json:"provisioningState,omitempty"`
  8225  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  8226  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  8227  }
  8228  
  8229  // UsersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
  8230  type UsersDeleteFuture struct {
  8231  	azure.FutureAPI
  8232  	// Result returns the result of the asynchronous operation.
  8233  	// If the operation has not completed it will return an error.
  8234  	Result func(UsersClient) (autorest.Response, error)
  8235  }
  8236  
  8237  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8238  func (future *UsersDeleteFuture) UnmarshalJSON(body []byte) error {
  8239  	var azFuture azure.Future
  8240  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8241  		return err
  8242  	}
  8243  	future.FutureAPI = &azFuture
  8244  	future.Result = future.result
  8245  	return nil
  8246  }
  8247  
  8248  // result is the default implementation for UsersDeleteFuture.Result.
  8249  func (future *UsersDeleteFuture) result(client UsersClient) (ar autorest.Response, err error) {
  8250  	var done bool
  8251  	done, err = future.DoneWithContext(context.Background(), client)
  8252  	if err != nil {
  8253  		err = autorest.NewErrorWithError(err, "dtl.UsersDeleteFuture", "Result", future.Response(), "Polling failure")
  8254  		return
  8255  	}
  8256  	if !done {
  8257  		ar.Response = future.Response()
  8258  		err = azure.NewAsyncOpIncompleteError("dtl.UsersDeleteFuture")
  8259  		return
  8260  	}
  8261  	ar.Response = future.Response()
  8262  	return
  8263  }
  8264  
  8265  // UserSecretStore properties of a user's secret store.
  8266  type UserSecretStore struct {
  8267  	// KeyVaultURI - The URI of the user's Key vault.
  8268  	KeyVaultURI *string `json:"keyVaultUri,omitempty"`
  8269  	// KeyVaultID - The ID of the user's Key vault.
  8270  	KeyVaultID *string `json:"keyVaultId,omitempty"`
  8271  }
  8272  
  8273  // UserSecretStoreFragment properties of a user's secret store.
  8274  type UserSecretStoreFragment struct {
  8275  	// KeyVaultURI - The URI of the user's Key vault.
  8276  	KeyVaultURI *string `json:"keyVaultUri,omitempty"`
  8277  	// KeyVaultID - The ID of the user's Key vault.
  8278  	KeyVaultID *string `json:"keyVaultId,omitempty"`
  8279  }
  8280  
  8281  // VirtualMachinesAddDataDiskFuture an abstraction for monitoring and retrieving the results of a
  8282  // long-running operation.
  8283  type VirtualMachinesAddDataDiskFuture struct {
  8284  	azure.FutureAPI
  8285  	// Result returns the result of the asynchronous operation.
  8286  	// If the operation has not completed it will return an error.
  8287  	Result func(VirtualMachinesClient) (autorest.Response, error)
  8288  }
  8289  
  8290  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8291  func (future *VirtualMachinesAddDataDiskFuture) UnmarshalJSON(body []byte) error {
  8292  	var azFuture azure.Future
  8293  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8294  		return err
  8295  	}
  8296  	future.FutureAPI = &azFuture
  8297  	future.Result = future.result
  8298  	return nil
  8299  }
  8300  
  8301  // result is the default implementation for VirtualMachinesAddDataDiskFuture.Result.
  8302  func (future *VirtualMachinesAddDataDiskFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
  8303  	var done bool
  8304  	done, err = future.DoneWithContext(context.Background(), client)
  8305  	if err != nil {
  8306  		err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesAddDataDiskFuture", "Result", future.Response(), "Polling failure")
  8307  		return
  8308  	}
  8309  	if !done {
  8310  		ar.Response = future.Response()
  8311  		err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesAddDataDiskFuture")
  8312  		return
  8313  	}
  8314  	ar.Response = future.Response()
  8315  	return
  8316  }
  8317  
  8318  // VirtualMachinesApplyArtifactsFuture an abstraction for monitoring and retrieving the results of a
  8319  // long-running operation.
  8320  type VirtualMachinesApplyArtifactsFuture struct {
  8321  	azure.FutureAPI
  8322  	// Result returns the result of the asynchronous operation.
  8323  	// If the operation has not completed it will return an error.
  8324  	Result func(VirtualMachinesClient) (autorest.Response, error)
  8325  }
  8326  
  8327  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8328  func (future *VirtualMachinesApplyArtifactsFuture) UnmarshalJSON(body []byte) error {
  8329  	var azFuture azure.Future
  8330  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8331  		return err
  8332  	}
  8333  	future.FutureAPI = &azFuture
  8334  	future.Result = future.result
  8335  	return nil
  8336  }
  8337  
  8338  // result is the default implementation for VirtualMachinesApplyArtifactsFuture.Result.
  8339  func (future *VirtualMachinesApplyArtifactsFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
  8340  	var done bool
  8341  	done, err = future.DoneWithContext(context.Background(), client)
  8342  	if err != nil {
  8343  		err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesApplyArtifactsFuture", "Result", future.Response(), "Polling failure")
  8344  		return
  8345  	}
  8346  	if !done {
  8347  		ar.Response = future.Response()
  8348  		err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesApplyArtifactsFuture")
  8349  		return
  8350  	}
  8351  	ar.Response = future.Response()
  8352  	return
  8353  }
  8354  
  8355  // VirtualMachineSchedulesExecuteFuture an abstraction for monitoring and retrieving the results of a
  8356  // long-running operation.
  8357  type VirtualMachineSchedulesExecuteFuture struct {
  8358  	azure.FutureAPI
  8359  	// Result returns the result of the asynchronous operation.
  8360  	// If the operation has not completed it will return an error.
  8361  	Result func(VirtualMachineSchedulesClient) (autorest.Response, error)
  8362  }
  8363  
  8364  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8365  func (future *VirtualMachineSchedulesExecuteFuture) UnmarshalJSON(body []byte) error {
  8366  	var azFuture azure.Future
  8367  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8368  		return err
  8369  	}
  8370  	future.FutureAPI = &azFuture
  8371  	future.Result = future.result
  8372  	return nil
  8373  }
  8374  
  8375  // result is the default implementation for VirtualMachineSchedulesExecuteFuture.Result.
  8376  func (future *VirtualMachineSchedulesExecuteFuture) result(client VirtualMachineSchedulesClient) (ar autorest.Response, err error) {
  8377  	var done bool
  8378  	done, err = future.DoneWithContext(context.Background(), client)
  8379  	if err != nil {
  8380  		err = autorest.NewErrorWithError(err, "dtl.VirtualMachineSchedulesExecuteFuture", "Result", future.Response(), "Polling failure")
  8381  		return
  8382  	}
  8383  	if !done {
  8384  		ar.Response = future.Response()
  8385  		err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachineSchedulesExecuteFuture")
  8386  		return
  8387  	}
  8388  	ar.Response = future.Response()
  8389  	return
  8390  }
  8391  
  8392  // VirtualMachinesClaimFuture an abstraction for monitoring and retrieving the results of a long-running
  8393  // operation.
  8394  type VirtualMachinesClaimFuture struct {
  8395  	azure.FutureAPI
  8396  	// Result returns the result of the asynchronous operation.
  8397  	// If the operation has not completed it will return an error.
  8398  	Result func(VirtualMachinesClient) (autorest.Response, error)
  8399  }
  8400  
  8401  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8402  func (future *VirtualMachinesClaimFuture) UnmarshalJSON(body []byte) error {
  8403  	var azFuture azure.Future
  8404  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8405  		return err
  8406  	}
  8407  	future.FutureAPI = &azFuture
  8408  	future.Result = future.result
  8409  	return nil
  8410  }
  8411  
  8412  // result is the default implementation for VirtualMachinesClaimFuture.Result.
  8413  func (future *VirtualMachinesClaimFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
  8414  	var done bool
  8415  	done, err = future.DoneWithContext(context.Background(), client)
  8416  	if err != nil {
  8417  		err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClaimFuture", "Result", future.Response(), "Polling failure")
  8418  		return
  8419  	}
  8420  	if !done {
  8421  		ar.Response = future.Response()
  8422  		err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesClaimFuture")
  8423  		return
  8424  	}
  8425  	ar.Response = future.Response()
  8426  	return
  8427  }
  8428  
  8429  // VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  8430  // long-running operation.
  8431  type VirtualMachinesCreateOrUpdateFuture struct {
  8432  	azure.FutureAPI
  8433  	// Result returns the result of the asynchronous operation.
  8434  	// If the operation has not completed it will return an error.
  8435  	Result func(VirtualMachinesClient) (LabVirtualMachine, error)
  8436  }
  8437  
  8438  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8439  func (future *VirtualMachinesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  8440  	var azFuture azure.Future
  8441  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8442  		return err
  8443  	}
  8444  	future.FutureAPI = &azFuture
  8445  	future.Result = future.result
  8446  	return nil
  8447  }
  8448  
  8449  // result is the default implementation for VirtualMachinesCreateOrUpdateFuture.Result.
  8450  func (future *VirtualMachinesCreateOrUpdateFuture) result(client VirtualMachinesClient) (lvm LabVirtualMachine, err error) {
  8451  	var done bool
  8452  	done, err = future.DoneWithContext(context.Background(), client)
  8453  	if err != nil {
  8454  		err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  8455  		return
  8456  	}
  8457  	if !done {
  8458  		lvm.Response.Response = future.Response()
  8459  		err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesCreateOrUpdateFuture")
  8460  		return
  8461  	}
  8462  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8463  	if lvm.Response.Response, err = future.GetResult(sender); err == nil && lvm.Response.Response.StatusCode != http.StatusNoContent {
  8464  		lvm, err = client.CreateOrUpdateResponder(lvm.Response.Response)
  8465  		if err != nil {
  8466  			err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesCreateOrUpdateFuture", "Result", lvm.Response.Response, "Failure responding to request")
  8467  		}
  8468  	}
  8469  	return
  8470  }
  8471  
  8472  // VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  8473  // operation.
  8474  type VirtualMachinesDeleteFuture struct {
  8475  	azure.FutureAPI
  8476  	// Result returns the result of the asynchronous operation.
  8477  	// If the operation has not completed it will return an error.
  8478  	Result func(VirtualMachinesClient) (autorest.Response, error)
  8479  }
  8480  
  8481  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8482  func (future *VirtualMachinesDeleteFuture) UnmarshalJSON(body []byte) error {
  8483  	var azFuture azure.Future
  8484  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8485  		return err
  8486  	}
  8487  	future.FutureAPI = &azFuture
  8488  	future.Result = future.result
  8489  	return nil
  8490  }
  8491  
  8492  // result is the default implementation for VirtualMachinesDeleteFuture.Result.
  8493  func (future *VirtualMachinesDeleteFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
  8494  	var done bool
  8495  	done, err = future.DoneWithContext(context.Background(), client)
  8496  	if err != nil {
  8497  		err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesDeleteFuture", "Result", future.Response(), "Polling failure")
  8498  		return
  8499  	}
  8500  	if !done {
  8501  		ar.Response = future.Response()
  8502  		err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesDeleteFuture")
  8503  		return
  8504  	}
  8505  	ar.Response = future.Response()
  8506  	return
  8507  }
  8508  
  8509  // VirtualMachinesDetachDataDiskFuture an abstraction for monitoring and retrieving the results of a
  8510  // long-running operation.
  8511  type VirtualMachinesDetachDataDiskFuture struct {
  8512  	azure.FutureAPI
  8513  	// Result returns the result of the asynchronous operation.
  8514  	// If the operation has not completed it will return an error.
  8515  	Result func(VirtualMachinesClient) (autorest.Response, error)
  8516  }
  8517  
  8518  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8519  func (future *VirtualMachinesDetachDataDiskFuture) UnmarshalJSON(body []byte) error {
  8520  	var azFuture azure.Future
  8521  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8522  		return err
  8523  	}
  8524  	future.FutureAPI = &azFuture
  8525  	future.Result = future.result
  8526  	return nil
  8527  }
  8528  
  8529  // result is the default implementation for VirtualMachinesDetachDataDiskFuture.Result.
  8530  func (future *VirtualMachinesDetachDataDiskFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
  8531  	var done bool
  8532  	done, err = future.DoneWithContext(context.Background(), client)
  8533  	if err != nil {
  8534  		err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesDetachDataDiskFuture", "Result", future.Response(), "Polling failure")
  8535  		return
  8536  	}
  8537  	if !done {
  8538  		ar.Response = future.Response()
  8539  		err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesDetachDataDiskFuture")
  8540  		return
  8541  	}
  8542  	ar.Response = future.Response()
  8543  	return
  8544  }
  8545  
  8546  // VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running
  8547  // operation.
  8548  type VirtualMachinesStartFuture struct {
  8549  	azure.FutureAPI
  8550  	// Result returns the result of the asynchronous operation.
  8551  	// If the operation has not completed it will return an error.
  8552  	Result func(VirtualMachinesClient) (autorest.Response, error)
  8553  }
  8554  
  8555  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8556  func (future *VirtualMachinesStartFuture) UnmarshalJSON(body []byte) error {
  8557  	var azFuture azure.Future
  8558  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8559  		return err
  8560  	}
  8561  	future.FutureAPI = &azFuture
  8562  	future.Result = future.result
  8563  	return nil
  8564  }
  8565  
  8566  // result is the default implementation for VirtualMachinesStartFuture.Result.
  8567  func (future *VirtualMachinesStartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
  8568  	var done bool
  8569  	done, err = future.DoneWithContext(context.Background(), client)
  8570  	if err != nil {
  8571  		err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesStartFuture", "Result", future.Response(), "Polling failure")
  8572  		return
  8573  	}
  8574  	if !done {
  8575  		ar.Response = future.Response()
  8576  		err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesStartFuture")
  8577  		return
  8578  	}
  8579  	ar.Response = future.Response()
  8580  	return
  8581  }
  8582  
  8583  // VirtualMachinesStopFuture an abstraction for monitoring and retrieving the results of a long-running
  8584  // operation.
  8585  type VirtualMachinesStopFuture struct {
  8586  	azure.FutureAPI
  8587  	// Result returns the result of the asynchronous operation.
  8588  	// If the operation has not completed it will return an error.
  8589  	Result func(VirtualMachinesClient) (autorest.Response, error)
  8590  }
  8591  
  8592  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8593  func (future *VirtualMachinesStopFuture) UnmarshalJSON(body []byte) error {
  8594  	var azFuture azure.Future
  8595  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8596  		return err
  8597  	}
  8598  	future.FutureAPI = &azFuture
  8599  	future.Result = future.result
  8600  	return nil
  8601  }
  8602  
  8603  // result is the default implementation for VirtualMachinesStopFuture.Result.
  8604  func (future *VirtualMachinesStopFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
  8605  	var done bool
  8606  	done, err = future.DoneWithContext(context.Background(), client)
  8607  	if err != nil {
  8608  		err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesStopFuture", "Result", future.Response(), "Polling failure")
  8609  		return
  8610  	}
  8611  	if !done {
  8612  		ar.Response = future.Response()
  8613  		err = azure.NewAsyncOpIncompleteError("dtl.VirtualMachinesStopFuture")
  8614  		return
  8615  	}
  8616  	ar.Response = future.Response()
  8617  	return
  8618  }
  8619  
  8620  // VirtualNetwork a virtual network.
  8621  type VirtualNetwork struct {
  8622  	autorest.Response `json:"-"`
  8623  	// VirtualNetworkProperties - The properties of the resource.
  8624  	*VirtualNetworkProperties `json:"properties,omitempty"`
  8625  	// ID - READ-ONLY; The identifier of the resource.
  8626  	ID *string `json:"id,omitempty"`
  8627  	// Name - READ-ONLY; The name of the resource.
  8628  	Name *string `json:"name,omitempty"`
  8629  	// Type - READ-ONLY; The type of the resource.
  8630  	Type *string `json:"type,omitempty"`
  8631  	// Location - The location of the resource.
  8632  	Location *string `json:"location,omitempty"`
  8633  	// Tags - The tags of the resource.
  8634  	Tags map[string]*string `json:"tags"`
  8635  }
  8636  
  8637  // MarshalJSON is the custom marshaler for VirtualNetwork.
  8638  func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
  8639  	objectMap := make(map[string]interface{})
  8640  	if vn.VirtualNetworkProperties != nil {
  8641  		objectMap["properties"] = vn.VirtualNetworkProperties
  8642  	}
  8643  	if vn.Location != nil {
  8644  		objectMap["location"] = vn.Location
  8645  	}
  8646  	if vn.Tags != nil {
  8647  		objectMap["tags"] = vn.Tags
  8648  	}
  8649  	return json.Marshal(objectMap)
  8650  }
  8651  
  8652  // UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
  8653  func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
  8654  	var m map[string]*json.RawMessage
  8655  	err := json.Unmarshal(body, &m)
  8656  	if err != nil {
  8657  		return err
  8658  	}
  8659  	for k, v := range m {
  8660  		switch k {
  8661  		case "properties":
  8662  			if v != nil {
  8663  				var virtualNetworkProperties VirtualNetworkProperties
  8664  				err = json.Unmarshal(*v, &virtualNetworkProperties)
  8665  				if err != nil {
  8666  					return err
  8667  				}
  8668  				vn.VirtualNetworkProperties = &virtualNetworkProperties
  8669  			}
  8670  		case "id":
  8671  			if v != nil {
  8672  				var ID string
  8673  				err = json.Unmarshal(*v, &ID)
  8674  				if err != nil {
  8675  					return err
  8676  				}
  8677  				vn.ID = &ID
  8678  			}
  8679  		case "name":
  8680  			if v != nil {
  8681  				var name string
  8682  				err = json.Unmarshal(*v, &name)
  8683  				if err != nil {
  8684  					return err
  8685  				}
  8686  				vn.Name = &name
  8687  			}
  8688  		case "type":
  8689  			if v != nil {
  8690  				var typeVar string
  8691  				err = json.Unmarshal(*v, &typeVar)
  8692  				if err != nil {
  8693  					return err
  8694  				}
  8695  				vn.Type = &typeVar
  8696  			}
  8697  		case "location":
  8698  			if v != nil {
  8699  				var location string
  8700  				err = json.Unmarshal(*v, &location)
  8701  				if err != nil {
  8702  					return err
  8703  				}
  8704  				vn.Location = &location
  8705  			}
  8706  		case "tags":
  8707  			if v != nil {
  8708  				var tags map[string]*string
  8709  				err = json.Unmarshal(*v, &tags)
  8710  				if err != nil {
  8711  					return err
  8712  				}
  8713  				vn.Tags = tags
  8714  			}
  8715  		}
  8716  	}
  8717  
  8718  	return nil
  8719  }
  8720  
  8721  // VirtualNetworkFragment a virtual network.
  8722  type VirtualNetworkFragment struct {
  8723  	// VirtualNetworkPropertiesFragment - The properties of the resource.
  8724  	*VirtualNetworkPropertiesFragment `json:"properties,omitempty"`
  8725  	// ID - READ-ONLY; The identifier of the resource.
  8726  	ID *string `json:"id,omitempty"`
  8727  	// Name - READ-ONLY; The name of the resource.
  8728  	Name *string `json:"name,omitempty"`
  8729  	// Type - READ-ONLY; The type of the resource.
  8730  	Type *string `json:"type,omitempty"`
  8731  	// Location - The location of the resource.
  8732  	Location *string `json:"location,omitempty"`
  8733  	// Tags - The tags of the resource.
  8734  	Tags map[string]*string `json:"tags"`
  8735  }
  8736  
  8737  // MarshalJSON is the custom marshaler for VirtualNetworkFragment.
  8738  func (vnf VirtualNetworkFragment) MarshalJSON() ([]byte, error) {
  8739  	objectMap := make(map[string]interface{})
  8740  	if vnf.VirtualNetworkPropertiesFragment != nil {
  8741  		objectMap["properties"] = vnf.VirtualNetworkPropertiesFragment
  8742  	}
  8743  	if vnf.Location != nil {
  8744  		objectMap["location"] = vnf.Location
  8745  	}
  8746  	if vnf.Tags != nil {
  8747  		objectMap["tags"] = vnf.Tags
  8748  	}
  8749  	return json.Marshal(objectMap)
  8750  }
  8751  
  8752  // UnmarshalJSON is the custom unmarshaler for VirtualNetworkFragment struct.
  8753  func (vnf *VirtualNetworkFragment) UnmarshalJSON(body []byte) error {
  8754  	var m map[string]*json.RawMessage
  8755  	err := json.Unmarshal(body, &m)
  8756  	if err != nil {
  8757  		return err
  8758  	}
  8759  	for k, v := range m {
  8760  		switch k {
  8761  		case "properties":
  8762  			if v != nil {
  8763  				var virtualNetworkPropertiesFragment VirtualNetworkPropertiesFragment
  8764  				err = json.Unmarshal(*v, &virtualNetworkPropertiesFragment)
  8765  				if err != nil {
  8766  					return err
  8767  				}
  8768  				vnf.VirtualNetworkPropertiesFragment = &virtualNetworkPropertiesFragment
  8769  			}
  8770  		case "id":
  8771  			if v != nil {
  8772  				var ID string
  8773  				err = json.Unmarshal(*v, &ID)
  8774  				if err != nil {
  8775  					return err
  8776  				}
  8777  				vnf.ID = &ID
  8778  			}
  8779  		case "name":
  8780  			if v != nil {
  8781  				var name string
  8782  				err = json.Unmarshal(*v, &name)
  8783  				if err != nil {
  8784  					return err
  8785  				}
  8786  				vnf.Name = &name
  8787  			}
  8788  		case "type":
  8789  			if v != nil {
  8790  				var typeVar string
  8791  				err = json.Unmarshal(*v, &typeVar)
  8792  				if err != nil {
  8793  					return err
  8794  				}
  8795  				vnf.Type = &typeVar
  8796  			}
  8797  		case "location":
  8798  			if v != nil {
  8799  				var location string
  8800  				err = json.Unmarshal(*v, &location)
  8801  				if err != nil {
  8802  					return err
  8803  				}
  8804  				vnf.Location = &location
  8805  			}
  8806  		case "tags":
  8807  			if v != nil {
  8808  				var tags map[string]*string
  8809  				err = json.Unmarshal(*v, &tags)
  8810  				if err != nil {
  8811  					return err
  8812  				}
  8813  				vnf.Tags = tags
  8814  			}
  8815  		}
  8816  	}
  8817  
  8818  	return nil
  8819  }
  8820  
  8821  // VirtualNetworkProperties properties of a virtual network.
  8822  type VirtualNetworkProperties struct {
  8823  	// AllowedSubnets - The allowed subnets of the virtual network.
  8824  	AllowedSubnets *[]Subnet `json:"allowedSubnets,omitempty"`
  8825  	// Description - The description of the virtual network.
  8826  	Description *string `json:"description,omitempty"`
  8827  	// ExternalProviderResourceID - The Microsoft.Network resource identifier of the virtual network.
  8828  	ExternalProviderResourceID *string `json:"externalProviderResourceId,omitempty"`
  8829  	// ExternalSubnets - The external subnet properties.
  8830  	ExternalSubnets *[]ExternalSubnet `json:"externalSubnets,omitempty"`
  8831  	// SubnetOverrides - The subnet overrides of the virtual network.
  8832  	SubnetOverrides *[]SubnetOverride `json:"subnetOverrides,omitempty"`
  8833  	// CreatedDate - READ-ONLY; The creation date of the virtual network.
  8834  	CreatedDate *date.Time `json:"createdDate,omitempty"`
  8835  	// ProvisioningState - The provisioning status of the resource.
  8836  	ProvisioningState *string `json:"provisioningState,omitempty"`
  8837  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  8838  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  8839  }
  8840  
  8841  // MarshalJSON is the custom marshaler for VirtualNetworkProperties.
  8842  func (vnp VirtualNetworkProperties) MarshalJSON() ([]byte, error) {
  8843  	objectMap := make(map[string]interface{})
  8844  	if vnp.AllowedSubnets != nil {
  8845  		objectMap["allowedSubnets"] = vnp.AllowedSubnets
  8846  	}
  8847  	if vnp.Description != nil {
  8848  		objectMap["description"] = vnp.Description
  8849  	}
  8850  	if vnp.ExternalProviderResourceID != nil {
  8851  		objectMap["externalProviderResourceId"] = vnp.ExternalProviderResourceID
  8852  	}
  8853  	if vnp.ExternalSubnets != nil {
  8854  		objectMap["externalSubnets"] = vnp.ExternalSubnets
  8855  	}
  8856  	if vnp.SubnetOverrides != nil {
  8857  		objectMap["subnetOverrides"] = vnp.SubnetOverrides
  8858  	}
  8859  	if vnp.ProvisioningState != nil {
  8860  		objectMap["provisioningState"] = vnp.ProvisioningState
  8861  	}
  8862  	if vnp.UniqueIdentifier != nil {
  8863  		objectMap["uniqueIdentifier"] = vnp.UniqueIdentifier
  8864  	}
  8865  	return json.Marshal(objectMap)
  8866  }
  8867  
  8868  // VirtualNetworkPropertiesFragment properties of a virtual network.
  8869  type VirtualNetworkPropertiesFragment struct {
  8870  	// AllowedSubnets - The allowed subnets of the virtual network.
  8871  	AllowedSubnets *[]SubnetFragment `json:"allowedSubnets,omitempty"`
  8872  	// Description - The description of the virtual network.
  8873  	Description *string `json:"description,omitempty"`
  8874  	// ExternalProviderResourceID - The Microsoft.Network resource identifier of the virtual network.
  8875  	ExternalProviderResourceID *string `json:"externalProviderResourceId,omitempty"`
  8876  	// ExternalSubnets - The external subnet properties.
  8877  	ExternalSubnets *[]ExternalSubnetFragment `json:"externalSubnets,omitempty"`
  8878  	// SubnetOverrides - The subnet overrides of the virtual network.
  8879  	SubnetOverrides *[]SubnetOverrideFragment `json:"subnetOverrides,omitempty"`
  8880  	// ProvisioningState - The provisioning status of the resource.
  8881  	ProvisioningState *string `json:"provisioningState,omitempty"`
  8882  	// UniqueIdentifier - The unique immutable identifier of a resource (Guid).
  8883  	UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
  8884  }
  8885  
  8886  // VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
  8887  // long-running operation.
  8888  type VirtualNetworksCreateOrUpdateFuture struct {
  8889  	azure.FutureAPI
  8890  	// Result returns the result of the asynchronous operation.
  8891  	// If the operation has not completed it will return an error.
  8892  	Result func(VirtualNetworksClient) (VirtualNetwork, error)
  8893  }
  8894  
  8895  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8896  func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
  8897  	var azFuture azure.Future
  8898  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8899  		return err
  8900  	}
  8901  	future.FutureAPI = &azFuture
  8902  	future.Result = future.result
  8903  	return nil
  8904  }
  8905  
  8906  // result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
  8907  func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
  8908  	var done bool
  8909  	done, err = future.DoneWithContext(context.Background(), client)
  8910  	if err != nil {
  8911  		err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
  8912  		return
  8913  	}
  8914  	if !done {
  8915  		vn.Response.Response = future.Response()
  8916  		err = azure.NewAsyncOpIncompleteError("dtl.VirtualNetworksCreateOrUpdateFuture")
  8917  		return
  8918  	}
  8919  	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8920  	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
  8921  		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
  8922  		if err != nil {
  8923  			err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
  8924  		}
  8925  	}
  8926  	return
  8927  }
  8928  
  8929  // VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
  8930  // operation.
  8931  type VirtualNetworksDeleteFuture struct {
  8932  	azure.FutureAPI
  8933  	// Result returns the result of the asynchronous operation.
  8934  	// If the operation has not completed it will return an error.
  8935  	Result func(VirtualNetworksClient) (autorest.Response, error)
  8936  }
  8937  
  8938  // UnmarshalJSON is the custom unmarshaller for CreateFuture.
  8939  func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
  8940  	var azFuture azure.Future
  8941  	if err := json.Unmarshal(body, &azFuture); err != nil {
  8942  		return err
  8943  	}
  8944  	future.FutureAPI = &azFuture
  8945  	future.Result = future.result
  8946  	return nil
  8947  }
  8948  
  8949  // result is the default implementation for VirtualNetworksDeleteFuture.Result.
  8950  func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
  8951  	var done bool
  8952  	done, err = future.DoneWithContext(context.Background(), client)
  8953  	if err != nil {
  8954  		err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
  8955  		return
  8956  	}
  8957  	if !done {
  8958  		ar.Response = future.Response()
  8959  		err = azure.NewAsyncOpIncompleteError("dtl.VirtualNetworksDeleteFuture")
  8960  		return
  8961  	}
  8962  	ar.Response = future.Response()
  8963  	return
  8964  }
  8965  
  8966  // WeekDetails properties of a weekly schedule.
  8967  type WeekDetails struct {
  8968  	// Weekdays - The days of the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.).
  8969  	Weekdays *[]string `json:"weekdays,omitempty"`
  8970  	// Time - The time of the day the schedule will occur.
  8971  	Time *string `json:"time,omitempty"`
  8972  }
  8973  
  8974  // WeekDetailsFragment properties of a weekly schedule.
  8975  type WeekDetailsFragment struct {
  8976  	// Weekdays - The days of the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.).
  8977  	Weekdays *[]string `json:"weekdays,omitempty"`
  8978  	// Time - The time of the day the schedule will occur.
  8979  	Time *string `json:"time,omitempty"`
  8980  }
  8981  
  8982  // WindowsOsInfo information about a Windows OS.
  8983  type WindowsOsInfo struct {
  8984  	// WindowsOsState - The state of the Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied). Possible values include: 'NonSysprepped', 'SysprepRequested', 'SysprepApplied'
  8985  	WindowsOsState WindowsOsState `json:"windowsOsState,omitempty"`
  8986  }
  8987  

View as plain text