P4wnP1_aloa/proto/gopherjs/grpc.pb.gopherjs.go

7347 lines
176 KiB
Go

// Code generated by protoc-gen-gopherjs. DO NOT EDIT.
// source: grpc.proto
/*
Package P4wnP1_grpc is a generated protocol buffer package.
It is generated from these files:
grpc.proto
It has these top-level messages:
MasterTemplate
RequestMasterTemplateStorage
BluetoothRequestSettingsStorage
BluetoothSettings
BluetoothAgentSettings
BluetoothNetworkService
BluetoothControllerSettings
BluetoothControllerInformation
TriggerActionSet
TriggerAction
TriggerServiceStarted
TriggerUSBGadgetConnected
TriggerUSBGadgetDisconnected
TriggerWifiAPStarted
TriggerWifiConnectedAsSta
TriggerSSHLogin
TriggerDHCPLeaseGranted
TriggerGroupReceive
TriggerGroupReceiveMulti
TriggerGPIOIn
ActionStartBashScript
ActionStartHIDScript
ActionDeploySettingsTemplate
ActionLog
ActionGPIOOut
ActionGroupSend
WifiRequestSettingsStorage
WiFiSettings
WiFiState
WiFiBSSCfg
StringMessage
StringMessageArray
EventRequest
EventValue
Event
TempDirOrFileRequest
TempDirOrFileResponse
ReadFileRequest
ReadFileResponse
WriteFileRequest
FileInfoRequest
FileInfoResponse
HIDScriptRequest
HIDScriptJob
HIDScriptJobList
HIDRunningJobStateResult
HIDScriptResult
LEDSettings
USBRequestSettingsStorage
GadgetSettings
GadgetSettingsEthernet
GadgetSettingsUMS
EthernetRequestSettingsStorage
DeployedEthernetInterfaceSettings
EthernetInterfaceSettings
DHCPServerSettings
DHCPServerRange
DHCPServerStaticHost
Empty
*/
package P4wnP1_grpc
import jspb "github.com/johanbrandhorst/protobuf/jspb"
import (
context "context"
grpcweb "github.com/johanbrandhorst/protobuf/grpcweb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the jspb package it is being compiled against.
const _ = jspb.JspbPackageIsVersion2
type BluetoothNetworkServiceType int
const (
BluetoothNetworkServiceType_NAP BluetoothNetworkServiceType = 0
BluetoothNetworkServiceType_PANU BluetoothNetworkServiceType = 1
BluetoothNetworkServiceType_GN BluetoothNetworkServiceType = 2
)
var BluetoothNetworkServiceType_name = map[int]string{
0: "NAP",
1: "PANU",
2: "GN",
}
var BluetoothNetworkServiceType_value = map[string]int{
"NAP": 0,
"PANU": 1,
"GN": 2,
}
func (x BluetoothNetworkServiceType) String() string {
return BluetoothNetworkServiceType_name[int(x)]
}
type GroupReceiveMultiType int
const (
GroupReceiveMultiType_SEQUENCE GroupReceiveMultiType = 0
GroupReceiveMultiType_AND GroupReceiveMultiType = 1
GroupReceiveMultiType_OR GroupReceiveMultiType = 2
GroupReceiveMultiType_EXACT_SEQUENCE GroupReceiveMultiType = 3
)
var GroupReceiveMultiType_name = map[int]string{
0: "SEQUENCE",
1: "AND",
2: "OR",
3: "EXACT_SEQUENCE",
}
var GroupReceiveMultiType_value = map[string]int{
"SEQUENCE": 0,
"AND": 1,
"OR": 2,
"EXACT_SEQUENCE": 3,
}
func (x GroupReceiveMultiType) String() string {
return GroupReceiveMultiType_name[int(x)]
}
type GPIOInPullUpDown int
const (
GPIOInPullUpDown_UP GPIOInPullUpDown = 0
GPIOInPullUpDown_DOWN GPIOInPullUpDown = 1
GPIOInPullUpDown_OFF GPIOInPullUpDown = 2
)
var GPIOInPullUpDown_name = map[int]string{
0: "UP",
1: "DOWN",
2: "OFF",
}
var GPIOInPullUpDown_value = map[string]int{
"UP": 0,
"DOWN": 1,
"OFF": 2,
}
func (x GPIOInPullUpDown) String() string {
return GPIOInPullUpDown_name[int(x)]
}
type GPIOInEdge int
const (
GPIOInEdge_RISING GPIOInEdge = 0
GPIOInEdge_FALLING GPIOInEdge = 1
GPIOInEdge_BOTH GPIOInEdge = 2
)
var GPIOInEdge_name = map[int]string{
0: "RISING",
1: "FALLING",
2: "BOTH",
}
var GPIOInEdge_value = map[string]int{
"RISING": 0,
"FALLING": 1,
"BOTH": 2,
}
func (x GPIOInEdge) String() string {
return GPIOInEdge_name[int(x)]
}
type GPIOOutValue int
const (
GPIOOutValue_LOW GPIOOutValue = 0
GPIOOutValue_HIGH GPIOOutValue = 1
GPIOOutValue_TOGGLE GPIOOutValue = 2
)
var GPIOOutValue_name = map[int]string{
0: "LOW",
1: "HIGH",
2: "TOGGLE",
}
var GPIOOutValue_value = map[string]int{
"LOW": 0,
"HIGH": 1,
"TOGGLE": 2,
}
func (x GPIOOutValue) String() string {
return GPIOOutValue_name[int(x)]
}
// WiFi2 (distinguish state and settings)
type WiFiWorkingMode int
const (
WiFiWorkingMode_UNKNOWN WiFiWorkingMode = 0
WiFiWorkingMode_AP WiFiWorkingMode = 1
WiFiWorkingMode_STA WiFiWorkingMode = 2
WiFiWorkingMode_STA_FAILOVER_AP WiFiWorkingMode = 3
)
var WiFiWorkingMode_name = map[int]string{
0: "UNKNOWN",
1: "AP",
2: "STA",
3: "STA_FAILOVER_AP",
}
var WiFiWorkingMode_value = map[string]int{
"UNKNOWN": 0,
"AP": 1,
"STA": 2,
"STA_FAILOVER_AP": 3,
}
func (x WiFiWorkingMode) String() string {
return WiFiWorkingMode_name[int(x)]
}
type WiFiStateMode int
const (
WiFiStateMode_STA_NOT_CONNECTED WiFiStateMode = 0
WiFiStateMode_AP_UP WiFiStateMode = 1
WiFiStateMode_STA_CONNECTED WiFiStateMode = 2
)
var WiFiStateMode_name = map[int]string{
0: "STA_NOT_CONNECTED",
1: "AP_UP",
2: "STA_CONNECTED",
}
var WiFiStateMode_value = map[string]int{
"STA_NOT_CONNECTED": 0,
"AP_UP": 1,
"STA_CONNECTED": 2,
}
func (x WiFiStateMode) String() string {
return WiFiStateMode_name[int(x)]
}
type WiFiAuthMode int
const (
WiFiAuthMode_WPA2_PSK WiFiAuthMode = 0
WiFiAuthMode_OPEN WiFiAuthMode = 1
)
var WiFiAuthMode_name = map[int]string{
0: "WPA2_PSK",
1: "OPEN",
}
var WiFiAuthMode_value = map[string]int{
"WPA2_PSK": 0,
"OPEN": 1,
}
func (x WiFiAuthMode) String() string {
return WiFiAuthMode_name[int(x)]
}
type AccessibleFolder int
const (
AccessibleFolder_TMP AccessibleFolder = 0
AccessibleFolder_BASH_SCRIPTS AccessibleFolder = 1
AccessibleFolder_HID_SCRIPTS AccessibleFolder = 2
)
var AccessibleFolder_name = map[int]string{
0: "TMP",
1: "BASH_SCRIPTS",
2: "HID_SCRIPTS",
}
var AccessibleFolder_value = map[string]int{
"TMP": 0,
"BASH_SCRIPTS": 1,
"HID_SCRIPTS": 2,
}
func (x AccessibleFolder) String() string {
return AccessibleFolder_name[int(x)]
}
type ActionDeploySettingsTemplate_TemplateType int
const (
ActionDeploySettingsTemplate_FULL_SETTINGS ActionDeploySettingsTemplate_TemplateType = 0
ActionDeploySettingsTemplate_NETWORK ActionDeploySettingsTemplate_TemplateType = 1
ActionDeploySettingsTemplate_WIFI ActionDeploySettingsTemplate_TemplateType = 2
ActionDeploySettingsTemplate_USB ActionDeploySettingsTemplate_TemplateType = 3
ActionDeploySettingsTemplate_BLUETOOTH ActionDeploySettingsTemplate_TemplateType = 4
ActionDeploySettingsTemplate_TRIGGER_ACTIONS ActionDeploySettingsTemplate_TemplateType = 5
)
var ActionDeploySettingsTemplate_TemplateType_name = map[int]string{
0: "FULL_SETTINGS",
1: "NETWORK",
2: "WIFI",
3: "USB",
4: "BLUETOOTH",
5: "TRIGGER_ACTIONS",
}
var ActionDeploySettingsTemplate_TemplateType_value = map[string]int{
"FULL_SETTINGS": 0,
"NETWORK": 1,
"WIFI": 2,
"USB": 3,
"BLUETOOTH": 4,
"TRIGGER_ACTIONS": 5,
}
func (x ActionDeploySettingsTemplate_TemplateType) String() string {
return ActionDeploySettingsTemplate_TemplateType_name[int(x)]
}
type EthernetInterfaceSettings_Mode int
const (
EthernetInterfaceSettings_MANUAL EthernetInterfaceSettings_Mode = 0
EthernetInterfaceSettings_DHCP_CLIENT EthernetInterfaceSettings_Mode = 1
EthernetInterfaceSettings_DHCP_SERVER EthernetInterfaceSettings_Mode = 2
EthernetInterfaceSettings_UNMANAGED EthernetInterfaceSettings_Mode = 3
)
var EthernetInterfaceSettings_Mode_name = map[int]string{
0: "MANUAL",
1: "DHCP_CLIENT",
2: "DHCP_SERVER",
3: "UNMANAGED",
}
var EthernetInterfaceSettings_Mode_value = map[string]int{
"MANUAL": 0,
"DHCP_CLIENT": 1,
"DHCP_SERVER": 2,
"UNMANAGED": 3,
}
func (x EthernetInterfaceSettings_Mode) String() string {
return EthernetInterfaceSettings_Mode_name[int(x)]
}
// MasterTemplates
type MasterTemplate struct {
TemplateNameBluetooth string
TemplateNameUsb string
TemplateNameWifi string
TemplateNameTriggerActions string
TemplateNamesNetwork []string
}
// GetTemplateNameBluetooth gets the TemplateNameBluetooth of the MasterTemplate.
func (m *MasterTemplate) GetTemplateNameBluetooth() (x string) {
if m == nil {
return x
}
return m.TemplateNameBluetooth
}
// GetTemplateNameUsb gets the TemplateNameUsb of the MasterTemplate.
func (m *MasterTemplate) GetTemplateNameUsb() (x string) {
if m == nil {
return x
}
return m.TemplateNameUsb
}
// GetTemplateNameWifi gets the TemplateNameWifi of the MasterTemplate.
func (m *MasterTemplate) GetTemplateNameWifi() (x string) {
if m == nil {
return x
}
return m.TemplateNameWifi
}
// GetTemplateNameTriggerActions gets the TemplateNameTriggerActions of the MasterTemplate.
func (m *MasterTemplate) GetTemplateNameTriggerActions() (x string) {
if m == nil {
return x
}
return m.TemplateNameTriggerActions
}
// GetTemplateNamesNetwork gets the TemplateNamesNetwork of the MasterTemplate.
func (m *MasterTemplate) GetTemplateNamesNetwork() (x []string) {
if m == nil {
return x
}
return m.TemplateNamesNetwork
}
// MarshalToWriter marshals MasterTemplate to the provided writer.
func (m *MasterTemplate) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.TemplateNameBluetooth) > 0 {
writer.WriteString(1, m.TemplateNameBluetooth)
}
if len(m.TemplateNameUsb) > 0 {
writer.WriteString(2, m.TemplateNameUsb)
}
if len(m.TemplateNameWifi) > 0 {
writer.WriteString(3, m.TemplateNameWifi)
}
if len(m.TemplateNameTriggerActions) > 0 {
writer.WriteString(4, m.TemplateNameTriggerActions)
}
for _, val := range m.TemplateNamesNetwork {
writer.WriteString(5, val)
}
return
}
// Marshal marshals MasterTemplate to a slice of bytes.
func (m *MasterTemplate) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a MasterTemplate from the provided reader.
func (m *MasterTemplate) UnmarshalFromReader(reader jspb.Reader) *MasterTemplate {
for reader.Next() {
if m == nil {
m = &MasterTemplate{}
}
switch reader.GetFieldNumber() {
case 1:
m.TemplateNameBluetooth = reader.ReadString()
case 2:
m.TemplateNameUsb = reader.ReadString()
case 3:
m.TemplateNameWifi = reader.ReadString()
case 4:
m.TemplateNameTriggerActions = reader.ReadString()
case 5:
m.TemplateNamesNetwork = append(m.TemplateNamesNetwork, reader.ReadString())
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a MasterTemplate from a slice of bytes.
func (m *MasterTemplate) Unmarshal(rawBytes []byte) (*MasterTemplate, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type RequestMasterTemplateStorage struct {
TemplateName string
Template *MasterTemplate
}
// GetTemplateName gets the TemplateName of the RequestMasterTemplateStorage.
func (m *RequestMasterTemplateStorage) GetTemplateName() (x string) {
if m == nil {
return x
}
return m.TemplateName
}
// GetTemplate gets the Template of the RequestMasterTemplateStorage.
func (m *RequestMasterTemplateStorage) GetTemplate() (x *MasterTemplate) {
if m == nil {
return x
}
return m.Template
}
// MarshalToWriter marshals RequestMasterTemplateStorage to the provided writer.
func (m *RequestMasterTemplateStorage) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.TemplateName) > 0 {
writer.WriteString(1, m.TemplateName)
}
if m.Template != nil {
writer.WriteMessage(2, func() {
m.Template.MarshalToWriter(writer)
})
}
return
}
// Marshal marshals RequestMasterTemplateStorage to a slice of bytes.
func (m *RequestMasterTemplateStorage) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a RequestMasterTemplateStorage from the provided reader.
func (m *RequestMasterTemplateStorage) UnmarshalFromReader(reader jspb.Reader) *RequestMasterTemplateStorage {
for reader.Next() {
if m == nil {
m = &RequestMasterTemplateStorage{}
}
switch reader.GetFieldNumber() {
case 1:
m.TemplateName = reader.ReadString()
case 2:
reader.ReadMessage(func() {
m.Template = m.Template.UnmarshalFromReader(reader)
})
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a RequestMasterTemplateStorage from a slice of bytes.
func (m *RequestMasterTemplateStorage) Unmarshal(rawBytes []byte) (*RequestMasterTemplateStorage, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
// Bluetooth
type BluetoothRequestSettingsStorage struct {
TemplateName string
Settings *BluetoothSettings
}
// GetTemplateName gets the TemplateName of the BluetoothRequestSettingsStorage.
func (m *BluetoothRequestSettingsStorage) GetTemplateName() (x string) {
if m == nil {
return x
}
return m.TemplateName
}
// GetSettings gets the Settings of the BluetoothRequestSettingsStorage.
func (m *BluetoothRequestSettingsStorage) GetSettings() (x *BluetoothSettings) {
if m == nil {
return x
}
return m.Settings
}
// MarshalToWriter marshals BluetoothRequestSettingsStorage to the provided writer.
func (m *BluetoothRequestSettingsStorage) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.TemplateName) > 0 {
writer.WriteString(1, m.TemplateName)
}
if m.Settings != nil {
writer.WriteMessage(2, func() {
m.Settings.MarshalToWriter(writer)
})
}
return
}
// Marshal marshals BluetoothRequestSettingsStorage to a slice of bytes.
func (m *BluetoothRequestSettingsStorage) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a BluetoothRequestSettingsStorage from the provided reader.
func (m *BluetoothRequestSettingsStorage) UnmarshalFromReader(reader jspb.Reader) *BluetoothRequestSettingsStorage {
for reader.Next() {
if m == nil {
m = &BluetoothRequestSettingsStorage{}
}
switch reader.GetFieldNumber() {
case 1:
m.TemplateName = reader.ReadString()
case 2:
reader.ReadMessage(func() {
m.Settings = m.Settings.UnmarshalFromReader(reader)
})
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a BluetoothRequestSettingsStorage from a slice of bytes.
func (m *BluetoothRequestSettingsStorage) Unmarshal(rawBytes []byte) (*BluetoothRequestSettingsStorage, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type BluetoothSettings struct {
Ci *BluetoothControllerInformation
As *BluetoothAgentSettings
}
// GetCi gets the Ci of the BluetoothSettings.
func (m *BluetoothSettings) GetCi() (x *BluetoothControllerInformation) {
if m == nil {
return x
}
return m.Ci
}
// GetAs gets the As of the BluetoothSettings.
func (m *BluetoothSettings) GetAs() (x *BluetoothAgentSettings) {
if m == nil {
return x
}
return m.As
}
// MarshalToWriter marshals BluetoothSettings to the provided writer.
func (m *BluetoothSettings) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if m.Ci != nil {
writer.WriteMessage(1, func() {
m.Ci.MarshalToWriter(writer)
})
}
if m.As != nil {
writer.WriteMessage(2, func() {
m.As.MarshalToWriter(writer)
})
}
return
}
// Marshal marshals BluetoothSettings to a slice of bytes.
func (m *BluetoothSettings) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a BluetoothSettings from the provided reader.
func (m *BluetoothSettings) UnmarshalFromReader(reader jspb.Reader) *BluetoothSettings {
for reader.Next() {
if m == nil {
m = &BluetoothSettings{}
}
switch reader.GetFieldNumber() {
case 1:
reader.ReadMessage(func() {
m.Ci = m.Ci.UnmarshalFromReader(reader)
})
case 2:
reader.ReadMessage(func() {
m.As = m.As.UnmarshalFromReader(reader)
})
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a BluetoothSettings from a slice of bytes.
func (m *BluetoothSettings) Unmarshal(rawBytes []byte) (*BluetoothSettings, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type BluetoothAgentSettings struct {
Pin string
}
// GetPin gets the Pin of the BluetoothAgentSettings.
func (m *BluetoothAgentSettings) GetPin() (x string) {
if m == nil {
return x
}
return m.Pin
}
// MarshalToWriter marshals BluetoothAgentSettings to the provided writer.
func (m *BluetoothAgentSettings) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.Pin) > 0 {
writer.WriteString(1, m.Pin)
}
return
}
// Marshal marshals BluetoothAgentSettings to a slice of bytes.
func (m *BluetoothAgentSettings) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a BluetoothAgentSettings from the provided reader.
func (m *BluetoothAgentSettings) UnmarshalFromReader(reader jspb.Reader) *BluetoothAgentSettings {
for reader.Next() {
if m == nil {
m = &BluetoothAgentSettings{}
}
switch reader.GetFieldNumber() {
case 1:
m.Pin = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a BluetoothAgentSettings from a slice of bytes.
func (m *BluetoothAgentSettings) Unmarshal(rawBytes []byte) (*BluetoothAgentSettings, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type BluetoothNetworkService struct {
RegisterOrUnregister bool
ServerOrConnect bool
Type BluetoothNetworkServiceType
MacOrName string
BridgeName string
}
// GetRegisterOrUnregister gets the RegisterOrUnregister of the BluetoothNetworkService.
func (m *BluetoothNetworkService) GetRegisterOrUnregister() (x bool) {
if m == nil {
return x
}
return m.RegisterOrUnregister
}
// GetServerOrConnect gets the ServerOrConnect of the BluetoothNetworkService.
func (m *BluetoothNetworkService) GetServerOrConnect() (x bool) {
if m == nil {
return x
}
return m.ServerOrConnect
}
// GetType gets the Type of the BluetoothNetworkService.
func (m *BluetoothNetworkService) GetType() (x BluetoothNetworkServiceType) {
if m == nil {
return x
}
return m.Type
}
// GetMacOrName gets the MacOrName of the BluetoothNetworkService.
func (m *BluetoothNetworkService) GetMacOrName() (x string) {
if m == nil {
return x
}
return m.MacOrName
}
// GetBridgeName gets the BridgeName of the BluetoothNetworkService.
func (m *BluetoothNetworkService) GetBridgeName() (x string) {
if m == nil {
return x
}
return m.BridgeName
}
// MarshalToWriter marshals BluetoothNetworkService to the provided writer.
func (m *BluetoothNetworkService) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if m.RegisterOrUnregister {
writer.WriteBool(1, m.RegisterOrUnregister)
}
if m.ServerOrConnect {
writer.WriteBool(2, m.ServerOrConnect)
}
if int(m.Type) != 0 {
writer.WriteEnum(3, int(m.Type))
}
if len(m.MacOrName) > 0 {
writer.WriteString(4, m.MacOrName)
}
if len(m.BridgeName) > 0 {
writer.WriteString(5, m.BridgeName)
}
return
}
// Marshal marshals BluetoothNetworkService to a slice of bytes.
func (m *BluetoothNetworkService) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a BluetoothNetworkService from the provided reader.
func (m *BluetoothNetworkService) UnmarshalFromReader(reader jspb.Reader) *BluetoothNetworkService {
for reader.Next() {
if m == nil {
m = &BluetoothNetworkService{}
}
switch reader.GetFieldNumber() {
case 1:
m.RegisterOrUnregister = reader.ReadBool()
case 2:
m.ServerOrConnect = reader.ReadBool()
case 3:
m.Type = BluetoothNetworkServiceType(reader.ReadEnum())
case 4:
m.MacOrName = reader.ReadString()
case 5:
m.BridgeName = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a BluetoothNetworkService from a slice of bytes.
func (m *BluetoothNetworkService) Unmarshal(rawBytes []byte) (*BluetoothNetworkService, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type BluetoothControllerSettings struct {
Powered bool
Connectable bool
FastConnectable bool
Discoverable bool
Bondable bool
LinkLevelSecurity bool
SecureSimplePairing bool
BrEdr bool
HighSpeed bool
LowEnergy bool
Advertising bool
SecureConnections bool
DebugKeys bool
Privacy bool
ControllerConfiguration bool
StaticAddress bool
}
// GetPowered gets the Powered of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetPowered() (x bool) {
if m == nil {
return x
}
return m.Powered
}
// GetConnectable gets the Connectable of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetConnectable() (x bool) {
if m == nil {
return x
}
return m.Connectable
}
// GetFastConnectable gets the FastConnectable of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetFastConnectable() (x bool) {
if m == nil {
return x
}
return m.FastConnectable
}
// GetDiscoverable gets the Discoverable of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetDiscoverable() (x bool) {
if m == nil {
return x
}
return m.Discoverable
}
// GetBondable gets the Bondable of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetBondable() (x bool) {
if m == nil {
return x
}
return m.Bondable
}
// GetLinkLevelSecurity gets the LinkLevelSecurity of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetLinkLevelSecurity() (x bool) {
if m == nil {
return x
}
return m.LinkLevelSecurity
}
// GetSecureSimplePairing gets the SecureSimplePairing of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetSecureSimplePairing() (x bool) {
if m == nil {
return x
}
return m.SecureSimplePairing
}
// GetBrEdr gets the BrEdr of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetBrEdr() (x bool) {
if m == nil {
return x
}
return m.BrEdr
}
// GetHighSpeed gets the HighSpeed of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetHighSpeed() (x bool) {
if m == nil {
return x
}
return m.HighSpeed
}
// GetLowEnergy gets the LowEnergy of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetLowEnergy() (x bool) {
if m == nil {
return x
}
return m.LowEnergy
}
// GetAdvertising gets the Advertising of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetAdvertising() (x bool) {
if m == nil {
return x
}
return m.Advertising
}
// GetSecureConnections gets the SecureConnections of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetSecureConnections() (x bool) {
if m == nil {
return x
}
return m.SecureConnections
}
// GetDebugKeys gets the DebugKeys of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetDebugKeys() (x bool) {
if m == nil {
return x
}
return m.DebugKeys
}
// GetPrivacy gets the Privacy of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetPrivacy() (x bool) {
if m == nil {
return x
}
return m.Privacy
}
// GetControllerConfiguration gets the ControllerConfiguration of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetControllerConfiguration() (x bool) {
if m == nil {
return x
}
return m.ControllerConfiguration
}
// GetStaticAddress gets the StaticAddress of the BluetoothControllerSettings.
func (m *BluetoothControllerSettings) GetStaticAddress() (x bool) {
if m == nil {
return x
}
return m.StaticAddress
}
// MarshalToWriter marshals BluetoothControllerSettings to the provided writer.
func (m *BluetoothControllerSettings) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if m.Powered {
writer.WriteBool(1, m.Powered)
}
if m.Connectable {
writer.WriteBool(2, m.Connectable)
}
if m.FastConnectable {
writer.WriteBool(3, m.FastConnectable)
}
if m.Discoverable {
writer.WriteBool(4, m.Discoverable)
}
if m.Bondable {
writer.WriteBool(5, m.Bondable)
}
if m.LinkLevelSecurity {
writer.WriteBool(6, m.LinkLevelSecurity)
}
if m.SecureSimplePairing {
writer.WriteBool(7, m.SecureSimplePairing)
}
if m.BrEdr {
writer.WriteBool(8, m.BrEdr)
}
if m.HighSpeed {
writer.WriteBool(9, m.HighSpeed)
}
if m.LowEnergy {
writer.WriteBool(10, m.LowEnergy)
}
if m.Advertising {
writer.WriteBool(11, m.Advertising)
}
if m.SecureConnections {
writer.WriteBool(12, m.SecureConnections)
}
if m.DebugKeys {
writer.WriteBool(13, m.DebugKeys)
}
if m.Privacy {
writer.WriteBool(14, m.Privacy)
}
if m.ControllerConfiguration {
writer.WriteBool(15, m.ControllerConfiguration)
}
if m.StaticAddress {
writer.WriteBool(16, m.StaticAddress)
}
return
}
// Marshal marshals BluetoothControllerSettings to a slice of bytes.
func (m *BluetoothControllerSettings) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a BluetoothControllerSettings from the provided reader.
func (m *BluetoothControllerSettings) UnmarshalFromReader(reader jspb.Reader) *BluetoothControllerSettings {
for reader.Next() {
if m == nil {
m = &BluetoothControllerSettings{}
}
switch reader.GetFieldNumber() {
case 1:
m.Powered = reader.ReadBool()
case 2:
m.Connectable = reader.ReadBool()
case 3:
m.FastConnectable = reader.ReadBool()
case 4:
m.Discoverable = reader.ReadBool()
case 5:
m.Bondable = reader.ReadBool()
case 6:
m.LinkLevelSecurity = reader.ReadBool()
case 7:
m.SecureSimplePairing = reader.ReadBool()
case 8:
m.BrEdr = reader.ReadBool()
case 9:
m.HighSpeed = reader.ReadBool()
case 10:
m.LowEnergy = reader.ReadBool()
case 11:
m.Advertising = reader.ReadBool()
case 12:
m.SecureConnections = reader.ReadBool()
case 13:
m.DebugKeys = reader.ReadBool()
case 14:
m.Privacy = reader.ReadBool()
case 15:
m.ControllerConfiguration = reader.ReadBool()
case 16:
m.StaticAddress = reader.ReadBool()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a BluetoothControllerSettings from a slice of bytes.
func (m *BluetoothControllerSettings) Unmarshal(rawBytes []byte) (*BluetoothControllerSettings, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type BluetoothControllerInformation struct {
Address []byte
BluetoothVersion uint32
Manufacturer uint32
SupportedSettings *BluetoothControllerSettings
CurrentSettings *BluetoothControllerSettings
ClassOfDevice []byte
Name string
ShortName string
IsAvailable bool
ServiceNetworkServerNap bool
ServiceNetworkServerPanu bool
ServiceNetworkServerGn bool
}
// GetAddress gets the Address of the BluetoothControllerInformation.
func (m *BluetoothControllerInformation) GetAddress() (x []byte) {
if m == nil {
return x
}
return m.Address
}
// GetBluetoothVersion gets the BluetoothVersion of the BluetoothControllerInformation.
func (m *BluetoothControllerInformation) GetBluetoothVersion() (x uint32) {
if m == nil {
return x
}
return m.BluetoothVersion
}
// GetManufacturer gets the Manufacturer of the BluetoothControllerInformation.
func (m *BluetoothControllerInformation) GetManufacturer() (x uint32) {
if m == nil {
return x
}
return m.Manufacturer
}
// GetSupportedSettings gets the SupportedSettings of the BluetoothControllerInformation.
func (m *BluetoothControllerInformation) GetSupportedSettings() (x *BluetoothControllerSettings) {
if m == nil {
return x
}
return m.SupportedSettings
}
// GetCurrentSettings gets the CurrentSettings of the BluetoothControllerInformation.
func (m *BluetoothControllerInformation) GetCurrentSettings() (x *BluetoothControllerSettings) {
if m == nil {
return x
}
return m.CurrentSettings
}
// GetClassOfDevice gets the ClassOfDevice of the BluetoothControllerInformation.
func (m *BluetoothControllerInformation) GetClassOfDevice() (x []byte) {
if m == nil {
return x
}
return m.ClassOfDevice
}
// GetName gets the Name of the BluetoothControllerInformation.
func (m *BluetoothControllerInformation) GetName() (x string) {
if m == nil {
return x
}
return m.Name
}
// GetShortName gets the ShortName of the BluetoothControllerInformation.
func (m *BluetoothControllerInformation) GetShortName() (x string) {
if m == nil {
return x
}
return m.ShortName
}
// GetIsAvailable gets the IsAvailable of the BluetoothControllerInformation.
func (m *BluetoothControllerInformation) GetIsAvailable() (x bool) {
if m == nil {
return x
}
return m.IsAvailable
}
// GetServiceNetworkServerNap gets the ServiceNetworkServerNap of the BluetoothControllerInformation.
func (m *BluetoothControllerInformation) GetServiceNetworkServerNap() (x bool) {
if m == nil {
return x
}
return m.ServiceNetworkServerNap
}
// GetServiceNetworkServerPanu gets the ServiceNetworkServerPanu of the BluetoothControllerInformation.
func (m *BluetoothControllerInformation) GetServiceNetworkServerPanu() (x bool) {
if m == nil {
return x
}
return m.ServiceNetworkServerPanu
}
// GetServiceNetworkServerGn gets the ServiceNetworkServerGn of the BluetoothControllerInformation.
func (m *BluetoothControllerInformation) GetServiceNetworkServerGn() (x bool) {
if m == nil {
return x
}
return m.ServiceNetworkServerGn
}
// MarshalToWriter marshals BluetoothControllerInformation to the provided writer.
func (m *BluetoothControllerInformation) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.Address) > 0 {
writer.WriteBytes(1, m.Address)
}
if m.BluetoothVersion != 0 {
writer.WriteUint32(2, m.BluetoothVersion)
}
if m.Manufacturer != 0 {
writer.WriteUint32(3, m.Manufacturer)
}
if m.SupportedSettings != nil {
writer.WriteMessage(4, func() {
m.SupportedSettings.MarshalToWriter(writer)
})
}
if m.CurrentSettings != nil {
writer.WriteMessage(5, func() {
m.CurrentSettings.MarshalToWriter(writer)
})
}
if len(m.ClassOfDevice) > 0 {
writer.WriteBytes(6, m.ClassOfDevice)
}
if len(m.Name) > 0 {
writer.WriteString(7, m.Name)
}
if len(m.ShortName) > 0 {
writer.WriteString(8, m.ShortName)
}
if m.IsAvailable {
writer.WriteBool(9, m.IsAvailable)
}
if m.ServiceNetworkServerNap {
writer.WriteBool(10, m.ServiceNetworkServerNap)
}
if m.ServiceNetworkServerPanu {
writer.WriteBool(11, m.ServiceNetworkServerPanu)
}
if m.ServiceNetworkServerGn {
writer.WriteBool(12, m.ServiceNetworkServerGn)
}
return
}
// Marshal marshals BluetoothControllerInformation to a slice of bytes.
func (m *BluetoothControllerInformation) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a BluetoothControllerInformation from the provided reader.
func (m *BluetoothControllerInformation) UnmarshalFromReader(reader jspb.Reader) *BluetoothControllerInformation {
for reader.Next() {
if m == nil {
m = &BluetoothControllerInformation{}
}
switch reader.GetFieldNumber() {
case 1:
m.Address = reader.ReadBytes()
case 2:
m.BluetoothVersion = reader.ReadUint32()
case 3:
m.Manufacturer = reader.ReadUint32()
case 4:
reader.ReadMessage(func() {
m.SupportedSettings = m.SupportedSettings.UnmarshalFromReader(reader)
})
case 5:
reader.ReadMessage(func() {
m.CurrentSettings = m.CurrentSettings.UnmarshalFromReader(reader)
})
case 6:
m.ClassOfDevice = reader.ReadBytes()
case 7:
m.Name = reader.ReadString()
case 8:
m.ShortName = reader.ReadString()
case 9:
m.IsAvailable = reader.ReadBool()
case 10:
m.ServiceNetworkServerNap = reader.ReadBool()
case 11:
m.ServiceNetworkServerPanu = reader.ReadBool()
case 12:
m.ServiceNetworkServerGn = reader.ReadBool()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a BluetoothControllerInformation from a slice of bytes.
func (m *BluetoothControllerInformation) Unmarshal(rawBytes []byte) (*BluetoothControllerInformation, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
// Triggers, Actions and resulting TriggerActions
type TriggerActionSet struct {
TriggerActions []*TriggerAction
Name string
}
// GetTriggerActions gets the TriggerActions of the TriggerActionSet.
func (m *TriggerActionSet) GetTriggerActions() (x []*TriggerAction) {
if m == nil {
return x
}
return m.TriggerActions
}
// GetName gets the Name of the TriggerActionSet.
func (m *TriggerActionSet) GetName() (x string) {
if m == nil {
return x
}
return m.Name
}
// MarshalToWriter marshals TriggerActionSet to the provided writer.
func (m *TriggerActionSet) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
for _, msg := range m.TriggerActions {
writer.WriteMessage(1, func() {
msg.MarshalToWriter(writer)
})
}
if len(m.Name) > 0 {
writer.WriteString(2, m.Name)
}
return
}
// Marshal marshals TriggerActionSet to a slice of bytes.
func (m *TriggerActionSet) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TriggerActionSet from the provided reader.
func (m *TriggerActionSet) UnmarshalFromReader(reader jspb.Reader) *TriggerActionSet {
for reader.Next() {
if m == nil {
m = &TriggerActionSet{}
}
switch reader.GetFieldNumber() {
case 1:
reader.ReadMessage(func() {
m.TriggerActions = append(m.TriggerActions, new(TriggerAction).UnmarshalFromReader(reader))
})
case 2:
m.Name = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TriggerActionSet from a slice of bytes.
func (m *TriggerActionSet) Unmarshal(rawBytes []byte) (*TriggerActionSet, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type TriggerAction struct {
Id uint32
OneShot bool
IsActive bool
Immutable bool
// Types that are valid to be assigned to Trigger:
// *TriggerAction_ServiceStarted
// *TriggerAction_UsbGadgetConnected
// *TriggerAction_UsbGadgetDisconnected
// *TriggerAction_WifiAPStarted
// *TriggerAction_WifiConnectedAsSta
// *TriggerAction_SshLogin
// *TriggerAction_DhcpLeaseGranted
// *TriggerAction_GroupReceive
// *TriggerAction_GroupReceiveMulti
// *TriggerAction_GpioIn
Trigger isTriggerAction_Trigger
// Types that are valid to be assigned to Action:
// *TriggerAction_BashScript
// *TriggerAction_HidScript
// *TriggerAction_DeploySettingsTemplate
// *TriggerAction_Log
// *TriggerAction_GpioOut
// *TriggerAction_GroupSend
Action isTriggerAction_Action
}
// isTriggerAction_Trigger is used to distinguish types assignable to Trigger
type isTriggerAction_Trigger interface{ isTriggerAction_Trigger() }
// isTriggerAction_Action is used to distinguish types assignable to Action
type isTriggerAction_Action interface{ isTriggerAction_Action() }
// TriggerAction_ServiceStarted is assignable to Trigger
type TriggerAction_ServiceStarted struct {
ServiceStarted *TriggerServiceStarted
}
// TriggerAction_UsbGadgetConnected is assignable to Trigger
type TriggerAction_UsbGadgetConnected struct {
UsbGadgetConnected *TriggerUSBGadgetConnected
}
// TriggerAction_UsbGadgetDisconnected is assignable to Trigger
type TriggerAction_UsbGadgetDisconnected struct {
UsbGadgetDisconnected *TriggerUSBGadgetDisconnected
}
// TriggerAction_WifiAPStarted is assignable to Trigger
type TriggerAction_WifiAPStarted struct {
WifiAPStarted *TriggerWifiAPStarted
}
// TriggerAction_WifiConnectedAsSta is assignable to Trigger
type TriggerAction_WifiConnectedAsSta struct {
WifiConnectedAsSta *TriggerWifiConnectedAsSta
}
// TriggerAction_SshLogin is assignable to Trigger
type TriggerAction_SshLogin struct {
SshLogin *TriggerSSHLogin
}
// TriggerAction_DhcpLeaseGranted is assignable to Trigger
type TriggerAction_DhcpLeaseGranted struct {
DhcpLeaseGranted *TriggerDHCPLeaseGranted
}
// TriggerAction_GroupReceive is assignable to Trigger
type TriggerAction_GroupReceive struct {
GroupReceive *TriggerGroupReceive
}
// TriggerAction_GroupReceiveMulti is assignable to Trigger
type TriggerAction_GroupReceiveMulti struct {
GroupReceiveMulti *TriggerGroupReceiveMulti
}
// TriggerAction_GpioIn is assignable to Trigger
type TriggerAction_GpioIn struct {
GpioIn *TriggerGPIOIn
}
// TriggerAction_BashScript is assignable to Action
type TriggerAction_BashScript struct {
BashScript *ActionStartBashScript
}
// TriggerAction_HidScript is assignable to Action
type TriggerAction_HidScript struct {
HidScript *ActionStartHIDScript
}
// TriggerAction_DeploySettingsTemplate is assignable to Action
type TriggerAction_DeploySettingsTemplate struct {
DeploySettingsTemplate *ActionDeploySettingsTemplate
}
// TriggerAction_Log is assignable to Action
type TriggerAction_Log struct {
Log *ActionLog
}
// TriggerAction_GpioOut is assignable to Action
type TriggerAction_GpioOut struct {
GpioOut *ActionGPIOOut
}
// TriggerAction_GroupSend is assignable to Action
type TriggerAction_GroupSend struct {
GroupSend *ActionGroupSend
}
func (*TriggerAction_ServiceStarted) isTriggerAction_Trigger() {}
func (*TriggerAction_UsbGadgetConnected) isTriggerAction_Trigger() {}
func (*TriggerAction_UsbGadgetDisconnected) isTriggerAction_Trigger() {}
func (*TriggerAction_WifiAPStarted) isTriggerAction_Trigger() {}
func (*TriggerAction_WifiConnectedAsSta) isTriggerAction_Trigger() {}
func (*TriggerAction_SshLogin) isTriggerAction_Trigger() {}
func (*TriggerAction_DhcpLeaseGranted) isTriggerAction_Trigger() {}
func (*TriggerAction_GroupReceive) isTriggerAction_Trigger() {}
func (*TriggerAction_GroupReceiveMulti) isTriggerAction_Trigger() {}
func (*TriggerAction_GpioIn) isTriggerAction_Trigger() {}
func (*TriggerAction_BashScript) isTriggerAction_Action() {}
func (*TriggerAction_HidScript) isTriggerAction_Action() {}
func (*TriggerAction_DeploySettingsTemplate) isTriggerAction_Action() {}
func (*TriggerAction_Log) isTriggerAction_Action() {}
func (*TriggerAction_GpioOut) isTriggerAction_Action() {}
func (*TriggerAction_GroupSend) isTriggerAction_Action() {}
// GetTrigger gets the Trigger of the TriggerAction.
func (m *TriggerAction) GetTrigger() (x isTriggerAction_Trigger) {
if m == nil {
return x
}
return m.Trigger
}
// GetAction gets the Action of the TriggerAction.
func (m *TriggerAction) GetAction() (x isTriggerAction_Action) {
if m == nil {
return x
}
return m.Action
}
// GetId gets the Id of the TriggerAction.
func (m *TriggerAction) GetId() (x uint32) {
if m == nil {
return x
}
return m.Id
}
// GetOneShot gets the OneShot of the TriggerAction.
func (m *TriggerAction) GetOneShot() (x bool) {
if m == nil {
return x
}
return m.OneShot
}
// GetIsActive gets the IsActive of the TriggerAction.
func (m *TriggerAction) GetIsActive() (x bool) {
if m == nil {
return x
}
return m.IsActive
}
// GetImmutable gets the Immutable of the TriggerAction.
func (m *TriggerAction) GetImmutable() (x bool) {
if m == nil {
return x
}
return m.Immutable
}
// GetServiceStarted gets the ServiceStarted of the TriggerAction.
func (m *TriggerAction) GetServiceStarted() (x *TriggerServiceStarted) {
if v, ok := m.GetTrigger().(*TriggerAction_ServiceStarted); ok {
return v.ServiceStarted
}
return x
}
// GetUsbGadgetConnected gets the UsbGadgetConnected of the TriggerAction.
func (m *TriggerAction) GetUsbGadgetConnected() (x *TriggerUSBGadgetConnected) {
if v, ok := m.GetTrigger().(*TriggerAction_UsbGadgetConnected); ok {
return v.UsbGadgetConnected
}
return x
}
// GetUsbGadgetDisconnected gets the UsbGadgetDisconnected of the TriggerAction.
func (m *TriggerAction) GetUsbGadgetDisconnected() (x *TriggerUSBGadgetDisconnected) {
if v, ok := m.GetTrigger().(*TriggerAction_UsbGadgetDisconnected); ok {
return v.UsbGadgetDisconnected
}
return x
}
// GetWifiAPStarted gets the WifiAPStarted of the TriggerAction.
func (m *TriggerAction) GetWifiAPStarted() (x *TriggerWifiAPStarted) {
if v, ok := m.GetTrigger().(*TriggerAction_WifiAPStarted); ok {
return v.WifiAPStarted
}
return x
}
// GetWifiConnectedAsSta gets the WifiConnectedAsSta of the TriggerAction.
func (m *TriggerAction) GetWifiConnectedAsSta() (x *TriggerWifiConnectedAsSta) {
if v, ok := m.GetTrigger().(*TriggerAction_WifiConnectedAsSta); ok {
return v.WifiConnectedAsSta
}
return x
}
// GetSshLogin gets the SshLogin of the TriggerAction.
func (m *TriggerAction) GetSshLogin() (x *TriggerSSHLogin) {
if v, ok := m.GetTrigger().(*TriggerAction_SshLogin); ok {
return v.SshLogin
}
return x
}
// GetDhcpLeaseGranted gets the DhcpLeaseGranted of the TriggerAction.
func (m *TriggerAction) GetDhcpLeaseGranted() (x *TriggerDHCPLeaseGranted) {
if v, ok := m.GetTrigger().(*TriggerAction_DhcpLeaseGranted); ok {
return v.DhcpLeaseGranted
}
return x
}
// GetGroupReceive gets the GroupReceive of the TriggerAction.
func (m *TriggerAction) GetGroupReceive() (x *TriggerGroupReceive) {
if v, ok := m.GetTrigger().(*TriggerAction_GroupReceive); ok {
return v.GroupReceive
}
return x
}
// GetGroupReceiveMulti gets the GroupReceiveMulti of the TriggerAction.
func (m *TriggerAction) GetGroupReceiveMulti() (x *TriggerGroupReceiveMulti) {
if v, ok := m.GetTrigger().(*TriggerAction_GroupReceiveMulti); ok {
return v.GroupReceiveMulti
}
return x
}
// GetGpioIn gets the GpioIn of the TriggerAction.
func (m *TriggerAction) GetGpioIn() (x *TriggerGPIOIn) {
if v, ok := m.GetTrigger().(*TriggerAction_GpioIn); ok {
return v.GpioIn
}
return x
}
// GetBashScript gets the BashScript of the TriggerAction.
func (m *TriggerAction) GetBashScript() (x *ActionStartBashScript) {
if v, ok := m.GetAction().(*TriggerAction_BashScript); ok {
return v.BashScript
}
return x
}
// GetHidScript gets the HidScript of the TriggerAction.
func (m *TriggerAction) GetHidScript() (x *ActionStartHIDScript) {
if v, ok := m.GetAction().(*TriggerAction_HidScript); ok {
return v.HidScript
}
return x
}
// GetDeploySettingsTemplate gets the DeploySettingsTemplate of the TriggerAction.
func (m *TriggerAction) GetDeploySettingsTemplate() (x *ActionDeploySettingsTemplate) {
if v, ok := m.GetAction().(*TriggerAction_DeploySettingsTemplate); ok {
return v.DeploySettingsTemplate
}
return x
}
// GetLog gets the Log of the TriggerAction.
func (m *TriggerAction) GetLog() (x *ActionLog) {
if v, ok := m.GetAction().(*TriggerAction_Log); ok {
return v.Log
}
return x
}
// GetGpioOut gets the GpioOut of the TriggerAction.
func (m *TriggerAction) GetGpioOut() (x *ActionGPIOOut) {
if v, ok := m.GetAction().(*TriggerAction_GpioOut); ok {
return v.GpioOut
}
return x
}
// GetGroupSend gets the GroupSend of the TriggerAction.
func (m *TriggerAction) GetGroupSend() (x *ActionGroupSend) {
if v, ok := m.GetAction().(*TriggerAction_GroupSend); ok {
return v.GroupSend
}
return x
}
// MarshalToWriter marshals TriggerAction to the provided writer.
func (m *TriggerAction) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
switch t := m.Trigger.(type) {
case *TriggerAction_ServiceStarted:
if t.ServiceStarted != nil {
writer.WriteMessage(5, func() {
t.ServiceStarted.MarshalToWriter(writer)
})
}
case *TriggerAction_UsbGadgetConnected:
if t.UsbGadgetConnected != nil {
writer.WriteMessage(6, func() {
t.UsbGadgetConnected.MarshalToWriter(writer)
})
}
case *TriggerAction_UsbGadgetDisconnected:
if t.UsbGadgetDisconnected != nil {
writer.WriteMessage(7, func() {
t.UsbGadgetDisconnected.MarshalToWriter(writer)
})
}
case *TriggerAction_WifiAPStarted:
if t.WifiAPStarted != nil {
writer.WriteMessage(8, func() {
t.WifiAPStarted.MarshalToWriter(writer)
})
}
case *TriggerAction_WifiConnectedAsSta:
if t.WifiConnectedAsSta != nil {
writer.WriteMessage(9, func() {
t.WifiConnectedAsSta.MarshalToWriter(writer)
})
}
case *TriggerAction_SshLogin:
if t.SshLogin != nil {
writer.WriteMessage(10, func() {
t.SshLogin.MarshalToWriter(writer)
})
}
case *TriggerAction_DhcpLeaseGranted:
if t.DhcpLeaseGranted != nil {
writer.WriteMessage(11, func() {
t.DhcpLeaseGranted.MarshalToWriter(writer)
})
}
case *TriggerAction_GroupReceive:
if t.GroupReceive != nil {
writer.WriteMessage(12, func() {
t.GroupReceive.MarshalToWriter(writer)
})
}
case *TriggerAction_GroupReceiveMulti:
if t.GroupReceiveMulti != nil {
writer.WriteMessage(13, func() {
t.GroupReceiveMulti.MarshalToWriter(writer)
})
}
case *TriggerAction_GpioIn:
if t.GpioIn != nil {
writer.WriteMessage(14, func() {
t.GpioIn.MarshalToWriter(writer)
})
}
}
switch t := m.Action.(type) {
case *TriggerAction_BashScript:
if t.BashScript != nil {
writer.WriteMessage(15, func() {
t.BashScript.MarshalToWriter(writer)
})
}
case *TriggerAction_HidScript:
if t.HidScript != nil {
writer.WriteMessage(16, func() {
t.HidScript.MarshalToWriter(writer)
})
}
case *TriggerAction_DeploySettingsTemplate:
if t.DeploySettingsTemplate != nil {
writer.WriteMessage(17, func() {
t.DeploySettingsTemplate.MarshalToWriter(writer)
})
}
case *TriggerAction_Log:
if t.Log != nil {
writer.WriteMessage(18, func() {
t.Log.MarshalToWriter(writer)
})
}
case *TriggerAction_GpioOut:
if t.GpioOut != nil {
writer.WriteMessage(19, func() {
t.GpioOut.MarshalToWriter(writer)
})
}
case *TriggerAction_GroupSend:
if t.GroupSend != nil {
writer.WriteMessage(20, func() {
t.GroupSend.MarshalToWriter(writer)
})
}
}
if m.Id != 0 {
writer.WriteUint32(1, m.Id)
}
if m.OneShot {
writer.WriteBool(2, m.OneShot)
}
if m.IsActive {
writer.WriteBool(3, m.IsActive)
}
if m.Immutable {
writer.WriteBool(4, m.Immutable)
}
return
}
// Marshal marshals TriggerAction to a slice of bytes.
func (m *TriggerAction) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TriggerAction from the provided reader.
func (m *TriggerAction) UnmarshalFromReader(reader jspb.Reader) *TriggerAction {
for reader.Next() {
if m == nil {
m = &TriggerAction{}
}
switch reader.GetFieldNumber() {
case 1:
m.Id = reader.ReadUint32()
case 2:
m.OneShot = reader.ReadBool()
case 3:
m.IsActive = reader.ReadBool()
case 4:
m.Immutable = reader.ReadBool()
case 5:
reader.ReadMessage(func() {
m.Trigger = &TriggerAction_ServiceStarted{
ServiceStarted: new(TriggerServiceStarted).UnmarshalFromReader(reader),
}
})
case 6:
reader.ReadMessage(func() {
m.Trigger = &TriggerAction_UsbGadgetConnected{
UsbGadgetConnected: new(TriggerUSBGadgetConnected).UnmarshalFromReader(reader),
}
})
case 7:
reader.ReadMessage(func() {
m.Trigger = &TriggerAction_UsbGadgetDisconnected{
UsbGadgetDisconnected: new(TriggerUSBGadgetDisconnected).UnmarshalFromReader(reader),
}
})
case 8:
reader.ReadMessage(func() {
m.Trigger = &TriggerAction_WifiAPStarted{
WifiAPStarted: new(TriggerWifiAPStarted).UnmarshalFromReader(reader),
}
})
case 9:
reader.ReadMessage(func() {
m.Trigger = &TriggerAction_WifiConnectedAsSta{
WifiConnectedAsSta: new(TriggerWifiConnectedAsSta).UnmarshalFromReader(reader),
}
})
case 10:
reader.ReadMessage(func() {
m.Trigger = &TriggerAction_SshLogin{
SshLogin: new(TriggerSSHLogin).UnmarshalFromReader(reader),
}
})
case 11:
reader.ReadMessage(func() {
m.Trigger = &TriggerAction_DhcpLeaseGranted{
DhcpLeaseGranted: new(TriggerDHCPLeaseGranted).UnmarshalFromReader(reader),
}
})
case 12:
reader.ReadMessage(func() {
m.Trigger = &TriggerAction_GroupReceive{
GroupReceive: new(TriggerGroupReceive).UnmarshalFromReader(reader),
}
})
case 13:
reader.ReadMessage(func() {
m.Trigger = &TriggerAction_GroupReceiveMulti{
GroupReceiveMulti: new(TriggerGroupReceiveMulti).UnmarshalFromReader(reader),
}
})
case 14:
reader.ReadMessage(func() {
m.Trigger = &TriggerAction_GpioIn{
GpioIn: new(TriggerGPIOIn).UnmarshalFromReader(reader),
}
})
case 15:
reader.ReadMessage(func() {
m.Action = &TriggerAction_BashScript{
BashScript: new(ActionStartBashScript).UnmarshalFromReader(reader),
}
})
case 16:
reader.ReadMessage(func() {
m.Action = &TriggerAction_HidScript{
HidScript: new(ActionStartHIDScript).UnmarshalFromReader(reader),
}
})
case 17:
reader.ReadMessage(func() {
m.Action = &TriggerAction_DeploySettingsTemplate{
DeploySettingsTemplate: new(ActionDeploySettingsTemplate).UnmarshalFromReader(reader),
}
})
case 18:
reader.ReadMessage(func() {
m.Action = &TriggerAction_Log{
Log: new(ActionLog).UnmarshalFromReader(reader),
}
})
case 19:
reader.ReadMessage(func() {
m.Action = &TriggerAction_GpioOut{
GpioOut: new(ActionGPIOOut).UnmarshalFromReader(reader),
}
})
case 20:
reader.ReadMessage(func() {
m.Action = &TriggerAction_GroupSend{
GroupSend: new(ActionGroupSend).UnmarshalFromReader(reader),
}
})
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TriggerAction from a slice of bytes.
func (m *TriggerAction) Unmarshal(rawBytes []byte) (*TriggerAction, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type TriggerServiceStarted struct {
}
// MarshalToWriter marshals TriggerServiceStarted to the provided writer.
func (m *TriggerServiceStarted) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
return
}
// Marshal marshals TriggerServiceStarted to a slice of bytes.
func (m *TriggerServiceStarted) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TriggerServiceStarted from the provided reader.
func (m *TriggerServiceStarted) UnmarshalFromReader(reader jspb.Reader) *TriggerServiceStarted {
for reader.Next() {
if m == nil {
m = &TriggerServiceStarted{}
}
switch reader.GetFieldNumber() {
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TriggerServiceStarted from a slice of bytes.
func (m *TriggerServiceStarted) Unmarshal(rawBytes []byte) (*TriggerServiceStarted, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type TriggerUSBGadgetConnected struct {
}
// MarshalToWriter marshals TriggerUSBGadgetConnected to the provided writer.
func (m *TriggerUSBGadgetConnected) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
return
}
// Marshal marshals TriggerUSBGadgetConnected to a slice of bytes.
func (m *TriggerUSBGadgetConnected) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TriggerUSBGadgetConnected from the provided reader.
func (m *TriggerUSBGadgetConnected) UnmarshalFromReader(reader jspb.Reader) *TriggerUSBGadgetConnected {
for reader.Next() {
if m == nil {
m = &TriggerUSBGadgetConnected{}
}
switch reader.GetFieldNumber() {
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TriggerUSBGadgetConnected from a slice of bytes.
func (m *TriggerUSBGadgetConnected) Unmarshal(rawBytes []byte) (*TriggerUSBGadgetConnected, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type TriggerUSBGadgetDisconnected struct {
}
// MarshalToWriter marshals TriggerUSBGadgetDisconnected to the provided writer.
func (m *TriggerUSBGadgetDisconnected) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
return
}
// Marshal marshals TriggerUSBGadgetDisconnected to a slice of bytes.
func (m *TriggerUSBGadgetDisconnected) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TriggerUSBGadgetDisconnected from the provided reader.
func (m *TriggerUSBGadgetDisconnected) UnmarshalFromReader(reader jspb.Reader) *TriggerUSBGadgetDisconnected {
for reader.Next() {
if m == nil {
m = &TriggerUSBGadgetDisconnected{}
}
switch reader.GetFieldNumber() {
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TriggerUSBGadgetDisconnected from a slice of bytes.
func (m *TriggerUSBGadgetDisconnected) Unmarshal(rawBytes []byte) (*TriggerUSBGadgetDisconnected, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type TriggerWifiAPStarted struct {
}
// MarshalToWriter marshals TriggerWifiAPStarted to the provided writer.
func (m *TriggerWifiAPStarted) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
return
}
// Marshal marshals TriggerWifiAPStarted to a slice of bytes.
func (m *TriggerWifiAPStarted) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TriggerWifiAPStarted from the provided reader.
func (m *TriggerWifiAPStarted) UnmarshalFromReader(reader jspb.Reader) *TriggerWifiAPStarted {
for reader.Next() {
if m == nil {
m = &TriggerWifiAPStarted{}
}
switch reader.GetFieldNumber() {
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TriggerWifiAPStarted from a slice of bytes.
func (m *TriggerWifiAPStarted) Unmarshal(rawBytes []byte) (*TriggerWifiAPStarted, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type TriggerWifiConnectedAsSta struct {
}
// MarshalToWriter marshals TriggerWifiConnectedAsSta to the provided writer.
func (m *TriggerWifiConnectedAsSta) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
return
}
// Marshal marshals TriggerWifiConnectedAsSta to a slice of bytes.
func (m *TriggerWifiConnectedAsSta) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TriggerWifiConnectedAsSta from the provided reader.
func (m *TriggerWifiConnectedAsSta) UnmarshalFromReader(reader jspb.Reader) *TriggerWifiConnectedAsSta {
for reader.Next() {
if m == nil {
m = &TriggerWifiConnectedAsSta{}
}
switch reader.GetFieldNumber() {
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TriggerWifiConnectedAsSta from a slice of bytes.
func (m *TriggerWifiConnectedAsSta) Unmarshal(rawBytes []byte) (*TriggerWifiConnectedAsSta, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type TriggerSSHLogin struct {
LoginUser string
}
// GetLoginUser gets the LoginUser of the TriggerSSHLogin.
func (m *TriggerSSHLogin) GetLoginUser() (x string) {
if m == nil {
return x
}
return m.LoginUser
}
// MarshalToWriter marshals TriggerSSHLogin to the provided writer.
func (m *TriggerSSHLogin) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.LoginUser) > 0 {
writer.WriteString(1, m.LoginUser)
}
return
}
// Marshal marshals TriggerSSHLogin to a slice of bytes.
func (m *TriggerSSHLogin) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TriggerSSHLogin from the provided reader.
func (m *TriggerSSHLogin) UnmarshalFromReader(reader jspb.Reader) *TriggerSSHLogin {
for reader.Next() {
if m == nil {
m = &TriggerSSHLogin{}
}
switch reader.GetFieldNumber() {
case 1:
m.LoginUser = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TriggerSSHLogin from a slice of bytes.
func (m *TriggerSSHLogin) Unmarshal(rawBytes []byte) (*TriggerSSHLogin, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type TriggerDHCPLeaseGranted struct {
}
// MarshalToWriter marshals TriggerDHCPLeaseGranted to the provided writer.
func (m *TriggerDHCPLeaseGranted) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
return
}
// Marshal marshals TriggerDHCPLeaseGranted to a slice of bytes.
func (m *TriggerDHCPLeaseGranted) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TriggerDHCPLeaseGranted from the provided reader.
func (m *TriggerDHCPLeaseGranted) UnmarshalFromReader(reader jspb.Reader) *TriggerDHCPLeaseGranted {
for reader.Next() {
if m == nil {
m = &TriggerDHCPLeaseGranted{}
}
switch reader.GetFieldNumber() {
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TriggerDHCPLeaseGranted from a slice of bytes.
func (m *TriggerDHCPLeaseGranted) Unmarshal(rawBytes []byte) (*TriggerDHCPLeaseGranted, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type TriggerGroupReceive struct {
GroupName string
Value int32
}
// GetGroupName gets the GroupName of the TriggerGroupReceive.
func (m *TriggerGroupReceive) GetGroupName() (x string) {
if m == nil {
return x
}
return m.GroupName
}
// GetValue gets the Value of the TriggerGroupReceive.
func (m *TriggerGroupReceive) GetValue() (x int32) {
if m == nil {
return x
}
return m.Value
}
// MarshalToWriter marshals TriggerGroupReceive to the provided writer.
func (m *TriggerGroupReceive) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.GroupName) > 0 {
writer.WriteString(1, m.GroupName)
}
if m.Value != 0 {
writer.WriteInt32(2, m.Value)
}
return
}
// Marshal marshals TriggerGroupReceive to a slice of bytes.
func (m *TriggerGroupReceive) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TriggerGroupReceive from the provided reader.
func (m *TriggerGroupReceive) UnmarshalFromReader(reader jspb.Reader) *TriggerGroupReceive {
for reader.Next() {
if m == nil {
m = &TriggerGroupReceive{}
}
switch reader.GetFieldNumber() {
case 1:
m.GroupName = reader.ReadString()
case 2:
m.Value = reader.ReadInt32()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TriggerGroupReceive from a slice of bytes.
func (m *TriggerGroupReceive) Unmarshal(rawBytes []byte) (*TriggerGroupReceive, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type TriggerGroupReceiveMulti struct {
GroupName string
Values []int32
Type GroupReceiveMultiType
}
// GetGroupName gets the GroupName of the TriggerGroupReceiveMulti.
func (m *TriggerGroupReceiveMulti) GetGroupName() (x string) {
if m == nil {
return x
}
return m.GroupName
}
// GetValues gets the Values of the TriggerGroupReceiveMulti.
func (m *TriggerGroupReceiveMulti) GetValues() (x []int32) {
if m == nil {
return x
}
return m.Values
}
// GetType gets the Type of the TriggerGroupReceiveMulti.
func (m *TriggerGroupReceiveMulti) GetType() (x GroupReceiveMultiType) {
if m == nil {
return x
}
return m.Type
}
// MarshalToWriter marshals TriggerGroupReceiveMulti to the provided writer.
func (m *TriggerGroupReceiveMulti) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.GroupName) > 0 {
writer.WriteString(1, m.GroupName)
}
if len(m.Values) > 0 {
writer.WriteInt32Slice(3, m.Values)
}
if int(m.Type) != 0 {
writer.WriteEnum(4, int(m.Type))
}
return
}
// Marshal marshals TriggerGroupReceiveMulti to a slice of bytes.
func (m *TriggerGroupReceiveMulti) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TriggerGroupReceiveMulti from the provided reader.
func (m *TriggerGroupReceiveMulti) UnmarshalFromReader(reader jspb.Reader) *TriggerGroupReceiveMulti {
for reader.Next() {
if m == nil {
m = &TriggerGroupReceiveMulti{}
}
switch reader.GetFieldNumber() {
case 1:
m.GroupName = reader.ReadString()
case 3:
m.Values = reader.ReadInt32Slice()
case 4:
m.Type = GroupReceiveMultiType(reader.ReadEnum())
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TriggerGroupReceiveMulti from a slice of bytes.
func (m *TriggerGroupReceiveMulti) Unmarshal(rawBytes []byte) (*TriggerGroupReceiveMulti, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type TriggerGPIOIn struct {
GpioName string
PullUpDown GPIOInPullUpDown
GpioInEdge GPIOInEdge
DebounceMillis int64
}
// GetGpioName gets the GpioName of the TriggerGPIOIn.
func (m *TriggerGPIOIn) GetGpioName() (x string) {
if m == nil {
return x
}
return m.GpioName
}
// GetPullUpDown gets the PullUpDown of the TriggerGPIOIn.
func (m *TriggerGPIOIn) GetPullUpDown() (x GPIOInPullUpDown) {
if m == nil {
return x
}
return m.PullUpDown
}
// GetGpioInEdge gets the GpioInEdge of the TriggerGPIOIn.
func (m *TriggerGPIOIn) GetGpioInEdge() (x GPIOInEdge) {
if m == nil {
return x
}
return m.GpioInEdge
}
// GetDebounceMillis gets the DebounceMillis of the TriggerGPIOIn.
func (m *TriggerGPIOIn) GetDebounceMillis() (x int64) {
if m == nil {
return x
}
return m.DebounceMillis
}
// MarshalToWriter marshals TriggerGPIOIn to the provided writer.
func (m *TriggerGPIOIn) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.GpioName) > 0 {
writer.WriteString(1, m.GpioName)
}
if int(m.PullUpDown) != 0 {
writer.WriteEnum(2, int(m.PullUpDown))
}
if int(m.GpioInEdge) != 0 {
writer.WriteEnum(3, int(m.GpioInEdge))
}
if m.DebounceMillis != 0 {
writer.WriteInt64(4, m.DebounceMillis)
}
return
}
// Marshal marshals TriggerGPIOIn to a slice of bytes.
func (m *TriggerGPIOIn) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TriggerGPIOIn from the provided reader.
func (m *TriggerGPIOIn) UnmarshalFromReader(reader jspb.Reader) *TriggerGPIOIn {
for reader.Next() {
if m == nil {
m = &TriggerGPIOIn{}
}
switch reader.GetFieldNumber() {
case 1:
m.GpioName = reader.ReadString()
case 2:
m.PullUpDown = GPIOInPullUpDown(reader.ReadEnum())
case 3:
m.GpioInEdge = GPIOInEdge(reader.ReadEnum())
case 4:
m.DebounceMillis = reader.ReadInt64()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TriggerGPIOIn from a slice of bytes.
func (m *TriggerGPIOIn) Unmarshal(rawBytes []byte) (*TriggerGPIOIn, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type ActionStartBashScript struct {
ScriptName string
}
// GetScriptName gets the ScriptName of the ActionStartBashScript.
func (m *ActionStartBashScript) GetScriptName() (x string) {
if m == nil {
return x
}
return m.ScriptName
}
// MarshalToWriter marshals ActionStartBashScript to the provided writer.
func (m *ActionStartBashScript) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.ScriptName) > 0 {
writer.WriteString(1, m.ScriptName)
}
return
}
// Marshal marshals ActionStartBashScript to a slice of bytes.
func (m *ActionStartBashScript) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a ActionStartBashScript from the provided reader.
func (m *ActionStartBashScript) UnmarshalFromReader(reader jspb.Reader) *ActionStartBashScript {
for reader.Next() {
if m == nil {
m = &ActionStartBashScript{}
}
switch reader.GetFieldNumber() {
case 1:
m.ScriptName = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a ActionStartBashScript from a slice of bytes.
func (m *ActionStartBashScript) Unmarshal(rawBytes []byte) (*ActionStartBashScript, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type ActionStartHIDScript struct {
ScriptName string
}
// GetScriptName gets the ScriptName of the ActionStartHIDScript.
func (m *ActionStartHIDScript) GetScriptName() (x string) {
if m == nil {
return x
}
return m.ScriptName
}
// MarshalToWriter marshals ActionStartHIDScript to the provided writer.
func (m *ActionStartHIDScript) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.ScriptName) > 0 {
writer.WriteString(1, m.ScriptName)
}
return
}
// Marshal marshals ActionStartHIDScript to a slice of bytes.
func (m *ActionStartHIDScript) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a ActionStartHIDScript from the provided reader.
func (m *ActionStartHIDScript) UnmarshalFromReader(reader jspb.Reader) *ActionStartHIDScript {
for reader.Next() {
if m == nil {
m = &ActionStartHIDScript{}
}
switch reader.GetFieldNumber() {
case 1:
m.ScriptName = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a ActionStartHIDScript from a slice of bytes.
func (m *ActionStartHIDScript) Unmarshal(rawBytes []byte) (*ActionStartHIDScript, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type ActionDeploySettingsTemplate struct {
TemplateName string
Type ActionDeploySettingsTemplate_TemplateType
}
// GetTemplateName gets the TemplateName of the ActionDeploySettingsTemplate.
func (m *ActionDeploySettingsTemplate) GetTemplateName() (x string) {
if m == nil {
return x
}
return m.TemplateName
}
// GetType gets the Type of the ActionDeploySettingsTemplate.
func (m *ActionDeploySettingsTemplate) GetType() (x ActionDeploySettingsTemplate_TemplateType) {
if m == nil {
return x
}
return m.Type
}
// MarshalToWriter marshals ActionDeploySettingsTemplate to the provided writer.
func (m *ActionDeploySettingsTemplate) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.TemplateName) > 0 {
writer.WriteString(1, m.TemplateName)
}
if int(m.Type) != 0 {
writer.WriteEnum(2, int(m.Type))
}
return
}
// Marshal marshals ActionDeploySettingsTemplate to a slice of bytes.
func (m *ActionDeploySettingsTemplate) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a ActionDeploySettingsTemplate from the provided reader.
func (m *ActionDeploySettingsTemplate) UnmarshalFromReader(reader jspb.Reader) *ActionDeploySettingsTemplate {
for reader.Next() {
if m == nil {
m = &ActionDeploySettingsTemplate{}
}
switch reader.GetFieldNumber() {
case 1:
m.TemplateName = reader.ReadString()
case 2:
m.Type = ActionDeploySettingsTemplate_TemplateType(reader.ReadEnum())
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a ActionDeploySettingsTemplate from a slice of bytes.
func (m *ActionDeploySettingsTemplate) Unmarshal(rawBytes []byte) (*ActionDeploySettingsTemplate, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type ActionLog struct {
}
// MarshalToWriter marshals ActionLog to the provided writer.
func (m *ActionLog) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
return
}
// Marshal marshals ActionLog to a slice of bytes.
func (m *ActionLog) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a ActionLog from the provided reader.
func (m *ActionLog) UnmarshalFromReader(reader jspb.Reader) *ActionLog {
for reader.Next() {
if m == nil {
m = &ActionLog{}
}
switch reader.GetFieldNumber() {
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a ActionLog from a slice of bytes.
func (m *ActionLog) Unmarshal(rawBytes []byte) (*ActionLog, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type ActionGPIOOut struct {
GpioName string
Value GPIOOutValue
}
// GetGpioName gets the GpioName of the ActionGPIOOut.
func (m *ActionGPIOOut) GetGpioName() (x string) {
if m == nil {
return x
}
return m.GpioName
}
// GetValue gets the Value of the ActionGPIOOut.
func (m *ActionGPIOOut) GetValue() (x GPIOOutValue) {
if m == nil {
return x
}
return m.Value
}
// MarshalToWriter marshals ActionGPIOOut to the provided writer.
func (m *ActionGPIOOut) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.GpioName) > 0 {
writer.WriteString(1, m.GpioName)
}
if int(m.Value) != 0 {
writer.WriteEnum(2, int(m.Value))
}
return
}
// Marshal marshals ActionGPIOOut to a slice of bytes.
func (m *ActionGPIOOut) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a ActionGPIOOut from the provided reader.
func (m *ActionGPIOOut) UnmarshalFromReader(reader jspb.Reader) *ActionGPIOOut {
for reader.Next() {
if m == nil {
m = &ActionGPIOOut{}
}
switch reader.GetFieldNumber() {
case 1:
m.GpioName = reader.ReadString()
case 2:
m.Value = GPIOOutValue(reader.ReadEnum())
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a ActionGPIOOut from a slice of bytes.
func (m *ActionGPIOOut) Unmarshal(rawBytes []byte) (*ActionGPIOOut, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type ActionGroupSend struct {
GroupName string
Value int32
}
// GetGroupName gets the GroupName of the ActionGroupSend.
func (m *ActionGroupSend) GetGroupName() (x string) {
if m == nil {
return x
}
return m.GroupName
}
// GetValue gets the Value of the ActionGroupSend.
func (m *ActionGroupSend) GetValue() (x int32) {
if m == nil {
return x
}
return m.Value
}
// MarshalToWriter marshals ActionGroupSend to the provided writer.
func (m *ActionGroupSend) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.GroupName) > 0 {
writer.WriteString(1, m.GroupName)
}
if m.Value != 0 {
writer.WriteInt32(2, m.Value)
}
return
}
// Marshal marshals ActionGroupSend to a slice of bytes.
func (m *ActionGroupSend) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a ActionGroupSend from the provided reader.
func (m *ActionGroupSend) UnmarshalFromReader(reader jspb.Reader) *ActionGroupSend {
for reader.Next() {
if m == nil {
m = &ActionGroupSend{}
}
switch reader.GetFieldNumber() {
case 1:
m.GroupName = reader.ReadString()
case 2:
m.Value = reader.ReadInt32()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a ActionGroupSend from a slice of bytes.
func (m *ActionGroupSend) Unmarshal(rawBytes []byte) (*ActionGroupSend, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type WifiRequestSettingsStorage struct {
TemplateName string
Settings *WiFiSettings
}
// GetTemplateName gets the TemplateName of the WifiRequestSettingsStorage.
func (m *WifiRequestSettingsStorage) GetTemplateName() (x string) {
if m == nil {
return x
}
return m.TemplateName
}
// GetSettings gets the Settings of the WifiRequestSettingsStorage.
func (m *WifiRequestSettingsStorage) GetSettings() (x *WiFiSettings) {
if m == nil {
return x
}
return m.Settings
}
// MarshalToWriter marshals WifiRequestSettingsStorage to the provided writer.
func (m *WifiRequestSettingsStorage) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.TemplateName) > 0 {
writer.WriteString(1, m.TemplateName)
}
if m.Settings != nil {
writer.WriteMessage(2, func() {
m.Settings.MarshalToWriter(writer)
})
}
return
}
// Marshal marshals WifiRequestSettingsStorage to a slice of bytes.
func (m *WifiRequestSettingsStorage) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a WifiRequestSettingsStorage from the provided reader.
func (m *WifiRequestSettingsStorage) UnmarshalFromReader(reader jspb.Reader) *WifiRequestSettingsStorage {
for reader.Next() {
if m == nil {
m = &WifiRequestSettingsStorage{}
}
switch reader.GetFieldNumber() {
case 1:
m.TemplateName = reader.ReadString()
case 2:
reader.ReadMessage(func() {
m.Settings = m.Settings.UnmarshalFromReader(reader)
})
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a WifiRequestSettingsStorage from a slice of bytes.
func (m *WifiRequestSettingsStorage) Unmarshal(rawBytes []byte) (*WifiRequestSettingsStorage, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type WiFiSettings struct {
// Generic
Name string
Disabled bool
Regulatory string
WorkingMode WiFiWorkingMode
AuthMode WiFiAuthMode
Channel uint32
Ap_BSS *WiFiBSSCfg
Client_BSSList []*WiFiBSSCfg
HideSsid bool
Nexmon bool
}
// GetName gets the Name of the WiFiSettings.
func (m *WiFiSettings) GetName() (x string) {
if m == nil {
return x
}
return m.Name
}
// GetDisabled gets the Disabled of the WiFiSettings.
func (m *WiFiSettings) GetDisabled() (x bool) {
if m == nil {
return x
}
return m.Disabled
}
// GetRegulatory gets the Regulatory of the WiFiSettings.
func (m *WiFiSettings) GetRegulatory() (x string) {
if m == nil {
return x
}
return m.Regulatory
}
// GetWorkingMode gets the WorkingMode of the WiFiSettings.
func (m *WiFiSettings) GetWorkingMode() (x WiFiWorkingMode) {
if m == nil {
return x
}
return m.WorkingMode
}
// GetAuthMode gets the AuthMode of the WiFiSettings.
func (m *WiFiSettings) GetAuthMode() (x WiFiAuthMode) {
if m == nil {
return x
}
return m.AuthMode
}
// GetChannel gets the Channel of the WiFiSettings.
func (m *WiFiSettings) GetChannel() (x uint32) {
if m == nil {
return x
}
return m.Channel
}
// GetAp_BSS gets the Ap_BSS of the WiFiSettings.
func (m *WiFiSettings) GetAp_BSS() (x *WiFiBSSCfg) {
if m == nil {
return x
}
return m.Ap_BSS
}
// GetClient_BSSList gets the Client_BSSList of the WiFiSettings.
func (m *WiFiSettings) GetClient_BSSList() (x []*WiFiBSSCfg) {
if m == nil {
return x
}
return m.Client_BSSList
}
// GetHideSsid gets the HideSsid of the WiFiSettings.
func (m *WiFiSettings) GetHideSsid() (x bool) {
if m == nil {
return x
}
return m.HideSsid
}
// GetNexmon gets the Nexmon of the WiFiSettings.
func (m *WiFiSettings) GetNexmon() (x bool) {
if m == nil {
return x
}
return m.Nexmon
}
// MarshalToWriter marshals WiFiSettings to the provided writer.
func (m *WiFiSettings) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.Name) > 0 {
writer.WriteString(1, m.Name)
}
if m.Disabled {
writer.WriteBool(2, m.Disabled)
}
if len(m.Regulatory) > 0 {
writer.WriteString(3, m.Regulatory)
}
if int(m.WorkingMode) != 0 {
writer.WriteEnum(4, int(m.WorkingMode))
}
if int(m.AuthMode) != 0 {
writer.WriteEnum(5, int(m.AuthMode))
}
if m.Channel != 0 {
writer.WriteUint32(6, m.Channel)
}
if m.Ap_BSS != nil {
writer.WriteMessage(7, func() {
m.Ap_BSS.MarshalToWriter(writer)
})
}
for _, msg := range m.Client_BSSList {
writer.WriteMessage(8, func() {
msg.MarshalToWriter(writer)
})
}
if m.HideSsid {
writer.WriteBool(9, m.HideSsid)
}
if m.Nexmon {
writer.WriteBool(13, m.Nexmon)
}
return
}
// Marshal marshals WiFiSettings to a slice of bytes.
func (m *WiFiSettings) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a WiFiSettings from the provided reader.
func (m *WiFiSettings) UnmarshalFromReader(reader jspb.Reader) *WiFiSettings {
for reader.Next() {
if m == nil {
m = &WiFiSettings{}
}
switch reader.GetFieldNumber() {
case 1:
m.Name = reader.ReadString()
case 2:
m.Disabled = reader.ReadBool()
case 3:
m.Regulatory = reader.ReadString()
case 4:
m.WorkingMode = WiFiWorkingMode(reader.ReadEnum())
case 5:
m.AuthMode = WiFiAuthMode(reader.ReadEnum())
case 6:
m.Channel = reader.ReadUint32()
case 7:
reader.ReadMessage(func() {
m.Ap_BSS = m.Ap_BSS.UnmarshalFromReader(reader)
})
case 8:
reader.ReadMessage(func() {
m.Client_BSSList = append(m.Client_BSSList, new(WiFiBSSCfg).UnmarshalFromReader(reader))
})
case 9:
m.HideSsid = reader.ReadBool()
case 13:
m.Nexmon = reader.ReadBool()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a WiFiSettings from a slice of bytes.
func (m *WiFiSettings) Unmarshal(rawBytes []byte) (*WiFiSettings, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type WiFiState struct {
Mode WiFiStateMode
Channel uint32
Ssid string
CurrentSettings *WiFiSettings
}
// GetMode gets the Mode of the WiFiState.
func (m *WiFiState) GetMode() (x WiFiStateMode) {
if m == nil {
return x
}
return m.Mode
}
// GetChannel gets the Channel of the WiFiState.
func (m *WiFiState) GetChannel() (x uint32) {
if m == nil {
return x
}
return m.Channel
}
// GetSsid gets the Ssid of the WiFiState.
func (m *WiFiState) GetSsid() (x string) {
if m == nil {
return x
}
return m.Ssid
}
// GetCurrentSettings gets the CurrentSettings of the WiFiState.
func (m *WiFiState) GetCurrentSettings() (x *WiFiSettings) {
if m == nil {
return x
}
return m.CurrentSettings
}
// MarshalToWriter marshals WiFiState to the provided writer.
func (m *WiFiState) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if int(m.Mode) != 0 {
writer.WriteEnum(1, int(m.Mode))
}
if m.Channel != 0 {
writer.WriteUint32(2, m.Channel)
}
if len(m.Ssid) > 0 {
writer.WriteString(3, m.Ssid)
}
if m.CurrentSettings != nil {
writer.WriteMessage(4, func() {
m.CurrentSettings.MarshalToWriter(writer)
})
}
return
}
// Marshal marshals WiFiState to a slice of bytes.
func (m *WiFiState) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a WiFiState from the provided reader.
func (m *WiFiState) UnmarshalFromReader(reader jspb.Reader) *WiFiState {
for reader.Next() {
if m == nil {
m = &WiFiState{}
}
switch reader.GetFieldNumber() {
case 1:
m.Mode = WiFiStateMode(reader.ReadEnum())
case 2:
m.Channel = reader.ReadUint32()
case 3:
m.Ssid = reader.ReadString()
case 4:
reader.ReadMessage(func() {
m.CurrentSettings = m.CurrentSettings.UnmarshalFromReader(reader)
})
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a WiFiState from a slice of bytes.
func (m *WiFiState) Unmarshal(rawBytes []byte) (*WiFiState, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type WiFiBSSCfg struct {
SSID string
PSK string
}
// GetSSID gets the SSID of the WiFiBSSCfg.
func (m *WiFiBSSCfg) GetSSID() (x string) {
if m == nil {
return x
}
return m.SSID
}
// GetPSK gets the PSK of the WiFiBSSCfg.
func (m *WiFiBSSCfg) GetPSK() (x string) {
if m == nil {
return x
}
return m.PSK
}
// MarshalToWriter marshals WiFiBSSCfg to the provided writer.
func (m *WiFiBSSCfg) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.SSID) > 0 {
writer.WriteString(1, m.SSID)
}
if len(m.PSK) > 0 {
writer.WriteString(2, m.PSK)
}
return
}
// Marshal marshals WiFiBSSCfg to a slice of bytes.
func (m *WiFiBSSCfg) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a WiFiBSSCfg from the provided reader.
func (m *WiFiBSSCfg) UnmarshalFromReader(reader jspb.Reader) *WiFiBSSCfg {
for reader.Next() {
if m == nil {
m = &WiFiBSSCfg{}
}
switch reader.GetFieldNumber() {
case 1:
m.SSID = reader.ReadString()
case 2:
m.PSK = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a WiFiBSSCfg from a slice of bytes.
func (m *WiFiBSSCfg) Unmarshal(rawBytes []byte) (*WiFiBSSCfg, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
// Alive check
type StringMessage struct {
Msg string
}
// GetMsg gets the Msg of the StringMessage.
func (m *StringMessage) GetMsg() (x string) {
if m == nil {
return x
}
return m.Msg
}
// MarshalToWriter marshals StringMessage to the provided writer.
func (m *StringMessage) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.Msg) > 0 {
writer.WriteString(1, m.Msg)
}
return
}
// Marshal marshals StringMessage to a slice of bytes.
func (m *StringMessage) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a StringMessage from the provided reader.
func (m *StringMessage) UnmarshalFromReader(reader jspb.Reader) *StringMessage {
for reader.Next() {
if m == nil {
m = &StringMessage{}
}
switch reader.GetFieldNumber() {
case 1:
m.Msg = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a StringMessage from a slice of bytes.
func (m *StringMessage) Unmarshal(rawBytes []byte) (*StringMessage, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type StringMessageArray struct {
MsgArray []string
}
// GetMsgArray gets the MsgArray of the StringMessageArray.
func (m *StringMessageArray) GetMsgArray() (x []string) {
if m == nil {
return x
}
return m.MsgArray
}
// MarshalToWriter marshals StringMessageArray to the provided writer.
func (m *StringMessageArray) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
for _, val := range m.MsgArray {
writer.WriteString(1, val)
}
return
}
// Marshal marshals StringMessageArray to a slice of bytes.
func (m *StringMessageArray) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a StringMessageArray from the provided reader.
func (m *StringMessageArray) UnmarshalFromReader(reader jspb.Reader) *StringMessageArray {
for reader.Next() {
if m == nil {
m = &StringMessageArray{}
}
switch reader.GetFieldNumber() {
case 1:
m.MsgArray = append(m.MsgArray, reader.ReadString())
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a StringMessageArray from a slice of bytes.
func (m *StringMessageArray) Unmarshal(rawBytes []byte) (*StringMessageArray, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
// Events
type EventRequest struct {
ListenType int64
}
// GetListenType gets the ListenType of the EventRequest.
func (m *EventRequest) GetListenType() (x int64) {
if m == nil {
return x
}
return m.ListenType
}
// MarshalToWriter marshals EventRequest to the provided writer.
func (m *EventRequest) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if m.ListenType != 0 {
writer.WriteInt64(1, m.ListenType)
}
return
}
// Marshal marshals EventRequest to a slice of bytes.
func (m *EventRequest) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a EventRequest from the provided reader.
func (m *EventRequest) UnmarshalFromReader(reader jspb.Reader) *EventRequest {
for reader.Next() {
if m == nil {
m = &EventRequest{}
}
switch reader.GetFieldNumber() {
case 1:
m.ListenType = reader.ReadInt64()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a EventRequest from a slice of bytes.
func (m *EventRequest) Unmarshal(rawBytes []byte) (*EventRequest, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type EventValue struct {
// Types that are valid to be assigned to Val:
// *EventValue_Tstring
// *EventValue_Tbool
// *EventValue_Tint64
Val isEventValue_Val
}
// isEventValue_Val is used to distinguish types assignable to Val
type isEventValue_Val interface{ isEventValue_Val() }
// EventValue_Tstring is assignable to Val
type EventValue_Tstring struct {
Tstring string
}
// EventValue_Tbool is assignable to Val
type EventValue_Tbool struct {
Tbool bool
}
// EventValue_Tint64 is assignable to Val
type EventValue_Tint64 struct {
Tint64 int64
}
func (*EventValue_Tstring) isEventValue_Val() {}
func (*EventValue_Tbool) isEventValue_Val() {}
func (*EventValue_Tint64) isEventValue_Val() {}
// GetVal gets the Val of the EventValue.
func (m *EventValue) GetVal() (x isEventValue_Val) {
if m == nil {
return x
}
return m.Val
}
// GetTstring gets the Tstring of the EventValue.
func (m *EventValue) GetTstring() (x string) {
if v, ok := m.GetVal().(*EventValue_Tstring); ok {
return v.Tstring
}
return x
}
// GetTbool gets the Tbool of the EventValue.
func (m *EventValue) GetTbool() (x bool) {
if v, ok := m.GetVal().(*EventValue_Tbool); ok {
return v.Tbool
}
return x
}
// GetTint64 gets the Tint64 of the EventValue.
func (m *EventValue) GetTint64() (x int64) {
if v, ok := m.GetVal().(*EventValue_Tint64); ok {
return v.Tint64
}
return x
}
// MarshalToWriter marshals EventValue to the provided writer.
func (m *EventValue) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
switch t := m.Val.(type) {
case *EventValue_Tstring:
if len(t.Tstring) > 0 {
writer.WriteString(1, t.Tstring)
}
case *EventValue_Tbool:
if t.Tbool {
writer.WriteBool(2, t.Tbool)
}
case *EventValue_Tint64:
if t.Tint64 != 0 {
writer.WriteInt64(3, t.Tint64)
}
}
return
}
// Marshal marshals EventValue to a slice of bytes.
func (m *EventValue) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a EventValue from the provided reader.
func (m *EventValue) UnmarshalFromReader(reader jspb.Reader) *EventValue {
for reader.Next() {
if m == nil {
m = &EventValue{}
}
switch reader.GetFieldNumber() {
case 1:
m.Val = &EventValue_Tstring{
Tstring: reader.ReadString(),
}
case 2:
m.Val = &EventValue_Tbool{
Tbool: reader.ReadBool(),
}
case 3:
m.Val = &EventValue_Tint64{
Tint64: reader.ReadInt64(),
}
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a EventValue from a slice of bytes.
func (m *EventValue) Unmarshal(rawBytes []byte) (*EventValue, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type Event struct {
Type int64
Values []*EventValue
}
// GetType gets the Type of the Event.
func (m *Event) GetType() (x int64) {
if m == nil {
return x
}
return m.Type
}
// GetValues gets the Values of the Event.
func (m *Event) GetValues() (x []*EventValue) {
if m == nil {
return x
}
return m.Values
}
// MarshalToWriter marshals Event to the provided writer.
func (m *Event) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if m.Type != 0 {
writer.WriteInt64(1, m.Type)
}
for _, msg := range m.Values {
writer.WriteMessage(2, func() {
msg.MarshalToWriter(writer)
})
}
return
}
// Marshal marshals Event to a slice of bytes.
func (m *Event) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a Event from the provided reader.
func (m *Event) UnmarshalFromReader(reader jspb.Reader) *Event {
for reader.Next() {
if m == nil {
m = &Event{}
}
switch reader.GetFieldNumber() {
case 1:
m.Type = reader.ReadInt64()
case 2:
reader.ReadMessage(func() {
m.Values = append(m.Values, new(EventValue).UnmarshalFromReader(reader))
})
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a Event from a slice of bytes.
func (m *Event) Unmarshal(rawBytes []byte) (*Event, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
// File System
type TempDirOrFileRequest struct {
Dir string
Prefix string
OnlyFolder bool
}
// GetDir gets the Dir of the TempDirOrFileRequest.
func (m *TempDirOrFileRequest) GetDir() (x string) {
if m == nil {
return x
}
return m.Dir
}
// GetPrefix gets the Prefix of the TempDirOrFileRequest.
func (m *TempDirOrFileRequest) GetPrefix() (x string) {
if m == nil {
return x
}
return m.Prefix
}
// GetOnlyFolder gets the OnlyFolder of the TempDirOrFileRequest.
func (m *TempDirOrFileRequest) GetOnlyFolder() (x bool) {
if m == nil {
return x
}
return m.OnlyFolder
}
// MarshalToWriter marshals TempDirOrFileRequest to the provided writer.
func (m *TempDirOrFileRequest) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.Dir) > 0 {
writer.WriteString(1, m.Dir)
}
if len(m.Prefix) > 0 {
writer.WriteString(2, m.Prefix)
}
if m.OnlyFolder {
writer.WriteBool(3, m.OnlyFolder)
}
return
}
// Marshal marshals TempDirOrFileRequest to a slice of bytes.
func (m *TempDirOrFileRequest) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TempDirOrFileRequest from the provided reader.
func (m *TempDirOrFileRequest) UnmarshalFromReader(reader jspb.Reader) *TempDirOrFileRequest {
for reader.Next() {
if m == nil {
m = &TempDirOrFileRequest{}
}
switch reader.GetFieldNumber() {
case 1:
m.Dir = reader.ReadString()
case 2:
m.Prefix = reader.ReadString()
case 3:
m.OnlyFolder = reader.ReadBool()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TempDirOrFileRequest from a slice of bytes.
func (m *TempDirOrFileRequest) Unmarshal(rawBytes []byte) (*TempDirOrFileRequest, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type TempDirOrFileResponse struct {
ResultPath string
}
// GetResultPath gets the ResultPath of the TempDirOrFileResponse.
func (m *TempDirOrFileResponse) GetResultPath() (x string) {
if m == nil {
return x
}
return m.ResultPath
}
// MarshalToWriter marshals TempDirOrFileResponse to the provided writer.
func (m *TempDirOrFileResponse) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.ResultPath) > 0 {
writer.WriteString(1, m.ResultPath)
}
return
}
// Marshal marshals TempDirOrFileResponse to a slice of bytes.
func (m *TempDirOrFileResponse) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a TempDirOrFileResponse from the provided reader.
func (m *TempDirOrFileResponse) UnmarshalFromReader(reader jspb.Reader) *TempDirOrFileResponse {
for reader.Next() {
if m == nil {
m = &TempDirOrFileResponse{}
}
switch reader.GetFieldNumber() {
case 1:
m.ResultPath = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a TempDirOrFileResponse from a slice of bytes.
func (m *TempDirOrFileResponse) Unmarshal(rawBytes []byte) (*TempDirOrFileResponse, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type ReadFileRequest struct {
Folder AccessibleFolder
Filename string
Start int64
Len int64
}
// GetFolder gets the Folder of the ReadFileRequest.
func (m *ReadFileRequest) GetFolder() (x AccessibleFolder) {
if m == nil {
return x
}
return m.Folder
}
// GetFilename gets the Filename of the ReadFileRequest.
func (m *ReadFileRequest) GetFilename() (x string) {
if m == nil {
return x
}
return m.Filename
}
// GetStart gets the Start of the ReadFileRequest.
func (m *ReadFileRequest) GetStart() (x int64) {
if m == nil {
return x
}
return m.Start
}
// GetLen gets the Len of the ReadFileRequest.
func (m *ReadFileRequest) GetLen() (x int64) {
if m == nil {
return x
}
return m.Len
}
// MarshalToWriter marshals ReadFileRequest to the provided writer.
func (m *ReadFileRequest) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if int(m.Folder) != 0 {
writer.WriteEnum(1, int(m.Folder))
}
if len(m.Filename) > 0 {
writer.WriteString(2, m.Filename)
}
if m.Start != 0 {
writer.WriteInt64(3, m.Start)
}
if m.Len != 0 {
writer.WriteInt64(4, m.Len)
}
return
}
// Marshal marshals ReadFileRequest to a slice of bytes.
func (m *ReadFileRequest) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a ReadFileRequest from the provided reader.
func (m *ReadFileRequest) UnmarshalFromReader(reader jspb.Reader) *ReadFileRequest {
for reader.Next() {
if m == nil {
m = &ReadFileRequest{}
}
switch reader.GetFieldNumber() {
case 1:
m.Folder = AccessibleFolder(reader.ReadEnum())
case 2:
m.Filename = reader.ReadString()
case 3:
m.Start = reader.ReadInt64()
case 4:
m.Len = reader.ReadInt64()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a ReadFileRequest from a slice of bytes.
func (m *ReadFileRequest) Unmarshal(rawBytes []byte) (*ReadFileRequest, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type ReadFileResponse struct {
ReadCount int64
Data []byte
}
// GetReadCount gets the ReadCount of the ReadFileResponse.
func (m *ReadFileResponse) GetReadCount() (x int64) {
if m == nil {
return x
}
return m.ReadCount
}
// GetData gets the Data of the ReadFileResponse.
func (m *ReadFileResponse) GetData() (x []byte) {
if m == nil {
return x
}
return m.Data
}
// MarshalToWriter marshals ReadFileResponse to the provided writer.
func (m *ReadFileResponse) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if m.ReadCount != 0 {
writer.WriteInt64(1, m.ReadCount)
}
if len(m.Data) > 0 {
writer.WriteBytes(2, m.Data)
}
return
}
// Marshal marshals ReadFileResponse to a slice of bytes.
func (m *ReadFileResponse) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a ReadFileResponse from the provided reader.
func (m *ReadFileResponse) UnmarshalFromReader(reader jspb.Reader) *ReadFileResponse {
for reader.Next() {
if m == nil {
m = &ReadFileResponse{}
}
switch reader.GetFieldNumber() {
case 1:
m.ReadCount = reader.ReadInt64()
case 2:
m.Data = reader.ReadBytes()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a ReadFileResponse from a slice of bytes.
func (m *ReadFileResponse) Unmarshal(rawBytes []byte) (*ReadFileResponse, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type WriteFileRequest struct {
Folder AccessibleFolder
Filename string
Append bool
MustNotExist bool
Data []byte
}
// GetFolder gets the Folder of the WriteFileRequest.
func (m *WriteFileRequest) GetFolder() (x AccessibleFolder) {
if m == nil {
return x
}
return m.Folder
}
// GetFilename gets the Filename of the WriteFileRequest.
func (m *WriteFileRequest) GetFilename() (x string) {
if m == nil {
return x
}
return m.Filename
}
// GetAppend gets the Append of the WriteFileRequest.
func (m *WriteFileRequest) GetAppend() (x bool) {
if m == nil {
return x
}
return m.Append
}
// GetMustNotExist gets the MustNotExist of the WriteFileRequest.
func (m *WriteFileRequest) GetMustNotExist() (x bool) {
if m == nil {
return x
}
return m.MustNotExist
}
// GetData gets the Data of the WriteFileRequest.
func (m *WriteFileRequest) GetData() (x []byte) {
if m == nil {
return x
}
return m.Data
}
// MarshalToWriter marshals WriteFileRequest to the provided writer.
func (m *WriteFileRequest) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if int(m.Folder) != 0 {
writer.WriteEnum(1, int(m.Folder))
}
if len(m.Filename) > 0 {
writer.WriteString(2, m.Filename)
}
if m.Append {
writer.WriteBool(3, m.Append)
}
if m.MustNotExist {
writer.WriteBool(4, m.MustNotExist)
}
if len(m.Data) > 0 {
writer.WriteBytes(5, m.Data)
}
return
}
// Marshal marshals WriteFileRequest to a slice of bytes.
func (m *WriteFileRequest) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a WriteFileRequest from the provided reader.
func (m *WriteFileRequest) UnmarshalFromReader(reader jspb.Reader) *WriteFileRequest {
for reader.Next() {
if m == nil {
m = &WriteFileRequest{}
}
switch reader.GetFieldNumber() {
case 1:
m.Folder = AccessibleFolder(reader.ReadEnum())
case 2:
m.Filename = reader.ReadString()
case 3:
m.Append = reader.ReadBool()
case 4:
m.MustNotExist = reader.ReadBool()
case 5:
m.Data = reader.ReadBytes()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a WriteFileRequest from a slice of bytes.
func (m *WriteFileRequest) Unmarshal(rawBytes []byte) (*WriteFileRequest, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type FileInfoRequest struct {
Path string
}
// GetPath gets the Path of the FileInfoRequest.
func (m *FileInfoRequest) GetPath() (x string) {
if m == nil {
return x
}
return m.Path
}
// MarshalToWriter marshals FileInfoRequest to the provided writer.
func (m *FileInfoRequest) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.Path) > 0 {
writer.WriteString(1, m.Path)
}
return
}
// Marshal marshals FileInfoRequest to a slice of bytes.
func (m *FileInfoRequest) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a FileInfoRequest from the provided reader.
func (m *FileInfoRequest) UnmarshalFromReader(reader jspb.Reader) *FileInfoRequest {
for reader.Next() {
if m == nil {
m = &FileInfoRequest{}
}
switch reader.GetFieldNumber() {
case 1:
m.Path = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a FileInfoRequest from a slice of bytes.
func (m *FileInfoRequest) Unmarshal(rawBytes []byte) (*FileInfoRequest, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type FileInfoResponse struct {
Name string
Size int64
Mode uint32
ModTime int64
IsDir bool
}
// GetName gets the Name of the FileInfoResponse.
func (m *FileInfoResponse) GetName() (x string) {
if m == nil {
return x
}
return m.Name
}
// GetSize gets the Size of the FileInfoResponse.
func (m *FileInfoResponse) GetSize() (x int64) {
if m == nil {
return x
}
return m.Size
}
// GetMode gets the Mode of the FileInfoResponse.
func (m *FileInfoResponse) GetMode() (x uint32) {
if m == nil {
return x
}
return m.Mode
}
// GetModTime gets the ModTime of the FileInfoResponse.
func (m *FileInfoResponse) GetModTime() (x int64) {
if m == nil {
return x
}
return m.ModTime
}
// GetIsDir gets the IsDir of the FileInfoResponse.
func (m *FileInfoResponse) GetIsDir() (x bool) {
if m == nil {
return x
}
return m.IsDir
}
// MarshalToWriter marshals FileInfoResponse to the provided writer.
func (m *FileInfoResponse) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.Name) > 0 {
writer.WriteString(1, m.Name)
}
if m.Size != 0 {
writer.WriteInt64(2, m.Size)
}
if m.Mode != 0 {
writer.WriteUint32(3, m.Mode)
}
if m.ModTime != 0 {
writer.WriteInt64(4, m.ModTime)
}
if m.IsDir {
writer.WriteBool(5, m.IsDir)
}
return
}
// Marshal marshals FileInfoResponse to a slice of bytes.
func (m *FileInfoResponse) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a FileInfoResponse from the provided reader.
func (m *FileInfoResponse) UnmarshalFromReader(reader jspb.Reader) *FileInfoResponse {
for reader.Next() {
if m == nil {
m = &FileInfoResponse{}
}
switch reader.GetFieldNumber() {
case 1:
m.Name = reader.ReadString()
case 2:
m.Size = reader.ReadInt64()
case 3:
m.Mode = reader.ReadUint32()
case 4:
m.ModTime = reader.ReadInt64()
case 5:
m.IsDir = reader.ReadBool()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a FileInfoResponse from a slice of bytes.
func (m *FileInfoResponse) Unmarshal(rawBytes []byte) (*FileInfoResponse, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
// HID
type HIDScriptRequest struct {
ScriptPath string
TimeoutSeconds uint32
}
// GetScriptPath gets the ScriptPath of the HIDScriptRequest.
func (m *HIDScriptRequest) GetScriptPath() (x string) {
if m == nil {
return x
}
return m.ScriptPath
}
// GetTimeoutSeconds gets the TimeoutSeconds of the HIDScriptRequest.
func (m *HIDScriptRequest) GetTimeoutSeconds() (x uint32) {
if m == nil {
return x
}
return m.TimeoutSeconds
}
// MarshalToWriter marshals HIDScriptRequest to the provided writer.
func (m *HIDScriptRequest) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.ScriptPath) > 0 {
writer.WriteString(1, m.ScriptPath)
}
if m.TimeoutSeconds != 0 {
writer.WriteUint32(2, m.TimeoutSeconds)
}
return
}
// Marshal marshals HIDScriptRequest to a slice of bytes.
func (m *HIDScriptRequest) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a HIDScriptRequest from the provided reader.
func (m *HIDScriptRequest) UnmarshalFromReader(reader jspb.Reader) *HIDScriptRequest {
for reader.Next() {
if m == nil {
m = &HIDScriptRequest{}
}
switch reader.GetFieldNumber() {
case 1:
m.ScriptPath = reader.ReadString()
case 2:
m.TimeoutSeconds = reader.ReadUint32()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a HIDScriptRequest from a slice of bytes.
func (m *HIDScriptRequest) Unmarshal(rawBytes []byte) (*HIDScriptRequest, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type HIDScriptJob struct {
Id uint32
}
// GetId gets the Id of the HIDScriptJob.
func (m *HIDScriptJob) GetId() (x uint32) {
if m == nil {
return x
}
return m.Id
}
// MarshalToWriter marshals HIDScriptJob to the provided writer.
func (m *HIDScriptJob) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if m.Id != 0 {
writer.WriteUint32(1, m.Id)
}
return
}
// Marshal marshals HIDScriptJob to a slice of bytes.
func (m *HIDScriptJob) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a HIDScriptJob from the provided reader.
func (m *HIDScriptJob) UnmarshalFromReader(reader jspb.Reader) *HIDScriptJob {
for reader.Next() {
if m == nil {
m = &HIDScriptJob{}
}
switch reader.GetFieldNumber() {
case 1:
m.Id = reader.ReadUint32()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a HIDScriptJob from a slice of bytes.
func (m *HIDScriptJob) Unmarshal(rawBytes []byte) (*HIDScriptJob, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type HIDScriptJobList struct {
Ids []uint32
}
// GetIds gets the Ids of the HIDScriptJobList.
func (m *HIDScriptJobList) GetIds() (x []uint32) {
if m == nil {
return x
}
return m.Ids
}
// MarshalToWriter marshals HIDScriptJobList to the provided writer.
func (m *HIDScriptJobList) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.Ids) > 0 {
writer.WriteUint32Slice(1, m.Ids)
}
return
}
// Marshal marshals HIDScriptJobList to a slice of bytes.
func (m *HIDScriptJobList) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a HIDScriptJobList from the provided reader.
func (m *HIDScriptJobList) UnmarshalFromReader(reader jspb.Reader) *HIDScriptJobList {
for reader.Next() {
if m == nil {
m = &HIDScriptJobList{}
}
switch reader.GetFieldNumber() {
case 1:
m.Ids = reader.ReadUint32Slice()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a HIDScriptJobList from a slice of bytes.
func (m *HIDScriptJobList) Unmarshal(rawBytes []byte) (*HIDScriptJobList, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type HIDRunningJobStateResult struct {
Id int64
VmId int64
Source string
}
// GetId gets the Id of the HIDRunningJobStateResult.
func (m *HIDRunningJobStateResult) GetId() (x int64) {
if m == nil {
return x
}
return m.Id
}
// GetVmId gets the VmId of the HIDRunningJobStateResult.
func (m *HIDRunningJobStateResult) GetVmId() (x int64) {
if m == nil {
return x
}
return m.VmId
}
// GetSource gets the Source of the HIDRunningJobStateResult.
func (m *HIDRunningJobStateResult) GetSource() (x string) {
if m == nil {
return x
}
return m.Source
}
// MarshalToWriter marshals HIDRunningJobStateResult to the provided writer.
func (m *HIDRunningJobStateResult) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if m.Id != 0 {
writer.WriteInt64(1, m.Id)
}
if m.VmId != 0 {
writer.WriteInt64(2, m.VmId)
}
if len(m.Source) > 0 {
writer.WriteString(3, m.Source)
}
return
}
// Marshal marshals HIDRunningJobStateResult to a slice of bytes.
func (m *HIDRunningJobStateResult) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a HIDRunningJobStateResult from the provided reader.
func (m *HIDRunningJobStateResult) UnmarshalFromReader(reader jspb.Reader) *HIDRunningJobStateResult {
for reader.Next() {
if m == nil {
m = &HIDRunningJobStateResult{}
}
switch reader.GetFieldNumber() {
case 1:
m.Id = reader.ReadInt64()
case 2:
m.VmId = reader.ReadInt64()
case 3:
m.Source = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a HIDRunningJobStateResult from a slice of bytes.
func (m *HIDRunningJobStateResult) Unmarshal(rawBytes []byte) (*HIDRunningJobStateResult, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type HIDScriptResult struct {
Job *HIDScriptJob
IsFinished bool
ResultJson string
}
// GetJob gets the Job of the HIDScriptResult.
func (m *HIDScriptResult) GetJob() (x *HIDScriptJob) {
if m == nil {
return x
}
return m.Job
}
// GetIsFinished gets the IsFinished of the HIDScriptResult.
func (m *HIDScriptResult) GetIsFinished() (x bool) {
if m == nil {
return x
}
return m.IsFinished
}
// GetResultJson gets the ResultJson of the HIDScriptResult.
func (m *HIDScriptResult) GetResultJson() (x string) {
if m == nil {
return x
}
return m.ResultJson
}
// MarshalToWriter marshals HIDScriptResult to the provided writer.
func (m *HIDScriptResult) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if m.Job != nil {
writer.WriteMessage(1, func() {
m.Job.MarshalToWriter(writer)
})
}
if m.IsFinished {
writer.WriteBool(2, m.IsFinished)
}
if len(m.ResultJson) > 0 {
writer.WriteString(3, m.ResultJson)
}
return
}
// Marshal marshals HIDScriptResult to a slice of bytes.
func (m *HIDScriptResult) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a HIDScriptResult from the provided reader.
func (m *HIDScriptResult) UnmarshalFromReader(reader jspb.Reader) *HIDScriptResult {
for reader.Next() {
if m == nil {
m = &HIDScriptResult{}
}
switch reader.GetFieldNumber() {
case 1:
reader.ReadMessage(func() {
m.Job = m.Job.UnmarshalFromReader(reader)
})
case 2:
m.IsFinished = reader.ReadBool()
case 3:
m.ResultJson = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a HIDScriptResult from a slice of bytes.
func (m *HIDScriptResult) Unmarshal(rawBytes []byte) (*HIDScriptResult, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
// LED
type LEDSettings struct {
BlinkCount uint32
}
// GetBlinkCount gets the BlinkCount of the LEDSettings.
func (m *LEDSettings) GetBlinkCount() (x uint32) {
if m == nil {
return x
}
return m.BlinkCount
}
// MarshalToWriter marshals LEDSettings to the provided writer.
func (m *LEDSettings) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if m.BlinkCount != 0 {
writer.WriteUint32(1, m.BlinkCount)
}
return
}
// Marshal marshals LEDSettings to a slice of bytes.
func (m *LEDSettings) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a LEDSettings from the provided reader.
func (m *LEDSettings) UnmarshalFromReader(reader jspb.Reader) *LEDSettings {
for reader.Next() {
if m == nil {
m = &LEDSettings{}
}
switch reader.GetFieldNumber() {
case 1:
m.BlinkCount = reader.ReadUint32()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a LEDSettings from a slice of bytes.
func (m *LEDSettings) Unmarshal(rawBytes []byte) (*LEDSettings, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
// USB Gadget
type USBRequestSettingsStorage struct {
TemplateName string
Settings *GadgetSettings
}
// GetTemplateName gets the TemplateName of the USBRequestSettingsStorage.
func (m *USBRequestSettingsStorage) GetTemplateName() (x string) {
if m == nil {
return x
}
return m.TemplateName
}
// GetSettings gets the Settings of the USBRequestSettingsStorage.
func (m *USBRequestSettingsStorage) GetSettings() (x *GadgetSettings) {
if m == nil {
return x
}
return m.Settings
}
// MarshalToWriter marshals USBRequestSettingsStorage to the provided writer.
func (m *USBRequestSettingsStorage) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.TemplateName) > 0 {
writer.WriteString(1, m.TemplateName)
}
if m.Settings != nil {
writer.WriteMessage(2, func() {
m.Settings.MarshalToWriter(writer)
})
}
return
}
// Marshal marshals USBRequestSettingsStorage to a slice of bytes.
func (m *USBRequestSettingsStorage) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a USBRequestSettingsStorage from the provided reader.
func (m *USBRequestSettingsStorage) UnmarshalFromReader(reader jspb.Reader) *USBRequestSettingsStorage {
for reader.Next() {
if m == nil {
m = &USBRequestSettingsStorage{}
}
switch reader.GetFieldNumber() {
case 1:
m.TemplateName = reader.ReadString()
case 2:
reader.ReadMessage(func() {
m.Settings = m.Settings.UnmarshalFromReader(reader)
})
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a USBRequestSettingsStorage from a slice of bytes.
func (m *USBRequestSettingsStorage) Unmarshal(rawBytes []byte) (*USBRequestSettingsStorage, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type GadgetSettings struct {
Enabled bool
Vid string
Pid string
Manufacturer string
Product string
Serial string
Use_CDC_ECM bool
Use_RNDIS bool
Use_HID_KEYBOARD bool
Use_HID_MOUSE bool
Use_HID_RAW bool
Use_UMS bool
Use_SERIAL bool
RndisSettings *GadgetSettingsEthernet
CdcEcmSettings *GadgetSettingsEthernet
UmsSettings *GadgetSettingsUMS
// EthernetInterfaceSettings ethernet_settings = 17; //only applicable if RNDIS or CDC ECM on
DevPathHidKeyboard string
DevPathHidMouse string
DevPathHidRaw string
}
// GetEnabled gets the Enabled of the GadgetSettings.
func (m *GadgetSettings) GetEnabled() (x bool) {
if m == nil {
return x
}
return m.Enabled
}
// GetVid gets the Vid of the GadgetSettings.
func (m *GadgetSettings) GetVid() (x string) {
if m == nil {
return x
}
return m.Vid
}
// GetPid gets the Pid of the GadgetSettings.
func (m *GadgetSettings) GetPid() (x string) {
if m == nil {
return x
}
return m.Pid
}
// GetManufacturer gets the Manufacturer of the GadgetSettings.
func (m *GadgetSettings) GetManufacturer() (x string) {
if m == nil {
return x
}
return m.Manufacturer
}
// GetProduct gets the Product of the GadgetSettings.
func (m *GadgetSettings) GetProduct() (x string) {
if m == nil {
return x
}
return m.Product
}
// GetSerial gets the Serial of the GadgetSettings.
func (m *GadgetSettings) GetSerial() (x string) {
if m == nil {
return x
}
return m.Serial
}
// GetUse_CDC_ECM gets the Use_CDC_ECM of the GadgetSettings.
func (m *GadgetSettings) GetUse_CDC_ECM() (x bool) {
if m == nil {
return x
}
return m.Use_CDC_ECM
}
// GetUse_RNDIS gets the Use_RNDIS of the GadgetSettings.
func (m *GadgetSettings) GetUse_RNDIS() (x bool) {
if m == nil {
return x
}
return m.Use_RNDIS
}
// GetUse_HID_KEYBOARD gets the Use_HID_KEYBOARD of the GadgetSettings.
func (m *GadgetSettings) GetUse_HID_KEYBOARD() (x bool) {
if m == nil {
return x
}
return m.Use_HID_KEYBOARD
}
// GetUse_HID_MOUSE gets the Use_HID_MOUSE of the GadgetSettings.
func (m *GadgetSettings) GetUse_HID_MOUSE() (x bool) {
if m == nil {
return x
}
return m.Use_HID_MOUSE
}
// GetUse_HID_RAW gets the Use_HID_RAW of the GadgetSettings.
func (m *GadgetSettings) GetUse_HID_RAW() (x bool) {
if m == nil {
return x
}
return m.Use_HID_RAW
}
// GetUse_UMS gets the Use_UMS of the GadgetSettings.
func (m *GadgetSettings) GetUse_UMS() (x bool) {
if m == nil {
return x
}
return m.Use_UMS
}
// GetUse_SERIAL gets the Use_SERIAL of the GadgetSettings.
func (m *GadgetSettings) GetUse_SERIAL() (x bool) {
if m == nil {
return x
}
return m.Use_SERIAL
}
// GetRndisSettings gets the RndisSettings of the GadgetSettings.
func (m *GadgetSettings) GetRndisSettings() (x *GadgetSettingsEthernet) {
if m == nil {
return x
}
return m.RndisSettings
}
// GetCdcEcmSettings gets the CdcEcmSettings of the GadgetSettings.
func (m *GadgetSettings) GetCdcEcmSettings() (x *GadgetSettingsEthernet) {
if m == nil {
return x
}
return m.CdcEcmSettings
}
// GetUmsSettings gets the UmsSettings of the GadgetSettings.
func (m *GadgetSettings) GetUmsSettings() (x *GadgetSettingsUMS) {
if m == nil {
return x
}
return m.UmsSettings
}
// GetDevPathHidKeyboard gets the DevPathHidKeyboard of the GadgetSettings.
func (m *GadgetSettings) GetDevPathHidKeyboard() (x string) {
if m == nil {
return x
}
return m.DevPathHidKeyboard
}
// GetDevPathHidMouse gets the DevPathHidMouse of the GadgetSettings.
func (m *GadgetSettings) GetDevPathHidMouse() (x string) {
if m == nil {
return x
}
return m.DevPathHidMouse
}
// GetDevPathHidRaw gets the DevPathHidRaw of the GadgetSettings.
func (m *GadgetSettings) GetDevPathHidRaw() (x string) {
if m == nil {
return x
}
return m.DevPathHidRaw
}
// MarshalToWriter marshals GadgetSettings to the provided writer.
func (m *GadgetSettings) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if m.Enabled {
writer.WriteBool(1, m.Enabled)
}
if len(m.Vid) > 0 {
writer.WriteString(2, m.Vid)
}
if len(m.Pid) > 0 {
writer.WriteString(3, m.Pid)
}
if len(m.Manufacturer) > 0 {
writer.WriteString(4, m.Manufacturer)
}
if len(m.Product) > 0 {
writer.WriteString(5, m.Product)
}
if len(m.Serial) > 0 {
writer.WriteString(6, m.Serial)
}
if m.Use_CDC_ECM {
writer.WriteBool(7, m.Use_CDC_ECM)
}
if m.Use_RNDIS {
writer.WriteBool(8, m.Use_RNDIS)
}
if m.Use_HID_KEYBOARD {
writer.WriteBool(9, m.Use_HID_KEYBOARD)
}
if m.Use_HID_MOUSE {
writer.WriteBool(10, m.Use_HID_MOUSE)
}
if m.Use_HID_RAW {
writer.WriteBool(11, m.Use_HID_RAW)
}
if m.Use_UMS {
writer.WriteBool(12, m.Use_UMS)
}
if m.Use_SERIAL {
writer.WriteBool(13, m.Use_SERIAL)
}
if m.RndisSettings != nil {
writer.WriteMessage(14, func() {
m.RndisSettings.MarshalToWriter(writer)
})
}
if m.CdcEcmSettings != nil {
writer.WriteMessage(15, func() {
m.CdcEcmSettings.MarshalToWriter(writer)
})
}
if m.UmsSettings != nil {
writer.WriteMessage(16, func() {
m.UmsSettings.MarshalToWriter(writer)
})
}
if len(m.DevPathHidKeyboard) > 0 {
writer.WriteString(18, m.DevPathHidKeyboard)
}
if len(m.DevPathHidMouse) > 0 {
writer.WriteString(19, m.DevPathHidMouse)
}
if len(m.DevPathHidRaw) > 0 {
writer.WriteString(20, m.DevPathHidRaw)
}
return
}
// Marshal marshals GadgetSettings to a slice of bytes.
func (m *GadgetSettings) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a GadgetSettings from the provided reader.
func (m *GadgetSettings) UnmarshalFromReader(reader jspb.Reader) *GadgetSettings {
for reader.Next() {
if m == nil {
m = &GadgetSettings{}
}
switch reader.GetFieldNumber() {
case 1:
m.Enabled = reader.ReadBool()
case 2:
m.Vid = reader.ReadString()
case 3:
m.Pid = reader.ReadString()
case 4:
m.Manufacturer = reader.ReadString()
case 5:
m.Product = reader.ReadString()
case 6:
m.Serial = reader.ReadString()
case 7:
m.Use_CDC_ECM = reader.ReadBool()
case 8:
m.Use_RNDIS = reader.ReadBool()
case 9:
m.Use_HID_KEYBOARD = reader.ReadBool()
case 10:
m.Use_HID_MOUSE = reader.ReadBool()
case 11:
m.Use_HID_RAW = reader.ReadBool()
case 12:
m.Use_UMS = reader.ReadBool()
case 13:
m.Use_SERIAL = reader.ReadBool()
case 14:
reader.ReadMessage(func() {
m.RndisSettings = m.RndisSettings.UnmarshalFromReader(reader)
})
case 15:
reader.ReadMessage(func() {
m.CdcEcmSettings = m.CdcEcmSettings.UnmarshalFromReader(reader)
})
case 16:
reader.ReadMessage(func() {
m.UmsSettings = m.UmsSettings.UnmarshalFromReader(reader)
})
case 18:
m.DevPathHidKeyboard = reader.ReadString()
case 19:
m.DevPathHidMouse = reader.ReadString()
case 20:
m.DevPathHidRaw = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a GadgetSettings from a slice of bytes.
func (m *GadgetSettings) Unmarshal(rawBytes []byte) (*GadgetSettings, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type GadgetSettingsEthernet struct {
HostAddr string
DevAddr string
}
// GetHostAddr gets the HostAddr of the GadgetSettingsEthernet.
func (m *GadgetSettingsEthernet) GetHostAddr() (x string) {
if m == nil {
return x
}
return m.HostAddr
}
// GetDevAddr gets the DevAddr of the GadgetSettingsEthernet.
func (m *GadgetSettingsEthernet) GetDevAddr() (x string) {
if m == nil {
return x
}
return m.DevAddr
}
// MarshalToWriter marshals GadgetSettingsEthernet to the provided writer.
func (m *GadgetSettingsEthernet) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.HostAddr) > 0 {
writer.WriteString(1, m.HostAddr)
}
if len(m.DevAddr) > 0 {
writer.WriteString(2, m.DevAddr)
}
return
}
// Marshal marshals GadgetSettingsEthernet to a slice of bytes.
func (m *GadgetSettingsEthernet) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a GadgetSettingsEthernet from the provided reader.
func (m *GadgetSettingsEthernet) UnmarshalFromReader(reader jspb.Reader) *GadgetSettingsEthernet {
for reader.Next() {
if m == nil {
m = &GadgetSettingsEthernet{}
}
switch reader.GetFieldNumber() {
case 1:
m.HostAddr = reader.ReadString()
case 2:
m.DevAddr = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a GadgetSettingsEthernet from a slice of bytes.
func (m *GadgetSettingsEthernet) Unmarshal(rawBytes []byte) (*GadgetSettingsEthernet, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type GadgetSettingsUMS struct {
Cdrom bool
File string
}
// GetCdrom gets the Cdrom of the GadgetSettingsUMS.
func (m *GadgetSettingsUMS) GetCdrom() (x bool) {
if m == nil {
return x
}
return m.Cdrom
}
// GetFile gets the File of the GadgetSettingsUMS.
func (m *GadgetSettingsUMS) GetFile() (x string) {
if m == nil {
return x
}
return m.File
}
// MarshalToWriter marshals GadgetSettingsUMS to the provided writer.
func (m *GadgetSettingsUMS) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if m.Cdrom {
writer.WriteBool(1, m.Cdrom)
}
if len(m.File) > 0 {
writer.WriteString(2, m.File)
}
return
}
// Marshal marshals GadgetSettingsUMS to a slice of bytes.
func (m *GadgetSettingsUMS) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a GadgetSettingsUMS from the provided reader.
func (m *GadgetSettingsUMS) UnmarshalFromReader(reader jspb.Reader) *GadgetSettingsUMS {
for reader.Next() {
if m == nil {
m = &GadgetSettingsUMS{}
}
switch reader.GetFieldNumber() {
case 1:
m.Cdrom = reader.ReadBool()
case 2:
m.File = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a GadgetSettingsUMS from a slice of bytes.
func (m *GadgetSettingsUMS) Unmarshal(rawBytes []byte) (*GadgetSettingsUMS, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
// Ethernet Interface Settings
type EthernetRequestSettingsStorage struct {
TemplateName string
Settings *EthernetInterfaceSettings
}
// GetTemplateName gets the TemplateName of the EthernetRequestSettingsStorage.
func (m *EthernetRequestSettingsStorage) GetTemplateName() (x string) {
if m == nil {
return x
}
return m.TemplateName
}
// GetSettings gets the Settings of the EthernetRequestSettingsStorage.
func (m *EthernetRequestSettingsStorage) GetSettings() (x *EthernetInterfaceSettings) {
if m == nil {
return x
}
return m.Settings
}
// MarshalToWriter marshals EthernetRequestSettingsStorage to the provided writer.
func (m *EthernetRequestSettingsStorage) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.TemplateName) > 0 {
writer.WriteString(1, m.TemplateName)
}
if m.Settings != nil {
writer.WriteMessage(2, func() {
m.Settings.MarshalToWriter(writer)
})
}
return
}
// Marshal marshals EthernetRequestSettingsStorage to a slice of bytes.
func (m *EthernetRequestSettingsStorage) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a EthernetRequestSettingsStorage from the provided reader.
func (m *EthernetRequestSettingsStorage) UnmarshalFromReader(reader jspb.Reader) *EthernetRequestSettingsStorage {
for reader.Next() {
if m == nil {
m = &EthernetRequestSettingsStorage{}
}
switch reader.GetFieldNumber() {
case 1:
m.TemplateName = reader.ReadString()
case 2:
reader.ReadMessage(func() {
m.Settings = m.Settings.UnmarshalFromReader(reader)
})
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a EthernetRequestSettingsStorage from a slice of bytes.
func (m *EthernetRequestSettingsStorage) Unmarshal(rawBytes []byte) (*EthernetRequestSettingsStorage, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type DeployedEthernetInterfaceSettings struct {
List []*EthernetInterfaceSettings
}
// GetList gets the List of the DeployedEthernetInterfaceSettings.
func (m *DeployedEthernetInterfaceSettings) GetList() (x []*EthernetInterfaceSettings) {
if m == nil {
return x
}
return m.List
}
// MarshalToWriter marshals DeployedEthernetInterfaceSettings to the provided writer.
func (m *DeployedEthernetInterfaceSettings) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
for _, msg := range m.List {
writer.WriteMessage(1, func() {
msg.MarshalToWriter(writer)
})
}
return
}
// Marshal marshals DeployedEthernetInterfaceSettings to a slice of bytes.
func (m *DeployedEthernetInterfaceSettings) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a DeployedEthernetInterfaceSettings from the provided reader.
func (m *DeployedEthernetInterfaceSettings) UnmarshalFromReader(reader jspb.Reader) *DeployedEthernetInterfaceSettings {
for reader.Next() {
if m == nil {
m = &DeployedEthernetInterfaceSettings{}
}
switch reader.GetFieldNumber() {
case 1:
reader.ReadMessage(func() {
m.List = append(m.List, new(EthernetInterfaceSettings).UnmarshalFromReader(reader))
})
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a DeployedEthernetInterfaceSettings from a slice of bytes.
func (m *DeployedEthernetInterfaceSettings) Unmarshal(rawBytes []byte) (*DeployedEthernetInterfaceSettings, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type EthernetInterfaceSettings struct {
Name string
Mode EthernetInterfaceSettings_Mode
IpAddress4 string
Netmask4 string
Enabled bool
DhcpServerSettings *DHCPServerSettings
SettingsInUse bool
}
// GetName gets the Name of the EthernetInterfaceSettings.
func (m *EthernetInterfaceSettings) GetName() (x string) {
if m == nil {
return x
}
return m.Name
}
// GetMode gets the Mode of the EthernetInterfaceSettings.
func (m *EthernetInterfaceSettings) GetMode() (x EthernetInterfaceSettings_Mode) {
if m == nil {
return x
}
return m.Mode
}
// GetIpAddress4 gets the IpAddress4 of the EthernetInterfaceSettings.
func (m *EthernetInterfaceSettings) GetIpAddress4() (x string) {
if m == nil {
return x
}
return m.IpAddress4
}
// GetNetmask4 gets the Netmask4 of the EthernetInterfaceSettings.
func (m *EthernetInterfaceSettings) GetNetmask4() (x string) {
if m == nil {
return x
}
return m.Netmask4
}
// GetEnabled gets the Enabled of the EthernetInterfaceSettings.
func (m *EthernetInterfaceSettings) GetEnabled() (x bool) {
if m == nil {
return x
}
return m.Enabled
}
// GetDhcpServerSettings gets the DhcpServerSettings of the EthernetInterfaceSettings.
func (m *EthernetInterfaceSettings) GetDhcpServerSettings() (x *DHCPServerSettings) {
if m == nil {
return x
}
return m.DhcpServerSettings
}
// GetSettingsInUse gets the SettingsInUse of the EthernetInterfaceSettings.
func (m *EthernetInterfaceSettings) GetSettingsInUse() (x bool) {
if m == nil {
return x
}
return m.SettingsInUse
}
// MarshalToWriter marshals EthernetInterfaceSettings to the provided writer.
func (m *EthernetInterfaceSettings) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.Name) > 0 {
writer.WriteString(1, m.Name)
}
if int(m.Mode) != 0 {
writer.WriteEnum(2, int(m.Mode))
}
if len(m.IpAddress4) > 0 {
writer.WriteString(3, m.IpAddress4)
}
if len(m.Netmask4) > 0 {
writer.WriteString(4, m.Netmask4)
}
if m.Enabled {
writer.WriteBool(5, m.Enabled)
}
if m.DhcpServerSettings != nil {
writer.WriteMessage(6, func() {
m.DhcpServerSettings.MarshalToWriter(writer)
})
}
if m.SettingsInUse {
writer.WriteBool(7, m.SettingsInUse)
}
return
}
// Marshal marshals EthernetInterfaceSettings to a slice of bytes.
func (m *EthernetInterfaceSettings) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a EthernetInterfaceSettings from the provided reader.
func (m *EthernetInterfaceSettings) UnmarshalFromReader(reader jspb.Reader) *EthernetInterfaceSettings {
for reader.Next() {
if m == nil {
m = &EthernetInterfaceSettings{}
}
switch reader.GetFieldNumber() {
case 1:
m.Name = reader.ReadString()
case 2:
m.Mode = EthernetInterfaceSettings_Mode(reader.ReadEnum())
case 3:
m.IpAddress4 = reader.ReadString()
case 4:
m.Netmask4 = reader.ReadString()
case 5:
m.Enabled = reader.ReadBool()
case 6:
reader.ReadMessage(func() {
m.DhcpServerSettings = m.DhcpServerSettings.UnmarshalFromReader(reader)
})
case 7:
m.SettingsInUse = reader.ReadBool()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a EthernetInterfaceSettings from a slice of bytes.
func (m *EthernetInterfaceSettings) Unmarshal(rawBytes []byte) (*EthernetInterfaceSettings, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
// DHCP
type DHCPServerSettings struct {
ListenPort uint32
ListenInterface string
LeaseFile string
NotAuthoritative bool
DoNotBindInterface bool
CallbackScript string
Ranges []*DHCPServerRange
// repeated DHCPServerOption options = 8;
Options map[uint32]string
StaticHosts []*DHCPServerStaticHost
}
// GetListenPort gets the ListenPort of the DHCPServerSettings.
func (m *DHCPServerSettings) GetListenPort() (x uint32) {
if m == nil {
return x
}
return m.ListenPort
}
// GetListenInterface gets the ListenInterface of the DHCPServerSettings.
func (m *DHCPServerSettings) GetListenInterface() (x string) {
if m == nil {
return x
}
return m.ListenInterface
}
// GetLeaseFile gets the LeaseFile of the DHCPServerSettings.
func (m *DHCPServerSettings) GetLeaseFile() (x string) {
if m == nil {
return x
}
return m.LeaseFile
}
// GetNotAuthoritative gets the NotAuthoritative of the DHCPServerSettings.
func (m *DHCPServerSettings) GetNotAuthoritative() (x bool) {
if m == nil {
return x
}
return m.NotAuthoritative
}
// GetDoNotBindInterface gets the DoNotBindInterface of the DHCPServerSettings.
func (m *DHCPServerSettings) GetDoNotBindInterface() (x bool) {
if m == nil {
return x
}
return m.DoNotBindInterface
}
// GetCallbackScript gets the CallbackScript of the DHCPServerSettings.
func (m *DHCPServerSettings) GetCallbackScript() (x string) {
if m == nil {
return x
}
return m.CallbackScript
}
// GetRanges gets the Ranges of the DHCPServerSettings.
func (m *DHCPServerSettings) GetRanges() (x []*DHCPServerRange) {
if m == nil {
return x
}
return m.Ranges
}
// GetOptions gets the Options of the DHCPServerSettings.
func (m *DHCPServerSettings) GetOptions() (x map[uint32]string) {
if m == nil {
return x
}
return m.Options
}
// GetStaticHosts gets the StaticHosts of the DHCPServerSettings.
func (m *DHCPServerSettings) GetStaticHosts() (x []*DHCPServerStaticHost) {
if m == nil {
return x
}
return m.StaticHosts
}
// MarshalToWriter marshals DHCPServerSettings to the provided writer.
func (m *DHCPServerSettings) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if m.ListenPort != 0 {
writer.WriteUint32(1, m.ListenPort)
}
if len(m.ListenInterface) > 0 {
writer.WriteString(2, m.ListenInterface)
}
if len(m.LeaseFile) > 0 {
writer.WriteString(3, m.LeaseFile)
}
if m.NotAuthoritative {
writer.WriteBool(4, m.NotAuthoritative)
}
if m.DoNotBindInterface {
writer.WriteBool(5, m.DoNotBindInterface)
}
if len(m.CallbackScript) > 0 {
writer.WriteString(6, m.CallbackScript)
}
for _, msg := range m.Ranges {
writer.WriteMessage(7, func() {
msg.MarshalToWriter(writer)
})
}
if len(m.Options) > 0 {
for key, value := range m.Options {
writer.WriteMessage(8, func() {
writer.WriteUint32(1, key)
writer.WriteString(2, value)
})
}
}
for _, msg := range m.StaticHosts {
writer.WriteMessage(9, func() {
msg.MarshalToWriter(writer)
})
}
return
}
// Marshal marshals DHCPServerSettings to a slice of bytes.
func (m *DHCPServerSettings) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a DHCPServerSettings from the provided reader.
func (m *DHCPServerSettings) UnmarshalFromReader(reader jspb.Reader) *DHCPServerSettings {
for reader.Next() {
if m == nil {
m = &DHCPServerSettings{}
}
switch reader.GetFieldNumber() {
case 1:
m.ListenPort = reader.ReadUint32()
case 2:
m.ListenInterface = reader.ReadString()
case 3:
m.LeaseFile = reader.ReadString()
case 4:
m.NotAuthoritative = reader.ReadBool()
case 5:
m.DoNotBindInterface = reader.ReadBool()
case 6:
m.CallbackScript = reader.ReadString()
case 7:
reader.ReadMessage(func() {
m.Ranges = append(m.Ranges, new(DHCPServerRange).UnmarshalFromReader(reader))
})
case 8:
if m.Options == nil {
m.Options = map[uint32]string{}
}
reader.ReadMessage(func() {
var key uint32
var value string
for reader.Next() {
switch reader.GetFieldNumber() {
case 1:
key = reader.ReadUint32()
case 2:
value = reader.ReadString()
}
m.Options[key] = value
}
})
case 9:
reader.ReadMessage(func() {
m.StaticHosts = append(m.StaticHosts, new(DHCPServerStaticHost).UnmarshalFromReader(reader))
})
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a DHCPServerSettings from a slice of bytes.
func (m *DHCPServerSettings) Unmarshal(rawBytes []byte) (*DHCPServerSettings, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
// Could be used for IPv4 or IPv6 (refer dnsmasq docs), nor field for prefix length (default is 64)
type DHCPServerRange struct {
RangeLower string
RangeUpper string
LeaseTime string
}
// GetRangeLower gets the RangeLower of the DHCPServerRange.
func (m *DHCPServerRange) GetRangeLower() (x string) {
if m == nil {
return x
}
return m.RangeLower
}
// GetRangeUpper gets the RangeUpper of the DHCPServerRange.
func (m *DHCPServerRange) GetRangeUpper() (x string) {
if m == nil {
return x
}
return m.RangeUpper
}
// GetLeaseTime gets the LeaseTime of the DHCPServerRange.
func (m *DHCPServerRange) GetLeaseTime() (x string) {
if m == nil {
return x
}
return m.LeaseTime
}
// MarshalToWriter marshals DHCPServerRange to the provided writer.
func (m *DHCPServerRange) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.RangeLower) > 0 {
writer.WriteString(1, m.RangeLower)
}
if len(m.RangeUpper) > 0 {
writer.WriteString(2, m.RangeUpper)
}
if len(m.LeaseTime) > 0 {
writer.WriteString(3, m.LeaseTime)
}
return
}
// Marshal marshals DHCPServerRange to a slice of bytes.
func (m *DHCPServerRange) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a DHCPServerRange from the provided reader.
func (m *DHCPServerRange) UnmarshalFromReader(reader jspb.Reader) *DHCPServerRange {
for reader.Next() {
if m == nil {
m = &DHCPServerRange{}
}
switch reader.GetFieldNumber() {
case 1:
m.RangeLower = reader.ReadString()
case 2:
m.RangeUpper = reader.ReadString()
case 3:
m.LeaseTime = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a DHCPServerRange from a slice of bytes.
func (m *DHCPServerRange) Unmarshal(rawBytes []byte) (*DHCPServerRange, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
// Used for static leases
type DHCPServerStaticHost struct {
Mac string
Ip string
}
// GetMac gets the Mac of the DHCPServerStaticHost.
func (m *DHCPServerStaticHost) GetMac() (x string) {
if m == nil {
return x
}
return m.Mac
}
// GetIp gets the Ip of the DHCPServerStaticHost.
func (m *DHCPServerStaticHost) GetIp() (x string) {
if m == nil {
return x
}
return m.Ip
}
// MarshalToWriter marshals DHCPServerStaticHost to the provided writer.
func (m *DHCPServerStaticHost) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
if len(m.Mac) > 0 {
writer.WriteString(1, m.Mac)
}
if len(m.Ip) > 0 {
writer.WriteString(2, m.Ip)
}
return
}
// Marshal marshals DHCPServerStaticHost to a slice of bytes.
func (m *DHCPServerStaticHost) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a DHCPServerStaticHost from the provided reader.
func (m *DHCPServerStaticHost) UnmarshalFromReader(reader jspb.Reader) *DHCPServerStaticHost {
for reader.Next() {
if m == nil {
m = &DHCPServerStaticHost{}
}
switch reader.GetFieldNumber() {
case 1:
m.Mac = reader.ReadString()
case 2:
m.Ip = reader.ReadString()
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a DHCPServerStaticHost from a slice of bytes.
func (m *DHCPServerStaticHost) Unmarshal(rawBytes []byte) (*DHCPServerStaticHost, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
type Empty struct {
}
// MarshalToWriter marshals Empty to the provided writer.
func (m *Empty) MarshalToWriter(writer jspb.Writer) {
if m == nil {
return
}
return
}
// Marshal marshals Empty to a slice of bytes.
func (m *Empty) Marshal() []byte {
writer := jspb.NewWriter()
m.MarshalToWriter(writer)
return writer.GetResult()
}
// UnmarshalFromReader unmarshals a Empty from the provided reader.
func (m *Empty) UnmarshalFromReader(reader jspb.Reader) *Empty {
for reader.Next() {
if m == nil {
m = &Empty{}
}
switch reader.GetFieldNumber() {
default:
reader.SkipField()
}
}
return m
}
// Unmarshal unmarshals a Empty from a slice of bytes.
func (m *Empty) Unmarshal(rawBytes []byte) (*Empty, error) {
reader := jspb.NewReader(rawBytes)
m = m.UnmarshalFromReader(reader)
if err := reader.Err(); err != nil {
return nil, err
}
return m, nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpcweb.Client
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpcweb package it is being compiled against.
const _ = grpcweb.GrpcWebPackageIsVersion3
// Client API for P4WNP1 service
type P4WNP1Client interface {
// Bluetooth
GetBluetoothControllerInformation(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*BluetoothControllerInformation, error)
DeployBluetoothControllerInformation(ctx context.Context, in *BluetoothControllerInformation, opts ...grpcweb.CallOption) (*BluetoothControllerInformation, error)
GetBluetoothAgentSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*BluetoothAgentSettings, error)
DeployBluetoothAgentSettings(ctx context.Context, in *BluetoothAgentSettings, opts ...grpcweb.CallOption) (*BluetoothAgentSettings, error)
SetBluetoothNetworkService(ctx context.Context, in *BluetoothNetworkService, opts ...grpcweb.CallOption) (*Empty, error)
DeployBluetoothSettings(ctx context.Context, in *BluetoothSettings, opts ...grpcweb.CallOption) (*BluetoothSettings, error)
StoreBluetoothSettings(ctx context.Context, in *BluetoothRequestSettingsStorage, opts ...grpcweb.CallOption) (*Empty, error)
GetStoredBluetoothSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*BluetoothSettings, error)
DeployStoredBluetoothSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*BluetoothSettings, error)
DeleteStoredBluetoothSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error)
StoreDeployedBluetoothSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error)
ListStoredBluetoothSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error)
// USB gadget
GetDeployedGadgetSetting(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*GadgetSettings, error)
DeployGadgetSetting(ctx context.Context, in *GadgetSettings, opts ...grpcweb.CallOption) (*GadgetSettings, error)
GetLEDSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*LEDSettings, error)
SetLEDSettings(ctx context.Context, in *LEDSettings, opts ...grpcweb.CallOption) (*Empty, error)
MountUMSFile(ctx context.Context, in *GadgetSettingsUMS, opts ...grpcweb.CallOption) (*Empty, error)
StoreUSBSettings(ctx context.Context, in *USBRequestSettingsStorage, opts ...grpcweb.CallOption) (*Empty, error)
GetStoredUSBSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*GadgetSettings, error)
DeployStoredUSBSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*GadgetSettings, error)
DeleteStoredUSBSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error)
StoreDeployedUSBSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error)
ListStoredUSBSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error)
ListUmsImageCdrom(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error)
ListUmsImageFlashdrive(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error)
// HIDScript / job management
HIDRunScript(ctx context.Context, in *HIDScriptRequest, opts ...grpcweb.CallOption) (*HIDScriptResult, error)
HIDRunScriptJob(ctx context.Context, in *HIDScriptRequest, opts ...grpcweb.CallOption) (*HIDScriptJob, error)
HIDGetScriptJobResult(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*HIDScriptResult, error)
HIDCancelScriptJob(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*Empty, error)
HIDGetRunningScriptJobs(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*HIDScriptJobList, error)
HIDCancelAllScriptJobs(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*Empty, error)
HIDGetRunningJobState(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*HIDRunningJobStateResult, error)
// FileSystem
FSWriteFile(ctx context.Context, in *WriteFileRequest, opts ...grpcweb.CallOption) (*Empty, error)
FSReadFile(ctx context.Context, in *ReadFileRequest, opts ...grpcweb.CallOption) (*ReadFileResponse, error)
FSGetFileInfo(ctx context.Context, in *FileInfoRequest, opts ...grpcweb.CallOption) (*FileInfoResponse, error)
FSCreateTempDirOrFile(ctx context.Context, in *TempDirOrFileRequest, opts ...grpcweb.CallOption) (*TempDirOrFileResponse, error)
// Events
EventListen(ctx context.Context, in *EventRequest, opts ...grpcweb.CallOption) (P4WNP1_EventListenClient, error)
// Alive check
EchoRequest(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*StringMessage, error)
// WiFi
DeployWiFiSettings(ctx context.Context, in *WiFiSettings, opts ...grpcweb.CallOption) (*WiFiState, error)
GetWiFiState(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*WiFiState, error)
ListenWiFiStateChanges(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*WiFiState, error)
StoreWifiSettings(ctx context.Context, in *WifiRequestSettingsStorage, opts ...grpcweb.CallOption) (*Empty, error)
GetStoredWifiSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*WiFiSettings, error)
DeployStoredWifiSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*WiFiState, error)
DeleteStoredWifiSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error)
StoreDeployedWifiSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error)
ListStoredWifiSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error)
// Ethernet
DeployEthernetInterfaceSettings(ctx context.Context, in *EthernetInterfaceSettings, opts ...grpcweb.CallOption) (*Empty, error)
GetAllDeployedEthernetInterfaceSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*DeployedEthernetInterfaceSettings, error)
GetDeployedEthernetInterfaceSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*EthernetInterfaceSettings, error)
StoreEthernetInterfaceSettings(ctx context.Context, in *EthernetRequestSettingsStorage, opts ...grpcweb.CallOption) (*Empty, error)
GetStoredEthernetInterfaceSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*EthernetInterfaceSettings, error)
DeployStoredEthernetInterfaceSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error)
DeleteStoredEthernetInterfaceSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error)
ListStoredEthernetInterfaceSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error)
// TriggerActions
GetDeployedTriggerActionSet(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*TriggerActionSet, error)
DeployTriggerActionSetReplace(ctx context.Context, in *TriggerActionSet, opts ...grpcweb.CallOption) (*TriggerActionSet, error)
DeployTriggerActionSetAdd(ctx context.Context, in *TriggerActionSet, opts ...grpcweb.CallOption) (*TriggerActionSet, error)
DeployTriggerActionSetRemove(ctx context.Context, in *TriggerActionSet, opts ...grpcweb.CallOption) (*TriggerActionSet, error)
DeployTriggerActionSetUpdate(ctx context.Context, in *TriggerActionSet, opts ...grpcweb.CallOption) (*TriggerActionSet, error)
ListStoredTriggerActionSets(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error)
StoreTriggerActionSet(ctx context.Context, in *TriggerActionSet, opts ...grpcweb.CallOption) (*Empty, error)
DeployStoredTriggerActionSetReplace(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*TriggerActionSet, error)
DeployStoredTriggerActionSetAdd(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*TriggerActionSet, error)
DeleteStoredTriggerActionSet(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error)
// TriggerAction for cli (trigger group send and wait for group receive)
WaitTriggerGroupReceive(ctx context.Context, in *TriggerGroupReceive, opts ...grpcweb.CallOption) (*Empty, error)
FireActionGroupSend(ctx context.Context, in *ActionGroupSend, opts ...grpcweb.CallOption) (*Empty, error)
// MasterTemplates
DeployMasterTemplate(ctx context.Context, in *MasterTemplate, opts ...grpcweb.CallOption) (*Empty, error)
StoreMasterTemplate(ctx context.Context, in *RequestMasterTemplateStorage, opts ...grpcweb.CallOption) (*Empty, error)
GetStoredMasterTemplate(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*MasterTemplate, error)
DeployStoredMasterTemplate(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*MasterTemplate, error)
DeleteStoredMasterTemplate(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error)
ListStoredMasterTemplate(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error)
// Startup Master Template
GetStartupMasterTemplate(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessage, error)
SetStartupMasterTemplate(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error)
// DB backup&restore
DBBackup(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error)
DBRestore(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error)
ListStoredHIDScripts(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error)
ListStoredBashScripts(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error)
ListStoredDBBackups(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error)
// GPIO
GetAvailableGpios(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error)
// System
Shutdown(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*Empty, error)
Reboot(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*Empty, error)
}
type p4WNP1Client struct {
client *grpcweb.Client
}
// NewP4WNP1Client creates a new gRPC-Web client.
func NewP4WNP1Client(hostname string, opts ...grpcweb.DialOption) P4WNP1Client {
return &p4WNP1Client{
client: grpcweb.NewClient(hostname, "P4wnP1_grpc.P4WNP1", opts...),
}
}
func (c *p4WNP1Client) GetBluetoothControllerInformation(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*BluetoothControllerInformation, error) {
resp, err := c.client.RPCCall(ctx, "GetBluetoothControllerInformation", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(BluetoothControllerInformation).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployBluetoothControllerInformation(ctx context.Context, in *BluetoothControllerInformation, opts ...grpcweb.CallOption) (*BluetoothControllerInformation, error) {
resp, err := c.client.RPCCall(ctx, "DeployBluetoothControllerInformation", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(BluetoothControllerInformation).Unmarshal(resp)
}
func (c *p4WNP1Client) GetBluetoothAgentSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*BluetoothAgentSettings, error) {
resp, err := c.client.RPCCall(ctx, "GetBluetoothAgentSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(BluetoothAgentSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployBluetoothAgentSettings(ctx context.Context, in *BluetoothAgentSettings, opts ...grpcweb.CallOption) (*BluetoothAgentSettings, error) {
resp, err := c.client.RPCCall(ctx, "DeployBluetoothAgentSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(BluetoothAgentSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) SetBluetoothNetworkService(ctx context.Context, in *BluetoothNetworkService, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "SetBluetoothNetworkService", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployBluetoothSettings(ctx context.Context, in *BluetoothSettings, opts ...grpcweb.CallOption) (*BluetoothSettings, error) {
resp, err := c.client.RPCCall(ctx, "DeployBluetoothSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(BluetoothSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) StoreBluetoothSettings(ctx context.Context, in *BluetoothRequestSettingsStorage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "StoreBluetoothSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) GetStoredBluetoothSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*BluetoothSettings, error) {
resp, err := c.client.RPCCall(ctx, "GetStoredBluetoothSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(BluetoothSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployStoredBluetoothSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*BluetoothSettings, error) {
resp, err := c.client.RPCCall(ctx, "DeployStoredBluetoothSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(BluetoothSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) DeleteStoredBluetoothSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "DeleteStoredBluetoothSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) StoreDeployedBluetoothSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "StoreDeployedBluetoothSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) ListStoredBluetoothSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error) {
resp, err := c.client.RPCCall(ctx, "ListStoredBluetoothSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessageArray).Unmarshal(resp)
}
func (c *p4WNP1Client) GetDeployedGadgetSetting(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*GadgetSettings, error) {
resp, err := c.client.RPCCall(ctx, "GetDeployedGadgetSetting", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(GadgetSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployGadgetSetting(ctx context.Context, in *GadgetSettings, opts ...grpcweb.CallOption) (*GadgetSettings, error) {
resp, err := c.client.RPCCall(ctx, "DeployGadgetSetting", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(GadgetSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) GetLEDSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*LEDSettings, error) {
resp, err := c.client.RPCCall(ctx, "GetLEDSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(LEDSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) SetLEDSettings(ctx context.Context, in *LEDSettings, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "SetLEDSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) MountUMSFile(ctx context.Context, in *GadgetSettingsUMS, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "MountUMSFile", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) StoreUSBSettings(ctx context.Context, in *USBRequestSettingsStorage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "StoreUSBSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) GetStoredUSBSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*GadgetSettings, error) {
resp, err := c.client.RPCCall(ctx, "GetStoredUSBSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(GadgetSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployStoredUSBSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*GadgetSettings, error) {
resp, err := c.client.RPCCall(ctx, "DeployStoredUSBSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(GadgetSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) DeleteStoredUSBSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "DeleteStoredUSBSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) StoreDeployedUSBSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "StoreDeployedUSBSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) ListStoredUSBSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error) {
resp, err := c.client.RPCCall(ctx, "ListStoredUSBSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessageArray).Unmarshal(resp)
}
func (c *p4WNP1Client) ListUmsImageCdrom(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error) {
resp, err := c.client.RPCCall(ctx, "ListUmsImageCdrom", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessageArray).Unmarshal(resp)
}
func (c *p4WNP1Client) ListUmsImageFlashdrive(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error) {
resp, err := c.client.RPCCall(ctx, "ListUmsImageFlashdrive", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessageArray).Unmarshal(resp)
}
func (c *p4WNP1Client) HIDRunScript(ctx context.Context, in *HIDScriptRequest, opts ...grpcweb.CallOption) (*HIDScriptResult, error) {
resp, err := c.client.RPCCall(ctx, "HIDRunScript", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(HIDScriptResult).Unmarshal(resp)
}
func (c *p4WNP1Client) HIDRunScriptJob(ctx context.Context, in *HIDScriptRequest, opts ...grpcweb.CallOption) (*HIDScriptJob, error) {
resp, err := c.client.RPCCall(ctx, "HIDRunScriptJob", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(HIDScriptJob).Unmarshal(resp)
}
func (c *p4WNP1Client) HIDGetScriptJobResult(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*HIDScriptResult, error) {
resp, err := c.client.RPCCall(ctx, "HIDGetScriptJobResult", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(HIDScriptResult).Unmarshal(resp)
}
func (c *p4WNP1Client) HIDCancelScriptJob(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "HIDCancelScriptJob", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) HIDGetRunningScriptJobs(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*HIDScriptJobList, error) {
resp, err := c.client.RPCCall(ctx, "HIDGetRunningScriptJobs", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(HIDScriptJobList).Unmarshal(resp)
}
func (c *p4WNP1Client) HIDCancelAllScriptJobs(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "HIDCancelAllScriptJobs", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) HIDGetRunningJobState(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*HIDRunningJobStateResult, error) {
resp, err := c.client.RPCCall(ctx, "HIDGetRunningJobState", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(HIDRunningJobStateResult).Unmarshal(resp)
}
func (c *p4WNP1Client) FSWriteFile(ctx context.Context, in *WriteFileRequest, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "FSWriteFile", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) FSReadFile(ctx context.Context, in *ReadFileRequest, opts ...grpcweb.CallOption) (*ReadFileResponse, error) {
resp, err := c.client.RPCCall(ctx, "FSReadFile", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(ReadFileResponse).Unmarshal(resp)
}
func (c *p4WNP1Client) FSGetFileInfo(ctx context.Context, in *FileInfoRequest, opts ...grpcweb.CallOption) (*FileInfoResponse, error) {
resp, err := c.client.RPCCall(ctx, "FSGetFileInfo", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(FileInfoResponse).Unmarshal(resp)
}
func (c *p4WNP1Client) FSCreateTempDirOrFile(ctx context.Context, in *TempDirOrFileRequest, opts ...grpcweb.CallOption) (*TempDirOrFileResponse, error) {
resp, err := c.client.RPCCall(ctx, "FSCreateTempDirOrFile", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(TempDirOrFileResponse).Unmarshal(resp)
}
func (c *p4WNP1Client) EventListen(ctx context.Context, in *EventRequest, opts ...grpcweb.CallOption) (P4WNP1_EventListenClient, error) {
srv, err := c.client.NewClientStream(ctx, false, true, "EventListen", opts...)
if err != nil {
return nil, err
}
err = srv.SendMsg(in.Marshal())
if err != nil {
return nil, err
}
return &p4WNP1EventListenClient{srv}, nil
}
type P4WNP1_EventListenClient interface {
Recv() (*Event, error)
grpcweb.ClientStream
}
type p4WNP1EventListenClient struct {
grpcweb.ClientStream
}
func (x *p4WNP1EventListenClient) Recv() (*Event, error) {
resp, err := x.RecvMsg()
if err != nil {
return nil, err
}
return new(Event).Unmarshal(resp)
}
func (c *p4WNP1Client) EchoRequest(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*StringMessage, error) {
resp, err := c.client.RPCCall(ctx, "EchoRequest", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessage).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployWiFiSettings(ctx context.Context, in *WiFiSettings, opts ...grpcweb.CallOption) (*WiFiState, error) {
resp, err := c.client.RPCCall(ctx, "DeployWiFiSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(WiFiState).Unmarshal(resp)
}
func (c *p4WNP1Client) GetWiFiState(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*WiFiState, error) {
resp, err := c.client.RPCCall(ctx, "GetWiFiState", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(WiFiState).Unmarshal(resp)
}
func (c *p4WNP1Client) ListenWiFiStateChanges(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*WiFiState, error) {
resp, err := c.client.RPCCall(ctx, "ListenWiFiStateChanges", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(WiFiState).Unmarshal(resp)
}
func (c *p4WNP1Client) StoreWifiSettings(ctx context.Context, in *WifiRequestSettingsStorage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "StoreWifiSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) GetStoredWifiSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*WiFiSettings, error) {
resp, err := c.client.RPCCall(ctx, "GetStoredWifiSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(WiFiSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployStoredWifiSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*WiFiState, error) {
resp, err := c.client.RPCCall(ctx, "DeployStoredWifiSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(WiFiState).Unmarshal(resp)
}
func (c *p4WNP1Client) DeleteStoredWifiSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "DeleteStoredWifiSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) StoreDeployedWifiSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "StoreDeployedWifiSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) ListStoredWifiSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error) {
resp, err := c.client.RPCCall(ctx, "ListStoredWifiSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessageArray).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployEthernetInterfaceSettings(ctx context.Context, in *EthernetInterfaceSettings, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "DeployEthernetInterfaceSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) GetAllDeployedEthernetInterfaceSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*DeployedEthernetInterfaceSettings, error) {
resp, err := c.client.RPCCall(ctx, "GetAllDeployedEthernetInterfaceSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(DeployedEthernetInterfaceSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) GetDeployedEthernetInterfaceSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*EthernetInterfaceSettings, error) {
resp, err := c.client.RPCCall(ctx, "GetDeployedEthernetInterfaceSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(EthernetInterfaceSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) StoreEthernetInterfaceSettings(ctx context.Context, in *EthernetRequestSettingsStorage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "StoreEthernetInterfaceSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) GetStoredEthernetInterfaceSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*EthernetInterfaceSettings, error) {
resp, err := c.client.RPCCall(ctx, "GetStoredEthernetInterfaceSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(EthernetInterfaceSettings).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployStoredEthernetInterfaceSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "DeployStoredEthernetInterfaceSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) DeleteStoredEthernetInterfaceSettings(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "DeleteStoredEthernetInterfaceSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) ListStoredEthernetInterfaceSettings(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error) {
resp, err := c.client.RPCCall(ctx, "ListStoredEthernetInterfaceSettings", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessageArray).Unmarshal(resp)
}
func (c *p4WNP1Client) GetDeployedTriggerActionSet(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*TriggerActionSet, error) {
resp, err := c.client.RPCCall(ctx, "GetDeployedTriggerActionSet", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(TriggerActionSet).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployTriggerActionSetReplace(ctx context.Context, in *TriggerActionSet, opts ...grpcweb.CallOption) (*TriggerActionSet, error) {
resp, err := c.client.RPCCall(ctx, "DeployTriggerActionSetReplace", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(TriggerActionSet).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployTriggerActionSetAdd(ctx context.Context, in *TriggerActionSet, opts ...grpcweb.CallOption) (*TriggerActionSet, error) {
resp, err := c.client.RPCCall(ctx, "DeployTriggerActionSetAdd", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(TriggerActionSet).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployTriggerActionSetRemove(ctx context.Context, in *TriggerActionSet, opts ...grpcweb.CallOption) (*TriggerActionSet, error) {
resp, err := c.client.RPCCall(ctx, "DeployTriggerActionSetRemove", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(TriggerActionSet).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployTriggerActionSetUpdate(ctx context.Context, in *TriggerActionSet, opts ...grpcweb.CallOption) (*TriggerActionSet, error) {
resp, err := c.client.RPCCall(ctx, "DeployTriggerActionSetUpdate", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(TriggerActionSet).Unmarshal(resp)
}
func (c *p4WNP1Client) ListStoredTriggerActionSets(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error) {
resp, err := c.client.RPCCall(ctx, "ListStoredTriggerActionSets", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessageArray).Unmarshal(resp)
}
func (c *p4WNP1Client) StoreTriggerActionSet(ctx context.Context, in *TriggerActionSet, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "StoreTriggerActionSet", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployStoredTriggerActionSetReplace(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*TriggerActionSet, error) {
resp, err := c.client.RPCCall(ctx, "DeployStoredTriggerActionSetReplace", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(TriggerActionSet).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployStoredTriggerActionSetAdd(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*TriggerActionSet, error) {
resp, err := c.client.RPCCall(ctx, "DeployStoredTriggerActionSetAdd", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(TriggerActionSet).Unmarshal(resp)
}
func (c *p4WNP1Client) DeleteStoredTriggerActionSet(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "DeleteStoredTriggerActionSet", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) WaitTriggerGroupReceive(ctx context.Context, in *TriggerGroupReceive, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "WaitTriggerGroupReceive", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) FireActionGroupSend(ctx context.Context, in *ActionGroupSend, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "FireActionGroupSend", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployMasterTemplate(ctx context.Context, in *MasterTemplate, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "DeployMasterTemplate", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) StoreMasterTemplate(ctx context.Context, in *RequestMasterTemplateStorage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "StoreMasterTemplate", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) GetStoredMasterTemplate(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*MasterTemplate, error) {
resp, err := c.client.RPCCall(ctx, "GetStoredMasterTemplate", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(MasterTemplate).Unmarshal(resp)
}
func (c *p4WNP1Client) DeployStoredMasterTemplate(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*MasterTemplate, error) {
resp, err := c.client.RPCCall(ctx, "DeployStoredMasterTemplate", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(MasterTemplate).Unmarshal(resp)
}
func (c *p4WNP1Client) DeleteStoredMasterTemplate(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "DeleteStoredMasterTemplate", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) ListStoredMasterTemplate(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error) {
resp, err := c.client.RPCCall(ctx, "ListStoredMasterTemplate", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessageArray).Unmarshal(resp)
}
func (c *p4WNP1Client) GetStartupMasterTemplate(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessage, error) {
resp, err := c.client.RPCCall(ctx, "GetStartupMasterTemplate", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessage).Unmarshal(resp)
}
func (c *p4WNP1Client) SetStartupMasterTemplate(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "SetStartupMasterTemplate", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) DBBackup(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "DBBackup", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) DBRestore(ctx context.Context, in *StringMessage, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "DBRestore", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) ListStoredHIDScripts(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error) {
resp, err := c.client.RPCCall(ctx, "ListStoredHIDScripts", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessageArray).Unmarshal(resp)
}
func (c *p4WNP1Client) ListStoredBashScripts(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error) {
resp, err := c.client.RPCCall(ctx, "ListStoredBashScripts", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessageArray).Unmarshal(resp)
}
func (c *p4WNP1Client) ListStoredDBBackups(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error) {
resp, err := c.client.RPCCall(ctx, "ListStoredDBBackups", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessageArray).Unmarshal(resp)
}
func (c *p4WNP1Client) GetAvailableGpios(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*StringMessageArray, error) {
resp, err := c.client.RPCCall(ctx, "GetAvailableGpios", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(StringMessageArray).Unmarshal(resp)
}
func (c *p4WNP1Client) Shutdown(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "Shutdown", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}
func (c *p4WNP1Client) Reboot(ctx context.Context, in *Empty, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "Reboot", in.Marshal(), opts...)
if err != nil {
return nil, err
}
return new(Empty).Unmarshal(resp)
}