1// Control commands. Request-level version fields stay at this staged
2// revision; P4.1 removes them once the preamble owns compatibility.
3
4// Code generated by protoc-gen-go. DO NOT EDIT.
5// versions:
6// protoc-gen-go v1.36.12
7// protoc (unknown)
8// source: command.proto
9
10package wire
11
12import (
13 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
14 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
15 reflect "reflect"
16 sync "sync"
17 unsafe "unsafe"
18)
19
20const (
21 // Verify that this generated code is sufficiently up-to-date.
22 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
23 // Verify that runtime/protoimpl is sufficiently up-to-date.
24 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
25)
26
27// CommandOutcome is the closed terminal state of a command request.
28type CommandOutcome int32
29
30const (
31 CommandOutcome_COMMAND_OUTCOME_UNSPECIFIED CommandOutcome = 0
32 CommandOutcome_COMMAND_OUTCOME_SUCCEEDED CommandOutcome = 1
33 CommandOutcome_COMMAND_OUTCOME_FAILED CommandOutcome = 2
34 CommandOutcome_COMMAND_OUTCOME_UNKNOWN CommandOutcome = 3
35)
36
37// Enum value maps for CommandOutcome.
38var (
39 CommandOutcome_name = map[int32]string{
40 0: "COMMAND_OUTCOME_UNSPECIFIED",
41 1: "COMMAND_OUTCOME_SUCCEEDED",
42 2: "COMMAND_OUTCOME_FAILED",
43 3: "COMMAND_OUTCOME_UNKNOWN",
44 }
45 CommandOutcome_value = map[string]int32{
46 "COMMAND_OUTCOME_UNSPECIFIED": 0,
47 "COMMAND_OUTCOME_SUCCEEDED": 1,
48 "COMMAND_OUTCOME_FAILED": 2,
49 "COMMAND_OUTCOME_UNKNOWN": 3,
50 }
51)
52
53func (x CommandOutcome) Enum() *CommandOutcome {
54 p := new(CommandOutcome)
55 *p = x
56 return p
57}
58
59func (x CommandOutcome) String() string {
60 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
61}
62
63func (CommandOutcome) Descriptor() protoreflect.EnumDescriptor {
64 return file_command_proto_enumTypes[0].Descriptor()
65}
66
67func (CommandOutcome) Type() protoreflect.EnumType {
68 return &file_command_proto_enumTypes[0]
69}
70
71func (x CommandOutcome) Number() protoreflect.EnumNumber {
72 return protoreflect.EnumNumber(x)
73}
74
75// Deprecated: Use CommandOutcome.Descriptor instead.
76func (CommandOutcome) EnumDescriptor() ([]byte, []int) {
77 return file_command_proto_rawDescGZIP(), []int{0}
78}
79
80// CommandRequest asks the daemon to run one control command.
81type CommandRequest struct {
82 state protoimpl.MessageState `protogen:"open.v1"`
83 Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
84 RequestId uint64 `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
85 Attached bool `protobuf:"varint,3,opt,name=attached,proto3" json:"attached,omitempty"`
86 Self bool `protobuf:"varint,4,opt,name=self,proto3" json:"self,omitempty"`
87 Slug string `protobuf:"bytes,5,opt,name=slug,proto3" json:"slug,omitempty"`
88 Args []string `protobuf:"bytes,6,rep,name=args,proto3" json:"args,omitempty"`
89 TargetSession string `protobuf:"bytes,7,opt,name=target_session,json=targetSession,proto3" json:"target_session,omitempty"`
90 TargetTab string `protobuf:"bytes,8,opt,name=target_tab,json=targetTab,proto3" json:"target_tab,omitempty"`
91 TargetPane string `protobuf:"bytes,9,opt,name=target_pane,json=targetPane,proto3" json:"target_pane,omitempty"`
92 Json bool `protobuf:"varint,10,opt,name=json,proto3" json:"json,omitempty"`
93 unknownFields protoimpl.UnknownFields
94 sizeCache protoimpl.SizeCache
95}
96
97func (x *CommandRequest) Reset() {
98 *x = CommandRequest{}
99 mi := &file_command_proto_msgTypes[0]
100 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
101 ms.StoreMessageInfo(mi)
102}
103
104func (x *CommandRequest) String() string {
105 return protoimpl.X.MessageStringOf(x)
106}
107
108func (*CommandRequest) ProtoMessage() {}
109
110func (x *CommandRequest) ProtoReflect() protoreflect.Message {
111 mi := &file_command_proto_msgTypes[0]
112 if x != nil {
113 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
114 if ms.LoadMessageInfo() == nil {
115 ms.StoreMessageInfo(mi)
116 }
117 return ms
118 }
119 return mi.MessageOf(x)
120}
121
122// Deprecated: Use CommandRequest.ProtoReflect.Descriptor instead.
123func (*CommandRequest) Descriptor() ([]byte, []int) {
124 return file_command_proto_rawDescGZIP(), []int{0}
125}
126
127func (x *CommandRequest) GetVersion() uint32 {
128 if x != nil {
129 return x.Version
130 }
131 return 0
132}
133
134func (x *CommandRequest) GetRequestId() uint64 {
135 if x != nil {
136 return x.RequestId
137 }
138 return 0
139}
140
141func (x *CommandRequest) GetAttached() bool {
142 if x != nil {
143 return x.Attached
144 }
145 return false
146}
147
148func (x *CommandRequest) GetSelf() bool {
149 if x != nil {
150 return x.Self
151 }
152 return false
153}
154
155func (x *CommandRequest) GetSlug() string {
156 if x != nil {
157 return x.Slug
158 }
159 return ""
160}
161
162func (x *CommandRequest) GetArgs() []string {
163 if x != nil {
164 return x.Args
165 }
166 return nil
167}
168
169func (x *CommandRequest) GetTargetSession() string {
170 if x != nil {
171 return x.TargetSession
172 }
173 return ""
174}
175
176func (x *CommandRequest) GetTargetTab() string {
177 if x != nil {
178 return x.TargetTab
179 }
180 return ""
181}
182
183func (x *CommandRequest) GetTargetPane() string {
184 if x != nil {
185 return x.TargetPane
186 }
187 return ""
188}
189
190func (x *CommandRequest) GetJson() bool {
191 if x != nil {
192 return x.Json
193 }
194 return false
195}
196
197// CommandResult reports a control command's explicit terminal outcome.
198type CommandResult struct {
199 state protoimpl.MessageState `protogen:"open.v1"`
200 RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
201 Code uint32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"`
202 Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"`
203 Output string `protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"`
204 Outcome CommandOutcome `protobuf:"varint,6,opt,name=outcome,proto3,enum=vev.wire.v1.CommandOutcome" json:"outcome,omitempty"`
205 unknownFields protoimpl.UnknownFields
206 sizeCache protoimpl.SizeCache
207}
208
209func (x *CommandResult) Reset() {
210 *x = CommandResult{}
211 mi := &file_command_proto_msgTypes[1]
212 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
213 ms.StoreMessageInfo(mi)
214}
215
216func (x *CommandResult) String() string {
217 return protoimpl.X.MessageStringOf(x)
218}
219
220func (*CommandResult) ProtoMessage() {}
221
222func (x *CommandResult) ProtoReflect() protoreflect.Message {
223 mi := &file_command_proto_msgTypes[1]
224 if x != nil {
225 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
226 if ms.LoadMessageInfo() == nil {
227 ms.StoreMessageInfo(mi)
228 }
229 return ms
230 }
231 return mi.MessageOf(x)
232}
233
234// Deprecated: Use CommandResult.ProtoReflect.Descriptor instead.
235func (*CommandResult) Descriptor() ([]byte, []int) {
236 return file_command_proto_rawDescGZIP(), []int{1}
237}
238
239func (x *CommandResult) GetRequestId() uint64 {
240 if x != nil {
241 return x.RequestId
242 }
243 return 0
244}
245
246func (x *CommandResult) GetCode() uint32 {
247 if x != nil {
248 return x.Code
249 }
250 return 0
251}
252
253func (x *CommandResult) GetText() string {
254 if x != nil {
255 return x.Text
256 }
257 return ""
258}
259
260func (x *CommandResult) GetOutput() string {
261 if x != nil {
262 return x.Output
263 }
264 return ""
265}
266
267func (x *CommandResult) GetOutcome() CommandOutcome {
268 if x != nil {
269 return x.Outcome
270 }
271 return CommandOutcome_COMMAND_OUTCOME_UNSPECIFIED
272}
273
274var File_command_proto protoreflect.FileDescriptor
275
276const file_command_proto_rawDesc = "" +
277 "\n" +
278 "\rcommand.proto\x12\vvev.wire.v1\"\x9c\x02\n" +
279 "\x0eCommandRequest\x12\x18\n" +
280 "\aversion\x18\x01 \x01(\rR\aversion\x12\x1d\n" +
281 "\n" +
282 "request_id\x18\x02 \x01(\x04R\trequestId\x12\x1a\n" +
283 "\battached\x18\x03 \x01(\bR\battached\x12\x12\n" +
284 "\x04self\x18\x04 \x01(\bR\x04self\x12\x12\n" +
285 "\x04slug\x18\x05 \x01(\tR\x04slug\x12\x12\n" +
286 "\x04args\x18\x06 \x03(\tR\x04args\x12%\n" +
287 "\x0etarget_session\x18\a \x01(\tR\rtargetSession\x12\x1d\n" +
288 "\n" +
289 "target_tab\x18\b \x01(\tR\ttargetTab\x12\x1f\n" +
290 "\vtarget_pane\x18\t \x01(\tR\n" +
291 "targetPane\x12\x12\n" +
292 "\x04json\x18\n" +
293 " \x01(\bR\x04json\"\xaf\x01\n" +
294 "\rCommandResult\x12\x1d\n" +
295 "\n" +
296 "request_id\x18\x01 \x01(\x04R\trequestId\x12\x12\n" +
297 "\x04code\x18\x03 \x01(\rR\x04code\x12\x12\n" +
298 "\x04text\x18\x04 \x01(\tR\x04text\x12\x16\n" +
299 "\x06output\x18\x05 \x01(\tR\x06output\x125\n" +
300 "\aoutcome\x18\x06 \x01(\x0e2\x1b.vev.wire.v1.CommandOutcomeR\aoutcomeJ\x04\b\x02\x10\x03R\x02ok*\x89\x01\n" +
301 "\x0eCommandOutcome\x12\x1f\n" +
302 "\x1bCOMMAND_OUTCOME_UNSPECIFIED\x10\x00\x12\x1d\n" +
303 "\x19COMMAND_OUTCOME_SUCCEEDED\x10\x01\x12\x1a\n" +
304 "\x16COMMAND_OUTCOME_FAILED\x10\x02\x12\x1b\n" +
305 "\x17COMMAND_OUTCOME_UNKNOWN\x10\x03B-Z+github.com/bnema/vev/internal/protocol/wireb\x06proto3"
306
307var (
308 file_command_proto_rawDescOnce sync.Once
309 file_command_proto_rawDescData []byte
310)
311
312func file_command_proto_rawDescGZIP() []byte {
313 file_command_proto_rawDescOnce.Do(func() {
314 file_command_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_command_proto_rawDesc), len(file_command_proto_rawDesc)))
315 })
316 return file_command_proto_rawDescData
317}
318
319var file_command_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
320var file_command_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
321var file_command_proto_goTypes = []any{
322 (CommandOutcome)(0), // 0: vev.wire.v1.CommandOutcome
323 (*CommandRequest)(nil), // 1: vev.wire.v1.CommandRequest
324 (*CommandResult)(nil), // 2: vev.wire.v1.CommandResult
325}
326var file_command_proto_depIdxs = []int32{
327 0, // 0: vev.wire.v1.CommandResult.outcome:type_name -> vev.wire.v1.CommandOutcome
328 1, // [1:1] is the sub-list for method output_type
329 1, // [1:1] is the sub-list for method input_type
330 1, // [1:1] is the sub-list for extension type_name
331 1, // [1:1] is the sub-list for extension extendee
332 0, // [0:1] is the sub-list for field type_name
333}
334
335func init() { file_command_proto_init() }
336func file_command_proto_init() {
337 if File_command_proto != nil {
338 return
339 }
340 type x struct{}
341 out := protoimpl.TypeBuilder{
342 File: protoimpl.DescBuilder{
343 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
344 RawDescriptor: unsafe.Slice(unsafe.StringData(file_command_proto_rawDesc), len(file_command_proto_rawDesc)),
345 NumEnums: 1,
346 NumMessages: 2,
347 NumExtensions: 0,
348 NumServices: 0,
349 },
350 GoTypes: file_command_proto_goTypes,
351 DependencyIndexes: file_command_proto_depIdxs,
352 EnumInfos: file_command_proto_enumTypes,
353 MessageInfos: file_command_proto_msgTypes,
354 }.Build()
355 File_command_proto = out.File
356 file_command_proto_goTypes = nil
357 file_command_proto_depIdxs = nil
358}