Debian Codegraph @

dialogflow/cx/apiv3beta1/cxpb/conversation_history_grpc.pb.go

raw
1 // Copyright 2025 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
16 // versions:
17 // - protoc-gen-go-grpc v1.3.0
18 // - protoc v4.25.7
19 // source: google/cloud/dialogflow/cx/v3beta1/conversation_history.proto
20
21 package cxpb
22
23 import (
24 context "context"
25 grpc "google.golang.org/grpc"
26 codes "google.golang.org/grpc/codes"
27 status "google.golang.org/grpc/status"
28 emptypb "google.golang.org/protobuf/types/known/emptypb"
29 )
30
31 // This is a compile-time assertion to ensure that this generated file
32 // is compatible with the grpc package it is being compiled against.
33 // Requires gRPC-Go v1.32.0 or later.
34 const _ = grpc.SupportPackageIsVersion7
35
36 const (
37 ConversationHistory_ListConversations_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.ConversationHistory/ListConversations"
38 ConversationHistory_GetConversation_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.ConversationHistory/GetConversation"
39 ConversationHistory_DeleteConversation_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.ConversationHistory/DeleteConversation"
40 )
41
42 // ConversationHistoryClient is the client API for ConversationHistory service.
43 //
44 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
45 type ConversationHistoryClient interface {
46 // Returns the list of all conversations.
47 ListConversations(ctx context.Context, in *ListConversationsRequest, opts ...grpc.CallOption) (*ListConversationsResponse, error)
48 // Retrieves the specified conversation.
49 GetConversation(ctx context.Context, in *GetConversationRequest, opts ...grpc.CallOption) (*Conversation, error)
50 // Deletes the specified conversation.
51 DeleteConversation(ctx context.Context, in *DeleteConversationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
52 }
53
54 type conversationHistoryClient struct {
55 cc grpc.ClientConnInterface
56 }
57
58 func NewConversationHistoryClient(cc grpc.ClientConnInterface) ConversationHistoryClient {
59 return &conversationHistoryClient{cc}
60 }
61
62 func (c *conversationHistoryClient) ListConversations(ctx context.Context, in *ListConversationsRequest, opts ...grpc.CallOption) (*ListConversationsResponse, error) {
63 out := new(ListConversationsResponse)
64 err := c.cc.Invoke(ctx, ConversationHistory_ListConversations_FullMethodName, in, out, opts...)
65 if err != nil {
66 return nil, err
67 }
68 return out, nil
69 }
70
71 func (c *conversationHistoryClient) GetConversation(ctx context.Context, in *GetConversationRequest, opts ...grpc.CallOption) (*Conversation, error) {
72 out := new(Conversation)
73 err := c.cc.Invoke(ctx, ConversationHistory_GetConversation_FullMethodName, in, out, opts...)
74 if err != nil {
75 return nil, err
76 }
77 return out, nil
78 }
79
80 func (c *conversationHistoryClient) DeleteConversation(ctx context.Context, in *DeleteConversationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
81 out := new(emptypb.Empty)
82 err := c.cc.Invoke(ctx, ConversationHistory_DeleteConversation_FullMethodName, in, out, opts...)
83 if err != nil {
84 return nil, err
85 }
86 return out, nil
87 }
88
89 // ConversationHistoryServer is the server API for ConversationHistory service.
90 // All implementations should embed UnimplementedConversationHistoryServer
91 // for forward compatibility
92 type ConversationHistoryServer interface {
93 // Returns the list of all conversations.
94 ListConversations(context.Context, *ListConversationsRequest) (*ListConversationsResponse, error)
95 // Retrieves the specified conversation.
96 GetConversation(context.Context, *GetConversationRequest) (*Conversation, error)
97 // Deletes the specified conversation.
98 DeleteConversation(context.Context, *DeleteConversationRequest) (*emptypb.Empty, error)
99 }
100
101 // UnimplementedConversationHistoryServer should be embedded to have forward compatible implementations.
102 type UnimplementedConversationHistoryServer struct {
103 }
104
105 func (UnimplementedConversationHistoryServer) ListConversations(context.Context, *ListConversationsRequest) (*ListConversationsResponse, error) {
106 return nil, status.Errorf(codes.Unimplemented, "method ListConversations not implemented")
107 }
108 func (UnimplementedConversationHistoryServer) GetConversation(context.Context, *GetConversationRequest) (*Conversation, error) {
109 return nil, status.Errorf(codes.Unimplemented, "method GetConversation not implemented")
110 }
111 func (UnimplementedConversationHistoryServer) DeleteConversation(context.Context, *DeleteConversationRequest) (*emptypb.Empty, error) {
112 return nil, status.Errorf(codes.Unimplemented, "method DeleteConversation not implemented")
113 }
114
115 // UnsafeConversationHistoryServer may be embedded to opt out of forward compatibility for this service.
116 // Use of this interface is not recommended, as added methods to ConversationHistoryServer will
117 // result in compilation errors.
118 type UnsafeConversationHistoryServer interface {
119 mustEmbedUnimplementedConversationHistoryServer()
120 }
121
122 func RegisterConversationHistoryServer(s grpc.ServiceRegistrar, srv ConversationHistoryServer) {
123 s.RegisterService(&ConversationHistory_ServiceDesc, srv)
124 }
125
126 func _ConversationHistory_ListConversations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
127 in := new(ListConversationsRequest)
128 if err := dec(in); err != nil {
129 return nil, err
130 }
131 if interceptor == nil {
132 return srv.(ConversationHistoryServer).ListConversations(ctx, in)
133 }
134 info := &grpc.UnaryServerInfo{
135 Server: srv,
136 FullMethod: ConversationHistory_ListConversations_FullMethodName,
137 }
138 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
139 return srv.(ConversationHistoryServer).ListConversations(ctx, req.(*ListConversationsRequest))
140 }
141 return interceptor(ctx, in, info, handler)
142 }
143
144 func _ConversationHistory_GetConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
145 in := new(GetConversationRequest)
146 if err := dec(in); err != nil {
147 return nil, err
148 }
149 if interceptor == nil {
150 return srv.(ConversationHistoryServer).GetConversation(ctx, in)
151 }
152 info := &grpc.UnaryServerInfo{
153 Server: srv,
154 FullMethod: ConversationHistory_GetConversation_FullMethodName,
155 }
156 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
157 return srv.(ConversationHistoryServer).GetConversation(ctx, req.(*GetConversationRequest))
158 }
159 return interceptor(ctx, in, info, handler)
160 }
161
162 func _ConversationHistory_DeleteConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
163 in := new(DeleteConversationRequest)
164 if err := dec(in); err != nil {
165 return nil, err
166 }
167 if interceptor == nil {
168 return srv.(ConversationHistoryServer).DeleteConversation(ctx, in)
169 }
170 info := &grpc.UnaryServerInfo{
171 Server: srv,
172 FullMethod: ConversationHistory_DeleteConversation_FullMethodName,
173 }
174 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
175 return srv.(ConversationHistoryServer).DeleteConversation(ctx, req.(*DeleteConversationRequest))
176 }
177 return interceptor(ctx, in, info, handler)
178 }
179
180 // ConversationHistory_ServiceDesc is the grpc.ServiceDesc for ConversationHistory service.
181 // It's only intended for direct use with grpc.RegisterService,
182 // and not to be introspected or modified (even as a copy)
183 var ConversationHistory_ServiceDesc = grpc.ServiceDesc{
184 ServiceName: "google.cloud.dialogflow.cx.v3beta1.ConversationHistory",
185 HandlerType: (*ConversationHistoryServer)(nil),
186 Methods: []grpc.MethodDesc{
187 {
188 MethodName: "ListConversations",
189 Handler: _ConversationHistory_ListConversations_Handler,
190 },
191 {
192 MethodName: "GetConversation",
193 Handler: _ConversationHistory_GetConversation_Handler,
194 },
195 {
196 MethodName: "DeleteConversation",
197 Handler: _ConversationHistory_DeleteConversation_Handler,
198 },
199 },
200 Streams: []grpc.StreamDesc{},
201 Metadata: "google/cloud/dialogflow/cx/v3beta1/conversation_history.proto",
202 }