| 1 |
//go:build vtprotobuf |
| 2 |
// +build vtprotobuf |
| 3 |
|
| 4 |
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. |
| 5 |
// source: envoy/config/grpc_credential/v2alpha/aws_iam.proto |
| 6 |
|
| 7 |
package v2alpha |
| 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 *AwsIamConfig) 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 *AwsIamConfig) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 35 |
size := m.SizeVT() |
| 36 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 37 |
} |
| 38 |
|
| 39 |
func (m *AwsIamConfig) 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 len(m.Region) > 0 { |
| 52 |
i -= len(m.Region) |
| 53 |
copy(dAtA[i:], m.Region) |
| 54 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Region))) |
| 55 |
i-- |
| 56 |
dAtA[i] = 0x12 |
| 57 |
} |
| 58 |
if len(m.ServiceName) > 0 { |
| 59 |
i -= len(m.ServiceName) |
| 60 |
copy(dAtA[i:], m.ServiceName) |
| 61 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ServiceName))) |
| 62 |
i-- |
| 63 |
dAtA[i] = 0xa |
| 64 |
} |
| 65 |
return len(dAtA) - i, nil |
| 66 |
} |
| 67 |
|
| 68 |
func (m *AwsIamConfig) SizeVT() (n int) { |
| 69 |
if m == nil { |
| 70 |
return 0 |
| 71 |
} |
| 72 |
var l int |
| 73 |
_ = l |
| 74 |
l = len(m.ServiceName) |
| 75 |
if l > 0 { |
| 76 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 77 |
} |
| 78 |
l = len(m.Region) |
| 79 |
if l > 0 { |
| 80 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 81 |
} |
| 82 |
n += len(m.unknownFields) |
| 83 |
return n |
| 84 |
} |