Debian Codegraph @

envoy/extensions/access_loggers/fluentd/v3/fluentd_vtproto.pb.go

raw
1 //go:build vtprotobuf
2 // +build vtprotobuf
3
4 // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
5 // source: envoy/extensions/access_loggers/fluentd/v3/fluentd.proto
6
7 package fluentdv3
8
9 import (
10 protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
11 durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
12 structpb "github.com/planetscale/vtprotobuf/types/known/structpb"
13 wrapperspb "github.com/planetscale/vtprotobuf/types/known/wrapperspb"
14 proto "google.golang.org/protobuf/proto"
15 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
16 )
17
18 const (
19 // Verify that this generated code is sufficiently up-to-date.
20 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
21 // Verify that runtime/protoimpl is sufficiently up-to-date.
22 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
23 )
24
25 func (m *FluentdAccessLogConfig_RetryOptions) MarshalVTStrict() (dAtA []byte, err error) {
26 if m == nil {
27 return nil, nil
28 }
29 size := m.SizeVT()
30 dAtA = make([]byte, size)
31 n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
32 if err != nil {
33 return nil, err
34 }
35 return dAtA[:n], nil
36 }
37
38 func (m *FluentdAccessLogConfig_RetryOptions) MarshalToVTStrict(dAtA []byte) (int, error) {
39 size := m.SizeVT()
40 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
41 }
42
43 func (m *FluentdAccessLogConfig_RetryOptions) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
44 if m == nil {
45 return 0, nil
46 }
47 i := len(dAtA)
48 _ = i
49 var l int
50 _ = l
51 if m.unknownFields != nil {
52 i -= len(m.unknownFields)
53 copy(dAtA[i:], m.unknownFields)
54 }
55 if m.BackoffOptions != nil {
56 if vtmsg, ok := interface{}(m.BackoffOptions).(interface {
57 MarshalToSizedBufferVTStrict([]byte) (int, error)
58 }); ok {
59 size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
60 if err != nil {
61 return 0, err
62 }
63 i -= size
64 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
65 } else {
66 encoded, err := proto.Marshal(m.BackoffOptions)
67 if err != nil {
68 return 0, err
69 }
70 i -= len(encoded)
71 copy(dAtA[i:], encoded)
72 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
73 }
74 i--
75 dAtA[i] = 0x12
76 }
77 if m.MaxConnectAttempts != nil {
78 size, err := (*wrapperspb.UInt32Value)(m.MaxConnectAttempts).MarshalToSizedBufferVTStrict(dAtA[:i])
79 if err != nil {
80 return 0, err
81 }
82 i -= size
83 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
84 i--
85 dAtA[i] = 0xa
86 }
87 return len(dAtA) - i, nil
88 }
89
90 func (m *FluentdAccessLogConfig) MarshalVTStrict() (dAtA []byte, err error) {
91 if m == nil {
92 return nil, nil
93 }
94 size := m.SizeVT()
95 dAtA = make([]byte, size)
96 n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
97 if err != nil {
98 return nil, err
99 }
100 return dAtA[:n], nil
101 }
102
103 func (m *FluentdAccessLogConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
104 size := m.SizeVT()
105 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
106 }
107
108 func (m *FluentdAccessLogConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
109 if m == nil {
110 return 0, nil
111 }
112 i := len(dAtA)
113 _ = i
114 var l int
115 _ = l
116 if m.unknownFields != nil {
117 i -= len(m.unknownFields)
118 copy(dAtA[i:], m.unknownFields)
119 }
120 if len(m.Formatters) > 0 {
121 for iNdEx := len(m.Formatters) - 1; iNdEx >= 0; iNdEx-- {
122 if vtmsg, ok := interface{}(m.Formatters[iNdEx]).(interface {
123 MarshalToSizedBufferVTStrict([]byte) (int, error)
124 }); ok {
125 size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
126 if err != nil {
127 return 0, err
128 }
129 i -= size
130 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
131 } else {
132 encoded, err := proto.Marshal(m.Formatters[iNdEx])
133 if err != nil {
134 return 0, err
135 }
136 i -= len(encoded)
137 copy(dAtA[i:], encoded)
138 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
139 }
140 i--
141 dAtA[i] = 0x42
142 }
143 }
144 if m.RetryOptions != nil {
145 size, err := m.RetryOptions.MarshalToSizedBufferVTStrict(dAtA[:i])
146 if err != nil {
147 return 0, err
148 }
149 i -= size
150 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
151 i--
152 dAtA[i] = 0x3a
153 }
154 if m.Record != nil {
155 size, err := (*structpb.Struct)(m.Record).MarshalToSizedBufferVTStrict(dAtA[:i])
156 if err != nil {
157 return 0, err
158 }
159 i -= size
160 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
161 i--
162 dAtA[i] = 0x32
163 }
164 if m.BufferSizeBytes != nil {
165 size, err := (*wrapperspb.UInt32Value)(m.BufferSizeBytes).MarshalToSizedBufferVTStrict(dAtA[:i])
166 if err != nil {
167 return 0, err
168 }
169 i -= size
170 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
171 i--
172 dAtA[i] = 0x2a
173 }
174 if m.BufferFlushInterval != nil {
175 size, err := (*durationpb.Duration)(m.BufferFlushInterval).MarshalToSizedBufferVTStrict(dAtA[:i])
176 if err != nil {
177 return 0, err
178 }
179 i -= size
180 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
181 i--
182 dAtA[i] = 0x22
183 }
184 if len(m.StatPrefix) > 0 {
185 i -= len(m.StatPrefix)
186 copy(dAtA[i:], m.StatPrefix)
187 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StatPrefix)))
188 i--
189 dAtA[i] = 0x1a
190 }
191 if len(m.Tag) > 0 {
192 i -= len(m.Tag)
193 copy(dAtA[i:], m.Tag)
194 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tag)))
195 i--
196 dAtA[i] = 0x12
197 }
198 if len(m.Cluster) > 0 {
199 i -= len(m.Cluster)
200 copy(dAtA[i:], m.Cluster)
201 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Cluster)))
202 i--
203 dAtA[i] = 0xa
204 }
205 return len(dAtA) - i, nil
206 }
207
208 func (m *FluentdAccessLogConfig_RetryOptions) SizeVT() (n int) {
209 if m == nil {
210 return 0
211 }
212 var l int
213 _ = l
214 if m.MaxConnectAttempts != nil {
215 l = (*wrapperspb.UInt32Value)(m.MaxConnectAttempts).SizeVT()
216 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
217 }
218 if m.BackoffOptions != nil {
219 if size, ok := interface{}(m.BackoffOptions).(interface {
220 SizeVT() int
221 }); ok {
222 l = size.SizeVT()
223 } else {
224 l = proto.Size(m.BackoffOptions)
225 }
226 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
227 }
228 n += len(m.unknownFields)
229 return n
230 }
231
232 func (m *FluentdAccessLogConfig) SizeVT() (n int) {
233 if m == nil {
234 return 0
235 }
236 var l int
237 _ = l
238 l = len(m.Cluster)
239 if l > 0 {
240 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
241 }
242 l = len(m.Tag)
243 if l > 0 {
244 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
245 }
246 l = len(m.StatPrefix)
247 if l > 0 {
248 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
249 }
250 if m.BufferFlushInterval != nil {
251 l = (*durationpb.Duration)(m.BufferFlushInterval).SizeVT()
252 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
253 }
254 if m.BufferSizeBytes != nil {
255 l = (*wrapperspb.UInt32Value)(m.BufferSizeBytes).SizeVT()
256 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
257 }
258 if m.Record != nil {
259 l = (*structpb.Struct)(m.Record).SizeVT()
260 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
261 }
262 if m.RetryOptions != nil {
263 l = m.RetryOptions.SizeVT()
264 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
265 }
266 if len(m.Formatters) > 0 {
267 for _, e := range m.Formatters {
268 if size, ok := interface{}(e).(interface {
269 SizeVT() int
270 }); ok {
271 l = size.SizeVT()
272 } else {
273 l = proto.Size(e)
274 }
275 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
276 }
277 }
278 n += len(m.unknownFields)
279 return n
280 }