183 lines
5.8 KiB
Go
183 lines
5.8 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc (unknown)
|
|
// source: ha/v1/switch.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 SwitchRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SwitchRequest) Reset() {
|
|
*x = SwitchRequest{}
|
|
mi := &file_ha_v1_switch_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SwitchRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SwitchRequest) ProtoMessage() {}
|
|
|
|
func (x *SwitchRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ha_v1_switch_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 SwitchRequest.ProtoReflect.Descriptor instead.
|
|
func (*SwitchRequest) Descriptor() ([]byte, []int) {
|
|
return file_ha_v1_switch_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *SwitchRequest) GetEntityId() string {
|
|
if x != nil {
|
|
return x.EntityId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SwitchResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
State *EntityState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SwitchResponse) Reset() {
|
|
*x = SwitchResponse{}
|
|
mi := &file_ha_v1_switch_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SwitchResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SwitchResponse) ProtoMessage() {}
|
|
|
|
func (x *SwitchResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ha_v1_switch_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 SwitchResponse.ProtoReflect.Descriptor instead.
|
|
func (*SwitchResponse) Descriptor() ([]byte, []int) {
|
|
return file_ha_v1_switch_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *SwitchResponse) GetState() *EntityState {
|
|
if x != nil {
|
|
return x.State
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_ha_v1_switch_proto protoreflect.FileDescriptor
|
|
|
|
const file_ha_v1_switch_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x12ha/v1/switch.proto\x12\x05ha.v1\x1a\x12ha/v1/common.proto\",\n" +
|
|
"\rSwitchRequest\x12\x1b\n" +
|
|
"\tentity_id\x18\x01 \x01(\tR\bentityId\":\n" +
|
|
"\x0eSwitchResponse\x12(\n" +
|
|
"\x05state\x18\x01 \x01(\v2\x12.ha.v1.EntityStateR\x05state2\xb5\x01\n" +
|
|
"\rSwitchService\x125\n" +
|
|
"\x06TurnOn\x12\x14.ha.v1.SwitchRequest\x1a\x15.ha.v1.SwitchResponse\x126\n" +
|
|
"\aTurnOff\x12\x14.ha.v1.SwitchRequest\x1a\x15.ha.v1.SwitchResponse\x125\n" +
|
|
"\x06Toggle\x12\x14.ha.v1.SwitchRequest\x1a\x15.ha.v1.SwitchResponseB4Z2gitea.nik4nao.com/nik/home-services/gen/ha/v1;hav1b\x06proto3"
|
|
|
|
var (
|
|
file_ha_v1_switch_proto_rawDescOnce sync.Once
|
|
file_ha_v1_switch_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_ha_v1_switch_proto_rawDescGZIP() []byte {
|
|
file_ha_v1_switch_proto_rawDescOnce.Do(func() {
|
|
file_ha_v1_switch_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ha_v1_switch_proto_rawDesc), len(file_ha_v1_switch_proto_rawDesc)))
|
|
})
|
|
return file_ha_v1_switch_proto_rawDescData
|
|
}
|
|
|
|
var file_ha_v1_switch_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
var file_ha_v1_switch_proto_goTypes = []any{
|
|
(*SwitchRequest)(nil), // 0: ha.v1.SwitchRequest
|
|
(*SwitchResponse)(nil), // 1: ha.v1.SwitchResponse
|
|
(*EntityState)(nil), // 2: ha.v1.EntityState
|
|
}
|
|
var file_ha_v1_switch_proto_depIdxs = []int32{
|
|
2, // 0: ha.v1.SwitchResponse.state:type_name -> ha.v1.EntityState
|
|
0, // 1: ha.v1.SwitchService.TurnOn:input_type -> ha.v1.SwitchRequest
|
|
0, // 2: ha.v1.SwitchService.TurnOff:input_type -> ha.v1.SwitchRequest
|
|
0, // 3: ha.v1.SwitchService.Toggle:input_type -> ha.v1.SwitchRequest
|
|
1, // 4: ha.v1.SwitchService.TurnOn:output_type -> ha.v1.SwitchResponse
|
|
1, // 5: ha.v1.SwitchService.TurnOff:output_type -> ha.v1.SwitchResponse
|
|
1, // 6: ha.v1.SwitchService.Toggle:output_type -> ha.v1.SwitchResponse
|
|
4, // [4:7] is the sub-list for method output_type
|
|
1, // [1:4] is the sub-list for method input_type
|
|
1, // [1:1] is the sub-list for extension type_name
|
|
1, // [1:1] is the sub-list for extension extendee
|
|
0, // [0:1] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_ha_v1_switch_proto_init() }
|
|
func file_ha_v1_switch_proto_init() {
|
|
if File_ha_v1_switch_proto != nil {
|
|
return
|
|
}
|
|
file_ha_v1_common_proto_init()
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ha_v1_switch_proto_rawDesc), len(file_ha_v1_switch_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 2,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_ha_v1_switch_proto_goTypes,
|
|
DependencyIndexes: file_ha_v1_switch_proto_depIdxs,
|
|
MessageInfos: file_ha_v1_switch_proto_msgTypes,
|
|
}.Build()
|
|
File_ha_v1_switch_proto = out.File
|
|
file_ha_v1_switch_proto_goTypes = nil
|
|
file_ha_v1_switch_proto_depIdxs = nil
|
|
}
|