github.com/onosproject/onos-api/go@v0.10.32/onos/e2t/e2/v1beta1/control.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: onos/e2t/e2/v1beta1/control.proto 3 4 // Package onos.e2t.e2.v1beta1 defines the interior gRPC interfaces for xApps to interact with E2T. 5 6 package v1beta1 7 8 import ( 9 context "context" 10 fmt "fmt" 11 _ "github.com/gogo/protobuf/gogoproto" 12 proto "github.com/gogo/protobuf/proto" 13 golang_proto "github.com/golang/protobuf/proto" 14 grpc "google.golang.org/grpc" 15 codes "google.golang.org/grpc/codes" 16 status "google.golang.org/grpc/status" 17 io "io" 18 math "math" 19 math_bits "math/bits" 20 ) 21 22 // Reference imports to suppress errors if they are not otherwise used. 23 var _ = proto.Marshal 24 var _ = golang_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 ControlRequest struct { 35 Headers RequestHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers"` 36 Message ControlMessage `protobuf:"bytes,2,opt,name=message,proto3" json:"message"` 37 CallProcessId []byte `protobuf:"bytes,3,opt,name=call_process_id,json=callProcessId,proto3" json:"call_process_id,omitempty"` 38 } 39 40 func (m *ControlRequest) Reset() { *m = ControlRequest{} } 41 func (m *ControlRequest) String() string { return proto.CompactTextString(m) } 42 func (*ControlRequest) ProtoMessage() {} 43 func (*ControlRequest) Descriptor() ([]byte, []int) { 44 return fileDescriptor_a705973a48f294ef, []int{0} 45 } 46 func (m *ControlRequest) XXX_Unmarshal(b []byte) error { 47 return m.Unmarshal(b) 48 } 49 func (m *ControlRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 50 if deterministic { 51 return xxx_messageInfo_ControlRequest.Marshal(b, m, deterministic) 52 } else { 53 b = b[:cap(b)] 54 n, err := m.MarshalToSizedBuffer(b) 55 if err != nil { 56 return nil, err 57 } 58 return b[:n], nil 59 } 60 } 61 func (m *ControlRequest) XXX_Merge(src proto.Message) { 62 xxx_messageInfo_ControlRequest.Merge(m, src) 63 } 64 func (m *ControlRequest) XXX_Size() int { 65 return m.Size() 66 } 67 func (m *ControlRequest) XXX_DiscardUnknown() { 68 xxx_messageInfo_ControlRequest.DiscardUnknown(m) 69 } 70 71 var xxx_messageInfo_ControlRequest proto.InternalMessageInfo 72 73 func (m *ControlRequest) GetHeaders() RequestHeaders { 74 if m != nil { 75 return m.Headers 76 } 77 return RequestHeaders{} 78 } 79 80 func (m *ControlRequest) GetMessage() ControlMessage { 81 if m != nil { 82 return m.Message 83 } 84 return ControlMessage{} 85 } 86 87 func (m *ControlRequest) GetCallProcessId() []byte { 88 if m != nil { 89 return m.CallProcessId 90 } 91 return nil 92 } 93 94 type ControlMessage struct { 95 Header []byte `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` 96 Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` 97 } 98 99 func (m *ControlMessage) Reset() { *m = ControlMessage{} } 100 func (m *ControlMessage) String() string { return proto.CompactTextString(m) } 101 func (*ControlMessage) ProtoMessage() {} 102 func (*ControlMessage) Descriptor() ([]byte, []int) { 103 return fileDescriptor_a705973a48f294ef, []int{1} 104 } 105 func (m *ControlMessage) XXX_Unmarshal(b []byte) error { 106 return m.Unmarshal(b) 107 } 108 func (m *ControlMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 109 if deterministic { 110 return xxx_messageInfo_ControlMessage.Marshal(b, m, deterministic) 111 } else { 112 b = b[:cap(b)] 113 n, err := m.MarshalToSizedBuffer(b) 114 if err != nil { 115 return nil, err 116 } 117 return b[:n], nil 118 } 119 } 120 func (m *ControlMessage) XXX_Merge(src proto.Message) { 121 xxx_messageInfo_ControlMessage.Merge(m, src) 122 } 123 func (m *ControlMessage) XXX_Size() int { 124 return m.Size() 125 } 126 func (m *ControlMessage) XXX_DiscardUnknown() { 127 xxx_messageInfo_ControlMessage.DiscardUnknown(m) 128 } 129 130 var xxx_messageInfo_ControlMessage proto.InternalMessageInfo 131 132 func (m *ControlMessage) GetHeader() []byte { 133 if m != nil { 134 return m.Header 135 } 136 return nil 137 } 138 139 func (m *ControlMessage) GetPayload() []byte { 140 if m != nil { 141 return m.Payload 142 } 143 return nil 144 } 145 146 type ControlResponse struct { 147 Headers ResponseHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers"` 148 Outcome ControlOutcome `protobuf:"bytes,2,opt,name=outcome,proto3" json:"outcome"` 149 } 150 151 func (m *ControlResponse) Reset() { *m = ControlResponse{} } 152 func (m *ControlResponse) String() string { return proto.CompactTextString(m) } 153 func (*ControlResponse) ProtoMessage() {} 154 func (*ControlResponse) Descriptor() ([]byte, []int) { 155 return fileDescriptor_a705973a48f294ef, []int{2} 156 } 157 func (m *ControlResponse) XXX_Unmarshal(b []byte) error { 158 return m.Unmarshal(b) 159 } 160 func (m *ControlResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 161 if deterministic { 162 return xxx_messageInfo_ControlResponse.Marshal(b, m, deterministic) 163 } else { 164 b = b[:cap(b)] 165 n, err := m.MarshalToSizedBuffer(b) 166 if err != nil { 167 return nil, err 168 } 169 return b[:n], nil 170 } 171 } 172 func (m *ControlResponse) XXX_Merge(src proto.Message) { 173 xxx_messageInfo_ControlResponse.Merge(m, src) 174 } 175 func (m *ControlResponse) XXX_Size() int { 176 return m.Size() 177 } 178 func (m *ControlResponse) XXX_DiscardUnknown() { 179 xxx_messageInfo_ControlResponse.DiscardUnknown(m) 180 } 181 182 var xxx_messageInfo_ControlResponse proto.InternalMessageInfo 183 184 func (m *ControlResponse) GetHeaders() ResponseHeaders { 185 if m != nil { 186 return m.Headers 187 } 188 return ResponseHeaders{} 189 } 190 191 func (m *ControlResponse) GetOutcome() ControlOutcome { 192 if m != nil { 193 return m.Outcome 194 } 195 return ControlOutcome{} 196 } 197 198 type ControlOutcome struct { 199 Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` 200 } 201 202 func (m *ControlOutcome) Reset() { *m = ControlOutcome{} } 203 func (m *ControlOutcome) String() string { return proto.CompactTextString(m) } 204 func (*ControlOutcome) ProtoMessage() {} 205 func (*ControlOutcome) Descriptor() ([]byte, []int) { 206 return fileDescriptor_a705973a48f294ef, []int{3} 207 } 208 func (m *ControlOutcome) XXX_Unmarshal(b []byte) error { 209 return m.Unmarshal(b) 210 } 211 func (m *ControlOutcome) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 212 if deterministic { 213 return xxx_messageInfo_ControlOutcome.Marshal(b, m, deterministic) 214 } else { 215 b = b[:cap(b)] 216 n, err := m.MarshalToSizedBuffer(b) 217 if err != nil { 218 return nil, err 219 } 220 return b[:n], nil 221 } 222 } 223 func (m *ControlOutcome) XXX_Merge(src proto.Message) { 224 xxx_messageInfo_ControlOutcome.Merge(m, src) 225 } 226 func (m *ControlOutcome) XXX_Size() int { 227 return m.Size() 228 } 229 func (m *ControlOutcome) XXX_DiscardUnknown() { 230 xxx_messageInfo_ControlOutcome.DiscardUnknown(m) 231 } 232 233 var xxx_messageInfo_ControlOutcome proto.InternalMessageInfo 234 235 func (m *ControlOutcome) GetPayload() []byte { 236 if m != nil { 237 return m.Payload 238 } 239 return nil 240 } 241 242 func init() { 243 proto.RegisterType((*ControlRequest)(nil), "onos.e2t.e2.v1beta1.ControlRequest") 244 golang_proto.RegisterType((*ControlRequest)(nil), "onos.e2t.e2.v1beta1.ControlRequest") 245 proto.RegisterType((*ControlMessage)(nil), "onos.e2t.e2.v1beta1.ControlMessage") 246 golang_proto.RegisterType((*ControlMessage)(nil), "onos.e2t.e2.v1beta1.ControlMessage") 247 proto.RegisterType((*ControlResponse)(nil), "onos.e2t.e2.v1beta1.ControlResponse") 248 golang_proto.RegisterType((*ControlResponse)(nil), "onos.e2t.e2.v1beta1.ControlResponse") 249 proto.RegisterType((*ControlOutcome)(nil), "onos.e2t.e2.v1beta1.ControlOutcome") 250 golang_proto.RegisterType((*ControlOutcome)(nil), "onos.e2t.e2.v1beta1.ControlOutcome") 251 } 252 253 func init() { proto.RegisterFile("onos/e2t/e2/v1beta1/control.proto", fileDescriptor_a705973a48f294ef) } 254 func init() { 255 golang_proto.RegisterFile("onos/e2t/e2/v1beta1/control.proto", fileDescriptor_a705973a48f294ef) 256 } 257 258 var fileDescriptor_a705973a48f294ef = []byte{ 259 // 355 bytes of a gzipped FileDescriptorProto 260 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x4a, 0xf3, 0x40, 261 0x14, 0x85, 0x33, 0xff, 0x2f, 0x2d, 0x8c, 0xd5, 0xc2, 0x28, 0x12, 0x4a, 0x19, 0x6b, 0x2c, 0x52, 262 0x5c, 0x24, 0x74, 0x7c, 0x83, 0xd6, 0x85, 0x2e, 0x44, 0x89, 0xee, 0x4b, 0x9a, 0x5c, 0x6b, 0x21, 263 0xed, 0xc4, 0xcc, 0xb4, 0xe0, 0x5b, 0xf8, 0x00, 0x3e, 0x8c, 0xb8, 0xea, 0xb2, 0x4b, 0x57, 0x22, 264 0xcd, 0x8b, 0x48, 0x32, 0x93, 0xa0, 0xd2, 0x06, 0x77, 0x99, 0x3b, 0xdf, 0x3d, 0xf7, 0x9e, 0x93, 265 0xc1, 0x47, 0x7c, 0xca, 0x85, 0x03, 0x4c, 0x3a, 0xc0, 0x9c, 0x79, 0x77, 0x08, 0xd2, 0xeb, 0x3a, 266 0x3e, 0x9f, 0xca, 0x98, 0x87, 0x76, 0x14, 0x73, 0xc9, 0xc9, 0x5e, 0x8a, 0xd8, 0xc0, 0xa4, 0x0d, 267 0xcc, 0xd6, 0x48, 0x63, 0x7f, 0xc4, 0x47, 0x3c, 0xbb, 0x77, 0xd2, 0x2f, 0x85, 0x36, 0x9a, 0xeb, 268 0xd4, 0x80, 0xa9, 0x5b, 0xeb, 0x0d, 0xe1, 0xdd, 0xbe, 0x92, 0x76, 0xe1, 0x71, 0x06, 0x42, 0x92, 269 0x3e, 0xae, 0x3e, 0x80, 0x17, 0x40, 0x2c, 0x4c, 0xd4, 0x42, 0x9d, 0x6d, 0x76, 0x6c, 0xaf, 0x99, 270 0x66, 0x6b, 0xfc, 0x42, 0xa1, 0xbd, 0xad, 0xc5, 0xc7, 0xa1, 0xe1, 0xe6, 0x9d, 0xa9, 0xc8, 0x04, 271 0x84, 0xf0, 0x46, 0x60, 0xfe, 0x2b, 0x11, 0xd1, 0xa3, 0xaf, 0x14, 0x9a, 0x8b, 0xe8, 0x4e, 0x72, 272 0x82, 0xeb, 0xbe, 0x17, 0x86, 0x83, 0x28, 0xe6, 0x3e, 0x08, 0x31, 0x18, 0x07, 0xe6, 0xff, 0x16, 273 0xea, 0xd4, 0xdc, 0x9d, 0xb4, 0x7c, 0xa3, 0xaa, 0x97, 0x81, 0xd5, 0x2b, 0x3c, 0x68, 0x21, 0x72, 274 0x80, 0x2b, 0x6a, 0x93, 0xcc, 0x42, 0xcd, 0xd5, 0x27, 0x62, 0xe2, 0x6a, 0xe4, 0x3d, 0x85, 0xdc, 275 0x0b, 0xb2, 0xb5, 0x6a, 0x6e, 0x7e, 0xb4, 0x5e, 0x10, 0xae, 0x17, 0x41, 0x88, 0x88, 0x4f, 0x05, 276 0x90, 0xf3, 0xdf, 0x49, 0xb4, 0x37, 0x24, 0xa1, 0xf8, 0xcd, 0x51, 0xf0, 0x99, 0xf4, 0xf9, 0xe4, 277 0x4f, 0x51, 0x5c, 0x2b, 0x34, 0x17, 0xd1, 0x9d, 0xd6, 0x69, 0x61, 0x51, 0x03, 0xdf, 0xad, 0xa0, 278 0x1f, 0x56, 0xd8, 0x7d, 0xc1, 0xde, 0x42, 0x3c, 0x1f, 0xfb, 0x40, 0xee, 0x70, 0x55, 0x57, 0x48, 279 0xe9, 0x70, 0xfd, 0x4f, 0x1b, 0xed, 0x72, 0x48, 0xd9, 0xed, 0x35, 0x17, 0x2b, 0x8a, 0x96, 0x2b, 280 0x8a, 0x3e, 0x57, 0x14, 0x3d, 0x27, 0xd4, 0x78, 0x4d, 0x28, 0x5a, 0x26, 0xd4, 0x78, 0x4f, 0xa8, 281 0x31, 0xac, 0x64, 0x0f, 0xec, 0xec, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x93, 0xcf, 0xf8, 0x3b, 0xce, 282 0x02, 0x00, 0x00, 283 } 284 285 // Reference imports to suppress errors if they are not otherwise used. 286 var _ context.Context 287 var _ grpc.ClientConn 288 289 // This is a compile-time assertion to ensure that this generated file 290 // is compatible with the grpc package it is being compiled against. 291 const _ = grpc.SupportPackageIsVersion4 292 293 // ControlServiceClient is the client API for ControlService service. 294 // 295 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 296 type ControlServiceClient interface { 297 Control(ctx context.Context, in *ControlRequest, opts ...grpc.CallOption) (*ControlResponse, error) 298 } 299 300 type controlServiceClient struct { 301 cc *grpc.ClientConn 302 } 303 304 func NewControlServiceClient(cc *grpc.ClientConn) ControlServiceClient { 305 return &controlServiceClient{cc} 306 } 307 308 func (c *controlServiceClient) Control(ctx context.Context, in *ControlRequest, opts ...grpc.CallOption) (*ControlResponse, error) { 309 out := new(ControlResponse) 310 err := c.cc.Invoke(ctx, "/onos.e2t.e2.v1beta1.ControlService/Control", in, out, opts...) 311 if err != nil { 312 return nil, err 313 } 314 return out, nil 315 } 316 317 // ControlServiceServer is the server API for ControlService service. 318 type ControlServiceServer interface { 319 Control(context.Context, *ControlRequest) (*ControlResponse, error) 320 } 321 322 // UnimplementedControlServiceServer can be embedded to have forward compatible implementations. 323 type UnimplementedControlServiceServer struct { 324 } 325 326 func (*UnimplementedControlServiceServer) Control(ctx context.Context, req *ControlRequest) (*ControlResponse, error) { 327 return nil, status.Errorf(codes.Unimplemented, "method Control not implemented") 328 } 329 330 func RegisterControlServiceServer(s *grpc.Server, srv ControlServiceServer) { 331 s.RegisterService(&_ControlService_serviceDesc, srv) 332 } 333 334 func _ControlService_Control_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 335 in := new(ControlRequest) 336 if err := dec(in); err != nil { 337 return nil, err 338 } 339 if interceptor == nil { 340 return srv.(ControlServiceServer).Control(ctx, in) 341 } 342 info := &grpc.UnaryServerInfo{ 343 Server: srv, 344 FullMethod: "/onos.e2t.e2.v1beta1.ControlService/Control", 345 } 346 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 347 return srv.(ControlServiceServer).Control(ctx, req.(*ControlRequest)) 348 } 349 return interceptor(ctx, in, info, handler) 350 } 351 352 var _ControlService_serviceDesc = grpc.ServiceDesc{ 353 ServiceName: "onos.e2t.e2.v1beta1.ControlService", 354 HandlerType: (*ControlServiceServer)(nil), 355 Methods: []grpc.MethodDesc{ 356 { 357 MethodName: "Control", 358 Handler: _ControlService_Control_Handler, 359 }, 360 }, 361 Streams: []grpc.StreamDesc{}, 362 Metadata: "onos/e2t/e2/v1beta1/control.proto", 363 } 364 365 func (m *ControlRequest) Marshal() (dAtA []byte, err error) { 366 size := m.Size() 367 dAtA = make([]byte, size) 368 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 369 if err != nil { 370 return nil, err 371 } 372 return dAtA[:n], nil 373 } 374 375 func (m *ControlRequest) MarshalTo(dAtA []byte) (int, error) { 376 size := m.Size() 377 return m.MarshalToSizedBuffer(dAtA[:size]) 378 } 379 380 func (m *ControlRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 381 i := len(dAtA) 382 _ = i 383 var l int 384 _ = l 385 if len(m.CallProcessId) > 0 { 386 i -= len(m.CallProcessId) 387 copy(dAtA[i:], m.CallProcessId) 388 i = encodeVarintControl(dAtA, i, uint64(len(m.CallProcessId))) 389 i-- 390 dAtA[i] = 0x1a 391 } 392 { 393 size, err := m.Message.MarshalToSizedBuffer(dAtA[:i]) 394 if err != nil { 395 return 0, err 396 } 397 i -= size 398 i = encodeVarintControl(dAtA, i, uint64(size)) 399 } 400 i-- 401 dAtA[i] = 0x12 402 { 403 size, err := m.Headers.MarshalToSizedBuffer(dAtA[:i]) 404 if err != nil { 405 return 0, err 406 } 407 i -= size 408 i = encodeVarintControl(dAtA, i, uint64(size)) 409 } 410 i-- 411 dAtA[i] = 0xa 412 return len(dAtA) - i, nil 413 } 414 415 func (m *ControlMessage) Marshal() (dAtA []byte, err error) { 416 size := m.Size() 417 dAtA = make([]byte, size) 418 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 419 if err != nil { 420 return nil, err 421 } 422 return dAtA[:n], nil 423 } 424 425 func (m *ControlMessage) MarshalTo(dAtA []byte) (int, error) { 426 size := m.Size() 427 return m.MarshalToSizedBuffer(dAtA[:size]) 428 } 429 430 func (m *ControlMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { 431 i := len(dAtA) 432 _ = i 433 var l int 434 _ = l 435 if len(m.Payload) > 0 { 436 i -= len(m.Payload) 437 copy(dAtA[i:], m.Payload) 438 i = encodeVarintControl(dAtA, i, uint64(len(m.Payload))) 439 i-- 440 dAtA[i] = 0x12 441 } 442 if len(m.Header) > 0 { 443 i -= len(m.Header) 444 copy(dAtA[i:], m.Header) 445 i = encodeVarintControl(dAtA, i, uint64(len(m.Header))) 446 i-- 447 dAtA[i] = 0xa 448 } 449 return len(dAtA) - i, nil 450 } 451 452 func (m *ControlResponse) Marshal() (dAtA []byte, err error) { 453 size := m.Size() 454 dAtA = make([]byte, size) 455 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 456 if err != nil { 457 return nil, err 458 } 459 return dAtA[:n], nil 460 } 461 462 func (m *ControlResponse) MarshalTo(dAtA []byte) (int, error) { 463 size := m.Size() 464 return m.MarshalToSizedBuffer(dAtA[:size]) 465 } 466 467 func (m *ControlResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 468 i := len(dAtA) 469 _ = i 470 var l int 471 _ = l 472 { 473 size, err := m.Outcome.MarshalToSizedBuffer(dAtA[:i]) 474 if err != nil { 475 return 0, err 476 } 477 i -= size 478 i = encodeVarintControl(dAtA, i, uint64(size)) 479 } 480 i-- 481 dAtA[i] = 0x12 482 { 483 size, err := m.Headers.MarshalToSizedBuffer(dAtA[:i]) 484 if err != nil { 485 return 0, err 486 } 487 i -= size 488 i = encodeVarintControl(dAtA, i, uint64(size)) 489 } 490 i-- 491 dAtA[i] = 0xa 492 return len(dAtA) - i, nil 493 } 494 495 func (m *ControlOutcome) Marshal() (dAtA []byte, err error) { 496 size := m.Size() 497 dAtA = make([]byte, size) 498 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 499 if err != nil { 500 return nil, err 501 } 502 return dAtA[:n], nil 503 } 504 505 func (m *ControlOutcome) MarshalTo(dAtA []byte) (int, error) { 506 size := m.Size() 507 return m.MarshalToSizedBuffer(dAtA[:size]) 508 } 509 510 func (m *ControlOutcome) MarshalToSizedBuffer(dAtA []byte) (int, error) { 511 i := len(dAtA) 512 _ = i 513 var l int 514 _ = l 515 if len(m.Payload) > 0 { 516 i -= len(m.Payload) 517 copy(dAtA[i:], m.Payload) 518 i = encodeVarintControl(dAtA, i, uint64(len(m.Payload))) 519 i-- 520 dAtA[i] = 0xa 521 } 522 return len(dAtA) - i, nil 523 } 524 525 func encodeVarintControl(dAtA []byte, offset int, v uint64) int { 526 offset -= sovControl(v) 527 base := offset 528 for v >= 1<<7 { 529 dAtA[offset] = uint8(v&0x7f | 0x80) 530 v >>= 7 531 offset++ 532 } 533 dAtA[offset] = uint8(v) 534 return base 535 } 536 func (m *ControlRequest) Size() (n int) { 537 if m == nil { 538 return 0 539 } 540 var l int 541 _ = l 542 l = m.Headers.Size() 543 n += 1 + l + sovControl(uint64(l)) 544 l = m.Message.Size() 545 n += 1 + l + sovControl(uint64(l)) 546 l = len(m.CallProcessId) 547 if l > 0 { 548 n += 1 + l + sovControl(uint64(l)) 549 } 550 return n 551 } 552 553 func (m *ControlMessage) Size() (n int) { 554 if m == nil { 555 return 0 556 } 557 var l int 558 _ = l 559 l = len(m.Header) 560 if l > 0 { 561 n += 1 + l + sovControl(uint64(l)) 562 } 563 l = len(m.Payload) 564 if l > 0 { 565 n += 1 + l + sovControl(uint64(l)) 566 } 567 return n 568 } 569 570 func (m *ControlResponse) Size() (n int) { 571 if m == nil { 572 return 0 573 } 574 var l int 575 _ = l 576 l = m.Headers.Size() 577 n += 1 + l + sovControl(uint64(l)) 578 l = m.Outcome.Size() 579 n += 1 + l + sovControl(uint64(l)) 580 return n 581 } 582 583 func (m *ControlOutcome) Size() (n int) { 584 if m == nil { 585 return 0 586 } 587 var l int 588 _ = l 589 l = len(m.Payload) 590 if l > 0 { 591 n += 1 + l + sovControl(uint64(l)) 592 } 593 return n 594 } 595 596 func sovControl(x uint64) (n int) { 597 return (math_bits.Len64(x|1) + 6) / 7 598 } 599 func sozControl(x uint64) (n int) { 600 return sovControl(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 601 } 602 func (m *ControlRequest) Unmarshal(dAtA []byte) error { 603 l := len(dAtA) 604 iNdEx := 0 605 for iNdEx < l { 606 preIndex := iNdEx 607 var wire uint64 608 for shift := uint(0); ; shift += 7 { 609 if shift >= 64 { 610 return ErrIntOverflowControl 611 } 612 if iNdEx >= l { 613 return io.ErrUnexpectedEOF 614 } 615 b := dAtA[iNdEx] 616 iNdEx++ 617 wire |= uint64(b&0x7F) << shift 618 if b < 0x80 { 619 break 620 } 621 } 622 fieldNum := int32(wire >> 3) 623 wireType := int(wire & 0x7) 624 if wireType == 4 { 625 return fmt.Errorf("proto: ControlRequest: wiretype end group for non-group") 626 } 627 if fieldNum <= 0 { 628 return fmt.Errorf("proto: ControlRequest: illegal tag %d (wire type %d)", fieldNum, wire) 629 } 630 switch fieldNum { 631 case 1: 632 if wireType != 2 { 633 return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) 634 } 635 var msglen int 636 for shift := uint(0); ; shift += 7 { 637 if shift >= 64 { 638 return ErrIntOverflowControl 639 } 640 if iNdEx >= l { 641 return io.ErrUnexpectedEOF 642 } 643 b := dAtA[iNdEx] 644 iNdEx++ 645 msglen |= int(b&0x7F) << shift 646 if b < 0x80 { 647 break 648 } 649 } 650 if msglen < 0 { 651 return ErrInvalidLengthControl 652 } 653 postIndex := iNdEx + msglen 654 if postIndex < 0 { 655 return ErrInvalidLengthControl 656 } 657 if postIndex > l { 658 return io.ErrUnexpectedEOF 659 } 660 if err := m.Headers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 661 return err 662 } 663 iNdEx = postIndex 664 case 2: 665 if wireType != 2 { 666 return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) 667 } 668 var msglen int 669 for shift := uint(0); ; shift += 7 { 670 if shift >= 64 { 671 return ErrIntOverflowControl 672 } 673 if iNdEx >= l { 674 return io.ErrUnexpectedEOF 675 } 676 b := dAtA[iNdEx] 677 iNdEx++ 678 msglen |= int(b&0x7F) << shift 679 if b < 0x80 { 680 break 681 } 682 } 683 if msglen < 0 { 684 return ErrInvalidLengthControl 685 } 686 postIndex := iNdEx + msglen 687 if postIndex < 0 { 688 return ErrInvalidLengthControl 689 } 690 if postIndex > l { 691 return io.ErrUnexpectedEOF 692 } 693 if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 694 return err 695 } 696 iNdEx = postIndex 697 case 3: 698 if wireType != 2 { 699 return fmt.Errorf("proto: wrong wireType = %d for field CallProcessId", wireType) 700 } 701 var byteLen int 702 for shift := uint(0); ; shift += 7 { 703 if shift >= 64 { 704 return ErrIntOverflowControl 705 } 706 if iNdEx >= l { 707 return io.ErrUnexpectedEOF 708 } 709 b := dAtA[iNdEx] 710 iNdEx++ 711 byteLen |= int(b&0x7F) << shift 712 if b < 0x80 { 713 break 714 } 715 } 716 if byteLen < 0 { 717 return ErrInvalidLengthControl 718 } 719 postIndex := iNdEx + byteLen 720 if postIndex < 0 { 721 return ErrInvalidLengthControl 722 } 723 if postIndex > l { 724 return io.ErrUnexpectedEOF 725 } 726 m.CallProcessId = append(m.CallProcessId[:0], dAtA[iNdEx:postIndex]...) 727 if m.CallProcessId == nil { 728 m.CallProcessId = []byte{} 729 } 730 iNdEx = postIndex 731 default: 732 iNdEx = preIndex 733 skippy, err := skipControl(dAtA[iNdEx:]) 734 if err != nil { 735 return err 736 } 737 if (skippy < 0) || (iNdEx+skippy) < 0 { 738 return ErrInvalidLengthControl 739 } 740 if (iNdEx + skippy) > l { 741 return io.ErrUnexpectedEOF 742 } 743 iNdEx += skippy 744 } 745 } 746 747 if iNdEx > l { 748 return io.ErrUnexpectedEOF 749 } 750 return nil 751 } 752 func (m *ControlMessage) Unmarshal(dAtA []byte) error { 753 l := len(dAtA) 754 iNdEx := 0 755 for iNdEx < l { 756 preIndex := iNdEx 757 var wire uint64 758 for shift := uint(0); ; shift += 7 { 759 if shift >= 64 { 760 return ErrIntOverflowControl 761 } 762 if iNdEx >= l { 763 return io.ErrUnexpectedEOF 764 } 765 b := dAtA[iNdEx] 766 iNdEx++ 767 wire |= uint64(b&0x7F) << shift 768 if b < 0x80 { 769 break 770 } 771 } 772 fieldNum := int32(wire >> 3) 773 wireType := int(wire & 0x7) 774 if wireType == 4 { 775 return fmt.Errorf("proto: ControlMessage: wiretype end group for non-group") 776 } 777 if fieldNum <= 0 { 778 return fmt.Errorf("proto: ControlMessage: illegal tag %d (wire type %d)", fieldNum, wire) 779 } 780 switch fieldNum { 781 case 1: 782 if wireType != 2 { 783 return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) 784 } 785 var byteLen int 786 for shift := uint(0); ; shift += 7 { 787 if shift >= 64 { 788 return ErrIntOverflowControl 789 } 790 if iNdEx >= l { 791 return io.ErrUnexpectedEOF 792 } 793 b := dAtA[iNdEx] 794 iNdEx++ 795 byteLen |= int(b&0x7F) << shift 796 if b < 0x80 { 797 break 798 } 799 } 800 if byteLen < 0 { 801 return ErrInvalidLengthControl 802 } 803 postIndex := iNdEx + byteLen 804 if postIndex < 0 { 805 return ErrInvalidLengthControl 806 } 807 if postIndex > l { 808 return io.ErrUnexpectedEOF 809 } 810 m.Header = append(m.Header[:0], dAtA[iNdEx:postIndex]...) 811 if m.Header == nil { 812 m.Header = []byte{} 813 } 814 iNdEx = postIndex 815 case 2: 816 if wireType != 2 { 817 return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) 818 } 819 var byteLen int 820 for shift := uint(0); ; shift += 7 { 821 if shift >= 64 { 822 return ErrIntOverflowControl 823 } 824 if iNdEx >= l { 825 return io.ErrUnexpectedEOF 826 } 827 b := dAtA[iNdEx] 828 iNdEx++ 829 byteLen |= int(b&0x7F) << shift 830 if b < 0x80 { 831 break 832 } 833 } 834 if byteLen < 0 { 835 return ErrInvalidLengthControl 836 } 837 postIndex := iNdEx + byteLen 838 if postIndex < 0 { 839 return ErrInvalidLengthControl 840 } 841 if postIndex > l { 842 return io.ErrUnexpectedEOF 843 } 844 m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) 845 if m.Payload == nil { 846 m.Payload = []byte{} 847 } 848 iNdEx = postIndex 849 default: 850 iNdEx = preIndex 851 skippy, err := skipControl(dAtA[iNdEx:]) 852 if err != nil { 853 return err 854 } 855 if (skippy < 0) || (iNdEx+skippy) < 0 { 856 return ErrInvalidLengthControl 857 } 858 if (iNdEx + skippy) > l { 859 return io.ErrUnexpectedEOF 860 } 861 iNdEx += skippy 862 } 863 } 864 865 if iNdEx > l { 866 return io.ErrUnexpectedEOF 867 } 868 return nil 869 } 870 func (m *ControlResponse) Unmarshal(dAtA []byte) error { 871 l := len(dAtA) 872 iNdEx := 0 873 for iNdEx < l { 874 preIndex := iNdEx 875 var wire uint64 876 for shift := uint(0); ; shift += 7 { 877 if shift >= 64 { 878 return ErrIntOverflowControl 879 } 880 if iNdEx >= l { 881 return io.ErrUnexpectedEOF 882 } 883 b := dAtA[iNdEx] 884 iNdEx++ 885 wire |= uint64(b&0x7F) << shift 886 if b < 0x80 { 887 break 888 } 889 } 890 fieldNum := int32(wire >> 3) 891 wireType := int(wire & 0x7) 892 if wireType == 4 { 893 return fmt.Errorf("proto: ControlResponse: wiretype end group for non-group") 894 } 895 if fieldNum <= 0 { 896 return fmt.Errorf("proto: ControlResponse: illegal tag %d (wire type %d)", fieldNum, wire) 897 } 898 switch fieldNum { 899 case 1: 900 if wireType != 2 { 901 return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) 902 } 903 var msglen int 904 for shift := uint(0); ; shift += 7 { 905 if shift >= 64 { 906 return ErrIntOverflowControl 907 } 908 if iNdEx >= l { 909 return io.ErrUnexpectedEOF 910 } 911 b := dAtA[iNdEx] 912 iNdEx++ 913 msglen |= int(b&0x7F) << shift 914 if b < 0x80 { 915 break 916 } 917 } 918 if msglen < 0 { 919 return ErrInvalidLengthControl 920 } 921 postIndex := iNdEx + msglen 922 if postIndex < 0 { 923 return ErrInvalidLengthControl 924 } 925 if postIndex > l { 926 return io.ErrUnexpectedEOF 927 } 928 if err := m.Headers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 929 return err 930 } 931 iNdEx = postIndex 932 case 2: 933 if wireType != 2 { 934 return fmt.Errorf("proto: wrong wireType = %d for field Outcome", wireType) 935 } 936 var msglen int 937 for shift := uint(0); ; shift += 7 { 938 if shift >= 64 { 939 return ErrIntOverflowControl 940 } 941 if iNdEx >= l { 942 return io.ErrUnexpectedEOF 943 } 944 b := dAtA[iNdEx] 945 iNdEx++ 946 msglen |= int(b&0x7F) << shift 947 if b < 0x80 { 948 break 949 } 950 } 951 if msglen < 0 { 952 return ErrInvalidLengthControl 953 } 954 postIndex := iNdEx + msglen 955 if postIndex < 0 { 956 return ErrInvalidLengthControl 957 } 958 if postIndex > l { 959 return io.ErrUnexpectedEOF 960 } 961 if err := m.Outcome.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 962 return err 963 } 964 iNdEx = postIndex 965 default: 966 iNdEx = preIndex 967 skippy, err := skipControl(dAtA[iNdEx:]) 968 if err != nil { 969 return err 970 } 971 if (skippy < 0) || (iNdEx+skippy) < 0 { 972 return ErrInvalidLengthControl 973 } 974 if (iNdEx + skippy) > l { 975 return io.ErrUnexpectedEOF 976 } 977 iNdEx += skippy 978 } 979 } 980 981 if iNdEx > l { 982 return io.ErrUnexpectedEOF 983 } 984 return nil 985 } 986 func (m *ControlOutcome) Unmarshal(dAtA []byte) error { 987 l := len(dAtA) 988 iNdEx := 0 989 for iNdEx < l { 990 preIndex := iNdEx 991 var wire uint64 992 for shift := uint(0); ; shift += 7 { 993 if shift >= 64 { 994 return ErrIntOverflowControl 995 } 996 if iNdEx >= l { 997 return io.ErrUnexpectedEOF 998 } 999 b := dAtA[iNdEx] 1000 iNdEx++ 1001 wire |= uint64(b&0x7F) << shift 1002 if b < 0x80 { 1003 break 1004 } 1005 } 1006 fieldNum := int32(wire >> 3) 1007 wireType := int(wire & 0x7) 1008 if wireType == 4 { 1009 return fmt.Errorf("proto: ControlOutcome: wiretype end group for non-group") 1010 } 1011 if fieldNum <= 0 { 1012 return fmt.Errorf("proto: ControlOutcome: illegal tag %d (wire type %d)", fieldNum, wire) 1013 } 1014 switch fieldNum { 1015 case 1: 1016 if wireType != 2 { 1017 return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) 1018 } 1019 var byteLen int 1020 for shift := uint(0); ; shift += 7 { 1021 if shift >= 64 { 1022 return ErrIntOverflowControl 1023 } 1024 if iNdEx >= l { 1025 return io.ErrUnexpectedEOF 1026 } 1027 b := dAtA[iNdEx] 1028 iNdEx++ 1029 byteLen |= int(b&0x7F) << shift 1030 if b < 0x80 { 1031 break 1032 } 1033 } 1034 if byteLen < 0 { 1035 return ErrInvalidLengthControl 1036 } 1037 postIndex := iNdEx + byteLen 1038 if postIndex < 0 { 1039 return ErrInvalidLengthControl 1040 } 1041 if postIndex > l { 1042 return io.ErrUnexpectedEOF 1043 } 1044 m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) 1045 if m.Payload == nil { 1046 m.Payload = []byte{} 1047 } 1048 iNdEx = postIndex 1049 default: 1050 iNdEx = preIndex 1051 skippy, err := skipControl(dAtA[iNdEx:]) 1052 if err != nil { 1053 return err 1054 } 1055 if (skippy < 0) || (iNdEx+skippy) < 0 { 1056 return ErrInvalidLengthControl 1057 } 1058 if (iNdEx + skippy) > l { 1059 return io.ErrUnexpectedEOF 1060 } 1061 iNdEx += skippy 1062 } 1063 } 1064 1065 if iNdEx > l { 1066 return io.ErrUnexpectedEOF 1067 } 1068 return nil 1069 } 1070 func skipControl(dAtA []byte) (n int, err error) { 1071 l := len(dAtA) 1072 iNdEx := 0 1073 depth := 0 1074 for iNdEx < l { 1075 var wire uint64 1076 for shift := uint(0); ; shift += 7 { 1077 if shift >= 64 { 1078 return 0, ErrIntOverflowControl 1079 } 1080 if iNdEx >= l { 1081 return 0, io.ErrUnexpectedEOF 1082 } 1083 b := dAtA[iNdEx] 1084 iNdEx++ 1085 wire |= (uint64(b) & 0x7F) << shift 1086 if b < 0x80 { 1087 break 1088 } 1089 } 1090 wireType := int(wire & 0x7) 1091 switch wireType { 1092 case 0: 1093 for shift := uint(0); ; shift += 7 { 1094 if shift >= 64 { 1095 return 0, ErrIntOverflowControl 1096 } 1097 if iNdEx >= l { 1098 return 0, io.ErrUnexpectedEOF 1099 } 1100 iNdEx++ 1101 if dAtA[iNdEx-1] < 0x80 { 1102 break 1103 } 1104 } 1105 case 1: 1106 iNdEx += 8 1107 case 2: 1108 var length int 1109 for shift := uint(0); ; shift += 7 { 1110 if shift >= 64 { 1111 return 0, ErrIntOverflowControl 1112 } 1113 if iNdEx >= l { 1114 return 0, io.ErrUnexpectedEOF 1115 } 1116 b := dAtA[iNdEx] 1117 iNdEx++ 1118 length |= (int(b) & 0x7F) << shift 1119 if b < 0x80 { 1120 break 1121 } 1122 } 1123 if length < 0 { 1124 return 0, ErrInvalidLengthControl 1125 } 1126 iNdEx += length 1127 case 3: 1128 depth++ 1129 case 4: 1130 if depth == 0 { 1131 return 0, ErrUnexpectedEndOfGroupControl 1132 } 1133 depth-- 1134 case 5: 1135 iNdEx += 4 1136 default: 1137 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1138 } 1139 if iNdEx < 0 { 1140 return 0, ErrInvalidLengthControl 1141 } 1142 if depth == 0 { 1143 return iNdEx, nil 1144 } 1145 } 1146 return 0, io.ErrUnexpectedEOF 1147 } 1148 1149 var ( 1150 ErrInvalidLengthControl = fmt.Errorf("proto: negative length found during unmarshaling") 1151 ErrIntOverflowControl = fmt.Errorf("proto: integer overflow") 1152 ErrUnexpectedEndOfGroupControl = fmt.Errorf("proto: unexpected end of group") 1153 )