Debian Codegraph @

envoy/extensions/watchdog/profile_action/v3/profile_action_vtproto.pb.go

raw symbols SCIP
1 //go:build vtprotobuf
2 // +build vtprotobuf
3
4 // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
5 // source: envoy/extensions/watchdog/profile_action/v3/profile_action.proto
6
7 package profile_actionv3
8
9 import (
10 protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
11 durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
12 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
13 )
14
15 const (
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
21
22 func (m *ProfileActionConfig) MarshalVTStrict() (dAtA []byte, err error) {
23 if m == nil {
24 return nil, nil
25 }
26 size := m.SizeVT()
27 dAtA = make([]byte, size)
28 n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
29 if err != nil {
30 return nil, err
31 }
32 return dAtA[:n], nil
33 }
34
35 func (m *ProfileActionConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
36 size := m.SizeVT()
37 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
38 }
39
40 func (m *ProfileActionConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
41 if m == nil {
42 return 0, nil
43 }
44 i := len(dAtA)
45 _ = i
46 var l int
47 _ = l
48 if m.unknownFields != nil {
49 i -= len(m.unknownFields)
50 copy(dAtA[i:], m.unknownFields)
51 }
52 if m.MaxProfiles != 0 {
53 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MaxProfiles))
54 i--
55 dAtA[i] = 0x18
56 }
57 if len(m.ProfilePath) > 0 {
58 i -= len(m.ProfilePath)
59 copy(dAtA[i:], m.ProfilePath)
60 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProfilePath)))
61 i--
62 dAtA[i] = 0x12
63 }
64 if m.ProfileDuration != nil {
65 size, err := (*durationpb.Duration)(m.ProfileDuration).MarshalToSizedBufferVTStrict(dAtA[:i])
66 if err != nil {
67 return 0, err
68 }
69 i -= size
70 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
71 i--
72 dAtA[i] = 0xa
73 }
74 return len(dAtA) - i, nil
75 }
76
77 func (m *ProfileActionConfig) SizeVT() (n int) {
78 if m == nil {
79 return 0
80 }
81 var l int
82 _ = l
83 if m.ProfileDuration != nil {
84 l = (*durationpb.Duration)(m.ProfileDuration).SizeVT()
85 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
86 }
87 l = len(m.ProfilePath)
88 if l > 0 {
89 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
90 }
91 if m.MaxProfiles != 0 {
92 n += 1 + protohelpers.SizeOfVarint(uint64(m.MaxProfiles))
93 }
94 n += len(m.unknownFields)
95 return n
96 }