| 1 |
//go:build vtprotobuf |
| 2 |
// +build vtprotobuf |
| 3 |
|
| 4 |
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. |
| 5 |
// source: envoy/extensions/upstreams/http/v3/http_protocol_options.proto |
| 6 |
|
| 7 |
package httpv3 |
| 8 |
|
| 9 |
import ( |
| 10 |
protohelpers "github.com/planetscale/vtprotobuf/protohelpers" |
| 11 |
proto "google.golang.org/protobuf/proto" |
| 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 *HttpProtocolOptions_ExplicitHttpConfig) 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 *HttpProtocolOptions_ExplicitHttpConfig) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 36 |
size := m.SizeVT() |
| 37 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 38 |
} |
| 39 |
|
| 40 |
func (m *HttpProtocolOptions_ExplicitHttpConfig) 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.ProtocolConfig.(*HttpProtocolOptions_ExplicitHttpConfig_Http3ProtocolOptions); 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.ProtocolConfig.(*HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions); 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.ProtocolConfig.(*HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions); ok { |
| 67 |
size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 68 |
if err != nil { |
| 69 |
return 0, err |
| 70 |
} |
| 71 |
i -= size |
| 72 |
} |
| 73 |
return len(dAtA) - i, nil |
| 74 |
} |
| 75 |
|
| 76 |
func (m *HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 77 |
size := m.SizeVT() |
| 78 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 79 |
} |
| 80 |
|
| 81 |
func (m *HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { |
| 82 |
i := len(dAtA) |
| 83 |
if m.HttpProtocolOptions != nil { |
| 84 |
if vtmsg, ok := interface{}(m.HttpProtocolOptions).(interface { |
| 85 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 86 |
}); ok { |
| 87 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 88 |
if err != nil { |
| 89 |
return 0, err |
| 90 |
} |
| 91 |
i -= size |
| 92 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 93 |
} else { |
| 94 |
encoded, err := proto.Marshal(m.HttpProtocolOptions) |
| 95 |
if err != nil { |
| 96 |
return 0, err |
| 97 |
} |
| 98 |
i -= len(encoded) |
| 99 |
copy(dAtA[i:], encoded) |
| 100 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 101 |
} |
| 102 |
i-- |
| 103 |
dAtA[i] = 0xa |
| 104 |
} else { |
| 105 |
i = protohelpers.EncodeVarint(dAtA, i, 0) |
| 106 |
i-- |
| 107 |
dAtA[i] = 0xa |
| 108 |
} |
| 109 |
return len(dAtA) - i, nil |
| 110 |
} |
| 111 |
func (m *HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 112 |
size := m.SizeVT() |
| 113 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 114 |
} |
| 115 |
|
| 116 |
func (m *HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { |
| 117 |
i := len(dAtA) |
| 118 |
if m.Http2ProtocolOptions != nil { |
| 119 |
if vtmsg, ok := interface{}(m.Http2ProtocolOptions).(interface { |
| 120 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 121 |
}); ok { |
| 122 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 123 |
if err != nil { |
| 124 |
return 0, err |
| 125 |
} |
| 126 |
i -= size |
| 127 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 128 |
} else { |
| 129 |
encoded, err := proto.Marshal(m.Http2ProtocolOptions) |
| 130 |
if err != nil { |
| 131 |
return 0, err |
| 132 |
} |
| 133 |
i -= len(encoded) |
| 134 |
copy(dAtA[i:], encoded) |
| 135 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 136 |
} |
| 137 |
i-- |
| 138 |
dAtA[i] = 0x12 |
| 139 |
} else { |
| 140 |
i = protohelpers.EncodeVarint(dAtA, i, 0) |
| 141 |
i-- |
| 142 |
dAtA[i] = 0x12 |
| 143 |
} |
| 144 |
return len(dAtA) - i, nil |
| 145 |
} |
| 146 |
func (m *HttpProtocolOptions_ExplicitHttpConfig_Http3ProtocolOptions) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 147 |
size := m.SizeVT() |
| 148 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 149 |
} |
| 150 |
|
| 151 |
func (m *HttpProtocolOptions_ExplicitHttpConfig_Http3ProtocolOptions) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { |
| 152 |
i := len(dAtA) |
| 153 |
if m.Http3ProtocolOptions != nil { |
| 154 |
if vtmsg, ok := interface{}(m.Http3ProtocolOptions).(interface { |
| 155 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 156 |
}); ok { |
| 157 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 158 |
if err != nil { |
| 159 |
return 0, err |
| 160 |
} |
| 161 |
i -= size |
| 162 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 163 |
} else { |
| 164 |
encoded, err := proto.Marshal(m.Http3ProtocolOptions) |
| 165 |
if err != nil { |
| 166 |
return 0, err |
| 167 |
} |
| 168 |
i -= len(encoded) |
| 169 |
copy(dAtA[i:], encoded) |
| 170 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 171 |
} |
| 172 |
i-- |
| 173 |
dAtA[i] = 0x1a |
| 174 |
} else { |
| 175 |
i = protohelpers.EncodeVarint(dAtA, i, 0) |
| 176 |
i-- |
| 177 |
dAtA[i] = 0x1a |
| 178 |
} |
| 179 |
return len(dAtA) - i, nil |
| 180 |
} |
| 181 |
func (m *HttpProtocolOptions_UseDownstreamHttpConfig) MarshalVTStrict() (dAtA []byte, err error) { |
| 182 |
if m == nil { |
| 183 |
return nil, nil |
| 184 |
} |
| 185 |
size := m.SizeVT() |
| 186 |
dAtA = make([]byte, size) |
| 187 |
n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 188 |
if err != nil { |
| 189 |
return nil, err |
| 190 |
} |
| 191 |
return dAtA[:n], nil |
| 192 |
} |
| 193 |
|
| 194 |
func (m *HttpProtocolOptions_UseDownstreamHttpConfig) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 195 |
size := m.SizeVT() |
| 196 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 197 |
} |
| 198 |
|
| 199 |
func (m *HttpProtocolOptions_UseDownstreamHttpConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { |
| 200 |
if m == nil { |
| 201 |
return 0, nil |
| 202 |
} |
| 203 |
i := len(dAtA) |
| 204 |
_ = i |
| 205 |
var l int |
| 206 |
_ = l |
| 207 |
if m.unknownFields != nil { |
| 208 |
i -= len(m.unknownFields) |
| 209 |
copy(dAtA[i:], m.unknownFields) |
| 210 |
} |
| 211 |
if m.Http3ProtocolOptions != nil { |
| 212 |
if vtmsg, ok := interface{}(m.Http3ProtocolOptions).(interface { |
| 213 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 214 |
}); ok { |
| 215 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 216 |
if err != nil { |
| 217 |
return 0, err |
| 218 |
} |
| 219 |
i -= size |
| 220 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 221 |
} else { |
| 222 |
encoded, err := proto.Marshal(m.Http3ProtocolOptions) |
| 223 |
if err != nil { |
| 224 |
return 0, err |
| 225 |
} |
| 226 |
i -= len(encoded) |
| 227 |
copy(dAtA[i:], encoded) |
| 228 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 229 |
} |
| 230 |
i-- |
| 231 |
dAtA[i] = 0x1a |
| 232 |
} |
| 233 |
if m.Http2ProtocolOptions != nil { |
| 234 |
if vtmsg, ok := interface{}(m.Http2ProtocolOptions).(interface { |
| 235 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 236 |
}); ok { |
| 237 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 238 |
if err != nil { |
| 239 |
return 0, err |
| 240 |
} |
| 241 |
i -= size |
| 242 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 243 |
} else { |
| 244 |
encoded, err := proto.Marshal(m.Http2ProtocolOptions) |
| 245 |
if err != nil { |
| 246 |
return 0, err |
| 247 |
} |
| 248 |
i -= len(encoded) |
| 249 |
copy(dAtA[i:], encoded) |
| 250 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 251 |
} |
| 252 |
i-- |
| 253 |
dAtA[i] = 0x12 |
| 254 |
} |
| 255 |
if m.HttpProtocolOptions != nil { |
| 256 |
if vtmsg, ok := interface{}(m.HttpProtocolOptions).(interface { |
| 257 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 258 |
}); ok { |
| 259 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 260 |
if err != nil { |
| 261 |
return 0, err |
| 262 |
} |
| 263 |
i -= size |
| 264 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 265 |
} else { |
| 266 |
encoded, err := proto.Marshal(m.HttpProtocolOptions) |
| 267 |
if err != nil { |
| 268 |
return 0, err |
| 269 |
} |
| 270 |
i -= len(encoded) |
| 271 |
copy(dAtA[i:], encoded) |
| 272 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 273 |
} |
| 274 |
i-- |
| 275 |
dAtA[i] = 0xa |
| 276 |
} |
| 277 |
return len(dAtA) - i, nil |
| 278 |
} |
| 279 |
|
| 280 |
func (m *HttpProtocolOptions_AutoHttpConfig) MarshalVTStrict() (dAtA []byte, err error) { |
| 281 |
if m == nil { |
| 282 |
return nil, nil |
| 283 |
} |
| 284 |
size := m.SizeVT() |
| 285 |
dAtA = make([]byte, size) |
| 286 |
n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 287 |
if err != nil { |
| 288 |
return nil, err |
| 289 |
} |
| 290 |
return dAtA[:n], nil |
| 291 |
} |
| 292 |
|
| 293 |
func (m *HttpProtocolOptions_AutoHttpConfig) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 294 |
size := m.SizeVT() |
| 295 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 296 |
} |
| 297 |
|
| 298 |
func (m *HttpProtocolOptions_AutoHttpConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { |
| 299 |
if m == nil { |
| 300 |
return 0, nil |
| 301 |
} |
| 302 |
i := len(dAtA) |
| 303 |
_ = i |
| 304 |
var l int |
| 305 |
_ = l |
| 306 |
if m.unknownFields != nil { |
| 307 |
i -= len(m.unknownFields) |
| 308 |
copy(dAtA[i:], m.unknownFields) |
| 309 |
} |
| 310 |
if m.AlternateProtocolsCacheOptions != nil { |
| 311 |
if vtmsg, ok := interface{}(m.AlternateProtocolsCacheOptions).(interface { |
| 312 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 313 |
}); ok { |
| 314 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 315 |
if err != nil { |
| 316 |
return 0, err |
| 317 |
} |
| 318 |
i -= size |
| 319 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 320 |
} else { |
| 321 |
encoded, err := proto.Marshal(m.AlternateProtocolsCacheOptions) |
| 322 |
if err != nil { |
| 323 |
return 0, err |
| 324 |
} |
| 325 |
i -= len(encoded) |
| 326 |
copy(dAtA[i:], encoded) |
| 327 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 328 |
} |
| 329 |
i-- |
| 330 |
dAtA[i] = 0x22 |
| 331 |
} |
| 332 |
if m.Http3ProtocolOptions != nil { |
| 333 |
if vtmsg, ok := interface{}(m.Http3ProtocolOptions).(interface { |
| 334 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 335 |
}); ok { |
| 336 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 337 |
if err != nil { |
| 338 |
return 0, err |
| 339 |
} |
| 340 |
i -= size |
| 341 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 342 |
} else { |
| 343 |
encoded, err := proto.Marshal(m.Http3ProtocolOptions) |
| 344 |
if err != nil { |
| 345 |
return 0, err |
| 346 |
} |
| 347 |
i -= len(encoded) |
| 348 |
copy(dAtA[i:], encoded) |
| 349 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 350 |
} |
| 351 |
i-- |
| 352 |
dAtA[i] = 0x1a |
| 353 |
} |
| 354 |
if m.Http2ProtocolOptions != nil { |
| 355 |
if vtmsg, ok := interface{}(m.Http2ProtocolOptions).(interface { |
| 356 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 357 |
}); ok { |
| 358 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 359 |
if err != nil { |
| 360 |
return 0, err |
| 361 |
} |
| 362 |
i -= size |
| 363 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 364 |
} else { |
| 365 |
encoded, err := proto.Marshal(m.Http2ProtocolOptions) |
| 366 |
if err != nil { |
| 367 |
return 0, err |
| 368 |
} |
| 369 |
i -= len(encoded) |
| 370 |
copy(dAtA[i:], encoded) |
| 371 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 372 |
} |
| 373 |
i-- |
| 374 |
dAtA[i] = 0x12 |
| 375 |
} |
| 376 |
if m.HttpProtocolOptions != nil { |
| 377 |
if vtmsg, ok := interface{}(m.HttpProtocolOptions).(interface { |
| 378 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 379 |
}); ok { |
| 380 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 381 |
if err != nil { |
| 382 |
return 0, err |
| 383 |
} |
| 384 |
i -= size |
| 385 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 386 |
} else { |
| 387 |
encoded, err := proto.Marshal(m.HttpProtocolOptions) |
| 388 |
if err != nil { |
| 389 |
return 0, err |
| 390 |
} |
| 391 |
i -= len(encoded) |
| 392 |
copy(dAtA[i:], encoded) |
| 393 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 394 |
} |
| 395 |
i-- |
| 396 |
dAtA[i] = 0xa |
| 397 |
} |
| 398 |
return len(dAtA) - i, nil |
| 399 |
} |
| 400 |
|
| 401 |
func (m *HttpProtocolOptions) MarshalVTStrict() (dAtA []byte, err error) { |
| 402 |
if m == nil { |
| 403 |
return nil, nil |
| 404 |
} |
| 405 |
size := m.SizeVT() |
| 406 |
dAtA = make([]byte, size) |
| 407 |
n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 408 |
if err != nil { |
| 409 |
return nil, err |
| 410 |
} |
| 411 |
return dAtA[:n], nil |
| 412 |
} |
| 413 |
|
| 414 |
func (m *HttpProtocolOptions) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 415 |
size := m.SizeVT() |
| 416 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 417 |
} |
| 418 |
|
| 419 |
func (m *HttpProtocolOptions) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { |
| 420 |
if m == nil { |
| 421 |
return 0, nil |
| 422 |
} |
| 423 |
i := len(dAtA) |
| 424 |
_ = i |
| 425 |
var l int |
| 426 |
_ = l |
| 427 |
if m.unknownFields != nil { |
| 428 |
i -= len(m.unknownFields) |
| 429 |
copy(dAtA[i:], m.unknownFields) |
| 430 |
} |
| 431 |
if m.HeaderValidationConfig != nil { |
| 432 |
if vtmsg, ok := interface{}(m.HeaderValidationConfig).(interface { |
| 433 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 434 |
}); ok { |
| 435 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 436 |
if err != nil { |
| 437 |
return 0, err |
| 438 |
} |
| 439 |
i -= size |
| 440 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 441 |
} else { |
| 442 |
encoded, err := proto.Marshal(m.HeaderValidationConfig) |
| 443 |
if err != nil { |
| 444 |
return 0, err |
| 445 |
} |
| 446 |
i -= len(encoded) |
| 447 |
copy(dAtA[i:], encoded) |
| 448 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 449 |
} |
| 450 |
i-- |
| 451 |
dAtA[i] = 0x3a |
| 452 |
} |
| 453 |
if len(m.HttpFilters) > 0 { |
| 454 |
for iNdEx := len(m.HttpFilters) - 1; iNdEx >= 0; iNdEx-- { |
| 455 |
if vtmsg, ok := interface{}(m.HttpFilters[iNdEx]).(interface { |
| 456 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 457 |
}); ok { |
| 458 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 459 |
if err != nil { |
| 460 |
return 0, err |
| 461 |
} |
| 462 |
i -= size |
| 463 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 464 |
} else { |
| 465 |
encoded, err := proto.Marshal(m.HttpFilters[iNdEx]) |
| 466 |
if err != nil { |
| 467 |
return 0, err |
| 468 |
} |
| 469 |
i -= len(encoded) |
| 470 |
copy(dAtA[i:], encoded) |
| 471 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 472 |
} |
| 473 |
i-- |
| 474 |
dAtA[i] = 0x32 |
| 475 |
} |
| 476 |
} |
| 477 |
if msg, ok := m.UpstreamProtocolOptions.(*HttpProtocolOptions_AutoConfig); ok { |
| 478 |
size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 479 |
if err != nil { |
| 480 |
return 0, err |
| 481 |
} |
| 482 |
i -= size |
| 483 |
} |
| 484 |
if msg, ok := m.UpstreamProtocolOptions.(*HttpProtocolOptions_UseDownstreamProtocolConfig); ok { |
| 485 |
size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 486 |
if err != nil { |
| 487 |
return 0, err |
| 488 |
} |
| 489 |
i -= size |
| 490 |
} |
| 491 |
if msg, ok := m.UpstreamProtocolOptions.(*HttpProtocolOptions_ExplicitHttpConfig_); ok { |
| 492 |
size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 493 |
if err != nil { |
| 494 |
return 0, err |
| 495 |
} |
| 496 |
i -= size |
| 497 |
} |
| 498 |
if m.UpstreamHttpProtocolOptions != nil { |
| 499 |
if vtmsg, ok := interface{}(m.UpstreamHttpProtocolOptions).(interface { |
| 500 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 501 |
}); ok { |
| 502 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 503 |
if err != nil { |
| 504 |
return 0, err |
| 505 |
} |
| 506 |
i -= size |
| 507 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 508 |
} else { |
| 509 |
encoded, err := proto.Marshal(m.UpstreamHttpProtocolOptions) |
| 510 |
if err != nil { |
| 511 |
return 0, err |
| 512 |
} |
| 513 |
i -= len(encoded) |
| 514 |
copy(dAtA[i:], encoded) |
| 515 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 516 |
} |
| 517 |
i-- |
| 518 |
dAtA[i] = 0x12 |
| 519 |
} |
| 520 |
if m.CommonHttpProtocolOptions != nil { |
| 521 |
if vtmsg, ok := interface{}(m.CommonHttpProtocolOptions).(interface { |
| 522 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 523 |
}); ok { |
| 524 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 525 |
if err != nil { |
| 526 |
return 0, err |
| 527 |
} |
| 528 |
i -= size |
| 529 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 530 |
} else { |
| 531 |
encoded, err := proto.Marshal(m.CommonHttpProtocolOptions) |
| 532 |
if err != nil { |
| 533 |
return 0, err |
| 534 |
} |
| 535 |
i -= len(encoded) |
| 536 |
copy(dAtA[i:], encoded) |
| 537 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 538 |
} |
| 539 |
i-- |
| 540 |
dAtA[i] = 0xa |
| 541 |
} |
| 542 |
return len(dAtA) - i, nil |
| 543 |
} |
| 544 |
|
| 545 |
func (m *HttpProtocolOptions_ExplicitHttpConfig_) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 546 |
size := m.SizeVT() |
| 547 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 548 |
} |
| 549 |
|
| 550 |
func (m *HttpProtocolOptions_ExplicitHttpConfig_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { |
| 551 |
i := len(dAtA) |
| 552 |
if m.ExplicitHttpConfig != nil { |
| 553 |
size, err := m.ExplicitHttpConfig.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 554 |
if err != nil { |
| 555 |
return 0, err |
| 556 |
} |
| 557 |
i -= size |
| 558 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 559 |
i-- |
| 560 |
dAtA[i] = 0x1a |
| 561 |
} else { |
| 562 |
i = protohelpers.EncodeVarint(dAtA, i, 0) |
| 563 |
i-- |
| 564 |
dAtA[i] = 0x1a |
| 565 |
} |
| 566 |
return len(dAtA) - i, nil |
| 567 |
} |
| 568 |
func (m *HttpProtocolOptions_UseDownstreamProtocolConfig) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 569 |
size := m.SizeVT() |
| 570 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 571 |
} |
| 572 |
|
| 573 |
func (m *HttpProtocolOptions_UseDownstreamProtocolConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { |
| 574 |
i := len(dAtA) |
| 575 |
if m.UseDownstreamProtocolConfig != nil { |
| 576 |
size, err := m.UseDownstreamProtocolConfig.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 577 |
if err != nil { |
| 578 |
return 0, err |
| 579 |
} |
| 580 |
i -= size |
| 581 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 582 |
i-- |
| 583 |
dAtA[i] = 0x22 |
| 584 |
} else { |
| 585 |
i = protohelpers.EncodeVarint(dAtA, i, 0) |
| 586 |
i-- |
| 587 |
dAtA[i] = 0x22 |
| 588 |
} |
| 589 |
return len(dAtA) - i, nil |
| 590 |
} |
| 591 |
func (m *HttpProtocolOptions_AutoConfig) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 592 |
size := m.SizeVT() |
| 593 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 594 |
} |
| 595 |
|
| 596 |
func (m *HttpProtocolOptions_AutoConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { |
| 597 |
i := len(dAtA) |
| 598 |
if m.AutoConfig != nil { |
| 599 |
size, err := m.AutoConfig.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 600 |
if err != nil { |
| 601 |
return 0, err |
| 602 |
} |
| 603 |
i -= size |
| 604 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 605 |
i-- |
| 606 |
dAtA[i] = 0x2a |
| 607 |
} else { |
| 608 |
i = protohelpers.EncodeVarint(dAtA, i, 0) |
| 609 |
i-- |
| 610 |
dAtA[i] = 0x2a |
| 611 |
} |
| 612 |
return len(dAtA) - i, nil |
| 613 |
} |
| 614 |
func (m *HttpProtocolOptions_ExplicitHttpConfig) SizeVT() (n int) { |
| 615 |
if m == nil { |
| 616 |
return 0 |
| 617 |
} |
| 618 |
var l int |
| 619 |
_ = l |
| 620 |
if vtmsg, ok := m.ProtocolConfig.(interface{ SizeVT() int }); ok { |
| 621 |
n += vtmsg.SizeVT() |
| 622 |
} |
| 623 |
n += len(m.unknownFields) |
| 624 |
return n |
| 625 |
} |
| 626 |
|
| 627 |
func (m *HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions) SizeVT() (n int) { |
| 628 |
if m == nil { |
| 629 |
return 0 |
| 630 |
} |
| 631 |
var l int |
| 632 |
_ = l |
| 633 |
if m.HttpProtocolOptions != nil { |
| 634 |
if size, ok := interface{}(m.HttpProtocolOptions).(interface { |
| 635 |
SizeVT() int |
| 636 |
}); ok { |
| 637 |
l = size.SizeVT() |
| 638 |
} else { |
| 639 |
l = proto.Size(m.HttpProtocolOptions) |
| 640 |
} |
| 641 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 642 |
} else { |
| 643 |
n += 2 |
| 644 |
} |
| 645 |
return n |
| 646 |
} |
| 647 |
func (m *HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions) SizeVT() (n int) { |
| 648 |
if m == nil { |
| 649 |
return 0 |
| 650 |
} |
| 651 |
var l int |
| 652 |
_ = l |
| 653 |
if m.Http2ProtocolOptions != nil { |
| 654 |
if size, ok := interface{}(m.Http2ProtocolOptions).(interface { |
| 655 |
SizeVT() int |
| 656 |
}); ok { |
| 657 |
l = size.SizeVT() |
| 658 |
} else { |
| 659 |
l = proto.Size(m.Http2ProtocolOptions) |
| 660 |
} |
| 661 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 662 |
} else { |
| 663 |
n += 2 |
| 664 |
} |
| 665 |
return n |
| 666 |
} |
| 667 |
func (m *HttpProtocolOptions_ExplicitHttpConfig_Http3ProtocolOptions) SizeVT() (n int) { |
| 668 |
if m == nil { |
| 669 |
return 0 |
| 670 |
} |
| 671 |
var l int |
| 672 |
_ = l |
| 673 |
if m.Http3ProtocolOptions != nil { |
| 674 |
if size, ok := interface{}(m.Http3ProtocolOptions).(interface { |
| 675 |
SizeVT() int |
| 676 |
}); ok { |
| 677 |
l = size.SizeVT() |
| 678 |
} else { |
| 679 |
l = proto.Size(m.Http3ProtocolOptions) |
| 680 |
} |
| 681 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 682 |
} else { |
| 683 |
n += 2 |
| 684 |
} |
| 685 |
return n |
| 686 |
} |
| 687 |
func (m *HttpProtocolOptions_UseDownstreamHttpConfig) SizeVT() (n int) { |
| 688 |
if m == nil { |
| 689 |
return 0 |
| 690 |
} |
| 691 |
var l int |
| 692 |
_ = l |
| 693 |
if m.HttpProtocolOptions != nil { |
| 694 |
if size, ok := interface{}(m.HttpProtocolOptions).(interface { |
| 695 |
SizeVT() int |
| 696 |
}); ok { |
| 697 |
l = size.SizeVT() |
| 698 |
} else { |
| 699 |
l = proto.Size(m.HttpProtocolOptions) |
| 700 |
} |
| 701 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 702 |
} |
| 703 |
if m.Http2ProtocolOptions != nil { |
| 704 |
if size, ok := interface{}(m.Http2ProtocolOptions).(interface { |
| 705 |
SizeVT() int |
| 706 |
}); ok { |
| 707 |
l = size.SizeVT() |
| 708 |
} else { |
| 709 |
l = proto.Size(m.Http2ProtocolOptions) |
| 710 |
} |
| 711 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 712 |
} |
| 713 |
if m.Http3ProtocolOptions != nil { |
| 714 |
if size, ok := interface{}(m.Http3ProtocolOptions).(interface { |
| 715 |
SizeVT() int |
| 716 |
}); ok { |
| 717 |
l = size.SizeVT() |
| 718 |
} else { |
| 719 |
l = proto.Size(m.Http3ProtocolOptions) |
| 720 |
} |
| 721 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 722 |
} |
| 723 |
n += len(m.unknownFields) |
| 724 |
return n |
| 725 |
} |
| 726 |
|
| 727 |
func (m *HttpProtocolOptions_AutoHttpConfig) SizeVT() (n int) { |
| 728 |
if m == nil { |
| 729 |
return 0 |
| 730 |
} |
| 731 |
var l int |
| 732 |
_ = l |
| 733 |
if m.HttpProtocolOptions != nil { |
| 734 |
if size, ok := interface{}(m.HttpProtocolOptions).(interface { |
| 735 |
SizeVT() int |
| 736 |
}); ok { |
| 737 |
l = size.SizeVT() |
| 738 |
} else { |
| 739 |
l = proto.Size(m.HttpProtocolOptions) |
| 740 |
} |
| 741 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 742 |
} |
| 743 |
if m.Http2ProtocolOptions != nil { |
| 744 |
if size, ok := interface{}(m.Http2ProtocolOptions).(interface { |
| 745 |
SizeVT() int |
| 746 |
}); ok { |
| 747 |
l = size.SizeVT() |
| 748 |
} else { |
| 749 |
l = proto.Size(m.Http2ProtocolOptions) |
| 750 |
} |
| 751 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 752 |
} |
| 753 |
if m.Http3ProtocolOptions != nil { |
| 754 |
if size, ok := interface{}(m.Http3ProtocolOptions).(interface { |
| 755 |
SizeVT() int |
| 756 |
}); ok { |
| 757 |
l = size.SizeVT() |
| 758 |
} else { |
| 759 |
l = proto.Size(m.Http3ProtocolOptions) |
| 760 |
} |
| 761 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 762 |
} |
| 763 |
if m.AlternateProtocolsCacheOptions != nil { |
| 764 |
if size, ok := interface{}(m.AlternateProtocolsCacheOptions).(interface { |
| 765 |
SizeVT() int |
| 766 |
}); ok { |
| 767 |
l = size.SizeVT() |
| 768 |
} else { |
| 769 |
l = proto.Size(m.AlternateProtocolsCacheOptions) |
| 770 |
} |
| 771 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 772 |
} |
| 773 |
n += len(m.unknownFields) |
| 774 |
return n |
| 775 |
} |
| 776 |
|
| 777 |
func (m *HttpProtocolOptions) SizeVT() (n int) { |
| 778 |
if m == nil { |
| 779 |
return 0 |
| 780 |
} |
| 781 |
var l int |
| 782 |
_ = l |
| 783 |
if m.CommonHttpProtocolOptions != nil { |
| 784 |
if size, ok := interface{}(m.CommonHttpProtocolOptions).(interface { |
| 785 |
SizeVT() int |
| 786 |
}); ok { |
| 787 |
l = size.SizeVT() |
| 788 |
} else { |
| 789 |
l = proto.Size(m.CommonHttpProtocolOptions) |
| 790 |
} |
| 791 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 792 |
} |
| 793 |
if m.UpstreamHttpProtocolOptions != nil { |
| 794 |
if size, ok := interface{}(m.UpstreamHttpProtocolOptions).(interface { |
| 795 |
SizeVT() int |
| 796 |
}); ok { |
| 797 |
l = size.SizeVT() |
| 798 |
} else { |
| 799 |
l = proto.Size(m.UpstreamHttpProtocolOptions) |
| 800 |
} |
| 801 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 802 |
} |
| 803 |
if vtmsg, ok := m.UpstreamProtocolOptions.(interface{ SizeVT() int }); ok { |
| 804 |
n += vtmsg.SizeVT() |
| 805 |
} |
| 806 |
if len(m.HttpFilters) > 0 { |
| 807 |
for _, e := range m.HttpFilters { |
| 808 |
if size, ok := interface{}(e).(interface { |
| 809 |
SizeVT() int |
| 810 |
}); ok { |
| 811 |
l = size.SizeVT() |
| 812 |
} else { |
| 813 |
l = proto.Size(e) |
| 814 |
} |
| 815 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 816 |
} |
| 817 |
} |
| 818 |
if m.HeaderValidationConfig != nil { |
| 819 |
if size, ok := interface{}(m.HeaderValidationConfig).(interface { |
| 820 |
SizeVT() int |
| 821 |
}); ok { |
| 822 |
l = size.SizeVT() |
| 823 |
} else { |
| 824 |
l = proto.Size(m.HeaderValidationConfig) |
| 825 |
} |
| 826 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 827 |
} |
| 828 |
n += len(m.unknownFields) |
| 829 |
return n |
| 830 |
} |
| 831 |
|
| 832 |
func (m *HttpProtocolOptions_ExplicitHttpConfig_) SizeVT() (n int) { |
| 833 |
if m == nil { |
| 834 |
return 0 |
| 835 |
} |
| 836 |
var l int |
| 837 |
_ = l |
| 838 |
if m.ExplicitHttpConfig != nil { |
| 839 |
l = m.ExplicitHttpConfig.SizeVT() |
| 840 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 841 |
} else { |
| 842 |
n += 2 |
| 843 |
} |
| 844 |
return n |
| 845 |
} |
| 846 |
func (m *HttpProtocolOptions_UseDownstreamProtocolConfig) SizeVT() (n int) { |
| 847 |
if m == nil { |
| 848 |
return 0 |
| 849 |
} |
| 850 |
var l int |
| 851 |
_ = l |
| 852 |
if m.UseDownstreamProtocolConfig != nil { |
| 853 |
l = m.UseDownstreamProtocolConfig.SizeVT() |
| 854 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 855 |
} else { |
| 856 |
n += 2 |
| 857 |
} |
| 858 |
return n |
| 859 |
} |
| 860 |
func (m *HttpProtocolOptions_AutoConfig) SizeVT() (n int) { |
| 861 |
if m == nil { |
| 862 |
return 0 |
| 863 |
} |
| 864 |
var l int |
| 865 |
_ = l |
| 866 |
if m.AutoConfig != nil { |
| 867 |
l = m.AutoConfig.SizeVT() |
| 868 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 869 |
} else { |
| 870 |
n += 2 |
| 871 |
} |
| 872 |
return n |
| 873 |
} |