1251 lines
40 KiB
Go
1251 lines
40 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: support.proto
|
|
|
|
package main
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import timestamp "github.com/golang/protobuf/ptypes/timestamp"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type Void int32
|
|
|
|
const (
|
|
Void_VOID Void = 0
|
|
)
|
|
|
|
var Void_name = map[int32]string{
|
|
0: "VOID",
|
|
}
|
|
var Void_value = map[string]int32{
|
|
"VOID": 0,
|
|
}
|
|
|
|
func (x Void) String() string {
|
|
return proto.EnumName(Void_name, int32(x))
|
|
}
|
|
func (Void) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_support_640cb5c436dbd37d, []int{0}
|
|
}
|
|
|
|
type ChatCustomerRequest struct {
|
|
// Types that are valid to be assigned to Req:
|
|
// *ChatCustomerRequest_Init
|
|
// *ChatCustomerRequest_Msg
|
|
// *ChatCustomerRequest_HangUp
|
|
Req isChatCustomerRequest_Req `protobuf_oneof:"req"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ChatCustomerRequest) Reset() { *m = ChatCustomerRequest{} }
|
|
func (m *ChatCustomerRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ChatCustomerRequest) ProtoMessage() {}
|
|
func (*ChatCustomerRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_support_640cb5c436dbd37d, []int{0}
|
|
}
|
|
func (m *ChatCustomerRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ChatCustomerRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *ChatCustomerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ChatCustomerRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *ChatCustomerRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ChatCustomerRequest.Merge(dst, src)
|
|
}
|
|
func (m *ChatCustomerRequest) XXX_Size() int {
|
|
return xxx_messageInfo_ChatCustomerRequest.Size(m)
|
|
}
|
|
func (m *ChatCustomerRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ChatCustomerRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ChatCustomerRequest proto.InternalMessageInfo
|
|
|
|
type isChatCustomerRequest_Req interface {
|
|
isChatCustomerRequest_Req()
|
|
}
|
|
|
|
type ChatCustomerRequest_Init struct {
|
|
Init *InitiateChat `protobuf:"bytes,1,opt,name=init,proto3,oneof"`
|
|
}
|
|
type ChatCustomerRequest_Msg struct {
|
|
Msg string `protobuf:"bytes,2,opt,name=msg,proto3,oneof"`
|
|
}
|
|
type ChatCustomerRequest_HangUp struct {
|
|
HangUp Void `protobuf:"varint,3,opt,name=hang_up,json=hangUp,proto3,enum=Void,oneof"`
|
|
}
|
|
|
|
func (*ChatCustomerRequest_Init) isChatCustomerRequest_Req() {}
|
|
func (*ChatCustomerRequest_Msg) isChatCustomerRequest_Req() {}
|
|
func (*ChatCustomerRequest_HangUp) isChatCustomerRequest_Req() {}
|
|
|
|
func (m *ChatCustomerRequest) GetReq() isChatCustomerRequest_Req {
|
|
if m != nil {
|
|
return m.Req
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ChatCustomerRequest) GetInit() *InitiateChat {
|
|
if x, ok := m.GetReq().(*ChatCustomerRequest_Init); ok {
|
|
return x.Init
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ChatCustomerRequest) GetMsg() string {
|
|
if x, ok := m.GetReq().(*ChatCustomerRequest_Msg); ok {
|
|
return x.Msg
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ChatCustomerRequest) GetHangUp() Void {
|
|
if x, ok := m.GetReq().(*ChatCustomerRequest_HangUp); ok {
|
|
return x.HangUp
|
|
}
|
|
return Void_VOID
|
|
}
|
|
|
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
|
func (*ChatCustomerRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
|
return _ChatCustomerRequest_OneofMarshaler, _ChatCustomerRequest_OneofUnmarshaler, _ChatCustomerRequest_OneofSizer, []interface{}{
|
|
(*ChatCustomerRequest_Init)(nil),
|
|
(*ChatCustomerRequest_Msg)(nil),
|
|
(*ChatCustomerRequest_HangUp)(nil),
|
|
}
|
|
}
|
|
|
|
func _ChatCustomerRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|
m := msg.(*ChatCustomerRequest)
|
|
// req
|
|
switch x := m.Req.(type) {
|
|
case *ChatCustomerRequest_Init:
|
|
b.EncodeVarint(1<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.Init); err != nil {
|
|
return err
|
|
}
|
|
case *ChatCustomerRequest_Msg:
|
|
b.EncodeVarint(2<<3 | proto.WireBytes)
|
|
b.EncodeStringBytes(x.Msg)
|
|
case *ChatCustomerRequest_HangUp:
|
|
b.EncodeVarint(3<<3 | proto.WireVarint)
|
|
b.EncodeVarint(uint64(x.HangUp))
|
|
case nil:
|
|
default:
|
|
return fmt.Errorf("ChatCustomerRequest.Req has unexpected type %T", x)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func _ChatCustomerRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
|
m := msg.(*ChatCustomerRequest)
|
|
switch tag {
|
|
case 1: // req.init
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(InitiateChat)
|
|
err := b.DecodeMessage(msg)
|
|
m.Req = &ChatCustomerRequest_Init{msg}
|
|
return true, err
|
|
case 2: // req.msg
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
x, err := b.DecodeStringBytes()
|
|
m.Req = &ChatCustomerRequest_Msg{x}
|
|
return true, err
|
|
case 3: // req.hang_up
|
|
if wire != proto.WireVarint {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
x, err := b.DecodeVarint()
|
|
m.Req = &ChatCustomerRequest_HangUp{Void(x)}
|
|
return true, err
|
|
default:
|
|
return false, nil
|
|
}
|
|
}
|
|
|
|
func _ChatCustomerRequest_OneofSizer(msg proto.Message) (n int) {
|
|
m := msg.(*ChatCustomerRequest)
|
|
// req
|
|
switch x := m.Req.(type) {
|
|
case *ChatCustomerRequest_Init:
|
|
s := proto.Size(x.Init)
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case *ChatCustomerRequest_Msg:
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(len(x.Msg)))
|
|
n += len(x.Msg)
|
|
case *ChatCustomerRequest_HangUp:
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(x.HangUp))
|
|
case nil:
|
|
default:
|
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
|
}
|
|
return n
|
|
}
|
|
|
|
type InitiateChat struct {
|
|
ResumeSessionId string `protobuf:"bytes,1,opt,name=resume_session_id,json=resumeSessionId,proto3" json:"resume_session_id,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *InitiateChat) Reset() { *m = InitiateChat{} }
|
|
func (m *InitiateChat) String() string { return proto.CompactTextString(m) }
|
|
func (*InitiateChat) ProtoMessage() {}
|
|
func (*InitiateChat) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_support_640cb5c436dbd37d, []int{1}
|
|
}
|
|
func (m *InitiateChat) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_InitiateChat.Unmarshal(m, b)
|
|
}
|
|
func (m *InitiateChat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_InitiateChat.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *InitiateChat) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_InitiateChat.Merge(dst, src)
|
|
}
|
|
func (m *InitiateChat) XXX_Size() int {
|
|
return xxx_messageInfo_InitiateChat.Size(m)
|
|
}
|
|
func (m *InitiateChat) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_InitiateChat.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_InitiateChat proto.InternalMessageInfo
|
|
|
|
func (m *InitiateChat) GetResumeSessionId() string {
|
|
if m != nil {
|
|
return m.ResumeSessionId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type AgentMessage struct {
|
|
AgentName string `protobuf:"bytes,1,opt,name=agent_name,json=agentName,proto3" json:"agent_name,omitempty"`
|
|
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AgentMessage) Reset() { *m = AgentMessage{} }
|
|
func (m *AgentMessage) String() string { return proto.CompactTextString(m) }
|
|
func (*AgentMessage) ProtoMessage() {}
|
|
func (*AgentMessage) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_support_640cb5c436dbd37d, []int{2}
|
|
}
|
|
func (m *AgentMessage) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_AgentMessage.Unmarshal(m, b)
|
|
}
|
|
func (m *AgentMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_AgentMessage.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *AgentMessage) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AgentMessage.Merge(dst, src)
|
|
}
|
|
func (m *AgentMessage) XXX_Size() int {
|
|
return xxx_messageInfo_AgentMessage.Size(m)
|
|
}
|
|
func (m *AgentMessage) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AgentMessage.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AgentMessage proto.InternalMessageInfo
|
|
|
|
func (m *AgentMessage) GetAgentName() string {
|
|
if m != nil {
|
|
return m.AgentName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AgentMessage) GetMsg() string {
|
|
if m != nil {
|
|
return m.Msg
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ChatCustomerResponse struct {
|
|
// Types that are valid to be assigned to Resp:
|
|
// *ChatCustomerResponse_Session
|
|
// *ChatCustomerResponse_Msg
|
|
Resp isChatCustomerResponse_Resp `protobuf_oneof:"resp"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ChatCustomerResponse) Reset() { *m = ChatCustomerResponse{} }
|
|
func (m *ChatCustomerResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*ChatCustomerResponse) ProtoMessage() {}
|
|
func (*ChatCustomerResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_support_640cb5c436dbd37d, []int{3}
|
|
}
|
|
func (m *ChatCustomerResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ChatCustomerResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *ChatCustomerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ChatCustomerResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *ChatCustomerResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ChatCustomerResponse.Merge(dst, src)
|
|
}
|
|
func (m *ChatCustomerResponse) XXX_Size() int {
|
|
return xxx_messageInfo_ChatCustomerResponse.Size(m)
|
|
}
|
|
func (m *ChatCustomerResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ChatCustomerResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ChatCustomerResponse proto.InternalMessageInfo
|
|
|
|
type isChatCustomerResponse_Resp interface {
|
|
isChatCustomerResponse_Resp()
|
|
}
|
|
|
|
type ChatCustomerResponse_Session struct {
|
|
Session *Session `protobuf:"bytes,1,opt,name=session,proto3,oneof"`
|
|
}
|
|
type ChatCustomerResponse_Msg struct {
|
|
Msg *AgentMessage `protobuf:"bytes,2,opt,name=msg,proto3,oneof"`
|
|
}
|
|
|
|
func (*ChatCustomerResponse_Session) isChatCustomerResponse_Resp() {}
|
|
func (*ChatCustomerResponse_Msg) isChatCustomerResponse_Resp() {}
|
|
|
|
func (m *ChatCustomerResponse) GetResp() isChatCustomerResponse_Resp {
|
|
if m != nil {
|
|
return m.Resp
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ChatCustomerResponse) GetSession() *Session {
|
|
if x, ok := m.GetResp().(*ChatCustomerResponse_Session); ok {
|
|
return x.Session
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ChatCustomerResponse) GetMsg() *AgentMessage {
|
|
if x, ok := m.GetResp().(*ChatCustomerResponse_Msg); ok {
|
|
return x.Msg
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
|
func (*ChatCustomerResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
|
return _ChatCustomerResponse_OneofMarshaler, _ChatCustomerResponse_OneofUnmarshaler, _ChatCustomerResponse_OneofSizer, []interface{}{
|
|
(*ChatCustomerResponse_Session)(nil),
|
|
(*ChatCustomerResponse_Msg)(nil),
|
|
}
|
|
}
|
|
|
|
func _ChatCustomerResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|
m := msg.(*ChatCustomerResponse)
|
|
// resp
|
|
switch x := m.Resp.(type) {
|
|
case *ChatCustomerResponse_Session:
|
|
b.EncodeVarint(1<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.Session); err != nil {
|
|
return err
|
|
}
|
|
case *ChatCustomerResponse_Msg:
|
|
b.EncodeVarint(2<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.Msg); err != nil {
|
|
return err
|
|
}
|
|
case nil:
|
|
default:
|
|
return fmt.Errorf("ChatCustomerResponse.Resp has unexpected type %T", x)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func _ChatCustomerResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
|
m := msg.(*ChatCustomerResponse)
|
|
switch tag {
|
|
case 1: // resp.session
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(Session)
|
|
err := b.DecodeMessage(msg)
|
|
m.Resp = &ChatCustomerResponse_Session{msg}
|
|
return true, err
|
|
case 2: // resp.msg
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(AgentMessage)
|
|
err := b.DecodeMessage(msg)
|
|
m.Resp = &ChatCustomerResponse_Msg{msg}
|
|
return true, err
|
|
default:
|
|
return false, nil
|
|
}
|
|
}
|
|
|
|
func _ChatCustomerResponse_OneofSizer(msg proto.Message) (n int) {
|
|
m := msg.(*ChatCustomerResponse)
|
|
// resp
|
|
switch x := m.Resp.(type) {
|
|
case *ChatCustomerResponse_Session:
|
|
s := proto.Size(x.Session)
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case *ChatCustomerResponse_Msg:
|
|
s := proto.Size(x.Msg)
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case nil:
|
|
default:
|
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
|
}
|
|
return n
|
|
}
|
|
|
|
type ChatAgentRequest struct {
|
|
// Types that are valid to be assigned to Req:
|
|
// *ChatAgentRequest_Accept
|
|
// *ChatAgentRequest_Msg
|
|
// *ChatAgentRequest_LeaveSession
|
|
Req isChatAgentRequest_Req `protobuf_oneof:"req"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ChatAgentRequest) Reset() { *m = ChatAgentRequest{} }
|
|
func (m *ChatAgentRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ChatAgentRequest) ProtoMessage() {}
|
|
func (*ChatAgentRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_support_640cb5c436dbd37d, []int{4}
|
|
}
|
|
func (m *ChatAgentRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ChatAgentRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *ChatAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ChatAgentRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *ChatAgentRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ChatAgentRequest.Merge(dst, src)
|
|
}
|
|
func (m *ChatAgentRequest) XXX_Size() int {
|
|
return xxx_messageInfo_ChatAgentRequest.Size(m)
|
|
}
|
|
func (m *ChatAgentRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ChatAgentRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ChatAgentRequest proto.InternalMessageInfo
|
|
|
|
type isChatAgentRequest_Req interface {
|
|
isChatAgentRequest_Req()
|
|
}
|
|
|
|
type ChatAgentRequest_Accept struct {
|
|
Accept *AcceptChat `protobuf:"bytes,1,opt,name=accept,proto3,oneof"`
|
|
}
|
|
type ChatAgentRequest_Msg struct {
|
|
Msg string `protobuf:"bytes,2,opt,name=msg,proto3,oneof"`
|
|
}
|
|
type ChatAgentRequest_LeaveSession struct {
|
|
LeaveSession Void `protobuf:"varint,3,opt,name=leave_session,json=leaveSession,proto3,enum=Void,oneof"`
|
|
}
|
|
|
|
func (*ChatAgentRequest_Accept) isChatAgentRequest_Req() {}
|
|
func (*ChatAgentRequest_Msg) isChatAgentRequest_Req() {}
|
|
func (*ChatAgentRequest_LeaveSession) isChatAgentRequest_Req() {}
|
|
|
|
func (m *ChatAgentRequest) GetReq() isChatAgentRequest_Req {
|
|
if m != nil {
|
|
return m.Req
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ChatAgentRequest) GetAccept() *AcceptChat {
|
|
if x, ok := m.GetReq().(*ChatAgentRequest_Accept); ok {
|
|
return x.Accept
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ChatAgentRequest) GetMsg() string {
|
|
if x, ok := m.GetReq().(*ChatAgentRequest_Msg); ok {
|
|
return x.Msg
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ChatAgentRequest) GetLeaveSession() Void {
|
|
if x, ok := m.GetReq().(*ChatAgentRequest_LeaveSession); ok {
|
|
return x.LeaveSession
|
|
}
|
|
return Void_VOID
|
|
}
|
|
|
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
|
func (*ChatAgentRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
|
return _ChatAgentRequest_OneofMarshaler, _ChatAgentRequest_OneofUnmarshaler, _ChatAgentRequest_OneofSizer, []interface{}{
|
|
(*ChatAgentRequest_Accept)(nil),
|
|
(*ChatAgentRequest_Msg)(nil),
|
|
(*ChatAgentRequest_LeaveSession)(nil),
|
|
}
|
|
}
|
|
|
|
func _ChatAgentRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|
m := msg.(*ChatAgentRequest)
|
|
// req
|
|
switch x := m.Req.(type) {
|
|
case *ChatAgentRequest_Accept:
|
|
b.EncodeVarint(1<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.Accept); err != nil {
|
|
return err
|
|
}
|
|
case *ChatAgentRequest_Msg:
|
|
b.EncodeVarint(2<<3 | proto.WireBytes)
|
|
b.EncodeStringBytes(x.Msg)
|
|
case *ChatAgentRequest_LeaveSession:
|
|
b.EncodeVarint(3<<3 | proto.WireVarint)
|
|
b.EncodeVarint(uint64(x.LeaveSession))
|
|
case nil:
|
|
default:
|
|
return fmt.Errorf("ChatAgentRequest.Req has unexpected type %T", x)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func _ChatAgentRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
|
m := msg.(*ChatAgentRequest)
|
|
switch tag {
|
|
case 1: // req.accept
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(AcceptChat)
|
|
err := b.DecodeMessage(msg)
|
|
m.Req = &ChatAgentRequest_Accept{msg}
|
|
return true, err
|
|
case 2: // req.msg
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
x, err := b.DecodeStringBytes()
|
|
m.Req = &ChatAgentRequest_Msg{x}
|
|
return true, err
|
|
case 3: // req.leave_session
|
|
if wire != proto.WireVarint {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
x, err := b.DecodeVarint()
|
|
m.Req = &ChatAgentRequest_LeaveSession{Void(x)}
|
|
return true, err
|
|
default:
|
|
return false, nil
|
|
}
|
|
}
|
|
|
|
func _ChatAgentRequest_OneofSizer(msg proto.Message) (n int) {
|
|
m := msg.(*ChatAgentRequest)
|
|
// req
|
|
switch x := m.Req.(type) {
|
|
case *ChatAgentRequest_Accept:
|
|
s := proto.Size(x.Accept)
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case *ChatAgentRequest_Msg:
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(len(x.Msg)))
|
|
n += len(x.Msg)
|
|
case *ChatAgentRequest_LeaveSession:
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(x.LeaveSession))
|
|
case nil:
|
|
default:
|
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
|
}
|
|
return n
|
|
}
|
|
|
|
type AcceptChat struct {
|
|
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AcceptChat) Reset() { *m = AcceptChat{} }
|
|
func (m *AcceptChat) String() string { return proto.CompactTextString(m) }
|
|
func (*AcceptChat) ProtoMessage() {}
|
|
func (*AcceptChat) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_support_640cb5c436dbd37d, []int{5}
|
|
}
|
|
func (m *AcceptChat) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_AcceptChat.Unmarshal(m, b)
|
|
}
|
|
func (m *AcceptChat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_AcceptChat.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *AcceptChat) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AcceptChat.Merge(dst, src)
|
|
}
|
|
func (m *AcceptChat) XXX_Size() int {
|
|
return xxx_messageInfo_AcceptChat.Size(m)
|
|
}
|
|
func (m *AcceptChat) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AcceptChat.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AcceptChat proto.InternalMessageInfo
|
|
|
|
func (m *AcceptChat) GetSessionId() string {
|
|
if m != nil {
|
|
return m.SessionId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ChatEntry struct {
|
|
Date *timestamp.Timestamp `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"`
|
|
// Types that are valid to be assigned to Entry:
|
|
// *ChatEntry_CustomerMsg
|
|
// *ChatEntry_AgentMsg
|
|
Entry isChatEntry_Entry `protobuf_oneof:"entry"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ChatEntry) Reset() { *m = ChatEntry{} }
|
|
func (m *ChatEntry) String() string { return proto.CompactTextString(m) }
|
|
func (*ChatEntry) ProtoMessage() {}
|
|
func (*ChatEntry) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_support_640cb5c436dbd37d, []int{6}
|
|
}
|
|
func (m *ChatEntry) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ChatEntry.Unmarshal(m, b)
|
|
}
|
|
func (m *ChatEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ChatEntry.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *ChatEntry) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ChatEntry.Merge(dst, src)
|
|
}
|
|
func (m *ChatEntry) XXX_Size() int {
|
|
return xxx_messageInfo_ChatEntry.Size(m)
|
|
}
|
|
func (m *ChatEntry) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ChatEntry.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ChatEntry proto.InternalMessageInfo
|
|
|
|
type isChatEntry_Entry interface {
|
|
isChatEntry_Entry()
|
|
}
|
|
|
|
type ChatEntry_CustomerMsg struct {
|
|
CustomerMsg string `protobuf:"bytes,2,opt,name=customer_msg,json=customerMsg,proto3,oneof"`
|
|
}
|
|
type ChatEntry_AgentMsg struct {
|
|
AgentMsg *AgentMessage `protobuf:"bytes,3,opt,name=agent_msg,json=agentMsg,proto3,oneof"`
|
|
}
|
|
|
|
func (*ChatEntry_CustomerMsg) isChatEntry_Entry() {}
|
|
func (*ChatEntry_AgentMsg) isChatEntry_Entry() {}
|
|
|
|
func (m *ChatEntry) GetEntry() isChatEntry_Entry {
|
|
if m != nil {
|
|
return m.Entry
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ChatEntry) GetDate() *timestamp.Timestamp {
|
|
if m != nil {
|
|
return m.Date
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ChatEntry) GetCustomerMsg() string {
|
|
if x, ok := m.GetEntry().(*ChatEntry_CustomerMsg); ok {
|
|
return x.CustomerMsg
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ChatEntry) GetAgentMsg() *AgentMessage {
|
|
if x, ok := m.GetEntry().(*ChatEntry_AgentMsg); ok {
|
|
return x.AgentMsg
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
|
func (*ChatEntry) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
|
return _ChatEntry_OneofMarshaler, _ChatEntry_OneofUnmarshaler, _ChatEntry_OneofSizer, []interface{}{
|
|
(*ChatEntry_CustomerMsg)(nil),
|
|
(*ChatEntry_AgentMsg)(nil),
|
|
}
|
|
}
|
|
|
|
func _ChatEntry_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|
m := msg.(*ChatEntry)
|
|
// entry
|
|
switch x := m.Entry.(type) {
|
|
case *ChatEntry_CustomerMsg:
|
|
b.EncodeVarint(2<<3 | proto.WireBytes)
|
|
b.EncodeStringBytes(x.CustomerMsg)
|
|
case *ChatEntry_AgentMsg:
|
|
b.EncodeVarint(3<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.AgentMsg); err != nil {
|
|
return err
|
|
}
|
|
case nil:
|
|
default:
|
|
return fmt.Errorf("ChatEntry.Entry has unexpected type %T", x)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func _ChatEntry_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
|
m := msg.(*ChatEntry)
|
|
switch tag {
|
|
case 2: // entry.customer_msg
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
x, err := b.DecodeStringBytes()
|
|
m.Entry = &ChatEntry_CustomerMsg{x}
|
|
return true, err
|
|
case 3: // entry.agent_msg
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(AgentMessage)
|
|
err := b.DecodeMessage(msg)
|
|
m.Entry = &ChatEntry_AgentMsg{msg}
|
|
return true, err
|
|
default:
|
|
return false, nil
|
|
}
|
|
}
|
|
|
|
func _ChatEntry_OneofSizer(msg proto.Message) (n int) {
|
|
m := msg.(*ChatEntry)
|
|
// entry
|
|
switch x := m.Entry.(type) {
|
|
case *ChatEntry_CustomerMsg:
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(len(x.CustomerMsg)))
|
|
n += len(x.CustomerMsg)
|
|
case *ChatEntry_AgentMsg:
|
|
s := proto.Size(x.AgentMsg)
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case nil:
|
|
default:
|
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
|
}
|
|
return n
|
|
}
|
|
|
|
type ChatAgentResponse struct {
|
|
// Types that are valid to be assigned to Resp:
|
|
// *ChatAgentResponse_AcceptedSession
|
|
// *ChatAgentResponse_Msg
|
|
// *ChatAgentResponse_SessionEnded
|
|
Resp isChatAgentResponse_Resp `protobuf_oneof:"resp"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ChatAgentResponse) Reset() { *m = ChatAgentResponse{} }
|
|
func (m *ChatAgentResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*ChatAgentResponse) ProtoMessage() {}
|
|
func (*ChatAgentResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_support_640cb5c436dbd37d, []int{7}
|
|
}
|
|
func (m *ChatAgentResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ChatAgentResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *ChatAgentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ChatAgentResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *ChatAgentResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ChatAgentResponse.Merge(dst, src)
|
|
}
|
|
func (m *ChatAgentResponse) XXX_Size() int {
|
|
return xxx_messageInfo_ChatAgentResponse.Size(m)
|
|
}
|
|
func (m *ChatAgentResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ChatAgentResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ChatAgentResponse proto.InternalMessageInfo
|
|
|
|
type isChatAgentResponse_Resp interface {
|
|
isChatAgentResponse_Resp()
|
|
}
|
|
|
|
type ChatAgentResponse_AcceptedSession struct {
|
|
AcceptedSession *Session `protobuf:"bytes,1,opt,name=accepted_session,json=acceptedSession,proto3,oneof"`
|
|
}
|
|
type ChatAgentResponse_Msg struct {
|
|
Msg *ChatEntry `protobuf:"bytes,2,opt,name=msg,proto3,oneof"`
|
|
}
|
|
type ChatAgentResponse_SessionEnded struct {
|
|
SessionEnded Void `protobuf:"varint,3,opt,name=session_ended,json=sessionEnded,proto3,enum=Void,oneof"`
|
|
}
|
|
|
|
func (*ChatAgentResponse_AcceptedSession) isChatAgentResponse_Resp() {}
|
|
func (*ChatAgentResponse_Msg) isChatAgentResponse_Resp() {}
|
|
func (*ChatAgentResponse_SessionEnded) isChatAgentResponse_Resp() {}
|
|
|
|
func (m *ChatAgentResponse) GetResp() isChatAgentResponse_Resp {
|
|
if m != nil {
|
|
return m.Resp
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ChatAgentResponse) GetAcceptedSession() *Session {
|
|
if x, ok := m.GetResp().(*ChatAgentResponse_AcceptedSession); ok {
|
|
return x.AcceptedSession
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ChatAgentResponse) GetMsg() *ChatEntry {
|
|
if x, ok := m.GetResp().(*ChatAgentResponse_Msg); ok {
|
|
return x.Msg
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ChatAgentResponse) GetSessionEnded() Void {
|
|
if x, ok := m.GetResp().(*ChatAgentResponse_SessionEnded); ok {
|
|
return x.SessionEnded
|
|
}
|
|
return Void_VOID
|
|
}
|
|
|
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
|
func (*ChatAgentResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
|
return _ChatAgentResponse_OneofMarshaler, _ChatAgentResponse_OneofUnmarshaler, _ChatAgentResponse_OneofSizer, []interface{}{
|
|
(*ChatAgentResponse_AcceptedSession)(nil),
|
|
(*ChatAgentResponse_Msg)(nil),
|
|
(*ChatAgentResponse_SessionEnded)(nil),
|
|
}
|
|
}
|
|
|
|
func _ChatAgentResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|
m := msg.(*ChatAgentResponse)
|
|
// resp
|
|
switch x := m.Resp.(type) {
|
|
case *ChatAgentResponse_AcceptedSession:
|
|
b.EncodeVarint(1<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.AcceptedSession); err != nil {
|
|
return err
|
|
}
|
|
case *ChatAgentResponse_Msg:
|
|
b.EncodeVarint(2<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.Msg); err != nil {
|
|
return err
|
|
}
|
|
case *ChatAgentResponse_SessionEnded:
|
|
b.EncodeVarint(3<<3 | proto.WireVarint)
|
|
b.EncodeVarint(uint64(x.SessionEnded))
|
|
case nil:
|
|
default:
|
|
return fmt.Errorf("ChatAgentResponse.Resp has unexpected type %T", x)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func _ChatAgentResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
|
m := msg.(*ChatAgentResponse)
|
|
switch tag {
|
|
case 1: // resp.accepted_session
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(Session)
|
|
err := b.DecodeMessage(msg)
|
|
m.Resp = &ChatAgentResponse_AcceptedSession{msg}
|
|
return true, err
|
|
case 2: // resp.msg
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(ChatEntry)
|
|
err := b.DecodeMessage(msg)
|
|
m.Resp = &ChatAgentResponse_Msg{msg}
|
|
return true, err
|
|
case 3: // resp.session_ended
|
|
if wire != proto.WireVarint {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
x, err := b.DecodeVarint()
|
|
m.Resp = &ChatAgentResponse_SessionEnded{Void(x)}
|
|
return true, err
|
|
default:
|
|
return false, nil
|
|
}
|
|
}
|
|
|
|
func _ChatAgentResponse_OneofSizer(msg proto.Message) (n int) {
|
|
m := msg.(*ChatAgentResponse)
|
|
// resp
|
|
switch x := m.Resp.(type) {
|
|
case *ChatAgentResponse_AcceptedSession:
|
|
s := proto.Size(x.AcceptedSession)
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case *ChatAgentResponse_Msg:
|
|
s := proto.Size(x.Msg)
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case *ChatAgentResponse_SessionEnded:
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(x.SessionEnded))
|
|
case nil:
|
|
default:
|
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
|
}
|
|
return n
|
|
}
|
|
|
|
type Session struct {
|
|
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
|
CustomerName string `protobuf:"bytes,2,opt,name=customer_name,json=customerName,proto3" json:"customer_name,omitempty"`
|
|
History []*ChatEntry `protobuf:"bytes,3,rep,name=history,proto3" json:"history,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Session) Reset() { *m = Session{} }
|
|
func (m *Session) String() string { return proto.CompactTextString(m) }
|
|
func (*Session) ProtoMessage() {}
|
|
func (*Session) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_support_640cb5c436dbd37d, []int{8}
|
|
}
|
|
func (m *Session) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_Session.Unmarshal(m, b)
|
|
}
|
|
func (m *Session) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_Session.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *Session) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Session.Merge(dst, src)
|
|
}
|
|
func (m *Session) XXX_Size() int {
|
|
return xxx_messageInfo_Session.Size(m)
|
|
}
|
|
func (m *Session) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Session.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Session proto.InternalMessageInfo
|
|
|
|
func (m *Session) GetSessionId() string {
|
|
if m != nil {
|
|
return m.SessionId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Session) GetCustomerName() string {
|
|
if m != nil {
|
|
return m.CustomerName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Session) GetHistory() []*ChatEntry {
|
|
if m != nil {
|
|
return m.History
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*ChatCustomerRequest)(nil), "ChatCustomerRequest")
|
|
proto.RegisterType((*InitiateChat)(nil), "InitiateChat")
|
|
proto.RegisterType((*AgentMessage)(nil), "AgentMessage")
|
|
proto.RegisterType((*ChatCustomerResponse)(nil), "ChatCustomerResponse")
|
|
proto.RegisterType((*ChatAgentRequest)(nil), "ChatAgentRequest")
|
|
proto.RegisterType((*AcceptChat)(nil), "AcceptChat")
|
|
proto.RegisterType((*ChatEntry)(nil), "ChatEntry")
|
|
proto.RegisterType((*ChatAgentResponse)(nil), "ChatAgentResponse")
|
|
proto.RegisterType((*Session)(nil), "Session")
|
|
proto.RegisterEnum("Void", Void_name, Void_value)
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// SupportClient is the client API for Support service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type SupportClient interface {
|
|
// ChatCustomer is used by a customer-facing app to send the customer's messages
|
|
// to a chat session. The customer is how initiates and terminates (via "hangup")
|
|
// a chat session. Only customers may invoke this method (e.g. requests must
|
|
// include customer auth credentials).
|
|
ChatCustomer(ctx context.Context, opts ...grpc.CallOption) (Support_ChatCustomerClient, error)
|
|
// ChatAgent is used by an agent-facing app to allow an agent to reply to a
|
|
// customer's messages in a chat session. The agent may accept a chat session,
|
|
// which defaults to the session awaiting an agent for the longest period of time
|
|
// (FIFO queue).
|
|
ChatAgent(ctx context.Context, opts ...grpc.CallOption) (Support_ChatAgentClient, error)
|
|
}
|
|
|
|
type supportClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewSupportClient(cc *grpc.ClientConn) SupportClient {
|
|
return &supportClient{cc}
|
|
}
|
|
|
|
func (c *supportClient) ChatCustomer(ctx context.Context, opts ...grpc.CallOption) (Support_ChatCustomerClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_Support_serviceDesc.Streams[0], "/Support/ChatCustomer", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &supportChatCustomerClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type Support_ChatCustomerClient interface {
|
|
Send(*ChatCustomerRequest) error
|
|
Recv() (*ChatCustomerResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type supportChatCustomerClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *supportChatCustomerClient) Send(m *ChatCustomerRequest) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *supportChatCustomerClient) Recv() (*ChatCustomerResponse, error) {
|
|
m := new(ChatCustomerResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *supportClient) ChatAgent(ctx context.Context, opts ...grpc.CallOption) (Support_ChatAgentClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_Support_serviceDesc.Streams[1], "/Support/ChatAgent", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &supportChatAgentClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type Support_ChatAgentClient interface {
|
|
Send(*ChatAgentRequest) error
|
|
Recv() (*ChatAgentResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type supportChatAgentClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *supportChatAgentClient) Send(m *ChatAgentRequest) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *supportChatAgentClient) Recv() (*ChatAgentResponse, error) {
|
|
m := new(ChatAgentResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// SupportServer is the server API for Support service.
|
|
type SupportServer interface {
|
|
// ChatCustomer is used by a customer-facing app to send the customer's messages
|
|
// to a chat session. The customer is how initiates and terminates (via "hangup")
|
|
// a chat session. Only customers may invoke this method (e.g. requests must
|
|
// include customer auth credentials).
|
|
ChatCustomer(Support_ChatCustomerServer) error
|
|
// ChatAgent is used by an agent-facing app to allow an agent to reply to a
|
|
// customer's messages in a chat session. The agent may accept a chat session,
|
|
// which defaults to the session awaiting an agent for the longest period of time
|
|
// (FIFO queue).
|
|
ChatAgent(Support_ChatAgentServer) error
|
|
}
|
|
|
|
func RegisterSupportServer(s *grpc.Server, srv SupportServer) {
|
|
s.RegisterService(&_Support_serviceDesc, srv)
|
|
}
|
|
|
|
func _Support_ChatCustomer_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(SupportServer).ChatCustomer(&supportChatCustomerServer{stream})
|
|
}
|
|
|
|
type Support_ChatCustomerServer interface {
|
|
Send(*ChatCustomerResponse) error
|
|
Recv() (*ChatCustomerRequest, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type supportChatCustomerServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *supportChatCustomerServer) Send(m *ChatCustomerResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *supportChatCustomerServer) Recv() (*ChatCustomerRequest, error) {
|
|
m := new(ChatCustomerRequest)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func _Support_ChatAgent_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(SupportServer).ChatAgent(&supportChatAgentServer{stream})
|
|
}
|
|
|
|
type Support_ChatAgentServer interface {
|
|
Send(*ChatAgentResponse) error
|
|
Recv() (*ChatAgentRequest, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type supportChatAgentServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *supportChatAgentServer) Send(m *ChatAgentResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *supportChatAgentServer) Recv() (*ChatAgentRequest, error) {
|
|
m := new(ChatAgentRequest)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
var _Support_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "Support",
|
|
HandlerType: (*SupportServer)(nil),
|
|
Methods: []grpc.MethodDesc{},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "ChatCustomer",
|
|
Handler: _Support_ChatCustomer_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
{
|
|
StreamName: "ChatAgent",
|
|
Handler: _Support_ChatAgent_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: "support.proto",
|
|
}
|
|
|
|
func init() { proto.RegisterFile("support.proto", fileDescriptor_support_640cb5c436dbd37d) }
|
|
|
|
var fileDescriptor_support_640cb5c436dbd37d = []byte{
|
|
// 571 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0x4f, 0x6f, 0xd3, 0x40,
|
|
0x10, 0xc5, 0x63, 0xec, 0xc6, 0xcd, 0x24, 0xa1, 0xc9, 0x52, 0xa4, 0x28, 0x12, 0x10, 0x9c, 0x22,
|
|
0x45, 0x05, 0x6d, 0x51,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