github.com/google/cadvisor@v0.49.1/third_party/containerd/api/services/diff/v1/diff.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: github.com/containerd/containerd/api/services/diff/v1/diff.proto
     3  
     4  package diff
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	types "github.com/google/cadvisor/third_party/containerd/api/types"
    10  	proto "github.com/gogo/protobuf/proto"
    11  	github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
    12  	types1 "github.com/gogo/protobuf/types"
    13  	grpc "google.golang.org/grpc"
    14  	codes "google.golang.org/grpc/codes"
    15  	status "google.golang.org/grpc/status"
    16  	io "io"
    17  	math "math"
    18  	math_bits "math/bits"
    19  	reflect "reflect"
    20  	strings "strings"
    21  )
    22  
    23  // Reference imports to suppress errors if they are not otherwise used.
    24  var _ = proto.Marshal
    25  var _ = fmt.Errorf
    26  var _ = math.Inf
    27  
    28  // This is a compile-time assertion to ensure that this generated file
    29  // is compatible with the proto package it is being compiled against.
    30  // A compilation error at this line likely means your copy of the
    31  // proto package needs to be updated.
    32  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    33  
    34  type ApplyRequest struct {
    35  	// Diff is the descriptor of the diff to be extracted
    36  	Diff                 *types.Descriptor      `protobuf:"bytes,1,opt,name=diff,proto3" json:"diff,omitempty"`
    37  	Mounts               []*types.Mount         `protobuf:"bytes,2,rep,name=mounts,proto3" json:"mounts,omitempty"`
    38  	Payloads             map[string]*types1.Any `protobuf:"bytes,3,rep,name=payloads,proto3" json:"payloads,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    39  	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
    40  	XXX_unrecognized     []byte                 `json:"-"`
    41  	XXX_sizecache        int32                  `json:"-"`
    42  }
    43  
    44  func (m *ApplyRequest) Reset()      { *m = ApplyRequest{} }
    45  func (*ApplyRequest) ProtoMessage() {}
    46  func (*ApplyRequest) Descriptor() ([]byte, []int) {
    47  	return fileDescriptor_3b36a99e6faaa935, []int{0}
    48  }
    49  func (m *ApplyRequest) XXX_Unmarshal(b []byte) error {
    50  	return m.Unmarshal(b)
    51  }
    52  func (m *ApplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    53  	if deterministic {
    54  		return xxx_messageInfo_ApplyRequest.Marshal(b, m, deterministic)
    55  	} else {
    56  		b = b[:cap(b)]
    57  		n, err := m.MarshalToSizedBuffer(b)
    58  		if err != nil {
    59  			return nil, err
    60  		}
    61  		return b[:n], nil
    62  	}
    63  }
    64  func (m *ApplyRequest) XXX_Merge(src proto.Message) {
    65  	xxx_messageInfo_ApplyRequest.Merge(m, src)
    66  }
    67  func (m *ApplyRequest) XXX_Size() int {
    68  	return m.Size()
    69  }
    70  func (m *ApplyRequest) XXX_DiscardUnknown() {
    71  	xxx_messageInfo_ApplyRequest.DiscardUnknown(m)
    72  }
    73  
    74  var xxx_messageInfo_ApplyRequest proto.InternalMessageInfo
    75  
    76  type ApplyResponse struct {
    77  	// Applied is the descriptor for the object which was applied.
    78  	// If the input was a compressed blob then the result will be
    79  	// the descriptor for the uncompressed blob.
    80  	Applied              *types.Descriptor `protobuf:"bytes,1,opt,name=applied,proto3" json:"applied,omitempty"`
    81  	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    82  	XXX_unrecognized     []byte            `json:"-"`
    83  	XXX_sizecache        int32             `json:"-"`
    84  }
    85  
    86  func (m *ApplyResponse) Reset()      { *m = ApplyResponse{} }
    87  func (*ApplyResponse) ProtoMessage() {}
    88  func (*ApplyResponse) Descriptor() ([]byte, []int) {
    89  	return fileDescriptor_3b36a99e6faaa935, []int{1}
    90  }
    91  func (m *ApplyResponse) XXX_Unmarshal(b []byte) error {
    92  	return m.Unmarshal(b)
    93  }
    94  func (m *ApplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    95  	if deterministic {
    96  		return xxx_messageInfo_ApplyResponse.Marshal(b, m, deterministic)
    97  	} else {
    98  		b = b[:cap(b)]
    99  		n, err := m.MarshalToSizedBuffer(b)
   100  		if err != nil {
   101  			return nil, err
   102  		}
   103  		return b[:n], nil
   104  	}
   105  }
   106  func (m *ApplyResponse) XXX_Merge(src proto.Message) {
   107  	xxx_messageInfo_ApplyResponse.Merge(m, src)
   108  }
   109  func (m *ApplyResponse) XXX_Size() int {
   110  	return m.Size()
   111  }
   112  func (m *ApplyResponse) XXX_DiscardUnknown() {
   113  	xxx_messageInfo_ApplyResponse.DiscardUnknown(m)
   114  }
   115  
   116  var xxx_messageInfo_ApplyResponse proto.InternalMessageInfo
   117  
   118  type DiffRequest struct {
   119  	// Left are the mounts which represent the older copy
   120  	// in which is the base of the computed changes.
   121  	Left []*types.Mount `protobuf:"bytes,1,rep,name=left,proto3" json:"left,omitempty"`
   122  	// Right are the mounts which represents the newer copy
   123  	// in which changes from the left were made into.
   124  	Right []*types.Mount `protobuf:"bytes,2,rep,name=right,proto3" json:"right,omitempty"`
   125  	// MediaType is the media type descriptor for the created diff
   126  	// object
   127  	MediaType string `protobuf:"bytes,3,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
   128  	// Ref identifies the pre-commit content store object. This
   129  	// reference can be used to get the status from the content store.
   130  	Ref string `protobuf:"bytes,4,opt,name=ref,proto3" json:"ref,omitempty"`
   131  	// Labels are the labels to apply to the generated content
   132  	// on content store commit.
   133  	Labels               map[string]string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
   134  	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
   135  	XXX_unrecognized     []byte            `json:"-"`
   136  	XXX_sizecache        int32             `json:"-"`
   137  }
   138  
   139  func (m *DiffRequest) Reset()      { *m = DiffRequest{} }
   140  func (*DiffRequest) ProtoMessage() {}
   141  func (*DiffRequest) Descriptor() ([]byte, []int) {
   142  	return fileDescriptor_3b36a99e6faaa935, []int{2}
   143  }
   144  func (m *DiffRequest) XXX_Unmarshal(b []byte) error {
   145  	return m.Unmarshal(b)
   146  }
   147  func (m *DiffRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   148  	if deterministic {
   149  		return xxx_messageInfo_DiffRequest.Marshal(b, m, deterministic)
   150  	} else {
   151  		b = b[:cap(b)]
   152  		n, err := m.MarshalToSizedBuffer(b)
   153  		if err != nil {
   154  			return nil, err
   155  		}
   156  		return b[:n], nil
   157  	}
   158  }
   159  func (m *DiffRequest) XXX_Merge(src proto.Message) {
   160  	xxx_messageInfo_DiffRequest.Merge(m, src)
   161  }
   162  func (m *DiffRequest) XXX_Size() int {
   163  	return m.Size()
   164  }
   165  func (m *DiffRequest) XXX_DiscardUnknown() {
   166  	xxx_messageInfo_DiffRequest.DiscardUnknown(m)
   167  }
   168  
   169  var xxx_messageInfo_DiffRequest proto.InternalMessageInfo
   170  
   171  type DiffResponse struct {
   172  	// Diff is the descriptor of the diff which can be applied
   173  	Diff                 *types.Descriptor `protobuf:"bytes,3,opt,name=diff,proto3" json:"diff,omitempty"`
   174  	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
   175  	XXX_unrecognized     []byte            `json:"-"`
   176  	XXX_sizecache        int32             `json:"-"`
   177  }
   178  
   179  func (m *DiffResponse) Reset()      { *m = DiffResponse{} }
   180  func (*DiffResponse) ProtoMessage() {}
   181  func (*DiffResponse) Descriptor() ([]byte, []int) {
   182  	return fileDescriptor_3b36a99e6faaa935, []int{3}
   183  }
   184  func (m *DiffResponse) XXX_Unmarshal(b []byte) error {
   185  	return m.Unmarshal(b)
   186  }
   187  func (m *DiffResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   188  	if deterministic {
   189  		return xxx_messageInfo_DiffResponse.Marshal(b, m, deterministic)
   190  	} else {
   191  		b = b[:cap(b)]
   192  		n, err := m.MarshalToSizedBuffer(b)
   193  		if err != nil {
   194  			return nil, err
   195  		}
   196  		return b[:n], nil
   197  	}
   198  }
   199  func (m *DiffResponse) XXX_Merge(src proto.Message) {
   200  	xxx_messageInfo_DiffResponse.Merge(m, src)
   201  }
   202  func (m *DiffResponse) XXX_Size() int {
   203  	return m.Size()
   204  }
   205  func (m *DiffResponse) XXX_DiscardUnknown() {
   206  	xxx_messageInfo_DiffResponse.DiscardUnknown(m)
   207  }
   208  
   209  var xxx_messageInfo_DiffResponse proto.InternalMessageInfo
   210  
   211  func init() {
   212  	proto.RegisterType((*ApplyRequest)(nil), "containerd.services.diff.v1.ApplyRequest")
   213  	proto.RegisterMapType((map[string]*types1.Any)(nil), "containerd.services.diff.v1.ApplyRequest.PayloadsEntry")
   214  	proto.RegisterType((*ApplyResponse)(nil), "containerd.services.diff.v1.ApplyResponse")
   215  	proto.RegisterType((*DiffRequest)(nil), "containerd.services.diff.v1.DiffRequest")
   216  	proto.RegisterMapType((map[string]string)(nil), "containerd.services.diff.v1.DiffRequest.LabelsEntry")
   217  	proto.RegisterType((*DiffResponse)(nil), "containerd.services.diff.v1.DiffResponse")
   218  }
   219  
   220  func init() {
   221  	proto.RegisterFile("github.com/containerd/containerd/api/services/diff/v1/diff.proto", fileDescriptor_3b36a99e6faaa935)
   222  }
   223  
   224  var fileDescriptor_3b36a99e6faaa935 = []byte{
   225  	// 526 bytes of a gzipped FileDescriptorProto
   226  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x41, 0x6f, 0xd3, 0x4c,
   227  	0x10, 0x8d, 0xed, 0x24, 0xdf, 0x97, 0x49, 0x2b, 0xa1, 0x55, 0x24, 0x8c, 0x01, 0xab, 0xca, 0x29,
   228  	0x2d, 0x62, 0x4d, 0x03, 0x2a, 0xd0, 0x5e, 0x5a, 0x54, 0xc4, 0xa5, 0x48, 0x60, 0x7a, 0x40, 0x20,
   229  	0x81, 0x9c, 0x78, 0xed, 0xae, 0x70, 0xbc, 0x8b, 0x77, 0x1d, 0xc9, 0x37, 0xfe, 0x06, 0x67, 0x7e,
   230  	0x0a, 0x97, 0x1e, 0x39, 0x72, 0xa4, 0xf9, 0x25, 0xc8, 0xeb, 0x75, 0x31, 0x02, 0x05, 0xc3, 0xc9,
   231  	0x9b, 0x9d, 0xf7, 0xde, 0xce, 0xbc, 0x37, 0x0a, 0x1c, 0xc6, 0x54, 0x9e, 0xe5, 0x33, 0x3c, 0x67,
   232  	0x0b, 0x6f, 0xce, 0x52, 0x19, 0xd0, 0x94, 0x64, 0x61, 0xf3, 0x18, 0x70, 0xea, 0x09, 0x92, 0x2d,
   233  	0xe9, 0x9c, 0x08, 0x2f, 0xa4, 0x51, 0xe4, 0x2d, 0x77, 0xd5, 0x17, 0xf3, 0x8c, 0x49, 0x86, 0xae,
   234  	0xff, 0xc0, 0xe2, 0x1a, 0x87, 0x55, 0x7d, 0xb9, 0xeb, 0x8c, 0x62, 0x16, 0x33, 0x85, 0xf3, 0xca,
   235  	0x53, 0x45, 0x71, 0xae, 0xc5, 0x8c, 0xc5, 0x09, 0xf1, 0xd4, 0xaf, 0x59, 0x1e, 0x79, 0x41, 0x5a,
   236  	0xe8, 0xd2, 0x5e, 0xab, 0x7e, 0x64, 0xc1, 0x89, 0xf0, 0x16, 0x2c, 0x4f, 0xa5, 0xe6, 0x1d, 0xfc,
   237  	0x05, 0x2f, 0x24, 0x62, 0x9e, 0x51, 0x2e, 0x59, 0x56, 0x91, 0xc7, 0x1f, 0x4d, 0xd8, 0x38, 0xe2,
   238  	0x3c, 0x29, 0x7c, 0xf2, 0x3e, 0x27, 0x42, 0xa2, 0x3b, 0xd0, 0x2d, 0x27, 0xb0, 0x8d, 0x2d, 0x63,
   239  	0x32, 0x9c, 0xde, 0xc0, 0x8d, 0x11, 0x95, 0x04, 0x3e, 0xbe, 0x94, 0xf0, 0x15, 0x12, 0x79, 0xd0,
   240  	0x57, 0xed, 0x08, 0xdb, 0xdc, 0xb2, 0x26, 0xc3, 0xe9, 0xd5, 0x5f, 0x39, 0x4f, 0xcb, 0xba, 0xaf,
   241  	0x61, 0xe8, 0x05, 0xfc, 0xcf, 0x83, 0x22, 0x61, 0x41, 0x28, 0x6c, 0x4b, 0x51, 0xee, 0xe3, 0x35,
   242  	0x4e, 0xe2, 0x66, 0x7f, 0xf8, 0x99, 0x66, 0x3e, 0x4e, 0x65, 0x56, 0xf8, 0x97, 0x42, 0xce, 0x73,
   243  	0xd8, 0xfc, 0xa9, 0x84, 0xae, 0x80, 0xf5, 0x8e, 0x14, 0x6a, 0x8e, 0x81, 0x5f, 0x1e, 0xd1, 0x0e,
   244  	0xf4, 0x96, 0x41, 0x92, 0x13, 0xdb, 0x54, 0xb3, 0x8d, 0x70, 0x95, 0x05, 0xae, 0xb3, 0xc0, 0x47,
   245  	0x69, 0xe1, 0x57, 0x90, 0x7d, 0xf3, 0x81, 0x31, 0x7e, 0x02, 0x9b, 0xfa, 0x69, 0xc1, 0x59, 0x2a,
   246  	0x08, 0xda, 0x83, 0xff, 0x02, 0xce, 0x13, 0x4a, 0xc2, 0x56, 0xf6, 0xd4, 0xe0, 0xf1, 0x27, 0x13,
   247  	0x86, 0xc7, 0x34, 0x8a, 0x6a, 0x8f, 0x6f, 0x41, 0x37, 0x21, 0x91, 0xb4, 0x8d, 0xf5, 0x7e, 0x29,
   248  	0x10, 0xba, 0x0d, 0xbd, 0x8c, 0xc6, 0x67, 0xf2, 0x4f, 0xee, 0x56, 0x28, 0x74, 0x13, 0x60, 0x41,
   249  	0x42, 0x1a, 0xbc, 0x2d, 0x6b, 0xb6, 0xa5, 0xa6, 0x1f, 0xa8, 0x9b, 0xd3, 0x82, 0x93, 0xd2, 0x95,
   250  	0x8c, 0x44, 0x76, 0xb7, 0x72, 0x25, 0x23, 0x11, 0x3a, 0x81, 0x7e, 0x12, 0xcc, 0x48, 0x22, 0xec,
   251  	0x9e, 0x7a, 0xe0, 0xde, 0xda, 0x2c, 0x1a, 0x63, 0xe0, 0x13, 0x45, 0xab, 0x82, 0xd0, 0x1a, 0xce,
   252  	0x43, 0x18, 0x36, 0xae, 0x7f, 0x13, 0xc2, 0xa8, 0x19, 0xc2, 0xa0, 0x69, 0xf7, 0x21, 0x6c, 0x54,
   253  	0xea, 0xda, 0xed, 0x7a, 0x13, 0xad, 0xb6, 0x9b, 0x38, 0xfd, 0x6c, 0x40, 0xb7, 0x94, 0x40, 0x6f,
   254  	0xa0, 0xa7, 0x92, 0x43, 0xdb, 0xad, 0x17, 0xcb, 0xd9, 0x69, 0x03, 0xd5, 0xad, 0xbd, 0xd6, 0xef,
   255  	0x4c, 0xda, 0x7a, 0xe5, 0x6c, 0xb7, 0x40, 0x56, 0xe2, 0x8f, 0x4e, 0xcf, 0x2f, 0xdc, 0xce, 0xd7,
   256  	0x0b, 0xb7, 0xf3, 0x61, 0xe5, 0x1a, 0xe7, 0x2b, 0xd7, 0xf8, 0xb2, 0x72, 0x8d, 0x6f, 0x2b, 0xd7,
   257  	0x78, 0xb5, 0xff, 0x4f, 0xff, 0x58, 0x07, 0xe5, 0xf7, 0x65, 0x67, 0xd6, 0x57, 0x7b, 0x7e, 0xf7,
   258  	0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x85, 0x25, 0xb8, 0xf8, 0x04, 0x00, 0x00,
   259  }
   260  
   261  // Reference imports to suppress errors if they are not otherwise used.
   262  var _ context.Context
   263  var _ grpc.ClientConn
   264  
   265  // This is a compile-time assertion to ensure that this generated file
   266  // is compatible with the grpc package it is being compiled against.
   267  const _ = grpc.SupportPackageIsVersion4
   268  
   269  // DiffClient is the client API for Diff service.
   270  //
   271  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   272  type DiffClient interface {
   273  	// Apply applies the content associated with the provided digests onto
   274  	// the provided mounts. Archive content will be extracted and
   275  	// decompressed if necessary.
   276  	Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error)
   277  	// Diff creates a diff between the given mounts and uploads the result
   278  	// to the content store.
   279  	Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error)
   280  }
   281  
   282  type diffClient struct {
   283  	cc *grpc.ClientConn
   284  }
   285  
   286  func NewDiffClient(cc *grpc.ClientConn) DiffClient {
   287  	return &diffClient{cc}
   288  }
   289  
   290  func (c *diffClient) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) {
   291  	out := new(ApplyResponse)
   292  	err := c.cc.Invoke(ctx, "/containerd.services.diff.v1.Diff/Apply", in, out, opts...)
   293  	if err != nil {
   294  		return nil, err
   295  	}
   296  	return out, nil
   297  }
   298  
   299  func (c *diffClient) Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error) {
   300  	out := new(DiffResponse)
   301  	err := c.cc.Invoke(ctx, "/containerd.services.diff.v1.Diff/Diff", in, out, opts...)
   302  	if err != nil {
   303  		return nil, err
   304  	}
   305  	return out, nil
   306  }
   307  
   308  // DiffServer is the server API for Diff service.
   309  type DiffServer interface {
   310  	// Apply applies the content associated with the provided digests onto
   311  	// the provided mounts. Archive content will be extracted and
   312  	// decompressed if necessary.
   313  	Apply(context.Context, *ApplyRequest) (*ApplyResponse, error)
   314  	// Diff creates a diff between the given mounts and uploads the result
   315  	// to the content store.
   316  	Diff(context.Context, *DiffRequest) (*DiffResponse, error)
   317  }
   318  
   319  // UnimplementedDiffServer can be embedded to have forward compatible implementations.
   320  type UnimplementedDiffServer struct {
   321  }
   322  
   323  func (*UnimplementedDiffServer) Apply(ctx context.Context, req *ApplyRequest) (*ApplyResponse, error) {
   324  	return nil, status.Errorf(codes.Unimplemented, "method Apply not implemented")
   325  }
   326  func (*UnimplementedDiffServer) Diff(ctx context.Context, req *DiffRequest) (*DiffResponse, error) {
   327  	return nil, status.Errorf(codes.Unimplemented, "method Diff not implemented")
   328  }
   329  
   330  func RegisterDiffServer(s *grpc.Server, srv DiffServer) {
   331  	s.RegisterService(&_Diff_serviceDesc, srv)
   332  }
   333  
   334  func _Diff_Apply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   335  	in := new(ApplyRequest)
   336  	if err := dec(in); err != nil {
   337  		return nil, err
   338  	}
   339  	if interceptor == nil {
   340  		return srv.(DiffServer).Apply(ctx, in)
   341  	}
   342  	info := &grpc.UnaryServerInfo{
   343  		Server:     srv,
   344  		FullMethod: "/containerd.services.diff.v1.Diff/Apply",
   345  	}
   346  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   347  		return srv.(DiffServer).Apply(ctx, req.(*ApplyRequest))
   348  	}
   349  	return interceptor(ctx, in, info, handler)
   350  }
   351  
   352  func _Diff_Diff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   353  	in := new(DiffRequest)
   354  	if err := dec(in); err != nil {
   355  		return nil, err
   356  	}
   357  	if interceptor == nil {
   358  		return srv.(DiffServer).Diff(ctx, in)
   359  	}
   360  	info := &grpc.UnaryServerInfo{
   361  		Server:     srv,
   362  		FullMethod: "/containerd.services.diff.v1.Diff/Diff",
   363  	}
   364  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   365  		return srv.(DiffServer).Diff(ctx, req.(*DiffRequest))
   366  	}
   367  	return interceptor(ctx, in, info, handler)
   368  }
   369  
   370  var _Diff_serviceDesc = grpc.ServiceDesc{
   371  	ServiceName: "containerd.services.diff.v1.Diff",
   372  	HandlerType: (*DiffServer)(nil),
   373  	Methods: []grpc.MethodDesc{
   374  		{
   375  			MethodName: "Apply",
   376  			Handler:    _Diff_Apply_Handler,
   377  		},
   378  		{
   379  			MethodName: "Diff",
   380  			Handler:    _Diff_Diff_Handler,
   381  		},
   382  	},
   383  	Streams:  []grpc.StreamDesc{},
   384  	Metadata: "github.com/containerd/containerd/api/services/diff/v1/diff.proto",
   385  }
   386  
   387  func (m *ApplyRequest) Marshal() (dAtA []byte, err error) {
   388  	size := m.Size()
   389  	dAtA = make([]byte, size)
   390  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   391  	if err != nil {
   392  		return nil, err
   393  	}
   394  	return dAtA[:n], nil
   395  }
   396  
   397  func (m *ApplyRequest) MarshalTo(dAtA []byte) (int, error) {
   398  	size := m.Size()
   399  	return m.MarshalToSizedBuffer(dAtA[:size])
   400  }
   401  
   402  func (m *ApplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   403  	i := len(dAtA)
   404  	_ = i
   405  	var l int
   406  	_ = l
   407  	if m.XXX_unrecognized != nil {
   408  		i -= len(m.XXX_unrecognized)
   409  		copy(dAtA[i:], m.XXX_unrecognized)
   410  	}
   411  	if len(m.Payloads) > 0 {
   412  		for k := range m.Payloads {
   413  			v := m.Payloads[k]
   414  			baseI := i
   415  			if v != nil {
   416  				{
   417  					size, err := v.MarshalToSizedBuffer(dAtA[:i])
   418  					if err != nil {
   419  						return 0, err
   420  					}
   421  					i -= size
   422  					i = encodeVarintDiff(dAtA, i, uint64(size))
   423  				}
   424  				i--
   425  				dAtA[i] = 0x12
   426  			}
   427  			i -= len(k)
   428  			copy(dAtA[i:], k)
   429  			i = encodeVarintDiff(dAtA, i, uint64(len(k)))
   430  			i--
   431  			dAtA[i] = 0xa
   432  			i = encodeVarintDiff(dAtA, i, uint64(baseI-i))
   433  			i--
   434  			dAtA[i] = 0x1a
   435  		}
   436  	}
   437  	if len(m.Mounts) > 0 {
   438  		for iNdEx := len(m.Mounts) - 1; iNdEx >= 0; iNdEx-- {
   439  			{
   440  				size, err := m.Mounts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   441  				if err != nil {
   442  					return 0, err
   443  				}
   444  				i -= size
   445  				i = encodeVarintDiff(dAtA, i, uint64(size))
   446  			}
   447  			i--
   448  			dAtA[i] = 0x12
   449  		}
   450  	}
   451  	if m.Diff != nil {
   452  		{
   453  			size, err := m.Diff.MarshalToSizedBuffer(dAtA[:i])
   454  			if err != nil {
   455  				return 0, err
   456  			}
   457  			i -= size
   458  			i = encodeVarintDiff(dAtA, i, uint64(size))
   459  		}
   460  		i--
   461  		dAtA[i] = 0xa
   462  	}
   463  	return len(dAtA) - i, nil
   464  }
   465  
   466  func (m *ApplyResponse) Marshal() (dAtA []byte, err error) {
   467  	size := m.Size()
   468  	dAtA = make([]byte, size)
   469  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   470  	if err != nil {
   471  		return nil, err
   472  	}
   473  	return dAtA[:n], nil
   474  }
   475  
   476  func (m *ApplyResponse) MarshalTo(dAtA []byte) (int, error) {
   477  	size := m.Size()
   478  	return m.MarshalToSizedBuffer(dAtA[:size])
   479  }
   480  
   481  func (m *ApplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   482  	i := len(dAtA)
   483  	_ = i
   484  	var l int
   485  	_ = l
   486  	if m.XXX_unrecognized != nil {
   487  		i -= len(m.XXX_unrecognized)
   488  		copy(dAtA[i:], m.XXX_unrecognized)
   489  	}
   490  	if m.Applied != nil {
   491  		{
   492  			size, err := m.Applied.MarshalToSizedBuffer(dAtA[:i])
   493  			if err != nil {
   494  				return 0, err
   495  			}
   496  			i -= size
   497  			i = encodeVarintDiff(dAtA, i, uint64(size))
   498  		}
   499  		i--
   500  		dAtA[i] = 0xa
   501  	}
   502  	return len(dAtA) - i, nil
   503  }
   504  
   505  func (m *DiffRequest) Marshal() (dAtA []byte, err error) {
   506  	size := m.Size()
   507  	dAtA = make([]byte, size)
   508  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   509  	if err != nil {
   510  		return nil, err
   511  	}
   512  	return dAtA[:n], nil
   513  }
   514  
   515  func (m *DiffRequest) MarshalTo(dAtA []byte) (int, error) {
   516  	size := m.Size()
   517  	return m.MarshalToSizedBuffer(dAtA[:size])
   518  }
   519  
   520  func (m *DiffRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   521  	i := len(dAtA)
   522  	_ = i
   523  	var l int
   524  	_ = l
   525  	if m.XXX_unrecognized != nil {
   526  		i -= len(m.XXX_unrecognized)
   527  		copy(dAtA[i:], m.XXX_unrecognized)
   528  	}
   529  	if len(m.Labels) > 0 {
   530  		for k := range m.Labels {
   531  			v := m.Labels[k]
   532  			baseI := i
   533  			i -= len(v)
   534  			copy(dAtA[i:], v)
   535  			i = encodeVarintDiff(dAtA, i, uint64(len(v)))
   536  			i--
   537  			dAtA[i] = 0x12
   538  			i -= len(k)
   539  			copy(dAtA[i:], k)
   540  			i = encodeVarintDiff(dAtA, i, uint64(len(k)))
   541  			i--
   542  			dAtA[i] = 0xa
   543  			i = encodeVarintDiff(dAtA, i, uint64(baseI-i))
   544  			i--
   545  			dAtA[i] = 0x2a
   546  		}
   547  	}
   548  	if len(m.Ref) > 0 {
   549  		i -= len(m.Ref)
   550  		copy(dAtA[i:], m.Ref)
   551  		i = encodeVarintDiff(dAtA, i, uint64(len(m.Ref)))
   552  		i--
   553  		dAtA[i] = 0x22
   554  	}
   555  	if len(m.MediaType) > 0 {
   556  		i -= len(m.MediaType)
   557  		copy(dAtA[i:], m.MediaType)
   558  		i = encodeVarintDiff(dAtA, i, uint64(len(m.MediaType)))
   559  		i--
   560  		dAtA[i] = 0x1a
   561  	}
   562  	if len(m.Right) > 0 {
   563  		for iNdEx := len(m.Right) - 1; iNdEx >= 0; iNdEx-- {
   564  			{
   565  				size, err := m.Right[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   566  				if err != nil {
   567  					return 0, err
   568  				}
   569  				i -= size
   570  				i = encodeVarintDiff(dAtA, i, uint64(size))
   571  			}
   572  			i--
   573  			dAtA[i] = 0x12
   574  		}
   575  	}
   576  	if len(m.Left) > 0 {
   577  		for iNdEx := len(m.Left) - 1; iNdEx >= 0; iNdEx-- {
   578  			{
   579  				size, err := m.Left[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   580  				if err != nil {
   581  					return 0, err
   582  				}
   583  				i -= size
   584  				i = encodeVarintDiff(dAtA, i, uint64(size))
   585  			}
   586  			i--
   587  			dAtA[i] = 0xa
   588  		}
   589  	}
   590  	return len(dAtA) - i, nil
   591  }
   592  
   593  func (m *DiffResponse) Marshal() (dAtA []byte, err error) {
   594  	size := m.Size()
   595  	dAtA = make([]byte, size)
   596  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   597  	if err != nil {
   598  		return nil, err
   599  	}
   600  	return dAtA[:n], nil
   601  }
   602  
   603  func (m *DiffResponse) MarshalTo(dAtA []byte) (int, error) {
   604  	size := m.Size()
   605  	return m.MarshalToSizedBuffer(dAtA[:size])
   606  }
   607  
   608  func (m *DiffResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   609  	i := len(dAtA)
   610  	_ = i
   611  	var l int
   612  	_ = l
   613  	if m.XXX_unrecognized != nil {
   614  		i -= len(m.XXX_unrecognized)
   615  		copy(dAtA[i:], m.XXX_unrecognized)
   616  	}
   617  	if m.Diff != nil {
   618  		{
   619  			size, err := m.Diff.MarshalToSizedBuffer(dAtA[:i])
   620  			if err != nil {
   621  				return 0, err
   622  			}
   623  			i -= size
   624  			i = encodeVarintDiff(dAtA, i, uint64(size))
   625  		}
   626  		i--
   627  		dAtA[i] = 0x1a
   628  	}
   629  	return len(dAtA) - i, nil
   630  }
   631  
   632  func encodeVarintDiff(dAtA []byte, offset int, v uint64) int {
   633  	offset -= sovDiff(v)
   634  	base := offset
   635  	for v >= 1<<7 {
   636  		dAtA[offset] = uint8(v&0x7f | 0x80)
   637  		v >>= 7
   638  		offset++
   639  	}
   640  	dAtA[offset] = uint8(v)
   641  	return base
   642  }
   643  func (m *ApplyRequest) Size() (n int) {
   644  	if m == nil {
   645  		return 0
   646  	}
   647  	var l int
   648  	_ = l
   649  	if m.Diff != nil {
   650  		l = m.Diff.Size()
   651  		n += 1 + l + sovDiff(uint64(l))
   652  	}
   653  	if len(m.Mounts) > 0 {
   654  		for _, e := range m.Mounts {
   655  			l = e.Size()
   656  			n += 1 + l + sovDiff(uint64(l))
   657  		}
   658  	}
   659  	if len(m.Payloads) > 0 {
   660  		for k, v := range m.Payloads {
   661  			_ = k
   662  			_ = v
   663  			l = 0
   664  			if v != nil {
   665  				l = v.Size()
   666  				l += 1 + sovDiff(uint64(l))
   667  			}
   668  			mapEntrySize := 1 + len(k) + sovDiff(uint64(len(k))) + l
   669  			n += mapEntrySize + 1 + sovDiff(uint64(mapEntrySize))
   670  		}
   671  	}
   672  	if m.XXX_unrecognized != nil {
   673  		n += len(m.XXX_unrecognized)
   674  	}
   675  	return n
   676  }
   677  
   678  func (m *ApplyResponse) Size() (n int) {
   679  	if m == nil {
   680  		return 0
   681  	}
   682  	var l int
   683  	_ = l
   684  	if m.Applied != nil {
   685  		l = m.Applied.Size()
   686  		n += 1 + l + sovDiff(uint64(l))
   687  	}
   688  	if m.XXX_unrecognized != nil {
   689  		n += len(m.XXX_unrecognized)
   690  	}
   691  	return n
   692  }
   693  
   694  func (m *DiffRequest) Size() (n int) {
   695  	if m == nil {
   696  		return 0
   697  	}
   698  	var l int
   699  	_ = l
   700  	if len(m.Left) > 0 {
   701  		for _, e := range m.Left {
   702  			l = e.Size()
   703  			n += 1 + l + sovDiff(uint64(l))
   704  		}
   705  	}
   706  	if len(m.Right) > 0 {
   707  		for _, e := range m.Right {
   708  			l = e.Size()
   709  			n += 1 + l + sovDiff(uint64(l))
   710  		}
   711  	}
   712  	l = len(m.MediaType)
   713  	if l > 0 {
   714  		n += 1 + l + sovDiff(uint64(l))
   715  	}
   716  	l = len(m.Ref)
   717  	if l > 0 {
   718  		n += 1 + l + sovDiff(uint64(l))
   719  	}
   720  	if len(m.Labels) > 0 {
   721  		for k, v := range m.Labels {
   722  			_ = k
   723  			_ = v
   724  			mapEntrySize := 1 + len(k) + sovDiff(uint64(len(k))) + 1 + len(v) + sovDiff(uint64(len(v)))
   725  			n += mapEntrySize + 1 + sovDiff(uint64(mapEntrySize))
   726  		}
   727  	}
   728  	if m.XXX_unrecognized != nil {
   729  		n += len(m.XXX_unrecognized)
   730  	}
   731  	return n
   732  }
   733  
   734  func (m *DiffResponse) Size() (n int) {
   735  	if m == nil {
   736  		return 0
   737  	}
   738  	var l int
   739  	_ = l
   740  	if m.Diff != nil {
   741  		l = m.Diff.Size()
   742  		n += 1 + l + sovDiff(uint64(l))
   743  	}
   744  	if m.XXX_unrecognized != nil {
   745  		n += len(m.XXX_unrecognized)
   746  	}
   747  	return n
   748  }
   749  
   750  func sovDiff(x uint64) (n int) {
   751  	return (math_bits.Len64(x|1) + 6) / 7
   752  }
   753  func sozDiff(x uint64) (n int) {
   754  	return sovDiff(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   755  }
   756  func (this *ApplyRequest) String() string {
   757  	if this == nil {
   758  		return "nil"
   759  	}
   760  	repeatedStringForMounts := "[]*Mount{"
   761  	for _, f := range this.Mounts {
   762  		repeatedStringForMounts += strings.Replace(fmt.Sprintf("%v", f), "Mount", "types.Mount", 1) + ","
   763  	}
   764  	repeatedStringForMounts += "}"
   765  	keysForPayloads := make([]string, 0, len(this.Payloads))
   766  	for k, _ := range this.Payloads {
   767  		keysForPayloads = append(keysForPayloads, k)
   768  	}
   769  	github_com_gogo_protobuf_sortkeys.Strings(keysForPayloads)
   770  	mapStringForPayloads := "map[string]*types1.Any{"
   771  	for _, k := range keysForPayloads {
   772  		mapStringForPayloads += fmt.Sprintf("%v: %v,", k, this.Payloads[k])
   773  	}
   774  	mapStringForPayloads += "}"
   775  	s := strings.Join([]string{`&ApplyRequest{`,
   776  		`Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Descriptor", "types.Descriptor", 1) + `,`,
   777  		`Mounts:` + repeatedStringForMounts + `,`,
   778  		`Payloads:` + mapStringForPayloads + `,`,
   779  		`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
   780  		`}`,
   781  	}, "")
   782  	return s
   783  }
   784  func (this *ApplyResponse) String() string {
   785  	if this == nil {
   786  		return "nil"
   787  	}
   788  	s := strings.Join([]string{`&ApplyResponse{`,
   789  		`Applied:` + strings.Replace(fmt.Sprintf("%v", this.Applied), "Descriptor", "types.Descriptor", 1) + `,`,
   790  		`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
   791  		`}`,
   792  	}, "")
   793  	return s
   794  }
   795  func (this *DiffRequest) String() string {
   796  	if this == nil {
   797  		return "nil"
   798  	}
   799  	repeatedStringForLeft := "[]*Mount{"
   800  	for _, f := range this.Left {
   801  		repeatedStringForLeft += strings.Replace(fmt.Sprintf("%v", f), "Mount", "types.Mount", 1) + ","
   802  	}
   803  	repeatedStringForLeft += "}"
   804  	repeatedStringForRight := "[]*Mount{"
   805  	for _, f := range this.Right {
   806  		repeatedStringForRight += strings.Replace(fmt.Sprintf("%v", f), "Mount", "types.Mount", 1) + ","
   807  	}
   808  	repeatedStringForRight += "}"
   809  	keysForLabels := make([]string, 0, len(this.Labels))
   810  	for k, _ := range this.Labels {
   811  		keysForLabels = append(keysForLabels, k)
   812  	}
   813  	github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
   814  	mapStringForLabels := "map[string]string{"
   815  	for _, k := range keysForLabels {
   816  		mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
   817  	}
   818  	mapStringForLabels += "}"
   819  	s := strings.Join([]string{`&DiffRequest{`,
   820  		`Left:` + repeatedStringForLeft + `,`,
   821  		`Right:` + repeatedStringForRight + `,`,
   822  		`MediaType:` + fmt.Sprintf("%v", this.MediaType) + `,`,
   823  		`Ref:` + fmt.Sprintf("%v", this.Ref) + `,`,
   824  		`Labels:` + mapStringForLabels + `,`,
   825  		`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
   826  		`}`,
   827  	}, "")
   828  	return s
   829  }
   830  func (this *DiffResponse) String() string {
   831  	if this == nil {
   832  		return "nil"
   833  	}
   834  	s := strings.Join([]string{`&DiffResponse{`,
   835  		`Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Descriptor", "types.Descriptor", 1) + `,`,
   836  		`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
   837  		`}`,
   838  	}, "")
   839  	return s
   840  }
   841  func valueToStringDiff(v interface{}) string {
   842  	rv := reflect.ValueOf(v)
   843  	if rv.IsNil() {
   844  		return "nil"
   845  	}
   846  	pv := reflect.Indirect(rv).Interface()
   847  	return fmt.Sprintf("*%v", pv)
   848  }
   849  func (m *ApplyRequest) Unmarshal(dAtA []byte) error {
   850  	l := len(dAtA)
   851  	iNdEx := 0
   852  	for iNdEx < l {
   853  		preIndex := iNdEx
   854  		var wire uint64
   855  		for shift := uint(0); ; shift += 7 {
   856  			if shift >= 64 {
   857  				return ErrIntOverflowDiff
   858  			}
   859  			if iNdEx >= l {
   860  				return io.ErrUnexpectedEOF
   861  			}
   862  			b := dAtA[iNdEx]
   863  			iNdEx++
   864  			wire |= uint64(b&0x7F) << shift
   865  			if b < 0x80 {
   866  				break
   867  			}
   868  		}
   869  		fieldNum := int32(wire >> 3)
   870  		wireType := int(wire & 0x7)
   871  		if wireType == 4 {
   872  			return fmt.Errorf("proto: ApplyRequest: wiretype end group for non-group")
   873  		}
   874  		if fieldNum <= 0 {
   875  			return fmt.Errorf("proto: ApplyRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   876  		}
   877  		switch fieldNum {
   878  		case 1:
   879  			if wireType != 2 {
   880  				return fmt.Errorf("proto: wrong wireType = %d for field Diff", wireType)
   881  			}
   882  			var msglen int
   883  			for shift := uint(0); ; shift += 7 {
   884  				if shift >= 64 {
   885  					return ErrIntOverflowDiff
   886  				}
   887  				if iNdEx >= l {
   888  					return io.ErrUnexpectedEOF
   889  				}
   890  				b := dAtA[iNdEx]
   891  				iNdEx++
   892  				msglen |= int(b&0x7F) << shift
   893  				if b < 0x80 {
   894  					break
   895  				}
   896  			}
   897  			if msglen < 0 {
   898  				return ErrInvalidLengthDiff
   899  			}
   900  			postIndex := iNdEx + msglen
   901  			if postIndex < 0 {
   902  				return ErrInvalidLengthDiff
   903  			}
   904  			if postIndex > l {
   905  				return io.ErrUnexpectedEOF
   906  			}
   907  			if m.Diff == nil {
   908  				m.Diff = &types.Descriptor{}
   909  			}
   910  			if err := m.Diff.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   911  				return err
   912  			}
   913  			iNdEx = postIndex
   914  		case 2:
   915  			if wireType != 2 {
   916  				return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType)
   917  			}
   918  			var msglen int
   919  			for shift := uint(0); ; shift += 7 {
   920  				if shift >= 64 {
   921  					return ErrIntOverflowDiff
   922  				}
   923  				if iNdEx >= l {
   924  					return io.ErrUnexpectedEOF
   925  				}
   926  				b := dAtA[iNdEx]
   927  				iNdEx++
   928  				msglen |= int(b&0x7F) << shift
   929  				if b < 0x80 {
   930  					break
   931  				}
   932  			}
   933  			if msglen < 0 {
   934  				return ErrInvalidLengthDiff
   935  			}
   936  			postIndex := iNdEx + msglen
   937  			if postIndex < 0 {
   938  				return ErrInvalidLengthDiff
   939  			}
   940  			if postIndex > l {
   941  				return io.ErrUnexpectedEOF
   942  			}
   943  			m.Mounts = append(m.Mounts, &types.Mount{})
   944  			if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   945  				return err
   946  			}
   947  			iNdEx = postIndex
   948  		case 3:
   949  			if wireType != 2 {
   950  				return fmt.Errorf("proto: wrong wireType = %d for field Payloads", wireType)
   951  			}
   952  			var msglen int
   953  			for shift := uint(0); ; shift += 7 {
   954  				if shift >= 64 {
   955  					return ErrIntOverflowDiff
   956  				}
   957  				if iNdEx >= l {
   958  					return io.ErrUnexpectedEOF
   959  				}
   960  				b := dAtA[iNdEx]
   961  				iNdEx++
   962  				msglen |= int(b&0x7F) << shift
   963  				if b < 0x80 {
   964  					break
   965  				}
   966  			}
   967  			if msglen < 0 {
   968  				return ErrInvalidLengthDiff
   969  			}
   970  			postIndex := iNdEx + msglen
   971  			if postIndex < 0 {
   972  				return ErrInvalidLengthDiff
   973  			}
   974  			if postIndex > l {
   975  				return io.ErrUnexpectedEOF
   976  			}
   977  			if m.Payloads == nil {
   978  				m.Payloads = make(map[string]*types1.Any)
   979  			}
   980  			var mapkey string
   981  			var mapvalue *types1.Any
   982  			for iNdEx < postIndex {
   983  				entryPreIndex := iNdEx
   984  				var wire uint64
   985  				for shift := uint(0); ; shift += 7 {
   986  					if shift >= 64 {
   987  						return ErrIntOverflowDiff
   988  					}
   989  					if iNdEx >= l {
   990  						return io.ErrUnexpectedEOF
   991  					}
   992  					b := dAtA[iNdEx]
   993  					iNdEx++
   994  					wire |= uint64(b&0x7F) << shift
   995  					if b < 0x80 {
   996  						break
   997  					}
   998  				}
   999  				fieldNum := int32(wire >> 3)
  1000  				if fieldNum == 1 {
  1001  					var stringLenmapkey uint64
  1002  					for shift := uint(0); ; shift += 7 {
  1003  						if shift >= 64 {
  1004  							return ErrIntOverflowDiff
  1005  						}
  1006  						if iNdEx >= l {
  1007  							return io.ErrUnexpectedEOF
  1008  						}
  1009  						b := dAtA[iNdEx]
  1010  						iNdEx++
  1011  						stringLenmapkey |= uint64(b&0x7F) << shift
  1012  						if b < 0x80 {
  1013  							break
  1014  						}
  1015  					}
  1016  					intStringLenmapkey := int(stringLenmapkey)
  1017  					if intStringLenmapkey < 0 {
  1018  						return ErrInvalidLengthDiff
  1019  					}
  1020  					postStringIndexmapkey := iNdEx + intStringLenmapkey
  1021  					if postStringIndexmapkey < 0 {
  1022  						return ErrInvalidLengthDiff
  1023  					}
  1024  					if postStringIndexmapkey > l {
  1025  						return io.ErrUnexpectedEOF
  1026  					}
  1027  					mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  1028  					iNdEx = postStringIndexmapkey
  1029  				} else if fieldNum == 2 {
  1030  					var mapmsglen int
  1031  					for shift := uint(0); ; shift += 7 {
  1032  						if shift >= 64 {
  1033  							return ErrIntOverflowDiff
  1034  						}
  1035  						if iNdEx >= l {
  1036  							return io.ErrUnexpectedEOF
  1037  						}
  1038  						b := dAtA[iNdEx]
  1039  						iNdEx++
  1040  						mapmsglen |= int(b&0x7F) << shift
  1041  						if b < 0x80 {
  1042  							break
  1043  						}
  1044  					}
  1045  					if mapmsglen < 0 {
  1046  						return ErrInvalidLengthDiff
  1047  					}
  1048  					postmsgIndex := iNdEx + mapmsglen
  1049  					if postmsgIndex < 0 {
  1050  						return ErrInvalidLengthDiff
  1051  					}
  1052  					if postmsgIndex > l {
  1053  						return io.ErrUnexpectedEOF
  1054  					}
  1055  					mapvalue = &types1.Any{}
  1056  					if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
  1057  						return err
  1058  					}
  1059  					iNdEx = postmsgIndex
  1060  				} else {
  1061  					iNdEx = entryPreIndex
  1062  					skippy, err := skipDiff(dAtA[iNdEx:])
  1063  					if err != nil {
  1064  						return err
  1065  					}
  1066  					if (skippy < 0) || (iNdEx+skippy) < 0 {
  1067  						return ErrInvalidLengthDiff
  1068  					}
  1069  					if (iNdEx + skippy) > postIndex {
  1070  						return io.ErrUnexpectedEOF
  1071  					}
  1072  					iNdEx += skippy
  1073  				}
  1074  			}
  1075  			m.Payloads[mapkey] = mapvalue
  1076  			iNdEx = postIndex
  1077  		default:
  1078  			iNdEx = preIndex
  1079  			skippy, err := skipDiff(dAtA[iNdEx:])
  1080  			if err != nil {
  1081  				return err
  1082  			}
  1083  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1084  				return ErrInvalidLengthDiff
  1085  			}
  1086  			if (iNdEx + skippy) > l {
  1087  				return io.ErrUnexpectedEOF
  1088  			}
  1089  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1090  			iNdEx += skippy
  1091  		}
  1092  	}
  1093  
  1094  	if iNdEx > l {
  1095  		return io.ErrUnexpectedEOF
  1096  	}
  1097  	return nil
  1098  }
  1099  func (m *ApplyResponse) Unmarshal(dAtA []byte) error {
  1100  	l := len(dAtA)
  1101  	iNdEx := 0
  1102  	for iNdEx < l {
  1103  		preIndex := iNdEx
  1104  		var wire uint64
  1105  		for shift := uint(0); ; shift += 7 {
  1106  			if shift >= 64 {
  1107  				return ErrIntOverflowDiff
  1108  			}
  1109  			if iNdEx >= l {
  1110  				return io.ErrUnexpectedEOF
  1111  			}
  1112  			b := dAtA[iNdEx]
  1113  			iNdEx++
  1114  			wire |= uint64(b&0x7F) << shift
  1115  			if b < 0x80 {
  1116  				break
  1117  			}
  1118  		}
  1119  		fieldNum := int32(wire >> 3)
  1120  		wireType := int(wire & 0x7)
  1121  		if wireType == 4 {
  1122  			return fmt.Errorf("proto: ApplyResponse: wiretype end group for non-group")
  1123  		}
  1124  		if fieldNum <= 0 {
  1125  			return fmt.Errorf("proto: ApplyResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1126  		}
  1127  		switch fieldNum {
  1128  		case 1:
  1129  			if wireType != 2 {
  1130  				return fmt.Errorf("proto: wrong wireType = %d for field Applied", wireType)
  1131  			}
  1132  			var msglen int
  1133  			for shift := uint(0); ; shift += 7 {
  1134  				if shift >= 64 {
  1135  					return ErrIntOverflowDiff
  1136  				}
  1137  				if iNdEx >= l {
  1138  					return io.ErrUnexpectedEOF
  1139  				}
  1140  				b := dAtA[iNdEx]
  1141  				iNdEx++
  1142  				msglen |= int(b&0x7F) << shift
  1143  				if b < 0x80 {
  1144  					break
  1145  				}
  1146  			}
  1147  			if msglen < 0 {
  1148  				return ErrInvalidLengthDiff
  1149  			}
  1150  			postIndex := iNdEx + msglen
  1151  			if postIndex < 0 {
  1152  				return ErrInvalidLengthDiff
  1153  			}
  1154  			if postIndex > l {
  1155  				return io.ErrUnexpectedEOF
  1156  			}
  1157  			if m.Applied == nil {
  1158  				m.Applied = &types.Descriptor{}
  1159  			}
  1160  			if err := m.Applied.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1161  				return err
  1162  			}
  1163  			iNdEx = postIndex
  1164  		default:
  1165  			iNdEx = preIndex
  1166  			skippy, err := skipDiff(dAtA[iNdEx:])
  1167  			if err != nil {
  1168  				return err
  1169  			}
  1170  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1171  				return ErrInvalidLengthDiff
  1172  			}
  1173  			if (iNdEx + skippy) > l {
  1174  				return io.ErrUnexpectedEOF
  1175  			}
  1176  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1177  			iNdEx += skippy
  1178  		}
  1179  	}
  1180  
  1181  	if iNdEx > l {
  1182  		return io.ErrUnexpectedEOF
  1183  	}
  1184  	return nil
  1185  }
  1186  func (m *DiffRequest) Unmarshal(dAtA []byte) error {
  1187  	l := len(dAtA)
  1188  	iNdEx := 0
  1189  	for iNdEx < l {
  1190  		preIndex := iNdEx
  1191  		var wire uint64
  1192  		for shift := uint(0); ; shift += 7 {
  1193  			if shift >= 64 {
  1194  				return ErrIntOverflowDiff
  1195  			}
  1196  			if iNdEx >= l {
  1197  				return io.ErrUnexpectedEOF
  1198  			}
  1199  			b := dAtA[iNdEx]
  1200  			iNdEx++
  1201  			wire |= uint64(b&0x7F) << shift
  1202  			if b < 0x80 {
  1203  				break
  1204  			}
  1205  		}
  1206  		fieldNum := int32(wire >> 3)
  1207  		wireType := int(wire & 0x7)
  1208  		if wireType == 4 {
  1209  			return fmt.Errorf("proto: DiffRequest: wiretype end group for non-group")
  1210  		}
  1211  		if fieldNum <= 0 {
  1212  			return fmt.Errorf("proto: DiffRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1213  		}
  1214  		switch fieldNum {
  1215  		case 1:
  1216  			if wireType != 2 {
  1217  				return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType)
  1218  			}
  1219  			var msglen int
  1220  			for shift := uint(0); ; shift += 7 {
  1221  				if shift >= 64 {
  1222  					return ErrIntOverflowDiff
  1223  				}
  1224  				if iNdEx >= l {
  1225  					return io.ErrUnexpectedEOF
  1226  				}
  1227  				b := dAtA[iNdEx]
  1228  				iNdEx++
  1229  				msglen |= int(b&0x7F) << shift
  1230  				if b < 0x80 {
  1231  					break
  1232  				}
  1233  			}
  1234  			if msglen < 0 {
  1235  				return ErrInvalidLengthDiff
  1236  			}
  1237  			postIndex := iNdEx + msglen
  1238  			if postIndex < 0 {
  1239  				return ErrInvalidLengthDiff
  1240  			}
  1241  			if postIndex > l {
  1242  				return io.ErrUnexpectedEOF
  1243  			}
  1244  			m.Left = append(m.Left, &types.Mount{})
  1245  			if err := m.Left[len(m.Left)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1246  				return err
  1247  			}
  1248  			iNdEx = postIndex
  1249  		case 2:
  1250  			if wireType != 2 {
  1251  				return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType)
  1252  			}
  1253  			var msglen int
  1254  			for shift := uint(0); ; shift += 7 {
  1255  				if shift >= 64 {
  1256  					return ErrIntOverflowDiff
  1257  				}
  1258  				if iNdEx >= l {
  1259  					return io.ErrUnexpectedEOF
  1260  				}
  1261  				b := dAtA[iNdEx]
  1262  				iNdEx++
  1263  				msglen |= int(b&0x7F) << shift
  1264  				if b < 0x80 {
  1265  					break
  1266  				}
  1267  			}
  1268  			if msglen < 0 {
  1269  				return ErrInvalidLengthDiff
  1270  			}
  1271  			postIndex := iNdEx + msglen
  1272  			if postIndex < 0 {
  1273  				return ErrInvalidLengthDiff
  1274  			}
  1275  			if postIndex > l {
  1276  				return io.ErrUnexpectedEOF
  1277  			}
  1278  			m.Right = append(m.Right, &types.Mount{})
  1279  			if err := m.Right[len(m.Right)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1280  				return err
  1281  			}
  1282  			iNdEx = postIndex
  1283  		case 3:
  1284  			if wireType != 2 {
  1285  				return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType)
  1286  			}
  1287  			var stringLen uint64
  1288  			for shift := uint(0); ; shift += 7 {
  1289  				if shift >= 64 {
  1290  					return ErrIntOverflowDiff
  1291  				}
  1292  				if iNdEx >= l {
  1293  					return io.ErrUnexpectedEOF
  1294  				}
  1295  				b := dAtA[iNdEx]
  1296  				iNdEx++
  1297  				stringLen |= uint64(b&0x7F) << shift
  1298  				if b < 0x80 {
  1299  					break
  1300  				}
  1301  			}
  1302  			intStringLen := int(stringLen)
  1303  			if intStringLen < 0 {
  1304  				return ErrInvalidLengthDiff
  1305  			}
  1306  			postIndex := iNdEx + intStringLen
  1307  			if postIndex < 0 {
  1308  				return ErrInvalidLengthDiff
  1309  			}
  1310  			if postIndex > l {
  1311  				return io.ErrUnexpectedEOF
  1312  			}
  1313  			m.MediaType = string(dAtA[iNdEx:postIndex])
  1314  			iNdEx = postIndex
  1315  		case 4:
  1316  			if wireType != 2 {
  1317  				return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType)
  1318  			}
  1319  			var stringLen uint64
  1320  			for shift := uint(0); ; shift += 7 {
  1321  				if shift >= 64 {
  1322  					return ErrIntOverflowDiff
  1323  				}
  1324  				if iNdEx >= l {
  1325  					return io.ErrUnexpectedEOF
  1326  				}
  1327  				b := dAtA[iNdEx]
  1328  				iNdEx++
  1329  				stringLen |= uint64(b&0x7F) << shift
  1330  				if b < 0x80 {
  1331  					break
  1332  				}
  1333  			}
  1334  			intStringLen := int(stringLen)
  1335  			if intStringLen < 0 {
  1336  				return ErrInvalidLengthDiff
  1337  			}
  1338  			postIndex := iNdEx + intStringLen
  1339  			if postIndex < 0 {
  1340  				return ErrInvalidLengthDiff
  1341  			}
  1342  			if postIndex > l {
  1343  				return io.ErrUnexpectedEOF
  1344  			}
  1345  			m.Ref = string(dAtA[iNdEx:postIndex])
  1346  			iNdEx = postIndex
  1347  		case 5:
  1348  			if wireType != 2 {
  1349  				return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
  1350  			}
  1351  			var msglen int
  1352  			for shift := uint(0); ; shift += 7 {
  1353  				if shift >= 64 {
  1354  					return ErrIntOverflowDiff
  1355  				}
  1356  				if iNdEx >= l {
  1357  					return io.ErrUnexpectedEOF
  1358  				}
  1359  				b := dAtA[iNdEx]
  1360  				iNdEx++
  1361  				msglen |= int(b&0x7F) << shift
  1362  				if b < 0x80 {
  1363  					break
  1364  				}
  1365  			}
  1366  			if msglen < 0 {
  1367  				return ErrInvalidLengthDiff
  1368  			}
  1369  			postIndex := iNdEx + msglen
  1370  			if postIndex < 0 {
  1371  				return ErrInvalidLengthDiff
  1372  			}
  1373  			if postIndex > l {
  1374  				return io.ErrUnexpectedEOF
  1375  			}
  1376  			if m.Labels == nil {
  1377  				m.Labels = make(map[string]string)
  1378  			}
  1379  			var mapkey string
  1380  			var mapvalue string
  1381  			for iNdEx < postIndex {
  1382  				entryPreIndex := iNdEx
  1383  				var wire uint64
  1384  				for shift := uint(0); ; shift += 7 {
  1385  					if shift >= 64 {
  1386  						return ErrIntOverflowDiff
  1387  					}
  1388  					if iNdEx >= l {
  1389  						return io.ErrUnexpectedEOF
  1390  					}
  1391  					b := dAtA[iNdEx]
  1392  					iNdEx++
  1393  					wire |= uint64(b&0x7F) << shift
  1394  					if b < 0x80 {
  1395  						break
  1396  					}
  1397  				}
  1398  				fieldNum := int32(wire >> 3)
  1399  				if fieldNum == 1 {
  1400  					var stringLenmapkey uint64
  1401  					for shift := uint(0); ; shift += 7 {
  1402  						if shift >= 64 {
  1403  							return ErrIntOverflowDiff
  1404  						}
  1405  						if iNdEx >= l {
  1406  							return io.ErrUnexpectedEOF
  1407  						}
  1408  						b := dAtA[iNdEx]
  1409  						iNdEx++
  1410  						stringLenmapkey |= uint64(b&0x7F) << shift
  1411  						if b < 0x80 {
  1412  							break
  1413  						}
  1414  					}
  1415  					intStringLenmapkey := int(stringLenmapkey)
  1416  					if intStringLenmapkey < 0 {
  1417  						return ErrInvalidLengthDiff
  1418  					}
  1419  					postStringIndexmapkey := iNdEx + intStringLenmapkey
  1420  					if postStringIndexmapkey < 0 {
  1421  						return ErrInvalidLengthDiff
  1422  					}
  1423  					if postStringIndexmapkey > l {
  1424  						return io.ErrUnexpectedEOF
  1425  					}
  1426  					mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  1427  					iNdEx = postStringIndexmapkey
  1428  				} else if fieldNum == 2 {
  1429  					var stringLenmapvalue uint64
  1430  					for shift := uint(0); ; shift += 7 {
  1431  						if shift >= 64 {
  1432  							return ErrIntOverflowDiff
  1433  						}
  1434  						if iNdEx >= l {
  1435  							return io.ErrUnexpectedEOF
  1436  						}
  1437  						b := dAtA[iNdEx]
  1438  						iNdEx++
  1439  						stringLenmapvalue |= uint64(b&0x7F) << shift
  1440  						if b < 0x80 {
  1441  							break
  1442  						}
  1443  					}
  1444  					intStringLenmapvalue := int(stringLenmapvalue)
  1445  					if intStringLenmapvalue < 0 {
  1446  						return ErrInvalidLengthDiff
  1447  					}
  1448  					postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  1449  					if postStringIndexmapvalue < 0 {
  1450  						return ErrInvalidLengthDiff
  1451  					}
  1452  					if postStringIndexmapvalue > l {
  1453  						return io.ErrUnexpectedEOF
  1454  					}
  1455  					mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  1456  					iNdEx = postStringIndexmapvalue
  1457  				} else {
  1458  					iNdEx = entryPreIndex
  1459  					skippy, err := skipDiff(dAtA[iNdEx:])
  1460  					if err != nil {
  1461  						return err
  1462  					}
  1463  					if (skippy < 0) || (iNdEx+skippy) < 0 {
  1464  						return ErrInvalidLengthDiff
  1465  					}
  1466  					if (iNdEx + skippy) > postIndex {
  1467  						return io.ErrUnexpectedEOF
  1468  					}
  1469  					iNdEx += skippy
  1470  				}
  1471  			}
  1472  			m.Labels[mapkey] = mapvalue
  1473  			iNdEx = postIndex
  1474  		default:
  1475  			iNdEx = preIndex
  1476  			skippy, err := skipDiff(dAtA[iNdEx:])
  1477  			if err != nil {
  1478  				return err
  1479  			}
  1480  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1481  				return ErrInvalidLengthDiff
  1482  			}
  1483  			if (iNdEx + skippy) > l {
  1484  				return io.ErrUnexpectedEOF
  1485  			}
  1486  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1487  			iNdEx += skippy
  1488  		}
  1489  	}
  1490  
  1491  	if iNdEx > l {
  1492  		return io.ErrUnexpectedEOF
  1493  	}
  1494  	return nil
  1495  }
  1496  func (m *DiffResponse) Unmarshal(dAtA []byte) error {
  1497  	l := len(dAtA)
  1498  	iNdEx := 0
  1499  	for iNdEx < l {
  1500  		preIndex := iNdEx
  1501  		var wire uint64
  1502  		for shift := uint(0); ; shift += 7 {
  1503  			if shift >= 64 {
  1504  				return ErrIntOverflowDiff
  1505  			}
  1506  			if iNdEx >= l {
  1507  				return io.ErrUnexpectedEOF
  1508  			}
  1509  			b := dAtA[iNdEx]
  1510  			iNdEx++
  1511  			wire |= uint64(b&0x7F) << shift
  1512  			if b < 0x80 {
  1513  				break
  1514  			}
  1515  		}
  1516  		fieldNum := int32(wire >> 3)
  1517  		wireType := int(wire & 0x7)
  1518  		if wireType == 4 {
  1519  			return fmt.Errorf("proto: DiffResponse: wiretype end group for non-group")
  1520  		}
  1521  		if fieldNum <= 0 {
  1522  			return fmt.Errorf("proto: DiffResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1523  		}
  1524  		switch fieldNum {
  1525  		case 3:
  1526  			if wireType != 2 {
  1527  				return fmt.Errorf("proto: wrong wireType = %d for field Diff", wireType)
  1528  			}
  1529  			var msglen int
  1530  			for shift := uint(0); ; shift += 7 {
  1531  				if shift >= 64 {
  1532  					return ErrIntOverflowDiff
  1533  				}
  1534  				if iNdEx >= l {
  1535  					return io.ErrUnexpectedEOF
  1536  				}
  1537  				b := dAtA[iNdEx]
  1538  				iNdEx++
  1539  				msglen |= int(b&0x7F) << shift
  1540  				if b < 0x80 {
  1541  					break
  1542  				}
  1543  			}
  1544  			if msglen < 0 {
  1545  				return ErrInvalidLengthDiff
  1546  			}
  1547  			postIndex := iNdEx + msglen
  1548  			if postIndex < 0 {
  1549  				return ErrInvalidLengthDiff
  1550  			}
  1551  			if postIndex > l {
  1552  				return io.ErrUnexpectedEOF
  1553  			}
  1554  			if m.Diff == nil {
  1555  				m.Diff = &types.Descriptor{}
  1556  			}
  1557  			if err := m.Diff.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1558  				return err
  1559  			}
  1560  			iNdEx = postIndex
  1561  		default:
  1562  			iNdEx = preIndex
  1563  			skippy, err := skipDiff(dAtA[iNdEx:])
  1564  			if err != nil {
  1565  				return err
  1566  			}
  1567  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1568  				return ErrInvalidLengthDiff
  1569  			}
  1570  			if (iNdEx + skippy) > l {
  1571  				return io.ErrUnexpectedEOF
  1572  			}
  1573  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1574  			iNdEx += skippy
  1575  		}
  1576  	}
  1577  
  1578  	if iNdEx > l {
  1579  		return io.ErrUnexpectedEOF
  1580  	}
  1581  	return nil
  1582  }
  1583  func skipDiff(dAtA []byte) (n int, err error) {
  1584  	l := len(dAtA)
  1585  	iNdEx := 0
  1586  	depth := 0
  1587  	for iNdEx < l {
  1588  		var wire uint64
  1589  		for shift := uint(0); ; shift += 7 {
  1590  			if shift >= 64 {
  1591  				return 0, ErrIntOverflowDiff
  1592  			}
  1593  			if iNdEx >= l {
  1594  				return 0, io.ErrUnexpectedEOF
  1595  			}
  1596  			b := dAtA[iNdEx]
  1597  			iNdEx++
  1598  			wire |= (uint64(b) & 0x7F) << shift
  1599  			if b < 0x80 {
  1600  				break
  1601  			}
  1602  		}
  1603  		wireType := int(wire & 0x7)
  1604  		switch wireType {
  1605  		case 0:
  1606  			for shift := uint(0); ; shift += 7 {
  1607  				if shift >= 64 {
  1608  					return 0, ErrIntOverflowDiff
  1609  				}
  1610  				if iNdEx >= l {
  1611  					return 0, io.ErrUnexpectedEOF
  1612  				}
  1613  				iNdEx++
  1614  				if dAtA[iNdEx-1] < 0x80 {
  1615  					break
  1616  				}
  1617  			}
  1618  		case 1:
  1619  			iNdEx += 8
  1620  		case 2:
  1621  			var length int
  1622  			for shift := uint(0); ; shift += 7 {
  1623  				if shift >= 64 {
  1624  					return 0, ErrIntOverflowDiff
  1625  				}
  1626  				if iNdEx >= l {
  1627  					return 0, io.ErrUnexpectedEOF
  1628  				}
  1629  				b := dAtA[iNdEx]
  1630  				iNdEx++
  1631  				length |= (int(b) & 0x7F) << shift
  1632  				if b < 0x80 {
  1633  					break
  1634  				}
  1635  			}
  1636  			if length < 0 {
  1637  				return 0, ErrInvalidLengthDiff
  1638  			}
  1639  			iNdEx += length
  1640  		case 3:
  1641  			depth++
  1642  		case 4:
  1643  			if depth == 0 {
  1644  				return 0, ErrUnexpectedEndOfGroupDiff
  1645  			}
  1646  			depth--
  1647  		case 5:
  1648  			iNdEx += 4
  1649  		default:
  1650  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1651  		}
  1652  		if iNdEx < 0 {
  1653  			return 0, ErrInvalidLengthDiff
  1654  		}
  1655  		if depth == 0 {
  1656  			return iNdEx, nil
  1657  		}
  1658  	}
  1659  	return 0, io.ErrUnexpectedEOF
  1660  }
  1661  
  1662  var (
  1663  	ErrInvalidLengthDiff        = fmt.Errorf("proto: negative length found during unmarshaling")
  1664  	ErrIntOverflowDiff          = fmt.Errorf("proto: integer overflow")
  1665  	ErrUnexpectedEndOfGroupDiff = fmt.Errorf("proto: unexpected end of group")
  1666  )