Debian Codegraph @

envoy/config/accesslog/v2/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/config/accesslog/v2/file.proto
6
7 package accesslogv2
8
9 import (
10 protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
11 structpb "github.com/planetscale/vtprotobuf/types/known/structpb"
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 *FileAccessLog) 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 *FileAccessLog) MarshalToVTStrict(dAtA []byte) (int, error) {
36 size := m.SizeVT()
37 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
38 }
39
40 func (m *FileAccessLog) 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 msg, ok := m.AccessLogFormat.(*FileAccessLog_TypedJsonFormat); ok {
53 size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
54 if err != nil {
55 return 0, err
56 }
57 i -= size
58 }
59 if msg, ok := m.AccessLogFormat.(*FileAccessLog_JsonFormat); ok {
60 size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
61 if err != nil {
62 return 0, err
63 }
64 i -= size
65 }
66 if msg, ok := m.AccessLogFormat.(*FileAccessLog_Format); ok {
67 size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
68 if err != nil {
69 return 0, err
70 }
71 i -= size
72 }
73 if len(m.Path) > 0 {
74 i -= len(m.Path)
75 copy(dAtA[i:], m.Path)
76 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Path)))
77 i--
78 dAtA[i] = 0xa
79 }
80 return len(dAtA) - i, nil
81 }
82
83 func (m *FileAccessLog_Format) MarshalToVTStrict(dAtA []byte) (int, error) {
84 size := m.SizeVT()
85 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
86 }
87
88 func (m *FileAccessLog_Format) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
89 i := len(dAtA)
90 i -= len(m.Format)
91 copy(dAtA[i:], m.Format)
92 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Format)))
93 i--
94 dAtA[i] = 0x12
95 return len(dAtA) - i, nil
96 }
97 func (m *FileAccessLog_JsonFormat) MarshalToVTStrict(dAtA []byte) (int, error) {
98 size := m.SizeVT()
99 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
100 }
101
102 func (m *FileAccessLog_JsonFormat) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
103 i := len(dAtA)
104 if m.JsonFormat != nil {
105 size, err := (*structpb.Struct)(m.JsonFormat).MarshalToSizedBufferVTStrict(dAtA[:i])
106 if err != nil {
107 return 0, err
108 }
109 i -= size
110 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
111 i--
112 dAtA[i] = 0x1a
113 } else {
114 i = protohelpers.EncodeVarint(dAtA, i, 0)
115 i--
116 dAtA[i] = 0x1a
117 }
118 return len(dAtA) - i, nil
119 }
120 func (m *FileAccessLog_TypedJsonFormat) MarshalToVTStrict(dAtA []byte) (int, error) {
121 size := m.SizeVT()
122 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
123 }
124
125 func (m *FileAccessLog_TypedJsonFormat) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
126 i := len(dAtA)
127 if m.TypedJsonFormat != nil {
128 size, err := (*structpb.Struct)(m.TypedJsonFormat).MarshalToSizedBufferVTStrict(dAtA[:i])
129 if err != nil {
130 return 0, err
131 }
132 i -= size
133 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
134 i--
135 dAtA[i] = 0x22
136 } else {
137 i = protohelpers.EncodeVarint(dAtA, i, 0)
138 i--
139 dAtA[i] = 0x22
140 }
141 return len(dAtA) - i, nil
142 }
143 func (m *FileAccessLog) SizeVT() (n int) {
144 if m == nil {
145 return 0
146 }
147 var l int
148 _ = l
149 l = len(m.Path)
150 if l > 0 {
151 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
152 }
153 if vtmsg, ok := m.AccessLogFormat.(interface{ SizeVT() int }); ok {
154 n += vtmsg.SizeVT()
155 }
156 n += len(m.unknownFields)
157 return n
158 }
159
160 func (m *FileAccessLog_Format) SizeVT() (n int) {
161 if m == nil {
162 return 0
163 }
164 var l int
165 _ = l
166 l = len(m.Format)
167 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
168 return n
169 }
170 func (m *FileAccessLog_JsonFormat) SizeVT() (n int) {
171 if m == nil {
172 return 0
173 }
174 var l int
175 _ = l
176 if m.JsonFormat != nil {
177 l = (*structpb.Struct)(m.JsonFormat).SizeVT()
178 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
179 } else {
180 n += 2
181 }
182 return n
183 }
184 func (m *FileAccessLog_TypedJsonFormat) SizeVT() (n int) {
185 if m == nil {
186 return 0
187 }
188 var l int
189 _ = l
190 if m.TypedJsonFormat != nil {
191 l = (*structpb.Struct)(m.TypedJsonFormat).SizeVT()
192 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
193 } else {
194 n += 2
195 }
196 return n
197 }