// Code generated by go-swagger; DO NOT EDIT.

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"
)

// VirtualMachine VirtualMachine describes an instance type
// swagger:model VirtualMachine
type VirtualMachine struct {

	// Average price of the instance (differs from on demand price in case of spot or preemptible instances)
	AvgPrice float64 `json:"avgPrice,omitempty"`

	// Burst signals a burst type instance
	Burst bool `json:"burst,omitempty"`

	// Instance type category
	Category string `json:"category,omitempty"`

	// Number of CPUs in the instance type
	Cpus float64 `json:"cpusPerVm,omitempty"`

	// CurrentGen the vm is of current generation
	CurrentGen bool `json:"currentGen,omitempty"`

	// Number of GPUs in the instance type
	Gpus float64 `json:"gpusPerVm,omitempty"`

	// Available memory in the instance type (GB)
	Mem float64 `json:"memPerVm,omitempty"`

	// NetworkPerf holds the network performance
	NetworkPerf string `json:"networkPerf,omitempty"`

	// NetworkPerfCat holds the network performance category
	NetworkPerfCat string `json:"networkPerfCategory,omitempty"`

	// Regular price of the instance type
	OnDemandPrice float64 `json:"onDemandPrice,omitempty"`

	// Instance type
	Type string `json:"type,omitempty"`

	// Zones
	Zones []string `json:"zones"`
}

// Validate validates this virtual machine
func (m *VirtualMachine) Validate(formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *VirtualMachine) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *VirtualMachine) UnmarshalBinary(b []byte) error {
	var res VirtualMachine
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
