cloud.google.com/go/aiplatform@v1.106.0/apiv1beta1/aiplatformpb/persistent_resource_service_grpc.pb.go (about) 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/aiplatform/v1beta1/persistent_resource_service.proto 20 21 package aiplatformpb 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 PersistentResourceService_CreatePersistentResource_FullMethodName = "/google.cloud.aiplatform.v1beta1.PersistentResourceService/CreatePersistentResource" 38 PersistentResourceService_GetPersistentResource_FullMethodName = "/google.cloud.aiplatform.v1beta1.PersistentResourceService/GetPersistentResource" 39 PersistentResourceService_ListPersistentResources_FullMethodName = "/google.cloud.aiplatform.v1beta1.PersistentResourceService/ListPersistentResources" 40 PersistentResourceService_DeletePersistentResource_FullMethodName = "/google.cloud.aiplatform.v1beta1.PersistentResourceService/DeletePersistentResource" 41 PersistentResourceService_UpdatePersistentResource_FullMethodName = "/google.cloud.aiplatform.v1beta1.PersistentResourceService/UpdatePersistentResource" 42 PersistentResourceService_RebootPersistentResource_FullMethodName = "/google.cloud.aiplatform.v1beta1.PersistentResourceService/RebootPersistentResource" 43 ) 44 45 // PersistentResourceServiceClient is the client API for PersistentResourceService service. 46 // 47 // 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. 48 type PersistentResourceServiceClient interface { 49 // Creates a PersistentResource. 50 CreatePersistentResource(ctx context.Context, in *CreatePersistentResourceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) 51 // Gets a PersistentResource. 52 GetPersistentResource(ctx context.Context, in *GetPersistentResourceRequest, opts ...grpc.CallOption) (*PersistentResource, error) 53 // Lists PersistentResources in a Location. 54 ListPersistentResources(ctx context.Context, in *ListPersistentResourcesRequest, opts ...grpc.CallOption) (*ListPersistentResourcesResponse, error) 55 // Deletes a PersistentResource. 56 DeletePersistentResource(ctx context.Context, in *DeletePersistentResourceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) 57 // Updates a PersistentResource. 58 UpdatePersistentResource(ctx context.Context, in *UpdatePersistentResourceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) 59 // Reboots a PersistentResource. 60 RebootPersistentResource(ctx context.Context, in *RebootPersistentResourceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) 61 } 62 63 type persistentResourceServiceClient struct { 64 cc grpc.ClientConnInterface 65 } 66 67 func NewPersistentResourceServiceClient(cc grpc.ClientConnInterface) PersistentResourceServiceClient { 68 return &persistentResourceServiceClient{cc} 69 } 70 71 func (c *persistentResourceServiceClient) CreatePersistentResource(ctx context.Context, in *CreatePersistentResourceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { 72 out := new(longrunningpb.Operation) 73 err := c.cc.Invoke(ctx, PersistentResourceService_CreatePersistentResource_FullMethodName, in, out, opts...) 74 if err != nil { 75 return nil, err 76 } 77 return out, nil 78 } 79 80 func (c *persistentResourceServiceClient) GetPersistentResource(ctx context.Context, in *GetPersistentResourceRequest, opts ...grpc.CallOption) (*PersistentResource, error) { 81 out := new(PersistentResource) 82 err := c.cc.Invoke(ctx, PersistentResourceService_GetPersistentResource_FullMethodName, in, out, opts...) 83 if err != nil { 84 return nil, err 85 } 86 return out, nil 87 } 88 89 func (c *persistentResourceServiceClient) ListPersistentResources(ctx context.Context, in *ListPersistentResourcesRequest, opts ...grpc.CallOption) (*ListPersistentResourcesResponse, error) { 90 out := new(ListPersistentResourcesResponse) 91 err := c.cc.Invoke(ctx, PersistentResourceService_ListPersistentResources_FullMethodName, in, out, opts...) 92 if err != nil { 93 return nil, err 94 } 95 return out, nil 96 } 97 98 func (c *persistentResourceServiceClient) DeletePersistentResource(ctx context.Context, in *DeletePersistentResourceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { 99 out := new(longrunningpb.Operation) 100 err := c.cc.Invoke(ctx, PersistentResourceService_DeletePersistentResource_FullMethodName, in, out, opts...) 101 if err != nil { 102 return nil, err 103 } 104 return out, nil 105 } 106 107 func (c *persistentResourceServiceClient) UpdatePersistentResource(ctx context.Context, in *UpdatePersistentResourceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { 108 out := new(longrunningpb.Operation) 109 err := c.cc.Invoke(ctx, PersistentResourceService_UpdatePersistentResource_FullMethodName, in, out, opts...) 110 if err != nil { 111 return nil, err 112 } 113 return out, nil 114 } 115 116 func (c *persistentResourceServiceClient) RebootPersistentResource(ctx context.Context, in *RebootPersistentResourceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { 117 out := new(longrunningpb.Operation) 118 err := c.cc.Invoke(ctx, PersistentResourceService_RebootPersistentResource_FullMethodName, in, out, opts...) 119 if err != nil { 120 return nil, err 121 } 122 return out, nil 123 } 124 125 // PersistentResourceServiceServer is the server API for PersistentResourceService service. 126 // All implementations should embed UnimplementedPersistentResourceServiceServer 127 // for forward compatibility 128 type PersistentResourceServiceServer interface { 129 // Creates a PersistentResource. 130 CreatePersistentResource(context.Context, *CreatePersistentResourceRequest) (*longrunningpb.Operation, error) 131 // Gets a PersistentResource. 132 GetPersistentResource(context.Context, *GetPersistentResourceRequest) (*PersistentResource, error) 133 // Lists PersistentResources in a Location. 134 ListPersistentResources(context.Context, *ListPersistentResourcesRequest) (*ListPersistentResourcesResponse, error) 135 // Deletes a PersistentResource. 136 DeletePersistentResource(context.Context, *DeletePersistentResourceRequest) (*longrunningpb.Operation, error) 137 // Updates a PersistentResource. 138 UpdatePersistentResource(context.Context, *UpdatePersistentResourceRequest) (*longrunningpb.Operation, error) 139 // Reboots a PersistentResource. 140 RebootPersistentResource(context.Context, *RebootPersistentResourceRequest) (*longrunningpb.Operation, error) 141 } 142 143 // UnimplementedPersistentResourceServiceServer should be embedded to have forward compatible implementations. 144 type UnimplementedPersistentResourceServiceServer struct { 145 } 146 147 func (UnimplementedPersistentResourceServiceServer) CreatePersistentResource(context.Context, *CreatePersistentResourceRequest) (*longrunningpb.Operation, error) { 148 return nil, status.Errorf(codes.Unimplemented, "method CreatePersistentResource not implemented") 149 } 150 func (UnimplementedPersistentResourceServiceServer) GetPersistentResource(context.Context, *GetPersistentResourceRequest) (*PersistentResource, error) { 151 return nil, status.Errorf(codes.Unimplemented, "method GetPersistentResource not implemented") 152 } 153 func (UnimplementedPersistentResourceServiceServer) ListPersistentResources(context.Context, *ListPersistentResourcesRequest) (*ListPersistentResourcesResponse, error) { 154 return nil, status.Errorf(codes.Unimplemented, "method ListPersistentResources not implemented") 155 } 156 func (UnimplementedPersistentResourceServiceServer) DeletePersistentResource(context.Context, *DeletePersistentResourceRequest) (*longrunningpb.Operation, error) { 157 return nil, status.Errorf(codes.Unimplemented, "method DeletePersistentResource not implemented") 158 } 159 func (UnimplementedPersistentResourceServiceServer) UpdatePersistentResource(context.Context, *UpdatePersistentResourceRequest) (*longrunningpb.Operation, error) { 160 return nil, status.Errorf(codes.Unimplemented, "method UpdatePersistentResource not implemented") 161 } 162 func (UnimplementedPersistentResourceServiceServer) RebootPersistentResource(context.Context, *RebootPersistentResourceRequest) (*longrunningpb.Operation, error) { 163 return nil, status.Errorf(codes.Unimplemented, "method RebootPersistentResource not implemented") 164 } 165 166 // UnsafePersistentResourceServiceServer may be embedded to opt out of forward compatibility for this service. 167 // Use of this interface is not recommended, as added methods to PersistentResourceServiceServer will 168 // result in compilation errors. 169 type UnsafePersistentResourceServiceServer interface { 170 mustEmbedUnimplementedPersistentResourceServiceServer() 171 } 172 173 func RegisterPersistentResourceServiceServer(s grpc.ServiceRegistrar, srv PersistentResourceServiceServer) { 174 s.RegisterService(&PersistentResourceService_ServiceDesc, srv) 175 } 176 177 func _PersistentResourceService_CreatePersistentResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 178 in := new(CreatePersistentResourceRequest) 179 if err := dec(in); err != nil { 180 return nil, err 181 } 182 if interceptor == nil { 183 return srv.(PersistentResourceServiceServer).CreatePersistentResource(ctx, in) 184 } 185 info := &grpc.UnaryServerInfo{ 186 Server: srv, 187 FullMethod: PersistentResourceService_CreatePersistentResource_FullMethodName, 188 } 189 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 190 return srv.(PersistentResourceServiceServer).CreatePersistentResource(ctx, req.(*CreatePersistentResourceRequest)) 191 } 192 return interceptor(ctx, in, info, handler) 193 } 194 195 func _PersistentResourceService_GetPersistentResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 196 in := new(GetPersistentResourceRequest) 197 if err := dec(in); err != nil { 198 return nil, err 199 } 200 if interceptor == nil { 201 return srv.(PersistentResourceServiceServer).GetPersistentResource(ctx, in) 202 } 203 info := &grpc.UnaryServerInfo{ 204 Server: srv, 205 FullMethod: PersistentResourceService_GetPersistentResource_FullMethodName, 206 } 207 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 208 return srv.(PersistentResourceServiceServer).GetPersistentResource(ctx, req.(*GetPersistentResourceRequest)) 209 } 210 return interceptor(ctx, in, info, handler) 211 } 212 213 func _PersistentResourceService_ListPersistentResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 214 in := new(ListPersistentResourcesRequest) 215 if err := dec(in); err != nil { 216 return nil, err 217 } 218 if interceptor == nil { 219 return srv.(PersistentResourceServiceServer).ListPersistentResources(ctx, in) 220 } 221 info := &grpc.UnaryServerInfo{ 222 Server: srv, 223 FullMethod: PersistentResourceService_ListPersistentResources_FullMethodName, 224 } 225 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 226 return srv.(PersistentResourceServiceServer).ListPersistentResources(ctx, req.(*ListPersistentResourcesRequest)) 227 } 228 return interceptor(ctx, in, info, handler) 229 } 230 231 func _PersistentResourceService_DeletePersistentResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 232 in := new(DeletePersistentResourceRequest) 233 if err := dec(in); err != nil { 234 return nil, err 235 } 236 if interceptor == nil { 237 return srv.(PersistentResourceServiceServer).DeletePersistentResource(ctx, in) 238 } 239 info := &grpc.UnaryServerInfo{ 240 Server: srv, 241 FullMethod: PersistentResourceService_DeletePersistentResource_FullMethodName, 242 } 243 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 244 return srv.(PersistentResourceServiceServer).DeletePersistentResource(ctx, req.(*DeletePersistentResourceRequest)) 245 } 246 return interceptor(ctx, in, info, handler) 247 } 248 249 func _PersistentResourceService_UpdatePersistentResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 250 in := new(UpdatePersistentResourceRequest) 251 if err := dec(in); err != nil { 252 return nil, err 253 } 254 if interceptor == nil { 255 return srv.(PersistentResourceServiceServer).UpdatePersistentResource(ctx, in) 256 } 257 info := &grpc.UnaryServerInfo{ 258 Server: srv, 259 FullMethod: PersistentResourceService_UpdatePersistentResource_FullMethodName, 260 } 261 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 262 return srv.(PersistentResourceServiceServer).UpdatePersistentResource(ctx, req.(*UpdatePersistentResourceRequest)) 263 } 264 return interceptor(ctx, in, info, handler) 265 } 266 267 func _PersistentResourceService_RebootPersistentResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 268 in := new(RebootPersistentResourceRequest) 269 if err := dec(in); err != nil { 270 return nil, err 271 } 272 if interceptor == nil { 273 return srv.(PersistentResourceServiceServer).RebootPersistentResource(ctx, in) 274 } 275 info := &grpc.UnaryServerInfo{ 276 Server: srv, 277 FullMethod: PersistentResourceService_RebootPersistentResource_FullMethodName, 278 } 279 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 280 return srv.(PersistentResourceServiceServer).RebootPersistentResource(ctx, req.(*RebootPersistentResourceRequest)) 281 } 282 return interceptor(ctx, in, info, handler) 283 } 284 285 // PersistentResourceService_ServiceDesc is the grpc.ServiceDesc for PersistentResourceService service. 286 // It's only intended for direct use with grpc.RegisterService, 287 // and not to be introspected or modified (even as a copy) 288 var PersistentResourceService_ServiceDesc = grpc.ServiceDesc{ 289 ServiceName: "google.cloud.aiplatform.v1beta1.PersistentResourceService", 290 HandlerType: (*PersistentResourceServiceServer)(nil), 291 Methods: []grpc.MethodDesc{ 292 { 293 MethodName: "CreatePersistentResource", 294 Handler: _PersistentResourceService_CreatePersistentResource_Handler, 295 }, 296 { 297 MethodName: "GetPersistentResource", 298 Handler: _PersistentResourceService_GetPersistentResource_Handler, 299 }, 300 { 301 MethodName: "ListPersistentResources", 302 Handler: _PersistentResourceService_ListPersistentResources_Handler, 303 }, 304 { 305 MethodName: "DeletePersistentResource", 306 Handler: _PersistentResourceService_DeletePersistentResource_Handler, 307 }, 308 { 309 MethodName: "UpdatePersistentResource", 310 Handler: _PersistentResourceService_UpdatePersistentResource_Handler, 311 }, 312 { 313 MethodName: "RebootPersistentResource", 314 Handler: _PersistentResourceService_RebootPersistentResource_Handler, 315 }, 316 }, 317 Streams: []grpc.StreamDesc{}, 318 Metadata: "google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", 319 }