cloud/azure/compute/models/virtual_machine_scale_set_vm_profile.go
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/errors"
)
// VirtualMachineScaleSetVMProfile Describes a virtual machine scale set virtual machine profile.
// swagger:model VirtualMachineScaleSetVMProfile
type VirtualMachineScaleSetVMProfile struct {
// The virtual machine scale set extension profile.
ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
// The virtual machine scale set network profile.
NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"`
// The virtual machine scale set OS profile.
OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"`
// The virtual machine scale set storage profile.
StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"`
}
// Validate validates this virtual machine scale set VM profile
func (m *VirtualMachineScaleSetVMProfile) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateExtensionProfile(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateNetworkProfile(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateOsProfile(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateStorageProfile(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *VirtualMachineScaleSetVMProfile) validateExtensionProfile(formats strfmt.Registry) error {
if swag.IsZero(m.ExtensionProfile) { // not required
return nil
}
if m.ExtensionProfile != nil {
if err := m.ExtensionProfile.Validate(formats); err != nil {
return err
}
}
return nil
}
func (m *VirtualMachineScaleSetVMProfile) validateNetworkProfile(formats strfmt.Registry) error {
if swag.IsZero(m.NetworkProfile) { // not required
return nil
}
if m.NetworkProfile != nil {
if err := m.NetworkProfile.Validate(formats); err != nil {
return err
}
}
return nil
}
func (m *VirtualMachineScaleSetVMProfile) validateOsProfile(formats strfmt.Registry) error {
if swag.IsZero(m.OsProfile) { // not required
return nil
}
if m.OsProfile != nil {
if err := m.OsProfile.Validate(formats); err != nil {
return err
}
}
return nil
}
func (m *VirtualMachineScaleSetVMProfile) validateStorageProfile(formats strfmt.Registry) error {
if swag.IsZero(m.StorageProfile) { // not required
return nil
}
if m.StorageProfile != nil {
if err := m.StorageProfile.Validate(formats); err != nil {
return err
}
}
return nil
}