Debian Codegraph @

envoy/config/core/v3/http_uri_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/core/v3/http_uri.proto
6
7 package corev3
8
9 import (
10 protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
11 durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
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 *HttpUri) 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 *HttpUri) MarshalToVTStrict(dAtA []byte) (int, error) {
36 size := m.SizeVT()
37 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
38 }
39
40 func (m *HttpUri) 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 m.Timeout != nil {
53 size, err := (*durationpb.Duration)(m.Timeout).MarshalToSizedBufferVTStrict(dAtA[:i])
54 if err != nil {
55 return 0, err
56 }
57 i -= size
58 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
59 i--
60 dAtA[i] = 0x1a
61 }
62 if msg, ok := m.HttpUpstreamType.(*HttpUri_Cluster); ok {
63 size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
64 if err != nil {
65 return 0, err
66 }
67 i -= size
68 }
69 if len(m.Uri) > 0 {
70 i -= len(m.Uri)
71 copy(dAtA[i:], m.Uri)
72 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Uri)))
73 i--
74 dAtA[i] = 0xa
75 }
76 return len(dAtA) - i, nil
77 }
78
79 func (m *HttpUri_Cluster) MarshalToVTStrict(dAtA []byte) (int, error) {
80 size := m.SizeVT()
81 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
82 }
83
84 func (m *HttpUri_Cluster) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
85 i := len(dAtA)
86 i -= len(m.Cluster)
87 copy(dAtA[i:], m.Cluster)
88 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Cluster)))
89 i--
90 dAtA[i] = 0x12
91 return len(dAtA) - i, nil
92 }
93 func (m *HttpUri) SizeVT() (n int) {
94 if m == nil {
95 return 0
96 }
97 var l int
98 _ = l
99 l = len(m.Uri)
100 if l > 0 {
101 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
102 }
103 if vtmsg, ok := m.HttpUpstreamType.(interface{ SizeVT() int }); ok {
104 n += vtmsg.SizeVT()
105 }
106 if m.Timeout != nil {
107 l = (*durationpb.Duration)(m.Timeout).SizeVT()
108 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
109 }
110 n += len(m.unknownFields)
111 return n
112 }
113
114 func (m *HttpUri_Cluster) SizeVT() (n int) {
115 if m == nil {
116 return 0
117 }
118 var l int
119 _ = l
120 l = len(m.Cluster)
121 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
122 return n
123 }