| 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/osconfig/agentendpoint/v1/agentendpoint.proto |
| 20 |
|
| 21 |
package agentendpointpb |
| 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 |
AgentEndpointService_ReceiveTaskNotification_FullMethodName = "/google.cloud.osconfig.agentendpoint.v1.AgentEndpointService/ReceiveTaskNotification" |
| 37 |
AgentEndpointService_StartNextTask_FullMethodName = "/google.cloud.osconfig.agentendpoint.v1.AgentEndpointService/StartNextTask" |
| 38 |
AgentEndpointService_ReportTaskProgress_FullMethodName = "/google.cloud.osconfig.agentendpoint.v1.AgentEndpointService/ReportTaskProgress" |
| 39 |
AgentEndpointService_ReportTaskComplete_FullMethodName = "/google.cloud.osconfig.agentendpoint.v1.AgentEndpointService/ReportTaskComplete" |
| 40 |
AgentEndpointService_RegisterAgent_FullMethodName = "/google.cloud.osconfig.agentendpoint.v1.AgentEndpointService/RegisterAgent" |
| 41 |
AgentEndpointService_ReportInventory_FullMethodName = "/google.cloud.osconfig.agentendpoint.v1.AgentEndpointService/ReportInventory" |
| 42 |
) |
| 43 |
|
| 44 |
// AgentEndpointServiceClient is the client API for AgentEndpointService 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 AgentEndpointServiceClient interface { |
| 48 |
// Stream established by client to receive Task notifications. |
| 49 |
ReceiveTaskNotification(ctx context.Context, in *ReceiveTaskNotificationRequest, opts ...grpc.CallOption) (AgentEndpointService_ReceiveTaskNotificationClient, error) |
| 50 |
// Signals the start of a task execution and returns the task info. |
| 51 |
StartNextTask(ctx context.Context, in *StartNextTaskRequest, opts ...grpc.CallOption) (*StartNextTaskResponse, error) |
| 52 |
// Signals an intermediary progress checkpoint in task execution. |
| 53 |
ReportTaskProgress(ctx context.Context, in *ReportTaskProgressRequest, opts ...grpc.CallOption) (*ReportTaskProgressResponse, error) |
| 54 |
// Signals that the task execution is complete and optionally returns the next |
| 55 |
// task. |
| 56 |
ReportTaskComplete(ctx context.Context, in *ReportTaskCompleteRequest, opts ...grpc.CallOption) (*ReportTaskCompleteResponse, error) |
| 57 |
// Registers the agent running on the VM. |
| 58 |
RegisterAgent(ctx context.Context, in *RegisterAgentRequest, opts ...grpc.CallOption) (*RegisterAgentResponse, error) |
| 59 |
// Reports the VMs current inventory. |
| 60 |
ReportInventory(ctx context.Context, in *ReportInventoryRequest, opts ...grpc.CallOption) (*ReportInventoryResponse, error) |
| 61 |
} |
| 62 |
|
| 63 |
type agentEndpointServiceClient struct { |
| 64 |
cc grpc.ClientConnInterface |
| 65 |
} |
| 66 |
|
| 67 |
func NewAgentEndpointServiceClient(cc grpc.ClientConnInterface) AgentEndpointServiceClient { |
| 68 |
return &agentEndpointServiceClient{cc} |
| 69 |
} |
| 70 |
|
| 71 |
func (c *agentEndpointServiceClient) ReceiveTaskNotification(ctx context.Context, in *ReceiveTaskNotificationRequest, opts ...grpc.CallOption) (AgentEndpointService_ReceiveTaskNotificationClient, error) { |
| 72 |
stream, err := c.cc.NewStream(ctx, &AgentEndpointService_ServiceDesc.Streams[0], AgentEndpointService_ReceiveTaskNotification_FullMethodName, opts...) |
| 73 |
if err != nil { |
| 74 |
return nil, err |
| 75 |
} |
| 76 |
x := &agentEndpointServiceReceiveTaskNotificationClient{stream} |
| 77 |
if err := x.ClientStream.SendMsg(in); err != nil { |
| 78 |
return nil, err |
| 79 |
} |
| 80 |
if err := x.ClientStream.CloseSend(); err != nil { |
| 81 |
return nil, err |
| 82 |
} |
| 83 |
return x, nil |
| 84 |
} |
| 85 |
|
| 86 |
type AgentEndpointService_ReceiveTaskNotificationClient interface { |
| 87 |
Recv() (*ReceiveTaskNotificationResponse, error) |
| 88 |
grpc.ClientStream |
| 89 |
} |
| 90 |
|
| 91 |
type agentEndpointServiceReceiveTaskNotificationClient struct { |
| 92 |
grpc.ClientStream |
| 93 |
} |
| 94 |
|
| 95 |
func (x *agentEndpointServiceReceiveTaskNotificationClient) Recv() (*ReceiveTaskNotificationResponse, error) { |
| 96 |
m := new(ReceiveTaskNotificationResponse) |
| 97 |
if err := x.ClientStream.RecvMsg(m); err != nil { |
| 98 |
return nil, err |
| 99 |
} |
| 100 |
return m, nil |
| 101 |
} |
| 102 |
|
| 103 |
func (c *agentEndpointServiceClient) StartNextTask(ctx context.Context, in *StartNextTaskRequest, opts ...grpc.CallOption) (*StartNextTaskResponse, error) { |
| 104 |
out := new(StartNextTaskResponse) |
| 105 |
err := c.cc.Invoke(ctx, AgentEndpointService_StartNextTask_FullMethodName, in, out, opts...) |
| 106 |
if err != nil { |
| 107 |
return nil, err |
| 108 |
} |
| 109 |
return out, nil |
| 110 |
} |
| 111 |
|
| 112 |
func (c *agentEndpointServiceClient) ReportTaskProgress(ctx context.Context, in *ReportTaskProgressRequest, opts ...grpc.CallOption) (*ReportTaskProgressResponse, error) { |
| 113 |
out := new(ReportTaskProgressResponse) |
| 114 |
err := c.cc.Invoke(ctx, AgentEndpointService_ReportTaskProgress_FullMethodName, in, out, opts...) |
| 115 |
if err != nil { |
| 116 |
return nil, err |
| 117 |
} |
| 118 |
return out, nil |
| 119 |
} |
| 120 |
|
| 121 |
func (c *agentEndpointServiceClient) ReportTaskComplete(ctx context.Context, in *ReportTaskCompleteRequest, opts ...grpc.CallOption) (*ReportTaskCompleteResponse, error) { |
| 122 |
out := new(ReportTaskCompleteResponse) |
| 123 |
err := c.cc.Invoke(ctx, AgentEndpointService_ReportTaskComplete_FullMethodName, in, out, opts...) |
| 124 |
if err != nil { |
| 125 |
return nil, err |
| 126 |
} |
| 127 |
return out, nil |
| 128 |
} |
| 129 |
|
| 130 |
func (c *agentEndpointServiceClient) RegisterAgent(ctx context.Context, in *RegisterAgentRequest, opts ...grpc.CallOption) (*RegisterAgentResponse, error) { |
| 131 |
out := new(RegisterAgentResponse) |
| 132 |
err := c.cc.Invoke(ctx, AgentEndpointService_RegisterAgent_FullMethodName, in, out, opts...) |
| 133 |
if err != nil { |
| 134 |
return nil, err |
| 135 |
} |
| 136 |
return out, nil |
| 137 |
} |
| 138 |
|
| 139 |
func (c *agentEndpointServiceClient) ReportInventory(ctx context.Context, in *ReportInventoryRequest, opts ...grpc.CallOption) (*ReportInventoryResponse, error) { |
| 140 |
out := new(ReportInventoryResponse) |
| 141 |
err := c.cc.Invoke(ctx, AgentEndpointService_ReportInventory_FullMethodName, in, out, opts...) |
| 142 |
if err != nil { |
| 143 |
return nil, err |
| 144 |
} |
| 145 |
return out, nil |
| 146 |
} |
| 147 |
|
| 148 |
// AgentEndpointServiceServer is the server API for AgentEndpointService service. |
| 149 |
// All implementations should embed UnimplementedAgentEndpointServiceServer |
| 150 |
// for forward compatibility |
| 151 |
type AgentEndpointServiceServer interface { |
| 152 |
// Stream established by client to receive Task notifications. |
| 153 |
ReceiveTaskNotification(*ReceiveTaskNotificationRequest, AgentEndpointService_ReceiveTaskNotificationServer) error |
| 154 |
// Signals the start of a task execution and returns the task info. |
| 155 |
StartNextTask(context.Context, *StartNextTaskRequest) (*StartNextTaskResponse, error) |
| 156 |
// Signals an intermediary progress checkpoint in task execution. |
| 157 |
ReportTaskProgress(context.Context, *ReportTaskProgressRequest) (*ReportTaskProgressResponse, error) |
| 158 |
// Signals that the task execution is complete and optionally returns the next |
| 159 |
// task. |
| 160 |
ReportTaskComplete(context.Context, *ReportTaskCompleteRequest) (*ReportTaskCompleteResponse, error) |
| 161 |
// Registers the agent running on the VM. |
| 162 |
RegisterAgent(context.Context, *RegisterAgentRequest) (*RegisterAgentResponse, error) |
| 163 |
// Reports the VMs current inventory. |
| 164 |
ReportInventory(context.Context, *ReportInventoryRequest) (*ReportInventoryResponse, error) |
| 165 |
} |
| 166 |
|
| 167 |
// UnimplementedAgentEndpointServiceServer should be embedded to have forward compatible implementations. |
| 168 |
type UnimplementedAgentEndpointServiceServer struct { |
| 169 |
} |
| 170 |
|
| 171 |
func (UnimplementedAgentEndpointServiceServer) ReceiveTaskNotification(*ReceiveTaskNotificationRequest, AgentEndpointService_ReceiveTaskNotificationServer) error { |
| 172 |
return status.Errorf(codes.Unimplemented, "method ReceiveTaskNotification not implemented") |
| 173 |
} |
| 174 |
func (UnimplementedAgentEndpointServiceServer) StartNextTask(context.Context, *StartNextTaskRequest) (*StartNextTaskResponse, error) { |
| 175 |
return nil, status.Errorf(codes.Unimplemented, "method StartNextTask not implemented") |
| 176 |
} |
| 177 |
func (UnimplementedAgentEndpointServiceServer) ReportTaskProgress(context.Context, *ReportTaskProgressRequest) (*ReportTaskProgressResponse, error) { |
| 178 |
return nil, status.Errorf(codes.Unimplemented, "method ReportTaskProgress not implemented") |
| 179 |
} |
| 180 |
func (UnimplementedAgentEndpointServiceServer) ReportTaskComplete(context.Context, *ReportTaskCompleteRequest) (*ReportTaskCompleteResponse, error) { |
| 181 |
return nil, status.Errorf(codes.Unimplemented, "method ReportTaskComplete not implemented") |
| 182 |
} |
| 183 |
func (UnimplementedAgentEndpointServiceServer) RegisterAgent(context.Context, *RegisterAgentRequest) (*RegisterAgentResponse, error) { |
| 184 |
return nil, status.Errorf(codes.Unimplemented, "method RegisterAgent not implemented") |
| 185 |
} |
| 186 |
func (UnimplementedAgentEndpointServiceServer) ReportInventory(context.Context, *ReportInventoryRequest) (*ReportInventoryResponse, error) { |
| 187 |
return nil, status.Errorf(codes.Unimplemented, "method ReportInventory not implemented") |
| 188 |
} |
| 189 |
|
| 190 |
// UnsafeAgentEndpointServiceServer may be embedded to opt out of forward compatibility for this service. |
| 191 |
// Use of this interface is not recommended, as added methods to AgentEndpointServiceServer will |
| 192 |
// result in compilation errors. |
| 193 |
type UnsafeAgentEndpointServiceServer interface { |
| 194 |
mustEmbedUnimplementedAgentEndpointServiceServer() |
| 195 |
} |
| 196 |
|
| 197 |
func RegisterAgentEndpointServiceServer(s grpc.ServiceRegistrar, srv AgentEndpointServiceServer) { |
| 198 |
s.RegisterService(&AgentEndpointService_ServiceDesc, srv) |
| 199 |
} |
| 200 |
|
| 201 |
func _AgentEndpointService_ReceiveTaskNotification_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 202 |
m := new(ReceiveTaskNotificationRequest) |
| 203 |
if err := stream.RecvMsg(m); err != nil { |
| 204 |
return err |
| 205 |
} |
| 206 |
return srv.(AgentEndpointServiceServer).ReceiveTaskNotification(m, &agentEndpointServiceReceiveTaskNotificationServer{stream}) |
| 207 |
} |
| 208 |
|
| 209 |
type AgentEndpointService_ReceiveTaskNotificationServer interface { |
| 210 |
Send(*ReceiveTaskNotificationResponse) error |
| 211 |
grpc.ServerStream |
| 212 |
} |
| 213 |
|
| 214 |
type agentEndpointServiceReceiveTaskNotificationServer struct { |
| 215 |
grpc.ServerStream |
| 216 |
} |
| 217 |
|
| 218 |
func (x *agentEndpointServiceReceiveTaskNotificationServer) Send(m *ReceiveTaskNotificationResponse) error { |
| 219 |
return x.ServerStream.SendMsg(m) |
| 220 |
} |
| 221 |
|
| 222 |
func _AgentEndpointService_StartNextTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 223 |
in := new(StartNextTaskRequest) |
| 224 |
if err := dec(in); err != nil { |
| 225 |
return nil, err |
| 226 |
} |
| 227 |
if interceptor == nil { |
| 228 |
return srv.(AgentEndpointServiceServer).StartNextTask(ctx, in) |
| 229 |
} |
| 230 |
info := &grpc.UnaryServerInfo{ |
| 231 |
Server: srv, |
| 232 |
FullMethod: AgentEndpointService_StartNextTask_FullMethodName, |
| 233 |
} |
| 234 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 235 |
return srv.(AgentEndpointServiceServer).StartNextTask(ctx, req.(*StartNextTaskRequest)) |
| 236 |
} |
| 237 |
return interceptor(ctx, in, info, handler) |
| 238 |
} |
| 239 |
|
| 240 |
func _AgentEndpointService_ReportTaskProgress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 241 |
in := new(ReportTaskProgressRequest) |
| 242 |
if err := dec(in); err != nil { |
| 243 |
return nil, err |
| 244 |
} |
| 245 |
if interceptor == nil { |
| 246 |
return srv.(AgentEndpointServiceServer).ReportTaskProgress(ctx, in) |
| 247 |
} |
| 248 |
info := &grpc.UnaryServerInfo{ |
| 249 |
Server: srv, |
| 250 |
FullMethod: AgentEndpointService_ReportTaskProgress_FullMethodName, |
| 251 |
} |
| 252 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 253 |
return srv.(AgentEndpointServiceServer).ReportTaskProgress(ctx, req.(*ReportTaskProgressRequest)) |
| 254 |
} |
| 255 |
return interceptor(ctx, in, info, handler) |
| 256 |
} |
| 257 |
|
| 258 |
func _AgentEndpointService_ReportTaskComplete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 259 |
in := new(ReportTaskCompleteRequest) |
| 260 |
if err := dec(in); err != nil { |
| 261 |
return nil, err |
| 262 |
} |
| 263 |
if interceptor == nil { |
| 264 |
return srv.(AgentEndpointServiceServer).ReportTaskComplete(ctx, in) |
| 265 |
} |
| 266 |
info := &grpc.UnaryServerInfo{ |
| 267 |
Server: srv, |
| 268 |
FullMethod: AgentEndpointService_ReportTaskComplete_FullMethodName, |
| 269 |
} |
| 270 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 271 |
return srv.(AgentEndpointServiceServer).ReportTaskComplete(ctx, req.(*ReportTaskCompleteRequest)) |
| 272 |
} |
| 273 |
return interceptor(ctx, in, info, handler) |
| 274 |
} |
| 275 |
|
| 276 |
func _AgentEndpointService_RegisterAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 277 |
in := new(RegisterAgentRequest) |
| 278 |
if err := dec(in); err != nil { |
| 279 |
return nil, err |
| 280 |
} |
| 281 |
if interceptor == nil { |
| 282 |
return srv.(AgentEndpointServiceServer).RegisterAgent(ctx, in) |
| 283 |
} |
| 284 |
info := &grpc.UnaryServerInfo{ |
| 285 |
Server: srv, |
| 286 |
FullMethod: AgentEndpointService_RegisterAgent_FullMethodName, |
| 287 |
} |
| 288 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 289 |
return srv.(AgentEndpointServiceServer).RegisterAgent(ctx, req.(*RegisterAgentRequest)) |
| 290 |
} |
| 291 |
return interceptor(ctx, in, info, handler) |
| 292 |
} |
| 293 |
|
| 294 |
func _AgentEndpointService_ReportInventory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 295 |
in := new(ReportInventoryRequest) |
| 296 |
if err := dec(in); err != nil { |
| 297 |
return nil, err |
| 298 |
} |
| 299 |
if interceptor == nil { |
| 300 |
return srv.(AgentEndpointServiceServer).ReportInventory(ctx, in) |
| 301 |
} |
| 302 |
info := &grpc.UnaryServerInfo{ |
| 303 |
Server: srv, |
| 304 |
FullMethod: AgentEndpointService_ReportInventory_FullMethodName, |
| 305 |
} |
| 306 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 307 |
return srv.(AgentEndpointServiceServer).ReportInventory(ctx, req.(*ReportInventoryRequest)) |
| 308 |
} |
| 309 |
return interceptor(ctx, in, info, handler) |
| 310 |
} |
| 311 |
|
| 312 |
// AgentEndpointService_ServiceDesc is the grpc.ServiceDesc for AgentEndpointService service. |
| 313 |
// It's only intended for direct use with grpc.RegisterService, |
| 314 |
// and not to be introspected or modified (even as a copy) |
| 315 |
var AgentEndpointService_ServiceDesc = grpc.ServiceDesc{ |
| 316 |
ServiceName: "google.cloud.osconfig.agentendpoint.v1.AgentEndpointService", |
| 317 |
HandlerType: (*AgentEndpointServiceServer)(nil), |
| 318 |
Methods: []grpc.MethodDesc{ |
| 319 |
{ |
| 320 |
MethodName: "StartNextTask", |
| 321 |
Handler: _AgentEndpointService_StartNextTask_Handler, |
| 322 |
}, |
| 323 |
{ |
| 324 |
MethodName: "ReportTaskProgress", |
| 325 |
Handler: _AgentEndpointService_ReportTaskProgress_Handler, |
| 326 |
}, |
| 327 |
{ |
| 328 |
MethodName: "ReportTaskComplete", |
| 329 |
Handler: _AgentEndpointService_ReportTaskComplete_Handler, |
| 330 |
}, |
| 331 |
{ |
| 332 |
MethodName: "RegisterAgent", |
| 333 |
Handler: _AgentEndpointService_RegisterAgent_Handler, |
| 334 |
}, |
| 335 |
{ |
| 336 |
MethodName: "ReportInventory", |
| 337 |
Handler: _AgentEndpointService_ReportInventory_Handler, |
| 338 |
}, |
| 339 |
}, |
| 340 |
Streams: []grpc.StreamDesc{ |
| 341 |
{ |
| 342 |
StreamName: "ReceiveTaskNotification", |
| 343 |
Handler: _AgentEndpointService_ReceiveTaskNotification_Handler, |
| 344 |
ServerStreams: true, |
| 345 |
}, |
| 346 |
}, |
| 347 |
Metadata: "google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto", |
| 348 |
} |