generated from rmcguire/go-server-with-otel
475 lines
16 KiB
Go
475 lines
16 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc (unknown)
|
|
// source: econet/v1alpha1/econet.proto
|
|
|
|
package v1alpha1
|
|
|
|
import (
|
|
_ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// Device is the live state of a single Rheem EcoNet device
|
|
// (typically a water heater) as reported by the Rheem cloud.
|
|
type Device struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
SerialNumber string `protobuf:"bytes,1,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
|
|
DeviceId string `protobuf:"bytes,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
|
|
FriendlyName string `protobuf:"bytes,3,opt,name=friendly_name,json=friendlyName,proto3" json:"friendly_name,omitempty"`
|
|
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // water_heater, thermostat, unknown
|
|
GenericType string `protobuf:"bytes,5,opt,name=generic_type,json=genericType,proto3" json:"generic_type,omitempty"` // e.g. heatpumpWaterHeater, gasWaterHeater
|
|
Connected bool `protobuf:"varint,6,opt,name=connected,proto3" json:"connected,omitempty"`
|
|
WifiSignal int32 `protobuf:"varint,7,opt,name=wifi_signal,json=wifiSignal,proto3" json:"wifi_signal,omitempty"` // dB, MQTT-only
|
|
Mode string `protobuf:"bytes,8,opt,name=mode,proto3" json:"mode,omitempty"` // kebab-case, e.g. heat-pump, energy-saving
|
|
Enabled bool `protobuf:"varint,9,opt,name=enabled,proto3" json:"enabled,omitempty"`
|
|
Running bool `protobuf:"varint,10,opt,name=running,proto3" json:"running,omitempty"`
|
|
RunningState string `protobuf:"bytes,11,opt,name=running_state,json=runningState,proto3" json:"running_state,omitempty"`
|
|
Setpoint int32 `protobuf:"varint,12,opt,name=setpoint,proto3" json:"setpoint,omitempty"` // degrees Fahrenheit
|
|
SetpointMin int32 `protobuf:"varint,13,opt,name=setpoint_min,json=setpointMin,proto3" json:"setpoint_min,omitempty"`
|
|
SetpointMax int32 `protobuf:"varint,14,opt,name=setpoint_max,json=setpointMax,proto3" json:"setpoint_max,omitempty"`
|
|
HotWaterAvailability int32 `protobuf:"varint,15,opt,name=hot_water_availability,json=hotWaterAvailability,proto3" json:"hot_water_availability,omitempty"` // 0/33/66/100, -1 unknown
|
|
AlertCount int32 `protobuf:"varint,16,opt,name=alert_count,json=alertCount,proto3" json:"alert_count,omitempty"`
|
|
Away bool `protobuf:"varint,17,opt,name=away,proto3" json:"away,omitempty"`
|
|
LastUpdated *timestamppb.Timestamp `protobuf:"bytes,18,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Device) Reset() {
|
|
*x = Device{}
|
|
mi := &file_econet_v1alpha1_econet_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Device) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Device) ProtoMessage() {}
|
|
|
|
func (x *Device) ProtoReflect() protoreflect.Message {
|
|
mi := &file_econet_v1alpha1_econet_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Device.ProtoReflect.Descriptor instead.
|
|
func (*Device) Descriptor() ([]byte, []int) {
|
|
return file_econet_v1alpha1_econet_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *Device) GetSerialNumber() string {
|
|
if x != nil {
|
|
return x.SerialNumber
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Device) GetDeviceId() string {
|
|
if x != nil {
|
|
return x.DeviceId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Device) GetFriendlyName() string {
|
|
if x != nil {
|
|
return x.FriendlyName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Device) GetType() string {
|
|
if x != nil {
|
|
return x.Type
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Device) GetGenericType() string {
|
|
if x != nil {
|
|
return x.GenericType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Device) GetConnected() bool {
|
|
if x != nil {
|
|
return x.Connected
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *Device) GetWifiSignal() int32 {
|
|
if x != nil {
|
|
return x.WifiSignal
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Device) GetMode() string {
|
|
if x != nil {
|
|
return x.Mode
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Device) GetEnabled() bool {
|
|
if x != nil {
|
|
return x.Enabled
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *Device) GetRunning() bool {
|
|
if x != nil {
|
|
return x.Running
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *Device) GetRunningState() string {
|
|
if x != nil {
|
|
return x.RunningState
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Device) GetSetpoint() int32 {
|
|
if x != nil {
|
|
return x.Setpoint
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Device) GetSetpointMin() int32 {
|
|
if x != nil {
|
|
return x.SetpointMin
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Device) GetSetpointMax() int32 {
|
|
if x != nil {
|
|
return x.SetpointMax
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Device) GetHotWaterAvailability() int32 {
|
|
if x != nil {
|
|
return x.HotWaterAvailability
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Device) GetAlertCount() int32 {
|
|
if x != nil {
|
|
return x.AlertCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Device) GetAway() bool {
|
|
if x != nil {
|
|
return x.Away
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *Device) GetLastUpdated() *timestamppb.Timestamp {
|
|
if x != nil {
|
|
return x.LastUpdated
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ListDevicesRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListDevicesRequest) Reset() {
|
|
*x = ListDevicesRequest{}
|
|
mi := &file_econet_v1alpha1_econet_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListDevicesRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListDevicesRequest) ProtoMessage() {}
|
|
|
|
func (x *ListDevicesRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_econet_v1alpha1_econet_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListDevicesRequest.ProtoReflect.Descriptor instead.
|
|
func (*ListDevicesRequest) Descriptor() ([]byte, []int) {
|
|
return file_econet_v1alpha1_econet_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
type ListDevicesResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Devices []*Device `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListDevicesResponse) Reset() {
|
|
*x = ListDevicesResponse{}
|
|
mi := &file_econet_v1alpha1_econet_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListDevicesResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListDevicesResponse) ProtoMessage() {}
|
|
|
|
func (x *ListDevicesResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_econet_v1alpha1_econet_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListDevicesResponse.ProtoReflect.Descriptor instead.
|
|
func (*ListDevicesResponse) Descriptor() ([]byte, []int) {
|
|
return file_econet_v1alpha1_econet_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *ListDevicesResponse) GetDevices() []*Device {
|
|
if x != nil {
|
|
return x.Devices
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type GetDeviceRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
SerialNumber string `protobuf:"bytes,1,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetDeviceRequest) Reset() {
|
|
*x = GetDeviceRequest{}
|
|
mi := &file_econet_v1alpha1_econet_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetDeviceRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetDeviceRequest) ProtoMessage() {}
|
|
|
|
func (x *GetDeviceRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_econet_v1alpha1_econet_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GetDeviceRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetDeviceRequest) Descriptor() ([]byte, []int) {
|
|
return file_econet_v1alpha1_econet_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *GetDeviceRequest) GetSerialNumber() string {
|
|
if x != nil {
|
|
return x.SerialNumber
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetDeviceResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Device *Device `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetDeviceResponse) Reset() {
|
|
*x = GetDeviceResponse{}
|
|
mi := &file_econet_v1alpha1_econet_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetDeviceResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetDeviceResponse) ProtoMessage() {}
|
|
|
|
func (x *GetDeviceResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_econet_v1alpha1_econet_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GetDeviceResponse.ProtoReflect.Descriptor instead.
|
|
func (*GetDeviceResponse) Descriptor() ([]byte, []int) {
|
|
return file_econet_v1alpha1_econet_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *GetDeviceResponse) GetDevice() *Device {
|
|
if x != nil {
|
|
return x.Device
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_econet_v1alpha1_econet_proto protoreflect.FileDescriptor
|
|
|
|
const file_econet_v1alpha1_econet_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x1ceconet/v1alpha1/econet.proto\x12\x0feconet.v1alpha1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xde\x04\n" +
|
|
"\x06Device\x12#\n" +
|
|
"\rserial_number\x18\x01 \x01(\tR\fserialNumber\x12\x1b\n" +
|
|
"\tdevice_id\x18\x02 \x01(\tR\bdeviceId\x12#\n" +
|
|
"\rfriendly_name\x18\x03 \x01(\tR\ffriendlyName\x12\x12\n" +
|
|
"\x04type\x18\x04 \x01(\tR\x04type\x12!\n" +
|
|
"\fgeneric_type\x18\x05 \x01(\tR\vgenericType\x12\x1c\n" +
|
|
"\tconnected\x18\x06 \x01(\bR\tconnected\x12\x1f\n" +
|
|
"\vwifi_signal\x18\a \x01(\x05R\n" +
|
|
"wifiSignal\x12\x12\n" +
|
|
"\x04mode\x18\b \x01(\tR\x04mode\x12\x18\n" +
|
|
"\aenabled\x18\t \x01(\bR\aenabled\x12\x18\n" +
|
|
"\arunning\x18\n" +
|
|
" \x01(\bR\arunning\x12#\n" +
|
|
"\rrunning_state\x18\v \x01(\tR\frunningState\x12\x1a\n" +
|
|
"\bsetpoint\x18\f \x01(\x05R\bsetpoint\x12!\n" +
|
|
"\fsetpoint_min\x18\r \x01(\x05R\vsetpointMin\x12!\n" +
|
|
"\fsetpoint_max\x18\x0e \x01(\x05R\vsetpointMax\x124\n" +
|
|
"\x16hot_water_availability\x18\x0f \x01(\x05R\x14hotWaterAvailability\x12\x1f\n" +
|
|
"\valert_count\x18\x10 \x01(\x05R\n" +
|
|
"alertCount\x12\x12\n" +
|
|
"\x04away\x18\x11 \x01(\bR\x04away\x12=\n" +
|
|
"\flast_updated\x18\x12 \x01(\v2\x1a.google.protobuf.TimestampR\vlastUpdated\"\x14\n" +
|
|
"\x12ListDevicesRequest\"H\n" +
|
|
"\x13ListDevicesResponse\x121\n" +
|
|
"\adevices\x18\x01 \x03(\v2\x17.econet.v1alpha1.DeviceR\adevices\"@\n" +
|
|
"\x10GetDeviceRequest\x12,\n" +
|
|
"\rserial_number\x18\x01 \x01(\tB\a\xbaH\x04r\x02\x10\x01R\fserialNumber\"D\n" +
|
|
"\x11GetDeviceResponse\x12/\n" +
|
|
"\x06device\x18\x01 \x01(\v2\x17.econet.v1alpha1.DeviceR\x06device2\x83\x02\n" +
|
|
"\rEconetService\x12s\n" +
|
|
"\vListDevices\x12#.econet.v1alpha1.ListDevicesRequest\x1a$.econet.v1alpha1.ListDevicesResponse\"\x19\x82\xd3\xe4\x93\x02\x13\x12\x11/v1alpha1/devices\x12}\n" +
|
|
"\tGetDevice\x12!.econet.v1alpha1.GetDeviceRequest\x1a\".econet.v1alpha1.GetDeviceResponse\")\x82\xd3\xe4\x93\x02#\x12!/v1alpha1/devices/{serial_number}B\xcb\x01\n" +
|
|
"\x13com.econet.v1alpha1B\vEconetProtoP\x01ZJgitea.libretechconsulting.com/rmcguire/econet-exporter/api/econet/v1alpha1\xa2\x02\x03EXX\xaa\x02\x0fEconet.V1alpha1\xca\x02\x0fEconet\\V1alpha1\xe2\x02\x1bEconet\\V1alpha1\\GPBMetadata\xea\x02\x10Econet::V1alpha1b\x06proto3"
|
|
|
|
var (
|
|
file_econet_v1alpha1_econet_proto_rawDescOnce sync.Once
|
|
file_econet_v1alpha1_econet_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_econet_v1alpha1_econet_proto_rawDescGZIP() []byte {
|
|
file_econet_v1alpha1_econet_proto_rawDescOnce.Do(func() {
|
|
file_econet_v1alpha1_econet_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_econet_v1alpha1_econet_proto_rawDesc), len(file_econet_v1alpha1_econet_proto_rawDesc)))
|
|
})
|
|
return file_econet_v1alpha1_econet_proto_rawDescData
|
|
}
|
|
|
|
var file_econet_v1alpha1_econet_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
|
var file_econet_v1alpha1_econet_proto_goTypes = []any{
|
|
(*Device)(nil), // 0: econet.v1alpha1.Device
|
|
(*ListDevicesRequest)(nil), // 1: econet.v1alpha1.ListDevicesRequest
|
|
(*ListDevicesResponse)(nil), // 2: econet.v1alpha1.ListDevicesResponse
|
|
(*GetDeviceRequest)(nil), // 3: econet.v1alpha1.GetDeviceRequest
|
|
(*GetDeviceResponse)(nil), // 4: econet.v1alpha1.GetDeviceResponse
|
|
(*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
|
|
}
|
|
var file_econet_v1alpha1_econet_proto_depIdxs = []int32{
|
|
5, // 0: econet.v1alpha1.Device.last_updated:type_name -> google.protobuf.Timestamp
|
|
0, // 1: econet.v1alpha1.ListDevicesResponse.devices:type_name -> econet.v1alpha1.Device
|
|
0, // 2: econet.v1alpha1.GetDeviceResponse.device:type_name -> econet.v1alpha1.Device
|
|
1, // 3: econet.v1alpha1.EconetService.ListDevices:input_type -> econet.v1alpha1.ListDevicesRequest
|
|
3, // 4: econet.v1alpha1.EconetService.GetDevice:input_type -> econet.v1alpha1.GetDeviceRequest
|
|
2, // 5: econet.v1alpha1.EconetService.ListDevices:output_type -> econet.v1alpha1.ListDevicesResponse
|
|
4, // 6: econet.v1alpha1.EconetService.GetDevice:output_type -> econet.v1alpha1.GetDeviceResponse
|
|
5, // [5:7] is the sub-list for method output_type
|
|
3, // [3:5] is the sub-list for method input_type
|
|
3, // [3:3] is the sub-list for extension type_name
|
|
3, // [3:3] is the sub-list for extension extendee
|
|
0, // [0:3] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_econet_v1alpha1_econet_proto_init() }
|
|
func file_econet_v1alpha1_econet_proto_init() {
|
|
if File_econet_v1alpha1_econet_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_econet_v1alpha1_econet_proto_rawDesc), len(file_econet_v1alpha1_econet_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 5,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_econet_v1alpha1_econet_proto_goTypes,
|
|
DependencyIndexes: file_econet_v1alpha1_econet_proto_depIdxs,
|
|
MessageInfos: file_econet_v1alpha1_econet_proto_msgTypes,
|
|
}.Build()
|
|
File_econet_v1alpha1_econet_proto = out.File
|
|
file_econet_v1alpha1_econet_proto_goTypes = nil
|
|
file_econet_v1alpha1_econet_proto_depIdxs = nil
|
|
}
|