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