blob: b4a71d0ad2dd8c202e9694420f9da563ad267f6e [file]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.12
// protoc v7.35.0--rc1
// source: virtual_device.proto
package proto
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// VirtualDevice describes how to run Fuchsia using a vm or emulator.
//
// This message should capture the set of system images necessary to boot the
// device, as well as the hardware characteristics of the device.
//
// Its primary purpose is to carry virtualization options across system
// boundaries. For example, Fuchsia infra may pass a file containing this
// message from the build to a tool that runs Fuchsia in QEMU, without
// inspecting the message itself.
type VirtualDevice struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The name of this virtual device.
//
// This is meant to help humans identify this device.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Metadata indicating how to run QEMU.
Qemu *QEMU `protobuf:"bytes,2,opt,name=qemu,proto3" json:"qemu,omitempty"`
// The name of the system kernel image in images.json.
Kernel string `protobuf:"bytes,3,opt,name=kernel,proto3" json:"kernel,omitempty"`
// The name of the initial ramdisk image in images.json.
Initrd string `protobuf:"bytes,4,opt,name=initrd,proto3" json:"initrd,omitempty"`
// Optional. The primary disk drive for this device.
Drive *Drive `protobuf:"bytes,5,opt,name=drive,proto3" json:"drive,omitempty"`
// The device characterics.
Hw *HardwareProfile `protobuf:"bytes,6,opt,name=hw,proto3" json:"hw,omitempty"`
// Kernel command line arguments.
KernelArgs []string `protobuf:"bytes,7,rep,name=kernel_args,json=kernelArgs,proto3" json:"kernel_args,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *VirtualDevice) Reset() {
*x = VirtualDevice{}
mi := &file_virtual_device_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *VirtualDevice) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VirtualDevice) ProtoMessage() {}
func (x *VirtualDevice) ProtoReflect() protoreflect.Message {
mi := &file_virtual_device_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VirtualDevice.ProtoReflect.Descriptor instead.
func (*VirtualDevice) Descriptor() ([]byte, []int) {
return file_virtual_device_proto_rawDescGZIP(), []int{0}
}
func (x *VirtualDevice) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *VirtualDevice) GetQemu() *QEMU {
if x != nil {
return x.Qemu
}
return nil
}
func (x *VirtualDevice) GetKernel() string {
if x != nil {
return x.Kernel
}
return ""
}
func (x *VirtualDevice) GetInitrd() string {
if x != nil {
return x.Initrd
}
return ""
}
func (x *VirtualDevice) GetDrive() *Drive {
if x != nil {
return x.Drive
}
return nil
}
func (x *VirtualDevice) GetHw() *HardwareProfile {
if x != nil {
return x.Hw
}
return nil
}
func (x *VirtualDevice) GetKernelArgs() []string {
if x != nil {
return x.KernelArgs
}
return nil
}
// QEMU describes how to run a VirtualDevice in QEMU.
type QEMU struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The maximum supported QEMU version.
MaxVersion string `protobuf:"bytes,1,opt,name=max_version,json=maxVersion,proto3" json:"max_version,omitempty"`
// The minimum supported QEMU version.
MinVersion string `protobuf:"bytes,2,opt,name=min_version,json=minVersion,proto3" json:"min_version,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *QEMU) Reset() {
*x = QEMU{}
mi := &file_virtual_device_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *QEMU) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QEMU) ProtoMessage() {}
func (x *QEMU) ProtoReflect() protoreflect.Message {
mi := &file_virtual_device_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QEMU.ProtoReflect.Descriptor instead.
func (*QEMU) Descriptor() ([]byte, []int) {
return file_virtual_device_proto_rawDescGZIP(), []int{1}
}
func (x *QEMU) GetMaxVersion() string {
if x != nil {
return x.MaxVersion
}
return ""
}
func (x *QEMU) GetMinVersion() string {
if x != nil {
return x.MinVersion
}
return ""
}
// A PCI disk drive.
type Drive struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The name of the drive.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// A pointer to the image to use as a basis for the drive.
Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
// If true, image is the name of a file to use for this drive. This is useful
// if the drive is, for example, a MinFS image. The path may be relative or
// absolute, depending on the use case.
//
// If false, image is the name of an image in images.json whose path attribute
// points to the file backing this device.
//
// Defaults to false.
IsFilename bool `protobuf:"varint,3,opt,name=is_filename,json=isFilename,proto3" json:"is_filename,omitempty"`
// DEPRECATED: Use device instead.
// TODO(kjharland): Refactor //tools/qemu.go to use device and remove this.
//
// The PCI address for the device.
//
// Defaults to the empty string.
PciAddress string `protobuf:"bytes,4,opt,name=pci_address,json=pciAddress,proto3" json:"pci_address,omitempty"`
Device *Device `protobuf:"bytes,5,opt,name=device,proto3" json:"device,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Drive) Reset() {
*x = Drive{}
mi := &file_virtual_device_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Drive) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Drive) ProtoMessage() {}
func (x *Drive) ProtoReflect() protoreflect.Message {
mi := &file_virtual_device_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Drive.ProtoReflect.Descriptor instead.
func (*Drive) Descriptor() ([]byte, []int) {
return file_virtual_device_proto_rawDescGZIP(), []int{2}
}
func (x *Drive) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Drive) GetImage() string {
if x != nil {
return x.Image
}
return ""
}
func (x *Drive) GetIsFilename() bool {
if x != nil {
return x.IsFilename
}
return false
}
func (x *Drive) GetPciAddress() string {
if x != nil {
return x.PciAddress
}
return ""
}
func (x *Drive) GetDevice() *Device {
if x != nil {
return x.Device
}
return nil
}
type HardwareProfile struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The CPU architecture.
//
// This must be one of:
// - arm64
// - x64
Arch string `protobuf:"bytes,1,opt,name=arch,proto3" json:"arch,omitempty"`
// The number of CPUs.
//
// Defaults to 1.
CpuCount uint32 `protobuf:"varint,2,opt,name=cpu_count,json=cpuCount,proto3" json:"cpu_count,omitempty"`
// The amount of RAM expressed as a string like "5M".
//
// The number must be a positive 64-bit integer in base 10.
// The unit must be any of:
// - m|M for megabytes
// - g|G for gigabytes.
Ram string `protobuf:"bytes,3,opt,name=ram,proto3" json:"ram,omitempty"`
// The MAC address to use for the device.
Mac string `protobuf:"bytes,4,opt,name=mac,proto3" json:"mac,omitempty"`
// Optional networking devices.
//
// If unset, networking is disabled.
NetworkDevices []*Netdev `protobuf:"bytes,5,rep,name=network_devices,json=networkDevices,proto3" json:"network_devices,omitempty"`
// Optional list of drives to mount.
//
// If any drive is a USB, remember to specify a USB host controller.
Drives []*Drive `protobuf:"bytes,6,rep,name=drives,proto3" json:"drives,omitempty"`
// Optional USB host controller interface.
//
// This must be set if USB drives are specified. The only supported value is
// 'xhci'.
Hci string `protobuf:"bytes,7,opt,name=hci,proto3" json:"hci,omitempty"`
// Whether to enable KVM.
//
// Defaults to false.
EnableKvm bool `protobuf:"varint,8,opt,name=enable_kvm,json=enableKvm,proto3" json:"enable_kvm,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *HardwareProfile) Reset() {
*x = HardwareProfile{}
mi := &file_virtual_device_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *HardwareProfile) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HardwareProfile) ProtoMessage() {}
func (x *HardwareProfile) ProtoReflect() protoreflect.Message {
mi := &file_virtual_device_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HardwareProfile.ProtoReflect.Descriptor instead.
func (*HardwareProfile) Descriptor() ([]byte, []int) {
return file_virtual_device_proto_rawDescGZIP(), []int{3}
}
func (x *HardwareProfile) GetArch() string {
if x != nil {
return x.Arch
}
return ""
}
func (x *HardwareProfile) GetCpuCount() uint32 {
if x != nil {
return x.CpuCount
}
return 0
}
func (x *HardwareProfile) GetRam() string {
if x != nil {
return x.Ram
}
return ""
}
func (x *HardwareProfile) GetMac() string {
if x != nil {
return x.Mac
}
return ""
}
func (x *HardwareProfile) GetNetworkDevices() []*Netdev {
if x != nil {
return x.NetworkDevices
}
return nil
}
func (x *HardwareProfile) GetDrives() []*Drive {
if x != nil {
return x.Drives
}
return nil
}
func (x *HardwareProfile) GetHci() string {
if x != nil {
return x.Hci
}
return ""
}
func (x *HardwareProfile) GetEnableKvm() bool {
if x != nil {
return x.EnableKvm
}
return false
}
type Netdev struct {
state protoimpl.MessageState `protogen:"open.v1"`
Device *Device `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
// One of "user" or "tap".
Kind string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Netdev) Reset() {
*x = Netdev{}
mi := &file_virtual_device_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Netdev) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Netdev) ProtoMessage() {}
func (x *Netdev) ProtoReflect() protoreflect.Message {
mi := &file_virtual_device_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Netdev.ProtoReflect.Descriptor instead.
func (*Netdev) Descriptor() ([]byte, []int) {
return file_virtual_device_proto_rawDescGZIP(), []int{4}
}
func (x *Netdev) GetDevice() *Device {
if x != nil {
return x.Device
}
return nil
}
func (x *Netdev) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Netdev) GetKind() string {
if x != nil {
return x.Kind
}
return ""
}
type Device struct {
state protoimpl.MessageState `protogen:"open.v1"`
Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
// Named fields that and can be added to `-device` options.
Options []string `protobuf:"bytes,2,rep,name=options,proto3" json:"options,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Device) Reset() {
*x = Device{}
mi := &file_virtual_device_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Device) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Device) ProtoMessage() {}
func (x *Device) ProtoReflect() protoreflect.Message {
mi := &file_virtual_device_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Device.ProtoReflect.Descriptor instead.
func (*Device) Descriptor() ([]byte, []int) {
return file_virtual_device_proto_rawDescGZIP(), []int{5}
}
func (x *Device) GetModel() string {
if x != nil {
return x.Model
}
return ""
}
func (x *Device) GetOptions() []string {
if x != nil {
return x.Options
}
return nil
}
var File_virtual_device_proto protoreflect.FileDescriptor
const file_virtual_device_proto_rawDesc = "" +
"\n" +
"\x14virtual_device.proto\x12\x0evirtual_device\"\xfc\x01\n" +
"\rVirtualDevice\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12(\n" +
"\x04qemu\x18\x02 \x01(\v2\x14.virtual_device.QEMUR\x04qemu\x12\x16\n" +
"\x06kernel\x18\x03 \x01(\tR\x06kernel\x12\x16\n" +
"\x06initrd\x18\x04 \x01(\tR\x06initrd\x12+\n" +
"\x05drive\x18\x05 \x01(\v2\x15.virtual_device.DriveR\x05drive\x12/\n" +
"\x02hw\x18\x06 \x01(\v2\x1f.virtual_device.HardwareProfileR\x02hw\x12\x1f\n" +
"\vkernel_args\x18\a \x03(\tR\n" +
"kernelArgs\"H\n" +
"\x04QEMU\x12\x1f\n" +
"\vmax_version\x18\x01 \x01(\tR\n" +
"maxVersion\x12\x1f\n" +
"\vmin_version\x18\x02 \x01(\tR\n" +
"minVersion\"\x9f\x01\n" +
"\x05Drive\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n" +
"\x05image\x18\x02 \x01(\tR\x05image\x12\x1f\n" +
"\vis_filename\x18\x03 \x01(\bR\n" +
"isFilename\x12\x1f\n" +
"\vpci_address\x18\x04 \x01(\tR\n" +
"pciAddress\x12.\n" +
"\x06device\x18\x05 \x01(\v2\x16.virtual_device.DeviceR\x06device\"\x87\x02\n" +
"\x0fHardwareProfile\x12\x12\n" +
"\x04arch\x18\x01 \x01(\tR\x04arch\x12\x1b\n" +
"\tcpu_count\x18\x02 \x01(\rR\bcpuCount\x12\x10\n" +
"\x03ram\x18\x03 \x01(\tR\x03ram\x12\x10\n" +
"\x03mac\x18\x04 \x01(\tR\x03mac\x12?\n" +
"\x0fnetwork_devices\x18\x05 \x03(\v2\x16.virtual_device.NetdevR\x0enetworkDevices\x12-\n" +
"\x06drives\x18\x06 \x03(\v2\x15.virtual_device.DriveR\x06drives\x12\x10\n" +
"\x03hci\x18\a \x01(\tR\x03hci\x12\x1d\n" +
"\n" +
"enable_kvm\x18\b \x01(\bR\tenableKvm\"\\\n" +
"\x06Netdev\x12.\n" +
"\x06device\x18\x01 \x01(\v2\x16.virtual_device.DeviceR\x06device\x12\x0e\n" +
"\x02id\x18\x02 \x01(\tR\x02id\x12\x12\n" +
"\x04kind\x18\x03 \x01(\tR\x04kind\"8\n" +
"\x06Device\x12\x14\n" +
"\x05model\x18\x01 \x01(\tR\x05model\x12\x18\n" +
"\aoptions\x18\x02 \x03(\tR\aoptionsB3Z1go.fuchsia.dev/fuchsia/tools/virtual_device/protob\x06proto3"
var (
file_virtual_device_proto_rawDescOnce sync.Once
file_virtual_device_proto_rawDescData []byte
)
func file_virtual_device_proto_rawDescGZIP() []byte {
file_virtual_device_proto_rawDescOnce.Do(func() {
file_virtual_device_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_virtual_device_proto_rawDesc), len(file_virtual_device_proto_rawDesc)))
})
return file_virtual_device_proto_rawDescData
}
var file_virtual_device_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_virtual_device_proto_goTypes = []any{
(*VirtualDevice)(nil), // 0: virtual_device.VirtualDevice
(*QEMU)(nil), // 1: virtual_device.QEMU
(*Drive)(nil), // 2: virtual_device.Drive
(*HardwareProfile)(nil), // 3: virtual_device.HardwareProfile
(*Netdev)(nil), // 4: virtual_device.Netdev
(*Device)(nil), // 5: virtual_device.Device
}
var file_virtual_device_proto_depIdxs = []int32{
1, // 0: virtual_device.VirtualDevice.qemu:type_name -> virtual_device.QEMU
2, // 1: virtual_device.VirtualDevice.drive:type_name -> virtual_device.Drive
3, // 2: virtual_device.VirtualDevice.hw:type_name -> virtual_device.HardwareProfile
5, // 3: virtual_device.Drive.device:type_name -> virtual_device.Device
4, // 4: virtual_device.HardwareProfile.network_devices:type_name -> virtual_device.Netdev
2, // 5: virtual_device.HardwareProfile.drives:type_name -> virtual_device.Drive
5, // 6: virtual_device.Netdev.device:type_name -> virtual_device.Device
7, // [7:7] is the sub-list for method output_type
7, // [7:7] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_virtual_device_proto_init() }
func file_virtual_device_proto_init() {
if File_virtual_device_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_virtual_device_proto_rawDesc), len(file_virtual_device_proto_rawDesc)),
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_virtual_device_proto_goTypes,
DependencyIndexes: file_virtual_device_proto_depIdxs,
MessageInfos: file_virtual_device_proto_msgTypes,
}.Build()
File_virtual_device_proto = out.File
file_virtual_device_proto_goTypes = nil
file_virtual_device_proto_depIdxs = nil
}