github.com/lalkh/containerd@v1.4.3/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/containerd/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 {
  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 {
  1084  				return ErrInvalidLengthDiff
  1085  			}
  1086  			if (iNdEx + skippy) < 0 {
  1087  				return ErrInvalidLengthDiff
  1088  			}
  1089  			if (iNdEx + skippy) > l {
  1090  				return io.ErrUnexpectedEOF
  1091  			}
  1092  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1093  			iNdEx += skippy
  1094  		}
  1095  	}
  1096  
  1097  	if iNdEx > l {
  1098  		return io.ErrUnexpectedEOF
  1099  	}
  1100  	return nil
  1101  }
  1102  func (m *ApplyResponse) Unmarshal(dAtA []byte) error {
  1103  	l := len(dAtA)
  1104  	iNdEx := 0
  1105  	for iNdEx < l {
  1106  		preIndex := iNdEx
  1107  		var wire uint64
  1108  		for shift := uint(0); ; shift += 7 {
  1109  			if shift >= 64 {
  1110  				return ErrIntOverflowDiff
  1111  			}
  1112  			if iNdEx >= l {
  1113  				return io.ErrUnexpectedEOF
  1114  			}
  1115  			b := dAtA[iNdEx]
  1116  			iNdEx++
  1117  			wire |= uint64(b&0x7F) << shift
  1118  			if b < 0x80 {
  1119  				break
  1120  			}
  1121  		}
  1122  		fieldNum := int32(wire >> 3)
  1123  		wireType := int(wire & 0x7)
  1124  		if wireType == 4 {
  1125  			return fmt.Errorf("proto: ApplyResponse: wiretype end group for non-group")
  1126  		}
  1127  		if fieldNum <= 0 {
  1128  			return fmt.Errorf("proto: ApplyResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1129  		}
  1130  		switch fieldNum {
  1131  		case 1:
  1132  			if wireType != 2 {
  1133  				return fmt.Errorf("proto: wrong wireType = %d for field Applied", wireType)
  1134  			}
  1135  			var msglen int
  1136  			for shift := uint(0); ; shift += 7 {
  1137  				if shift >= 64 {
  1138  					return ErrIntOverflowDiff
  1139  				}
  1140  				if iNdEx >= l {
  1141  					return io.ErrUnexpectedEOF
  1142  				}
  1143  				b := dAtA[iNdEx]
  1144  				iNdEx++
  1145  				msglen |= int(b&0x7F) << shift
  1146  				if b < 0x80 {
  1147  					break
  1148  				}
  1149  			}
  1150  			if msglen < 0 {
  1151  				return ErrInvalidLengthDiff
  1152  			}
  1153  			postIndex := iNdEx + msglen
  1154  			if postIndex < 0 {
  1155  				return ErrInvalidLengthDiff
  1156  			}
  1157  			if postIndex > l {
  1158  				return io.ErrUnexpectedEOF
  1159  			}
  1160  			if m.Applied == nil {
  1161  				m.Applied = &types.Descriptor{}
  1162  			}
  1163  			if err := m.Applied.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1164  				return err
  1165  			}
  1166  			iNdEx = postIndex
  1167  		default:
  1168  			iNdEx = preIndex
  1169  			skippy, err := skipDiff(dAtA[iNdEx:])
  1170  			if err != nil {
  1171  				return err
  1172  			}
  1173  			if skippy < 0 {
  1174  				return ErrInvalidLengthDiff
  1175  			}
  1176  			if (iNdEx + skippy) < 0 {
  1177  				return ErrInvalidLengthDiff
  1178  			}
  1179  			if (iNdEx + skippy) > l {
  1180  				return io.ErrUnexpectedEOF
  1181  			}
  1182  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1183  			iNdEx += skippy
  1184  		}
  1185  	}
  1186  
  1187  	if iNdEx > l {
  1188  		return io.ErrUnexpectedEOF
  1189  	}
  1190  	return nil
  1191  }
  1192  func (m *DiffRequest) Unmarshal(dAtA []byte) error {
  1193  	l := len(dAtA)
  1194  	iNdEx := 0
  1195  	for iNdEx < l {
  1196  		preIndex := iNdEx
  1197  		var wire uint64
  1198  		for shift := uint(0); ; shift += 7 {
  1199  			if shift >= 64 {
  1200  				return ErrIntOverflowDiff
  1201  			}
  1202  			if iNdEx >= l {
  1203  				return io.ErrUnexpectedEOF
  1204  			}
  1205  			b := dAtA[iNdEx]
  1206  			iNdEx++
  1207  			wire |= uint64(b&0x7F) << shift
  1208  			if b < 0x80 {
  1209  				break
  1210  			}
  1211  		}
  1212  		fieldNum := int32(wire >> 3)
  1213  		wireType := int(wire & 0x7)
  1214  		if wireType == 4 {
  1215  			return fmt.Errorf("proto: DiffRequest: wiretype end group for non-group")
  1216  		}
  1217  		if fieldNum <= 0 {
  1218  			return fmt.Errorf("proto: DiffRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1219  		}
  1220  		switch fieldNum {
  1221  		case 1:
  1222  			if wireType != 2 {
  1223  				return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType)
  1224  			}
  1225  			var msglen int
  1226  			for shift := uint(0); ; shift += 7 {
  1227  				if shift >= 64 {
  1228  					return ErrIntOverflowDiff
  1229  				}
  1230  				if iNdEx >= l {
  1231  					return io.ErrUnexpectedEOF
  1232  				}
  1233  				b := dAtA[iNdEx]
  1234  				iNdEx++
  1235  				msglen |= int(b&0x7F) << shift
  1236  				if b < 0x80 {
  1237  					break
  1238  				}
  1239  			}
  1240  			if msglen < 0 {
  1241  				return ErrInvalidLengthDiff
  1242  			}
  1243  			postIndex := iNdEx + msglen
  1244  			if postIndex < 0 {
  1245  				return ErrInvalidLengthDiff
  1246  			}
  1247  			if postIndex > l {
  1248  				return io.ErrUnexpectedEOF
  1249  			}
  1250  			m.Left = append(m.Left, &types.Mount{})
  1251  			if err := m.Left[len(m.Left)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1252  				return err
  1253  			}
  1254  			iNdEx = postIndex
  1255  		case 2:
  1256  			if wireType != 2 {
  1257  				return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType)
  1258  			}
  1259  			var msglen int
  1260  			for shift := uint(0); ; shift += 7 {
  1261  				if shift >= 64 {
  1262  					return ErrIntOverflowDiff
  1263  				}
  1264  				if iNdEx >= l {
  1265  					return io.ErrUnexpectedEOF
  1266  				}
  1267  				b := dAtA[iNdEx]
  1268  				iNdEx++
  1269  				msglen |= int(b&0x7F) << shift
  1270  				if b < 0x80 {
  1271  					break
  1272  				}
  1273  			}
  1274  			if msglen < 0 {
  1275  				return ErrInvalidLengthDiff
  1276  			}
  1277  			postIndex := iNdEx + msglen
  1278  			if postIndex < 0 {
  1279  				return ErrInvalidLengthDiff
  1280  			}
  1281  			if postIndex > l {
  1282  				return io.ErrUnexpectedEOF
  1283  			}
  1284  			m.Right = append(m.Right, &types.Mount{})
  1285  			if err := m.Right[len(m.Right)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1286  				return err
  1287  			}
  1288  			iNdEx = postIndex
  1289  		case 3:
  1290  			if wireType != 2 {
  1291  				return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType)
  1292  			}
  1293  			var stringLen uint64
  1294  			for shift := uint(0); ; shift += 7 {
  1295  				if shift >= 64 {
  1296  					return ErrIntOverflowDiff
  1297  				}
  1298  				if iNdEx >= l {
  1299  					return io.ErrUnexpectedEOF
  1300  				}
  1301  				b := dAtA[iNdEx]
  1302  				iNdEx++
  1303  				stringLen |= uint64(b&0x7F) << shift
  1304  				if b < 0x80 {
  1305  					break
  1306  				}
  1307  			}
  1308  			intStringLen := int(stringLen)
  1309  			if intStringLen < 0 {
  1310  				return ErrInvalidLengthDiff
  1311  			}
  1312  			postIndex := iNdEx + intStringLen
  1313  			if postIndex < 0 {
  1314  				return ErrInvalidLengthDiff
  1315  			}
  1316  			if postIndex > l {
  1317  				return io.ErrUnexpectedEOF
  1318  			}
  1319  			m.MediaType = string(dAtA[iNdEx:postIndex])
  1320  			iNdEx = postIndex
  1321  		case 4:
  1322  			if wireType != 2 {
  1323  				return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType)
  1324  			}
  1325  			var stringLen uint64
  1326  			for shift := uint(0); ; shift += 7 {
  1327  				if shift >= 64 {
  1328  					return ErrIntOverflowDiff
  1329  				}
  1330  				if iNdEx >= l {
  1331  					return io.ErrUnexpectedEOF
  1332  				}
  1333  				b := dAtA[iNdEx]
  1334  				iNdEx++
  1335  				stringLen |= uint64(b&0x7F) << shift
  1336  				if b < 0x80 {
  1337  					break
  1338  				}
  1339  			}
  1340  			intStringLen := int(stringLen)
  1341  			if intStringLen < 0 {
  1342  				return ErrInvalidLengthDiff
  1343  			}
  1344  			postIndex := iNdEx + intStringLen
  1345  			if postIndex < 0 {
  1346  				return ErrInvalidLengthDiff
  1347  			}
  1348  			if postIndex > l {
  1349  				return io.ErrUnexpectedEOF
  1350  			}
  1351  			m.Ref = string(dAtA[iNdEx:postIndex])
  1352  			iNdEx = postIndex
  1353  		case 5:
  1354  			if wireType != 2 {
  1355  				return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
  1356  			}
  1357  			var msglen int
  1358  			for shift := uint(0); ; shift += 7 {
  1359  				if shift >= 64 {
  1360  					return ErrIntOverflowDiff
  1361  				}
  1362  				if iNdEx >= l {
  1363  					return io.ErrUnexpectedEOF
  1364  				}
  1365  				b := dAtA[iNdEx]
  1366  				iNdEx++
  1367  				msglen |= int(b&0x7F) << shift
  1368  				if b < 0x80 {
  1369  					break
  1370  				}
  1371  			}
  1372  			if msglen < 0 {
  1373  				return ErrInvalidLengthDiff
  1374  			}
  1375  			postIndex := iNdEx + msglen
  1376  			if postIndex < 0 {
  1377  				return ErrInvalidLengthDiff
  1378  			}
  1379  			if postIndex > l {
  1380  				return io.ErrUnexpectedEOF
  1381  			}
  1382  			if m.Labels == nil {
  1383  				m.Labels = make(map[string]string)
  1384  			}
  1385  			var mapkey string
  1386  			var mapvalue string
  1387  			for iNdEx < postIndex {
  1388  				entryPreIndex := iNdEx
  1389  				var wire uint64
  1390  				for shift := uint(0); ; shift += 7 {
  1391  					if shift >= 64 {
  1392  						return ErrIntOverflowDiff
  1393  					}
  1394  					if iNdEx >= l {
  1395  						return io.ErrUnexpectedEOF
  1396  					}
  1397  					b := dAtA[iNdEx]
  1398  					iNdEx++
  1399  					wire |= uint64(b&0x7F) << shift
  1400  					if b < 0x80 {
  1401  						break
  1402  					}
  1403  				}
  1404  				fieldNum := int32(wire >> 3)
  1405  				if fieldNum == 1 {
  1406  					var stringLenmapkey uint64
  1407  					for shift := uint(0); ; shift += 7 {
  1408  						if shift >= 64 {
  1409  							return ErrIntOverflowDiff
  1410  						}
  1411  						if iNdEx >= l {
  1412  							return io.ErrUnexpectedEOF
  1413  						}
  1414  						b := dAtA[iNdEx]
  1415  						iNdEx++
  1416  						stringLenmapkey |= uint64(b&0x7F) << shift
  1417  						if b < 0x80 {
  1418  							break
  1419  						}
  1420  					}
  1421  					intStringLenmapkey := int(stringLenmapkey)
  1422  					if intStringLenmapkey < 0 {
  1423  						return ErrInvalidLengthDiff
  1424  					}
  1425  					postStringIndexmapkey := iNdEx + intStringLenmapkey
  1426  					if postStringIndexmapkey < 0 {
  1427  						return ErrInvalidLengthDiff
  1428  					}
  1429  					if postStringIndexmapkey > l {
  1430  						return io.ErrUnexpectedEOF
  1431  					}
  1432  					mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  1433  					iNdEx = postStringIndexmapkey
  1434  				} else if fieldNum == 2 {
  1435  					var stringLenmapvalue uint64
  1436  					for shift := uint(0); ; shift += 7 {
  1437  						if shift >= 64 {
  1438  							return ErrIntOverflowDiff
  1439  						}
  1440  						if iNdEx >= l {
  1441  							return io.ErrUnexpectedEOF
  1442  						}
  1443  						b := dAtA[iNdEx]
  1444  						iNdEx++
  1445  						stringLenmapvalue |= uint64(b&0x7F) << shift
  1446  						if b < 0x80 {
  1447  							break
  1448  						}
  1449  					}
  1450  					intStringLenmapvalue := int(stringLenmapvalue)
  1451  					if intStringLenmapvalue < 0 {
  1452  						return ErrInvalidLengthDiff
  1453  					}
  1454  					postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  1455  					if postStringIndexmapvalue < 0 {
  1456  						return ErrInvalidLengthDiff
  1457  					}
  1458  					if postStringIndexmapvalue > l {
  1459  						return io.ErrUnexpectedEOF
  1460  					}
  1461  					mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  1462  					iNdEx = postStringIndexmapvalue
  1463  				} else {
  1464  					iNdEx = entryPreIndex
  1465  					skippy, err := skipDiff(dAtA[iNdEx:])
  1466  					if err != nil {
  1467  						return err
  1468  					}
  1469  					if skippy < 0 {
  1470  						return ErrInvalidLengthDiff
  1471  					}
  1472  					if (iNdEx + skippy) > postIndex {
  1473  						return io.ErrUnexpectedEOF
  1474  					}
  1475  					iNdEx += skippy
  1476  				}
  1477  			}
  1478  			m.Labels[mapkey] = mapvalue
  1479  			iNdEx = postIndex
  1480  		default:
  1481  			iNdEx = preIndex
  1482  			skippy, err := skipDiff(dAtA[iNdEx:])
  1483  			if err != nil {
  1484  				return err
  1485  			}
  1486  			if skippy < 0 {
  1487  				return ErrInvalidLengthDiff
  1488  			}
  1489  			if (iNdEx + skippy) < 0 {
  1490  				return ErrInvalidLengthDiff
  1491  			}
  1492  			if (iNdEx + skippy) > l {
  1493  				return io.ErrUnexpectedEOF
  1494  			}
  1495  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1496  			iNdEx += skippy
  1497  		}
  1498  	}
  1499  
  1500  	if iNdEx > l {
  1501  		return io.ErrUnexpectedEOF
  1502  	}
  1503  	return nil
  1504  }
  1505  func (m *DiffResponse) Unmarshal(dAtA []byte) error {
  1506  	l := len(dAtA)
  1507  	iNdEx := 0
  1508  	for iNdEx < l {
  1509  		preIndex := iNdEx
  1510  		var wire uint64
  1511  		for shift := uint(0); ; shift += 7 {
  1512  			if shift >= 64 {
  1513  				return ErrIntOverflowDiff
  1514  			}
  1515  			if iNdEx >= l {
  1516  				return io.ErrUnexpectedEOF
  1517  			}
  1518  			b := dAtA[iNdEx]
  1519  			iNdEx++
  1520  			wire |= uint64(b&0x7F) << shift
  1521  			if b < 0x80 {
  1522  				break
  1523  			}
  1524  		}
  1525  		fieldNum := int32(wire >> 3)
  1526  		wireType := int(wire & 0x7)
  1527  		if wireType == 4 {
  1528  			return fmt.Errorf("proto: DiffResponse: wiretype end group for non-group")
  1529  		}
  1530  		if fieldNum <= 0 {
  1531  			return fmt.Errorf("proto: DiffResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1532  		}
  1533  		switch fieldNum {
  1534  		case 3:
  1535  			if wireType != 2 {
  1536  				return fmt.Errorf("proto: wrong wireType = %d for field Diff", wireType)
  1537  			}
  1538  			var msglen int
  1539  			for shift := uint(0); ; shift += 7 {
  1540  				if shift >= 64 {
  1541  					return ErrIntOverflowDiff
  1542  				}
  1543  				if iNdEx >= l {
  1544  					return io.ErrUnexpectedEOF
  1545  				}
  1546  				b := dAtA[iNdEx]
  1547  				iNdEx++
  1548  				msglen |= int(b&0x7F) << shift
  1549  				if b < 0x80 {
  1550  					break
  1551  				}
  1552  			}
  1553  			if msglen < 0 {
  1554  				return ErrInvalidLengthDiff
  1555  			}
  1556  			postIndex := iNdEx + msglen
  1557  			if postIndex < 0 {
  1558  				return ErrInvalidLengthDiff
  1559  			}
  1560  			if postIndex > l {
  1561  				return io.ErrUnexpectedEOF
  1562  			}
  1563  			if m.Diff == nil {
  1564  				m.Diff = &types.Descriptor{}
  1565  			}
  1566  			if err := m.Diff.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1567  				return err
  1568  			}
  1569  			iNdEx = postIndex
  1570  		default:
  1571  			iNdEx = preIndex
  1572  			skippy, err := skipDiff(dAtA[iNdEx:])
  1573  			if err != nil {
  1574  				return err
  1575  			}
  1576  			if skippy < 0 {
  1577  				return ErrInvalidLengthDiff
  1578  			}
  1579  			if (iNdEx + skippy) < 0 {
  1580  				return ErrInvalidLengthDiff
  1581  			}
  1582  			if (iNdEx + skippy) > l {
  1583  				return io.ErrUnexpectedEOF
  1584  			}
  1585  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1586  			iNdEx += skippy
  1587  		}
  1588  	}
  1589  
  1590  	if iNdEx > l {
  1591  		return io.ErrUnexpectedEOF
  1592  	}
  1593  	return nil
  1594  }
  1595  func skipDiff(dAtA []byte) (n int, err error) {
  1596  	l := len(dAtA)
  1597  	iNdEx := 0
  1598  	depth := 0
  1599  	for iNdEx < l {
  1600  		var wire uint64
  1601  		for shift := uint(0); ; shift += 7 {
  1602  			if shift >= 64 {
  1603  				return 0, ErrIntOverflowDiff
  1604  			}
  1605  			if iNdEx >= l {
  1606  				return 0, io.ErrUnexpectedEOF
  1607  			}
  1608  			b := dAtA[iNdEx]
  1609  			iNdEx++
  1610  			wire |= (uint64(b) & 0x7F) << shift
  1611  			if b < 0x80 {
  1612  				break
  1613  			}
  1614  		}
  1615  		wireType := int(wire & 0x7)
  1616  		switch wireType {
  1617  		case 0:
  1618  			for shift := uint(0); ; shift += 7 {
  1619  				if shift >= 64 {
  1620  					return 0, ErrIntOverflowDiff
  1621  				}
  1622  				if iNdEx >= l {
  1623  					return 0, io.ErrUnexpectedEOF
  1624  				}
  1625  				iNdEx++
  1626  				if dAtA[iNdEx-1] < 0x80 {
  1627  					break
  1628  				}
  1629  			}
  1630  		case 1:
  1631  			iNdEx += 8
  1632  		case 2:
  1633  			var length int
  1634  			for shift := uint(0); ; shift += 7 {
  1635  				if shift >= 64 {
  1636  					return 0, ErrIntOverflowDiff
  1637  				}
  1638  				if iNdEx >= l {
  1639  					return 0, io.ErrUnexpectedEOF
  1640  				}
  1641  				b := dAtA[iNdEx]
  1642  				iNdEx++
  1643  				length |= (int(b) & 0x7F) << shift
  1644  				if b < 0x80 {
  1645  					break
  1646  				}
  1647  			}
  1648  			if length < 0 {
  1649  				return 0, ErrInvalidLengthDiff
  1650  			}
  1651  			iNdEx += length
  1652  		case 3:
  1653  			depth++
  1654  		case 4:
  1655  			if depth == 0 {
  1656  				return 0, ErrUnexpectedEndOfGroupDiff
  1657  			}
  1658  			depth--
  1659  		case 5:
  1660  			iNdEx += 4
  1661  		default:
  1662  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1663  		}
  1664  		if iNdEx < 0 {
  1665  			return 0, ErrInvalidLengthDiff
  1666  		}
  1667  		if depth == 0 {
  1668  			return iNdEx, nil
  1669  		}
  1670  	}
  1671  	return 0, io.ErrUnexpectedEOF
  1672  }
  1673  
  1674  var (
  1675  	ErrInvalidLengthDiff        = fmt.Errorf("proto: negative length found during unmarshaling")
  1676  	ErrIntOverflowDiff          = fmt.Errorf("proto: integer overflow")
  1677  	ErrUnexpectedEndOfGroupDiff = fmt.Errorf("proto: unexpected end of group")
  1678  )