Debian Codegraph @

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