...

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

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

View as plain text