home-services/gen/ha/v1/event.pb.go

219 lines
6.8 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: ha/v1/event.proto
package hav1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type SubscribeRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
EntityIds []string `protobuf:"bytes,1,rep,name=entity_ids,json=entityIds,proto3" json:"entity_ids,omitempty"`
Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SubscribeRequest) Reset() {
*x = SubscribeRequest{}
mi := &file_ha_v1_event_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SubscribeRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SubscribeRequest) ProtoMessage() {}
func (x *SubscribeRequest) ProtoReflect() protoreflect.Message {
mi := &file_ha_v1_event_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 SubscribeRequest.ProtoReflect.Descriptor instead.
func (*SubscribeRequest) Descriptor() ([]byte, []int) {
return file_ha_v1_event_proto_rawDescGZIP(), []int{0}
}
func (x *SubscribeRequest) GetEntityIds() []string {
if x != nil {
return x.EntityIds
}
return nil
}
func (x *SubscribeRequest) GetDomains() []string {
if x != nil {
return x.Domains
}
return nil
}
type StateChangeEvent struct {
state protoimpl.MessageState `protogen:"open.v1"`
EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
OldState *EntityState `protobuf:"bytes,2,opt,name=old_state,json=oldState,proto3,oneof" json:"old_state,omitempty"` // absent on first appearance
NewState *EntityState `protobuf:"bytes,3,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"`
EventTime string `protobuf:"bytes,4,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"` // RFC3339
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StateChangeEvent) Reset() {
*x = StateChangeEvent{}
mi := &file_ha_v1_event_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StateChangeEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StateChangeEvent) ProtoMessage() {}
func (x *StateChangeEvent) ProtoReflect() protoreflect.Message {
mi := &file_ha_v1_event_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 StateChangeEvent.ProtoReflect.Descriptor instead.
func (*StateChangeEvent) Descriptor() ([]byte, []int) {
return file_ha_v1_event_proto_rawDescGZIP(), []int{1}
}
func (x *StateChangeEvent) GetEntityId() string {
if x != nil {
return x.EntityId
}
return ""
}
func (x *StateChangeEvent) GetOldState() *EntityState {
if x != nil {
return x.OldState
}
return nil
}
func (x *StateChangeEvent) GetNewState() *EntityState {
if x != nil {
return x.NewState
}
return nil
}
func (x *StateChangeEvent) GetEventTime() string {
if x != nil {
return x.EventTime
}
return ""
}
var File_ha_v1_event_proto protoreflect.FileDescriptor
const file_ha_v1_event_proto_rawDesc = "" +
"\n" +
"\x11ha/v1/event.proto\x12\x05ha.v1\x1a\x12ha/v1/common.proto\"K\n" +
"\x10SubscribeRequest\x12\x1d\n" +
"\n" +
"entity_ids\x18\x01 \x03(\tR\tentityIds\x12\x18\n" +
"\adomains\x18\x02 \x03(\tR\adomains\"\xc3\x01\n" +
"\x10StateChangeEvent\x12\x1b\n" +
"\tentity_id\x18\x01 \x01(\tR\bentityId\x124\n" +
"\told_state\x18\x02 \x01(\v2\x12.ha.v1.EntityStateH\x00R\boldState\x88\x01\x01\x12/\n" +
"\tnew_state\x18\x03 \x01(\v2\x12.ha.v1.EntityStateR\bnewState\x12\x1d\n" +
"\n" +
"event_time\x18\x04 \x01(\tR\teventTimeB\f\n" +
"\n" +
"_old_state2O\n" +
"\fEventService\x12?\n" +
"\tSubscribe\x12\x17.ha.v1.SubscribeRequest\x1a\x17.ha.v1.StateChangeEvent0\x01B4Z2gitea.nik4nao.com/nik/home-services/gen/ha/v1;hav1b\x06proto3"
var (
file_ha_v1_event_proto_rawDescOnce sync.Once
file_ha_v1_event_proto_rawDescData []byte
)
func file_ha_v1_event_proto_rawDescGZIP() []byte {
file_ha_v1_event_proto_rawDescOnce.Do(func() {
file_ha_v1_event_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ha_v1_event_proto_rawDesc), len(file_ha_v1_event_proto_rawDesc)))
})
return file_ha_v1_event_proto_rawDescData
}
var file_ha_v1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_ha_v1_event_proto_goTypes = []any{
(*SubscribeRequest)(nil), // 0: ha.v1.SubscribeRequest
(*StateChangeEvent)(nil), // 1: ha.v1.StateChangeEvent
(*EntityState)(nil), // 2: ha.v1.EntityState
}
var file_ha_v1_event_proto_depIdxs = []int32{
2, // 0: ha.v1.StateChangeEvent.old_state:type_name -> ha.v1.EntityState
2, // 1: ha.v1.StateChangeEvent.new_state:type_name -> ha.v1.EntityState
0, // 2: ha.v1.EventService.Subscribe:input_type -> ha.v1.SubscribeRequest
1, // 3: ha.v1.EventService.Subscribe:output_type -> ha.v1.StateChangeEvent
3, // [3:4] is the sub-list for method output_type
2, // [2:3] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_ha_v1_event_proto_init() }
func file_ha_v1_event_proto_init() {
if File_ha_v1_event_proto != nil {
return
}
file_ha_v1_common_proto_init()
file_ha_v1_event_proto_msgTypes[1].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ha_v1_event_proto_rawDesc), len(file_ha_v1_event_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_ha_v1_event_proto_goTypes,
DependencyIndexes: file_ha_v1_event_proto_depIdxs,
MessageInfos: file_ha_v1_event_proto_msgTypes,
}.Build()
File_ha_v1_event_proto = out.File
file_ha_v1_event_proto_goTypes = nil
file_ha_v1_event_proto_depIdxs = nil
}