1package baremetalinfrastructure 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 "context" 11 "encoding/json" 12 "github.com/Azure/go-autorest/autorest" 13 "github.com/Azure/go-autorest/autorest/azure" 14 "github.com/Azure/go-autorest/autorest/to" 15 "github.com/Azure/go-autorest/tracing" 16 "net/http" 17) 18 19// The package's fully qualified name. 20const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/baremetalinfrastructure/mgmt/2020-08-06-preview/baremetalinfrastructure" 21 22// AzureBareMetalInstance azureBareMetal instance info on Azure (ARM properties and AzureBareMetal 23// properties) 24type AzureBareMetalInstance struct { 25 autorest.Response `json:"-"` 26 // AzureBareMetalInstanceProperties - AzureBareMetal instance properties 27 *AzureBareMetalInstanceProperties `json:"properties,omitempty"` 28 // Tags - Resource tags. 29 Tags map[string]*string `json:"tags"` 30 // Location - The geo-location where the resource lives 31 Location *string `json:"location,omitempty"` 32 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 33 ID *string `json:"id,omitempty"` 34 // Name - READ-ONLY; The name of the resource 35 Name *string `json:"name,omitempty"` 36 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 37 Type *string `json:"type,omitempty"` 38} 39 40// MarshalJSON is the custom marshaler for AzureBareMetalInstance. 41func (abmi AzureBareMetalInstance) MarshalJSON() ([]byte, error) { 42 objectMap := make(map[string]interface{}) 43 if abmi.AzureBareMetalInstanceProperties != nil { 44 objectMap["properties"] = abmi.AzureBareMetalInstanceProperties 45 } 46 if abmi.Tags != nil { 47 objectMap["tags"] = abmi.Tags 48 } 49 if abmi.Location != nil { 50 objectMap["location"] = abmi.Location 51 } 52 return json.Marshal(objectMap) 53} 54 55// UnmarshalJSON is the custom unmarshaler for AzureBareMetalInstance struct. 56func (abmi *AzureBareMetalInstance) UnmarshalJSON(body []byte) error { 57 var m map[string]*json.RawMessage 58 err := json.Unmarshal(body, &m) 59 if err != nil { 60 return err 61 } 62 for k, v := range m { 63 switch k { 64 case "properties": 65 if v != nil { 66 var azureBareMetalInstanceProperties AzureBareMetalInstanceProperties 67 err = json.Unmarshal(*v, &azureBareMetalInstanceProperties) 68 if err != nil { 69 return err 70 } 71 abmi.AzureBareMetalInstanceProperties = &azureBareMetalInstanceProperties 72 } 73 case "tags": 74 if v != nil { 75 var tags map[string]*string 76 err = json.Unmarshal(*v, &tags) 77 if err != nil { 78 return err 79 } 80 abmi.Tags = tags 81 } 82 case "location": 83 if v != nil { 84 var location string 85 err = json.Unmarshal(*v, &location) 86 if err != nil { 87 return err 88 } 89 abmi.Location = &location 90 } 91 case "id": 92 if v != nil { 93 var ID string 94 err = json.Unmarshal(*v, &ID) 95 if err != nil { 96 return err 97 } 98 abmi.ID = &ID 99 } 100 case "name": 101 if v != nil { 102 var name string 103 err = json.Unmarshal(*v, &name) 104 if err != nil { 105 return err 106 } 107 abmi.Name = &name 108 } 109 case "type": 110 if v != nil { 111 var typeVar string 112 err = json.Unmarshal(*v, &typeVar) 113 if err != nil { 114 return err 115 } 116 abmi.Type = &typeVar 117 } 118 } 119 } 120 121 return nil 122} 123 124// AzureBareMetalInstanceProperties describes the properties of an AzureBareMetal instance. 125type AzureBareMetalInstanceProperties struct { 126 // HardwareProfile - Specifies the hardware settings for the AzureBareMetal instance. 127 HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` 128 // StorageProfile - Specifies the storage settings for the AzureBareMetal instance disks. 129 StorageProfile *StorageProfile `json:"storageProfile,omitempty"` 130 // OsProfile - Specifies the operating system settings for the AzureBareMetal instance. 131 OsProfile *OSProfile `json:"osProfile,omitempty"` 132 // NetworkProfile - Specifies the network settings for the AzureBareMetal instance. 133 NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` 134 // AzureBareMetalInstanceID - READ-ONLY; Specifies the AzureBareMetal instance unique ID. 135 AzureBareMetalInstanceID *string `json:"azureBareMetalInstanceId,omitempty"` 136 // PowerState - READ-ONLY; Resource power state. Possible values include: 'Starting', 'Started', 'Stopping', 'Stopped', 'Restarting', 'Unknown' 137 PowerState AzureBareMetalInstancePowerStateEnum `json:"powerState,omitempty"` 138 // ProximityPlacementGroup - READ-ONLY; Resource proximity placement group 139 ProximityPlacementGroup *string `json:"proximityPlacementGroup,omitempty"` 140 // HwRevision - READ-ONLY; Hardware revision of an AzureBareMetal instance 141 HwRevision *string `json:"hwRevision,omitempty"` 142 // PartnerNodeID - ARM ID of another AzureBareMetalInstance that will share a network with this AzureBareMetalInstance 143 PartnerNodeID *string `json:"partnerNodeId,omitempty"` 144 // ProvisioningState - READ-ONLY; State of provisioning of the AzureBareMetalInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' 145 ProvisioningState AzureBareMetalProvisioningStatesEnum `json:"provisioningState,omitempty"` 146} 147 148// MarshalJSON is the custom marshaler for AzureBareMetalInstanceProperties. 149func (abmip AzureBareMetalInstanceProperties) MarshalJSON() ([]byte, error) { 150 objectMap := make(map[string]interface{}) 151 if abmip.HardwareProfile != nil { 152 objectMap["hardwareProfile"] = abmip.HardwareProfile 153 } 154 if abmip.StorageProfile != nil { 155 objectMap["storageProfile"] = abmip.StorageProfile 156 } 157 if abmip.OsProfile != nil { 158 objectMap["osProfile"] = abmip.OsProfile 159 } 160 if abmip.NetworkProfile != nil { 161 objectMap["networkProfile"] = abmip.NetworkProfile 162 } 163 if abmip.PartnerNodeID != nil { 164 objectMap["partnerNodeId"] = abmip.PartnerNodeID 165 } 166 return json.Marshal(objectMap) 167} 168 169// AzureBareMetalInstancesDeleteFuture an abstraction for monitoring and retrieving the results of a 170// long-running operation. 171type AzureBareMetalInstancesDeleteFuture struct { 172 azure.FutureAPI 173 // Result returns the result of the asynchronous operation. 174 // If the operation has not completed it will return an error. 175 Result func(AzureBareMetalInstancesClient) (autorest.Response, error) 176} 177 178// UnmarshalJSON is the custom unmarshaller for CreateFuture. 179func (future *AzureBareMetalInstancesDeleteFuture) UnmarshalJSON(body []byte) error { 180 var azFuture azure.Future 181 if err := json.Unmarshal(body, &azFuture); err != nil { 182 return err 183 } 184 future.FutureAPI = &azFuture 185 future.Result = future.result 186 return nil 187} 188 189// result is the default implementation for AzureBareMetalInstancesDeleteFuture.Result. 190func (future *AzureBareMetalInstancesDeleteFuture) result(client AzureBareMetalInstancesClient) (ar autorest.Response, err error) { 191 var done bool 192 done, err = future.DoneWithContext(context.Background(), client) 193 if err != nil { 194 err = autorest.NewErrorWithError(err, "baremetalinfrastructure.AzureBareMetalInstancesDeleteFuture", "Result", future.Response(), "Polling failure") 195 return 196 } 197 if !done { 198 ar.Response = future.Response() 199 err = azure.NewAsyncOpIncompleteError("baremetalinfrastructure.AzureBareMetalInstancesDeleteFuture") 200 return 201 } 202 ar.Response = future.Response() 203 return 204} 205 206// AzureBareMetalInstancesListResult the response from the List AzureBareMetal Instances operation. 207type AzureBareMetalInstancesListResult struct { 208 autorest.Response `json:"-"` 209 // Value - The list of Azure BareMetal instances. 210 Value *[]AzureBareMetalInstance `json:"value,omitempty"` 211 // NextLink - The URL to get the next set of AzureBareMetal instances. 212 NextLink *string `json:"nextLink,omitempty"` 213} 214 215// AzureBareMetalInstancesListResultIterator provides access to a complete listing of 216// AzureBareMetalInstance values. 217type AzureBareMetalInstancesListResultIterator struct { 218 i int 219 page AzureBareMetalInstancesListResultPage 220} 221 222// NextWithContext advances to the next value. If there was an error making 223// the request the iterator does not advance and the error is returned. 224func (iter *AzureBareMetalInstancesListResultIterator) NextWithContext(ctx context.Context) (err error) { 225 if tracing.IsEnabled() { 226 ctx = tracing.StartSpan(ctx, fqdn+"/AzureBareMetalInstancesListResultIterator.NextWithContext") 227 defer func() { 228 sc := -1 229 if iter.Response().Response.Response != nil { 230 sc = iter.Response().Response.Response.StatusCode 231 } 232 tracing.EndSpan(ctx, sc, err) 233 }() 234 } 235 iter.i++ 236 if iter.i < len(iter.page.Values()) { 237 return nil 238 } 239 err = iter.page.NextWithContext(ctx) 240 if err != nil { 241 iter.i-- 242 return err 243 } 244 iter.i = 0 245 return nil 246} 247 248// Next advances to the next value. If there was an error making 249// the request the iterator does not advance and the error is returned. 250// Deprecated: Use NextWithContext() instead. 251func (iter *AzureBareMetalInstancesListResultIterator) Next() error { 252 return iter.NextWithContext(context.Background()) 253} 254 255// NotDone returns true if the enumeration should be started or is not yet complete. 256func (iter AzureBareMetalInstancesListResultIterator) NotDone() bool { 257 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 258} 259 260// Response returns the raw server response from the last page request. 261func (iter AzureBareMetalInstancesListResultIterator) Response() AzureBareMetalInstancesListResult { 262 return iter.page.Response() 263} 264 265// Value returns the current value or a zero-initialized value if the 266// iterator has advanced beyond the end of the collection. 267func (iter AzureBareMetalInstancesListResultIterator) Value() AzureBareMetalInstance { 268 if !iter.page.NotDone() { 269 return AzureBareMetalInstance{} 270 } 271 return iter.page.Values()[iter.i] 272} 273 274// Creates a new instance of the AzureBareMetalInstancesListResultIterator type. 275func NewAzureBareMetalInstancesListResultIterator(page AzureBareMetalInstancesListResultPage) AzureBareMetalInstancesListResultIterator { 276 return AzureBareMetalInstancesListResultIterator{page: page} 277} 278 279// IsEmpty returns true if the ListResult contains no values. 280func (abmilr AzureBareMetalInstancesListResult) IsEmpty() bool { 281 return abmilr.Value == nil || len(*abmilr.Value) == 0 282} 283 284// hasNextLink returns true if the NextLink is not empty. 285func (abmilr AzureBareMetalInstancesListResult) hasNextLink() bool { 286 return abmilr.NextLink != nil && len(*abmilr.NextLink) != 0 287} 288 289// azureBareMetalInstancesListResultPreparer prepares a request to retrieve the next set of results. 290// It returns nil if no more results exist. 291func (abmilr AzureBareMetalInstancesListResult) azureBareMetalInstancesListResultPreparer(ctx context.Context) (*http.Request, error) { 292 if !abmilr.hasNextLink() { 293 return nil, nil 294 } 295 return autorest.Prepare((&http.Request{}).WithContext(ctx), 296 autorest.AsJSON(), 297 autorest.AsGet(), 298 autorest.WithBaseURL(to.String(abmilr.NextLink))) 299} 300 301// AzureBareMetalInstancesListResultPage contains a page of AzureBareMetalInstance values. 302type AzureBareMetalInstancesListResultPage struct { 303 fn func(context.Context, AzureBareMetalInstancesListResult) (AzureBareMetalInstancesListResult, error) 304 abmilr AzureBareMetalInstancesListResult 305} 306 307// NextWithContext advances to the next page of values. If there was an error making 308// the request the page does not advance and the error is returned. 309func (page *AzureBareMetalInstancesListResultPage) NextWithContext(ctx context.Context) (err error) { 310 if tracing.IsEnabled() { 311 ctx = tracing.StartSpan(ctx, fqdn+"/AzureBareMetalInstancesListResultPage.NextWithContext") 312 defer func() { 313 sc := -1 314 if page.Response().Response.Response != nil { 315 sc = page.Response().Response.Response.StatusCode 316 } 317 tracing.EndSpan(ctx, sc, err) 318 }() 319 } 320 for { 321 next, err := page.fn(ctx, page.abmilr) 322 if err != nil { 323 return err 324 } 325 page.abmilr = next 326 if !next.hasNextLink() || !next.IsEmpty() { 327 break 328 } 329 } 330 return nil 331} 332 333// Next advances to the next page of values. If there was an error making 334// the request the page does not advance and the error is returned. 335// Deprecated: Use NextWithContext() instead. 336func (page *AzureBareMetalInstancesListResultPage) Next() error { 337 return page.NextWithContext(context.Background()) 338} 339 340// NotDone returns true if the page enumeration should be started or is not yet complete. 341func (page AzureBareMetalInstancesListResultPage) NotDone() bool { 342 return !page.abmilr.IsEmpty() 343} 344 345// Response returns the raw server response from the last page request. 346func (page AzureBareMetalInstancesListResultPage) Response() AzureBareMetalInstancesListResult { 347 return page.abmilr 348} 349 350// Values returns the slice of values for the current page or nil if there are no values. 351func (page AzureBareMetalInstancesListResultPage) Values() []AzureBareMetalInstance { 352 if page.abmilr.IsEmpty() { 353 return nil 354 } 355 return *page.abmilr.Value 356} 357 358// Creates a new instance of the AzureBareMetalInstancesListResultPage type. 359func NewAzureBareMetalInstancesListResultPage(cur AzureBareMetalInstancesListResult, getNextPage func(context.Context, AzureBareMetalInstancesListResult) (AzureBareMetalInstancesListResult, error)) AzureBareMetalInstancesListResultPage { 360 return AzureBareMetalInstancesListResultPage{ 361 fn: getNextPage, 362 abmilr: cur, 363 } 364} 365 366// AzureBareMetalInstancesRestartFuture an abstraction for monitoring and retrieving the results of a 367// long-running operation. 368type AzureBareMetalInstancesRestartFuture struct { 369 azure.FutureAPI 370 // Result returns the result of the asynchronous operation. 371 // If the operation has not completed it will return an error. 372 Result func(AzureBareMetalInstancesClient) (autorest.Response, error) 373} 374 375// UnmarshalJSON is the custom unmarshaller for CreateFuture. 376func (future *AzureBareMetalInstancesRestartFuture) UnmarshalJSON(body []byte) error { 377 var azFuture azure.Future 378 if err := json.Unmarshal(body, &azFuture); err != nil { 379 return err 380 } 381 future.FutureAPI = &azFuture 382 future.Result = future.result 383 return nil 384} 385 386// result is the default implementation for AzureBareMetalInstancesRestartFuture.Result. 387func (future *AzureBareMetalInstancesRestartFuture) result(client AzureBareMetalInstancesClient) (ar autorest.Response, err error) { 388 var done bool 389 done, err = future.DoneWithContext(context.Background(), client) 390 if err != nil { 391 err = autorest.NewErrorWithError(err, "baremetalinfrastructure.AzureBareMetalInstancesRestartFuture", "Result", future.Response(), "Polling failure") 392 return 393 } 394 if !done { 395 ar.Response = future.Response() 396 err = azure.NewAsyncOpIncompleteError("baremetalinfrastructure.AzureBareMetalInstancesRestartFuture") 397 return 398 } 399 ar.Response = future.Response() 400 return 401} 402 403// AzureBareMetalInstancesShutdownFuture an abstraction for monitoring and retrieving the results of a 404// long-running operation. 405type AzureBareMetalInstancesShutdownFuture struct { 406 azure.FutureAPI 407 // Result returns the result of the asynchronous operation. 408 // If the operation has not completed it will return an error. 409 Result func(AzureBareMetalInstancesClient) (autorest.Response, error) 410} 411 412// UnmarshalJSON is the custom unmarshaller for CreateFuture. 413func (future *AzureBareMetalInstancesShutdownFuture) UnmarshalJSON(body []byte) error { 414 var azFuture azure.Future 415 if err := json.Unmarshal(body, &azFuture); err != nil { 416 return err 417 } 418 future.FutureAPI = &azFuture 419 future.Result = future.result 420 return nil 421} 422 423// result is the default implementation for AzureBareMetalInstancesShutdownFuture.Result. 424func (future *AzureBareMetalInstancesShutdownFuture) result(client AzureBareMetalInstancesClient) (ar autorest.Response, err error) { 425 var done bool 426 done, err = future.DoneWithContext(context.Background(), client) 427 if err != nil { 428 err = autorest.NewErrorWithError(err, "baremetalinfrastructure.AzureBareMetalInstancesShutdownFuture", "Result", future.Response(), "Polling failure") 429 return 430 } 431 if !done { 432 ar.Response = future.Response() 433 err = azure.NewAsyncOpIncompleteError("baremetalinfrastructure.AzureBareMetalInstancesShutdownFuture") 434 return 435 } 436 ar.Response = future.Response() 437 return 438} 439 440// AzureBareMetalInstancesStartFuture an abstraction for monitoring and retrieving the results of a 441// long-running operation. 442type AzureBareMetalInstancesStartFuture struct { 443 azure.FutureAPI 444 // Result returns the result of the asynchronous operation. 445 // If the operation has not completed it will return an error. 446 Result func(AzureBareMetalInstancesClient) (autorest.Response, error) 447} 448 449// UnmarshalJSON is the custom unmarshaller for CreateFuture. 450func (future *AzureBareMetalInstancesStartFuture) UnmarshalJSON(body []byte) error { 451 var azFuture azure.Future 452 if err := json.Unmarshal(body, &azFuture); err != nil { 453 return err 454 } 455 future.FutureAPI = &azFuture 456 future.Result = future.result 457 return nil 458} 459 460// result is the default implementation for AzureBareMetalInstancesStartFuture.Result. 461func (future *AzureBareMetalInstancesStartFuture) result(client AzureBareMetalInstancesClient) (ar autorest.Response, err error) { 462 var done bool 463 done, err = future.DoneWithContext(context.Background(), client) 464 if err != nil { 465 err = autorest.NewErrorWithError(err, "baremetalinfrastructure.AzureBareMetalInstancesStartFuture", "Result", future.Response(), "Polling failure") 466 return 467 } 468 if !done { 469 ar.Response = future.Response() 470 err = azure.NewAsyncOpIncompleteError("baremetalinfrastructure.AzureBareMetalInstancesStartFuture") 471 return 472 } 473 ar.Response = future.Response() 474 return 475} 476 477// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag. 478type AzureEntityResource struct { 479 // Etag - READ-ONLY; Resource Etag. 480 Etag *string `json:"etag,omitempty"` 481 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 482 ID *string `json:"id,omitempty"` 483 // Name - READ-ONLY; The name of the resource 484 Name *string `json:"name,omitempty"` 485 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 486 Type *string `json:"type,omitempty"` 487} 488 489// MarshalJSON is the custom marshaler for AzureEntityResource. 490func (aer AzureEntityResource) MarshalJSON() ([]byte, error) { 491 objectMap := make(map[string]interface{}) 492 return json.Marshal(objectMap) 493} 494 495// Disk specifies the disk information fo the AzureBareMetal instance 496type Disk struct { 497 // Name - The disk name. 498 Name *string `json:"name,omitempty"` 499 // DiskSizeGB - Specifies the size of an empty data disk in gigabytes. 500 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 501 // Lun - READ-ONLY; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. 502 Lun *int32 `json:"lun,omitempty"` 503} 504 505// MarshalJSON is the custom marshaler for Disk. 506func (d Disk) MarshalJSON() ([]byte, error) { 507 objectMap := make(map[string]interface{}) 508 if d.Name != nil { 509 objectMap["name"] = d.Name 510 } 511 if d.DiskSizeGB != nil { 512 objectMap["diskSizeGB"] = d.DiskSizeGB 513 } 514 return json.Marshal(objectMap) 515} 516 517// Display detailed BareMetal operation information 518type Display struct { 519 // Provider - READ-ONLY; The localized friendly form of the resource provider name. This form is also expected to include the publisher/company responsible. Use Title Casing. Begin with "Microsoft" for 1st party services. 520 Provider *string `json:"provider,omitempty"` 521 // Resource - READ-ONLY; The localized friendly form of the resource type related to this action/operation. This form should match the public documentation for the resource provider. Use Title Casing. For examples, refer to the “name” section. 522 Resource *string `json:"resource,omitempty"` 523 // Operation - READ-ONLY; The localized friendly name for the operation as shown to the user. This name should be concise (to fit in drop downs), but clear (self-documenting). Use Title Casing and include the entity/resource to which it applies. 524 Operation *string `json:"operation,omitempty"` 525 // Description - READ-ONLY; The localized friendly description for the operation as shown to the user. This description should be thorough, yet concise. It will be used in tool-tips and detailed views. 526 Description *string `json:"description,omitempty"` 527 // Origin - READ-ONLY; The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. Default value is 'user,system' 528 Origin *string `json:"origin,omitempty"` 529} 530 531// MarshalJSON is the custom marshaler for Display. 532func (d Display) MarshalJSON() ([]byte, error) { 533 objectMap := make(map[string]interface{}) 534 return json.Marshal(objectMap) 535} 536 537// ErrorDefinition error definition. 538type ErrorDefinition struct { 539 // Code - READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code. 540 Code *string `json:"code,omitempty"` 541 // Message - READ-ONLY; Description of the error. 542 Message *string `json:"message,omitempty"` 543 // Details - READ-ONLY; Internal error details. 544 Details *[]ErrorDefinition `json:"details,omitempty"` 545} 546 547// MarshalJSON is the custom marshaler for ErrorDefinition. 548func (ed ErrorDefinition) MarshalJSON() ([]byte, error) { 549 objectMap := make(map[string]interface{}) 550 return json.Marshal(objectMap) 551} 552 553// ErrorResponse error response. 554type ErrorResponse struct { 555 // Error - The error details. 556 Error *ErrorDefinition `json:"error,omitempty"` 557} 558 559// HardwareProfile specifies the hardware settings for the AzureBareMetal instance. 560type HardwareProfile struct { 561 // HardwareType - READ-ONLY; Name of the hardware type (vendor and/or their product name). Possible values include: 'CiscoUCS', 'HPE' 562 HardwareType AzureBareMetalHardwareTypeNamesEnum `json:"hardwareType,omitempty"` 563 // AzureBareMetalInstanceSize - READ-ONLY; Specifies the AzureBareMetal instance SKU. Possible values include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m', 'S192xm', 'S96', 'S112', 'S224', 'S224m', 'S224om', 'S224oo', 'S224oom', 'S224ooo', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S448', 'S448m', 'S448om', 'S448oo', 'S448oom', 'S448ooo', 'S576m', 'S576xm', 'S672', 'S672m', 'S672om', 'S672oo', 'S672oom', 'S672ooo', 'S768', 'S768m', 'S768xm', 'S896', 'S896m', 'S896om', 'S896oo', 'S896oom', 'S896ooo', 'S960m' 564 AzureBareMetalInstanceSize AzureBareMetalInstanceSizeNamesEnum `json:"azureBareMetalInstanceSize,omitempty"` 565} 566 567// MarshalJSON is the custom marshaler for HardwareProfile. 568func (hp HardwareProfile) MarshalJSON() ([]byte, error) { 569 objectMap := make(map[string]interface{}) 570 return json.Marshal(objectMap) 571} 572 573// IPAddress specifies the IP address of the network interface. 574type IPAddress struct { 575 // IPAddress - Specifies the IP address of the network interface. 576 IPAddress *string `json:"ipAddress,omitempty"` 577} 578 579// NetworkProfile specifies the network settings for the AzureBareMetal instance disks. 580type NetworkProfile struct { 581 // NetworkInterfaces - Specifies the network interfaces for the AzureBareMetal instance. 582 NetworkInterfaces *[]IPAddress `json:"networkInterfaces,omitempty"` 583 // CircuitID - READ-ONLY; Specifies the circuit id for connecting to express route. 584 CircuitID *string `json:"circuitId,omitempty"` 585} 586 587// MarshalJSON is the custom marshaler for NetworkProfile. 588func (np NetworkProfile) MarshalJSON() ([]byte, error) { 589 objectMap := make(map[string]interface{}) 590 if np.NetworkInterfaces != nil { 591 objectMap["networkInterfaces"] = np.NetworkInterfaces 592 } 593 return json.Marshal(objectMap) 594} 595 596// Operation azureBareMetal operation information 597type Operation struct { 598 // Name - READ-ONLY; The name of the operation being performed on this particular object. This name should match the action name that appears in RBAC / the event service. 599 Name *string `json:"name,omitempty"` 600 // Display - Displayed AzureBareMetal operation information 601 Display *Display `json:"display,omitempty"` 602 // IsDataAction - indicates whether an operation is a data action or not. 603 IsDataAction *bool `json:"isDataAction,omitempty"` 604} 605 606// MarshalJSON is the custom marshaler for Operation. 607func (o Operation) MarshalJSON() ([]byte, error) { 608 objectMap := make(map[string]interface{}) 609 if o.Display != nil { 610 objectMap["display"] = o.Display 611 } 612 if o.IsDataAction != nil { 613 objectMap["isDataAction"] = o.IsDataAction 614 } 615 return json.Marshal(objectMap) 616} 617 618// OperationList list of AzureBareMetal operations 619type OperationList struct { 620 autorest.Response `json:"-"` 621 // Value - List of AzureBareMetal operations 622 Value *[]Operation `json:"value,omitempty"` 623} 624 625// OSProfile specifies the operating system settings for the AzureBareMetal instance. 626type OSProfile struct { 627 // ComputerName - Specifies the host OS name of the AzureBareMetal instance. 628 ComputerName *string `json:"computerName,omitempty"` 629 // OsType - READ-ONLY; This property allows you to specify the type of the OS. 630 OsType *string `json:"osType,omitempty"` 631 // Version - READ-ONLY; Specifies version of operating system. 632 Version *string `json:"version,omitempty"` 633 // SSHPublicKey - Specifies the SSH public key used to access the operating system. 634 SSHPublicKey *string `json:"sshPublicKey,omitempty"` 635} 636 637// MarshalJSON is the custom marshaler for OSProfile. 638func (op OSProfile) MarshalJSON() ([]byte, error) { 639 objectMap := make(map[string]interface{}) 640 if op.ComputerName != nil { 641 objectMap["computerName"] = op.ComputerName 642 } 643 if op.SSHPublicKey != nil { 644 objectMap["sshPublicKey"] = op.SSHPublicKey 645 } 646 return json.Marshal(objectMap) 647} 648 649// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not 650// have tags and a location 651type ProxyResource struct { 652 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 653 ID *string `json:"id,omitempty"` 654 // Name - READ-ONLY; The name of the resource 655 Name *string `json:"name,omitempty"` 656 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 657 Type *string `json:"type,omitempty"` 658} 659 660// MarshalJSON is the custom marshaler for ProxyResource. 661func (pr ProxyResource) MarshalJSON() ([]byte, error) { 662 objectMap := make(map[string]interface{}) 663 return json.Marshal(objectMap) 664} 665 666// Resource common fields that are returned in the response for all Azure Resource Manager resources 667type Resource struct { 668 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 669 ID *string `json:"id,omitempty"` 670 // Name - READ-ONLY; The name of the resource 671 Name *string `json:"name,omitempty"` 672 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 673 Type *string `json:"type,omitempty"` 674} 675 676// MarshalJSON is the custom marshaler for Resource. 677func (r Resource) MarshalJSON() ([]byte, error) { 678 objectMap := make(map[string]interface{}) 679 return json.Marshal(objectMap) 680} 681 682// Result sample result definition 683type Result struct { 684 // SampleProperty - Sample property of type string 685 SampleProperty *string `json:"sampleProperty,omitempty"` 686} 687 688// StorageProfile specifies the storage settings for the AzureBareMetal instance disks. 689type StorageProfile struct { 690 // NfsIPAddress - READ-ONLY; IP Address to connect to storage. 691 NfsIPAddress *string `json:"nfsIpAddress,omitempty"` 692 // OsDisks - Specifies information about the operating system disk used by baremetal instance. 693 OsDisks *[]Disk `json:"osDisks,omitempty"` 694} 695 696// MarshalJSON is the custom marshaler for StorageProfile. 697func (sp StorageProfile) MarshalJSON() ([]byte, error) { 698 objectMap := make(map[string]interface{}) 699 if sp.OsDisks != nil { 700 objectMap["osDisks"] = sp.OsDisks 701 } 702 return json.Marshal(objectMap) 703} 704 705// Tags tags field of the AzureBareMetal instance. 706type Tags struct { 707 // Tags - Tags field of the AzureBareMetal instance. 708 Tags map[string]*string `json:"tags"` 709} 710 711// MarshalJSON is the custom marshaler for Tags. 712func (t Tags) MarshalJSON() ([]byte, error) { 713 objectMap := make(map[string]interface{}) 714 if t.Tags != nil { 715 objectMap["tags"] = t.Tags 716 } 717 return json.Marshal(objectMap) 718} 719 720// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource 721// which has 'tags' and a 'location' 722type TrackedResource struct { 723 // Tags - Resource tags. 724 Tags map[string]*string `json:"tags"` 725 // Location - The geo-location where the resource lives 726 Location *string `json:"location,omitempty"` 727 // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} 728 ID *string `json:"id,omitempty"` 729 // Name - READ-ONLY; The name of the resource 730 Name *string `json:"name,omitempty"` 731 // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" 732 Type *string `json:"type,omitempty"` 733} 734 735// MarshalJSON is the custom marshaler for TrackedResource. 736func (tr TrackedResource) MarshalJSON() ([]byte, error) { 737 objectMap := make(map[string]interface{}) 738 if tr.Tags != nil { 739 objectMap["tags"] = tr.Tags 740 } 741 if tr.Location != nil { 742 objectMap["location"] = tr.Location 743 } 744 return json.Marshal(objectMap) 745} 746