...

Source file src/github.com/Azure/azure-sdk-for-go/services/preview/migrate/mgmt/2018-09-01-preview/migrate/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/preview/migrate/mgmt/2018-09-01-preview/migrate

     1  package migrate
     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  	"encoding/json"
    11  	"github.com/Azure/go-autorest/autorest"
    12  	"github.com/Azure/go-autorest/autorest/date"
    13  )
    14  
    15  // The package's fully qualified name.
    16  const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/migrate/mgmt/2018-09-01-preview/migrate"
    17  
    18  // ApplyClause ...
    19  type ApplyClause struct {
    20  	// Transformations - READ-ONLY
    21  	Transformations *[]TransformationNode `json:"transformations,omitempty"`
    22  }
    23  
    24  // MarshalJSON is the custom marshaler for ApplyClause.
    25  func (ac ApplyClause) MarshalJSON() ([]byte, error) {
    26  	objectMap := make(map[string]interface{})
    27  	return json.Marshal(objectMap)
    28  }
    29  
    30  // AssessmentDetails assessment properties that can be shared by various publishers.
    31  type AssessmentDetails struct {
    32  	// AssessmentID - Gets or sets the id of the assessment done on the machine.
    33  	AssessmentID *string `json:"assessmentId,omitempty"`
    34  	// TargetVMSize - Gets or sets the target VM size.
    35  	TargetVMSize *string `json:"targetVMSize,omitempty"`
    36  	// TargetVMLocation - Gets or sets the target VM location.
    37  	TargetVMLocation *string `json:"targetVMLocation,omitempty"`
    38  	// TargetStorageType - Gets or sets the target storage type.
    39  	TargetStorageType map[string]*string `json:"targetStorageType"`
    40  	// EnqueueTime - Gets or sets the time the message was enqueued.
    41  	EnqueueTime *string `json:"enqueueTime,omitempty"`
    42  	// SolutionName - Gets or sets the name of the solution that sent the data.
    43  	SolutionName *string `json:"solutionName,omitempty"`
    44  	// MachineID - Gets or sets the unique identifier of the machine.
    45  	MachineID *string `json:"machineId,omitempty"`
    46  	// MachineManagerID - Gets or sets the unique identifier of the virtual machine manager(vCenter/VMM).
    47  	MachineManagerID *string `json:"machineManagerId,omitempty"`
    48  	// FabricType - Gets or sets the fabric type.
    49  	FabricType *string `json:"fabricType,omitempty"`
    50  	// LastUpdatedTime - Gets or sets the time of the last modification of the machine details.
    51  	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
    52  	// MachineName - Gets or sets the name of the machine.
    53  	MachineName *string `json:"machineName,omitempty"`
    54  	// IPAddresses - Gets or sets the list of IP addresses of the machine. IP addresses could be IP V4 or IP V6.
    55  	IPAddresses *[]string `json:"ipAddresses,omitempty"`
    56  	// Fqdn - Gets or sets the FQDN of the machine.
    57  	Fqdn *string `json:"fqdn,omitempty"`
    58  	// BiosID - Gets or sets the BIOS ID of the machine.
    59  	BiosID *string `json:"biosId,omitempty"`
    60  	// MacAddresses - Gets or sets the list of MAC addresses of the machine.
    61  	MacAddresses *[]string `json:"macAddresses,omitempty"`
    62  	// ExtendedInfo - Gets or sets the ISV specific extended information.
    63  	ExtendedInfo map[string]*string `json:"extendedInfo"`
    64  }
    65  
    66  // MarshalJSON is the custom marshaler for AssessmentDetails.
    67  func (ad AssessmentDetails) MarshalJSON() ([]byte, error) {
    68  	objectMap := make(map[string]interface{})
    69  	if ad.AssessmentID != nil {
    70  		objectMap["assessmentId"] = ad.AssessmentID
    71  	}
    72  	if ad.TargetVMSize != nil {
    73  		objectMap["targetVMSize"] = ad.TargetVMSize
    74  	}
    75  	if ad.TargetVMLocation != nil {
    76  		objectMap["targetVMLocation"] = ad.TargetVMLocation
    77  	}
    78  	if ad.TargetStorageType != nil {
    79  		objectMap["targetStorageType"] = ad.TargetStorageType
    80  	}
    81  	if ad.EnqueueTime != nil {
    82  		objectMap["enqueueTime"] = ad.EnqueueTime
    83  	}
    84  	if ad.SolutionName != nil {
    85  		objectMap["solutionName"] = ad.SolutionName
    86  	}
    87  	if ad.MachineID != nil {
    88  		objectMap["machineId"] = ad.MachineID
    89  	}
    90  	if ad.MachineManagerID != nil {
    91  		objectMap["machineManagerId"] = ad.MachineManagerID
    92  	}
    93  	if ad.FabricType != nil {
    94  		objectMap["fabricType"] = ad.FabricType
    95  	}
    96  	if ad.LastUpdatedTime != nil {
    97  		objectMap["lastUpdatedTime"] = ad.LastUpdatedTime
    98  	}
    99  	if ad.MachineName != nil {
   100  		objectMap["machineName"] = ad.MachineName
   101  	}
   102  	if ad.IPAddresses != nil {
   103  		objectMap["ipAddresses"] = ad.IPAddresses
   104  	}
   105  	if ad.Fqdn != nil {
   106  		objectMap["fqdn"] = ad.Fqdn
   107  	}
   108  	if ad.BiosID != nil {
   109  		objectMap["biosId"] = ad.BiosID
   110  	}
   111  	if ad.MacAddresses != nil {
   112  		objectMap["macAddresses"] = ad.MacAddresses
   113  	}
   114  	if ad.ExtendedInfo != nil {
   115  		objectMap["extendedInfo"] = ad.ExtendedInfo
   116  	}
   117  	return json.Marshal(objectMap)
   118  }
   119  
   120  // Database database REST resource.
   121  type Database struct {
   122  	autorest.Response `json:"-"`
   123  	// ID - Gets or sets the relative URL to get to this REST resource.
   124  	ID *string `json:"id,omitempty"`
   125  	// Name - Gets or sets the name of this REST resource.
   126  	Name *string `json:"name,omitempty"`
   127  	// Type - READ-ONLY; Gets the type of this REST resource.
   128  	Type *string `json:"type,omitempty"`
   129  	// Properties - Gets or sets the properties of the database.
   130  	Properties *DatabaseProperties `json:"properties,omitempty"`
   131  }
   132  
   133  // MarshalJSON is the custom marshaler for Database.
   134  func (d Database) MarshalJSON() ([]byte, error) {
   135  	objectMap := make(map[string]interface{})
   136  	if d.ID != nil {
   137  		objectMap["id"] = d.ID
   138  	}
   139  	if d.Name != nil {
   140  		objectMap["name"] = d.Name
   141  	}
   142  	if d.Properties != nil {
   143  		objectMap["properties"] = d.Properties
   144  	}
   145  	return json.Marshal(objectMap)
   146  }
   147  
   148  // DatabaseAssessmentDetails assessment properties that can be shared by various publishers.
   149  type DatabaseAssessmentDetails struct {
   150  	// AssessmentID - Gets or sets the database assessment scope/Id.
   151  	AssessmentID *string `json:"assessmentId,omitempty"`
   152  	// MigrationBlockersCount - Gets or sets the number of blocking changes found.
   153  	MigrationBlockersCount *int32 `json:"migrationBlockersCount,omitempty"`
   154  	// BreakingChangesCount - Gets or sets the number of breaking changes found.
   155  	BreakingChangesCount *int32 `json:"breakingChangesCount,omitempty"`
   156  	// IsReadyForMigration - Gets or sets a value indicating whether the database is ready for migration.
   157  	IsReadyForMigration *bool `json:"isReadyForMigration,omitempty"`
   158  	// AssessmentTargetType - Gets or sets the assessed target database type.
   159  	AssessmentTargetType *string `json:"assessmentTargetType,omitempty"`
   160  	// LastAssessedTime - Gets or sets the time when the database was last assessed.
   161  	LastAssessedTime *date.Time `json:"lastAssessedTime,omitempty"`
   162  	// CompatibilityLevel - Gets or sets the compatibility level of the database.
   163  	CompatibilityLevel *string `json:"compatibilityLevel,omitempty"`
   164  	// DatabaseSizeInMB - Gets or sets the database size.
   165  	DatabaseSizeInMB *string `json:"databaseSizeInMB,omitempty"`
   166  	// LastUpdatedTime - Gets or sets the time of the last modification of the database details.
   167  	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
   168  	// EnqueueTime - Gets or sets the time the message was enqueued.
   169  	EnqueueTime *string `json:"enqueueTime,omitempty"`
   170  	// SolutionName - Gets or sets the name of the solution that sent the data.
   171  	SolutionName *string `json:"solutionName,omitempty"`
   172  	// InstanceID - Gets or sets the database server instance Id.
   173  	InstanceID *string `json:"instanceId,omitempty"`
   174  	// DatabaseName - Gets or sets the database name.
   175  	DatabaseName *string `json:"databaseName,omitempty"`
   176  	// ExtendedInfo - Gets or sets the extended properties of the database.
   177  	ExtendedInfo map[string]*string `json:"extendedInfo"`
   178  }
   179  
   180  // MarshalJSON is the custom marshaler for DatabaseAssessmentDetails.
   181  func (dad DatabaseAssessmentDetails) MarshalJSON() ([]byte, error) {
   182  	objectMap := make(map[string]interface{})
   183  	if dad.AssessmentID != nil {
   184  		objectMap["assessmentId"] = dad.AssessmentID
   185  	}
   186  	if dad.MigrationBlockersCount != nil {
   187  		objectMap["migrationBlockersCount"] = dad.MigrationBlockersCount
   188  	}
   189  	if dad.BreakingChangesCount != nil {
   190  		objectMap["breakingChangesCount"] = dad.BreakingChangesCount
   191  	}
   192  	if dad.IsReadyForMigration != nil {
   193  		objectMap["isReadyForMigration"] = dad.IsReadyForMigration
   194  	}
   195  	if dad.AssessmentTargetType != nil {
   196  		objectMap["assessmentTargetType"] = dad.AssessmentTargetType
   197  	}
   198  	if dad.LastAssessedTime != nil {
   199  		objectMap["lastAssessedTime"] = dad.LastAssessedTime
   200  	}
   201  	if dad.CompatibilityLevel != nil {
   202  		objectMap["compatibilityLevel"] = dad.CompatibilityLevel
   203  	}
   204  	if dad.DatabaseSizeInMB != nil {
   205  		objectMap["databaseSizeInMB"] = dad.DatabaseSizeInMB
   206  	}
   207  	if dad.LastUpdatedTime != nil {
   208  		objectMap["lastUpdatedTime"] = dad.LastUpdatedTime
   209  	}
   210  	if dad.EnqueueTime != nil {
   211  		objectMap["enqueueTime"] = dad.EnqueueTime
   212  	}
   213  	if dad.SolutionName != nil {
   214  		objectMap["solutionName"] = dad.SolutionName
   215  	}
   216  	if dad.InstanceID != nil {
   217  		objectMap["instanceId"] = dad.InstanceID
   218  	}
   219  	if dad.DatabaseName != nil {
   220  		objectMap["databaseName"] = dad.DatabaseName
   221  	}
   222  	if dad.ExtendedInfo != nil {
   223  		objectMap["extendedInfo"] = dad.ExtendedInfo
   224  	}
   225  	return json.Marshal(objectMap)
   226  }
   227  
   228  // DatabaseCollection collection of databases.
   229  type DatabaseCollection struct {
   230  	autorest.Response `json:"-"`
   231  	// Value - Gets or sets the databases.
   232  	Value *[]Database `json:"value,omitempty"`
   233  	// NextLink - Gets or sets the value of nextLink.
   234  	NextLink *string `json:"nextLink,omitempty"`
   235  }
   236  
   237  // DatabaseInstance databaseInstance REST resource.
   238  type DatabaseInstance struct {
   239  	autorest.Response `json:"-"`
   240  	// ID - Gets or sets the relative URL to get to this REST resource.
   241  	ID *string `json:"id,omitempty"`
   242  	// Name - Gets or sets the name of this REST resource.
   243  	Name *string `json:"name,omitempty"`
   244  	// Type - READ-ONLY; Gets the type of this REST resource.
   245  	Type *string `json:"type,omitempty"`
   246  	// Properties - Gets or sets the properties of the machine.
   247  	Properties *DatabaseInstanceProperties `json:"properties,omitempty"`
   248  }
   249  
   250  // MarshalJSON is the custom marshaler for DatabaseInstance.
   251  func (di DatabaseInstance) MarshalJSON() ([]byte, error) {
   252  	objectMap := make(map[string]interface{})
   253  	if di.ID != nil {
   254  		objectMap["id"] = di.ID
   255  	}
   256  	if di.Name != nil {
   257  		objectMap["name"] = di.Name
   258  	}
   259  	if di.Properties != nil {
   260  		objectMap["properties"] = di.Properties
   261  	}
   262  	return json.Marshal(objectMap)
   263  }
   264  
   265  // DatabaseInstanceCollection collection of database instances.
   266  type DatabaseInstanceCollection struct {
   267  	autorest.Response `json:"-"`
   268  	// Value - Gets or sets the database instances.
   269  	Value *[]DatabaseInstance `json:"value,omitempty"`
   270  	// NextLink - Gets or sets the value of nextLink.
   271  	NextLink *string `json:"nextLink,omitempty"`
   272  }
   273  
   274  // DatabaseInstanceDiscoveryDetails discovery properties that can be shared by various publishers.
   275  type DatabaseInstanceDiscoveryDetails struct {
   276  	// LastUpdatedTime - Gets or sets the time of the last modification of the database instance details.
   277  	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
   278  	// InstanceID - Gets or sets the database instance Id.
   279  	InstanceID *string `json:"instanceId,omitempty"`
   280  	// EnqueueTime - Gets or sets the time the message was enqueued.
   281  	EnqueueTime *string `json:"enqueueTime,omitempty"`
   282  	// SolutionName - Gets or sets the name of the solution that sent the data.
   283  	SolutionName *string `json:"solutionName,omitempty"`
   284  	// InstanceName - Gets or sets the database instance name.
   285  	InstanceName *string `json:"instanceName,omitempty"`
   286  	// InstanceVersion - Gets or sets the database instance version.
   287  	InstanceVersion *string `json:"instanceVersion,omitempty"`
   288  	// InstanceType - Gets or sets the database instance type.
   289  	InstanceType *string `json:"instanceType,omitempty"`
   290  	// HostName - Gets or sets the host name of the database server.
   291  	HostName *string `json:"hostName,omitempty"`
   292  	// IPAddress - Gets or sets the IP addresses of the database server. IP addresses could be IP V4 or IP V6.
   293  	IPAddress *string `json:"ipAddress,omitempty"`
   294  	// PortNumber - Gets or sets the port number of the database server.
   295  	PortNumber *int32 `json:"portNumber,omitempty"`
   296  	// ExtendedInfo - Gets or sets the extended properties of the database server.
   297  	ExtendedInfo map[string]*string `json:"extendedInfo"`
   298  }
   299  
   300  // MarshalJSON is the custom marshaler for DatabaseInstanceDiscoveryDetails.
   301  func (didd DatabaseInstanceDiscoveryDetails) MarshalJSON() ([]byte, error) {
   302  	objectMap := make(map[string]interface{})
   303  	if didd.LastUpdatedTime != nil {
   304  		objectMap["lastUpdatedTime"] = didd.LastUpdatedTime
   305  	}
   306  	if didd.InstanceID != nil {
   307  		objectMap["instanceId"] = didd.InstanceID
   308  	}
   309  	if didd.EnqueueTime != nil {
   310  		objectMap["enqueueTime"] = didd.EnqueueTime
   311  	}
   312  	if didd.SolutionName != nil {
   313  		objectMap["solutionName"] = didd.SolutionName
   314  	}
   315  	if didd.InstanceName != nil {
   316  		objectMap["instanceName"] = didd.InstanceName
   317  	}
   318  	if didd.InstanceVersion != nil {
   319  		objectMap["instanceVersion"] = didd.InstanceVersion
   320  	}
   321  	if didd.InstanceType != nil {
   322  		objectMap["instanceType"] = didd.InstanceType
   323  	}
   324  	if didd.HostName != nil {
   325  		objectMap["hostName"] = didd.HostName
   326  	}
   327  	if didd.IPAddress != nil {
   328  		objectMap["ipAddress"] = didd.IPAddress
   329  	}
   330  	if didd.PortNumber != nil {
   331  		objectMap["portNumber"] = didd.PortNumber
   332  	}
   333  	if didd.ExtendedInfo != nil {
   334  		objectMap["extendedInfo"] = didd.ExtendedInfo
   335  	}
   336  	return json.Marshal(objectMap)
   337  }
   338  
   339  // DatabaseInstanceProperties properties of the database instance resource.
   340  type DatabaseInstanceProperties struct {
   341  	// DiscoveryData - Gets or sets the assessment details of the database instance published by various sources.
   342  	DiscoveryData *[]DatabaseInstanceDiscoveryDetails `json:"discoveryData,omitempty"`
   343  	// Summary - Gets or sets the database instances summary per solution. The key of dictionary is the solution name and value is the corresponding database instance summary object.
   344  	Summary map[string]*DatabaseInstanceSummary `json:"summary"`
   345  	// LastUpdatedTime - Gets or sets the time of the last modification of the database.
   346  	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
   347  }
   348  
   349  // MarshalJSON is the custom marshaler for DatabaseInstanceProperties.
   350  func (dip DatabaseInstanceProperties) MarshalJSON() ([]byte, error) {
   351  	objectMap := make(map[string]interface{})
   352  	if dip.DiscoveryData != nil {
   353  		objectMap["discoveryData"] = dip.DiscoveryData
   354  	}
   355  	if dip.Summary != nil {
   356  		objectMap["summary"] = dip.Summary
   357  	}
   358  	if dip.LastUpdatedTime != nil {
   359  		objectMap["lastUpdatedTime"] = dip.LastUpdatedTime
   360  	}
   361  	return json.Marshal(objectMap)
   362  }
   363  
   364  // DatabaseInstanceSummary class representing the database instance summary object.
   365  type DatabaseInstanceSummary struct {
   366  	// DatabasesAssessedCount - Gets or sets the count of databases assessed.
   367  	DatabasesAssessedCount *int32 `json:"databasesAssessedCount,omitempty"`
   368  	// MigrationReadyCount - Gets or sets the count of databases ready for migration.
   369  	MigrationReadyCount *int32 `json:"migrationReadyCount,omitempty"`
   370  }
   371  
   372  // DatabaseMigrateEventProperties properties of the database error resource.
   373  type DatabaseMigrateEventProperties struct {
   374  	// Database - Gets or sets the database for which the error is being reported.
   375  	Database *string `json:"database,omitempty"`
   376  	// DatabaseInstanceID - Gets or sets the database instance for which the error is being reported.
   377  	DatabaseInstanceID *string `json:"databaseInstanceId,omitempty"`
   378  	// ErrorCode - Gets or sets the error code.
   379  	ErrorCode *string `json:"errorCode,omitempty"`
   380  	// ErrorMessage - Gets or sets the error message.
   381  	ErrorMessage *string `json:"errorMessage,omitempty"`
   382  	// Recommendation - Gets or sets the recommendation for the error.
   383  	Recommendation *string `json:"recommendation,omitempty"`
   384  	// PossibleCauses - Gets or sets the possible causes for the error.
   385  	PossibleCauses *string `json:"possibleCauses,omitempty"`
   386  	// Solution - Gets or sets the solution for which the error is being reported.
   387  	Solution *string `json:"solution,omitempty"`
   388  	// ClientRequestID - Gets or sets the client request Id of the payload for which the event is being reported.
   389  	ClientRequestID *string `json:"clientRequestId,omitempty"`
   390  	// InstanceType - Possible values include: 'InstanceTypeMigrateEventProperties', 'InstanceTypeServers', 'InstanceTypeDatabases'
   391  	InstanceType InstanceType `json:"instanceType,omitempty"`
   392  }
   393  
   394  // MarshalJSON is the custom marshaler for DatabaseMigrateEventProperties.
   395  func (dmep DatabaseMigrateEventProperties) MarshalJSON() ([]byte, error) {
   396  	dmep.InstanceType = InstanceTypeDatabases
   397  	objectMap := make(map[string]interface{})
   398  	if dmep.Database != nil {
   399  		objectMap["database"] = dmep.Database
   400  	}
   401  	if dmep.DatabaseInstanceID != nil {
   402  		objectMap["databaseInstanceId"] = dmep.DatabaseInstanceID
   403  	}
   404  	if dmep.ErrorCode != nil {
   405  		objectMap["errorCode"] = dmep.ErrorCode
   406  	}
   407  	if dmep.ErrorMessage != nil {
   408  		objectMap["errorMessage"] = dmep.ErrorMessage
   409  	}
   410  	if dmep.Recommendation != nil {
   411  		objectMap["recommendation"] = dmep.Recommendation
   412  	}
   413  	if dmep.PossibleCauses != nil {
   414  		objectMap["possibleCauses"] = dmep.PossibleCauses
   415  	}
   416  	if dmep.Solution != nil {
   417  		objectMap["solution"] = dmep.Solution
   418  	}
   419  	if dmep.ClientRequestID != nil {
   420  		objectMap["clientRequestId"] = dmep.ClientRequestID
   421  	}
   422  	if dmep.InstanceType != "" {
   423  		objectMap["instanceType"] = dmep.InstanceType
   424  	}
   425  	return json.Marshal(objectMap)
   426  }
   427  
   428  // AsMachineMigrateEventProperties is the BasicEventProperties implementation for DatabaseMigrateEventProperties.
   429  func (dmep DatabaseMigrateEventProperties) AsMachineMigrateEventProperties() (*MachineMigrateEventProperties, bool) {
   430  	return nil, false
   431  }
   432  
   433  // AsDatabaseMigrateEventProperties is the BasicEventProperties implementation for DatabaseMigrateEventProperties.
   434  func (dmep DatabaseMigrateEventProperties) AsDatabaseMigrateEventProperties() (*DatabaseMigrateEventProperties, bool) {
   435  	return &dmep, true
   436  }
   437  
   438  // AsEventProperties is the BasicEventProperties implementation for DatabaseMigrateEventProperties.
   439  func (dmep DatabaseMigrateEventProperties) AsEventProperties() (*EventProperties, bool) {
   440  	return nil, false
   441  }
   442  
   443  // AsBasicEventProperties is the BasicEventProperties implementation for DatabaseMigrateEventProperties.
   444  func (dmep DatabaseMigrateEventProperties) AsBasicEventProperties() (BasicEventProperties, bool) {
   445  	return &dmep, true
   446  }
   447  
   448  // DatabaseProjectSummary the database project summary class.
   449  type DatabaseProjectSummary struct {
   450  	// RefreshSummaryState - Gets or sets the state of refresh summary. Possible values include: 'RefreshSummaryStateStarted', 'RefreshSummaryStateInProgress', 'RefreshSummaryStateCompleted', 'RefreshSummaryStateFailed'
   451  	RefreshSummaryState RefreshSummaryState `json:"refreshSummaryState,omitempty"`
   452  	// LastSummaryRefreshedTime - Gets or sets the time when summary was last refreshed.
   453  	LastSummaryRefreshedTime *date.Time `json:"lastSummaryRefreshedTime,omitempty"`
   454  	// ExtendedSummary - Gets or sets the extended summary.
   455  	ExtendedSummary map[string]*string `json:"extendedSummary"`
   456  	// InstanceType - Possible values include: 'InstanceTypeBasicProjectSummaryInstanceTypeProjectSummary', 'InstanceTypeBasicProjectSummaryInstanceTypeServers', 'InstanceTypeBasicProjectSummaryInstanceTypeDatabases'
   457  	InstanceType InstanceTypeBasicProjectSummary `json:"instanceType,omitempty"`
   458  }
   459  
   460  // MarshalJSON is the custom marshaler for DatabaseProjectSummary.
   461  func (dps DatabaseProjectSummary) MarshalJSON() ([]byte, error) {
   462  	dps.InstanceType = InstanceTypeBasicProjectSummaryInstanceTypeDatabases
   463  	objectMap := make(map[string]interface{})
   464  	if dps.RefreshSummaryState != "" {
   465  		objectMap["refreshSummaryState"] = dps.RefreshSummaryState
   466  	}
   467  	if dps.LastSummaryRefreshedTime != nil {
   468  		objectMap["lastSummaryRefreshedTime"] = dps.LastSummaryRefreshedTime
   469  	}
   470  	if dps.ExtendedSummary != nil {
   471  		objectMap["extendedSummary"] = dps.ExtendedSummary
   472  	}
   473  	if dps.InstanceType != "" {
   474  		objectMap["instanceType"] = dps.InstanceType
   475  	}
   476  	return json.Marshal(objectMap)
   477  }
   478  
   479  // AsServersProjectSummary is the BasicProjectSummary implementation for DatabaseProjectSummary.
   480  func (dps DatabaseProjectSummary) AsServersProjectSummary() (*ServersProjectSummary, bool) {
   481  	return nil, false
   482  }
   483  
   484  // AsDatabaseProjectSummary is the BasicProjectSummary implementation for DatabaseProjectSummary.
   485  func (dps DatabaseProjectSummary) AsDatabaseProjectSummary() (*DatabaseProjectSummary, bool) {
   486  	return &dps, true
   487  }
   488  
   489  // AsProjectSummary is the BasicProjectSummary implementation for DatabaseProjectSummary.
   490  func (dps DatabaseProjectSummary) AsProjectSummary() (*ProjectSummary, bool) {
   491  	return nil, false
   492  }
   493  
   494  // AsBasicProjectSummary is the BasicProjectSummary implementation for DatabaseProjectSummary.
   495  func (dps DatabaseProjectSummary) AsBasicProjectSummary() (BasicProjectSummary, bool) {
   496  	return &dps, true
   497  }
   498  
   499  // DatabaseProperties properties of the database resource.
   500  type DatabaseProperties struct {
   501  	// AssessmentData - Gets or sets the assessment details of the database published by various sources.
   502  	AssessmentData *[]DatabaseAssessmentDetails `json:"assessmentData,omitempty"`
   503  	// LastUpdatedTime - Gets or sets the time of the last modification of the database.
   504  	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
   505  }
   506  
   507  // DatabasesSolutionSummary class representing the databases solution summary.
   508  type DatabasesSolutionSummary struct {
   509  	// DatabasesAssessedCount - Gets or sets the count of databases assessed.
   510  	DatabasesAssessedCount *int32 `json:"databasesAssessedCount,omitempty"`
   511  	// DatabaseInstancesAssessedCount - Gets or sets the count of database instances assessed.
   512  	DatabaseInstancesAssessedCount *int32 `json:"databaseInstancesAssessedCount,omitempty"`
   513  	// MigrationReadyCount - Gets or sets the count of databases ready for migration.
   514  	MigrationReadyCount *int32 `json:"migrationReadyCount,omitempty"`
   515  	// InstanceType - Possible values include: 'InstanceTypeBasicSolutionSummaryInstanceTypeSolutionSummary', 'InstanceTypeBasicSolutionSummaryInstanceTypeServers', 'InstanceTypeBasicSolutionSummaryInstanceTypeDatabases'
   516  	InstanceType InstanceTypeBasicSolutionSummary `json:"instanceType,omitempty"`
   517  }
   518  
   519  // MarshalJSON is the custom marshaler for DatabasesSolutionSummary.
   520  func (dss DatabasesSolutionSummary) MarshalJSON() ([]byte, error) {
   521  	dss.InstanceType = InstanceTypeBasicSolutionSummaryInstanceTypeDatabases
   522  	objectMap := make(map[string]interface{})
   523  	if dss.DatabasesAssessedCount != nil {
   524  		objectMap["databasesAssessedCount"] = dss.DatabasesAssessedCount
   525  	}
   526  	if dss.DatabaseInstancesAssessedCount != nil {
   527  		objectMap["databaseInstancesAssessedCount"] = dss.DatabaseInstancesAssessedCount
   528  	}
   529  	if dss.MigrationReadyCount != nil {
   530  		objectMap["migrationReadyCount"] = dss.MigrationReadyCount
   531  	}
   532  	if dss.InstanceType != "" {
   533  		objectMap["instanceType"] = dss.InstanceType
   534  	}
   535  	return json.Marshal(objectMap)
   536  }
   537  
   538  // AsServersSolutionSummary is the BasicSolutionSummary implementation for DatabasesSolutionSummary.
   539  func (dss DatabasesSolutionSummary) AsServersSolutionSummary() (*ServersSolutionSummary, bool) {
   540  	return nil, false
   541  }
   542  
   543  // AsDatabasesSolutionSummary is the BasicSolutionSummary implementation for DatabasesSolutionSummary.
   544  func (dss DatabasesSolutionSummary) AsDatabasesSolutionSummary() (*DatabasesSolutionSummary, bool) {
   545  	return &dss, true
   546  }
   547  
   548  // AsSolutionSummary is the BasicSolutionSummary implementation for DatabasesSolutionSummary.
   549  func (dss DatabasesSolutionSummary) AsSolutionSummary() (*SolutionSummary, bool) {
   550  	return nil, false
   551  }
   552  
   553  // AsBasicSolutionSummary is the BasicSolutionSummary implementation for DatabasesSolutionSummary.
   554  func (dss DatabasesSolutionSummary) AsBasicSolutionSummary() (BasicSolutionSummary, bool) {
   555  	return &dss, true
   556  }
   557  
   558  // DefaultQuerySettings ...
   559  type DefaultQuerySettings struct {
   560  	EnableExpand  *bool  `json:"enableExpand,omitempty"`
   561  	EnableSelect  *bool  `json:"enableSelect,omitempty"`
   562  	EnableCount   *bool  `json:"enableCount,omitempty"`
   563  	EnableOrderBy *bool  `json:"enableOrderBy,omitempty"`
   564  	EnableFilter  *bool  `json:"enableFilter,omitempty"`
   565  	MaxTop        *int32 `json:"maxTop,omitempty"`
   566  }
   567  
   568  // DiscoveryDetails discovery properties that can be published by various ISVs.
   569  type DiscoveryDetails struct {
   570  	// OsType - Gets or sets the OS type.
   571  	OsType *string `json:"osType,omitempty"`
   572  	// OsName - Gets or sets the OS name.
   573  	OsName *string `json:"osName,omitempty"`
   574  	// OsVersion - Gets or sets the OS version.
   575  	OsVersion *string `json:"osVersion,omitempty"`
   576  	// EnqueueTime - Gets or sets the time the message was enqueued.
   577  	EnqueueTime *string `json:"enqueueTime,omitempty"`
   578  	// SolutionName - Gets or sets the name of the solution that sent the data.
   579  	SolutionName *string `json:"solutionName,omitempty"`
   580  	// MachineID - Gets or sets the unique identifier of the machine.
   581  	MachineID *string `json:"machineId,omitempty"`
   582  	// MachineManagerID - Gets or sets the unique identifier of the virtual machine manager(vCenter/VMM).
   583  	MachineManagerID *string `json:"machineManagerId,omitempty"`
   584  	// FabricType - Gets or sets the fabric type.
   585  	FabricType *string `json:"fabricType,omitempty"`
   586  	// LastUpdatedTime - Gets or sets the time of the last modification of the machine details.
   587  	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
   588  	// MachineName - Gets or sets the name of the machine.
   589  	MachineName *string `json:"machineName,omitempty"`
   590  	// IPAddresses - Gets or sets the list of IP addresses of the machine. IP addresses could be IP V4 or IP V6.
   591  	IPAddresses *[]string `json:"ipAddresses,omitempty"`
   592  	// Fqdn - Gets or sets the FQDN of the machine.
   593  	Fqdn *string `json:"fqdn,omitempty"`
   594  	// BiosID - Gets or sets the BIOS ID of the machine.
   595  	BiosID *string `json:"biosId,omitempty"`
   596  	// MacAddresses - Gets or sets the list of MAC addresses of the machine.
   597  	MacAddresses *[]string `json:"macAddresses,omitempty"`
   598  	// ExtendedInfo - Gets or sets the ISV specific extended information.
   599  	ExtendedInfo map[string]*string `json:"extendedInfo"`
   600  }
   601  
   602  // MarshalJSON is the custom marshaler for DiscoveryDetails.
   603  func (dd DiscoveryDetails) MarshalJSON() ([]byte, error) {
   604  	objectMap := make(map[string]interface{})
   605  	if dd.OsType != nil {
   606  		objectMap["osType"] = dd.OsType
   607  	}
   608  	if dd.OsName != nil {
   609  		objectMap["osName"] = dd.OsName
   610  	}
   611  	if dd.OsVersion != nil {
   612  		objectMap["osVersion"] = dd.OsVersion
   613  	}
   614  	if dd.EnqueueTime != nil {
   615  		objectMap["enqueueTime"] = dd.EnqueueTime
   616  	}
   617  	if dd.SolutionName != nil {
   618  		objectMap["solutionName"] = dd.SolutionName
   619  	}
   620  	if dd.MachineID != nil {
   621  		objectMap["machineId"] = dd.MachineID
   622  	}
   623  	if dd.MachineManagerID != nil {
   624  		objectMap["machineManagerId"] = dd.MachineManagerID
   625  	}
   626  	if dd.FabricType != nil {
   627  		objectMap["fabricType"] = dd.FabricType
   628  	}
   629  	if dd.LastUpdatedTime != nil {
   630  		objectMap["lastUpdatedTime"] = dd.LastUpdatedTime
   631  	}
   632  	if dd.MachineName != nil {
   633  		objectMap["machineName"] = dd.MachineName
   634  	}
   635  	if dd.IPAddresses != nil {
   636  		objectMap["ipAddresses"] = dd.IPAddresses
   637  	}
   638  	if dd.Fqdn != nil {
   639  		objectMap["fqdn"] = dd.Fqdn
   640  	}
   641  	if dd.BiosID != nil {
   642  		objectMap["biosId"] = dd.BiosID
   643  	}
   644  	if dd.MacAddresses != nil {
   645  		objectMap["macAddresses"] = dd.MacAddresses
   646  	}
   647  	if dd.ExtendedInfo != nil {
   648  		objectMap["extendedInfo"] = dd.ExtendedInfo
   649  	}
   650  	return json.Marshal(objectMap)
   651  }
   652  
   653  // EdmReferentialConstraintPropertyPair ...
   654  type EdmReferentialConstraintPropertyPair struct {
   655  	// DependentProperty - READ-ONLY
   656  	DependentProperty *IEdmStructuralProperty `json:"dependentProperty,omitempty"`
   657  	// PrincipalProperty - READ-ONLY
   658  	PrincipalProperty *IEdmStructuralProperty `json:"principalProperty,omitempty"`
   659  }
   660  
   661  // MarshalJSON is the custom marshaler for EdmReferentialConstraintPropertyPair.
   662  func (ercpp EdmReferentialConstraintPropertyPair) MarshalJSON() ([]byte, error) {
   663  	objectMap := make(map[string]interface{})
   664  	return json.Marshal(objectMap)
   665  }
   666  
   667  // Event migrateEvent REST resource.
   668  type Event struct {
   669  	autorest.Response `json:"-"`
   670  	// ID - Gets or sets the relative URL to get to this REST resource.
   671  	ID *string `json:"id,omitempty"`
   672  	// Name - Gets or sets the name of this REST resource.
   673  	Name *string `json:"name,omitempty"`
   674  	// Type - READ-ONLY; Gets the type of this REST resource.
   675  	Type *string `json:"type,omitempty"`
   676  	// Properties - Gets or sets the properties of the event.
   677  	Properties BasicEventProperties `json:"properties,omitempty"`
   678  }
   679  
   680  // MarshalJSON is the custom marshaler for Event.
   681  func (e Event) MarshalJSON() ([]byte, error) {
   682  	objectMap := make(map[string]interface{})
   683  	if e.ID != nil {
   684  		objectMap["id"] = e.ID
   685  	}
   686  	if e.Name != nil {
   687  		objectMap["name"] = e.Name
   688  	}
   689  	objectMap["properties"] = e.Properties
   690  	return json.Marshal(objectMap)
   691  }
   692  
   693  // UnmarshalJSON is the custom unmarshaler for Event struct.
   694  func (e *Event) UnmarshalJSON(body []byte) error {
   695  	var m map[string]*json.RawMessage
   696  	err := json.Unmarshal(body, &m)
   697  	if err != nil {
   698  		return err
   699  	}
   700  	for k, v := range m {
   701  		switch k {
   702  		case "id":
   703  			if v != nil {
   704  				var ID string
   705  				err = json.Unmarshal(*v, &ID)
   706  				if err != nil {
   707  					return err
   708  				}
   709  				e.ID = &ID
   710  			}
   711  		case "name":
   712  			if v != nil {
   713  				var name string
   714  				err = json.Unmarshal(*v, &name)
   715  				if err != nil {
   716  					return err
   717  				}
   718  				e.Name = &name
   719  			}
   720  		case "type":
   721  			if v != nil {
   722  				var typeVar string
   723  				err = json.Unmarshal(*v, &typeVar)
   724  				if err != nil {
   725  					return err
   726  				}
   727  				e.Type = &typeVar
   728  			}
   729  		case "properties":
   730  			if v != nil {
   731  				properties, err := unmarshalBasicEventProperties(*v)
   732  				if err != nil {
   733  					return err
   734  				}
   735  				e.Properties = properties
   736  			}
   737  		}
   738  	}
   739  
   740  	return nil
   741  }
   742  
   743  // EventCollection collection of events.
   744  type EventCollection struct {
   745  	autorest.Response `json:"-"`
   746  	// Value - Gets or sets the machines.
   747  	Value *[]Event `json:"value,omitempty"`
   748  	// NextLink - Gets or sets the value of nextLink.
   749  	NextLink *string `json:"nextLink,omitempty"`
   750  }
   751  
   752  // BasicEventProperties properties of the error resource.
   753  type BasicEventProperties interface {
   754  	AsMachineMigrateEventProperties() (*MachineMigrateEventProperties, bool)
   755  	AsDatabaseMigrateEventProperties() (*DatabaseMigrateEventProperties, bool)
   756  	AsEventProperties() (*EventProperties, bool)
   757  }
   758  
   759  // EventProperties properties of the error resource.
   760  type EventProperties struct {
   761  	// ErrorCode - Gets or sets the error code.
   762  	ErrorCode *string `json:"errorCode,omitempty"`
   763  	// ErrorMessage - Gets or sets the error message.
   764  	ErrorMessage *string `json:"errorMessage,omitempty"`
   765  	// Recommendation - Gets or sets the recommendation for the error.
   766  	Recommendation *string `json:"recommendation,omitempty"`
   767  	// PossibleCauses - Gets or sets the possible causes for the error.
   768  	PossibleCauses *string `json:"possibleCauses,omitempty"`
   769  	// Solution - Gets or sets the solution for which the error is being reported.
   770  	Solution *string `json:"solution,omitempty"`
   771  	// ClientRequestID - Gets or sets the client request Id of the payload for which the event is being reported.
   772  	ClientRequestID *string `json:"clientRequestId,omitempty"`
   773  	// InstanceType - Possible values include: 'InstanceTypeMigrateEventProperties', 'InstanceTypeServers', 'InstanceTypeDatabases'
   774  	InstanceType InstanceType `json:"instanceType,omitempty"`
   775  }
   776  
   777  func unmarshalBasicEventProperties(body []byte) (BasicEventProperties, error) {
   778  	var m map[string]interface{}
   779  	err := json.Unmarshal(body, &m)
   780  	if err != nil {
   781  		return nil, err
   782  	}
   783  
   784  	switch m["instanceType"] {
   785  	case string(InstanceTypeServers):
   786  		var mmep MachineMigrateEventProperties
   787  		err := json.Unmarshal(body, &mmep)
   788  		return mmep, err
   789  	case string(InstanceTypeDatabases):
   790  		var dmep DatabaseMigrateEventProperties
   791  		err := json.Unmarshal(body, &dmep)
   792  		return dmep, err
   793  	default:
   794  		var ep EventProperties
   795  		err := json.Unmarshal(body, &ep)
   796  		return ep, err
   797  	}
   798  }
   799  func unmarshalBasicEventPropertiesArray(body []byte) ([]BasicEventProperties, error) {
   800  	var rawMessages []*json.RawMessage
   801  	err := json.Unmarshal(body, &rawMessages)
   802  	if err != nil {
   803  		return nil, err
   804  	}
   805  
   806  	epArray := make([]BasicEventProperties, len(rawMessages))
   807  
   808  	for index, rawMessage := range rawMessages {
   809  		ep, err := unmarshalBasicEventProperties(*rawMessage)
   810  		if err != nil {
   811  			return nil, err
   812  		}
   813  		epArray[index] = ep
   814  	}
   815  	return epArray, nil
   816  }
   817  
   818  // MarshalJSON is the custom marshaler for EventProperties.
   819  func (ep EventProperties) MarshalJSON() ([]byte, error) {
   820  	ep.InstanceType = InstanceTypeMigrateEventProperties
   821  	objectMap := make(map[string]interface{})
   822  	if ep.ErrorCode != nil {
   823  		objectMap["errorCode"] = ep.ErrorCode
   824  	}
   825  	if ep.ErrorMessage != nil {
   826  		objectMap["errorMessage"] = ep.ErrorMessage
   827  	}
   828  	if ep.Recommendation != nil {
   829  		objectMap["recommendation"] = ep.Recommendation
   830  	}
   831  	if ep.PossibleCauses != nil {
   832  		objectMap["possibleCauses"] = ep.PossibleCauses
   833  	}
   834  	if ep.Solution != nil {
   835  		objectMap["solution"] = ep.Solution
   836  	}
   837  	if ep.ClientRequestID != nil {
   838  		objectMap["clientRequestId"] = ep.ClientRequestID
   839  	}
   840  	if ep.InstanceType != "" {
   841  		objectMap["instanceType"] = ep.InstanceType
   842  	}
   843  	return json.Marshal(objectMap)
   844  }
   845  
   846  // AsMachineMigrateEventProperties is the BasicEventProperties implementation for EventProperties.
   847  func (ep EventProperties) AsMachineMigrateEventProperties() (*MachineMigrateEventProperties, bool) {
   848  	return nil, false
   849  }
   850  
   851  // AsDatabaseMigrateEventProperties is the BasicEventProperties implementation for EventProperties.
   852  func (ep EventProperties) AsDatabaseMigrateEventProperties() (*DatabaseMigrateEventProperties, bool) {
   853  	return nil, false
   854  }
   855  
   856  // AsEventProperties is the BasicEventProperties implementation for EventProperties.
   857  func (ep EventProperties) AsEventProperties() (*EventProperties, bool) {
   858  	return &ep, true
   859  }
   860  
   861  // AsBasicEventProperties is the BasicEventProperties implementation for EventProperties.
   862  func (ep EventProperties) AsBasicEventProperties() (BasicEventProperties, bool) {
   863  	return &ep, true
   864  }
   865  
   866  // FilterClause ...
   867  type FilterClause struct {
   868  	// Expression - READ-ONLY
   869  	Expression *SingleValueNode `json:"expression,omitempty"`
   870  	// RangeVariable - READ-ONLY
   871  	RangeVariable *RangeVariable `json:"rangeVariable,omitempty"`
   872  	// ItemType - READ-ONLY
   873  	ItemType *IEdmTypeReference `json:"itemType,omitempty"`
   874  }
   875  
   876  // MarshalJSON is the custom marshaler for FilterClause.
   877  func (fc FilterClause) MarshalJSON() ([]byte, error) {
   878  	objectMap := make(map[string]interface{})
   879  	return json.Marshal(objectMap)
   880  }
   881  
   882  // FilterQueryOption ...
   883  type FilterQueryOption struct {
   884  	// Context - READ-ONLY
   885  	Context   *ODataQueryContext `json:"context,omitempty"`
   886  	Validator interface{}        `json:"validator,omitempty"`
   887  	// FilterClause - READ-ONLY
   888  	FilterClause *FilterClause `json:"filterClause,omitempty"`
   889  	// RawValue - READ-ONLY
   890  	RawValue *string `json:"rawValue,omitempty"`
   891  }
   892  
   893  // MarshalJSON is the custom marshaler for FilterQueryOption.
   894  func (fqo FilterQueryOption) MarshalJSON() ([]byte, error) {
   895  	objectMap := make(map[string]interface{})
   896  	if fqo.Validator != nil {
   897  		objectMap["validator"] = fqo.Validator
   898  	}
   899  	return json.Marshal(objectMap)
   900  }
   901  
   902  // IEdmEntityContainer ...
   903  type IEdmEntityContainer struct {
   904  	// Elements - READ-ONLY
   905  	Elements *[]IEdmEntityContainerElement `json:"elements,omitempty"`
   906  	// SchemaElementKind - READ-ONLY; Possible values include: 'SchemaElementKind2None', 'SchemaElementKind2TypeDefinition', 'SchemaElementKind2Term', 'SchemaElementKind2Action', 'SchemaElementKind2EntityContainer', 'SchemaElementKind2Function'
   907  	SchemaElementKind SchemaElementKind2 `json:"schemaElementKind,omitempty"`
   908  	// Namespace - READ-ONLY
   909  	Namespace *string `json:"namespace,omitempty"`
   910  	// Name - READ-ONLY
   911  	Name *string `json:"name,omitempty"`
   912  }
   913  
   914  // MarshalJSON is the custom marshaler for IEdmEntityContainer.
   915  func (ieec IEdmEntityContainer) MarshalJSON() ([]byte, error) {
   916  	objectMap := make(map[string]interface{})
   917  	return json.Marshal(objectMap)
   918  }
   919  
   920  // IEdmEntityContainerElement ...
   921  type IEdmEntityContainerElement struct {
   922  	// ContainerElementKind - READ-ONLY; Possible values include: 'ContainerElementKindNone', 'ContainerElementKindEntitySet', 'ContainerElementKindActionImport', 'ContainerElementKindFunctionImport', 'ContainerElementKindSingleton'
   923  	ContainerElementKind ContainerElementKind `json:"containerElementKind,omitempty"`
   924  	// Container - READ-ONLY
   925  	Container *IEdmEntityContainer `json:"container,omitempty"`
   926  	// Name - READ-ONLY
   927  	Name *string `json:"name,omitempty"`
   928  }
   929  
   930  // MarshalJSON is the custom marshaler for IEdmEntityContainerElement.
   931  func (ieece IEdmEntityContainerElement) MarshalJSON() ([]byte, error) {
   932  	objectMap := make(map[string]interface{})
   933  	return json.Marshal(objectMap)
   934  }
   935  
   936  // IEdmExpression ...
   937  type IEdmExpression struct {
   938  	// ExpressionKind - READ-ONLY; Possible values include: 'ExpressionKindNone', 'ExpressionKindBinaryConstant', 'ExpressionKindBooleanConstant', 'ExpressionKindDateTimeOffsetConstant', 'ExpressionKindDecimalConstant', 'ExpressionKindFloatingConstant', 'ExpressionKindGUIDConstant', 'ExpressionKindIntegerConstant', 'ExpressionKindStringConstant', 'ExpressionKindDurationConstant', 'ExpressionKindNull', 'ExpressionKindRecord', 'ExpressionKindCollection', 'ExpressionKindPath', 'ExpressionKindIf', 'ExpressionKindCast', 'ExpressionKindIsType', 'ExpressionKindFunctionApplication', 'ExpressionKindLabeledExpressionReference', 'ExpressionKindLabeled', 'ExpressionKindPropertyPath', 'ExpressionKindNavigationPropertyPath', 'ExpressionKindDateConstant', 'ExpressionKindTimeOfDayConstant', 'ExpressionKindEnumMember', 'ExpressionKindAnnotationPath'
   939  	ExpressionKind ExpressionKind `json:"expressionKind,omitempty"`
   940  }
   941  
   942  // MarshalJSON is the custom marshaler for IEdmExpression.
   943  func (iee IEdmExpression) MarshalJSON() ([]byte, error) {
   944  	objectMap := make(map[string]interface{})
   945  	return json.Marshal(objectMap)
   946  }
   947  
   948  // IEdmModel ...
   949  type IEdmModel struct {
   950  	// SchemaElements - READ-ONLY
   951  	SchemaElements *[]IEdmSchemaElement `json:"schemaElements,omitempty"`
   952  	// VocabularyAnnotations - READ-ONLY
   953  	VocabularyAnnotations *[]IEdmVocabularyAnnotation `json:"vocabularyAnnotations,omitempty"`
   954  	// ReferencedModels - READ-ONLY
   955  	ReferencedModels *[]IEdmModel `json:"referencedModels,omitempty"`
   956  	// DeclaredNamespaces - READ-ONLY
   957  	DeclaredNamespaces *[]string `json:"declaredNamespaces,omitempty"`
   958  	// DirectValueAnnotationsManager - READ-ONLY
   959  	DirectValueAnnotationsManager interface{} `json:"directValueAnnotationsManager,omitempty"`
   960  	// EntityContainer - READ-ONLY
   961  	EntityContainer *IEdmEntityContainer `json:"entityContainer,omitempty"`
   962  }
   963  
   964  // MarshalJSON is the custom marshaler for IEdmModel.
   965  func (iem IEdmModel) MarshalJSON() ([]byte, error) {
   966  	objectMap := make(map[string]interface{})
   967  	return json.Marshal(objectMap)
   968  }
   969  
   970  // IEdmNavigationProperty ...
   971  type IEdmNavigationProperty struct {
   972  	// Partner - READ-ONLY
   973  	Partner *IEdmNavigationProperty `json:"partner,omitempty"`
   974  	// OnDelete - READ-ONLY; Possible values include: 'OnDeleteNone', 'OnDeleteCascade'
   975  	OnDelete OnDelete `json:"onDelete,omitempty"`
   976  	// ContainsTarget - READ-ONLY
   977  	ContainsTarget *bool `json:"containsTarget,omitempty"`
   978  	// ReferentialConstraint - READ-ONLY
   979  	ReferentialConstraint *IEdmReferentialConstraint `json:"referentialConstraint,omitempty"`
   980  	// PropertyKind - READ-ONLY; Possible values include: 'PropertyKind2None', 'PropertyKind2Structural', 'PropertyKind2Navigation'
   981  	PropertyKind PropertyKind2 `json:"propertyKind,omitempty"`
   982  	// Type - READ-ONLY
   983  	Type *IEdmTypeReference `json:"type,omitempty"`
   984  	// DeclaringType - READ-ONLY
   985  	DeclaringType *IEdmStructuredType `json:"declaringType,omitempty"`
   986  	// Name - READ-ONLY
   987  	Name *string `json:"name,omitempty"`
   988  }
   989  
   990  // MarshalJSON is the custom marshaler for IEdmNavigationProperty.
   991  func (ienp IEdmNavigationProperty) MarshalJSON() ([]byte, error) {
   992  	objectMap := make(map[string]interface{})
   993  	return json.Marshal(objectMap)
   994  }
   995  
   996  // IEdmNavigationPropertyBinding ...
   997  type IEdmNavigationPropertyBinding struct {
   998  	// NavigationProperty - READ-ONLY
   999  	NavigationProperty *IEdmNavigationProperty `json:"navigationProperty,omitempty"`
  1000  	// Target - READ-ONLY
  1001  	Target *IEdmNavigationSource `json:"target,omitempty"`
  1002  	// Path - READ-ONLY
  1003  	Path *IEdmPathExpression `json:"path,omitempty"`
  1004  }
  1005  
  1006  // MarshalJSON is the custom marshaler for IEdmNavigationPropertyBinding.
  1007  func (ienpb IEdmNavigationPropertyBinding) MarshalJSON() ([]byte, error) {
  1008  	objectMap := make(map[string]interface{})
  1009  	return json.Marshal(objectMap)
  1010  }
  1011  
  1012  // IEdmNavigationSource ...
  1013  type IEdmNavigationSource struct {
  1014  	// NavigationPropertyBindings - READ-ONLY
  1015  	NavigationPropertyBindings *[]IEdmNavigationPropertyBinding `json:"navigationPropertyBindings,omitempty"`
  1016  	// Path - READ-ONLY
  1017  	Path *IEdmPathExpression `json:"path,omitempty"`
  1018  	// Type - READ-ONLY
  1019  	Type *IEdmType `json:"type,omitempty"`
  1020  	// Name - READ-ONLY
  1021  	Name *string `json:"name,omitempty"`
  1022  }
  1023  
  1024  // MarshalJSON is the custom marshaler for IEdmNavigationSource.
  1025  func (iens IEdmNavigationSource) MarshalJSON() ([]byte, error) {
  1026  	objectMap := make(map[string]interface{})
  1027  	return json.Marshal(objectMap)
  1028  }
  1029  
  1030  // IEdmPathExpression ...
  1031  type IEdmPathExpression struct {
  1032  	// PathSegments - READ-ONLY
  1033  	PathSegments *[]string `json:"pathSegments,omitempty"`
  1034  	// Path - READ-ONLY
  1035  	Path *string `json:"path,omitempty"`
  1036  	// ExpressionKind - READ-ONLY; Possible values include: 'ExpressionKind1None', 'ExpressionKind1BinaryConstant', 'ExpressionKind1BooleanConstant', 'ExpressionKind1DateTimeOffsetConstant', 'ExpressionKind1DecimalConstant', 'ExpressionKind1FloatingConstant', 'ExpressionKind1GUIDConstant', 'ExpressionKind1IntegerConstant', 'ExpressionKind1StringConstant', 'ExpressionKind1DurationConstant', 'ExpressionKind1Null', 'ExpressionKind1Record', 'ExpressionKind1Collection', 'ExpressionKind1Path', 'ExpressionKind1If', 'ExpressionKind1Cast', 'ExpressionKind1IsType', 'ExpressionKind1FunctionApplication', 'ExpressionKind1LabeledExpressionReference', 'ExpressionKind1Labeled', 'ExpressionKind1PropertyPath', 'ExpressionKind1NavigationPropertyPath', 'ExpressionKind1DateConstant', 'ExpressionKind1TimeOfDayConstant', 'ExpressionKind1EnumMember', 'ExpressionKind1AnnotationPath'
  1037  	ExpressionKind ExpressionKind1 `json:"expressionKind,omitempty"`
  1038  }
  1039  
  1040  // MarshalJSON is the custom marshaler for IEdmPathExpression.
  1041  func (iepe IEdmPathExpression) MarshalJSON() ([]byte, error) {
  1042  	objectMap := make(map[string]interface{})
  1043  	return json.Marshal(objectMap)
  1044  }
  1045  
  1046  // IEdmProperty ...
  1047  type IEdmProperty struct {
  1048  	// PropertyKind - READ-ONLY; Possible values include: 'PropertyKindNone', 'PropertyKindStructural', 'PropertyKindNavigation'
  1049  	PropertyKind PropertyKind `json:"propertyKind,omitempty"`
  1050  	// Type - READ-ONLY
  1051  	Type *IEdmTypeReference `json:"type,omitempty"`
  1052  	// DeclaringType - READ-ONLY
  1053  	DeclaringType *IEdmStructuredType `json:"declaringType,omitempty"`
  1054  	// Name - READ-ONLY
  1055  	Name *string `json:"name,omitempty"`
  1056  }
  1057  
  1058  // MarshalJSON is the custom marshaler for IEdmProperty.
  1059  func (iep IEdmProperty) MarshalJSON() ([]byte, error) {
  1060  	objectMap := make(map[string]interface{})
  1061  	return json.Marshal(objectMap)
  1062  }
  1063  
  1064  // IEdmReferentialConstraint ...
  1065  type IEdmReferentialConstraint struct {
  1066  	// PropertyPairs - READ-ONLY
  1067  	PropertyPairs *[]EdmReferentialConstraintPropertyPair `json:"propertyPairs,omitempty"`
  1068  }
  1069  
  1070  // MarshalJSON is the custom marshaler for IEdmReferentialConstraint.
  1071  func (ierc IEdmReferentialConstraint) MarshalJSON() ([]byte, error) {
  1072  	objectMap := make(map[string]interface{})
  1073  	return json.Marshal(objectMap)
  1074  }
  1075  
  1076  // IEdmSchemaElement ...
  1077  type IEdmSchemaElement struct {
  1078  	// SchemaElementKind - READ-ONLY; Possible values include: 'SchemaElementKindNone', 'SchemaElementKindTypeDefinition', 'SchemaElementKindTerm', 'SchemaElementKindAction', 'SchemaElementKindEntityContainer', 'SchemaElementKindFunction'
  1079  	SchemaElementKind SchemaElementKind `json:"schemaElementKind,omitempty"`
  1080  	// Namespace - READ-ONLY
  1081  	Namespace *string `json:"namespace,omitempty"`
  1082  	// Name - READ-ONLY
  1083  	Name *string `json:"name,omitempty"`
  1084  }
  1085  
  1086  // MarshalJSON is the custom marshaler for IEdmSchemaElement.
  1087  func (iese IEdmSchemaElement) MarshalJSON() ([]byte, error) {
  1088  	objectMap := make(map[string]interface{})
  1089  	return json.Marshal(objectMap)
  1090  }
  1091  
  1092  // IEdmStructuralProperty ...
  1093  type IEdmStructuralProperty struct {
  1094  	// DefaultValueString - READ-ONLY
  1095  	DefaultValueString *string `json:"defaultValueString,omitempty"`
  1096  	// PropertyKind - READ-ONLY; Possible values include: 'PropertyKind1None', 'PropertyKind1Structural', 'PropertyKind1Navigation'
  1097  	PropertyKind PropertyKind1 `json:"propertyKind,omitempty"`
  1098  	// Type - READ-ONLY
  1099  	Type *IEdmTypeReference `json:"type,omitempty"`
  1100  	// DeclaringType - READ-ONLY
  1101  	DeclaringType *IEdmStructuredType `json:"declaringType,omitempty"`
  1102  	// Name - READ-ONLY
  1103  	Name *string `json:"name,omitempty"`
  1104  }
  1105  
  1106  // MarshalJSON is the custom marshaler for IEdmStructuralProperty.
  1107  func (iesp IEdmStructuralProperty) MarshalJSON() ([]byte, error) {
  1108  	objectMap := make(map[string]interface{})
  1109  	return json.Marshal(objectMap)
  1110  }
  1111  
  1112  // IEdmStructuredType ...
  1113  type IEdmStructuredType struct {
  1114  	// IsAbstract - READ-ONLY
  1115  	IsAbstract *bool `json:"isAbstract,omitempty"`
  1116  	// IsOpen - READ-ONLY
  1117  	IsOpen *bool `json:"isOpen,omitempty"`
  1118  	// BaseType - READ-ONLY
  1119  	BaseType *IEdmStructuredType `json:"baseType,omitempty"`
  1120  	// DeclaredProperties - READ-ONLY
  1121  	DeclaredProperties *[]IEdmProperty `json:"declaredProperties,omitempty"`
  1122  	// TypeKind - READ-ONLY; Possible values include: 'TypeKind1None', 'TypeKind1Primitive', 'TypeKind1Entity', 'TypeKind1Complex', 'TypeKind1Collection', 'TypeKind1EntityReference', 'TypeKind1Enum', 'TypeKind1TypeDefinition', 'TypeKind1Untyped', 'TypeKind1Path'
  1123  	TypeKind TypeKind1 `json:"typeKind,omitempty"`
  1124  }
  1125  
  1126  // MarshalJSON is the custom marshaler for IEdmStructuredType.
  1127  func (iest IEdmStructuredType) MarshalJSON() ([]byte, error) {
  1128  	objectMap := make(map[string]interface{})
  1129  	return json.Marshal(objectMap)
  1130  }
  1131  
  1132  // IEdmTerm ...
  1133  type IEdmTerm struct {
  1134  	// Type - READ-ONLY
  1135  	Type *IEdmTypeReference `json:"type,omitempty"`
  1136  	// AppliesTo - READ-ONLY
  1137  	AppliesTo *string `json:"appliesTo,omitempty"`
  1138  	// DefaultValue - READ-ONLY
  1139  	DefaultValue *string `json:"defaultValue,omitempty"`
  1140  	// SchemaElementKind - READ-ONLY; Possible values include: 'SchemaElementKind1None', 'SchemaElementKind1TypeDefinition', 'SchemaElementKind1Term', 'SchemaElementKind1Action', 'SchemaElementKind1EntityContainer', 'SchemaElementKind1Function'
  1141  	SchemaElementKind SchemaElementKind1 `json:"schemaElementKind,omitempty"`
  1142  	// Namespace - READ-ONLY
  1143  	Namespace *string `json:"namespace,omitempty"`
  1144  	// Name - READ-ONLY
  1145  	Name *string `json:"name,omitempty"`
  1146  }
  1147  
  1148  // MarshalJSON is the custom marshaler for IEdmTerm.
  1149  func (iet IEdmTerm) MarshalJSON() ([]byte, error) {
  1150  	objectMap := make(map[string]interface{})
  1151  	return json.Marshal(objectMap)
  1152  }
  1153  
  1154  // IEdmType ...
  1155  type IEdmType struct {
  1156  	// TypeKind - READ-ONLY; Possible values include: 'TypeKindNone', 'TypeKindPrimitive', 'TypeKindEntity', 'TypeKindComplex', 'TypeKindCollection', 'TypeKindEntityReference', 'TypeKindEnum', 'TypeKindTypeDefinition', 'TypeKindUntyped', 'TypeKindPath'
  1157  	TypeKind TypeKind `json:"typeKind,omitempty"`
  1158  }
  1159  
  1160  // MarshalJSON is the custom marshaler for IEdmType.
  1161  func (iet IEdmType) MarshalJSON() ([]byte, error) {
  1162  	objectMap := make(map[string]interface{})
  1163  	return json.Marshal(objectMap)
  1164  }
  1165  
  1166  // IEdmTypeReference ...
  1167  type IEdmTypeReference struct {
  1168  	// IsNullable - READ-ONLY
  1169  	IsNullable *bool `json:"isNullable,omitempty"`
  1170  	// Definition - READ-ONLY
  1171  	Definition *IEdmType `json:"definition,omitempty"`
  1172  }
  1173  
  1174  // MarshalJSON is the custom marshaler for IEdmTypeReference.
  1175  func (ietr IEdmTypeReference) MarshalJSON() ([]byte, error) {
  1176  	objectMap := make(map[string]interface{})
  1177  	return json.Marshal(objectMap)
  1178  }
  1179  
  1180  // IEdmVocabularyAnnotation ...
  1181  type IEdmVocabularyAnnotation struct {
  1182  	// Qualifier - READ-ONLY
  1183  	Qualifier *string `json:"qualifier,omitempty"`
  1184  	// Term - READ-ONLY
  1185  	Term *IEdmTerm `json:"term,omitempty"`
  1186  	// Target - READ-ONLY
  1187  	Target interface{} `json:"target,omitempty"`
  1188  	// Value - READ-ONLY
  1189  	Value *IEdmExpression `json:"value,omitempty"`
  1190  }
  1191  
  1192  // MarshalJSON is the custom marshaler for IEdmVocabularyAnnotation.
  1193  func (ieva IEdmVocabularyAnnotation) MarshalJSON() ([]byte, error) {
  1194  	objectMap := make(map[string]interface{})
  1195  	return json.Marshal(objectMap)
  1196  }
  1197  
  1198  // Machine machine REST resource.
  1199  type Machine struct {
  1200  	autorest.Response `json:"-"`
  1201  	// ID - Gets or sets the relative URL to get to this REST resource.
  1202  	ID *string `json:"id,omitempty"`
  1203  	// Name - Gets or sets the name of this REST resource.
  1204  	Name *string `json:"name,omitempty"`
  1205  	// Type - READ-ONLY; Gets the type of this REST resource.
  1206  	Type *string `json:"type,omitempty"`
  1207  	// Properties - Gets or sets the properties of the machine.
  1208  	Properties *MachineProperties `json:"properties,omitempty"`
  1209  }
  1210  
  1211  // MarshalJSON is the custom marshaler for Machine.
  1212  func (mVar Machine) MarshalJSON() ([]byte, error) {
  1213  	objectMap := make(map[string]interface{})
  1214  	if mVar.ID != nil {
  1215  		objectMap["id"] = mVar.ID
  1216  	}
  1217  	if mVar.Name != nil {
  1218  		objectMap["name"] = mVar.Name
  1219  	}
  1220  	if mVar.Properties != nil {
  1221  		objectMap["properties"] = mVar.Properties
  1222  	}
  1223  	return json.Marshal(objectMap)
  1224  }
  1225  
  1226  // MachineCollection collection of machines.
  1227  type MachineCollection struct {
  1228  	autorest.Response `json:"-"`
  1229  	// Value - Gets or sets the machines.
  1230  	Value *[]Machine `json:"value,omitempty"`
  1231  	// NextLink - Gets or sets the value of nextLink.
  1232  	NextLink *string `json:"nextLink,omitempty"`
  1233  }
  1234  
  1235  // MachineMigrateEventProperties properties of the machine error resource.
  1236  type MachineMigrateEventProperties struct {
  1237  	// Machine - Gets or sets the machine for which the error is being reported.
  1238  	Machine *string `json:"machine,omitempty"`
  1239  	// ErrorCode - Gets or sets the error code.
  1240  	ErrorCode *string `json:"errorCode,omitempty"`
  1241  	// ErrorMessage - Gets or sets the error message.
  1242  	ErrorMessage *string `json:"errorMessage,omitempty"`
  1243  	// Recommendation - Gets or sets the recommendation for the error.
  1244  	Recommendation *string `json:"recommendation,omitempty"`
  1245  	// PossibleCauses - Gets or sets the possible causes for the error.
  1246  	PossibleCauses *string `json:"possibleCauses,omitempty"`
  1247  	// Solution - Gets or sets the solution for which the error is being reported.
  1248  	Solution *string `json:"solution,omitempty"`
  1249  	// ClientRequestID - Gets or sets the client request Id of the payload for which the event is being reported.
  1250  	ClientRequestID *string `json:"clientRequestId,omitempty"`
  1251  	// InstanceType - Possible values include: 'InstanceTypeMigrateEventProperties', 'InstanceTypeServers', 'InstanceTypeDatabases'
  1252  	InstanceType InstanceType `json:"instanceType,omitempty"`
  1253  }
  1254  
  1255  // MarshalJSON is the custom marshaler for MachineMigrateEventProperties.
  1256  func (mmep MachineMigrateEventProperties) MarshalJSON() ([]byte, error) {
  1257  	mmep.InstanceType = InstanceTypeServers
  1258  	objectMap := make(map[string]interface{})
  1259  	if mmep.Machine != nil {
  1260  		objectMap["machine"] = mmep.Machine
  1261  	}
  1262  	if mmep.ErrorCode != nil {
  1263  		objectMap["errorCode"] = mmep.ErrorCode
  1264  	}
  1265  	if mmep.ErrorMessage != nil {
  1266  		objectMap["errorMessage"] = mmep.ErrorMessage
  1267  	}
  1268  	if mmep.Recommendation != nil {
  1269  		objectMap["recommendation"] = mmep.Recommendation
  1270  	}
  1271  	if mmep.PossibleCauses != nil {
  1272  		objectMap["possibleCauses"] = mmep.PossibleCauses
  1273  	}
  1274  	if mmep.Solution != nil {
  1275  		objectMap["solution"] = mmep.Solution
  1276  	}
  1277  	if mmep.ClientRequestID != nil {
  1278  		objectMap["clientRequestId"] = mmep.ClientRequestID
  1279  	}
  1280  	if mmep.InstanceType != "" {
  1281  		objectMap["instanceType"] = mmep.InstanceType
  1282  	}
  1283  	return json.Marshal(objectMap)
  1284  }
  1285  
  1286  // AsMachineMigrateEventProperties is the BasicEventProperties implementation for MachineMigrateEventProperties.
  1287  func (mmep MachineMigrateEventProperties) AsMachineMigrateEventProperties() (*MachineMigrateEventProperties, bool) {
  1288  	return &mmep, true
  1289  }
  1290  
  1291  // AsDatabaseMigrateEventProperties is the BasicEventProperties implementation for MachineMigrateEventProperties.
  1292  func (mmep MachineMigrateEventProperties) AsDatabaseMigrateEventProperties() (*DatabaseMigrateEventProperties, bool) {
  1293  	return nil, false
  1294  }
  1295  
  1296  // AsEventProperties is the BasicEventProperties implementation for MachineMigrateEventProperties.
  1297  func (mmep MachineMigrateEventProperties) AsEventProperties() (*EventProperties, bool) {
  1298  	return nil, false
  1299  }
  1300  
  1301  // AsBasicEventProperties is the BasicEventProperties implementation for MachineMigrateEventProperties.
  1302  func (mmep MachineMigrateEventProperties) AsBasicEventProperties() (BasicEventProperties, bool) {
  1303  	return &mmep, true
  1304  }
  1305  
  1306  // MachineProperties properties of the machine resource.
  1307  type MachineProperties struct {
  1308  	// DiscoveryData - Gets or sets the discovery details of the machine published by various sources.
  1309  	DiscoveryData *[]DiscoveryDetails `json:"discoveryData,omitempty"`
  1310  	// AssessmentData - Gets or sets the assessment details of the machine published by various sources.
  1311  	AssessmentData *[]AssessmentDetails `json:"assessmentData,omitempty"`
  1312  	// MigrationData - Gets or sets the migration details of the machine published by various sources.
  1313  	MigrationData *[]MigrationDetails `json:"migrationData,omitempty"`
  1314  	// LastUpdatedTime - Gets or sets the time of the last modification of the machine.
  1315  	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
  1316  }
  1317  
  1318  // MigrationDetails migration properties that can be shared by various publishers.
  1319  type MigrationDetails struct {
  1320  	// MigrationPhase - Gets or sets the phase of migration of the machine.
  1321  	MigrationPhase *string `json:"migrationPhase,omitempty"`
  1322  	// MigrationTested - Gets or sets a value indicating whether migration was tested on the machine.
  1323  	MigrationTested *bool `json:"migrationTested,omitempty"`
  1324  	// ReplicationProgressPercentage - Gets or sets the progress percentage of migration on the machine.
  1325  	ReplicationProgressPercentage *int32 `json:"replicationProgressPercentage,omitempty"`
  1326  	// TargetVMArmID - Gets or sets the ARM id the migrated VM.
  1327  	TargetVMArmID *string `json:"targetVMArmId,omitempty"`
  1328  	// EnqueueTime - Gets or sets the time the message was enqueued.
  1329  	EnqueueTime *string `json:"enqueueTime,omitempty"`
  1330  	// SolutionName - Gets or sets the name of the solution that sent the data.
  1331  	SolutionName *string `json:"solutionName,omitempty"`
  1332  	// MachineID - Gets or sets the unique identifier of the machine.
  1333  	MachineID *string `json:"machineId,omitempty"`
  1334  	// MachineManagerID - Gets or sets the unique identifier of the virtual machine manager(vCenter/VMM).
  1335  	MachineManagerID *string `json:"machineManagerId,omitempty"`
  1336  	// FabricType - Gets or sets the fabric type.
  1337  	FabricType *string `json:"fabricType,omitempty"`
  1338  	// LastUpdatedTime - Gets or sets the time of the last modification of the machine details.
  1339  	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
  1340  	// MachineName - Gets or sets the name of the machine.
  1341  	MachineName *string `json:"machineName,omitempty"`
  1342  	// IPAddresses - Gets or sets the list of IP addresses of the machine. IP addresses could be IP V4 or IP V6.
  1343  	IPAddresses *[]string `json:"ipAddresses,omitempty"`
  1344  	// Fqdn - Gets or sets the FQDN of the machine.
  1345  	Fqdn *string `json:"fqdn,omitempty"`
  1346  	// BiosID - Gets or sets the BIOS ID of the machine.
  1347  	BiosID *string `json:"biosId,omitempty"`
  1348  	// MacAddresses - Gets or sets the list of MAC addresses of the machine.
  1349  	MacAddresses *[]string `json:"macAddresses,omitempty"`
  1350  	// ExtendedInfo - Gets or sets the ISV specific extended information.
  1351  	ExtendedInfo map[string]*string `json:"extendedInfo"`
  1352  }
  1353  
  1354  // MarshalJSON is the custom marshaler for MigrationDetails.
  1355  func (md MigrationDetails) MarshalJSON() ([]byte, error) {
  1356  	objectMap := make(map[string]interface{})
  1357  	if md.MigrationPhase != nil {
  1358  		objectMap["migrationPhase"] = md.MigrationPhase
  1359  	}
  1360  	if md.MigrationTested != nil {
  1361  		objectMap["migrationTested"] = md.MigrationTested
  1362  	}
  1363  	if md.ReplicationProgressPercentage != nil {
  1364  		objectMap["replicationProgressPercentage"] = md.ReplicationProgressPercentage
  1365  	}
  1366  	if md.TargetVMArmID != nil {
  1367  		objectMap["targetVMArmId"] = md.TargetVMArmID
  1368  	}
  1369  	if md.EnqueueTime != nil {
  1370  		objectMap["enqueueTime"] = md.EnqueueTime
  1371  	}
  1372  	if md.SolutionName != nil {
  1373  		objectMap["solutionName"] = md.SolutionName
  1374  	}
  1375  	if md.MachineID != nil {
  1376  		objectMap["machineId"] = md.MachineID
  1377  	}
  1378  	if md.MachineManagerID != nil {
  1379  		objectMap["machineManagerId"] = md.MachineManagerID
  1380  	}
  1381  	if md.FabricType != nil {
  1382  		objectMap["fabricType"] = md.FabricType
  1383  	}
  1384  	if md.LastUpdatedTime != nil {
  1385  		objectMap["lastUpdatedTime"] = md.LastUpdatedTime
  1386  	}
  1387  	if md.MachineName != nil {
  1388  		objectMap["machineName"] = md.MachineName
  1389  	}
  1390  	if md.IPAddresses != nil {
  1391  		objectMap["ipAddresses"] = md.IPAddresses
  1392  	}
  1393  	if md.Fqdn != nil {
  1394  		objectMap["fqdn"] = md.Fqdn
  1395  	}
  1396  	if md.BiosID != nil {
  1397  		objectMap["biosId"] = md.BiosID
  1398  	}
  1399  	if md.MacAddresses != nil {
  1400  		objectMap["macAddresses"] = md.MacAddresses
  1401  	}
  1402  	if md.ExtendedInfo != nil {
  1403  		objectMap["extendedInfo"] = md.ExtendedInfo
  1404  	}
  1405  	return json.Marshal(objectMap)
  1406  }
  1407  
  1408  // ODataPath ...
  1409  type ODataPath struct {
  1410  	// EdmType - READ-ONLY
  1411  	EdmType *IEdmType `json:"edmType,omitempty"`
  1412  	// NavigationSource - READ-ONLY
  1413  	NavigationSource *IEdmNavigationSource `json:"navigationSource,omitempty"`
  1414  	// Segments - READ-ONLY
  1415  	Segments *[]ODataPathSegment `json:"segments,omitempty"`
  1416  	// PathTemplate - READ-ONLY
  1417  	PathTemplate *string `json:"pathTemplate,omitempty"`
  1418  	// Path - READ-ONLY
  1419  	Path *[]ODataPathSegment `json:"path,omitempty"`
  1420  }
  1421  
  1422  // MarshalJSON is the custom marshaler for ODataPath.
  1423  func (odp ODataPath) MarshalJSON() ([]byte, error) {
  1424  	objectMap := make(map[string]interface{})
  1425  	return json.Marshal(objectMap)
  1426  }
  1427  
  1428  // ODataPathSegment ...
  1429  type ODataPathSegment struct {
  1430  	// EdmType - READ-ONLY
  1431  	EdmType    *IEdmType `json:"edmType,omitempty"`
  1432  	Identifier *string   `json:"identifier,omitempty"`
  1433  }
  1434  
  1435  // MarshalJSON is the custom marshaler for ODataPathSegment.
  1436  func (odps ODataPathSegment) MarshalJSON() ([]byte, error) {
  1437  	objectMap := make(map[string]interface{})
  1438  	if odps.Identifier != nil {
  1439  		objectMap["identifier"] = odps.Identifier
  1440  	}
  1441  	return json.Marshal(objectMap)
  1442  }
  1443  
  1444  // ODataQueryContext ...
  1445  type ODataQueryContext struct {
  1446  	// DefaultQuerySettings - READ-ONLY
  1447  	DefaultQuerySettings *DefaultQuerySettings `json:"defaultQuerySettings,omitempty"`
  1448  	// Model - READ-ONLY
  1449  	Model *IEdmModel `json:"model,omitempty"`
  1450  	// ElementType - READ-ONLY
  1451  	ElementType *IEdmType `json:"elementType,omitempty"`
  1452  	// NavigationSource - READ-ONLY
  1453  	NavigationSource *IEdmNavigationSource `json:"navigationSource,omitempty"`
  1454  	// ElementClrType - READ-ONLY
  1455  	ElementClrType *string `json:"elementClrType,omitempty"`
  1456  	// Path - READ-ONLY
  1457  	Path *ODataPath `json:"path,omitempty"`
  1458  	// RequestContainer - READ-ONLY
  1459  	RequestContainer interface{} `json:"requestContainer,omitempty"`
  1460  }
  1461  
  1462  // MarshalJSON is the custom marshaler for ODataQueryContext.
  1463  func (odqc ODataQueryContext) MarshalJSON() ([]byte, error) {
  1464  	objectMap := make(map[string]interface{})
  1465  	return json.Marshal(objectMap)
  1466  }
  1467  
  1468  // ODataQueryOptions1 ...
  1469  type ODataQueryOptions1 struct {
  1470  	// Filter - READ-ONLY
  1471  	Filter *FilterQueryOption `json:"filter,omitempty"`
  1472  }
  1473  
  1474  // MarshalJSON is the custom marshaler for ODataQueryOptions1.
  1475  func (odqo ODataQueryOptions1) MarshalJSON() ([]byte, error) {
  1476  	objectMap := make(map[string]interface{})
  1477  	return json.Marshal(objectMap)
  1478  }
  1479  
  1480  // ODataRawQueryOptions ...
  1481  type ODataRawQueryOptions struct {
  1482  	// Filter - READ-ONLY
  1483  	Filter *string `json:"filter,omitempty"`
  1484  }
  1485  
  1486  // MarshalJSON is the custom marshaler for ODataRawQueryOptions.
  1487  func (odrqo ODataRawQueryOptions) MarshalJSON() ([]byte, error) {
  1488  	objectMap := make(map[string]interface{})
  1489  	return json.Marshal(objectMap)
  1490  }
  1491  
  1492  // Operation a REST API operation supported by the provider.
  1493  type Operation struct {
  1494  	// Name - READ-ONLY; Name of the operation.
  1495  	Name *string `json:"name,omitempty"`
  1496  	// Display - Displayable properties of the operation.
  1497  	Display *OperationDisplay `json:"display,omitempty"`
  1498  	// Origin - READ-ONLY; Origin of the operation.
  1499  	Origin *string `json:"origin,omitempty"`
  1500  }
  1501  
  1502  // MarshalJSON is the custom marshaler for Operation.
  1503  func (o Operation) MarshalJSON() ([]byte, error) {
  1504  	objectMap := make(map[string]interface{})
  1505  	if o.Display != nil {
  1506  		objectMap["display"] = o.Display
  1507  	}
  1508  	return json.Marshal(objectMap)
  1509  }
  1510  
  1511  // OperationDisplay displayable properties of the operation.
  1512  type OperationDisplay struct {
  1513  	// Provider - READ-ONLY; Provider of the operation.
  1514  	Provider *string `json:"provider,omitempty"`
  1515  	// Resource - READ-ONLY; Resource operated on by the operation.
  1516  	Resource *string `json:"resource,omitempty"`
  1517  	// Operation - READ-ONLY; Operation Type.
  1518  	Operation *string `json:"operation,omitempty"`
  1519  	// Description - READ-ONLY; Description of the operation.
  1520  	Description *string `json:"description,omitempty"`
  1521  }
  1522  
  1523  // MarshalJSON is the custom marshaler for OperationDisplay.
  1524  func (od OperationDisplay) MarshalJSON() ([]byte, error) {
  1525  	objectMap := make(map[string]interface{})
  1526  	return json.Marshal(objectMap)
  1527  }
  1528  
  1529  // OperationResultList list of API operations.
  1530  type OperationResultList struct {
  1531  	autorest.Response `json:"-"`
  1532  	// Value - List of operations.
  1533  	Value *[]Operation `json:"value,omitempty"`
  1534  }
  1535  
  1536  // Project migrate Project REST Resource.
  1537  type Project struct {
  1538  	autorest.Response `json:"-"`
  1539  	// ETag - Gets or sets the eTag for concurrency control.
  1540  	ETag *string `json:"eTag,omitempty"`
  1541  	// Location - Gets or sets the Azure location in which migrate project is created.
  1542  	Location *string `json:"location,omitempty"`
  1543  	// Properties - Gets or sets the nested properties.
  1544  	Properties *ProjectProperties `json:"properties,omitempty"`
  1545  	// ID - READ-ONLY; Gets the relative URL to get this migrate project.
  1546  	ID *string `json:"id,omitempty"`
  1547  	// Name - READ-ONLY; Gets the name of the migrate project.
  1548  	Name *string `json:"name,omitempty"`
  1549  	// Type - READ-ONLY; Handled by resource provider. Type = Microsoft.Migrate/MigrateProject.
  1550  	Type *string `json:"type,omitempty"`
  1551  	// Tags - Gets or sets the tags.
  1552  	Tags *ProjectTags `json:"tags,omitempty"`
  1553  }
  1554  
  1555  // MarshalJSON is the custom marshaler for Project.
  1556  func (p Project) MarshalJSON() ([]byte, error) {
  1557  	objectMap := make(map[string]interface{})
  1558  	if p.ETag != nil {
  1559  		objectMap["eTag"] = p.ETag
  1560  	}
  1561  	if p.Location != nil {
  1562  		objectMap["location"] = p.Location
  1563  	}
  1564  	if p.Properties != nil {
  1565  		objectMap["properties"] = p.Properties
  1566  	}
  1567  	if p.Tags != nil {
  1568  		objectMap["tags"] = p.Tags
  1569  	}
  1570  	return json.Marshal(objectMap)
  1571  }
  1572  
  1573  // ProjectProperties class for migrate project properties.
  1574  type ProjectProperties struct {
  1575  	// RegisteredTools - Gets or sets the list of tools registered with the migrate project.
  1576  	RegisteredTools *[]string `json:"registeredTools,omitempty"`
  1577  	// Summary - READ-ONLY; Gets the summary of the migrate project.
  1578  	Summary map[string]BasicProjectSummary `json:"summary"`
  1579  	// LastSummaryRefreshedTime - READ-ONLY; Gets the last time the project summary was refreshed.
  1580  	LastSummaryRefreshedTime *date.Time `json:"lastSummaryRefreshedTime,omitempty"`
  1581  	// RefreshSummaryState - READ-ONLY; Gets the refresh summary state. Possible values include: 'RefreshSummaryState1Started', 'RefreshSummaryState1InProgress', 'RefreshSummaryState1Completed', 'RefreshSummaryState1Failed'
  1582  	RefreshSummaryState RefreshSummaryState1 `json:"refreshSummaryState,omitempty"`
  1583  	// ProvisioningState - Provisioning state of the migrate project. Possible values include: 'ProvisioningStateAccepted', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed', 'ProvisioningStateMoving', 'ProvisioningStateSucceeded'
  1584  	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
  1585  }
  1586  
  1587  // MarshalJSON is the custom marshaler for ProjectProperties.
  1588  func (pp ProjectProperties) MarshalJSON() ([]byte, error) {
  1589  	objectMap := make(map[string]interface{})
  1590  	if pp.RegisteredTools != nil {
  1591  		objectMap["registeredTools"] = pp.RegisteredTools
  1592  	}
  1593  	if pp.ProvisioningState != "" {
  1594  		objectMap["provisioningState"] = pp.ProvisioningState
  1595  	}
  1596  	return json.Marshal(objectMap)
  1597  }
  1598  
  1599  // BasicProjectSummary the project summary class.
  1600  type BasicProjectSummary interface {
  1601  	AsServersProjectSummary() (*ServersProjectSummary, bool)
  1602  	AsDatabaseProjectSummary() (*DatabaseProjectSummary, bool)
  1603  	AsProjectSummary() (*ProjectSummary, bool)
  1604  }
  1605  
  1606  // ProjectSummary the project summary class.
  1607  type ProjectSummary struct {
  1608  	// RefreshSummaryState - Gets or sets the state of refresh summary. Possible values include: 'RefreshSummaryStateStarted', 'RefreshSummaryStateInProgress', 'RefreshSummaryStateCompleted', 'RefreshSummaryStateFailed'
  1609  	RefreshSummaryState RefreshSummaryState `json:"refreshSummaryState,omitempty"`
  1610  	// LastSummaryRefreshedTime - Gets or sets the time when summary was last refreshed.
  1611  	LastSummaryRefreshedTime *date.Time `json:"lastSummaryRefreshedTime,omitempty"`
  1612  	// ExtendedSummary - Gets or sets the extended summary.
  1613  	ExtendedSummary map[string]*string `json:"extendedSummary"`
  1614  	// InstanceType - Possible values include: 'InstanceTypeBasicProjectSummaryInstanceTypeProjectSummary', 'InstanceTypeBasicProjectSummaryInstanceTypeServers', 'InstanceTypeBasicProjectSummaryInstanceTypeDatabases'
  1615  	InstanceType InstanceTypeBasicProjectSummary `json:"instanceType,omitempty"`
  1616  }
  1617  
  1618  func unmarshalBasicProjectSummary(body []byte) (BasicProjectSummary, error) {
  1619  	var m map[string]interface{}
  1620  	err := json.Unmarshal(body, &m)
  1621  	if err != nil {
  1622  		return nil, err
  1623  	}
  1624  
  1625  	switch m["instanceType"] {
  1626  	case string(InstanceTypeBasicProjectSummaryInstanceTypeServers):
  1627  		var sps ServersProjectSummary
  1628  		err := json.Unmarshal(body, &sps)
  1629  		return sps, err
  1630  	case string(InstanceTypeBasicProjectSummaryInstanceTypeDatabases):
  1631  		var dps DatabaseProjectSummary
  1632  		err := json.Unmarshal(body, &dps)
  1633  		return dps, err
  1634  	default:
  1635  		var ps ProjectSummary
  1636  		err := json.Unmarshal(body, &ps)
  1637  		return ps, err
  1638  	}
  1639  }
  1640  func unmarshalBasicProjectSummaryArray(body []byte) ([]BasicProjectSummary, error) {
  1641  	var rawMessages []*json.RawMessage
  1642  	err := json.Unmarshal(body, &rawMessages)
  1643  	if err != nil {
  1644  		return nil, err
  1645  	}
  1646  
  1647  	psArray := make([]BasicProjectSummary, len(rawMessages))
  1648  
  1649  	for index, rawMessage := range rawMessages {
  1650  		ps, err := unmarshalBasicProjectSummary(*rawMessage)
  1651  		if err != nil {
  1652  			return nil, err
  1653  		}
  1654  		psArray[index] = ps
  1655  	}
  1656  	return psArray, nil
  1657  }
  1658  
  1659  // MarshalJSON is the custom marshaler for ProjectSummary.
  1660  func (ps ProjectSummary) MarshalJSON() ([]byte, error) {
  1661  	ps.InstanceType = InstanceTypeBasicProjectSummaryInstanceTypeProjectSummary
  1662  	objectMap := make(map[string]interface{})
  1663  	if ps.RefreshSummaryState != "" {
  1664  		objectMap["refreshSummaryState"] = ps.RefreshSummaryState
  1665  	}
  1666  	if ps.LastSummaryRefreshedTime != nil {
  1667  		objectMap["lastSummaryRefreshedTime"] = ps.LastSummaryRefreshedTime
  1668  	}
  1669  	if ps.ExtendedSummary != nil {
  1670  		objectMap["extendedSummary"] = ps.ExtendedSummary
  1671  	}
  1672  	if ps.InstanceType != "" {
  1673  		objectMap["instanceType"] = ps.InstanceType
  1674  	}
  1675  	return json.Marshal(objectMap)
  1676  }
  1677  
  1678  // AsServersProjectSummary is the BasicProjectSummary implementation for ProjectSummary.
  1679  func (ps ProjectSummary) AsServersProjectSummary() (*ServersProjectSummary, bool) {
  1680  	return nil, false
  1681  }
  1682  
  1683  // AsDatabaseProjectSummary is the BasicProjectSummary implementation for ProjectSummary.
  1684  func (ps ProjectSummary) AsDatabaseProjectSummary() (*DatabaseProjectSummary, bool) {
  1685  	return nil, false
  1686  }
  1687  
  1688  // AsProjectSummary is the BasicProjectSummary implementation for ProjectSummary.
  1689  func (ps ProjectSummary) AsProjectSummary() (*ProjectSummary, bool) {
  1690  	return &ps, true
  1691  }
  1692  
  1693  // AsBasicProjectSummary is the BasicProjectSummary implementation for ProjectSummary.
  1694  func (ps ProjectSummary) AsBasicProjectSummary() (BasicProjectSummary, bool) {
  1695  	return &ps, true
  1696  }
  1697  
  1698  // ProjectTags gets or sets the tags.
  1699  type ProjectTags struct {
  1700  	AdditionalProperties *string `json:"additionalProperties,omitempty"`
  1701  }
  1702  
  1703  // RangeVariable ...
  1704  type RangeVariable struct {
  1705  	// Name - READ-ONLY
  1706  	Name *string `json:"name,omitempty"`
  1707  	// TypeReference - READ-ONLY
  1708  	TypeReference *IEdmTypeReference `json:"typeReference,omitempty"`
  1709  	// Kind - READ-ONLY
  1710  	Kind *int32 `json:"kind,omitempty"`
  1711  }
  1712  
  1713  // MarshalJSON is the custom marshaler for RangeVariable.
  1714  func (rv RangeVariable) MarshalJSON() ([]byte, error) {
  1715  	objectMap := make(map[string]interface{})
  1716  	return json.Marshal(objectMap)
  1717  }
  1718  
  1719  // RefreshSummaryInput class representing the refresh summary input.
  1720  type RefreshSummaryInput struct {
  1721  	// Goal - Gets or sets the goal for which summary needs to be refreshed. Possible values include: 'Servers', 'Databases'
  1722  	Goal Goal `json:"goal,omitempty"`
  1723  }
  1724  
  1725  // RefreshSummaryResult class representing the refresh summary status of the migrate project.
  1726  type RefreshSummaryResult struct {
  1727  	autorest.Response `json:"-"`
  1728  	// IsRefreshed - Gets or sets a value indicating whether the migrate project summary is refreshed.
  1729  	IsRefreshed *bool `json:"isRefreshed,omitempty"`
  1730  }
  1731  
  1732  // RegisterToolInput class representing the register tool input.
  1733  type RegisterToolInput struct {
  1734  	// Tool - Gets or sets the tool to be registered. Possible values include: 'ServerDiscovery', 'ServerAssessment', 'ServerMigration', 'Cloudamize', 'Turbonomic', 'Zerto', 'CorentTech', 'ServerAssessmentV1', 'ServerMigrationReplication', 'Carbonite', 'DataMigrationAssistant', 'DatabaseMigrationService'
  1735  	Tool Tool `json:"tool,omitempty"`
  1736  }
  1737  
  1738  // RegistrationResult class representing the registration status of a tool with the migrate project.
  1739  type RegistrationResult struct {
  1740  	autorest.Response `json:"-"`
  1741  	// IsRegistered - Gets or sets a value indicating whether the tool is registered or not.
  1742  	IsRegistered *bool `json:"isRegistered,omitempty"`
  1743  }
  1744  
  1745  // SelectExpandClause ...
  1746  type SelectExpandClause struct {
  1747  	// SelectedItems - READ-ONLY
  1748  	SelectedItems *[]interface{} `json:"selectedItems,omitempty"`
  1749  	// AllSelected - READ-ONLY
  1750  	AllSelected *bool `json:"allSelected,omitempty"`
  1751  }
  1752  
  1753  // MarshalJSON is the custom marshaler for SelectExpandClause.
  1754  func (sec SelectExpandClause) MarshalJSON() ([]byte, error) {
  1755  	objectMap := make(map[string]interface{})
  1756  	return json.Marshal(objectMap)
  1757  }
  1758  
  1759  // ServersProjectSummary class representing the servers project summary.
  1760  type ServersProjectSummary struct {
  1761  	// DiscoveredCount - Gets or sets the count of entities discovered.
  1762  	DiscoveredCount *int32 `json:"discoveredCount,omitempty"`
  1763  	// AssessedCount - Gets or sets the count of entities assessed.
  1764  	AssessedCount *int32 `json:"assessedCount,omitempty"`
  1765  	// ReplicatingCount - Gets or sets the count of entities being replicated.
  1766  	ReplicatingCount *int32 `json:"replicatingCount,omitempty"`
  1767  	// TestMigratedCount - Gets or sets the count of entities test migrated.
  1768  	TestMigratedCount *int32 `json:"testMigratedCount,omitempty"`
  1769  	// MigratedCount - Gets or sets the count of entities migrated.
  1770  	MigratedCount *int32 `json:"migratedCount,omitempty"`
  1771  	// RefreshSummaryState - Gets or sets the state of refresh summary. Possible values include: 'RefreshSummaryStateStarted', 'RefreshSummaryStateInProgress', 'RefreshSummaryStateCompleted', 'RefreshSummaryStateFailed'
  1772  	RefreshSummaryState RefreshSummaryState `json:"refreshSummaryState,omitempty"`
  1773  	// LastSummaryRefreshedTime - Gets or sets the time when summary was last refreshed.
  1774  	LastSummaryRefreshedTime *date.Time `json:"lastSummaryRefreshedTime,omitempty"`
  1775  	// ExtendedSummary - Gets or sets the extended summary.
  1776  	ExtendedSummary map[string]*string `json:"extendedSummary"`
  1777  	// InstanceType - Possible values include: 'InstanceTypeBasicProjectSummaryInstanceTypeProjectSummary', 'InstanceTypeBasicProjectSummaryInstanceTypeServers', 'InstanceTypeBasicProjectSummaryInstanceTypeDatabases'
  1778  	InstanceType InstanceTypeBasicProjectSummary `json:"instanceType,omitempty"`
  1779  }
  1780  
  1781  // MarshalJSON is the custom marshaler for ServersProjectSummary.
  1782  func (sps ServersProjectSummary) MarshalJSON() ([]byte, error) {
  1783  	sps.InstanceType = InstanceTypeBasicProjectSummaryInstanceTypeServers
  1784  	objectMap := make(map[string]interface{})
  1785  	if sps.DiscoveredCount != nil {
  1786  		objectMap["discoveredCount"] = sps.DiscoveredCount
  1787  	}
  1788  	if sps.AssessedCount != nil {
  1789  		objectMap["assessedCount"] = sps.AssessedCount
  1790  	}
  1791  	if sps.ReplicatingCount != nil {
  1792  		objectMap["replicatingCount"] = sps.ReplicatingCount
  1793  	}
  1794  	if sps.TestMigratedCount != nil {
  1795  		objectMap["testMigratedCount"] = sps.TestMigratedCount
  1796  	}
  1797  	if sps.MigratedCount != nil {
  1798  		objectMap["migratedCount"] = sps.MigratedCount
  1799  	}
  1800  	if sps.RefreshSummaryState != "" {
  1801  		objectMap["refreshSummaryState"] = sps.RefreshSummaryState
  1802  	}
  1803  	if sps.LastSummaryRefreshedTime != nil {
  1804  		objectMap["lastSummaryRefreshedTime"] = sps.LastSummaryRefreshedTime
  1805  	}
  1806  	if sps.ExtendedSummary != nil {
  1807  		objectMap["extendedSummary"] = sps.ExtendedSummary
  1808  	}
  1809  	if sps.InstanceType != "" {
  1810  		objectMap["instanceType"] = sps.InstanceType
  1811  	}
  1812  	return json.Marshal(objectMap)
  1813  }
  1814  
  1815  // AsServersProjectSummary is the BasicProjectSummary implementation for ServersProjectSummary.
  1816  func (sps ServersProjectSummary) AsServersProjectSummary() (*ServersProjectSummary, bool) {
  1817  	return &sps, true
  1818  }
  1819  
  1820  // AsDatabaseProjectSummary is the BasicProjectSummary implementation for ServersProjectSummary.
  1821  func (sps ServersProjectSummary) AsDatabaseProjectSummary() (*DatabaseProjectSummary, bool) {
  1822  	return nil, false
  1823  }
  1824  
  1825  // AsProjectSummary is the BasicProjectSummary implementation for ServersProjectSummary.
  1826  func (sps ServersProjectSummary) AsProjectSummary() (*ProjectSummary, bool) {
  1827  	return nil, false
  1828  }
  1829  
  1830  // AsBasicProjectSummary is the BasicProjectSummary implementation for ServersProjectSummary.
  1831  func (sps ServersProjectSummary) AsBasicProjectSummary() (BasicProjectSummary, bool) {
  1832  	return &sps, true
  1833  }
  1834  
  1835  // ServersSolutionSummary class representing the servers solution summary.
  1836  type ServersSolutionSummary struct {
  1837  	// DiscoveredCount - Gets or sets the count of servers discovered.
  1838  	DiscoveredCount *int32 `json:"discoveredCount,omitempty"`
  1839  	// AssessedCount - Gets or sets the count of servers assessed.
  1840  	AssessedCount *int32 `json:"assessedCount,omitempty"`
  1841  	// ReplicatingCount - Gets or sets the count of servers being replicated.
  1842  	ReplicatingCount *int32 `json:"replicatingCount,omitempty"`
  1843  	// TestMigratedCount - Gets or sets the count of servers test migrated.
  1844  	TestMigratedCount *int32 `json:"testMigratedCount,omitempty"`
  1845  	// MigratedCount - Gets or sets the count of servers migrated.
  1846  	MigratedCount *int32 `json:"migratedCount,omitempty"`
  1847  	// InstanceType - Possible values include: 'InstanceTypeBasicSolutionSummaryInstanceTypeSolutionSummary', 'InstanceTypeBasicSolutionSummaryInstanceTypeServers', 'InstanceTypeBasicSolutionSummaryInstanceTypeDatabases'
  1848  	InstanceType InstanceTypeBasicSolutionSummary `json:"instanceType,omitempty"`
  1849  }
  1850  
  1851  // MarshalJSON is the custom marshaler for ServersSolutionSummary.
  1852  func (sss ServersSolutionSummary) MarshalJSON() ([]byte, error) {
  1853  	sss.InstanceType = InstanceTypeBasicSolutionSummaryInstanceTypeServers
  1854  	objectMap := make(map[string]interface{})
  1855  	if sss.DiscoveredCount != nil {
  1856  		objectMap["discoveredCount"] = sss.DiscoveredCount
  1857  	}
  1858  	if sss.AssessedCount != nil {
  1859  		objectMap["assessedCount"] = sss.AssessedCount
  1860  	}
  1861  	if sss.ReplicatingCount != nil {
  1862  		objectMap["replicatingCount"] = sss.ReplicatingCount
  1863  	}
  1864  	if sss.TestMigratedCount != nil {
  1865  		objectMap["testMigratedCount"] = sss.TestMigratedCount
  1866  	}
  1867  	if sss.MigratedCount != nil {
  1868  		objectMap["migratedCount"] = sss.MigratedCount
  1869  	}
  1870  	if sss.InstanceType != "" {
  1871  		objectMap["instanceType"] = sss.InstanceType
  1872  	}
  1873  	return json.Marshal(objectMap)
  1874  }
  1875  
  1876  // AsServersSolutionSummary is the BasicSolutionSummary implementation for ServersSolutionSummary.
  1877  func (sss ServersSolutionSummary) AsServersSolutionSummary() (*ServersSolutionSummary, bool) {
  1878  	return &sss, true
  1879  }
  1880  
  1881  // AsDatabasesSolutionSummary is the BasicSolutionSummary implementation for ServersSolutionSummary.
  1882  func (sss ServersSolutionSummary) AsDatabasesSolutionSummary() (*DatabasesSolutionSummary, bool) {
  1883  	return nil, false
  1884  }
  1885  
  1886  // AsSolutionSummary is the BasicSolutionSummary implementation for ServersSolutionSummary.
  1887  func (sss ServersSolutionSummary) AsSolutionSummary() (*SolutionSummary, bool) {
  1888  	return nil, false
  1889  }
  1890  
  1891  // AsBasicSolutionSummary is the BasicSolutionSummary implementation for ServersSolutionSummary.
  1892  func (sss ServersSolutionSummary) AsBasicSolutionSummary() (BasicSolutionSummary, bool) {
  1893  	return &sss, true
  1894  }
  1895  
  1896  // SingleValueNode ...
  1897  type SingleValueNode struct {
  1898  	// TypeReference - READ-ONLY
  1899  	TypeReference *IEdmTypeReference `json:"typeReference,omitempty"`
  1900  	// Kind - READ-ONLY; Possible values include: 'KindNone', 'KindConstant', 'KindConvert', 'KindNonResourceRangeVariableReference', 'KindBinaryOperator', 'KindUnaryOperator', 'KindSingleValuePropertyAccess', 'KindCollectionPropertyAccess', 'KindSingleValueFunctionCall', 'KindAny', 'KindCollectionNavigationNode', 'KindSingleNavigationNode', 'KindSingleValueOpenPropertyAccess', 'KindSingleResourceCast', 'KindAll', 'KindCollectionResourceCast', 'KindResourceRangeVariableReference', 'KindSingleResourceFunctionCall', 'KindCollectionFunctionCall', 'KindCollectionResourceFunctionCall', 'KindNamedFunctionParameter', 'KindParameterAlias', 'KindEntitySet', 'KindKeyLookup', 'KindSearchTerm', 'KindCollectionOpenPropertyAccess', 'KindCollectionComplexNode', 'KindSingleComplexNode', 'KindCount', 'KindSingleValueCast', 'KindCollectionPropertyNode', 'KindAggregatedCollectionPropertyNode', 'KindIn', 'KindCollectionConstant'
  1901  	Kind Kind `json:"kind,omitempty"`
  1902  }
  1903  
  1904  // MarshalJSON is the custom marshaler for SingleValueNode.
  1905  func (svn SingleValueNode) MarshalJSON() ([]byte, error) {
  1906  	objectMap := make(map[string]interface{})
  1907  	return json.Marshal(objectMap)
  1908  }
  1909  
  1910  // Solution solution REST Resource.
  1911  type Solution struct {
  1912  	autorest.Response `json:"-"`
  1913  	// ID - READ-ONLY; Gets the relative URL to get to this REST resource.
  1914  	ID *string `json:"id,omitempty"`
  1915  	// Name - READ-ONLY; Gets the name of this REST resource.
  1916  	Name *string `json:"name,omitempty"`
  1917  	// Type - READ-ONLY; Gets the type of this REST resource.
  1918  	Type *string `json:"type,omitempty"`
  1919  	// Etag - Gets or sets the ETAG for optimistic concurrency control.
  1920  	Etag *string `json:"etag,omitempty"`
  1921  	// Properties - Gets or sets the properties of the solution.
  1922  	Properties *SolutionProperties `json:"properties,omitempty"`
  1923  }
  1924  
  1925  // MarshalJSON is the custom marshaler for Solution.
  1926  func (s Solution) MarshalJSON() ([]byte, error) {
  1927  	objectMap := make(map[string]interface{})
  1928  	if s.Etag != nil {
  1929  		objectMap["etag"] = s.Etag
  1930  	}
  1931  	if s.Properties != nil {
  1932  		objectMap["properties"] = s.Properties
  1933  	}
  1934  	return json.Marshal(objectMap)
  1935  }
  1936  
  1937  // SolutionConfig class representing the config for the solution in the migrate project.
  1938  type SolutionConfig struct {
  1939  	autorest.Response `json:"-"`
  1940  	// PublisherSasURI - Gets or sets the publisher sas uri for the solution.
  1941  	PublisherSasURI *string `json:"publisherSasUri,omitempty"`
  1942  }
  1943  
  1944  // SolutionDetails class representing the details of the solution.
  1945  type SolutionDetails struct {
  1946  	// GroupCount - Gets or sets the count of groups reported by the solution.
  1947  	GroupCount *int32 `json:"groupCount,omitempty"`
  1948  	// AssessmentCount - Gets or sets the count of assessments reported by the solution.
  1949  	AssessmentCount *int32 `json:"assessmentCount,omitempty"`
  1950  	// ExtendedDetails - Gets or sets the extended details reported by the solution.
  1951  	ExtendedDetails map[string]*string `json:"extendedDetails"`
  1952  }
  1953  
  1954  // MarshalJSON is the custom marshaler for SolutionDetails.
  1955  func (sd SolutionDetails) MarshalJSON() ([]byte, error) {
  1956  	objectMap := make(map[string]interface{})
  1957  	if sd.GroupCount != nil {
  1958  		objectMap["groupCount"] = sd.GroupCount
  1959  	}
  1960  	if sd.AssessmentCount != nil {
  1961  		objectMap["assessmentCount"] = sd.AssessmentCount
  1962  	}
  1963  	if sd.ExtendedDetails != nil {
  1964  		objectMap["extendedDetails"] = sd.ExtendedDetails
  1965  	}
  1966  	return json.Marshal(objectMap)
  1967  }
  1968  
  1969  // SolutionProperties class for solution properties.
  1970  type SolutionProperties struct {
  1971  	// Tool - Gets or sets the tool being used in the solution. Possible values include: 'Tool1ServerDiscovery', 'Tool1ServerAssessment', 'Tool1ServerMigration', 'Tool1Cloudamize', 'Tool1Turbonomic', 'Tool1Zerto', 'Tool1CorentTech', 'Tool1ServerAssessmentV1', 'Tool1ServerMigrationReplication', 'Tool1Carbonite', 'Tool1DataMigrationAssistant', 'Tool1DatabaseMigrationService'
  1972  	Tool Tool1 `json:"tool,omitempty"`
  1973  	// Purpose - Gets or sets the purpose of the solution. Possible values include: 'Discovery', 'Assessment', 'Migration'
  1974  	Purpose Purpose `json:"purpose,omitempty"`
  1975  	// Goal - Gets or sets the goal of the solution. Possible values include: 'Goal1Servers', 'Goal1Databases'
  1976  	Goal Goal1 `json:"goal,omitempty"`
  1977  	// Status - Gets or sets the current status of the solution. Possible values include: 'Inactive', 'Active'
  1978  	Status Status `json:"status,omitempty"`
  1979  	// CleanupState - Gets or sets the cleanup state of the solution. Possible values include: 'None', 'Started', 'InProgress', 'Completed', 'Failed'
  1980  	CleanupState CleanupState `json:"cleanupState,omitempty"`
  1981  	// Summary - Gets or sets the summary of the solution.
  1982  	Summary BasicSolutionSummary `json:"summary,omitempty"`
  1983  	// Details - Gets or sets the details of the solution.
  1984  	Details *SolutionDetails `json:"details,omitempty"`
  1985  }
  1986  
  1987  // UnmarshalJSON is the custom unmarshaler for SolutionProperties struct.
  1988  func (sp *SolutionProperties) UnmarshalJSON(body []byte) error {
  1989  	var m map[string]*json.RawMessage
  1990  	err := json.Unmarshal(body, &m)
  1991  	if err != nil {
  1992  		return err
  1993  	}
  1994  	for k, v := range m {
  1995  		switch k {
  1996  		case "tool":
  1997  			if v != nil {
  1998  				var tool Tool1
  1999  				err = json.Unmarshal(*v, &tool)
  2000  				if err != nil {
  2001  					return err
  2002  				}
  2003  				sp.Tool = tool
  2004  			}
  2005  		case "purpose":
  2006  			if v != nil {
  2007  				var purpose Purpose
  2008  				err = json.Unmarshal(*v, &purpose)
  2009  				if err != nil {
  2010  					return err
  2011  				}
  2012  				sp.Purpose = purpose
  2013  			}
  2014  		case "goal":
  2015  			if v != nil {
  2016  				var goal Goal1
  2017  				err = json.Unmarshal(*v, &goal)
  2018  				if err != nil {
  2019  					return err
  2020  				}
  2021  				sp.Goal = goal
  2022  			}
  2023  		case "status":
  2024  			if v != nil {
  2025  				var status Status
  2026  				err = json.Unmarshal(*v, &status)
  2027  				if err != nil {
  2028  					return err
  2029  				}
  2030  				sp.Status = status
  2031  			}
  2032  		case "cleanupState":
  2033  			if v != nil {
  2034  				var cleanupState CleanupState
  2035  				err = json.Unmarshal(*v, &cleanupState)
  2036  				if err != nil {
  2037  					return err
  2038  				}
  2039  				sp.CleanupState = cleanupState
  2040  			}
  2041  		case "summary":
  2042  			if v != nil {
  2043  				summary, err := unmarshalBasicSolutionSummary(*v)
  2044  				if err != nil {
  2045  					return err
  2046  				}
  2047  				sp.Summary = summary
  2048  			}
  2049  		case "details":
  2050  			if v != nil {
  2051  				var details SolutionDetails
  2052  				err = json.Unmarshal(*v, &details)
  2053  				if err != nil {
  2054  					return err
  2055  				}
  2056  				sp.Details = &details
  2057  			}
  2058  		}
  2059  	}
  2060  
  2061  	return nil
  2062  }
  2063  
  2064  // SolutionsCollection collection of solutions.
  2065  type SolutionsCollection struct {
  2066  	autorest.Response `json:"-"`
  2067  	// Value - Gets or sets the list of solutions.
  2068  	Value *[]Solution `json:"value,omitempty"`
  2069  	// NextLink - Gets or sets the value of next link.
  2070  	NextLink *string `json:"nextLink,omitempty"`
  2071  }
  2072  
  2073  // BasicSolutionSummary the solution summary class.
  2074  type BasicSolutionSummary interface {
  2075  	AsServersSolutionSummary() (*ServersSolutionSummary, bool)
  2076  	AsDatabasesSolutionSummary() (*DatabasesSolutionSummary, bool)
  2077  	AsSolutionSummary() (*SolutionSummary, bool)
  2078  }
  2079  
  2080  // SolutionSummary the solution summary class.
  2081  type SolutionSummary struct {
  2082  	// InstanceType - Possible values include: 'InstanceTypeBasicSolutionSummaryInstanceTypeSolutionSummary', 'InstanceTypeBasicSolutionSummaryInstanceTypeServers', 'InstanceTypeBasicSolutionSummaryInstanceTypeDatabases'
  2083  	InstanceType InstanceTypeBasicSolutionSummary `json:"instanceType,omitempty"`
  2084  }
  2085  
  2086  func unmarshalBasicSolutionSummary(body []byte) (BasicSolutionSummary, error) {
  2087  	var m map[string]interface{}
  2088  	err := json.Unmarshal(body, &m)
  2089  	if err != nil {
  2090  		return nil, err
  2091  	}
  2092  
  2093  	switch m["instanceType"] {
  2094  	case string(InstanceTypeBasicSolutionSummaryInstanceTypeServers):
  2095  		var sss ServersSolutionSummary
  2096  		err := json.Unmarshal(body, &sss)
  2097  		return sss, err
  2098  	case string(InstanceTypeBasicSolutionSummaryInstanceTypeDatabases):
  2099  		var dss DatabasesSolutionSummary
  2100  		err := json.Unmarshal(body, &dss)
  2101  		return dss, err
  2102  	default:
  2103  		var ss SolutionSummary
  2104  		err := json.Unmarshal(body, &ss)
  2105  		return ss, err
  2106  	}
  2107  }
  2108  func unmarshalBasicSolutionSummaryArray(body []byte) ([]BasicSolutionSummary, error) {
  2109  	var rawMessages []*json.RawMessage
  2110  	err := json.Unmarshal(body, &rawMessages)
  2111  	if err != nil {
  2112  		return nil, err
  2113  	}
  2114  
  2115  	ssArray := make([]BasicSolutionSummary, len(rawMessages))
  2116  
  2117  	for index, rawMessage := range rawMessages {
  2118  		ss, err := unmarshalBasicSolutionSummary(*rawMessage)
  2119  		if err != nil {
  2120  			return nil, err
  2121  		}
  2122  		ssArray[index] = ss
  2123  	}
  2124  	return ssArray, nil
  2125  }
  2126  
  2127  // MarshalJSON is the custom marshaler for SolutionSummary.
  2128  func (ss SolutionSummary) MarshalJSON() ([]byte, error) {
  2129  	ss.InstanceType = InstanceTypeBasicSolutionSummaryInstanceTypeSolutionSummary
  2130  	objectMap := make(map[string]interface{})
  2131  	if ss.InstanceType != "" {
  2132  		objectMap["instanceType"] = ss.InstanceType
  2133  	}
  2134  	return json.Marshal(objectMap)
  2135  }
  2136  
  2137  // AsServersSolutionSummary is the BasicSolutionSummary implementation for SolutionSummary.
  2138  func (ss SolutionSummary) AsServersSolutionSummary() (*ServersSolutionSummary, bool) {
  2139  	return nil, false
  2140  }
  2141  
  2142  // AsDatabasesSolutionSummary is the BasicSolutionSummary implementation for SolutionSummary.
  2143  func (ss SolutionSummary) AsDatabasesSolutionSummary() (*DatabasesSolutionSummary, bool) {
  2144  	return nil, false
  2145  }
  2146  
  2147  // AsSolutionSummary is the BasicSolutionSummary implementation for SolutionSummary.
  2148  func (ss SolutionSummary) AsSolutionSummary() (*SolutionSummary, bool) {
  2149  	return &ss, true
  2150  }
  2151  
  2152  // AsBasicSolutionSummary is the BasicSolutionSummary implementation for SolutionSummary.
  2153  func (ss SolutionSummary) AsBasicSolutionSummary() (BasicSolutionSummary, bool) {
  2154  	return &ss, true
  2155  }
  2156  
  2157  // TransformationNode ...
  2158  type TransformationNode struct {
  2159  	// Kind - READ-ONLY; Possible values include: 'Aggregate', 'GroupBy', 'Filter', 'Compute'
  2160  	Kind Kind1 `json:"kind,omitempty"`
  2161  }
  2162  
  2163  // MarshalJSON is the custom marshaler for TransformationNode.
  2164  func (tn TransformationNode) MarshalJSON() ([]byte, error) {
  2165  	objectMap := make(map[string]interface{})
  2166  	return json.Marshal(objectMap)
  2167  }
  2168  

View as plain text