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

339 lines
11 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: ha/v1/light.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)
)
// optional fields require protobuf 3.15+ / buf >= 1.0. They generate
// pointer fields in Go with Has*() accessor methods. This is intentional —
// it lets the gateway distinguish "brightness not set" from "brightness = 0".
type TurnOnRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
BrightnessPct *uint32 `protobuf:"varint,2,opt,name=brightness_pct,json=brightnessPct,proto3,oneof" json:"brightness_pct,omitempty"` // 0100
ColorTempKelvin *uint32 `protobuf:"varint,3,opt,name=color_temp_kelvin,json=colorTempKelvin,proto3,oneof" json:"color_temp_kelvin,omitempty"` // e.g. 27006500
RgbColor *RGBColor `protobuf:"bytes,4,opt,name=rgb_color,json=rgbColor,proto3,oneof" json:"rgb_color,omitempty"` // ignored if color_temp_kelvin set
Transition *uint32 `protobuf:"varint,5,opt,name=transition,proto3,oneof" json:"transition,omitempty"` // seconds
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TurnOnRequest) Reset() {
*x = TurnOnRequest{}
mi := &file_ha_v1_light_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TurnOnRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TurnOnRequest) ProtoMessage() {}
func (x *TurnOnRequest) ProtoReflect() protoreflect.Message {
mi := &file_ha_v1_light_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 TurnOnRequest.ProtoReflect.Descriptor instead.
func (*TurnOnRequest) Descriptor() ([]byte, []int) {
return file_ha_v1_light_proto_rawDescGZIP(), []int{0}
}
func (x *TurnOnRequest) GetEntityId() string {
if x != nil {
return x.EntityId
}
return ""
}
func (x *TurnOnRequest) GetBrightnessPct() uint32 {
if x != nil && x.BrightnessPct != nil {
return *x.BrightnessPct
}
return 0
}
func (x *TurnOnRequest) GetColorTempKelvin() uint32 {
if x != nil && x.ColorTempKelvin != nil {
return *x.ColorTempKelvin
}
return 0
}
func (x *TurnOnRequest) GetRgbColor() *RGBColor {
if x != nil {
return x.RgbColor
}
return nil
}
func (x *TurnOnRequest) GetTransition() uint32 {
if x != nil && x.Transition != nil {
return *x.Transition
}
return 0
}
type TurnOffRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
Transition *uint32 `protobuf:"varint,2,opt,name=transition,proto3,oneof" json:"transition,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TurnOffRequest) Reset() {
*x = TurnOffRequest{}
mi := &file_ha_v1_light_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TurnOffRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TurnOffRequest) ProtoMessage() {}
func (x *TurnOffRequest) ProtoReflect() protoreflect.Message {
mi := &file_ha_v1_light_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 TurnOffRequest.ProtoReflect.Descriptor instead.
func (*TurnOffRequest) Descriptor() ([]byte, []int) {
return file_ha_v1_light_proto_rawDescGZIP(), []int{1}
}
func (x *TurnOffRequest) GetEntityId() string {
if x != nil {
return x.EntityId
}
return ""
}
func (x *TurnOffRequest) GetTransition() uint32 {
if x != nil && x.Transition != nil {
return *x.Transition
}
return 0
}
type ToggleRequest 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 *ToggleRequest) Reset() {
*x = ToggleRequest{}
mi := &file_ha_v1_light_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ToggleRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ToggleRequest) ProtoMessage() {}
func (x *ToggleRequest) ProtoReflect() protoreflect.Message {
mi := &file_ha_v1_light_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 ToggleRequest.ProtoReflect.Descriptor instead.
func (*ToggleRequest) Descriptor() ([]byte, []int) {
return file_ha_v1_light_proto_rawDescGZIP(), []int{2}
}
func (x *ToggleRequest) GetEntityId() string {
if x != nil {
return x.EntityId
}
return ""
}
type LightResponse 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 *LightResponse) Reset() {
*x = LightResponse{}
mi := &file_ha_v1_light_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LightResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LightResponse) ProtoMessage() {}
func (x *LightResponse) ProtoReflect() protoreflect.Message {
mi := &file_ha_v1_light_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 LightResponse.ProtoReflect.Descriptor instead.
func (*LightResponse) Descriptor() ([]byte, []int) {
return file_ha_v1_light_proto_rawDescGZIP(), []int{3}
}
func (x *LightResponse) GetState() *EntityState {
if x != nil {
return x.State
}
return nil
}
var File_ha_v1_light_proto protoreflect.FileDescriptor
const file_ha_v1_light_proto_rawDesc = "" +
"\n" +
"\x11ha/v1/light.proto\x12\x05ha.v1\x1a\x12ha/v1/common.proto\"\xa7\x02\n" +
"\rTurnOnRequest\x12\x1b\n" +
"\tentity_id\x18\x01 \x01(\tR\bentityId\x12*\n" +
"\x0ebrightness_pct\x18\x02 \x01(\rH\x00R\rbrightnessPct\x88\x01\x01\x12/\n" +
"\x11color_temp_kelvin\x18\x03 \x01(\rH\x01R\x0fcolorTempKelvin\x88\x01\x01\x121\n" +
"\trgb_color\x18\x04 \x01(\v2\x0f.ha.v1.RGBColorH\x02R\brgbColor\x88\x01\x01\x12#\n" +
"\n" +
"transition\x18\x05 \x01(\rH\x03R\n" +
"transition\x88\x01\x01B\x11\n" +
"\x0f_brightness_pctB\x14\n" +
"\x12_color_temp_kelvinB\f\n" +
"\n" +
"_rgb_colorB\r\n" +
"\v_transition\"a\n" +
"\x0eTurnOffRequest\x12\x1b\n" +
"\tentity_id\x18\x01 \x01(\tR\bentityId\x12#\n" +
"\n" +
"transition\x18\x02 \x01(\rH\x00R\n" +
"transition\x88\x01\x01B\r\n" +
"\v_transition\",\n" +
"\rToggleRequest\x12\x1b\n" +
"\tentity_id\x18\x01 \x01(\tR\bentityId\"9\n" +
"\rLightResponse\x12(\n" +
"\x05state\x18\x01 \x01(\v2\x12.ha.v1.EntityStateR\x05state2\xb2\x01\n" +
"\fLightService\x124\n" +
"\x06TurnOn\x12\x14.ha.v1.TurnOnRequest\x1a\x14.ha.v1.LightResponse\x126\n" +
"\aTurnOff\x12\x15.ha.v1.TurnOffRequest\x1a\x14.ha.v1.LightResponse\x124\n" +
"\x06Toggle\x12\x14.ha.v1.ToggleRequest\x1a\x14.ha.v1.LightResponseB4Z2gitea.nik4nao.com/nik/home-services/gen/ha/v1;hav1b\x06proto3"
var (
file_ha_v1_light_proto_rawDescOnce sync.Once
file_ha_v1_light_proto_rawDescData []byte
)
func file_ha_v1_light_proto_rawDescGZIP() []byte {
file_ha_v1_light_proto_rawDescOnce.Do(func() {
file_ha_v1_light_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ha_v1_light_proto_rawDesc), len(file_ha_v1_light_proto_rawDesc)))
})
return file_ha_v1_light_proto_rawDescData
}
var file_ha_v1_light_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_ha_v1_light_proto_goTypes = []any{
(*TurnOnRequest)(nil), // 0: ha.v1.TurnOnRequest
(*TurnOffRequest)(nil), // 1: ha.v1.TurnOffRequest
(*ToggleRequest)(nil), // 2: ha.v1.ToggleRequest
(*LightResponse)(nil), // 3: ha.v1.LightResponse
(*RGBColor)(nil), // 4: ha.v1.RGBColor
(*EntityState)(nil), // 5: ha.v1.EntityState
}
var file_ha_v1_light_proto_depIdxs = []int32{
4, // 0: ha.v1.TurnOnRequest.rgb_color:type_name -> ha.v1.RGBColor
5, // 1: ha.v1.LightResponse.state:type_name -> ha.v1.EntityState
0, // 2: ha.v1.LightService.TurnOn:input_type -> ha.v1.TurnOnRequest
1, // 3: ha.v1.LightService.TurnOff:input_type -> ha.v1.TurnOffRequest
2, // 4: ha.v1.LightService.Toggle:input_type -> ha.v1.ToggleRequest
3, // 5: ha.v1.LightService.TurnOn:output_type -> ha.v1.LightResponse
3, // 6: ha.v1.LightService.TurnOff:output_type -> ha.v1.LightResponse
3, // 7: ha.v1.LightService.Toggle:output_type -> ha.v1.LightResponse
5, // [5:8] is the sub-list for method output_type
2, // [2:5] 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_light_proto_init() }
func file_ha_v1_light_proto_init() {
if File_ha_v1_light_proto != nil {
return
}
file_ha_v1_common_proto_init()
file_ha_v1_light_proto_msgTypes[0].OneofWrappers = []any{}
file_ha_v1_light_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_light_proto_rawDesc), len(file_ha_v1_light_proto_rawDesc)),
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_ha_v1_light_proto_goTypes,
DependencyIndexes: file_ha_v1_light_proto_depIdxs,
MessageInfos: file_ha_v1_light_proto_msgTypes,
}.Build()
File_ha_v1_light_proto = out.File
file_ha_v1_light_proto_goTypes = nil
file_ha_v1_light_proto_depIdxs = nil
}