Debian Codegraph @

workflows/apiv1beta/workflowspb/workflows_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/workflows/v1beta/workflows.proto
20
21 package workflowspb
22
23 import (
24 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
25 context "context"
26 grpc "google.golang.org/grpc"
27 codes "google.golang.org/grpc/codes"
28 status "google.golang.org/grpc/status"
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 Workflows_ListWorkflows_FullMethodName = "/google.cloud.workflows.v1beta.Workflows/ListWorkflows"
38 Workflows_GetWorkflow_FullMethodName = "/google.cloud.workflows.v1beta.Workflows/GetWorkflow"
39 Workflows_CreateWorkflow_FullMethodName = "/google.cloud.workflows.v1beta.Workflows/CreateWorkflow"
40 Workflows_DeleteWorkflow_FullMethodName = "/google.cloud.workflows.v1beta.Workflows/DeleteWorkflow"
41 Workflows_UpdateWorkflow_FullMethodName = "/google.cloud.workflows.v1beta.Workflows/UpdateWorkflow"
42 )
43
44 // WorkflowsClient is the client API for Workflows service.
45 //
46 // 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.
47 type WorkflowsClient interface {
48 // Lists Workflows in a given project and location.
49 // The default order is not specified.
50 ListWorkflows(ctx context.Context, in *ListWorkflowsRequest, opts ...grpc.CallOption) (*ListWorkflowsResponse, error)
51 // Gets details of a single Workflow.
52 GetWorkflow(ctx context.Context, in *GetWorkflowRequest, opts ...grpc.CallOption) (*Workflow, error)
53 // Creates a new workflow. If a workflow with the specified name already
54 // exists in the specified project and location, the long running operation
55 // will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
56 CreateWorkflow(ctx context.Context, in *CreateWorkflowRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
57 // Deletes a workflow with the specified name.
58 // This method also cancels and deletes all running executions of the
59 // workflow.
60 DeleteWorkflow(ctx context.Context, in *DeleteWorkflowRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
61 // Updates an existing workflow.
62 // Running this method has no impact on already running executions of the
63 // workflow. A new revision of the workflow may be created as a result of a
64 // successful update operation. In that case, such revision will be used
65 // in new workflow executions.
66 UpdateWorkflow(ctx context.Context, in *UpdateWorkflowRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
67 }
68
69 type workflowsClient struct {
70 cc grpc.ClientConnInterface
71 }
72
73 func NewWorkflowsClient(cc grpc.ClientConnInterface) WorkflowsClient {
74 return &workflowsClient{cc}
75 }
76
77 func (c *workflowsClient) ListWorkflows(ctx context.Context, in *ListWorkflowsRequest, opts ...grpc.CallOption) (*ListWorkflowsResponse, error) {
78 out := new(ListWorkflowsResponse)
79 err := c.cc.Invoke(ctx, Workflows_ListWorkflows_FullMethodName, in, out, opts...)
80 if err != nil {
81 return nil, err
82 }
83 return out, nil
84 }
85
86 func (c *workflowsClient) GetWorkflow(ctx context.Context, in *GetWorkflowRequest, opts ...grpc.CallOption) (*Workflow, error) {
87 out := new(Workflow)
88 err := c.cc.Invoke(ctx, Workflows_GetWorkflow_FullMethodName, in, out, opts...)
89 if err != nil {
90 return nil, err
91 }
92 return out, nil
93 }
94
95 func (c *workflowsClient) CreateWorkflow(ctx context.Context, in *CreateWorkflowRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
96 out := new(longrunningpb.Operation)
97 err := c.cc.Invoke(ctx, Workflows_CreateWorkflow_FullMethodName, in, out, opts...)
98 if err != nil {
99 return nil, err
100 }
101 return out, nil
102 }
103
104 func (c *workflowsClient) DeleteWorkflow(ctx context.Context, in *DeleteWorkflowRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
105 out := new(longrunningpb.Operation)
106 err := c.cc.Invoke(ctx, Workflows_DeleteWorkflow_FullMethodName, in, out, opts...)
107 if err != nil {
108 return nil, err
109 }
110 return out, nil
111 }
112
113 func (c *workflowsClient) UpdateWorkflow(ctx context.Context, in *UpdateWorkflowRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
114 out := new(longrunningpb.Operation)
115 err := c.cc.Invoke(ctx, Workflows_UpdateWorkflow_FullMethodName, in, out, opts...)
116 if err != nil {
117 return nil, err
118 }
119 return out, nil
120 }
121
122 // WorkflowsServer is the server API for Workflows service.
123 // All implementations should embed UnimplementedWorkflowsServer
124 // for forward compatibility
125 type WorkflowsServer interface {
126 // Lists Workflows in a given project and location.
127 // The default order is not specified.
128 ListWorkflows(context.Context, *ListWorkflowsRequest) (*ListWorkflowsResponse, error)
129 // Gets details of a single Workflow.
130 GetWorkflow(context.Context, *GetWorkflowRequest) (*Workflow, error)
131 // Creates a new workflow. If a workflow with the specified name already
132 // exists in the specified project and location, the long running operation
133 // will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
134 CreateWorkflow(context.Context, *CreateWorkflowRequest) (*longrunningpb.Operation, error)
135 // Deletes a workflow with the specified name.
136 // This method also cancels and deletes all running executions of the
137 // workflow.
138 DeleteWorkflow(context.Context, *DeleteWorkflowRequest) (*longrunningpb.Operation, error)
139 // Updates an existing workflow.
140 // Running this method has no impact on already running executions of the
141 // workflow. A new revision of the workflow may be created as a result of a
142 // successful update operation. In that case, such revision will be used
143 // in new workflow executions.
144 UpdateWorkflow(context.Context, *UpdateWorkflowRequest) (*longrunningpb.Operation, error)
145 }
146
147 // UnimplementedWorkflowsServer should be embedded to have forward compatible implementations.
148 type UnimplementedWorkflowsServer struct {
149 }
150
151 func (UnimplementedWorkflowsServer) ListWorkflows(context.Context, *ListWorkflowsRequest) (*ListWorkflowsResponse, error) {
152 return nil, status.Errorf(codes.Unimplemented, "method ListWorkflows not implemented")
153 }
154 func (UnimplementedWorkflowsServer) GetWorkflow(context.Context, *GetWorkflowRequest) (*Workflow, error) {
155 return nil, status.Errorf(codes.Unimplemented, "method GetWorkflow not implemented")
156 }
157 func (UnimplementedWorkflowsServer) CreateWorkflow(context.Context, *CreateWorkflowRequest) (*longrunningpb.Operation, error) {
158 return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflow not implemented")
159 }
160 func (UnimplementedWorkflowsServer) DeleteWorkflow(context.Context, *DeleteWorkflowRequest) (*longrunningpb.Operation, error) {
161 return nil, status.Errorf(codes.Unimplemented, "method DeleteWorkflow not implemented")
162 }
163 func (UnimplementedWorkflowsServer) UpdateWorkflow(context.Context, *UpdateWorkflowRequest) (*longrunningpb.Operation, error) {
164 return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkflow not implemented")
165 }
166
167 // UnsafeWorkflowsServer may be embedded to opt out of forward compatibility for this service.
168 // Use of this interface is not recommended, as added methods to WorkflowsServer will
169 // result in compilation errors.
170 type UnsafeWorkflowsServer interface {
171 mustEmbedUnimplementedWorkflowsServer()
172 }
173
174 func RegisterWorkflowsServer(s grpc.ServiceRegistrar, srv WorkflowsServer) {
175 s.RegisterService(&Workflows_ServiceDesc, srv)
176 }
177
178 func _Workflows_ListWorkflows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
179 in := new(ListWorkflowsRequest)
180 if err := dec(in); err != nil {
181 return nil, err
182 }
183 if interceptor == nil {
184 return srv.(WorkflowsServer).ListWorkflows(ctx, in)
185 }
186 info := &grpc.UnaryServerInfo{
187 Server: srv,
188 FullMethod: Workflows_ListWorkflows_FullMethodName,
189 }
190 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
191 return srv.(WorkflowsServer).ListWorkflows(ctx, req.(*ListWorkflowsRequest))
192 }
193 return interceptor(ctx, in, info, handler)
194 }
195
196 func _Workflows_GetWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
197 in := new(GetWorkflowRequest)
198 if err := dec(in); err != nil {
199 return nil, err
200 }
201 if interceptor == nil {
202 return srv.(WorkflowsServer).GetWorkflow(ctx, in)
203 }
204 info := &grpc.UnaryServerInfo{
205 Server: srv,
206 FullMethod: Workflows_GetWorkflow_FullMethodName,
207 }
208 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
209 return srv.(WorkflowsServer).GetWorkflow(ctx, req.(*GetWorkflowRequest))
210 }
211 return interceptor(ctx, in, info, handler)
212 }
213
214 func _Workflows_CreateWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
215 in := new(CreateWorkflowRequest)
216 if err := dec(in); err != nil {
217 return nil, err
218 }
219 if interceptor == nil {
220 return srv.(WorkflowsServer).CreateWorkflow(ctx, in)
221 }
222 info := &grpc.UnaryServerInfo{
223 Server: srv,
224 FullMethod: Workflows_CreateWorkflow_FullMethodName,
225 }
226 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
227 return srv.(WorkflowsServer).CreateWorkflow(ctx, req.(*CreateWorkflowRequest))
228 }
229 return interceptor(ctx, in, info, handler)
230 }
231
232 func _Workflows_DeleteWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
233 in := new(DeleteWorkflowRequest)
234 if err := dec(in); err != nil {
235 return nil, err
236 }
237 if interceptor == nil {
238 return srv.(WorkflowsServer).DeleteWorkflow(ctx, in)
239 }
240 info := &grpc.UnaryServerInfo{
241 Server: srv,
242 FullMethod: Workflows_DeleteWorkflow_FullMethodName,
243 }
244 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
245 return srv.(WorkflowsServer).DeleteWorkflow(ctx, req.(*DeleteWorkflowRequest))
246 }
247 return interceptor(ctx, in, info, handler)
248 }
249
250 func _Workflows_UpdateWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
251 in := new(UpdateWorkflowRequest)
252 if err := dec(in); err != nil {
253 return nil, err
254 }
255 if interceptor == nil {
256 return srv.(WorkflowsServer).UpdateWorkflow(ctx, in)
257 }
258 info := &grpc.UnaryServerInfo{
259 Server: srv,
260 FullMethod: Workflows_UpdateWorkflow_FullMethodName,
261 }
262 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
263 return srv.(WorkflowsServer).UpdateWorkflow(ctx, req.(*UpdateWorkflowRequest))
264 }
265 return interceptor(ctx, in, info, handler)
266 }
267
268 // Workflows_ServiceDesc is the grpc.ServiceDesc for Workflows service.
269 // It's only intended for direct use with grpc.RegisterService,
270 // and not to be introspected or modified (even as a copy)
271 var Workflows_ServiceDesc = grpc.ServiceDesc{
272 ServiceName: "google.cloud.workflows.v1beta.Workflows",
273 HandlerType: (*WorkflowsServer)(nil),
274 Methods: []grpc.MethodDesc{
275 {
276 MethodName: "ListWorkflows",
277 Handler: _Workflows_ListWorkflows_Handler,
278 },
279 {
280 MethodName: "GetWorkflow",
281 Handler: _Workflows_GetWorkflow_Handler,
282 },
283 {
284 MethodName: "CreateWorkflow",
285 Handler: _Workflows_CreateWorkflow_Handler,
286 },
287 {
288 MethodName: "DeleteWorkflow",
289 Handler: _Workflows_DeleteWorkflow_Handler,
290 },
291 {
292 MethodName: "UpdateWorkflow",
293 Handler: _Workflows_UpdateWorkflow_Handler,
294 },
295 },
296 Streams: []grpc.StreamDesc{},
297 Metadata: "google/cloud/workflows/v1beta/workflows.proto",
298 }