Debian Codegraph @

dialogflow/cx/apiv3beta1/cxpb/changelog_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/changelog.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 )
29
30 // This is a compile-time assertion to ensure that this generated file
31 // is compatible with the grpc package it is being compiled against.
32 // Requires gRPC-Go v1.32.0 or later.
33 const _ = grpc.SupportPackageIsVersion7
34
35 const (
36 Changelogs_ListChangelogs_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Changelogs/ListChangelogs"
37 Changelogs_GetChangelog_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Changelogs/GetChangelog"
38 )
39
40 // ChangelogsClient is the client API for Changelogs service.
41 //
42 // 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.
43 type ChangelogsClient interface {
44 // Returns the list of Changelogs.
45 ListChangelogs(ctx context.Context, in *ListChangelogsRequest, opts ...grpc.CallOption) (*ListChangelogsResponse, error)
46 // Retrieves the specified Changelog.
47 GetChangelog(ctx context.Context, in *GetChangelogRequest, opts ...grpc.CallOption) (*Changelog, error)
48 }
49
50 type changelogsClient struct {
51 cc grpc.ClientConnInterface
52 }
53
54 func NewChangelogsClient(cc grpc.ClientConnInterface) ChangelogsClient {
55 return &changelogsClient{cc}
56 }
57
58 func (c *changelogsClient) ListChangelogs(ctx context.Context, in *ListChangelogsRequest, opts ...grpc.CallOption) (*ListChangelogsResponse, error) {
59 out := new(ListChangelogsResponse)
60 err := c.cc.Invoke(ctx, Changelogs_ListChangelogs_FullMethodName, in, out, opts...)
61 if err != nil {
62 return nil, err
63 }
64 return out, nil
65 }
66
67 func (c *changelogsClient) GetChangelog(ctx context.Context, in *GetChangelogRequest, opts ...grpc.CallOption) (*Changelog, error) {
68 out := new(Changelog)
69 err := c.cc.Invoke(ctx, Changelogs_GetChangelog_FullMethodName, in, out, opts...)
70 if err != nil {
71 return nil, err
72 }
73 return out, nil
74 }
75
76 // ChangelogsServer is the server API for Changelogs service.
77 // All implementations should embed UnimplementedChangelogsServer
78 // for forward compatibility
79 type ChangelogsServer interface {
80 // Returns the list of Changelogs.
81 ListChangelogs(context.Context, *ListChangelogsRequest) (*ListChangelogsResponse, error)
82 // Retrieves the specified Changelog.
83 GetChangelog(context.Context, *GetChangelogRequest) (*Changelog, error)
84 }
85
86 // UnimplementedChangelogsServer should be embedded to have forward compatible implementations.
87 type UnimplementedChangelogsServer struct {
88 }
89
90 func (UnimplementedChangelogsServer) ListChangelogs(context.Context, *ListChangelogsRequest) (*ListChangelogsResponse, error) {
91 return nil, status.Errorf(codes.Unimplemented, "method ListChangelogs not implemented")
92 }
93 func (UnimplementedChangelogsServer) GetChangelog(context.Context, *GetChangelogRequest) (*Changelog, error) {
94 return nil, status.Errorf(codes.Unimplemented, "method GetChangelog not implemented")
95 }
96
97 // UnsafeChangelogsServer may be embedded to opt out of forward compatibility for this service.
98 // Use of this interface is not recommended, as added methods to ChangelogsServer will
99 // result in compilation errors.
100 type UnsafeChangelogsServer interface {
101 mustEmbedUnimplementedChangelogsServer()
102 }
103
104 func RegisterChangelogsServer(s grpc.ServiceRegistrar, srv ChangelogsServer) {
105 s.RegisterService(&Changelogs_ServiceDesc, srv)
106 }
107
108 func _Changelogs_ListChangelogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
109 in := new(ListChangelogsRequest)
110 if err := dec(in); err != nil {
111 return nil, err
112 }
113 if interceptor == nil {
114 return srv.(ChangelogsServer).ListChangelogs(ctx, in)
115 }
116 info := &grpc.UnaryServerInfo{
117 Server: srv,
118 FullMethod: Changelogs_ListChangelogs_FullMethodName,
119 }
120 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
121 return srv.(ChangelogsServer).ListChangelogs(ctx, req.(*ListChangelogsRequest))
122 }
123 return interceptor(ctx, in, info, handler)
124 }
125
126 func _Changelogs_GetChangelog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
127 in := new(GetChangelogRequest)
128 if err := dec(in); err != nil {
129 return nil, err
130 }
131 if interceptor == nil {
132 return srv.(ChangelogsServer).GetChangelog(ctx, in)
133 }
134 info := &grpc.UnaryServerInfo{
135 Server: srv,
136 FullMethod: Changelogs_GetChangelog_FullMethodName,
137 }
138 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
139 return srv.(ChangelogsServer).GetChangelog(ctx, req.(*GetChangelogRequest))
140 }
141 return interceptor(ctx, in, info, handler)
142 }
143
144 // Changelogs_ServiceDesc is the grpc.ServiceDesc for Changelogs service.
145 // It's only intended for direct use with grpc.RegisterService,
146 // and not to be introspected or modified (even as a copy)
147 var Changelogs_ServiceDesc = grpc.ServiceDesc{
148 ServiceName: "google.cloud.dialogflow.cx.v3beta1.Changelogs",
149 HandlerType: (*ChangelogsServer)(nil),
150 Methods: []grpc.MethodDesc{
151 {
152 MethodName: "ListChangelogs",
153 Handler: _Changelogs_ListChangelogs_Handler,
154 },
155 {
156 MethodName: "GetChangelog",
157 Handler: _Changelogs_GetChangelog_Handler,
158 },
159 },
160 Streams: []grpc.StreamDesc{},
161 Metadata: "google/cloud/dialogflow/cx/v3beta1/changelog.proto",
162 }