diff --git a/Protobuild.toml b/Protobuild.toml index 8bb920851a..ee18671aa6 100644 --- a/Protobuild.toml +++ b/Protobuild.toml @@ -25,6 +25,7 @@ plugins = ["grpc", "fieldpath"] "gogoproto/gogo.proto" = "github.com/gogo/protobuf/gogoproto" "google/protobuf/any.proto" = "github.com/gogo/protobuf/types" "google/protobuf/empty.proto" = "github.com/gogo/protobuf/types" + "google/protobuf/struct.proto" = "github.com/gogo/protobuf/types" "google/protobuf/descriptor.proto" = "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" "google/protobuf/field_mask.proto" = "github.com/gogo/protobuf/types" "google/protobuf/timestamp.proto" = "github.com/gogo/protobuf/types" @@ -41,4 +42,8 @@ plugins = ["ttrpc"] [[overrides]] prefixes = ["github.com/Microsoft/hcsshim/internal/ncproxyttrpc"] +plugins = ["ttrpc"] + +[[overrides]] +prefixes = ["github.com/Microsoft/hcsshim/internal/vmservice"] plugins = ["ttrpc"] \ No newline at end of file diff --git a/internal/vmservice/doc.go b/internal/vmservice/doc.go new file mode 100644 index 0000000000..193ee8cc7a --- /dev/null +++ b/internal/vmservice/doc.go @@ -0,0 +1 @@ +package vmservice diff --git a/internal/vmservice/vmservice.pb.go b/internal/vmservice/vmservice.pb.go new file mode 100644 index 0000000000..417a109bf7 --- /dev/null +++ b/internal/vmservice/vmservice.pb.go @@ -0,0 +1,9110 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: github.com/Microsoft/hcsshim/internal/vmservice/vmservice.proto + +package vmservice + +import ( + context "context" + fmt "fmt" + github_com_containerd_ttrpc "github.com/containerd/ttrpc" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + types "github.com/gogo/protobuf/types" + io "io" + math "math" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// +// Modify existing VM request/response +// +type ModifyType int32 + +const ( + ModifyType_ADD ModifyType = 0 + ModifyType_REMOVE ModifyType = 1 + ModifyType_UPDATE ModifyType = 2 +) + +var ModifyType_name = map[int32]string{ + 0: "ADD", + 1: "REMOVE", + 2: "UPDATE", +} + +var ModifyType_value = map[string]int32{ + "ADD": 0, + "REMOVE": 1, + "UPDATE": 2, +} + +func (x ModifyType) String() string { + return proto.EnumName(ModifyType_name, int32(x)) +} + +func (ModifyType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{0} +} + +type DiskType int32 + +const ( + DiskType_SCSI_DISK_TYPE_VHD1 DiskType = 0 + DiskType_SCSI_DISK_TYPE_VHDX DiskType = 1 + DiskType_SCSI_DISK_TYPE_PHYSICAL DiskType = 2 +) + +var DiskType_name = map[int32]string{ + 0: "SCSI_DISK_TYPE_VHD1", + 1: "SCSI_DISK_TYPE_VHDX", + 2: "SCSI_DISK_TYPE_PHYSICAL", +} + +var DiskType_value = map[string]int32{ + "SCSI_DISK_TYPE_VHD1": 0, + "SCSI_DISK_TYPE_VHDX": 1, + "SCSI_DISK_TYPE_PHYSICAL": 2, +} + +func (x DiskType) String() string { + return proto.EnumName(DiskType_name, int32(x)) +} + +func (DiskType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{1} +} + +type PropertiesVMRequest_PropertiesType int32 + +const ( + PropertiesVMRequest_Memory PropertiesVMRequest_PropertiesType = 0 + PropertiesVMRequest_Processor PropertiesVMRequest_PropertiesType = 1 +) + +var PropertiesVMRequest_PropertiesType_name = map[int32]string{ + 0: "Memory", + 1: "Processor", +} + +var PropertiesVMRequest_PropertiesType_value = map[string]int32{ + "Memory": 0, + "Processor": 1, +} + +func (x PropertiesVMRequest_PropertiesType) String() string { + return proto.EnumName(PropertiesVMRequest_PropertiesType_name, int32(x)) +} + +func (PropertiesVMRequest_PropertiesType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{13, 0} +} + +type CapabilitiesVMResponse_Resource int32 + +const ( + CapabilitiesVMResponse_Vpmem CapabilitiesVMResponse_Resource = 0 + CapabilitiesVMResponse_Scsi CapabilitiesVMResponse_Resource = 1 + CapabilitiesVMResponse_Vpci CapabilitiesVMResponse_Resource = 2 + CapabilitiesVMResponse_Plan9 CapabilitiesVMResponse_Resource = 3 + CapabilitiesVMResponse_VMNic CapabilitiesVMResponse_Resource = 4 + CapabilitiesVMResponse_Memory CapabilitiesVMResponse_Resource = 5 + CapabilitiesVMResponse_Processor CapabilitiesVMResponse_Resource = 6 +) + +var CapabilitiesVMResponse_Resource_name = map[int32]string{ + 0: "Vpmem", + 1: "Scsi", + 2: "Vpci", + 3: "Plan9", + 4: "VMNic", + 5: "Memory", + 6: "Processor", +} + +var CapabilitiesVMResponse_Resource_value = map[string]int32{ + "Vpmem": 0, + "Scsi": 1, + "Vpci": 2, + "Plan9": 3, + "VMNic": 4, + "Memory": 5, + "Processor": 6, +} + +func (x CapabilitiesVMResponse_Resource) String() string { + return proto.EnumName(CapabilitiesVMResponse_Resource_name, int32(x)) +} + +func (CapabilitiesVMResponse_Resource) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{15, 0} +} + +type CapabilitiesVMResponse_SupportedGuestOS int32 + +const ( + CapabilitiesVMResponse_Windows CapabilitiesVMResponse_SupportedGuestOS = 0 + CapabilitiesVMResponse_Linux CapabilitiesVMResponse_SupportedGuestOS = 1 +) + +var CapabilitiesVMResponse_SupportedGuestOS_name = map[int32]string{ + 0: "Windows", + 1: "Linux", +} + +var CapabilitiesVMResponse_SupportedGuestOS_value = map[string]int32{ + "Windows": 0, + "Linux": 1, +} + +func (x CapabilitiesVMResponse_SupportedGuestOS) String() string { + return proto.EnumName(CapabilitiesVMResponse_SupportedGuestOS_name, int32(x)) +} + +func (CapabilitiesVMResponse_SupportedGuestOS) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{15, 1} +} + +// +// VM lifecycle request/response +// +type DirectBoot struct { + KernelPath string `protobuf:"bytes,1,opt,name=kernel_path,json=kernelPath,proto3" json:"kernel_path,omitempty"` + InitrdPath string `protobuf:"bytes,2,opt,name=initrd_path,json=initrdPath,proto3" json:"initrd_path,omitempty"` + KernelCmdline string `protobuf:"bytes,3,opt,name=kernel_cmdline,json=kernelCmdline,proto3" json:"kernel_cmdline,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DirectBoot) Reset() { *m = DirectBoot{} } +func (*DirectBoot) ProtoMessage() {} +func (*DirectBoot) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{0} +} +func (m *DirectBoot) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DirectBoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DirectBoot.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DirectBoot) XXX_Merge(src proto.Message) { + xxx_messageInfo_DirectBoot.Merge(m, src) +} +func (m *DirectBoot) XXX_Size() int { + return m.Size() +} +func (m *DirectBoot) XXX_DiscardUnknown() { + xxx_messageInfo_DirectBoot.DiscardUnknown(m) +} + +var xxx_messageInfo_DirectBoot proto.InternalMessageInfo + +type UEFI struct { + FirmwarePath string `protobuf:"bytes,1,opt,name=firmware_path,json=firmwarePath,proto3" json:"firmware_path,omitempty"` + DevicePath string `protobuf:"bytes,2,opt,name=device_path,json=devicePath,proto3" json:"device_path,omitempty"` + // Optional data to include for uefi boot. For Linux this could be used as the kernel + // commandline. + OptionalData string `protobuf:"bytes,3,opt,name=optional_data,json=optionalData,proto3" json:"optional_data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UEFI) Reset() { *m = UEFI{} } +func (*UEFI) ProtoMessage() {} +func (*UEFI) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{1} +} +func (m *UEFI) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UEFI) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UEFI.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UEFI) XXX_Merge(src proto.Message) { + xxx_messageInfo_UEFI.Merge(m, src) +} +func (m *UEFI) XXX_Size() int { + return m.Size() +} +func (m *UEFI) XXX_DiscardUnknown() { + xxx_messageInfo_UEFI.DiscardUnknown(m) +} + +var xxx_messageInfo_UEFI proto.InternalMessageInfo + +type MemoryConfig struct { + MemoryMb uint64 `protobuf:"varint,1,opt,name=memory_mb,json=memoryMb,proto3" json:"memory_mb,omitempty"` + AllowOvercommit bool `protobuf:"varint,2,opt,name=allow_overcommit,json=allowOvercommit,proto3" json:"allow_overcommit,omitempty"` + DeferredCommit bool `protobuf:"varint,3,opt,name=deferred_commit,json=deferredCommit,proto3" json:"deferred_commit,omitempty"` + HotHint bool `protobuf:"varint,4,opt,name=hot_hint,json=hotHint,proto3" json:"hot_hint,omitempty"` + ColdHint bool `protobuf:"varint,5,opt,name=cold_hint,json=coldHint,proto3" json:"cold_hint,omitempty"` + ColdDiscardHint bool `protobuf:"varint,6,opt,name=cold_discard_hint,json=coldDiscardHint,proto3" json:"cold_discard_hint,omitempty"` + LowMmioGapInMb uint64 `protobuf:"varint,7,opt,name=low_mmio_gap_in_mb,json=lowMmioGapInMb,proto3" json:"low_mmio_gap_in_mb,omitempty"` + HighMmioBaseInMb uint64 `protobuf:"varint,8,opt,name=high_mmio_base_in_mb,json=highMmioBaseInMb,proto3" json:"high_mmio_base_in_mb,omitempty"` + HighMmioGapInMb uint64 `protobuf:"varint,9,opt,name=high_mmio_gap_in_mb,json=highMmioGapInMb,proto3" json:"high_mmio_gap_in_mb,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemoryConfig) Reset() { *m = MemoryConfig{} } +func (*MemoryConfig) ProtoMessage() {} +func (*MemoryConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{2} +} +func (m *MemoryConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MemoryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MemoryConfig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MemoryConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemoryConfig.Merge(m, src) +} +func (m *MemoryConfig) XXX_Size() int { + return m.Size() +} +func (m *MemoryConfig) XXX_DiscardUnknown() { + xxx_messageInfo_MemoryConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_MemoryConfig proto.InternalMessageInfo + +type ProcessorConfig struct { + ProcessorCount uint32 `protobuf:"varint,1,opt,name=processor_count,json=processorCount,proto3" json:"processor_count,omitempty"` + ProcessorWeight uint32 `protobuf:"varint,2,opt,name=processor_weight,json=processorWeight,proto3" json:"processor_weight,omitempty"` + ProcessorLimit uint32 `protobuf:"varint,3,opt,name=processor_limit,json=processorLimit,proto3" json:"processor_limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProcessorConfig) Reset() { *m = ProcessorConfig{} } +func (*ProcessorConfig) ProtoMessage() {} +func (*ProcessorConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{3} +} +func (m *ProcessorConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProcessorConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProcessorConfig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ProcessorConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProcessorConfig.Merge(m, src) +} +func (m *ProcessorConfig) XXX_Size() int { + return m.Size() +} +func (m *ProcessorConfig) XXX_DiscardUnknown() { + xxx_messageInfo_ProcessorConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_ProcessorConfig proto.InternalMessageInfo + +type DevicesConfig struct { + ScsiDisks []*SCSIDisk `protobuf:"bytes,1,rep,name=scsi_disks,json=scsiDisks,proto3" json:"scsi_disks,omitempty"` + VpmemDisks []*VPMEMDisk `protobuf:"bytes,2,rep,name=vpmem_disks,json=vpmemDisks,proto3" json:"vpmem_disks,omitempty"` + NicConfig []*NICConfig `protobuf:"bytes,3,rep,name=nic_config,json=nicConfig,proto3" json:"nic_config,omitempty"` + WindowsDevice []*WindowsPCIDevice `protobuf:"bytes,4,rep,name=windows_device,json=windowsDevice,proto3" json:"windows_device,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DevicesConfig) Reset() { *m = DevicesConfig{} } +func (*DevicesConfig) ProtoMessage() {} +func (*DevicesConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{4} +} +func (m *DevicesConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DevicesConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DevicesConfig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DevicesConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_DevicesConfig.Merge(m, src) +} +func (m *DevicesConfig) XXX_Size() int { + return m.Size() +} +func (m *DevicesConfig) XXX_DiscardUnknown() { + xxx_messageInfo_DevicesConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_DevicesConfig proto.InternalMessageInfo + +type VMConfig struct { + MemoryConfig *MemoryConfig `protobuf:"bytes,1,opt,name=memory_config,json=memoryConfig,proto3" json:"memory_config,omitempty"` + ProcessorConfig *ProcessorConfig `protobuf:"bytes,2,opt,name=processor_config,json=processorConfig,proto3" json:"processor_config,omitempty"` + DevicesConfig *DevicesConfig `protobuf:"bytes,3,opt,name=devices_config,json=devicesConfig,proto3" json:"devices_config,omitempty"` + SerialConfig *SerialConfig `protobuf:"bytes,4,opt,name=serial_config,json=serialConfig,proto3" json:"serial_config,omitempty"` + // Types that are valid to be assigned to BootConfig: + // *VMConfig_DirectBoot + // *VMConfig_Uefi + BootConfig isVMConfig_BootConfig `protobuf_oneof:"BootConfig"` + WindowsOptions *WindowsOptions `protobuf:"bytes,7,opt,name=windows_options,json=windowsOptions,proto3" json:"windows_options,omitempty"` + // Optional k:v extra data. Up to the virtstack for how to interpret this. + ExtraData map[string]string `protobuf:"bytes,8,rep,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VMConfig) Reset() { *m = VMConfig{} } +func (*VMConfig) ProtoMessage() {} +func (*VMConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{5} +} +func (m *VMConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VMConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VMConfig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *VMConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_VMConfig.Merge(m, src) +} +func (m *VMConfig) XXX_Size() int { + return m.Size() +} +func (m *VMConfig) XXX_DiscardUnknown() { + xxx_messageInfo_VMConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_VMConfig proto.InternalMessageInfo + +type isVMConfig_BootConfig interface { + isVMConfig_BootConfig() + MarshalTo([]byte) (int, error) + Size() int +} + +type VMConfig_DirectBoot struct { + DirectBoot *DirectBoot `protobuf:"bytes,5,opt,name=direct_boot,json=directBoot,proto3,oneof"` +} +type VMConfig_Uefi struct { + Uefi *UEFI `protobuf:"bytes,6,opt,name=uefi,proto3,oneof"` +} + +func (*VMConfig_DirectBoot) isVMConfig_BootConfig() {} +func (*VMConfig_Uefi) isVMConfig_BootConfig() {} + +func (m *VMConfig) GetBootConfig() isVMConfig_BootConfig { + if m != nil { + return m.BootConfig + } + return nil +} + +func (m *VMConfig) GetDirectBoot() *DirectBoot { + if x, ok := m.GetBootConfig().(*VMConfig_DirectBoot); ok { + return x.DirectBoot + } + return nil +} + +func (m *VMConfig) GetUefi() *UEFI { + if x, ok := m.GetBootConfig().(*VMConfig_Uefi); ok { + return x.Uefi + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*VMConfig) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _VMConfig_OneofMarshaler, _VMConfig_OneofUnmarshaler, _VMConfig_OneofSizer, []interface{}{ + (*VMConfig_DirectBoot)(nil), + (*VMConfig_Uefi)(nil), + } +} + +func _VMConfig_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*VMConfig) + // BootConfig + switch x := m.BootConfig.(type) { + case *VMConfig_DirectBoot: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.DirectBoot); err != nil { + return err + } + case *VMConfig_Uefi: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Uefi); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("VMConfig.BootConfig has unexpected type %T", x) + } + return nil +} + +func _VMConfig_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*VMConfig) + switch tag { + case 5: // BootConfig.direct_boot + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(DirectBoot) + err := b.DecodeMessage(msg) + m.BootConfig = &VMConfig_DirectBoot{msg} + return true, err + case 6: // BootConfig.uefi + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(UEFI) + err := b.DecodeMessage(msg) + m.BootConfig = &VMConfig_Uefi{msg} + return true, err + default: + return false, nil + } +} + +func _VMConfig_OneofSizer(msg proto.Message) (n int) { + m := msg.(*VMConfig) + // BootConfig + switch x := m.BootConfig.(type) { + case *VMConfig_DirectBoot: + s := proto.Size(x.DirectBoot) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *VMConfig_Uefi: + s := proto.Size(x.Uefi) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +// WindowsOptions contains virtual machine configurations that are only present on a Windows host. +type WindowsOptions struct { + CpuGroupID uint32 `protobuf:"varint,1,opt,name=cpu_group_id,json=cpuGroupId,proto3" json:"cpu_group_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WindowsOptions) Reset() { *m = WindowsOptions{} } +func (*WindowsOptions) ProtoMessage() {} +func (*WindowsOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{6} +} +func (m *WindowsOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WindowsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WindowsOptions.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *WindowsOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_WindowsOptions.Merge(m, src) +} +func (m *WindowsOptions) XXX_Size() int { + return m.Size() +} +func (m *WindowsOptions) XXX_DiscardUnknown() { + xxx_messageInfo_WindowsOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_WindowsOptions proto.InternalMessageInfo + +type SerialConfig struct { + Ports []*SerialConfig_Config `protobuf:"bytes,3,rep,name=ports,proto3" json:"ports,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SerialConfig) Reset() { *m = SerialConfig{} } +func (*SerialConfig) ProtoMessage() {} +func (*SerialConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{7} +} +func (m *SerialConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SerialConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SerialConfig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SerialConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_SerialConfig.Merge(m, src) +} +func (m *SerialConfig) XXX_Size() int { + return m.Size() +} +func (m *SerialConfig) XXX_DiscardUnknown() { + xxx_messageInfo_SerialConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_SerialConfig proto.InternalMessageInfo + +type SerialConfig_Config struct { + Port uint32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"` + // Unix domain socket to relay serial console output to. + SocketPath string `protobuf:"bytes,2,opt,name=socket_path,json=socketPath,proto3" json:"socket_path,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SerialConfig_Config) Reset() { *m = SerialConfig_Config{} } +func (*SerialConfig_Config) ProtoMessage() {} +func (*SerialConfig_Config) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{7, 0} +} +func (m *SerialConfig_Config) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SerialConfig_Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SerialConfig_Config.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SerialConfig_Config) XXX_Merge(src proto.Message) { + xxx_messageInfo_SerialConfig_Config.Merge(m, src) +} +func (m *SerialConfig_Config) XXX_Size() int { + return m.Size() +} +func (m *SerialConfig_Config) XXX_DiscardUnknown() { + xxx_messageInfo_SerialConfig_Config.DiscardUnknown(m) +} + +var xxx_messageInfo_SerialConfig_Config proto.InternalMessageInfo + +type CreateVMRequest struct { + Config *VMConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + // Optional ID to be used by the VM service in log messages. It's up to the + // server/virtstack to make use of this field. Useful for debugging to be able to + // correlate events in the virtstack for a given vm that the client launched. + LogID string `protobuf:"bytes,2,opt,name=log_id,json=logId,proto3" json:"log_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateVMRequest) Reset() { *m = CreateVMRequest{} } +func (*CreateVMRequest) ProtoMessage() {} +func (*CreateVMRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{8} +} +func (m *CreateVMRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateVMRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateVMRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CreateVMRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateVMRequest.Merge(m, src) +} +func (m *CreateVMRequest) XXX_Size() int { + return m.Size() +} +func (m *CreateVMRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateVMRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateVMRequest proto.InternalMessageInfo + +type InspectVMRequest struct { + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + RecursionLimit uint32 `protobuf:"varint,2,opt,name=recursion_limit,json=recursionLimit,proto3" json:"recursion_limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InspectVMRequest) Reset() { *m = InspectVMRequest{} } +func (*InspectVMRequest) ProtoMessage() {} +func (*InspectVMRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{9} +} +func (m *InspectVMRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *InspectVMRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_InspectVMRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *InspectVMRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_InspectVMRequest.Merge(m, src) +} +func (m *InspectVMRequest) XXX_Size() int { + return m.Size() +} +func (m *InspectVMRequest) XXX_DiscardUnknown() { + xxx_messageInfo_InspectVMRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_InspectVMRequest proto.InternalMessageInfo + +type InspectVMResponse struct { + Result *types.Value `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InspectVMResponse) Reset() { *m = InspectVMResponse{} } +func (*InspectVMResponse) ProtoMessage() {} +func (*InspectVMResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{10} +} +func (m *InspectVMResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *InspectVMResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_InspectVMResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *InspectVMResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_InspectVMResponse.Merge(m, src) +} +func (m *InspectVMResponse) XXX_Size() int { + return m.Size() +} +func (m *InspectVMResponse) XXX_DiscardUnknown() { + xxx_messageInfo_InspectVMResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_InspectVMResponse proto.InternalMessageInfo + +type MemoryStats struct { + WorkingSetBytes uint64 `protobuf:"varint,1,opt,name=working_set_bytes,json=workingSetBytes,proto3" json:"working_set_bytes,omitempty"` + AvailableMemory uint64 `protobuf:"varint,2,opt,name=available_memory,json=availableMemory,proto3" json:"available_memory,omitempty"` + ReservedMemory uint64 `protobuf:"varint,3,opt,name=reserved_memory,json=reservedMemory,proto3" json:"reserved_memory,omitempty"` + AssignedMemory uint64 `protobuf:"varint,4,opt,name=assigned_memory,json=assignedMemory,proto3" json:"assigned_memory,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemoryStats) Reset() { *m = MemoryStats{} } +func (*MemoryStats) ProtoMessage() {} +func (*MemoryStats) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{11} +} +func (m *MemoryStats) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MemoryStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MemoryStats.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MemoryStats) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemoryStats.Merge(m, src) +} +func (m *MemoryStats) XXX_Size() int { + return m.Size() +} +func (m *MemoryStats) XXX_DiscardUnknown() { + xxx_messageInfo_MemoryStats.DiscardUnknown(m) +} + +var xxx_messageInfo_MemoryStats proto.InternalMessageInfo + +type ProcessorStats struct { + TotalRuntimeNs uint64 `protobuf:"varint,1,opt,name=total_runtime_ns,json=totalRuntimeNs,proto3" json:"total_runtime_ns,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProcessorStats) Reset() { *m = ProcessorStats{} } +func (*ProcessorStats) ProtoMessage() {} +func (*ProcessorStats) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{12} +} +func (m *ProcessorStats) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProcessorStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProcessorStats.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ProcessorStats) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProcessorStats.Merge(m, src) +} +func (m *ProcessorStats) XXX_Size() int { + return m.Size() +} +func (m *ProcessorStats) XXX_DiscardUnknown() { + xxx_messageInfo_ProcessorStats.DiscardUnknown(m) +} + +var xxx_messageInfo_ProcessorStats proto.InternalMessageInfo + +type PropertiesVMRequest struct { + Types []PropertiesVMRequest_PropertiesType `protobuf:"varint,1,rep,packed,name=types,proto3,enum=vmservice.PropertiesVMRequest_PropertiesType" json:"types,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PropertiesVMRequest) Reset() { *m = PropertiesVMRequest{} } +func (*PropertiesVMRequest) ProtoMessage() {} +func (*PropertiesVMRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{13} +} +func (m *PropertiesVMRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PropertiesVMRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PropertiesVMRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PropertiesVMRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PropertiesVMRequest.Merge(m, src) +} +func (m *PropertiesVMRequest) XXX_Size() int { + return m.Size() +} +func (m *PropertiesVMRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PropertiesVMRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PropertiesVMRequest proto.InternalMessageInfo + +type PropertiesVMResponse struct { + MemoryStats *MemoryStats `protobuf:"bytes,1,opt,name=memory_stats,json=memoryStats,proto3" json:"memory_stats,omitempty"` + ProcessorStats *ProcessorStats `protobuf:"bytes,2,opt,name=processor_stats,json=processorStats,proto3" json:"processor_stats,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PropertiesVMResponse) Reset() { *m = PropertiesVMResponse{} } +func (*PropertiesVMResponse) ProtoMessage() {} +func (*PropertiesVMResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{14} +} +func (m *PropertiesVMResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PropertiesVMResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PropertiesVMResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PropertiesVMResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PropertiesVMResponse.Merge(m, src) +} +func (m *PropertiesVMResponse) XXX_Size() int { + return m.Size() +} +func (m *PropertiesVMResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PropertiesVMResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PropertiesVMResponse proto.InternalMessageInfo + +type CapabilitiesVMResponse struct { + SupportedResources []*CapabilitiesVMResponse_SupportedResource `protobuf:"bytes,1,rep,name=supported_resources,json=supportedResources,proto3" json:"supported_resources,omitempty"` + SupportedGuestOs []CapabilitiesVMResponse_SupportedGuestOS `protobuf:"varint,2,rep,packed,name=supported_guest_os,json=supportedGuestOs,proto3,enum=vmservice.CapabilitiesVMResponse_SupportedGuestOS" json:"supported_guest_os,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CapabilitiesVMResponse) Reset() { *m = CapabilitiesVMResponse{} } +func (*CapabilitiesVMResponse) ProtoMessage() {} +func (*CapabilitiesVMResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{15} +} +func (m *CapabilitiesVMResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CapabilitiesVMResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CapabilitiesVMResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CapabilitiesVMResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CapabilitiesVMResponse.Merge(m, src) +} +func (m *CapabilitiesVMResponse) XXX_Size() int { + return m.Size() +} +func (m *CapabilitiesVMResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CapabilitiesVMResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CapabilitiesVMResponse proto.InternalMessageInfo + +type CapabilitiesVMResponse_SupportedResource struct { + Add bool `protobuf:"varint,1,opt,name=Add,proto3" json:"Add,omitempty"` + Remove bool `protobuf:"varint,2,opt,name=Remove,proto3" json:"Remove,omitempty"` + Update bool `protobuf:"varint,3,opt,name=Update,proto3" json:"Update,omitempty"` + Resource CapabilitiesVMResponse_Resource `protobuf:"varint,4,opt,name=resource,proto3,enum=vmservice.CapabilitiesVMResponse_Resource" json:"resource,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CapabilitiesVMResponse_SupportedResource) Reset() { + *m = CapabilitiesVMResponse_SupportedResource{} +} +func (*CapabilitiesVMResponse_SupportedResource) ProtoMessage() {} +func (*CapabilitiesVMResponse_SupportedResource) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{15, 0} +} +func (m *CapabilitiesVMResponse_SupportedResource) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CapabilitiesVMResponse_SupportedResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CapabilitiesVMResponse_SupportedResource.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CapabilitiesVMResponse_SupportedResource) XXX_Merge(src proto.Message) { + xxx_messageInfo_CapabilitiesVMResponse_SupportedResource.Merge(m, src) +} +func (m *CapabilitiesVMResponse_SupportedResource) XXX_Size() int { + return m.Size() +} +func (m *CapabilitiesVMResponse_SupportedResource) XXX_DiscardUnknown() { + xxx_messageInfo_CapabilitiesVMResponse_SupportedResource.DiscardUnknown(m) +} + +var xxx_messageInfo_CapabilitiesVMResponse_SupportedResource proto.InternalMessageInfo + +type HVSocketListen struct { + ServiceID string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + // Expected that the listener is a unix domain socket. These + // are supported on Windows as of 1809/RS5. + ListenerPath string `protobuf:"bytes,2,opt,name=listener_path,json=listenerPath,proto3" json:"listener_path,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HVSocketListen) Reset() { *m = HVSocketListen{} } +func (*HVSocketListen) ProtoMessage() {} +func (*HVSocketListen) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{16} +} +func (m *HVSocketListen) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HVSocketListen) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HVSocketListen.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HVSocketListen) XXX_Merge(src proto.Message) { + xxx_messageInfo_HVSocketListen.Merge(m, src) +} +func (m *HVSocketListen) XXX_Size() int { + return m.Size() +} +func (m *HVSocketListen) XXX_DiscardUnknown() { + xxx_messageInfo_HVSocketListen.DiscardUnknown(m) +} + +var xxx_messageInfo_HVSocketListen proto.InternalMessageInfo + +type VSockListen struct { + Port uint32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"` + ListenerPath string `protobuf:"bytes,2,opt,name=listener_path,json=listenerPath,proto3" json:"listener_path,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VSockListen) Reset() { *m = VSockListen{} } +func (*VSockListen) ProtoMessage() {} +func (*VSockListen) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{17} +} +func (m *VSockListen) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VSockListen) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VSockListen.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *VSockListen) XXX_Merge(src proto.Message) { + xxx_messageInfo_VSockListen.Merge(m, src) +} +func (m *VSockListen) XXX_Size() int { + return m.Size() +} +func (m *VSockListen) XXX_DiscardUnknown() { + xxx_messageInfo_VSockListen.DiscardUnknown(m) +} + +var xxx_messageInfo_VSockListen proto.InternalMessageInfo + +// Abstraction around a hypervisor socket transport (Hvsocket, Vsock) +type VMSocketRequest struct { + Type ModifyType `protobuf:"varint,1,opt,name=type,proto3,enum=vmservice.ModifyType" json:"type,omitempty"` + // Types that are valid to be assigned to Config: + // *VMSocketRequest_HvsocketList + // *VMSocketRequest_VsockListen + Config isVMSocketRequest_Config `protobuf_oneof:"Config"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VMSocketRequest) Reset() { *m = VMSocketRequest{} } +func (*VMSocketRequest) ProtoMessage() {} +func (*VMSocketRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{18} +} +func (m *VMSocketRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VMSocketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VMSocketRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *VMSocketRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VMSocketRequest.Merge(m, src) +} +func (m *VMSocketRequest) XXX_Size() int { + return m.Size() +} +func (m *VMSocketRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VMSocketRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_VMSocketRequest proto.InternalMessageInfo + +type isVMSocketRequest_Config interface { + isVMSocketRequest_Config() + MarshalTo([]byte) (int, error) + Size() int +} + +type VMSocketRequest_HvsocketList struct { + HvsocketList *HVSocketListen `protobuf:"bytes,2,opt,name=hvsocket_list,json=hvsocketList,proto3,oneof"` +} +type VMSocketRequest_VsockListen struct { + VsockListen *VSockListen `protobuf:"bytes,3,opt,name=vsock_listen,json=vsockListen,proto3,oneof"` +} + +func (*VMSocketRequest_HvsocketList) isVMSocketRequest_Config() {} +func (*VMSocketRequest_VsockListen) isVMSocketRequest_Config() {} + +func (m *VMSocketRequest) GetConfig() isVMSocketRequest_Config { + if m != nil { + return m.Config + } + return nil +} + +func (m *VMSocketRequest) GetHvsocketList() *HVSocketListen { + if x, ok := m.GetConfig().(*VMSocketRequest_HvsocketList); ok { + return x.HvsocketList + } + return nil +} + +func (m *VMSocketRequest) GetVsockListen() *VSockListen { + if x, ok := m.GetConfig().(*VMSocketRequest_VsockListen); ok { + return x.VsockListen + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*VMSocketRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _VMSocketRequest_OneofMarshaler, _VMSocketRequest_OneofUnmarshaler, _VMSocketRequest_OneofSizer, []interface{}{ + (*VMSocketRequest_HvsocketList)(nil), + (*VMSocketRequest_VsockListen)(nil), + } +} + +func _VMSocketRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*VMSocketRequest) + // Config + switch x := m.Config.(type) { + case *VMSocketRequest_HvsocketList: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.HvsocketList); err != nil { + return err + } + case *VMSocketRequest_VsockListen: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.VsockListen); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("VMSocketRequest.Config has unexpected type %T", x) + } + return nil +} + +func _VMSocketRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*VMSocketRequest) + switch tag { + case 2: // Config.hvsocket_list + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(HVSocketListen) + err := b.DecodeMessage(msg) + m.Config = &VMSocketRequest_HvsocketList{msg} + return true, err + case 3: // Config.vsock_listen + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(VSockListen) + err := b.DecodeMessage(msg) + m.Config = &VMSocketRequest_VsockListen{msg} + return true, err + default: + return false, nil + } +} + +func _VMSocketRequest_OneofSizer(msg proto.Message) (n int) { + m := msg.(*VMSocketRequest) + // Config + switch x := m.Config.(type) { + case *VMSocketRequest_HvsocketList: + s := proto.Size(x.HvsocketList) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *VMSocketRequest_VsockListen: + s := proto.Size(x.VsockListen) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type SCSIDisk struct { + Controller uint32 `protobuf:"varint,1,opt,name=controller,proto3" json:"controller,omitempty"` + Lun uint32 `protobuf:"varint,2,opt,name=lun,proto3" json:"lun,omitempty"` + HostPath string `protobuf:"bytes,3,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"` + Type DiskType `protobuf:"varint,4,opt,name=type,proto3,enum=vmservice.DiskType" json:"type,omitempty"` + ReadOnly bool `protobuf:"varint,5,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SCSIDisk) Reset() { *m = SCSIDisk{} } +func (*SCSIDisk) ProtoMessage() {} +func (*SCSIDisk) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{19} +} +func (m *SCSIDisk) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SCSIDisk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SCSIDisk.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SCSIDisk) XXX_Merge(src proto.Message) { + xxx_messageInfo_SCSIDisk.Merge(m, src) +} +func (m *SCSIDisk) XXX_Size() int { + return m.Size() +} +func (m *SCSIDisk) XXX_DiscardUnknown() { + xxx_messageInfo_SCSIDisk.DiscardUnknown(m) +} + +var xxx_messageInfo_SCSIDisk proto.InternalMessageInfo + +type VPMEMDisk struct { + HostPath string `protobuf:"bytes,1,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"` + Type DiskType `protobuf:"varint,2,opt,name=type,proto3,enum=vmservice.DiskType" json:"type,omitempty"` + ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VPMEMDisk) Reset() { *m = VPMEMDisk{} } +func (*VPMEMDisk) ProtoMessage() {} +func (*VPMEMDisk) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{20} +} +func (m *VPMEMDisk) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VPMEMDisk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VPMEMDisk.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *VPMEMDisk) XXX_Merge(src proto.Message) { + xxx_messageInfo_VPMEMDisk.Merge(m, src) +} +func (m *VPMEMDisk) XXX_Size() int { + return m.Size() +} +func (m *VPMEMDisk) XXX_DiscardUnknown() { + xxx_messageInfo_VPMEMDisk.DiscardUnknown(m) +} + +var xxx_messageInfo_VPMEMDisk proto.InternalMessageInfo + +type NICConfig struct { + NicID string `protobuf:"bytes,1,opt,name=nic_id,json=nicId,proto3" json:"nic_id,omitempty"` + PortID string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + MacAddress string `protobuf:"bytes,3,opt,name=mac_address,json=macAddress,proto3" json:"mac_address,omitempty"` + SwitchID string `protobuf:"bytes,4,opt,name=switch_id,json=switchId,proto3" json:"switch_id,omitempty"` + // Optional friendly name for the adapter. Might be useful to show up in logs. + NicName string `protobuf:"bytes,5,opt,name=nic_name,json=nicName,proto3" json:"nic_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NICConfig) Reset() { *m = NICConfig{} } +func (*NICConfig) ProtoMessage() {} +func (*NICConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{21} +} +func (m *NICConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NICConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NICConfig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NICConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_NICConfig.Merge(m, src) +} +func (m *NICConfig) XXX_Size() int { + return m.Size() +} +func (m *NICConfig) XXX_DiscardUnknown() { + xxx_messageInfo_NICConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_NICConfig proto.InternalMessageInfo + +type WindowsPCIDevice struct { + // e.g. PCIP\\VEN_10DE&DEV_13F2&SUBSYS_115E10DE&REV_A1\\6&17F903&0&00400000 + InstanceID string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WindowsPCIDevice) Reset() { *m = WindowsPCIDevice{} } +func (*WindowsPCIDevice) ProtoMessage() {} +func (*WindowsPCIDevice) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{22} +} +func (m *WindowsPCIDevice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WindowsPCIDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WindowsPCIDevice.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *WindowsPCIDevice) XXX_Merge(src proto.Message) { + xxx_messageInfo_WindowsPCIDevice.Merge(m, src) +} +func (m *WindowsPCIDevice) XXX_Size() int { + return m.Size() +} +func (m *WindowsPCIDevice) XXX_DiscardUnknown() { + xxx_messageInfo_WindowsPCIDevice.DiscardUnknown(m) +} + +var xxx_messageInfo_WindowsPCIDevice proto.InternalMessageInfo + +type ModifyMemoryRequest struct { + MemoryMb uint64 `protobuf:"varint,1,opt,name=memory_mb,json=memoryMb,proto3" json:"memory_mb,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ModifyMemoryRequest) Reset() { *m = ModifyMemoryRequest{} } +func (*ModifyMemoryRequest) ProtoMessage() {} +func (*ModifyMemoryRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{23} +} +func (m *ModifyMemoryRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModifyMemoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModifyMemoryRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModifyMemoryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModifyMemoryRequest.Merge(m, src) +} +func (m *ModifyMemoryRequest) XXX_Size() int { + return m.Size() +} +func (m *ModifyMemoryRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ModifyMemoryRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ModifyMemoryRequest proto.InternalMessageInfo + +type ModifyProcessorRequest struct { + // Index of the processor to add/remove + ProcessorIndex uint32 `protobuf:"varint,1,opt,name=processor_index,json=processorIndex,proto3" json:"processor_index,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ModifyProcessorRequest) Reset() { *m = ModifyProcessorRequest{} } +func (*ModifyProcessorRequest) ProtoMessage() {} +func (*ModifyProcessorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{24} +} +func (m *ModifyProcessorRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModifyProcessorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModifyProcessorRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModifyProcessorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModifyProcessorRequest.Merge(m, src) +} +func (m *ModifyProcessorRequest) XXX_Size() int { + return m.Size() +} +func (m *ModifyProcessorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ModifyProcessorRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ModifyProcessorRequest proto.InternalMessageInfo + +type ModifyProcessorConfigRequest struct { + ProcessorWeight uint32 `protobuf:"varint,1,opt,name=processor_weight,json=processorWeight,proto3" json:"processor_weight,omitempty"` + ProcessorLimit uint32 `protobuf:"varint,2,opt,name=processor_limit,json=processorLimit,proto3" json:"processor_limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ModifyProcessorConfigRequest) Reset() { *m = ModifyProcessorConfigRequest{} } +func (*ModifyProcessorConfigRequest) ProtoMessage() {} +func (*ModifyProcessorConfigRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{25} +} +func (m *ModifyProcessorConfigRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModifyProcessorConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModifyProcessorConfigRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModifyProcessorConfigRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModifyProcessorConfigRequest.Merge(m, src) +} +func (m *ModifyProcessorConfigRequest) XXX_Size() int { + return m.Size() +} +func (m *ModifyProcessorConfigRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ModifyProcessorConfigRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ModifyProcessorConfigRequest proto.InternalMessageInfo + +type ModifyResourceRequest struct { + Type ModifyType `protobuf:"varint,1,opt,name=type,proto3,enum=vmservice.ModifyType" json:"type,omitempty"` + // Types that are valid to be assigned to Resource: + // *ModifyResourceRequest_Processor + // *ModifyResourceRequest_ProcessorConfig + // *ModifyResourceRequest_Memory + // *ModifyResourceRequest_ScsiDisk + // *ModifyResourceRequest_VpmemDisk + // *ModifyResourceRequest_NicConfig + // *ModifyResourceRequest_WindowsDevice + Resource isModifyResourceRequest_Resource `protobuf_oneof:"resource"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ModifyResourceRequest) Reset() { *m = ModifyResourceRequest{} } +func (*ModifyResourceRequest) ProtoMessage() {} +func (*ModifyResourceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_272f12cfdaa6c7c8, []int{26} +} +func (m *ModifyResourceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModifyResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModifyResourceRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ModifyResourceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModifyResourceRequest.Merge(m, src) +} +func (m *ModifyResourceRequest) XXX_Size() int { + return m.Size() +} +func (m *ModifyResourceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ModifyResourceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ModifyResourceRequest proto.InternalMessageInfo + +type isModifyResourceRequest_Resource interface { + isModifyResourceRequest_Resource() + MarshalTo([]byte) (int, error) + Size() int +} + +type ModifyResourceRequest_Processor struct { + Processor *ModifyProcessorRequest `protobuf:"bytes,2,opt,name=processor,proto3,oneof"` +} +type ModifyResourceRequest_ProcessorConfig struct { + ProcessorConfig *ModifyProcessorConfigRequest `protobuf:"bytes,3,opt,name=processor_config,json=processorConfig,proto3,oneof"` +} +type ModifyResourceRequest_Memory struct { + Memory *ModifyMemoryRequest `protobuf:"bytes,4,opt,name=memory,proto3,oneof"` +} +type ModifyResourceRequest_ScsiDisk struct { + ScsiDisk *SCSIDisk `protobuf:"bytes,5,opt,name=scsi_disk,json=scsiDisk,proto3,oneof"` +} +type ModifyResourceRequest_VpmemDisk struct { + VpmemDisk *VPMEMDisk `protobuf:"bytes,6,opt,name=vpmem_disk,json=vpmemDisk,proto3,oneof"` +} +type ModifyResourceRequest_NicConfig struct { + NicConfig *NICConfig `protobuf:"bytes,7,opt,name=nic_config,json=nicConfig,proto3,oneof"` +} +type ModifyResourceRequest_WindowsDevice struct { + WindowsDevice *WindowsPCIDevice `protobuf:"bytes,8,opt,name=windows_device,json=windowsDevice,proto3,oneof"` +} + +func (*ModifyResourceRequest_Processor) isModifyResourceRequest_Resource() {} +func (*ModifyResourceRequest_ProcessorConfig) isModifyResourceRequest_Resource() {} +func (*ModifyResourceRequest_Memory) isModifyResourceRequest_Resource() {} +func (*ModifyResourceRequest_ScsiDisk) isModifyResourceRequest_Resource() {} +func (*ModifyResourceRequest_VpmemDisk) isModifyResourceRequest_Resource() {} +func (*ModifyResourceRequest_NicConfig) isModifyResourceRequest_Resource() {} +func (*ModifyResourceRequest_WindowsDevice) isModifyResourceRequest_Resource() {} + +func (m *ModifyResourceRequest) GetResource() isModifyResourceRequest_Resource { + if m != nil { + return m.Resource + } + return nil +} + +func (m *ModifyResourceRequest) GetProcessor() *ModifyProcessorRequest { + if x, ok := m.GetResource().(*ModifyResourceRequest_Processor); ok { + return x.Processor + } + return nil +} + +func (m *ModifyResourceRequest) GetProcessorConfig() *ModifyProcessorConfigRequest { + if x, ok := m.GetResource().(*ModifyResourceRequest_ProcessorConfig); ok { + return x.ProcessorConfig + } + return nil +} + +func (m *ModifyResourceRequest) GetMemory() *ModifyMemoryRequest { + if x, ok := m.GetResource().(*ModifyResourceRequest_Memory); ok { + return x.Memory + } + return nil +} + +func (m *ModifyResourceRequest) GetScsiDisk() *SCSIDisk { + if x, ok := m.GetResource().(*ModifyResourceRequest_ScsiDisk); ok { + return x.ScsiDisk + } + return nil +} + +func (m *ModifyResourceRequest) GetVpmemDisk() *VPMEMDisk { + if x, ok := m.GetResource().(*ModifyResourceRequest_VpmemDisk); ok { + return x.VpmemDisk + } + return nil +} + +func (m *ModifyResourceRequest) GetNicConfig() *NICConfig { + if x, ok := m.GetResource().(*ModifyResourceRequest_NicConfig); ok { + return x.NicConfig + } + return nil +} + +func (m *ModifyResourceRequest) GetWindowsDevice() *WindowsPCIDevice { + if x, ok := m.GetResource().(*ModifyResourceRequest_WindowsDevice); ok { + return x.WindowsDevice + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*ModifyResourceRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _ModifyResourceRequest_OneofMarshaler, _ModifyResourceRequest_OneofUnmarshaler, _ModifyResourceRequest_OneofSizer, []interface{}{ + (*ModifyResourceRequest_Processor)(nil), + (*ModifyResourceRequest_ProcessorConfig)(nil), + (*ModifyResourceRequest_Memory)(nil), + (*ModifyResourceRequest_ScsiDisk)(nil), + (*ModifyResourceRequest_VpmemDisk)(nil), + (*ModifyResourceRequest_NicConfig)(nil), + (*ModifyResourceRequest_WindowsDevice)(nil), + } +} + +func _ModifyResourceRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*ModifyResourceRequest) + // resource + switch x := m.Resource.(type) { + case *ModifyResourceRequest_Processor: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Processor); err != nil { + return err + } + case *ModifyResourceRequest_ProcessorConfig: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ProcessorConfig); err != nil { + return err + } + case *ModifyResourceRequest_Memory: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Memory); err != nil { + return err + } + case *ModifyResourceRequest_ScsiDisk: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ScsiDisk); err != nil { + return err + } + case *ModifyResourceRequest_VpmemDisk: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.VpmemDisk); err != nil { + return err + } + case *ModifyResourceRequest_NicConfig: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.NicConfig); err != nil { + return err + } + case *ModifyResourceRequest_WindowsDevice: + _ = b.EncodeVarint(8<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.WindowsDevice); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("ModifyResourceRequest.Resource has unexpected type %T", x) + } + return nil +} + +func _ModifyResourceRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*ModifyResourceRequest) + switch tag { + case 2: // resource.processor + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ModifyProcessorRequest) + err := b.DecodeMessage(msg) + m.Resource = &ModifyResourceRequest_Processor{msg} + return true, err + case 3: // resource.processor_config + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ModifyProcessorConfigRequest) + err := b.DecodeMessage(msg) + m.Resource = &ModifyResourceRequest_ProcessorConfig{msg} + return true, err + case 4: // resource.memory + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ModifyMemoryRequest) + err := b.DecodeMessage(msg) + m.Resource = &ModifyResourceRequest_Memory{msg} + return true, err + case 5: // resource.scsi_disk + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SCSIDisk) + err := b.DecodeMessage(msg) + m.Resource = &ModifyResourceRequest_ScsiDisk{msg} + return true, err + case 6: // resource.vpmem_disk + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(VPMEMDisk) + err := b.DecodeMessage(msg) + m.Resource = &ModifyResourceRequest_VpmemDisk{msg} + return true, err + case 7: // resource.nic_config + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(NICConfig) + err := b.DecodeMessage(msg) + m.Resource = &ModifyResourceRequest_NicConfig{msg} + return true, err + case 8: // resource.windows_device + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(WindowsPCIDevice) + err := b.DecodeMessage(msg) + m.Resource = &ModifyResourceRequest_WindowsDevice{msg} + return true, err + default: + return false, nil + } +} + +func _ModifyResourceRequest_OneofSizer(msg proto.Message) (n int) { + m := msg.(*ModifyResourceRequest) + // resource + switch x := m.Resource.(type) { + case *ModifyResourceRequest_Processor: + s := proto.Size(x.Processor) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *ModifyResourceRequest_ProcessorConfig: + s := proto.Size(x.ProcessorConfig) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *ModifyResourceRequest_Memory: + s := proto.Size(x.Memory) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *ModifyResourceRequest_ScsiDisk: + s := proto.Size(x.ScsiDisk) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *ModifyResourceRequest_VpmemDisk: + s := proto.Size(x.VpmemDisk) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *ModifyResourceRequest_NicConfig: + s := proto.Size(x.NicConfig) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *ModifyResourceRequest_WindowsDevice: + s := proto.Size(x.WindowsDevice) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterEnum("vmservice.ModifyType", ModifyType_name, ModifyType_value) + proto.RegisterEnum("vmservice.DiskType", DiskType_name, DiskType_value) + proto.RegisterEnum("vmservice.PropertiesVMRequest_PropertiesType", PropertiesVMRequest_PropertiesType_name, PropertiesVMRequest_PropertiesType_value) + proto.RegisterEnum("vmservice.CapabilitiesVMResponse_Resource", CapabilitiesVMResponse_Resource_name, CapabilitiesVMResponse_Resource_value) + proto.RegisterEnum("vmservice.CapabilitiesVMResponse_SupportedGuestOS", CapabilitiesVMResponse_SupportedGuestOS_name, CapabilitiesVMResponse_SupportedGuestOS_value) + proto.RegisterType((*DirectBoot)(nil), "vmservice.DirectBoot") + proto.RegisterType((*UEFI)(nil), "vmservice.UEFI") + proto.RegisterType((*MemoryConfig)(nil), "vmservice.MemoryConfig") + proto.RegisterType((*ProcessorConfig)(nil), "vmservice.ProcessorConfig") + proto.RegisterType((*DevicesConfig)(nil), "vmservice.DevicesConfig") + proto.RegisterType((*VMConfig)(nil), "vmservice.VMConfig") + proto.RegisterMapType((map[string]string)(nil), "vmservice.VMConfig.ExtraDataEntry") + proto.RegisterType((*WindowsOptions)(nil), "vmservice.WindowsOptions") + proto.RegisterType((*SerialConfig)(nil), "vmservice.SerialConfig") + proto.RegisterType((*SerialConfig_Config)(nil), "vmservice.SerialConfig.Config") + proto.RegisterType((*CreateVMRequest)(nil), "vmservice.CreateVMRequest") + proto.RegisterType((*InspectVMRequest)(nil), "vmservice.InspectVMRequest") + proto.RegisterType((*InspectVMResponse)(nil), "vmservice.InspectVMResponse") + proto.RegisterType((*MemoryStats)(nil), "vmservice.MemoryStats") + proto.RegisterType((*ProcessorStats)(nil), "vmservice.ProcessorStats") + proto.RegisterType((*PropertiesVMRequest)(nil), "vmservice.PropertiesVMRequest") + proto.RegisterType((*PropertiesVMResponse)(nil), "vmservice.PropertiesVMResponse") + proto.RegisterType((*CapabilitiesVMResponse)(nil), "vmservice.CapabilitiesVMResponse") + proto.RegisterType((*CapabilitiesVMResponse_SupportedResource)(nil), "vmservice.CapabilitiesVMResponse.SupportedResource") + proto.RegisterType((*HVSocketListen)(nil), "vmservice.HVSocketListen") + proto.RegisterType((*VSockListen)(nil), "vmservice.VSockListen") + proto.RegisterType((*VMSocketRequest)(nil), "vmservice.VMSocketRequest") + proto.RegisterType((*SCSIDisk)(nil), "vmservice.SCSIDisk") + proto.RegisterType((*VPMEMDisk)(nil), "vmservice.VPMEMDisk") + proto.RegisterType((*NICConfig)(nil), "vmservice.NICConfig") + proto.RegisterType((*WindowsPCIDevice)(nil), "vmservice.WindowsPCIDevice") + proto.RegisterType((*ModifyMemoryRequest)(nil), "vmservice.ModifyMemoryRequest") + proto.RegisterType((*ModifyProcessorRequest)(nil), "vmservice.ModifyProcessorRequest") + proto.RegisterType((*ModifyProcessorConfigRequest)(nil), "vmservice.ModifyProcessorConfigRequest") + proto.RegisterType((*ModifyResourceRequest)(nil), "vmservice.ModifyResourceRequest") +} + +func init() { + proto.RegisterFile("github.com/Microsoft/hcsshim/internal/vmservice/vmservice.proto", fileDescriptor_272f12cfdaa6c7c8) +} + +var fileDescriptor_272f12cfdaa6c7c8 = []byte{ + // 2295 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xcf, 0x73, 0xdb, 0xc6, + 0xf5, 0x27, 0x28, 0x8a, 0x22, 0x1f, 0x7f, 0x88, 0x59, 0x39, 0x8e, 0x22, 0x67, 0x24, 0x07, 0x99, + 0x8c, 0x13, 0x27, 0x91, 0xbe, 0x5f, 0xba, 0xe9, 0xd8, 0xae, 0x9b, 0x54, 0x24, 0x65, 0x93, 0x8d, + 0x69, 0x29, 0xa0, 0x4d, 0xd7, 0xb9, 0x20, 0x10, 0xb0, 0x22, 0x77, 0x04, 0x60, 0x69, 0xec, 0x42, + 0xb2, 0x6e, 0x9d, 0xe9, 0xa1, 0xed, 0xa5, 0xb7, 0x1e, 0x3b, 0xfd, 0x2f, 0x3a, 0xd3, 0x6b, 0x67, + 0x3a, 0x93, 0x63, 0x8f, 0xbd, 0xd4, 0xd3, 0xe8, 0xde, 0x53, 0xff, 0x81, 0xce, 0xfe, 0x00, 0x09, + 0x90, 0x92, 0x13, 0xfb, 0x86, 0x7d, 0xfb, 0x79, 0x6f, 0xdf, 0xbe, 0xb7, 0xef, 0x17, 0xe0, 0xcb, + 0x11, 0xe1, 0xe3, 0xf8, 0x70, 0xdb, 0xa5, 0xc1, 0x4e, 0x9f, 0xb8, 0x11, 0x65, 0xf4, 0x88, 0xef, + 0x8c, 0x5d, 0xc6, 0xc6, 0x24, 0xd8, 0x21, 0x21, 0xc7, 0x51, 0xe8, 0xf8, 0x3b, 0x27, 0x01, 0xc3, + 0xd1, 0x09, 0x71, 0xf1, 0xec, 0x6b, 0x7b, 0x12, 0x51, 0x4e, 0x51, 0x79, 0x4a, 0xd8, 0xb8, 0x36, + 0xa2, 0x74, 0xe4, 0xe3, 0x1d, 0xb9, 0x71, 0x18, 0x1f, 0xed, 0xe0, 0x60, 0xc2, 0xcf, 0x14, 0x6e, + 0xe3, 0xbd, 0xf9, 0x4d, 0xc6, 0xa3, 0xd8, 0xe5, 0x6a, 0xd7, 0x8c, 0x01, 0x3a, 0x24, 0xc2, 0x2e, + 0x6f, 0x51, 0xca, 0xd1, 0x16, 0x54, 0x8e, 0x71, 0x14, 0x62, 0xdf, 0x9e, 0x38, 0x7c, 0xbc, 0x6e, + 0x5c, 0x37, 0x3e, 0x2a, 0x5b, 0xa0, 0x48, 0x07, 0x0e, 0x1f, 0x0b, 0x00, 0x09, 0x09, 0x8f, 0x3c, + 0x05, 0xc8, 0x2b, 0x80, 0x22, 0x49, 0xc0, 0x87, 0x50, 0xd7, 0x12, 0xdc, 0xc0, 0xf3, 0x49, 0x88, + 0xd7, 0x97, 0x24, 0xa6, 0xa6, 0xa8, 0x6d, 0x45, 0x34, 0x9f, 0x43, 0xe1, 0xc9, 0xde, 0xfd, 0x1e, + 0xfa, 0x00, 0x6a, 0x47, 0x24, 0x0a, 0x4e, 0x9d, 0x08, 0xa7, 0x8f, 0xac, 0x26, 0xc4, 0xe4, 0x50, + 0x0f, 0x8b, 0x8b, 0x66, 0x0e, 0x55, 0x24, 0x09, 0xf8, 0x00, 0x6a, 0x74, 0xc2, 0x09, 0x0d, 0x1d, + 0xdf, 0xf6, 0x1c, 0xee, 0xe8, 0x33, 0xab, 0x09, 0xb1, 0xe3, 0x70, 0xc7, 0xfc, 0x4f, 0x1e, 0xaa, + 0x7d, 0x1c, 0xd0, 0xe8, 0xac, 0x4d, 0xc3, 0x23, 0x32, 0x42, 0xd7, 0xa0, 0x1c, 0xc8, 0xb5, 0x1d, + 0x1c, 0xca, 0x73, 0x0b, 0x56, 0x49, 0x11, 0xfa, 0x87, 0xe8, 0x63, 0x68, 0x38, 0xbe, 0x4f, 0x4f, + 0x6d, 0x7a, 0x82, 0x23, 0x97, 0x06, 0x01, 0xe1, 0xf2, 0xe0, 0x92, 0xb5, 0x2a, 0xe9, 0xfb, 0x53, + 0x32, 0xba, 0x01, 0xab, 0x1e, 0x3e, 0xc2, 0x51, 0x84, 0x3d, 0x5b, 0x23, 0x97, 0x24, 0xb2, 0x9e, + 0x90, 0xdb, 0x0a, 0xf8, 0x2e, 0x94, 0xc6, 0x94, 0xdb, 0x63, 0x12, 0xf2, 0xf5, 0x82, 0x44, 0xac, + 0x8c, 0x29, 0xef, 0x92, 0x90, 0x0b, 0x5d, 0x5c, 0xea, 0x7b, 0x6a, 0x6f, 0x59, 0xee, 0x95, 0x04, + 0x41, 0x6e, 0xde, 0x84, 0xb7, 0xe4, 0xa6, 0x47, 0x98, 0xeb, 0x44, 0x1a, 0x54, 0x54, 0xca, 0x88, + 0x8d, 0x8e, 0xa2, 0x6b, 0x2c, 0x12, 0x5a, 0x07, 0x01, 0xa1, 0xf6, 0xc8, 0x99, 0xd8, 0x24, 0x14, + 0xb7, 0x5b, 0x91, 0xb7, 0xab, 0xfb, 0xf4, 0xb4, 0x1f, 0x10, 0xfa, 0xc0, 0x99, 0xf4, 0xc2, 0xfe, + 0x21, 0xda, 0x86, 0x2b, 0x63, 0x32, 0x1a, 0x2b, 0xf0, 0xa1, 0xc3, 0xb0, 0x46, 0x97, 0x24, 0xba, + 0x21, 0xf6, 0x04, 0xbc, 0xe5, 0x30, 0x2c, 0xf1, 0x9f, 0xc2, 0xda, 0x0c, 0x3f, 0x13, 0x5e, 0x96, + 0xf0, 0xd5, 0x04, 0xae, 0xa5, 0x9b, 0x7f, 0x30, 0x60, 0xf5, 0x20, 0xa2, 0x2e, 0x66, 0x8c, 0x46, + 0xda, 0xe4, 0x37, 0x60, 0x75, 0x92, 0x90, 0x6c, 0x97, 0xc6, 0x21, 0x97, 0x86, 0xaf, 0x59, 0xf5, + 0xc9, 0x0c, 0x19, 0x87, 0x5c, 0x98, 0x7f, 0x06, 0x3c, 0xc5, 0x64, 0x34, 0x56, 0xe6, 0xaf, 0x59, + 0x33, 0x01, 0x4f, 0x25, 0x39, 0x2b, 0xd3, 0x27, 0x89, 0xf9, 0xd3, 0x32, 0x1f, 0x0a, 0xaa, 0xf9, + 0x5f, 0x03, 0x6a, 0x1d, 0xf9, 0x68, 0x98, 0x56, 0xa7, 0x09, 0xc0, 0x5c, 0x46, 0x84, 0x61, 0x8f, + 0xd9, 0xba, 0x71, 0x7d, 0xe9, 0xa3, 0x4a, 0x73, 0x6d, 0x7b, 0x16, 0x68, 0x83, 0xf6, 0xa0, 0xd7, + 0x21, 0xec, 0xd8, 0x2a, 0x0b, 0x98, 0xf8, 0x62, 0xe8, 0x73, 0xa8, 0x9c, 0x4c, 0x02, 0x1c, 0x68, + 0xa6, 0xbc, 0x64, 0xba, 0x92, 0x62, 0x1a, 0x1e, 0xf4, 0xf7, 0xfa, 0x92, 0x0b, 0x24, 0x50, 0xb1, + 0xdd, 0x02, 0x08, 0x89, 0x6b, 0xbb, 0xf2, 0xe0, 0xf5, 0xa5, 0x05, 0xae, 0x47, 0xbd, 0xb6, 0x52, + 0xca, 0x2a, 0x87, 0xc4, 0xd5, 0xfa, 0xb5, 0xa0, 0x7e, 0x4a, 0x42, 0x8f, 0x9e, 0x32, 0x5b, 0xbd, + 0xf6, 0xf5, 0x82, 0x64, 0xbc, 0x96, 0x62, 0x7c, 0xaa, 0x00, 0x07, 0xed, 0x9e, 0xba, 0x9b, 0x55, + 0xd3, 0x2c, 0x6a, 0x69, 0xfe, 0xad, 0x00, 0xa5, 0x61, 0x5f, 0x0b, 0xbc, 0x07, 0x35, 0xfd, 0xe4, + 0xb5, 0x22, 0xc2, 0xfa, 0x95, 0xe6, 0x3b, 0x29, 0x79, 0xe9, 0x10, 0xb1, 0xaa, 0x41, 0x3a, 0x60, + 0xf6, 0xd2, 0x4e, 0xd1, 0x02, 0xf2, 0x52, 0xc0, 0x46, 0x4a, 0xc0, 0x9c, 0xcf, 0x53, 0x0e, 0xd3, + 0x62, 0xbe, 0x84, 0xba, 0xba, 0x0d, 0x9b, 0x99, 0x43, 0x08, 0x59, 0x4f, 0x09, 0xc9, 0xf8, 0xc9, + 0xaa, 0x79, 0x19, 0xb7, 0xdd, 0x83, 0x1a, 0xc3, 0x11, 0x71, 0xfc, 0x84, 0xbf, 0xb0, 0x70, 0x8b, + 0x81, 0xdc, 0x4f, 0x6e, 0xc1, 0x52, 0x2b, 0x74, 0x1b, 0x2a, 0x9e, 0xcc, 0x78, 0xf6, 0x21, 0xa5, + 0x2a, 0xd8, 0x2a, 0xcd, 0xb7, 0xd3, 0x67, 0x4f, 0xf3, 0x61, 0x37, 0x67, 0x81, 0x37, 0xcb, 0x8e, + 0x1f, 0x42, 0x21, 0xc6, 0x47, 0x44, 0x86, 0x5e, 0xa5, 0xb9, 0x9a, 0x62, 0x11, 0xb9, 0xac, 0x9b, + 0xb3, 0xe4, 0x36, 0x6a, 0xc1, 0x6a, 0xe2, 0x35, 0x95, 0x80, 0x98, 0x8c, 0xbf, 0x4a, 0xf3, 0xdd, + 0x45, 0xb7, 0xed, 0x2b, 0x80, 0x95, 0xf8, 0x59, 0xaf, 0xd1, 0x2e, 0x00, 0x7e, 0xc1, 0x23, 0x47, + 0xa5, 0xb3, 0x92, 0xf4, 0xba, 0x99, 0x7e, 0x64, 0xda, 0xa3, 0xdb, 0x7b, 0x02, 0x25, 0xf2, 0xdb, + 0x5e, 0xc8, 0xa3, 0x33, 0xab, 0x8c, 0x93, 0xf5, 0xc6, 0x3d, 0xa8, 0x67, 0x37, 0x51, 0x03, 0x96, + 0x8e, 0xf1, 0x99, 0x4e, 0xb1, 0xe2, 0x13, 0x5d, 0x81, 0xe5, 0x13, 0xc7, 0x8f, 0xb1, 0xce, 0xa9, + 0x6a, 0x71, 0x37, 0x7f, 0xdb, 0x68, 0x55, 0x01, 0xc4, 0x9d, 0xd5, 0x29, 0x66, 0x0b, 0xea, 0x59, + 0x85, 0xd1, 0xff, 0x41, 0xd5, 0x9d, 0xc4, 0xf6, 0x28, 0xa2, 0xf1, 0xc4, 0x26, 0x9e, 0x0a, 0xe3, + 0x56, 0xfd, 0xfc, 0xe5, 0x16, 0xb4, 0x27, 0xf1, 0x03, 0x41, 0xee, 0x75, 0x2c, 0x70, 0x93, 0x6f, + 0xcf, 0xfc, 0x8d, 0x01, 0xd5, 0xb4, 0x5b, 0xd0, 0x4f, 0x60, 0x79, 0x42, 0x23, 0xce, 0x74, 0x34, + 0x6c, 0x5e, 0xe2, 0xbe, 0x6d, 0xed, 0x45, 0x05, 0xde, 0xf8, 0x39, 0x14, 0x35, 0x3f, 0x82, 0x82, + 0x20, 0xe9, 0x0c, 0x22, 0xbf, 0x45, 0xa9, 0x60, 0xd4, 0x3d, 0xc6, 0x3c, 0x53, 0x2a, 0x14, 0x49, + 0x94, 0x0a, 0xf3, 0x5b, 0x58, 0x6d, 0x47, 0xd8, 0xe1, 0x78, 0xd8, 0xb7, 0xf0, 0xf3, 0x18, 0x33, + 0x8e, 0x3e, 0x81, 0x62, 0x26, 0x1a, 0xd6, 0x2e, 0xb0, 0xb3, 0xa5, 0x21, 0xe8, 0x3a, 0x14, 0x7d, + 0x3a, 0x12, 0x37, 0x96, 0xb2, 0x5b, 0xe5, 0xf3, 0x97, 0x5b, 0xcb, 0x0f, 0xe9, 0xa8, 0xd7, 0xb1, + 0x96, 0x7d, 0x3a, 0xea, 0x79, 0xe6, 0xd7, 0xd0, 0xe8, 0x85, 0x6c, 0x82, 0x5d, 0x3e, 0x3b, 0xe2, + 0x0a, 0x2c, 0x3f, 0x8f, 0x71, 0x94, 0xd8, 0x5e, 0x2d, 0x44, 0xe6, 0x8a, 0xb0, 0x1b, 0x47, 0x8c, + 0xd0, 0x50, 0x67, 0x2e, 0x95, 0xe3, 0xea, 0x53, 0xb2, 0xca, 0x5c, 0x6d, 0x78, 0x2b, 0x25, 0x92, + 0x4d, 0x68, 0xc8, 0x30, 0xda, 0x86, 0x62, 0x84, 0x59, 0xec, 0x73, 0xad, 0xf6, 0xd5, 0x6d, 0x55, + 0xe8, 0xb7, 0x93, 0x42, 0xbf, 0x3d, 0x14, 0xde, 0xb4, 0x34, 0xca, 0xfc, 0x8b, 0x01, 0x15, 0x15, + 0xdc, 0x03, 0xee, 0x70, 0x26, 0xaa, 0xca, 0x29, 0x8d, 0x8e, 0x49, 0x38, 0xb2, 0x19, 0xe6, 0xf6, + 0xe1, 0x19, 0xc7, 0x4c, 0x97, 0xc1, 0x55, 0xbd, 0x31, 0xc0, 0xbc, 0x25, 0xc8, 0xb2, 0x1a, 0x9e, + 0x38, 0xc4, 0x77, 0x0e, 0x7d, 0x6c, 0xab, 0x9c, 0x20, 0x55, 0x2d, 0x58, 0xab, 0x53, 0xba, 0x92, + 0xad, 0x2e, 0x25, 0xcc, 0x87, 0xbd, 0x04, 0xb9, 0xa4, 0xaa, 0x4f, 0x42, 0x9e, 0x01, 0x1d, 0xc6, + 0xc8, 0x28, 0x9c, 0x01, 0x0b, 0x0a, 0x98, 0x90, 0x15, 0xd0, 0xbc, 0x0b, 0xf5, 0x69, 0x4e, 0x51, + 0xaa, 0x7f, 0x04, 0x0d, 0x4e, 0xb9, 0xe3, 0xdb, 0x51, 0x1c, 0x72, 0x12, 0x60, 0x3b, 0x4c, 0x34, + 0xaf, 0x4b, 0xba, 0xa5, 0xc8, 0x8f, 0x98, 0xf9, 0x5b, 0x03, 0xd6, 0x0e, 0x22, 0x3a, 0xc1, 0x11, + 0x27, 0x98, 0xcd, 0x1c, 0xd2, 0x86, 0x65, 0x7e, 0x36, 0xc1, 0x2a, 0xe9, 0xd7, 0x9b, 0x9f, 0x65, + 0xf3, 0xd7, 0x3c, 0x3c, 0x45, 0x7b, 0x7c, 0x36, 0xc1, 0x96, 0xe2, 0x35, 0x3f, 0x91, 0x8a, 0xa5, + 0x36, 0x10, 0x40, 0x51, 0x29, 0xdd, 0xc8, 0xa1, 0x1a, 0x94, 0xa7, 0x6a, 0x37, 0x0c, 0xf3, 0x8f, + 0x06, 0x5c, 0xc9, 0x8a, 0xd6, 0x7e, 0xbc, 0x03, 0x3a, 0xcb, 0xda, 0x4c, 0x5c, 0x6e, 0xea, 0xcd, + 0xf9, 0x94, 0x2c, 0xaf, 0x6e, 0x55, 0x82, 0x94, 0x0b, 0x5b, 0xe9, 0xd2, 0xa7, 0xb8, 0xf3, 0x0b, + 0x99, 0x26, 0x6b, 0xbb, 0x54, 0x55, 0x94, 0x6b, 0xf3, 0x77, 0x05, 0xb8, 0xda, 0x76, 0x26, 0xce, + 0x21, 0xf1, 0xc9, 0x9c, 0x66, 0x1e, 0xac, 0xb1, 0x78, 0x22, 0xe2, 0x0a, 0x7b, 0x76, 0x84, 0x19, + 0x8d, 0x23, 0x17, 0x27, 0x75, 0xf2, 0x56, 0xea, 0x88, 0x8b, 0xf9, 0xb7, 0x07, 0x09, 0xb3, 0xa5, + 0x79, 0x2d, 0xc4, 0xe6, 0x49, 0x0c, 0x7d, 0x0b, 0x33, 0xaa, 0x3d, 0x12, 0xe6, 0xb6, 0xa9, 0xaa, + 0xab, 0xf5, 0x66, 0xf3, 0x35, 0x0e, 0x79, 0x20, 0x58, 0xf7, 0x07, 0x56, 0x83, 0x65, 0x29, 0x6c, + 0xe3, 0x4f, 0x06, 0xbc, 0xb5, 0xa0, 0x8b, 0xc8, 0x86, 0xbb, 0x9e, 0x4a, 0x5c, 0x25, 0x4b, 0x7c, + 0xa2, 0xab, 0x50, 0xb4, 0x70, 0x40, 0x4f, 0xb0, 0xee, 0xf4, 0xf4, 0x4a, 0xd0, 0x9f, 0x4c, 0x3c, + 0x87, 0x63, 0xdd, 0xd7, 0xe9, 0x15, 0xba, 0x0f, 0xa5, 0xc4, 0x2a, 0xf2, 0xe9, 0xd6, 0x9b, 0x37, + 0x7f, 0x58, 0xdf, 0xa9, 0x2d, 0xa6, 0xbc, 0xe6, 0x37, 0x50, 0x9a, 0x6a, 0x55, 0x86, 0xe5, 0xa1, + 0xe8, 0x1a, 0x1a, 0x39, 0x54, 0x82, 0xc2, 0xc0, 0x65, 0xa4, 0x61, 0x88, 0xaf, 0xe1, 0xc4, 0x25, + 0x8d, 0xbc, 0xd8, 0x3e, 0xf0, 0x9d, 0xf0, 0x4e, 0x63, 0x49, 0x22, 0xfb, 0x8f, 0x88, 0xdb, 0x28, + 0xa4, 0x9e, 0xdd, 0x72, 0xf6, 0xd9, 0x15, 0xcd, 0x9b, 0xd0, 0x98, 0xb7, 0x10, 0xaa, 0xc0, 0x8a, + 0xce, 0xe6, 0x8d, 0x9c, 0x10, 0xf3, 0x90, 0x84, 0xf1, 0x8b, 0x86, 0x61, 0xba, 0x50, 0xef, 0x0e, + 0x07, 0x32, 0x57, 0x3e, 0x24, 0x8c, 0xe3, 0x10, 0x7d, 0x0a, 0xa0, 0xaf, 0x93, 0xe4, 0xf8, 0x72, + 0xab, 0x76, 0xfe, 0x72, 0xab, 0x3c, 0x50, 0xd4, 0x5e, 0xc7, 0x2a, 0x6b, 0x40, 0xcf, 0x13, 0x6d, + 0xb8, 0x2f, 0xf9, 0x70, 0x94, 0x4e, 0xbf, 0xd5, 0x84, 0x28, 0x13, 0xf0, 0x7d, 0xa8, 0xc8, 0x33, + 0xf4, 0x09, 0x17, 0x25, 0xf1, 0x1f, 0x25, 0xe7, 0xef, 0x06, 0xac, 0x0e, 0xfb, 0x4a, 0xdb, 0x24, + 0xaa, 0x3f, 0x86, 0x82, 0x88, 0x4c, 0x29, 0xac, 0x9e, 0xa9, 0xe9, 0x7d, 0xea, 0x91, 0xa3, 0x33, + 0x19, 0xbc, 0x12, 0x82, 0x7e, 0x01, 0xb5, 0xf1, 0x89, 0x2e, 0x15, 0x42, 0xee, 0x05, 0x81, 0x93, + 0xb5, 0x45, 0x37, 0x67, 0x55, 0x13, 0x0e, 0x41, 0x41, 0x3f, 0x83, 0xaa, 0x5c, 0xda, 0x4a, 0x2d, + 0xdd, 0xc4, 0xa4, 0xe3, 0x36, 0x75, 0xcf, 0x6e, 0xce, 0xaa, 0x48, 0xb4, 0x5a, 0xb6, 0x4a, 0x49, + 0x15, 0x33, 0xff, 0x6c, 0x40, 0x29, 0xe9, 0x33, 0xd1, 0x26, 0x80, 0x4b, 0x43, 0x1e, 0x51, 0xdf, + 0xc7, 0x91, 0xb6, 0x49, 0x8a, 0x22, 0xde, 0xac, 0x1f, 0x87, 0xba, 0x4a, 0x88, 0x4f, 0x31, 0x38, + 0x8c, 0x29, 0xd3, 0xe5, 0x4e, 0x8d, 0x3d, 0x25, 0x41, 0x90, 0x73, 0xd1, 0x0d, 0x6d, 0x0f, 0xf5, + 0x38, 0xd7, 0x32, 0x3d, 0x0e, 0x3b, 0x4e, 0x59, 0xe3, 0x1a, 0x94, 0x23, 0xec, 0x78, 0x36, 0x0d, + 0xfd, 0xb3, 0x64, 0xfc, 0x10, 0x84, 0xfd, 0xd0, 0x3f, 0x33, 0x43, 0x28, 0x4f, 0x7b, 0xda, 0xec, + 0x79, 0xc6, 0x25, 0xe7, 0xe5, 0x5f, 0xeb, 0xbc, 0xa5, 0xb9, 0xf3, 0xfe, 0x6a, 0x40, 0x79, 0xda, + 0x0e, 0x8b, 0x82, 0x2b, 0x1a, 0xe7, 0xe9, 0xf3, 0x93, 0x05, 0xf7, 0x11, 0x71, 0x45, 0xc1, 0x0d, + 0x89, 0x2b, 0x9f, 0xdd, 0x8a, 0x78, 0x36, 0xb3, 0x9a, 0x0c, 0xe7, 0x2f, 0xb7, 0x8a, 0x07, 0x34, + 0xe2, 0xbd, 0x8e, 0x55, 0x14, 0x5b, 0x3d, 0x4f, 0x34, 0x06, 0x81, 0xe3, 0xda, 0x8e, 0xe7, 0x45, + 0x98, 0x31, 0x6d, 0x29, 0x08, 0x1c, 0x77, 0x57, 0x51, 0xd0, 0xc7, 0x50, 0x66, 0xa7, 0x84, 0xbb, + 0x63, 0x21, 0xa7, 0x20, 0xe5, 0x54, 0xcf, 0x5f, 0x6e, 0x95, 0x06, 0x92, 0xd8, 0xeb, 0x58, 0x25, + 0xb5, 0xdd, 0xf3, 0xc4, 0x1c, 0x27, 0x54, 0x0a, 0x9d, 0x00, 0x4b, 0x63, 0x95, 0xad, 0x95, 0x90, + 0xb8, 0x8f, 0x9c, 0x00, 0x9b, 0x6d, 0x68, 0xcc, 0x37, 0xe4, 0x68, 0x47, 0xcc, 0xcc, 0x8c, 0x3b, + 0x61, 0x3a, 0x8a, 0x64, 0xa7, 0xd4, 0xd3, 0x64, 0xd1, 0x29, 0x25, 0x90, 0x9e, 0x67, 0x36, 0x61, + 0x4d, 0xbd, 0x57, 0x15, 0xd4, 0xc9, 0xeb, 0x7e, 0xd5, 0xbc, 0x6a, 0xee, 0xc2, 0x55, 0xc5, 0x33, + 0x0d, 0xfe, 0x84, 0x2d, 0x33, 0x1f, 0x91, 0xd0, 0xc3, 0x2f, 0x16, 0x66, 0xae, 0x9e, 0xa0, 0x9a, + 0x11, 0xbc, 0x37, 0x27, 0x42, 0xf7, 0x3e, 0xd3, 0xe8, 0x5a, 0x9c, 0xc9, 0x8c, 0x1f, 0x3d, 0x93, + 0xe5, 0x2f, 0x9c, 0xc9, 0x7e, 0x5f, 0x80, 0xb7, 0xd5, 0xa1, 0xd3, 0xbc, 0xf8, 0xfa, 0xb1, 0xbc, + 0x0b, 0xe5, 0xa9, 0x58, 0x1d, 0xc7, 0xef, 0x2f, 0xe0, 0xe7, 0xed, 0xd2, 0xcd, 0x59, 0x33, 0x2e, + 0xf4, 0xf8, 0x82, 0xd1, 0x46, 0x05, 0xf4, 0x8d, 0xcb, 0x25, 0x65, 0xcc, 0xd3, 0xcd, 0x2d, 0x4e, + 0x3a, 0xb7, 0xa1, 0x98, 0xea, 0x6c, 0xb2, 0x2d, 0xee, 0x05, 0x1e, 0xee, 0xe6, 0x2c, 0x8d, 0x47, + 0x4d, 0x28, 0x4f, 0x27, 0x53, 0x3d, 0xa2, 0x5c, 0x34, 0x98, 0x76, 0x73, 0x56, 0x29, 0x19, 0x4d, + 0xd1, 0xe7, 0x00, 0xb3, 0xc9, 0x54, 0x0f, 0x29, 0x17, 0x0e, 0xa6, 0xe2, 0xea, 0xd3, 0xd1, 0x54, + 0xb0, 0xa5, 0x26, 0xd3, 0x95, 0x05, 0xb6, 0x69, 0x28, 0x0a, 0xb6, 0xd9, 0x6c, 0xda, 0x59, 0x98, + 0x4d, 0x4b, 0x92, 0xf5, 0x55, 0xb3, 0x69, 0x37, 0x37, 0x37, 0x9d, 0xb6, 0x60, 0x56, 0x42, 0x6f, + 0x7e, 0x06, 0x30, 0x73, 0x2d, 0x5a, 0x81, 0xa5, 0xdd, 0x4e, 0xa7, 0x91, 0x13, 0xc5, 0xcd, 0xda, + 0xeb, 0xef, 0x0f, 0xf7, 0x1a, 0x86, 0xf8, 0x7e, 0x72, 0xd0, 0xd9, 0x7d, 0xbc, 0xd7, 0xc8, 0xdf, + 0x7c, 0x06, 0xa5, 0x24, 0xab, 0xa0, 0x77, 0x60, 0x4d, 0x98, 0xc4, 0xee, 0xf4, 0x06, 0x5f, 0xd9, + 0x8f, 0x9f, 0x1d, 0xec, 0xd9, 0xc3, 0x6e, 0xe7, 0xff, 0x1b, 0xb9, 0x8b, 0x37, 0x7e, 0xd5, 0x30, + 0xd0, 0x35, 0x78, 0x67, 0x6e, 0xe3, 0xa0, 0xfb, 0x6c, 0xd0, 0x6b, 0xef, 0x3e, 0x6c, 0xe4, 0x9b, + 0xff, 0x5a, 0x86, 0xfc, 0xb0, 0x8f, 0xbe, 0x80, 0x52, 0x32, 0x2b, 0xa0, 0xf4, 0x84, 0x3b, 0x37, + 0x40, 0x6c, 0x2c, 0x76, 0xde, 0x7b, 0xc1, 0x84, 0x9f, 0xa1, 0x7b, 0x00, 0x8f, 0xb1, 0x13, 0x79, + 0xf4, 0x34, 0x1c, 0xf6, 0xd1, 0x25, 0xa8, 0x4b, 0xb9, 0xef, 0xc0, 0xca, 0x81, 0x13, 0x33, 0xfc, + 0x06, 0xac, 0x77, 0x65, 0x43, 0x11, 0x07, 0x6f, 0xc2, 0x7b, 0x1b, 0x8a, 0x4f, 0x1d, 0xc2, 0xdf, + 0x80, 0xf3, 0x3e, 0x94, 0xa7, 0x53, 0x0a, 0x4a, 0x3f, 0x83, 0xf9, 0x71, 0x68, 0xe3, 0xbd, 0x8b, + 0x37, 0x75, 0xdb, 0xf9, 0x15, 0xd4, 0xb3, 0xbd, 0xd3, 0xa5, 0x9a, 0xbc, 0xff, 0x83, 0xed, 0x16, + 0xda, 0x87, 0x6a, 0xba, 0xeb, 0x46, 0x9b, 0xaf, 0xee, 0xf4, 0x37, 0xb6, 0x2e, 0xdd, 0xd7, 0x02, + 0x7f, 0x09, 0xf5, 0x6c, 0xc2, 0x42, 0xd7, 0x17, 0xa2, 0x7a, 0x2e, 0x97, 0x5d, 0x6a, 0xb1, 0x2f, + 0xa0, 0x94, 0xb4, 0x30, 0x99, 0x07, 0x36, 0xd7, 0xd7, 0x5c, 0xca, 0xff, 0x53, 0x28, 0x7c, 0x1d, + 0x13, 0xfe, 0xba, 0x9e, 0x6a, 0x7d, 0xf0, 0xdd, 0xf7, 0x9b, 0xb9, 0x7f, 0x7e, 0xbf, 0x99, 0xfb, + 0xf5, 0xf9, 0xa6, 0xf1, 0xdd, 0xf9, 0xa6, 0xf1, 0x8f, 0xf3, 0x4d, 0xe3, 0xdf, 0xe7, 0x9b, 0xc6, + 0x37, 0xb3, 0x9f, 0xca, 0x87, 0x45, 0xc9, 0x74, 0xeb, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfc, + 0x8a, 0x18, 0x1a, 0xa9, 0x16, 0x00, 0x00, +} + +func (m *DirectBoot) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DirectBoot) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.KernelPath) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.KernelPath))) + i += copy(dAtA[i:], m.KernelPath) + } + if len(m.InitrdPath) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.InitrdPath))) + i += copy(dAtA[i:], m.InitrdPath) + } + if len(m.KernelCmdline) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.KernelCmdline))) + i += copy(dAtA[i:], m.KernelCmdline) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UEFI) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UEFI) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.FirmwarePath) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.FirmwarePath))) + i += copy(dAtA[i:], m.FirmwarePath) + } + if len(m.DevicePath) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.DevicePath))) + i += copy(dAtA[i:], m.DevicePath) + } + if len(m.OptionalData) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.OptionalData))) + i += copy(dAtA[i:], m.OptionalData) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MemoryConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MemoryConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MemoryMb != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.MemoryMb)) + } + if m.AllowOvercommit { + dAtA[i] = 0x10 + i++ + if m.AllowOvercommit { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.DeferredCommit { + dAtA[i] = 0x18 + i++ + if m.DeferredCommit { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.HotHint { + dAtA[i] = 0x20 + i++ + if m.HotHint { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.ColdHint { + dAtA[i] = 0x28 + i++ + if m.ColdHint { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.ColdDiscardHint { + dAtA[i] = 0x30 + i++ + if m.ColdDiscardHint { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.LowMmioGapInMb != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.LowMmioGapInMb)) + } + if m.HighMmioBaseInMb != 0 { + dAtA[i] = 0x40 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.HighMmioBaseInMb)) + } + if m.HighMmioGapInMb != 0 { + dAtA[i] = 0x48 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.HighMmioGapInMb)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ProcessorConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProcessorConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ProcessorCount != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.ProcessorCount)) + } + if m.ProcessorWeight != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.ProcessorWeight)) + } + if m.ProcessorLimit != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.ProcessorLimit)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DevicesConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DevicesConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ScsiDisks) > 0 { + for _, msg := range m.ScsiDisks { + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.VpmemDisks) > 0 { + for _, msg := range m.VpmemDisks { + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NicConfig) > 0 { + for _, msg := range m.NicConfig { + dAtA[i] = 0x1a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.WindowsDevice) > 0 { + for _, msg := range m.WindowsDevice { + dAtA[i] = 0x22 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *VMConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VMConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MemoryConfig != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.MemoryConfig.Size())) + n1, err := m.MemoryConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.ProcessorConfig != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.ProcessorConfig.Size())) + n2, err := m.ProcessorConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.DevicesConfig != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.DevicesConfig.Size())) + n3, err := m.DevicesConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.SerialConfig != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.SerialConfig.Size())) + n4, err := m.SerialConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.BootConfig != nil { + nn5, err := m.BootConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn5 + } + if m.WindowsOptions != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.WindowsOptions.Size())) + n6, err := m.WindowsOptions.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if len(m.ExtraData) > 0 { + for k, _ := range m.ExtraData { + dAtA[i] = 0x42 + i++ + v := m.ExtraData[k] + mapSize := 1 + len(k) + sovVmservice(uint64(len(k))) + 1 + len(v) + sovVmservice(uint64(len(v))) + i = encodeVarintVmservice(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *VMConfig_DirectBoot) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.DirectBoot != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.DirectBoot.Size())) + n7, err := m.DirectBoot.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + return i, nil +} +func (m *VMConfig_Uefi) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Uefi != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Uefi.Size())) + n8, err := m.Uefi.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + return i, nil +} +func (m *WindowsOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WindowsOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.CpuGroupID != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.CpuGroupID)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *SerialConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SerialConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Ports) > 0 { + for _, msg := range m.Ports { + dAtA[i] = 0x1a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *SerialConfig_Config) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SerialConfig_Config) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Port != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Port)) + } + if len(m.SocketPath) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.SocketPath))) + i += copy(dAtA[i:], m.SocketPath) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CreateVMRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateVMRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Config != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Config.Size())) + n9, err := m.Config.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + if len(m.LogID) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.LogID))) + i += copy(dAtA[i:], m.LogID) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *InspectVMRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InspectVMRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Query) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.Query))) + i += copy(dAtA[i:], m.Query) + } + if m.RecursionLimit != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.RecursionLimit)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *InspectVMResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InspectVMResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Result.Size())) + n10, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MemoryStats) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MemoryStats) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.WorkingSetBytes != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.WorkingSetBytes)) + } + if m.AvailableMemory != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.AvailableMemory)) + } + if m.ReservedMemory != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.ReservedMemory)) + } + if m.AssignedMemory != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.AssignedMemory)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ProcessorStats) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProcessorStats) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TotalRuntimeNs != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.TotalRuntimeNs)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *PropertiesVMRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PropertiesVMRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Types) > 0 { + dAtA12 := make([]byte, len(m.Types)*10) + var j11 int + for _, num := range m.Types { + for num >= 1<<7 { + dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j11++ + } + dAtA12[j11] = uint8(num) + j11++ + } + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(j11)) + i += copy(dAtA[i:], dAtA12[:j11]) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *PropertiesVMResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PropertiesVMResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MemoryStats != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.MemoryStats.Size())) + n13, err := m.MemoryStats.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 + } + if m.ProcessorStats != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.ProcessorStats.Size())) + n14, err := m.ProcessorStats.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CapabilitiesVMResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CapabilitiesVMResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.SupportedResources) > 0 { + for _, msg := range m.SupportedResources { + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.SupportedGuestOs) > 0 { + dAtA16 := make([]byte, len(m.SupportedGuestOs)*10) + var j15 int + for _, num := range m.SupportedGuestOs { + for num >= 1<<7 { + dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j15++ + } + dAtA16[j15] = uint8(num) + j15++ + } + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(j15)) + i += copy(dAtA[i:], dAtA16[:j15]) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CapabilitiesVMResponse_SupportedResource) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CapabilitiesVMResponse_SupportedResource) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Add { + dAtA[i] = 0x8 + i++ + if m.Add { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Remove { + dAtA[i] = 0x10 + i++ + if m.Remove { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Update { + dAtA[i] = 0x18 + i++ + if m.Update { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Resource != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Resource)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *HVSocketListen) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HVSocketListen) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ServiceID) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.ServiceID))) + i += copy(dAtA[i:], m.ServiceID) + } + if len(m.ListenerPath) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.ListenerPath))) + i += copy(dAtA[i:], m.ListenerPath) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *VSockListen) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VSockListen) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Port != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Port)) + } + if len(m.ListenerPath) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.ListenerPath))) + i += copy(dAtA[i:], m.ListenerPath) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *VMSocketRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VMSocketRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Type != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Type)) + } + if m.Config != nil { + nn17, err := m.Config.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn17 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *VMSocketRequest_HvsocketList) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.HvsocketList != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.HvsocketList.Size())) + n18, err := m.HvsocketList.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + } + return i, nil +} +func (m *VMSocketRequest_VsockListen) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.VsockListen != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.VsockListen.Size())) + n19, err := m.VsockListen.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + } + return i, nil +} +func (m *SCSIDisk) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SCSIDisk) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Controller != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Controller)) + } + if m.Lun != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Lun)) + } + if len(m.HostPath) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.HostPath))) + i += copy(dAtA[i:], m.HostPath) + } + if m.Type != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Type)) + } + if m.ReadOnly { + dAtA[i] = 0x28 + i++ + if m.ReadOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *VPMEMDisk) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VPMEMDisk) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.HostPath) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.HostPath))) + i += copy(dAtA[i:], m.HostPath) + } + if m.Type != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Type)) + } + if m.ReadOnly { + dAtA[i] = 0x18 + i++ + if m.ReadOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NICConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NICConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NicID) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.NicID))) + i += copy(dAtA[i:], m.NicID) + } + if len(m.PortID) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.PortID))) + i += copy(dAtA[i:], m.PortID) + } + if len(m.MacAddress) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.MacAddress))) + i += copy(dAtA[i:], m.MacAddress) + } + if len(m.SwitchID) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.SwitchID))) + i += copy(dAtA[i:], m.SwitchID) + } + if len(m.NicName) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.NicName))) + i += copy(dAtA[i:], m.NicName) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *WindowsPCIDevice) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WindowsPCIDevice) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.InstanceID) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintVmservice(dAtA, i, uint64(len(m.InstanceID))) + i += copy(dAtA[i:], m.InstanceID) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ModifyMemoryRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModifyMemoryRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MemoryMb != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.MemoryMb)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ModifyProcessorRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModifyProcessorRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ProcessorIndex != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.ProcessorIndex)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ModifyProcessorConfigRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModifyProcessorConfigRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ProcessorWeight != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.ProcessorWeight)) + } + if m.ProcessorLimit != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.ProcessorLimit)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ModifyResourceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModifyResourceRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Type != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Type)) + } + if m.Resource != nil { + nn20, err := m.Resource.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn20 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ModifyResourceRequest_Processor) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Processor != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Processor.Size())) + n21, err := m.Processor.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + return i, nil +} +func (m *ModifyResourceRequest_ProcessorConfig) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ProcessorConfig != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.ProcessorConfig.Size())) + n22, err := m.ProcessorConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + } + return i, nil +} +func (m *ModifyResourceRequest_Memory) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Memory != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.Memory.Size())) + n23, err := m.Memory.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 + } + return i, nil +} +func (m *ModifyResourceRequest_ScsiDisk) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ScsiDisk != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.ScsiDisk.Size())) + n24, err := m.ScsiDisk.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n24 + } + return i, nil +} +func (m *ModifyResourceRequest_VpmemDisk) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.VpmemDisk != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.VpmemDisk.Size())) + n25, err := m.VpmemDisk.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n25 + } + return i, nil +} +func (m *ModifyResourceRequest_NicConfig) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.NicConfig != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.NicConfig.Size())) + n26, err := m.NicConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n26 + } + return i, nil +} +func (m *ModifyResourceRequest_WindowsDevice) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.WindowsDevice != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintVmservice(dAtA, i, uint64(m.WindowsDevice.Size())) + n27, err := m.WindowsDevice.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 + } + return i, nil +} +func encodeVarintVmservice(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *DirectBoot) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.KernelPath) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + l = len(m.InitrdPath) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + l = len(m.KernelCmdline) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UEFI) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FirmwarePath) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + l = len(m.DevicePath) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + l = len(m.OptionalData) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MemoryConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MemoryMb != 0 { + n += 1 + sovVmservice(uint64(m.MemoryMb)) + } + if m.AllowOvercommit { + n += 2 + } + if m.DeferredCommit { + n += 2 + } + if m.HotHint { + n += 2 + } + if m.ColdHint { + n += 2 + } + if m.ColdDiscardHint { + n += 2 + } + if m.LowMmioGapInMb != 0 { + n += 1 + sovVmservice(uint64(m.LowMmioGapInMb)) + } + if m.HighMmioBaseInMb != 0 { + n += 1 + sovVmservice(uint64(m.HighMmioBaseInMb)) + } + if m.HighMmioGapInMb != 0 { + n += 1 + sovVmservice(uint64(m.HighMmioGapInMb)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProcessorConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProcessorCount != 0 { + n += 1 + sovVmservice(uint64(m.ProcessorCount)) + } + if m.ProcessorWeight != 0 { + n += 1 + sovVmservice(uint64(m.ProcessorWeight)) + } + if m.ProcessorLimit != 0 { + n += 1 + sovVmservice(uint64(m.ProcessorLimit)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DevicesConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ScsiDisks) > 0 { + for _, e := range m.ScsiDisks { + l = e.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + } + if len(m.VpmemDisks) > 0 { + for _, e := range m.VpmemDisks { + l = e.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + } + if len(m.NicConfig) > 0 { + for _, e := range m.NicConfig { + l = e.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + } + if len(m.WindowsDevice) > 0 { + for _, e := range m.WindowsDevice { + l = e.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *VMConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MemoryConfig != nil { + l = m.MemoryConfig.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + if m.ProcessorConfig != nil { + l = m.ProcessorConfig.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + if m.DevicesConfig != nil { + l = m.DevicesConfig.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + if m.SerialConfig != nil { + l = m.SerialConfig.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + if m.BootConfig != nil { + n += m.BootConfig.Size() + } + if m.WindowsOptions != nil { + l = m.WindowsOptions.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + if len(m.ExtraData) > 0 { + for k, v := range m.ExtraData { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovVmservice(uint64(len(k))) + 1 + len(v) + sovVmservice(uint64(len(v))) + n += mapEntrySize + 1 + sovVmservice(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *VMConfig_DirectBoot) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DirectBoot != nil { + l = m.DirectBoot.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + return n +} +func (m *VMConfig_Uefi) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Uefi != nil { + l = m.Uefi.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + return n +} +func (m *WindowsOptions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CpuGroupID != 0 { + n += 1 + sovVmservice(uint64(m.CpuGroupID)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SerialConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Ports) > 0 { + for _, e := range m.Ports { + l = e.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SerialConfig_Config) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Port != 0 { + n += 1 + sovVmservice(uint64(m.Port)) + } + l = len(m.SocketPath) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CreateVMRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Config != nil { + l = m.Config.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + l = len(m.LogID) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *InspectVMRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Query) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + if m.RecursionLimit != 0 { + n += 1 + sovVmservice(uint64(m.RecursionLimit)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *InspectVMResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MemoryStats) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.WorkingSetBytes != 0 { + n += 1 + sovVmservice(uint64(m.WorkingSetBytes)) + } + if m.AvailableMemory != 0 { + n += 1 + sovVmservice(uint64(m.AvailableMemory)) + } + if m.ReservedMemory != 0 { + n += 1 + sovVmservice(uint64(m.ReservedMemory)) + } + if m.AssignedMemory != 0 { + n += 1 + sovVmservice(uint64(m.AssignedMemory)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProcessorStats) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TotalRuntimeNs != 0 { + n += 1 + sovVmservice(uint64(m.TotalRuntimeNs)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PropertiesVMRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Types) > 0 { + l = 0 + for _, e := range m.Types { + l += sovVmservice(uint64(e)) + } + n += 1 + sovVmservice(uint64(l)) + l + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PropertiesVMResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MemoryStats != nil { + l = m.MemoryStats.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + if m.ProcessorStats != nil { + l = m.ProcessorStats.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CapabilitiesVMResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SupportedResources) > 0 { + for _, e := range m.SupportedResources { + l = e.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + } + if len(m.SupportedGuestOs) > 0 { + l = 0 + for _, e := range m.SupportedGuestOs { + l += sovVmservice(uint64(e)) + } + n += 1 + sovVmservice(uint64(l)) + l + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CapabilitiesVMResponse_SupportedResource) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Add { + n += 2 + } + if m.Remove { + n += 2 + } + if m.Update { + n += 2 + } + if m.Resource != 0 { + n += 1 + sovVmservice(uint64(m.Resource)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HVSocketListen) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ServiceID) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + l = len(m.ListenerPath) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *VSockListen) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Port != 0 { + n += 1 + sovVmservice(uint64(m.Port)) + } + l = len(m.ListenerPath) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *VMSocketRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sovVmservice(uint64(m.Type)) + } + if m.Config != nil { + n += m.Config.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *VMSocketRequest_HvsocketList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HvsocketList != nil { + l = m.HvsocketList.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + return n +} +func (m *VMSocketRequest_VsockListen) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.VsockListen != nil { + l = m.VsockListen.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + return n +} +func (m *SCSIDisk) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Controller != 0 { + n += 1 + sovVmservice(uint64(m.Controller)) + } + if m.Lun != 0 { + n += 1 + sovVmservice(uint64(m.Lun)) + } + l = len(m.HostPath) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + if m.Type != 0 { + n += 1 + sovVmservice(uint64(m.Type)) + } + if m.ReadOnly { + n += 2 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *VPMEMDisk) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.HostPath) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + if m.Type != 0 { + n += 1 + sovVmservice(uint64(m.Type)) + } + if m.ReadOnly { + n += 2 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NICConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NicID) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + l = len(m.PortID) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + l = len(m.MacAddress) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + l = len(m.SwitchID) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + l = len(m.NicName) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *WindowsPCIDevice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.InstanceID) + if l > 0 { + n += 1 + l + sovVmservice(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ModifyMemoryRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MemoryMb != 0 { + n += 1 + sovVmservice(uint64(m.MemoryMb)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ModifyProcessorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProcessorIndex != 0 { + n += 1 + sovVmservice(uint64(m.ProcessorIndex)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ModifyProcessorConfigRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProcessorWeight != 0 { + n += 1 + sovVmservice(uint64(m.ProcessorWeight)) + } + if m.ProcessorLimit != 0 { + n += 1 + sovVmservice(uint64(m.ProcessorLimit)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ModifyResourceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sovVmservice(uint64(m.Type)) + } + if m.Resource != nil { + n += m.Resource.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ModifyResourceRequest_Processor) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Processor != nil { + l = m.Processor.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + return n +} +func (m *ModifyResourceRequest_ProcessorConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProcessorConfig != nil { + l = m.ProcessorConfig.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + return n +} +func (m *ModifyResourceRequest_Memory) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Memory != nil { + l = m.Memory.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + return n +} +func (m *ModifyResourceRequest_ScsiDisk) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ScsiDisk != nil { + l = m.ScsiDisk.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + return n +} +func (m *ModifyResourceRequest_VpmemDisk) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.VpmemDisk != nil { + l = m.VpmemDisk.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + return n +} +func (m *ModifyResourceRequest_NicConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NicConfig != nil { + l = m.NicConfig.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + return n +} +func (m *ModifyResourceRequest_WindowsDevice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.WindowsDevice != nil { + l = m.WindowsDevice.Size() + n += 1 + l + sovVmservice(uint64(l)) + } + return n +} + +func sovVmservice(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozVmservice(x uint64) (n int) { + return sovVmservice(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *DirectBoot) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DirectBoot{`, + `KernelPath:` + fmt.Sprintf("%v", this.KernelPath) + `,`, + `InitrdPath:` + fmt.Sprintf("%v", this.InitrdPath) + `,`, + `KernelCmdline:` + fmt.Sprintf("%v", this.KernelCmdline) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UEFI) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UEFI{`, + `FirmwarePath:` + fmt.Sprintf("%v", this.FirmwarePath) + `,`, + `DevicePath:` + fmt.Sprintf("%v", this.DevicePath) + `,`, + `OptionalData:` + fmt.Sprintf("%v", this.OptionalData) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MemoryConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MemoryConfig{`, + `MemoryMb:` + fmt.Sprintf("%v", this.MemoryMb) + `,`, + `AllowOvercommit:` + fmt.Sprintf("%v", this.AllowOvercommit) + `,`, + `DeferredCommit:` + fmt.Sprintf("%v", this.DeferredCommit) + `,`, + `HotHint:` + fmt.Sprintf("%v", this.HotHint) + `,`, + `ColdHint:` + fmt.Sprintf("%v", this.ColdHint) + `,`, + `ColdDiscardHint:` + fmt.Sprintf("%v", this.ColdDiscardHint) + `,`, + `LowMmioGapInMb:` + fmt.Sprintf("%v", this.LowMmioGapInMb) + `,`, + `HighMmioBaseInMb:` + fmt.Sprintf("%v", this.HighMmioBaseInMb) + `,`, + `HighMmioGapInMb:` + fmt.Sprintf("%v", this.HighMmioGapInMb) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ProcessorConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProcessorConfig{`, + `ProcessorCount:` + fmt.Sprintf("%v", this.ProcessorCount) + `,`, + `ProcessorWeight:` + fmt.Sprintf("%v", this.ProcessorWeight) + `,`, + `ProcessorLimit:` + fmt.Sprintf("%v", this.ProcessorLimit) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DevicesConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DevicesConfig{`, + `ScsiDisks:` + strings.Replace(fmt.Sprintf("%v", this.ScsiDisks), "SCSIDisk", "SCSIDisk", 1) + `,`, + `VpmemDisks:` + strings.Replace(fmt.Sprintf("%v", this.VpmemDisks), "VPMEMDisk", "VPMEMDisk", 1) + `,`, + `NicConfig:` + strings.Replace(fmt.Sprintf("%v", this.NicConfig), "NICConfig", "NICConfig", 1) + `,`, + `WindowsDevice:` + strings.Replace(fmt.Sprintf("%v", this.WindowsDevice), "WindowsPCIDevice", "WindowsPCIDevice", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *VMConfig) String() string { + if this == nil { + return "nil" + } + keysForExtraData := make([]string, 0, len(this.ExtraData)) + for k, _ := range this.ExtraData { + keysForExtraData = append(keysForExtraData, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForExtraData) + mapStringForExtraData := "map[string]string{" + for _, k := range keysForExtraData { + mapStringForExtraData += fmt.Sprintf("%v: %v,", k, this.ExtraData[k]) + } + mapStringForExtraData += "}" + s := strings.Join([]string{`&VMConfig{`, + `MemoryConfig:` + strings.Replace(fmt.Sprintf("%v", this.MemoryConfig), "MemoryConfig", "MemoryConfig", 1) + `,`, + `ProcessorConfig:` + strings.Replace(fmt.Sprintf("%v", this.ProcessorConfig), "ProcessorConfig", "ProcessorConfig", 1) + `,`, + `DevicesConfig:` + strings.Replace(fmt.Sprintf("%v", this.DevicesConfig), "DevicesConfig", "DevicesConfig", 1) + `,`, + `SerialConfig:` + strings.Replace(fmt.Sprintf("%v", this.SerialConfig), "SerialConfig", "SerialConfig", 1) + `,`, + `BootConfig:` + fmt.Sprintf("%v", this.BootConfig) + `,`, + `WindowsOptions:` + strings.Replace(fmt.Sprintf("%v", this.WindowsOptions), "WindowsOptions", "WindowsOptions", 1) + `,`, + `ExtraData:` + mapStringForExtraData + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *VMConfig_DirectBoot) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VMConfig_DirectBoot{`, + `DirectBoot:` + strings.Replace(fmt.Sprintf("%v", this.DirectBoot), "DirectBoot", "DirectBoot", 1) + `,`, + `}`, + }, "") + return s +} +func (this *VMConfig_Uefi) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VMConfig_Uefi{`, + `Uefi:` + strings.Replace(fmt.Sprintf("%v", this.Uefi), "UEFI", "UEFI", 1) + `,`, + `}`, + }, "") + return s +} +func (this *WindowsOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WindowsOptions{`, + `CpuGroupID:` + fmt.Sprintf("%v", this.CpuGroupID) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SerialConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SerialConfig{`, + `Ports:` + strings.Replace(fmt.Sprintf("%v", this.Ports), "SerialConfig_Config", "SerialConfig_Config", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SerialConfig_Config) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SerialConfig_Config{`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `SocketPath:` + fmt.Sprintf("%v", this.SocketPath) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CreateVMRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateVMRequest{`, + `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "VMConfig", "VMConfig", 1) + `,`, + `LogID:` + fmt.Sprintf("%v", this.LogID) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *InspectVMRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&InspectVMRequest{`, + `Query:` + fmt.Sprintf("%v", this.Query) + `,`, + `RecursionLimit:` + fmt.Sprintf("%v", this.RecursionLimit) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *InspectVMResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&InspectVMResponse{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "Value", "types.Value", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MemoryStats) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MemoryStats{`, + `WorkingSetBytes:` + fmt.Sprintf("%v", this.WorkingSetBytes) + `,`, + `AvailableMemory:` + fmt.Sprintf("%v", this.AvailableMemory) + `,`, + `ReservedMemory:` + fmt.Sprintf("%v", this.ReservedMemory) + `,`, + `AssignedMemory:` + fmt.Sprintf("%v", this.AssignedMemory) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ProcessorStats) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProcessorStats{`, + `TotalRuntimeNs:` + fmt.Sprintf("%v", this.TotalRuntimeNs) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *PropertiesVMRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PropertiesVMRequest{`, + `Types:` + fmt.Sprintf("%v", this.Types) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *PropertiesVMResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PropertiesVMResponse{`, + `MemoryStats:` + strings.Replace(fmt.Sprintf("%v", this.MemoryStats), "MemoryStats", "MemoryStats", 1) + `,`, + `ProcessorStats:` + strings.Replace(fmt.Sprintf("%v", this.ProcessorStats), "ProcessorStats", "ProcessorStats", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CapabilitiesVMResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CapabilitiesVMResponse{`, + `SupportedResources:` + strings.Replace(fmt.Sprintf("%v", this.SupportedResources), "CapabilitiesVMResponse_SupportedResource", "CapabilitiesVMResponse_SupportedResource", 1) + `,`, + `SupportedGuestOs:` + fmt.Sprintf("%v", this.SupportedGuestOs) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CapabilitiesVMResponse_SupportedResource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CapabilitiesVMResponse_SupportedResource{`, + `Add:` + fmt.Sprintf("%v", this.Add) + `,`, + `Remove:` + fmt.Sprintf("%v", this.Remove) + `,`, + `Update:` + fmt.Sprintf("%v", this.Update) + `,`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *HVSocketListen) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HVSocketListen{`, + `ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`, + `ListenerPath:` + fmt.Sprintf("%v", this.ListenerPath) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *VSockListen) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VSockListen{`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `ListenerPath:` + fmt.Sprintf("%v", this.ListenerPath) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *VMSocketRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VMSocketRequest{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Config:` + fmt.Sprintf("%v", this.Config) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *VMSocketRequest_HvsocketList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VMSocketRequest_HvsocketList{`, + `HvsocketList:` + strings.Replace(fmt.Sprintf("%v", this.HvsocketList), "HVSocketListen", "HVSocketListen", 1) + `,`, + `}`, + }, "") + return s +} +func (this *VMSocketRequest_VsockListen) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VMSocketRequest_VsockListen{`, + `VsockListen:` + strings.Replace(fmt.Sprintf("%v", this.VsockListen), "VSockListen", "VSockListen", 1) + `,`, + `}`, + }, "") + return s +} +func (this *SCSIDisk) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SCSIDisk{`, + `Controller:` + fmt.Sprintf("%v", this.Controller) + `,`, + `Lun:` + fmt.Sprintf("%v", this.Lun) + `,`, + `HostPath:` + fmt.Sprintf("%v", this.HostPath) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *VPMEMDisk) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VPMEMDisk{`, + `HostPath:` + fmt.Sprintf("%v", this.HostPath) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NICConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NICConfig{`, + `NicID:` + fmt.Sprintf("%v", this.NicID) + `,`, + `PortID:` + fmt.Sprintf("%v", this.PortID) + `,`, + `MacAddress:` + fmt.Sprintf("%v", this.MacAddress) + `,`, + `SwitchID:` + fmt.Sprintf("%v", this.SwitchID) + `,`, + `NicName:` + fmt.Sprintf("%v", this.NicName) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *WindowsPCIDevice) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WindowsPCIDevice{`, + `InstanceID:` + fmt.Sprintf("%v", this.InstanceID) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ModifyMemoryRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModifyMemoryRequest{`, + `MemoryMb:` + fmt.Sprintf("%v", this.MemoryMb) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ModifyProcessorRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModifyProcessorRequest{`, + `ProcessorIndex:` + fmt.Sprintf("%v", this.ProcessorIndex) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ModifyProcessorConfigRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModifyProcessorConfigRequest{`, + `ProcessorWeight:` + fmt.Sprintf("%v", this.ProcessorWeight) + `,`, + `ProcessorLimit:` + fmt.Sprintf("%v", this.ProcessorLimit) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ModifyResourceRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModifyResourceRequest{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ModifyResourceRequest_Processor) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModifyResourceRequest_Processor{`, + `Processor:` + strings.Replace(fmt.Sprintf("%v", this.Processor), "ModifyProcessorRequest", "ModifyProcessorRequest", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ModifyResourceRequest_ProcessorConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModifyResourceRequest_ProcessorConfig{`, + `ProcessorConfig:` + strings.Replace(fmt.Sprintf("%v", this.ProcessorConfig), "ModifyProcessorConfigRequest", "ModifyProcessorConfigRequest", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ModifyResourceRequest_Memory) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModifyResourceRequest_Memory{`, + `Memory:` + strings.Replace(fmt.Sprintf("%v", this.Memory), "ModifyMemoryRequest", "ModifyMemoryRequest", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ModifyResourceRequest_ScsiDisk) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModifyResourceRequest_ScsiDisk{`, + `ScsiDisk:` + strings.Replace(fmt.Sprintf("%v", this.ScsiDisk), "SCSIDisk", "SCSIDisk", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ModifyResourceRequest_VpmemDisk) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModifyResourceRequest_VpmemDisk{`, + `VpmemDisk:` + strings.Replace(fmt.Sprintf("%v", this.VpmemDisk), "VPMEMDisk", "VPMEMDisk", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ModifyResourceRequest_NicConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModifyResourceRequest_NicConfig{`, + `NicConfig:` + strings.Replace(fmt.Sprintf("%v", this.NicConfig), "NICConfig", "NICConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ModifyResourceRequest_WindowsDevice) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ModifyResourceRequest_WindowsDevice{`, + `WindowsDevice:` + strings.Replace(fmt.Sprintf("%v", this.WindowsDevice), "WindowsPCIDevice", "WindowsPCIDevice", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringVmservice(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +type VMService interface { + CreateVM(ctx context.Context, req *CreateVMRequest) (*types.Empty, error) + TeardownVM(ctx context.Context, req *types.Empty) (*types.Empty, error) + PauseVM(ctx context.Context, req *types.Empty) (*types.Empty, error) + ResumeVM(ctx context.Context, req *types.Empty) (*types.Empty, error) + WaitVM(ctx context.Context, req *types.Empty) (*types.Empty, error) + InspectVM(ctx context.Context, req *InspectVMRequest) (*InspectVMResponse, error) + CapabilitiesVM(ctx context.Context, req *types.Empty) (*CapabilitiesVMResponse, error) + PropertiesVM(ctx context.Context, req *PropertiesVMRequest) (*PropertiesVMResponse, error) + ModifyResource(ctx context.Context, req *ModifyResourceRequest) (*types.Empty, error) + VMSocket(ctx context.Context, req *VMSocketRequest) (*types.Empty, error) + Quit(ctx context.Context, req *types.Empty) (*types.Empty, error) +} + +func RegisterVMService(srv *github_com_containerd_ttrpc.Server, svc VMService) { + srv.Register("vmservice.VM", map[string]github_com_containerd_ttrpc.Method{ + "CreateVM": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { + var req CreateVMRequest + if err := unmarshal(&req); err != nil { + return nil, err + } + return svc.CreateVM(ctx, &req) + }, + "TeardownVM": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { + var req types.Empty + if err := unmarshal(&req); err != nil { + return nil, err + } + return svc.TeardownVM(ctx, &req) + }, + "PauseVM": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { + var req types.Empty + if err := unmarshal(&req); err != nil { + return nil, err + } + return svc.PauseVM(ctx, &req) + }, + "ResumeVM": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { + var req types.Empty + if err := unmarshal(&req); err != nil { + return nil, err + } + return svc.ResumeVM(ctx, &req) + }, + "WaitVM": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { + var req types.Empty + if err := unmarshal(&req); err != nil { + return nil, err + } + return svc.WaitVM(ctx, &req) + }, + "InspectVM": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { + var req InspectVMRequest + if err := unmarshal(&req); err != nil { + return nil, err + } + return svc.InspectVM(ctx, &req) + }, + "CapabilitiesVM": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { + var req types.Empty + if err := unmarshal(&req); err != nil { + return nil, err + } + return svc.CapabilitiesVM(ctx, &req) + }, + "PropertiesVM": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { + var req PropertiesVMRequest + if err := unmarshal(&req); err != nil { + return nil, err + } + return svc.PropertiesVM(ctx, &req) + }, + "ModifyResource": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { + var req ModifyResourceRequest + if err := unmarshal(&req); err != nil { + return nil, err + } + return svc.ModifyResource(ctx, &req) + }, + "VMSocket": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { + var req VMSocketRequest + if err := unmarshal(&req); err != nil { + return nil, err + } + return svc.VMSocket(ctx, &req) + }, + "Quit": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { + var req types.Empty + if err := unmarshal(&req); err != nil { + return nil, err + } + return svc.Quit(ctx, &req) + }, + }) +} + +type vMClient struct { + client *github_com_containerd_ttrpc.Client +} + +func NewVMClient(client *github_com_containerd_ttrpc.Client) VMService { + return &vMClient{ + client: client, + } +} + +func (c *vMClient) CreateVM(ctx context.Context, req *CreateVMRequest) (*types.Empty, error) { + var resp types.Empty + if err := c.client.Call(ctx, "vmservice.VM", "CreateVM", req, &resp); err != nil { + return nil, err + } + return &resp, nil +} + +func (c *vMClient) TeardownVM(ctx context.Context, req *types.Empty) (*types.Empty, error) { + var resp types.Empty + if err := c.client.Call(ctx, "vmservice.VM", "TeardownVM", req, &resp); err != nil { + return nil, err + } + return &resp, nil +} + +func (c *vMClient) PauseVM(ctx context.Context, req *types.Empty) (*types.Empty, error) { + var resp types.Empty + if err := c.client.Call(ctx, "vmservice.VM", "PauseVM", req, &resp); err != nil { + return nil, err + } + return &resp, nil +} + +func (c *vMClient) ResumeVM(ctx context.Context, req *types.Empty) (*types.Empty, error) { + var resp types.Empty + if err := c.client.Call(ctx, "vmservice.VM", "ResumeVM", req, &resp); err != nil { + return nil, err + } + return &resp, nil +} + +func (c *vMClient) WaitVM(ctx context.Context, req *types.Empty) (*types.Empty, error) { + var resp types.Empty + if err := c.client.Call(ctx, "vmservice.VM", "WaitVM", req, &resp); err != nil { + return nil, err + } + return &resp, nil +} + +func (c *vMClient) InspectVM(ctx context.Context, req *InspectVMRequest) (*InspectVMResponse, error) { + var resp InspectVMResponse + if err := c.client.Call(ctx, "vmservice.VM", "InspectVM", req, &resp); err != nil { + return nil, err + } + return &resp, nil +} + +func (c *vMClient) CapabilitiesVM(ctx context.Context, req *types.Empty) (*CapabilitiesVMResponse, error) { + var resp CapabilitiesVMResponse + if err := c.client.Call(ctx, "vmservice.VM", "CapabilitiesVM", req, &resp); err != nil { + return nil, err + } + return &resp, nil +} + +func (c *vMClient) PropertiesVM(ctx context.Context, req *PropertiesVMRequest) (*PropertiesVMResponse, error) { + var resp PropertiesVMResponse + if err := c.client.Call(ctx, "vmservice.VM", "PropertiesVM", req, &resp); err != nil { + return nil, err + } + return &resp, nil +} + +func (c *vMClient) ModifyResource(ctx context.Context, req *ModifyResourceRequest) (*types.Empty, error) { + var resp types.Empty + if err := c.client.Call(ctx, "vmservice.VM", "ModifyResource", req, &resp); err != nil { + return nil, err + } + return &resp, nil +} + +func (c *vMClient) VMSocket(ctx context.Context, req *VMSocketRequest) (*types.Empty, error) { + var resp types.Empty + if err := c.client.Call(ctx, "vmservice.VM", "VMSocket", req, &resp); err != nil { + return nil, err + } + return &resp, nil +} + +func (c *vMClient) Quit(ctx context.Context, req *types.Empty) (*types.Empty, error) { + var resp types.Empty + if err := c.client.Call(ctx, "vmservice.VM", "Quit", req, &resp); err != nil { + return nil, err + } + return &resp, nil +} +func (m *DirectBoot) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DirectBoot: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DirectBoot: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KernelPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KernelPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitrdPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InitrdPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KernelCmdline", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KernelCmdline = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UEFI) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UEFI: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UEFI: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FirmwarePath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FirmwarePath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DevicePath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DevicePath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionalData", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OptionalData = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MemoryConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MemoryConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MemoryConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryMb", wireType) + } + m.MemoryMb = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryMb |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowOvercommit", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AllowOvercommit = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeferredCommit", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DeferredCommit = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HotHint", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HotHint = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ColdHint", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ColdHint = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ColdDiscardHint", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ColdDiscardHint = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LowMmioGapInMb", wireType) + } + m.LowMmioGapInMb = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LowMmioGapInMb |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HighMmioBaseInMb", wireType) + } + m.HighMmioBaseInMb = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HighMmioBaseInMb |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HighMmioGapInMb", wireType) + } + m.HighMmioGapInMb = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HighMmioGapInMb |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProcessorConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProcessorConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProcessorConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessorCount", wireType) + } + m.ProcessorCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessorCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessorWeight", wireType) + } + m.ProcessorWeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessorWeight |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessorLimit", wireType) + } + m.ProcessorLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessorLimit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DevicesConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DevicesConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DevicesConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScsiDisks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ScsiDisks = append(m.ScsiDisks, &SCSIDisk{}) + if err := m.ScsiDisks[len(m.ScsiDisks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VpmemDisks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VpmemDisks = append(m.VpmemDisks, &VPMEMDisk{}) + if err := m.VpmemDisks[len(m.VpmemDisks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NicConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NicConfig = append(m.NicConfig, &NICConfig{}) + if err := m.NicConfig[len(m.NicConfig)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WindowsDevice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WindowsDevice = append(m.WindowsDevice, &WindowsPCIDevice{}) + if err := m.WindowsDevice[len(m.WindowsDevice)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VMConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VMConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VMConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MemoryConfig == nil { + m.MemoryConfig = &MemoryConfig{} + } + if err := m.MemoryConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessorConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProcessorConfig == nil { + m.ProcessorConfig = &ProcessorConfig{} + } + if err := m.ProcessorConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DevicesConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DevicesConfig == nil { + m.DevicesConfig = &DevicesConfig{} + } + if err := m.DevicesConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SerialConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SerialConfig == nil { + m.SerialConfig = &SerialConfig{} + } + if err := m.SerialConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DirectBoot", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &DirectBoot{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.BootConfig = &VMConfig_DirectBoot{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uefi", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &UEFI{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.BootConfig = &VMConfig_Uefi{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WindowsOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.WindowsOptions == nil { + m.WindowsOptions = &WindowsOptions{} + } + if err := m.WindowsOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtraData", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExtraData == nil { + m.ExtraData = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthVmservice + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthVmservice + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthVmservice + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthVmservice + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ExtraData[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WindowsOptions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WindowsOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WindowsOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuGroupID", wireType) + } + m.CpuGroupID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CpuGroupID |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SerialConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SerialConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SerialConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ports = append(m.Ports, &SerialConfig_Config{}) + if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SerialConfig_Config) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Config: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Config: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + m.Port = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Port |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SocketPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SocketPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateVMRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateVMRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateVMRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Config == nil { + m.Config = &VMConfig{} + } + if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InspectVMRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InspectVMRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InspectVMRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Query = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RecursionLimit", wireType) + } + m.RecursionLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RecursionLimit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InspectVMResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InspectVMResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InspectVMResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Result == nil { + m.Result = &types.Value{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MemoryStats) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MemoryStats: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MemoryStats: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WorkingSetBytes", wireType) + } + m.WorkingSetBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.WorkingSetBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AvailableMemory", wireType) + } + m.AvailableMemory = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AvailableMemory |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReservedMemory", wireType) + } + m.ReservedMemory = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReservedMemory |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AssignedMemory", wireType) + } + m.AssignedMemory = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AssignedMemory |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProcessorStats) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProcessorStats: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProcessorStats: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalRuntimeNs", wireType) + } + m.TotalRuntimeNs = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalRuntimeNs |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PropertiesVMRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PropertiesVMRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PropertiesVMRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v PropertiesVMRequest_PropertiesType + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PropertiesVMRequest_PropertiesType(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Types = append(m.Types, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Types) == 0 { + m.Types = make([]PropertiesVMRequest_PropertiesType, 0, elementCount) + } + for iNdEx < postIndex { + var v PropertiesVMRequest_PropertiesType + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PropertiesVMRequest_PropertiesType(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Types = append(m.Types, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Types", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PropertiesVMResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PropertiesVMResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PropertiesVMResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MemoryStats == nil { + m.MemoryStats = &MemoryStats{} + } + if err := m.MemoryStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessorStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProcessorStats == nil { + m.ProcessorStats = &ProcessorStats{} + } + if err := m.ProcessorStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CapabilitiesVMResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CapabilitiesVMResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CapabilitiesVMResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupportedResources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupportedResources = append(m.SupportedResources, &CapabilitiesVMResponse_SupportedResource{}) + if err := m.SupportedResources[len(m.SupportedResources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType == 0 { + var v CapabilitiesVMResponse_SupportedGuestOS + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= CapabilitiesVMResponse_SupportedGuestOS(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SupportedGuestOs = append(m.SupportedGuestOs, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.SupportedGuestOs) == 0 { + m.SupportedGuestOs = make([]CapabilitiesVMResponse_SupportedGuestOS, 0, elementCount) + } + for iNdEx < postIndex { + var v CapabilitiesVMResponse_SupportedGuestOS + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= CapabilitiesVMResponse_SupportedGuestOS(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SupportedGuestOs = append(m.SupportedGuestOs, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field SupportedGuestOs", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CapabilitiesVMResponse_SupportedResource) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SupportedResource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SupportedResource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Add", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Add = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Remove", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Remove = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Update", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Update = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + m.Resource = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Resource |= CapabilitiesVMResponse_Resource(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HVSocketListen) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HVSocketListen: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HVSocketListen: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListenerPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ListenerPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VSockListen) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VSockListen: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VSockListen: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + m.Port = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Port |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListenerPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ListenerPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VMSocketRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VMSocketRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VMSocketRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= ModifyType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HvsocketList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &HVSocketListen{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Config = &VMSocketRequest_HvsocketList{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VsockListen", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &VSockListen{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Config = &VMSocketRequest_VsockListen{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SCSIDisk) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SCSIDisk: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SCSIDisk: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + m.Controller = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Controller |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Lun", wireType) + } + m.Lun = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Lun |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= DiskType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnly = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VPMEMDisk) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VPMEMDisk: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VPMEMDisk: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= DiskType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnly = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NICConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NICConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NICConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NicID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NicID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MacAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MacAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SwitchID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SwitchID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NicName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NicName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WindowsPCIDevice) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WindowsPCIDevice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WindowsPCIDevice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InstanceID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InstanceID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModifyMemoryRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ModifyMemoryRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ModifyMemoryRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryMb", wireType) + } + m.MemoryMb = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryMb |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModifyProcessorRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ModifyProcessorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ModifyProcessorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessorIndex", wireType) + } + m.ProcessorIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessorIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModifyProcessorConfigRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ModifyProcessorConfigRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ModifyProcessorConfigRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessorWeight", wireType) + } + m.ProcessorWeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessorWeight |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessorLimit", wireType) + } + m.ProcessorLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessorLimit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModifyResourceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ModifyResourceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ModifyResourceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= ModifyType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Processor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModifyProcessorRequest{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Resource = &ModifyResourceRequest_Processor{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessorConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModifyProcessorConfigRequest{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Resource = &ModifyResourceRequest_ProcessorConfig{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Memory", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ModifyMemoryRequest{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Resource = &ModifyResourceRequest_Memory{v} + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScsiDisk", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SCSIDisk{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Resource = &ModifyResourceRequest_ScsiDisk{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VpmemDisk", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &VPMEMDisk{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Resource = &ModifyResourceRequest_VpmemDisk{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NicConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &NICConfig{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Resource = &ModifyResourceRequest_NicConfig{v} + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WindowsDevice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVmservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVmservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVmservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &WindowsPCIDevice{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Resource = &ModifyResourceRequest_WindowsDevice{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVmservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVmservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVmservice(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVmservice + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVmservice + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVmservice + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthVmservice + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthVmservice + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVmservice + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipVmservice(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthVmservice + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthVmservice = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVmservice = fmt.Errorf("proto: integer overflow") +) diff --git a/internal/vmservice/vmservice.proto b/internal/vmservice/vmservice.proto new file mode 100644 index 0000000000..81645fb9b5 --- /dev/null +++ b/internal/vmservice/vmservice.proto @@ -0,0 +1,276 @@ +syntax = 'proto3'; + +package vmservice; +option go_package = "vmservice"; + +import "google/protobuf/empty.proto"; +import "google/protobuf/struct.proto"; + +service VM { + // CreateVM will create the virtual machine with the configuration in the + // CreateVMRequest. The virtual machine will be in a paused state power wise + // after CreateVM. ResumeVM can be called to transition the VM into a running state. + rpc CreateVM(CreateVMRequest) returns (google.protobuf.Empty); + + // TeardownVM will release all associated resources from the VM and unblock the WaitVM call. + rpc TeardownVM(google.protobuf.Empty) returns (google.protobuf.Empty); + + // PauseVM will, if the virtual machine power state is in a running state, transition + // the state to paused. This is the same state power wise that the VM should be in after + // an initial CreateVM call. + rpc PauseVM(google.protobuf.Empty) returns (google.protobuf.Empty); + + // ResumeVM is used to transition a vm to a running state. This can be used to resume a VM that + // has had PauseVM called on it, or to start a VM that was created with CreateVM. + rpc ResumeVM(google.protobuf.Empty) returns (google.protobuf.Empty); + + // WaitVM will block until the VM is either in a halted state or has had all of it's resources freed + // via TeardownVM. + rpc WaitVM(google.protobuf.Empty) returns (google.protobuf.Empty); + + // InspectVM is used to inspect virtual machine state. The query of what to inspect + // is passed in as a string and the response can be of any form. + rpc InspectVM(InspectVMRequest) returns (InspectVMResponse); + + // CapabilitiesVM will return what capabilities the virtstack supports. This includes + // what guest operating systems are supported, what resources are supported, and if hot + // add/hot remove of a resource is supported. + rpc CapabilitiesVM(google.protobuf.Empty) returns (CapabilitiesVMResponse); + + // PropertiesVM will take in a list of properties that the virtstack will return + // statistics for (memory, processors). + rpc PropertiesVM(PropertiesVMRequest) returns (PropertiesVMResponse); + + // ModifyResource is a generic call to modify (add/remove/update) resources for a VM. + // This includes things such as block devices, network adapters, and pci devices. + rpc ModifyResource(ModifyResourceRequest) returns (google.protobuf.Empty); + + // VMSocket is an abstraction around a hypervisor socket transport to facilitate communication + // between virtual machines and the host they are running on. The supported transports are + // HvSocket and Vsock. + rpc VMSocket(VMSocketRequest) returns (google.protobuf.Empty); + + // Quit will shutdown the process hosting the ttrpc server. + rpc Quit(google.protobuf.Empty) returns (google.protobuf.Empty); +} + +message DirectBoot { + string kernel_path = 1; + string initrd_path = 2; + string kernel_cmdline = 3; +} + +message UEFI { + string firmware_path = 1; + string device_path = 2; + // Optional data to include for uefi boot. For Linux this could be used as the kernel + // commandline. + string optional_data = 3; +} + +message MemoryConfig { + uint64 memory_mb = 1; + bool allow_overcommit = 2; + bool deferred_commit = 3; + bool hot_hint = 4; + bool cold_hint = 5; + bool cold_discard_hint = 6; + uint64 low_mmio_gap_in_mb = 7; + uint64 high_mmio_base_in_mb = 8; + uint64 high_mmio_gap_in_mb = 9; +} + +message ProcessorConfig { + uint32 processor_count = 1; + uint32 processor_weight = 2; + uint32 processor_limit = 3; +} + +message DevicesConfig { + repeated SCSIDisk scsi_disks = 1; + repeated VPMEMDisk vpmem_disks = 2; + repeated NICConfig nic_config = 3; + repeated WindowsPCIDevice windows_device = 4; +} + +message VMConfig { + MemoryConfig memory_config = 1; + ProcessorConfig processor_config = 2; + DevicesConfig devices_config = 3; + SerialConfig serial_config = 4; + oneof BootConfig { + DirectBoot direct_boot = 5; + UEFI uefi = 6; + } + WindowsOptions windows_options = 7; + // Optional k:v extra data. Up to the virtstack for how to interpret this. + map extra_data = 8; +} + +// WindowsOptions contains virtual machine configurations that are only present on a Windows host. +message WindowsOptions { + uint32 cpu_group_id = 1; +} + +message SerialConfig { + message Config { + uint32 port = 1; + // Unix domain socket to relay serial console output to. + string socket_path = 2; + } + repeated Config ports = 3; +} + +message CreateVMRequest { + VMConfig config = 1; + // Optional ID to be used by the VM service in log messages. It's up to the + // virtstack to make use of this field. Useful for debugging to be able to + // correlate events for a given vm that the client launched. + string log_id = 2; +} +message InspectVMRequest { + string query = 1; + uint32 recursion_limit = 2; +} + +message InspectVMResponse { + google.protobuf.Value result = 1; +} + +message MemoryStats { + uint64 working_set_bytes = 1; + uint64 available_memory = 2; + uint64 reserved_memory = 3; + uint64 assigned_memory = 4; +} + +message ProcessorStats { + uint64 total_runtime_ns = 1; +} + +message PropertiesVMRequest { + enum PropertiesType { + Memory = 0; + Processor = 1; + } + repeated PropertiesType types = 1; +} + +message PropertiesVMResponse { + MemoryStats memory_stats = 1; + ProcessorStats processor_stats = 2; +} + +message CapabilitiesVMResponse { + enum Resource { + Vpmem = 0; + Scsi = 1; + Vpci = 2; + Plan9 = 3; + VMNic = 4; + Memory = 5; + Processor = 6; + } + + message SupportedResource { + bool Add = 1; + bool Remove = 2; + bool Update = 3; + Resource resource = 4; + } + + enum SupportedGuestOS { + Windows = 0; + Linux = 1; + } + repeated SupportedResource supported_resources = 1; + repeated SupportedGuestOS supported_guest_os = 2; +} + +message HVSocketListen { + string service_id = 1; + // Expected that the listener is a unix domain socket. These + // are supported on Windows as of 1809/RS5. + string listener_path = 2; +} + +message VSockListen { + uint32 port = 1; + string listener_path = 2; +} + +message VMSocketRequest { + ModifyType type = 1; + oneof Config { + HVSocketListen hvsocket_list = 2; + VSockListen vsock_listen = 3; + } +} + +enum ModifyType { + ADD = 0; + REMOVE = 1; + UPDATE = 2; +} + +enum DiskType { + SCSI_DISK_TYPE_VHD1 = 0; + SCSI_DISK_TYPE_VHDX = 1; + SCSI_DISK_TYPE_PHYSICAL = 2; +} + +message SCSIDisk { + uint32 controller = 1; + uint32 lun = 2; + string host_path = 3; + DiskType type = 4; + bool read_only = 5; +} + +message VPMEMDisk { + string host_path = 1; + DiskType type = 2; + bool read_only = 3; +} + + +message NICConfig { + string nic_id = 1; // GUID + string port_id = 2; // GUID + string mac_address = 3; // 12-34-56-78-9A-BC + string switch_id = 4; // GUID + // Optional friendly name for the adapter. Might be useful to show up in logs. + string nic_name = 5; +} + +message WindowsPCIDevice { + // e.g. PCIP\\VEN_10DE&DEV_13F2&SUBSYS_115E10DE&REV_A1\\6&17F903&0&00400000 + string instance_id = 1; +} + +message ModifyMemoryRequest { + uint64 memory_mb = 1; +} + +message ModifyProcessorRequest { + // Index of the processor to add/remove + uint32 processor_index = 1; +} + +message ModifyProcessorConfigRequest { + uint32 processor_weight = 1; + uint32 processor_limit = 2; +} + +message ModifyResourceRequest { + ModifyType type = 1; + oneof resource { + ModifyProcessorRequest processor = 2; + ModifyProcessorConfigRequest processor_config = 3; + ModifyMemoryRequest memory = 4; + SCSIDisk scsi_disk = 5; + VPMEMDisk vpmem_disk = 6; + NICConfig nic_config = 7; + WindowsPCIDevice windows_device = 8; + } +} \ No newline at end of file