1package 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 9import ( 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. 16const fqdn = "github.com/Azure/azure-sdk-for-go/services/migrate/mgmt/2018-02-02/migrate" 17 18// AssessedDisk a disk assessed for an assessment. 19type AssessedDisk struct { 20 // Name - READ-ONLY; Name of the assessed disk. 21 Name *string `json:"name,omitempty"` 22 // GigabytesProvisioned - READ-ONLY; Gigabytes of storage provisioned for this disk. 23 GigabytesProvisioned *float64 `json:"gigabytesProvisioned,omitempty"` 24 // GigabytesConsumed - READ-ONLY; Gigabytes of storage consumed by this disk. 25 GigabytesConsumed *float64 `json:"gigabytesConsumed,omitempty"` 26 // MegabytesPerSecondOfRead - READ-ONLY; Disk throughput in MegaBytes per second. 27 MegabytesPerSecondOfRead *float64 `json:"megabytesPerSecondOfRead,omitempty"` 28 // MegabytesPerSecondOfReadDataPointsExpected - READ-ONLY; Expected data points for MegaBytes per second of read. 29 MegabytesPerSecondOfReadDataPointsExpected *int32 `json:"megabytesPerSecondOfReadDataPointsExpected,omitempty"` 30 // MegabytesPerSecondOfReadDataPointsReceived - READ-ONLY; Received data points for MegaBytes per second of read. 31 MegabytesPerSecondOfReadDataPointsReceived *int32 `json:"megabytesPerSecondOfReadDataPointsReceived,omitempty"` 32 // MegabytesPerSecondOfWrite - READ-ONLY; Disk throughput in MegaBytes per second. 33 MegabytesPerSecondOfWrite *float64 `json:"megabytesPerSecondOfWrite,omitempty"` 34 // MegabytesPerSecondOfWriteDataPointsExpected - READ-ONLY; Expected data points for MegaBytes per second of write. 35 MegabytesPerSecondOfWriteDataPointsExpected *int32 `json:"megabytesPerSecondOfWriteDataPointsExpected,omitempty"` 36 // MegabytesPerSecondOfWriteDataPointsReceived - READ-ONLY; Received data points for MegaBytes per second of write. 37 MegabytesPerSecondOfWriteDataPointsReceived *int32 `json:"megabytesPerSecondOfWriteDataPointsReceived,omitempty"` 38 // NumberOfReadOperationsPerSecond - READ-ONLY; Number of read operations per second for the disk. 39 NumberOfReadOperationsPerSecond *float64 `json:"numberOfReadOperationsPerSecond,omitempty"` 40 // NumberOfReadOperationsPerSecondDataPointsExpected - READ-ONLY; Expected number of data points for read operations per second. 41 NumberOfReadOperationsPerSecondDataPointsExpected *int32 `json:"numberOfReadOperationsPerSecondDataPointsExpected,omitempty"` 42 // NumberOfReadOperationsPerSecondDataPointsReceived - READ-ONLY; Received number of data points for read operations per second. 43 NumberOfReadOperationsPerSecondDataPointsReceived *int32 `json:"numberOfReadOperationsPerSecondDataPointsReceived,omitempty"` 44 // NumberOfWriteOperationsPerSecond - READ-ONLY; Number of read and write operations per second for the disk. 45 NumberOfWriteOperationsPerSecond *float64 `json:"numberOfWriteOperationsPerSecond,omitempty"` 46 // NumberOfWriteOperationsPerSecondDataPointsExpected - READ-ONLY; Expected number of data points for write operations per second. 47 NumberOfWriteOperationsPerSecondDataPointsExpected *int32 `json:"numberOfWriteOperationsPerSecondDataPointsExpected,omitempty"` 48 // NumberOfWriteOperationsPerSecondDataPointsReceived - READ-ONLY; Received number of data points for write operations per second. 49 NumberOfWriteOperationsPerSecondDataPointsReceived *int32 `json:"numberOfWriteOperationsPerSecondDataPointsReceived,omitempty"` 50 // MonthlyStorageCost - READ-ONLY; Estimated aggregate storage cost for a 31-day month for this disk. 51 MonthlyStorageCost *float64 `json:"monthlyStorageCost,omitempty"` 52 // RecommendedDiskType - READ-ONLY; Storage type selected for this disk. Possible values include: 'AzureDiskTypeUnknown', 'AzureDiskTypeStandard', 'AzureDiskTypePremium' 53 RecommendedDiskType AzureDiskType `json:"recommendedDiskType,omitempty"` 54 // RecommendedDiskSize - READ-ONLY; Recommended Azure size for the disk, given utilization data and preferences set on Assessment. Possible values include: 'Unknown', 'StandardS4', 'StandardS6', 'StandardS10', 'StandardS20', 'StandardS30', 'StandardS40', 'StandardS50', 'PremiumP4', 'PremiumP6', 'PremiumP10', 'PremiumP20', 'PremiumP30', 'PremiumP40', 'PremiumP50' 55 RecommendedDiskSize AzureDiskSize `json:"recommendedDiskSize,omitempty"` 56 // GigabytesForRecommendedDiskSize - READ-ONLY; Gigabytes of storage provided by the recommended Azure disk size. 57 GigabytesForRecommendedDiskSize *int32 `json:"gigabytesForRecommendedDiskSize,omitempty"` 58 // Suitability - READ-ONLY; Whether this disk is suitable for Azure. Possible values include: 'CloudSuitabilityUnknown', 'CloudSuitabilityNotSuitable', 'CloudSuitabilitySuitable', 'CloudSuitabilityConditionallySuitable', 'CloudSuitabilityReadinessUnknown' 59 Suitability CloudSuitability `json:"suitability,omitempty"` 60 // SuitabilityExplanation - READ-ONLY; If disk is suitable, this explains the reasons and mitigation steps. Possible values include: 'AzureDiskSuitabilityExplanationUnknown', 'AzureDiskSuitabilityExplanationNotApplicable', 'AzureDiskSuitabilityExplanationDiskSizeGreaterThanSupported', 'AzureDiskSuitabilityExplanationNoSuitableDiskSizeForIops', 'AzureDiskSuitabilityExplanationNoSuitableDiskSizeForThroughput', 'AzureDiskSuitabilityExplanationNoDiskSizeFoundInSelectedLocation', 'AzureDiskSuitabilityExplanationNoDiskSizeFoundForSelectedRedundancy', 'AzureDiskSuitabilityExplanationInternalErrorOccurredForDiskEvaluation' 61 SuitabilityExplanation AzureDiskSuitabilityExplanation `json:"suitabilityExplanation,omitempty"` 62} 63 64// MarshalJSON is the custom marshaler for AssessedDisk. 65func (ad AssessedDisk) MarshalJSON() ([]byte, error) { 66 objectMap := make(map[string]interface{}) 67 return json.Marshal(objectMap) 68} 69 70// AssessedMachine a machine evaluated as part of an assessment. 71type AssessedMachine struct { 72 autorest.Response `json:"-"` 73 // ID - READ-ONLY; Path reference to this assessed machine. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}/groups/{groupName}/assessments/{assessmentName}/assessedMachines/{assessedMachineName} 74 ID *string `json:"id,omitempty"` 75 // Name - READ-ONLY; Name of the machine. 76 Name *string `json:"name,omitempty"` 77 // ETag - For optimistic concurrency control. 78 ETag *string `json:"eTag,omitempty"` 79 // Type - READ-ONLY; Type of the object = [Microsoft.Migrate/projects/groups/assessments/assessedMachines]. 80 Type *string `json:"type,omitempty"` 81 // AssessedMachineProperties - Properties of an assessed machine. 82 *AssessedMachineProperties `json:"properties,omitempty"` 83} 84 85// MarshalJSON is the custom marshaler for AssessedMachine. 86func (am AssessedMachine) MarshalJSON() ([]byte, error) { 87 objectMap := make(map[string]interface{}) 88 if am.ETag != nil { 89 objectMap["eTag"] = am.ETag 90 } 91 if am.AssessedMachineProperties != nil { 92 objectMap["properties"] = am.AssessedMachineProperties 93 } 94 return json.Marshal(objectMap) 95} 96 97// UnmarshalJSON is the custom unmarshaler for AssessedMachine struct. 98func (am *AssessedMachine) UnmarshalJSON(body []byte) error { 99 var m map[string]*json.RawMessage 100 err := json.Unmarshal(body, &m) 101 if err != nil { 102 return err 103 } 104 for k, v := range m { 105 switch k { 106 case "id": 107 if v != nil { 108 var ID string 109 err = json.Unmarshal(*v, &ID) 110 if err != nil { 111 return err 112 } 113 am.ID = &ID 114 } 115 case "name": 116 if v != nil { 117 var name string 118 err = json.Unmarshal(*v, &name) 119 if err != nil { 120 return err 121 } 122 am.Name = &name 123 } 124 case "eTag": 125 if v != nil { 126 var eTag string 127 err = json.Unmarshal(*v, &eTag) 128 if err != nil { 129 return err 130 } 131 am.ETag = &eTag 132 } 133 case "type": 134 if v != nil { 135 var typeVar string 136 err = json.Unmarshal(*v, &typeVar) 137 if err != nil { 138 return err 139 } 140 am.Type = &typeVar 141 } 142 case "properties": 143 if v != nil { 144 var assessedMachineProperties AssessedMachineProperties 145 err = json.Unmarshal(*v, &assessedMachineProperties) 146 if err != nil { 147 return err 148 } 149 am.AssessedMachineProperties = &assessedMachineProperties 150 } 151 } 152 } 153 154 return nil 155} 156 157// AssessedMachineProperties properties of an assessed machine. 158type AssessedMachineProperties struct { 159 // Groups - READ-ONLY; List of references to the groups that the machine is member of. 160 Groups *[]string `json:"groups,omitempty"` 161 // DiscoveredTimestamp - READ-ONLY; Time when this machine was discovered by Azure Migrate agent. Date-Time represented in ISO-8601 format. 162 DiscoveredTimestamp *date.Time `json:"discoveredTimestamp,omitempty"` 163 // BootType - READ-ONLY; Boot type of the machine. Possible values include: 'MachineBootTypeUnknown', 'MachineBootTypeEFI', 'MachineBootTypeBIOS' 164 BootType MachineBootType `json:"bootType,omitempty"` 165 // DatacenterContainer - READ-ONLY; Container defined in the management solution that this machine is part of in the datacenter. 166 DatacenterContainer *string `json:"datacenterContainer,omitempty"` 167 // DatacenterManagementServer - READ-ONLY; Name of the server hosting the datacenter management solution. 168 DatacenterManagementServer *string `json:"datacenterManagementServer,omitempty"` 169 // DatacenterMachineID - READ-ONLY; ID of the machine as tracked by the datacenter management solution. 170 DatacenterMachineID *string `json:"datacenterMachineId,omitempty"` 171 // DatacenterManagementServerID - READ-ONLY; ID of the server hosting the datacenter management solution. 172 DatacenterManagementServerID *string `json:"datacenterManagementServerId,omitempty"` 173 // Description - READ-ONLY; Description of the machine 174 Description *string `json:"description,omitempty"` 175 // DisplayName - READ-ONLY; User readable name of the machine as defined by the user in their private datacenter. 176 DisplayName *string `json:"displayName,omitempty"` 177 // MegabytesOfMemory - READ-ONLY; Memory in Megabytes. 178 MegabytesOfMemory *float64 `json:"megabytesOfMemory,omitempty"` 179 // NumberOfCores - READ-ONLY; Processor count. 180 NumberOfCores *int32 `json:"numberOfCores,omitempty"` 181 // OperatingSystem - READ-ONLY; Operating System of the machine. 182 OperatingSystem *string `json:"operatingSystem,omitempty"` 183 // MonthlyBandwidthCost - READ-ONLY; Monthly network cost estimate for the network adapters that are attached to this machine as a group, for a 31-day month. 184 MonthlyBandwidthCost *float64 `json:"monthlyBandwidthCost,omitempty"` 185 // MonthlyStorageCost - READ-ONLY; Monthly storage cost estimate for the disks that are attached to this machine as a group, for a 31-day month. 186 MonthlyStorageCost *float64 `json:"monthlyStorageCost,omitempty"` 187 // Disks - READ-ONLY; Dictionary of disks attached to the machine. Key is ID of disk. Value is a disk object. 188 Disks map[string]*AssessedDisk `json:"disks"` 189 // NetworkAdapters - READ-ONLY; Dictionary of network adapters attached to the machine. Key is name of the adapter. Value is a network adapter object. 190 NetworkAdapters map[string]*AssessedNetworkAdapter `json:"networkAdapters"` 191 // RecommendedSize - READ-ONLY; Recommended Azure size for this machine. Possible values include: 'AzureVMSizeUnknown', 'AzureVMSizeBasicA0', 'AzureVMSizeBasicA1', 'AzureVMSizeBasicA2', 'AzureVMSizeBasicA3', 'AzureVMSizeBasicA4', 'AzureVMSizeStandardA0', 'AzureVMSizeStandardA1', 'AzureVMSizeStandardA2', 'AzureVMSizeStandardA3', 'AzureVMSizeStandardA4', 'AzureVMSizeStandardA5', 'AzureVMSizeStandardA6', 'AzureVMSizeStandardA7', 'AzureVMSizeStandardA8', 'AzureVMSizeStandardA9', 'AzureVMSizeStandardA10', 'AzureVMSizeStandardA11', 'AzureVMSizeStandardA1V2', 'AzureVMSizeStandardA2V2', 'AzureVMSizeStandardA4V2', 'AzureVMSizeStandardA8V2', 'AzureVMSizeStandardA2mV2', 'AzureVMSizeStandardA4mV2', 'AzureVMSizeStandardA8mV2', 'AzureVMSizeStandardD1', 'AzureVMSizeStandardD2', 'AzureVMSizeStandardD3', 'AzureVMSizeStandardD4', 'AzureVMSizeStandardD11', 'AzureVMSizeStandardD12', 'AzureVMSizeStandardD13', 'AzureVMSizeStandardD14', 'AzureVMSizeStandardD1V2', 'AzureVMSizeStandardD2V2', 'AzureVMSizeStandardD3V2', 'AzureVMSizeStandardD4V2', 'AzureVMSizeStandardD5V2', 'AzureVMSizeStandardD11V2', 'AzureVMSizeStandardD12V2', 'AzureVMSizeStandardD13V2', 'AzureVMSizeStandardD14V2', 'AzureVMSizeStandardD15V2', 'AzureVMSizeStandardDS1', 'AzureVMSizeStandardDS2', 'AzureVMSizeStandardDS3', 'AzureVMSizeStandardDS4', 'AzureVMSizeStandardDS11', 'AzureVMSizeStandardDS12', 'AzureVMSizeStandardDS13', 'AzureVMSizeStandardDS14', 'AzureVMSizeStandardDS1V2', 'AzureVMSizeStandardDS2V2', 'AzureVMSizeStandardDS3V2', 'AzureVMSizeStandardDS4V2', 'AzureVMSizeStandardDS5V2', 'AzureVMSizeStandardDS11V2', 'AzureVMSizeStandardDS12V2', 'AzureVMSizeStandardDS13V2', 'AzureVMSizeStandardDS14V2', 'AzureVMSizeStandardDS15V2', 'AzureVMSizeStandardF1', 'AzureVMSizeStandardF2', 'AzureVMSizeStandardF4', 'AzureVMSizeStandardF8', 'AzureVMSizeStandardF16', 'AzureVMSizeStandardF1s', 'AzureVMSizeStandardF2s', 'AzureVMSizeStandardF4s', 'AzureVMSizeStandardF8s', 'AzureVMSizeStandardF16s', 'AzureVMSizeStandardG1', 'AzureVMSizeStandardG2', 'AzureVMSizeStandardG3', 'AzureVMSizeStandardG4', 'AzureVMSizeStandardG5', 'AzureVMSizeStandardGS1', 'AzureVMSizeStandardGS2', 'AzureVMSizeStandardGS3', 'AzureVMSizeStandardGS4', 'AzureVMSizeStandardGS5', 'AzureVMSizeStandardH8', 'AzureVMSizeStandardH16', 'AzureVMSizeStandardH8m', 'AzureVMSizeStandardH16m', 'AzureVMSizeStandardH16r', 'AzureVMSizeStandardH16mr', 'AzureVMSizeStandardL4s', 'AzureVMSizeStandardL8s', 'AzureVMSizeStandardL16s', 'AzureVMSizeStandardL32s' 192 RecommendedSize AzureVMSize `json:"recommendedSize,omitempty"` 193 // NumberOfCoresForRecommendedSize - READ-ONLY; Number of CPU cores in the Recommended Azure VM Size. 194 NumberOfCoresForRecommendedSize *int32 `json:"numberOfCoresForRecommendedSize,omitempty"` 195 // MegabytesOfMemoryForRecommendedSize - READ-ONLY; Megabytes of memory in the Recommended Azure VM Size. 196 MegabytesOfMemoryForRecommendedSize *float64 `json:"megabytesOfMemoryForRecommendedSize,omitempty"` 197 // MonthlyComputeCostForRecommendedSize - READ-ONLY; Compute Cost for a 31-day month, if the machine is migrated to Azure with the Recommended Size. 198 MonthlyComputeCostForRecommendedSize *float64 `json:"monthlyComputeCostForRecommendedSize,omitempty"` 199 // PercentageCoresUtilization - READ-ONLY; Utilization percentage of the processor core as observed in the private data center, in the Time Range selected on Assessment, reported as the Percentile value based on the percentile number selected in assessment. 200 PercentageCoresUtilization *float64 `json:"percentageCoresUtilization,omitempty"` 201 // PercentageMemoryUtilization - READ-ONLY; Utilization percentage of the memory as observed in the private data center, in the Time Range selected on Assessment, reported as the Percentile value based on the percentile number selected in assessment. 202 PercentageMemoryUtilization *float64 `json:"percentageMemoryUtilization,omitempty"` 203 // PercentageCoresUtilizationDataPointsExpected - READ-ONLY; Expected data points for percentage of cores utilization. 204 PercentageCoresUtilizationDataPointsExpected *int32 `json:"percentageCoresUtilizationDataPointsExpected,omitempty"` 205 // PercentageCoresUtilizationDataPointsReceived - READ-ONLY; Received data points for percentage of cores utilization. 206 PercentageCoresUtilizationDataPointsReceived *int32 `json:"percentageCoresUtilizationDataPointsReceived,omitempty"` 207 // PercentageMemoryUtilizationDataPointsExpected - READ-ONLY; Expected data points for percentage of memory utilization. 208 PercentageMemoryUtilizationDataPointsExpected *int32 `json:"percentageMemoryUtilizationDataPointsExpected,omitempty"` 209 // PercentageMemoryUtilizationDataPointsReceived - READ-ONLY; Received data points for percentage of memory utilization. 210 PercentageMemoryUtilizationDataPointsReceived *int32 `json:"percentageMemoryUtilizationDataPointsReceived,omitempty"` 211 // Suitability - READ-ONLY; Whether machine is suitable for migration to Azure. Possible values include: 'CloudSuitabilityUnknown', 'CloudSuitabilityNotSuitable', 'CloudSuitabilitySuitable', 'CloudSuitabilityConditionallySuitable', 'CloudSuitabilityReadinessUnknown' 212 Suitability CloudSuitability `json:"suitability,omitempty"` 213 // SuitabilityExplanation - READ-ONLY; If machine is not ready to be migrated, this explains the reasons and mitigation steps. Possible values include: 'AzureVMSuitabilityExplanationUnknown', 'AzureVMSuitabilityExplanationNotApplicable', 'AzureVMSuitabilityExplanationGuestOperatingSystemArchitectureNotSupported', 'AzureVMSuitabilityExplanationGuestOperatingSystemNotSupported', 'AzureVMSuitabilityExplanationBootTypeNotSupported', 'AzureVMSuitabilityExplanationMoreDisksThanSupported', 'AzureVMSuitabilityExplanationNoSuitableVMSizeFound', 'AzureVMSuitabilityExplanationOneOrMoreDisksNotSuitable', 'AzureVMSuitabilityExplanationOneOrMoreAdaptersNotSuitable', 'AzureVMSuitabilityExplanationInternalErrorOccuredDuringComputeEvaluation', 'AzureVMSuitabilityExplanationInternalErrorOccuredDuringStorageEvaluation', 'AzureVMSuitabilityExplanationInternalErrorOccuredDuringNetworkEvaluation', 'AzureVMSuitabilityExplanationNoVMSizeSupportsStoragePerformance', 'AzureVMSuitabilityExplanationNoVMSizeSupportsNetworkPerformance', 'AzureVMSuitabilityExplanationNoVMSizeForSelectedPricingTier', 'AzureVMSuitabilityExplanationNoVMSizeForSelectedAzureLocation', 'AzureVMSuitabilityExplanationCheckRedHatLinuxVersion', 'AzureVMSuitabilityExplanationCheckOpenSuseLinuxVersion', 'AzureVMSuitabilityExplanationCheckWindowsServer2008R2Version', 'AzureVMSuitabilityExplanationCheckCentOsVersion', 'AzureVMSuitabilityExplanationCheckDebianLinuxVersion', 'AzureVMSuitabilityExplanationCheckSuseLinuxVersion', 'AzureVMSuitabilityExplanationCheckOracleLinuxVersion', 'AzureVMSuitabilityExplanationCheckUbuntuLinuxVersion', 'AzureVMSuitabilityExplanationCheckCoreOsLinuxVersion', 'AzureVMSuitabilityExplanationWindowsServerVersionConditionallySupported', 'AzureVMSuitabilityExplanationNoGuestOperatingSystemConditionallySupported', 'AzureVMSuitabilityExplanationWindowsClientVersionsConditionallySupported', 'AzureVMSuitabilityExplanationBootTypeUnknown', 'AzureVMSuitabilityExplanationGuestOperatingSystemUnknown', 'AzureVMSuitabilityExplanationWindowsServerVersionsSupportedWithCaveat', 'AzureVMSuitabilityExplanationWindowsOSNoLongerUnderMSSupport', 'AzureVMSuitabilityExplanationEndorsedWithConditionsLinuxDistributions', 'AzureVMSuitabilityExplanationUnendorsedLinuxDistributions', 'AzureVMSuitabilityExplanationNoVMSizeForStandardPricingTier', 'AzureVMSuitabilityExplanationNoVMSizeForBasicPricingTier' 214 SuitabilityExplanation AzureVMSuitabilityExplanation `json:"suitabilityExplanation,omitempty"` 215 // CreatedTimestamp - READ-ONLY; Time when this machine was created. Date-Time represented in ISO-8601 format. 216 CreatedTimestamp *date.Time `json:"createdTimestamp,omitempty"` 217 // UpdatedTimestamp - READ-ONLY; Time when this machine was last updated. Date-Time represented in ISO-8601 format. 218 UpdatedTimestamp *date.Time `json:"updatedTimestamp,omitempty"` 219} 220 221// MarshalJSON is the custom marshaler for AssessedMachineProperties. 222func (amp AssessedMachineProperties) MarshalJSON() ([]byte, error) { 223 objectMap := make(map[string]interface{}) 224 return json.Marshal(objectMap) 225} 226 227// AssessedMachineResultList list of assessed machines. 228type AssessedMachineResultList struct { 229 autorest.Response `json:"-"` 230 // Value - List of assessed machines. 231 Value *[]AssessedMachine `json:"value,omitempty"` 232} 233 234// AssessedNetworkAdapter a network adapter assessed for an assessment. 235type AssessedNetworkAdapter struct { 236 // MacAddress - READ-ONLY; MAC Address of the network adapter. 237 MacAddress *string `json:"macAddress,omitempty"` 238 // IPAddresses - READ-ONLY; List of IP Addresses on the network adapter. 239 IPAddresses *[]string `json:"ipAddresses,omitempty"` 240 // MonthlyBandwidthCosts - READ-ONLY; Monthly cost estimate for network bandwidth used by this network adapter. 241 MonthlyBandwidthCosts *float64 `json:"monthlyBandwidthCosts,omitempty"` 242 // MegabytesPerSecondReceived - READ-ONLY; Adapter throughput for incoming traffic in MegaBytes per second. 243 MegabytesPerSecondReceived *float64 `json:"megabytesPerSecondReceived,omitempty"` 244 // MegabytesPerSecondReceivedDataPointsExpected - READ-ONLY; Expected data points for incoming traffic in MegaBytes per second. 245 MegabytesPerSecondReceivedDataPointsExpected *int32 `json:"megabytesPerSecondReceivedDataPointsExpected,omitempty"` 246 // MegabytesPerSecondOfReadDataPointsReceived - READ-ONLY; Received data points for incoming traffic in MegaBytes per second. 247 MegabytesPerSecondOfReadDataPointsReceived *int32 `json:"megabytesPerSecondOfReadDataPointsReceived,omitempty"` 248 // MegabytesPerSecondTransmitted - READ-ONLY; Adapter throughput for outgoing traffic in MegaBytes per second. 249 MegabytesPerSecondTransmitted *float64 `json:"megabytesPerSecondTransmitted,omitempty"` 250 // MegabytesPerSecondTransmittedDataPointsExpected - READ-ONLY; Expected data points for outgoing traffic in MegaBytes per second. 251 MegabytesPerSecondTransmittedDataPointsExpected *int32 `json:"megabytesPerSecondTransmittedDataPointsExpected,omitempty"` 252 // MegabytesPerSecondTransmittedDataPointsReceived - READ-ONLY; Received data points for outgoing traffic in MegaBytes per second. 253 MegabytesPerSecondTransmittedDataPointsReceived *int32 `json:"megabytesPerSecondTransmittedDataPointsReceived,omitempty"` 254 // NetGigabytesTransmittedPerMonth - Gigabytes transmitted through this adapter each month. 255 NetGigabytesTransmittedPerMonth *float64 `json:"netGigabytesTransmittedPerMonth,omitempty"` 256 // Suitability - READ-ONLY; Whether this adapter is suitable for Azure. Possible values include: 'CloudSuitabilityUnknown', 'CloudSuitabilityNotSuitable', 'CloudSuitabilitySuitable', 'CloudSuitabilityConditionallySuitable', 'CloudSuitabilityReadinessUnknown' 257 Suitability CloudSuitability `json:"suitability,omitempty"` 258 // SuitabilityExplanation - READ-ONLY; If network adapter is suitable, this explains the reasons and mitigation steps. Possible values include: 'AzureNetworkAdapterSuitabilityExplanationUnknown', 'AzureNetworkAdapterSuitabilityExplanationNotApplicable', 'AzureNetworkAdapterSuitabilityExplanationInternalErrorOccured' 259 SuitabilityExplanation AzureNetworkAdapterSuitabilityExplanation `json:"suitabilityExplanation,omitempty"` 260} 261 262// MarshalJSON is the custom marshaler for AssessedNetworkAdapter. 263func (ana AssessedNetworkAdapter) MarshalJSON() ([]byte, error) { 264 objectMap := make(map[string]interface{}) 265 if ana.NetGigabytesTransmittedPerMonth != nil { 266 objectMap["netGigabytesTransmittedPerMonth"] = ana.NetGigabytesTransmittedPerMonth 267 } 268 return json.Marshal(objectMap) 269} 270 271// Assessment an assessment created for a group in the Migration project. 272type Assessment struct { 273 autorest.Response `json:"-"` 274 // ID - READ-ONLY; Path reference to this assessment. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}/groups/{groupName}/assessment/{assessmentName} 275 ID *string `json:"id,omitempty"` 276 // Name - READ-ONLY; Unique name of an assessment. 277 Name *string `json:"name,omitempty"` 278 // ETag - For optimistic concurrency control. 279 ETag *string `json:"eTag,omitempty"` 280 // Type - READ-ONLY; Type of the object = [Microsoft.Migrate/projects/groups/assessments]. 281 Type *string `json:"type,omitempty"` 282 // AssessmentProperties - Properties of the assessment. 283 *AssessmentProperties `json:"properties,omitempty"` 284} 285 286// MarshalJSON is the custom marshaler for Assessment. 287func (a Assessment) MarshalJSON() ([]byte, error) { 288 objectMap := make(map[string]interface{}) 289 if a.ETag != nil { 290 objectMap["eTag"] = a.ETag 291 } 292 if a.AssessmentProperties != nil { 293 objectMap["properties"] = a.AssessmentProperties 294 } 295 return json.Marshal(objectMap) 296} 297 298// UnmarshalJSON is the custom unmarshaler for Assessment struct. 299func (a *Assessment) UnmarshalJSON(body []byte) error { 300 var m map[string]*json.RawMessage 301 err := json.Unmarshal(body, &m) 302 if err != nil { 303 return err 304 } 305 for k, v := range m { 306 switch k { 307 case "id": 308 if v != nil { 309 var ID string 310 err = json.Unmarshal(*v, &ID) 311 if err != nil { 312 return err 313 } 314 a.ID = &ID 315 } 316 case "name": 317 if v != nil { 318 var name string 319 err = json.Unmarshal(*v, &name) 320 if err != nil { 321 return err 322 } 323 a.Name = &name 324 } 325 case "eTag": 326 if v != nil { 327 var eTag string 328 err = json.Unmarshal(*v, &eTag) 329 if err != nil { 330 return err 331 } 332 a.ETag = &eTag 333 } 334 case "type": 335 if v != nil { 336 var typeVar string 337 err = json.Unmarshal(*v, &typeVar) 338 if err != nil { 339 return err 340 } 341 a.Type = &typeVar 342 } 343 case "properties": 344 if v != nil { 345 var assessmentProperties AssessmentProperties 346 err = json.Unmarshal(*v, &assessmentProperties) 347 if err != nil { 348 return err 349 } 350 a.AssessmentProperties = &assessmentProperties 351 } 352 } 353 } 354 355 return nil 356} 357 358// AssessmentOptionsResultList list of assessment options. 359type AssessmentOptionsResultList struct { 360 autorest.Response `json:"-"` 361 // VMFamilies - READ-ONLY; Dictionary of VM families grouped by vm family name describing the targeted azure locations of VM family and the category of the family. 362 VMFamilies *[]VMFamily `json:"vmFamilies,omitempty"` 363 // ReservedInstanceVMFamilies - READ-ONLY; List of supported VM Families. 364 ReservedInstanceVMFamilies *[]string `json:"reservedInstanceVmFamilies,omitempty"` 365} 366 367// MarshalJSON is the custom marshaler for AssessmentOptionsResultList. 368func (aorl AssessmentOptionsResultList) MarshalJSON() ([]byte, error) { 369 objectMap := make(map[string]interface{}) 370 return json.Marshal(objectMap) 371} 372 373// AssessmentProperties properties of an assessment. 374type AssessmentProperties struct { 375 // AzureLocation - Target Azure location for which the machines should be assessed. These enums are the same as used by Compute API. Possible values include: 'AzureLocationUnknown', 'AzureLocationEastAsia', 'AzureLocationSoutheastAsia', 'AzureLocationAustraliaEast', 'AzureLocationAustraliaSoutheast', 'AzureLocationBrazilSouth', 'AzureLocationCanadaCentral', 'AzureLocationCanadaEast', 'AzureLocationWestEurope', 'AzureLocationNorthEurope', 'AzureLocationCentralIndia', 'AzureLocationSouthIndia', 'AzureLocationWestIndia', 'AzureLocationJapanEast', 'AzureLocationJapanWest', 'AzureLocationKoreaCentral', 'AzureLocationKoreaSouth', 'AzureLocationUkWest', 'AzureLocationUkSouth', 'AzureLocationNorthCentralUs', 'AzureLocationEastUs', 'AzureLocationWestUs2', 'AzureLocationSouthCentralUs', 'AzureLocationCentralUs', 'AzureLocationEastUs2', 'AzureLocationWestUs', 'AzureLocationWestCentralUs', 'AzureLocationGermanyCentral', 'AzureLocationGermanyNortheast', 'AzureLocationChinaNorth', 'AzureLocationChinaEast' 376 AzureLocation AzureLocation `json:"azureLocation,omitempty"` 377 // AzureOfferCode - Offer code according to which cost estimation is done. Possible values include: 'AzureOfferCodeUnknown', 'AzureOfferCodeMSAZR0003P', 'AzureOfferCodeMSAZR0044P', 'AzureOfferCodeMSAZR0059P', 'AzureOfferCodeMSAZR0060P', 'AzureOfferCodeMSAZR0062P', 'AzureOfferCodeMSAZR0063P', 'AzureOfferCodeMSAZR0064P', 'AzureOfferCodeMSAZR0029P', 'AzureOfferCodeMSAZR0022P', 'AzureOfferCodeMSAZR0023P', 'AzureOfferCodeMSAZR0148P', 'AzureOfferCodeMSAZR0025P', 'AzureOfferCodeMSAZR0036P', 'AzureOfferCodeMSAZR0120P', 'AzureOfferCodeMSAZR0121P', 'AzureOfferCodeMSAZR0122P', 'AzureOfferCodeMSAZR0123P', 'AzureOfferCodeMSAZR0124P', 'AzureOfferCodeMSAZR0125P', 'AzureOfferCodeMSAZR0126P', 'AzureOfferCodeMSAZR0127P', 'AzureOfferCodeMSAZR0128P', 'AzureOfferCodeMSAZR0129P', 'AzureOfferCodeMSAZR0130P', 'AzureOfferCodeMSAZR0111P', 'AzureOfferCodeMSAZR0144P', 'AzureOfferCodeMSAZR0149P', 'AzureOfferCodeMSMCAZR0044P', 'AzureOfferCodeMSMCAZR0059P', 'AzureOfferCodeMSMCAZR0060P', 'AzureOfferCodeMSMCAZR0063P', 'AzureOfferCodeMSMCAZR0120P', 'AzureOfferCodeMSMCAZR0121P', 'AzureOfferCodeMSMCAZR0125P', 'AzureOfferCodeMSMCAZR0128P', 'AzureOfferCodeMSAZRDE0003P', 'AzureOfferCodeMSAZRDE0044P' 378 AzureOfferCode AzureOfferCode `json:"azureOfferCode,omitempty"` 379 // AzurePricingTier - Pricing tier for Size evaluation. Possible values include: 'Standard', 'Basic' 380 AzurePricingTier AzurePricingTier `json:"azurePricingTier,omitempty"` 381 // AzureStorageRedundancy - Storage Redundancy type offered by Azure. Possible values include: 'AzureStorageRedundancyUnknown', 'AzureStorageRedundancyLocallyRedundant', 'AzureStorageRedundancyZoneRedundant', 'AzureStorageRedundancyGeoRedundant', 'AzureStorageRedundancyReadAccessGeoRedundant' 382 AzureStorageRedundancy AzureStorageRedundancy `json:"azureStorageRedundancy,omitempty"` 383 // ScalingFactor - Scaling factor used over utilization data to add a performance buffer for new machines to be created in Azure. Min Value = 1.0, Max value = 1.9, Default = 1.3. 384 ScalingFactor *float64 `json:"scalingFactor,omitempty"` 385 // Percentile - Percentile of performance data used to recommend Azure size. Possible values include: 'Percentile50', 'Percentile90', 'Percentile95', 'Percentile99' 386 Percentile Percentile `json:"percentile,omitempty"` 387 // TimeRange - Time range of performance data used to recommend a size. Possible values include: 'Day', 'Week', 'Month' 388 TimeRange TimeRange `json:"timeRange,omitempty"` 389 // Stage - User configurable setting that describes the status of the assessment. Possible values include: 'InProgress', 'UnderReview', 'Approved' 390 Stage AssessmentStage `json:"stage,omitempty"` 391 // Currency - Currency to report prices in. Possible values include: 'CurrencyUnknown', 'CurrencyUSD', 'CurrencyDKK', 'CurrencyCAD', 'CurrencyIDR', 'CurrencyJPY', 'CurrencyKRW', 'CurrencyNZD', 'CurrencyNOK', 'CurrencyRUB', 'CurrencySAR', 'CurrencyZAR', 'CurrencySEK', 'CurrencyTRY', 'CurrencyGBP', 'CurrencyMXN', 'CurrencyMYR', 'CurrencyINR', 'CurrencyHKD', 'CurrencyBRL', 'CurrencyTWD', 'CurrencyEUR', 'CurrencyCHF', 'CurrencyARS', 'CurrencyAUD', 'CurrencyCNY' 392 Currency Currency `json:"currency,omitempty"` 393 // AzureHybridUseBenefit - AHUB discount on windows virtual machines. Possible values include: 'AzureHybridUseBenefitUnknown', 'AzureHybridUseBenefitYes', 'AzureHybridUseBenefitNo' 394 AzureHybridUseBenefit AzureHybridUseBenefit `json:"azureHybridUseBenefit,omitempty"` 395 // DiscountPercentage - Custom discount percentage to be applied on final costs. Can be in the range [0, 100]. 396 DiscountPercentage *float64 `json:"discountPercentage,omitempty"` 397 // ConfidenceRatingInPercentage - READ-ONLY; Confidence rating percentage for assessment. Can be in the range [0, 100]. 398 ConfidenceRatingInPercentage *float64 `json:"confidenceRatingInPercentage,omitempty"` 399 // SizingCriterion - Assessment sizing criterion. Possible values include: 'PerformanceBased', 'AsOnPremises' 400 SizingCriterion AssessmentSizingCriterion `json:"sizingCriterion,omitempty"` 401 // PricesTimestamp - READ-ONLY; Time when the Azure Prices were queried. Date-Time represented in ISO-8601 format. 402 PricesTimestamp *date.Time `json:"pricesTimestamp,omitempty"` 403 // CreatedTimestamp - READ-ONLY; Time when this project was created. Date-Time represented in ISO-8601 format. 404 CreatedTimestamp *date.Time `json:"createdTimestamp,omitempty"` 405 // UpdatedTimestamp - READ-ONLY; Time when this project was last updated. Date-Time represented in ISO-8601 format. 406 UpdatedTimestamp *date.Time `json:"updatedTimestamp,omitempty"` 407 // MonthlyComputeCost - READ-ONLY; Monthly compute cost estimate for the machines that are part of this assessment as a group, for a 31-day month. 408 MonthlyComputeCost *float64 `json:"monthlyComputeCost,omitempty"` 409 // MonthlyBandwidthCost - READ-ONLY; Monthly network cost estimate for the machines that are part of this assessment as a group, for a 31-day month. 410 MonthlyBandwidthCost *float64 `json:"monthlyBandwidthCost,omitempty"` 411 // MonthlyStorageCost - READ-ONLY; Monthly storage cost estimate for the machines that are part of this assessment as a group, for a 31-day month. 412 MonthlyStorageCost *float64 `json:"monthlyStorageCost,omitempty"` 413 // Status - READ-ONLY; Whether the assessment has been created and is valid. Possible values include: 'Created', 'Updated', 'Running', 'Completed', 'Invalid' 414 Status AssessmentStatus `json:"status,omitempty"` 415 // NumberOfMachines - READ-ONLY; Number of assessed machines part of this assessment. 416 NumberOfMachines *int32 `json:"numberOfMachines,omitempty"` 417} 418 419// MarshalJSON is the custom marshaler for AssessmentProperties. 420func (ap AssessmentProperties) MarshalJSON() ([]byte, error) { 421 objectMap := make(map[string]interface{}) 422 if ap.AzureLocation != "" { 423 objectMap["azureLocation"] = ap.AzureLocation 424 } 425 if ap.AzureOfferCode != "" { 426 objectMap["azureOfferCode"] = ap.AzureOfferCode 427 } 428 if ap.AzurePricingTier != "" { 429 objectMap["azurePricingTier"] = ap.AzurePricingTier 430 } 431 if ap.AzureStorageRedundancy != "" { 432 objectMap["azureStorageRedundancy"] = ap.AzureStorageRedundancy 433 } 434 if ap.ScalingFactor != nil { 435 objectMap["scalingFactor"] = ap.ScalingFactor 436 } 437 if ap.Percentile != "" { 438 objectMap["percentile"] = ap.Percentile 439 } 440 if ap.TimeRange != "" { 441 objectMap["timeRange"] = ap.TimeRange 442 } 443 if ap.Stage != "" { 444 objectMap["stage"] = ap.Stage 445 } 446 if ap.Currency != "" { 447 objectMap["currency"] = ap.Currency 448 } 449 if ap.AzureHybridUseBenefit != "" { 450 objectMap["azureHybridUseBenefit"] = ap.AzureHybridUseBenefit 451 } 452 if ap.DiscountPercentage != nil { 453 objectMap["discountPercentage"] = ap.DiscountPercentage 454 } 455 if ap.SizingCriterion != "" { 456 objectMap["sizingCriterion"] = ap.SizingCriterion 457 } 458 return json.Marshal(objectMap) 459} 460 461// AssessmentResultList list of assessments. 462type AssessmentResultList struct { 463 autorest.Response `json:"-"` 464 // Value - List of assessments. 465 Value *[]Assessment `json:"value,omitempty"` 466} 467 468// CheckNameAvailabilityParameters parameters for a check name availability request. 469type CheckNameAvailabilityParameters struct { 470 // Name - The name to check for availability 471 Name *string `json:"name,omitempty"` 472 // Type - The resource type. Must be set to Microsoft.Migrate/projects 473 Type *string `json:"type,omitempty"` 474} 475 476// CheckNameAvailabilityResult the CheckNameAvailability operation response. 477type CheckNameAvailabilityResult struct { 478 autorest.Response `json:"-"` 479 // NameAvailable - READ-ONLY; Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or invalid and cannot be used. 480 NameAvailable *bool `json:"nameAvailable,omitempty"` 481 // Reason - READ-ONLY; Gets the reason that a project name could not be used. The Reason element is only returned if NameAvailable is false. Possible values include: 'NameAvailabilityReasonAvailable', 'NameAvailabilityReasonInvalid', 'NameAvailabilityReasonAlreadyExists' 482 Reason NameAvailabilityReason `json:"reason,omitempty"` 483 // Message - READ-ONLY; Gets an error message explaining the Reason value in more detail. 484 Message *string `json:"message,omitempty"` 485} 486 487// MarshalJSON is the custom marshaler for CheckNameAvailabilityResult. 488func (cnar CheckNameAvailabilityResult) MarshalJSON() ([]byte, error) { 489 objectMap := make(map[string]interface{}) 490 return json.Marshal(objectMap) 491} 492 493// CloudError an error response from the Azure Migrate service. 494type CloudError struct { 495 Error *CloudErrorBody `json:"error,omitempty"` 496} 497 498// CloudErrorBody an error response from the Azure Migrate service. 499type CloudErrorBody struct { 500 // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. 501 Code *string `json:"code,omitempty"` 502 // Message - A message describing the error, intended to be suitable for display in a user interface. 503 Message *string `json:"message,omitempty"` 504 // Target - The target of the particular error. For example, the name of the property in error. 505 Target *string `json:"target,omitempty"` 506 // Details - A list of additional details about the error. 507 Details *[]CloudErrorBody `json:"details,omitempty"` 508} 509 510// Disk a disk discovered on a machine. 511type Disk struct { 512 // GigabytesAllocated - READ-ONLY; Gigabytes of storage provisioned for this disk. 513 GigabytesAllocated *float64 `json:"gigabytesAllocated,omitempty"` 514 // GigabytesConsumed - READ-ONLY; Gigabytes of storage consumed by this disk. 515 GigabytesConsumed *float64 `json:"gigabytesConsumed,omitempty"` 516} 517 518// MarshalJSON is the custom marshaler for Disk. 519func (d Disk) MarshalJSON() ([]byte, error) { 520 objectMap := make(map[string]interface{}) 521 return json.Marshal(objectMap) 522} 523 524// DownloadURL download URL for assessment report. 525type DownloadURL struct { 526 autorest.Response `json:"-"` 527 // AssessmentReportURL - READ-ONLY; Hyperlink to download report. 528 AssessmentReportURL *string `json:"assessmentReportUrl,omitempty"` 529 // ExpirationTime - READ-ONLY; Expiry date of download url. 530 ExpirationTime *date.Time `json:"expirationTime,omitempty"` 531} 532 533// MarshalJSON is the custom marshaler for DownloadURL. 534func (du DownloadURL) MarshalJSON() ([]byte, error) { 535 objectMap := make(map[string]interface{}) 536 return json.Marshal(objectMap) 537} 538 539// Group a group created in a Migration project. 540type Group struct { 541 autorest.Response `json:"-"` 542 // ID - READ-ONLY; Path reference to this group. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}/groups/{groupName} 543 ID *string `json:"id,omitempty"` 544 // Name - READ-ONLY; Name of the group. 545 Name *string `json:"name,omitempty"` 546 // ETag - For optimistic concurrency control. 547 ETag *string `json:"eTag,omitempty"` 548 // Type - READ-ONLY; Type of the object = [Microsoft.Migrate/projects/groups]. 549 Type *string `json:"type,omitempty"` 550 // GroupProperties - Properties of the group. 551 *GroupProperties `json:"properties,omitempty"` 552} 553 554// MarshalJSON is the custom marshaler for Group. 555func (g Group) MarshalJSON() ([]byte, error) { 556 objectMap := make(map[string]interface{}) 557 if g.ETag != nil { 558 objectMap["eTag"] = g.ETag 559 } 560 if g.GroupProperties != nil { 561 objectMap["properties"] = g.GroupProperties 562 } 563 return json.Marshal(objectMap) 564} 565 566// UnmarshalJSON is the custom unmarshaler for Group struct. 567func (g *Group) UnmarshalJSON(body []byte) error { 568 var m map[string]*json.RawMessage 569 err := json.Unmarshal(body, &m) 570 if err != nil { 571 return err 572 } 573 for k, v := range m { 574 switch k { 575 case "id": 576 if v != nil { 577 var ID string 578 err = json.Unmarshal(*v, &ID) 579 if err != nil { 580 return err 581 } 582 g.ID = &ID 583 } 584 case "name": 585 if v != nil { 586 var name string 587 err = json.Unmarshal(*v, &name) 588 if err != nil { 589 return err 590 } 591 g.Name = &name 592 } 593 case "eTag": 594 if v != nil { 595 var eTag string 596 err = json.Unmarshal(*v, &eTag) 597 if err != nil { 598 return err 599 } 600 g.ETag = &eTag 601 } 602 case "type": 603 if v != nil { 604 var typeVar string 605 err = json.Unmarshal(*v, &typeVar) 606 if err != nil { 607 return err 608 } 609 g.Type = &typeVar 610 } 611 case "properties": 612 if v != nil { 613 var groupProperties GroupProperties 614 err = json.Unmarshal(*v, &groupProperties) 615 if err != nil { 616 return err 617 } 618 g.GroupProperties = &groupProperties 619 } 620 } 621 } 622 623 return nil 624} 625 626// GroupProperties properties of group resource. 627type GroupProperties struct { 628 // Machines - List of machine names that are part of this group. 629 Machines *[]string `json:"machines,omitempty"` 630 // Assessments - READ-ONLY; List of References to Assessments created on this group. 631 Assessments *[]string `json:"assessments,omitempty"` 632 // CreatedTimestamp - READ-ONLY; Time when this project was created. Date-Time represented in ISO-8601 format. 633 CreatedTimestamp *date.Time `json:"createdTimestamp,omitempty"` 634 // UpdatedTimestamp - READ-ONLY; Time when this project was last updated. Date-Time represented in ISO-8601 format. 635 UpdatedTimestamp *date.Time `json:"updatedTimestamp,omitempty"` 636} 637 638// MarshalJSON is the custom marshaler for GroupProperties. 639func (gp GroupProperties) MarshalJSON() ([]byte, error) { 640 objectMap := make(map[string]interface{}) 641 if gp.Machines != nil { 642 objectMap["machines"] = gp.Machines 643 } 644 return json.Marshal(objectMap) 645} 646 647// GroupResultList list of groups. 648type GroupResultList struct { 649 autorest.Response `json:"-"` 650 // Value - List of groups. 651 Value *[]Group `json:"value,omitempty"` 652} 653 654// Machine a machine in a migration project. 655type Machine struct { 656 autorest.Response `json:"-"` 657 // ID - READ-ONLY; Path reference to this machine. /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}/machines/{machineName} 658 ID *string `json:"id,omitempty"` 659 // Name - READ-ONLY; Name of the machine. It is a GUID which is unique identifier of machine in private data center. For user-readable name, we have a displayName property on this machine. 660 Name *string `json:"name,omitempty"` 661 // ETag - For optimistic concurrency control. 662 ETag *string `json:"eTag,omitempty"` 663 // Type - READ-ONLY; Type of the object = [Microsoft.Migrate/projects/machines]. 664 Type *string `json:"type,omitempty"` 665 // MachineProperties - Properties of the machine. 666 *MachineProperties `json:"properties,omitempty"` 667} 668 669// MarshalJSON is the custom marshaler for Machine. 670func (mVar Machine) MarshalJSON() ([]byte, error) { 671 objectMap := make(map[string]interface{}) 672 if mVar.ETag != nil { 673 objectMap["eTag"] = mVar.ETag 674 } 675 if mVar.MachineProperties != nil { 676 objectMap["properties"] = mVar.MachineProperties 677 } 678 return json.Marshal(objectMap) 679} 680 681// UnmarshalJSON is the custom unmarshaler for Machine struct. 682func (mVar *Machine) UnmarshalJSON(body []byte) error { 683 var m map[string]*json.RawMessage 684 err := json.Unmarshal(body, &m) 685 if err != nil { 686 return err 687 } 688 for k, v := range m { 689 switch k { 690 case "id": 691 if v != nil { 692 var ID string 693 err = json.Unmarshal(*v, &ID) 694 if err != nil { 695 return err 696 } 697 mVar.ID = &ID 698 } 699 case "name": 700 if v != nil { 701 var name string 702 err = json.Unmarshal(*v, &name) 703 if err != nil { 704 return err 705 } 706 mVar.Name = &name 707 } 708 case "eTag": 709 if v != nil { 710 var eTag string 711 err = json.Unmarshal(*v, &eTag) 712 if err != nil { 713 return err 714 } 715 mVar.ETag = &eTag 716 } 717 case "type": 718 if v != nil { 719 var typeVar string 720 err = json.Unmarshal(*v, &typeVar) 721 if err != nil { 722 return err 723 } 724 mVar.Type = &typeVar 725 } 726 case "properties": 727 if v != nil { 728 var machineProperties MachineProperties 729 err = json.Unmarshal(*v, &machineProperties) 730 if err != nil { 731 return err 732 } 733 mVar.MachineProperties = &machineProperties 734 } 735 } 736 } 737 738 return nil 739} 740 741// MachineProperties properties of a machine. 742type MachineProperties struct { 743 // BootType - READ-ONLY; Boot type of the machine. Possible values include: 'MachineBootTypeUnknown', 'MachineBootTypeEFI', 'MachineBootTypeBIOS' 744 BootType MachineBootType `json:"bootType,omitempty"` 745 // DatacenterContainer - READ-ONLY; Container defined in the management solution that this machine is part of in the datacenter. 746 DatacenterContainer *string `json:"datacenterContainer,omitempty"` 747 // DatacenterManagementServer - READ-ONLY; Name of the server hosting the datacenter management solution. 748 DatacenterManagementServer *string `json:"datacenterManagementServer,omitempty"` 749 // DatacenterMachineID - READ-ONLY; ID of the machine as tracked by the datacenter management solution. 750 DatacenterMachineID *string `json:"datacenterMachineId,omitempty"` 751 // DatacenterManagementServerID - READ-ONLY; ID of the server hosting the datacenter management solution. 752 DatacenterManagementServerID *string `json:"datacenterManagementServerId,omitempty"` 753 // Description - READ-ONLY; Description of the machine 754 Description *string `json:"description,omitempty"` 755 // DisplayName - READ-ONLY; User readable name of the machine as defined by the user in their private datacenter. 756 DisplayName *string `json:"displayName,omitempty"` 757 // MegabytesOfMemory - READ-ONLY; Memory in Megabytes. 758 MegabytesOfMemory *float64 `json:"megabytesOfMemory,omitempty"` 759 // NumberOfCores - READ-ONLY; Processor count. 760 NumberOfCores *int32 `json:"numberOfCores,omitempty"` 761 // OperatingSystem - READ-ONLY; Operating System of the machine. 762 OperatingSystem *string `json:"operatingSystem,omitempty"` 763 // Groups - READ-ONLY; List of references to the groups that the machine is member of. 764 Groups *[]string `json:"groups,omitempty"` 765 // CreatedTimestamp - READ-ONLY; Time when this machine was created. Date-Time represented in ISO-8601 format. 766 CreatedTimestamp *date.Time `json:"createdTimestamp,omitempty"` 767 // UpdatedTimestamp - READ-ONLY; Time when this machine was last updated. Date-Time represented in ISO-8601 format. 768 UpdatedTimestamp *date.Time `json:"updatedTimestamp,omitempty"` 769 // DiscoveredTimestamp - READ-ONLY; Time when this machine was discovered by Azure Migrate agent. Date-Time represented in ISO-8601 format. 770 DiscoveredTimestamp *date.Time `json:"discoveredTimestamp,omitempty"` 771 // Disks - READ-ONLY; Dictionary of disks attached to the machine. Key is ID of disk. Value is a disk object 772 Disks map[string]*Disk `json:"disks"` 773 // NetworkAdapters - READ-ONLY; Dictionary of network adapters attached to the machine. Key is ID of network adapter. Value is a network adapter object 774 NetworkAdapters map[string]*NetworkAdapter `json:"networkAdapters"` 775} 776 777// MarshalJSON is the custom marshaler for MachineProperties. 778func (mp MachineProperties) MarshalJSON() ([]byte, error) { 779 objectMap := make(map[string]interface{}) 780 return json.Marshal(objectMap) 781} 782 783// MachineResultList list of machines. 784type MachineResultList struct { 785 autorest.Response `json:"-"` 786 // Value - List of machines. 787 Value *[]Machine `json:"value,omitempty"` 788} 789 790// NetworkAdapter a network adapter discovered on a machine. 791type NetworkAdapter struct { 792 // MacAddress - READ-ONLY; MAC Address of the network adapter. 793 MacAddress *string `json:"macAddress,omitempty"` 794 // IPAddresses - READ-ONLY; List of IP Addresses on the network adapter. 795 IPAddresses *[]string `json:"ipAddresses,omitempty"` 796} 797 798// MarshalJSON is the custom marshaler for NetworkAdapter. 799func (na NetworkAdapter) MarshalJSON() ([]byte, error) { 800 objectMap := make(map[string]interface{}) 801 return json.Marshal(objectMap) 802} 803 804// Operation a REST API operation supported by the provider. 805type Operation struct { 806 // Name - READ-ONLY; Name of the operation. 807 Name *string `json:"name,omitempty"` 808 // Display - Displayable properties of the operation. 809 Display *OperationDisplay `json:"display,omitempty"` 810 // Origin - READ-ONLY; Origin of the operation. 811 Origin *string `json:"origin,omitempty"` 812} 813 814// MarshalJSON is the custom marshaler for Operation. 815func (o Operation) MarshalJSON() ([]byte, error) { 816 objectMap := make(map[string]interface{}) 817 if o.Display != nil { 818 objectMap["display"] = o.Display 819 } 820 return json.Marshal(objectMap) 821} 822 823// OperationDisplay displayable properties of the operation. 824type OperationDisplay struct { 825 // Provider - READ-ONLY; Provider of the operation. 826 Provider *string `json:"provider,omitempty"` 827 // Resource - READ-ONLY; Resource operated on by the operation. 828 Resource *string `json:"resource,omitempty"` 829 // Operation - READ-ONLY; Operation Type. 830 Operation *string `json:"operation,omitempty"` 831 // Description - READ-ONLY; Description of the operation. 832 Description *string `json:"description,omitempty"` 833} 834 835// MarshalJSON is the custom marshaler for OperationDisplay. 836func (od OperationDisplay) MarshalJSON() ([]byte, error) { 837 objectMap := make(map[string]interface{}) 838 return json.Marshal(objectMap) 839} 840 841// OperationResultList list of API operations. 842type OperationResultList struct { 843 autorest.Response `json:"-"` 844 // Value - List of operations. 845 Value *[]Operation `json:"value,omitempty"` 846} 847 848// Project azure Migrate Project. 849type Project struct { 850 autorest.Response `json:"-"` 851 // ID - READ-ONLY; Path reference to this project /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName} 852 ID *string `json:"id,omitempty"` 853 // Name - READ-ONLY; Name of the project. 854 Name *string `json:"name,omitempty"` 855 // Type - READ-ONLY; Type of the object = [Microsoft.Migrate/projects]. 856 Type *string `json:"type,omitempty"` 857 // ETag - For optimistic concurrency control. 858 ETag *string `json:"eTag,omitempty"` 859 // Location - Azure location in which project is created. 860 Location *string `json:"location,omitempty"` 861 // Tags - Tags provided by Azure Tagging service. 862 Tags interface{} `json:"tags,omitempty"` 863 // ProjectProperties - Properties of the project. 864 *ProjectProperties `json:"properties,omitempty"` 865} 866 867// MarshalJSON is the custom marshaler for Project. 868func (p Project) MarshalJSON() ([]byte, error) { 869 objectMap := make(map[string]interface{}) 870 if p.ETag != nil { 871 objectMap["eTag"] = p.ETag 872 } 873 if p.Location != nil { 874 objectMap["location"] = p.Location 875 } 876 if p.Tags != nil { 877 objectMap["tags"] = p.Tags 878 } 879 if p.ProjectProperties != nil { 880 objectMap["properties"] = p.ProjectProperties 881 } 882 return json.Marshal(objectMap) 883} 884 885// UnmarshalJSON is the custom unmarshaler for Project struct. 886func (p *Project) UnmarshalJSON(body []byte) error { 887 var m map[string]*json.RawMessage 888 err := json.Unmarshal(body, &m) 889 if err != nil { 890 return err 891 } 892 for k, v := range m { 893 switch k { 894 case "id": 895 if v != nil { 896 var ID string 897 err = json.Unmarshal(*v, &ID) 898 if err != nil { 899 return err 900 } 901 p.ID = &ID 902 } 903 case "name": 904 if v != nil { 905 var name string 906 err = json.Unmarshal(*v, &name) 907 if err != nil { 908 return err 909 } 910 p.Name = &name 911 } 912 case "type": 913 if v != nil { 914 var typeVar string 915 err = json.Unmarshal(*v, &typeVar) 916 if err != nil { 917 return err 918 } 919 p.Type = &typeVar 920 } 921 case "eTag": 922 if v != nil { 923 var eTag string 924 err = json.Unmarshal(*v, &eTag) 925 if err != nil { 926 return err 927 } 928 p.ETag = &eTag 929 } 930 case "location": 931 if v != nil { 932 var location string 933 err = json.Unmarshal(*v, &location) 934 if err != nil { 935 return err 936 } 937 p.Location = &location 938 } 939 case "tags": 940 if v != nil { 941 var tags interface{} 942 err = json.Unmarshal(*v, &tags) 943 if err != nil { 944 return err 945 } 946 p.Tags = tags 947 } 948 case "properties": 949 if v != nil { 950 var projectProperties ProjectProperties 951 err = json.Unmarshal(*v, &projectProperties) 952 if err != nil { 953 return err 954 } 955 p.ProjectProperties = &projectProperties 956 } 957 } 958 } 959 960 return nil 961} 962 963// ProjectKey ID and Key for Migration Project. 964type ProjectKey struct { 965 autorest.Response `json:"-"` 966 // WorkspaceID - READ-ONLY; ID of Migration Project. 967 WorkspaceID *string `json:"workspaceId,omitempty"` 968 // WorkspaceKey - READ-ONLY; Key of Migration Project. 969 WorkspaceKey *string `json:"workspaceKey,omitempty"` 970} 971 972// MarshalJSON is the custom marshaler for ProjectKey. 973func (pk ProjectKey) MarshalJSON() ([]byte, error) { 974 objectMap := make(map[string]interface{}) 975 return json.Marshal(objectMap) 976} 977 978// ProjectProperties properties of a project. 979type ProjectProperties struct { 980 // CreatedTimestamp - READ-ONLY; Time when this project was created. Date-Time represented in ISO-8601 format. 981 CreatedTimestamp *date.Time `json:"createdTimestamp,omitempty"` 982 // UpdatedTimestamp - READ-ONLY; Time when this project was last updated. Date-Time represented in ISO-8601 format. 983 UpdatedTimestamp *date.Time `json:"updatedTimestamp,omitempty"` 984 // DiscoveryStatus - READ-ONLY; Reports whether project is under discovery. Possible values include: 'DiscoveryStatusUnknown', 'DiscoveryStatusNotStarted', 'DiscoveryStatusInProgress', 'DiscoveryStatusCompleted' 985 DiscoveryStatus DiscoveryStatus `json:"discoveryStatus,omitempty"` 986 // CustomerWorkspaceID - ARM ID of the Service Map workspace created by user. 987 CustomerWorkspaceID *string `json:"customerWorkspaceId,omitempty"` 988 // CustomerWorkspaceLocation - Location of the Service Map workspace created by user. 989 CustomerWorkspaceLocation *string `json:"customerWorkspaceLocation,omitempty"` 990 // LastDiscoveryTimestamp - READ-ONLY; Time when this project was created. Date-Time represented in ISO-8601 format. This value will be null until discovery is complete. 991 LastDiscoveryTimestamp *date.Time `json:"lastDiscoveryTimestamp,omitempty"` 992 // LastDiscoverySessionID - READ-ONLY; Session id of the last discovery. 993 LastDiscoverySessionID *string `json:"lastDiscoverySessionId,omitempty"` 994 // NumberOfGroups - READ-ONLY; Number of groups created in the project. 995 NumberOfGroups *int32 `json:"numberOfGroups,omitempty"` 996 // NumberOfMachines - READ-ONLY; Number of machines in the project. 997 NumberOfMachines *int32 `json:"numberOfMachines,omitempty"` 998 // NumberOfAssessments - READ-ONLY; Number of assessments created in the project. 999 NumberOfAssessments *int32 `json:"numberOfAssessments,omitempty"` 1000 // LastAssessmentTimestamp - READ-ONLY; Time when last assessment was created. Date-Time represented in ISO-8601 format. This value will be null until assessment is created. 1001 LastAssessmentTimestamp *date.Time `json:"lastAssessmentTimestamp,omitempty"` 1002 // ProvisioningState - Provisioning state of the project. Possible values include: 'Accepted', 'Creating', 'Deleting', 'Failed', 'Moving', 'Succeeded' 1003 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 1004} 1005 1006// MarshalJSON is the custom marshaler for ProjectProperties. 1007func (pp ProjectProperties) MarshalJSON() ([]byte, error) { 1008 objectMap := make(map[string]interface{}) 1009 if pp.CustomerWorkspaceID != nil { 1010 objectMap["customerWorkspaceId"] = pp.CustomerWorkspaceID 1011 } 1012 if pp.CustomerWorkspaceLocation != nil { 1013 objectMap["customerWorkspaceLocation"] = pp.CustomerWorkspaceLocation 1014 } 1015 if pp.ProvisioningState != "" { 1016 objectMap["provisioningState"] = pp.ProvisioningState 1017 } 1018 return json.Marshal(objectMap) 1019} 1020 1021// ProjectResultList list of projects. 1022type ProjectResultList struct { 1023 autorest.Response `json:"-"` 1024 // Value - List of projects. 1025 Value *[]Project `json:"value,omitempty"` 1026} 1027 1028// VMFamily VM family name, the list of targeted azure locations and the category of the family. 1029type VMFamily struct { 1030 // FamilyName - READ-ONLY; Name of the VM family. 1031 FamilyName *string `json:"familyName,omitempty"` 1032 // TargetLocations - READ-ONLY; List of Azure regions. 1033 TargetLocations *[]string `json:"targetLocations,omitempty"` 1034 // Category - READ-ONLY; Category of the VM family. 1035 Category *[]string `json:"category,omitempty"` 1036} 1037 1038// MarshalJSON is the custom marshaler for VMFamily. 1039func (vf VMFamily) MarshalJSON() ([]byte, error) { 1040 objectMap := make(map[string]interface{}) 1041 return json.Marshal(objectMap) 1042} 1043