cloud.google.com/go/aiplatform@v1.106.0/apiv1beta1/aiplatformpb/extension_execution_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/extension_execution_service.proto 20 21 package aiplatformpb 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 ExtensionExecutionService_ExecuteExtension_FullMethodName = "/google.cloud.aiplatform.v1beta1.ExtensionExecutionService/ExecuteExtension" 37 ExtensionExecutionService_QueryExtension_FullMethodName = "/google.cloud.aiplatform.v1beta1.ExtensionExecutionService/QueryExtension" 38 ) 39 40 // ExtensionExecutionServiceClient is the client API for ExtensionExecutionService 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 ExtensionExecutionServiceClient interface { 44 // Executes the request against a given extension. 45 ExecuteExtension(ctx context.Context, in *ExecuteExtensionRequest, opts ...grpc.CallOption) (*ExecuteExtensionResponse, error) 46 // Queries an extension with a default controller. 47 QueryExtension(ctx context.Context, in *QueryExtensionRequest, opts ...grpc.CallOption) (*QueryExtensionResponse, error) 48 } 49 50 type extensionExecutionServiceClient struct { 51 cc grpc.ClientConnInterface 52 } 53 54 func NewExtensionExecutionServiceClient(cc grpc.ClientConnInterface) ExtensionExecutionServiceClient { 55 return &extensionExecutionServiceClient{cc} 56 } 57 58 func (c *extensionExecutionServiceClient) ExecuteExtension(ctx context.Context, in *ExecuteExtensionRequest, opts ...grpc.CallOption) (*ExecuteExtensionResponse, error) { 59 out := new(ExecuteExtensionResponse) 60 err := c.cc.Invoke(ctx, ExtensionExecutionService_ExecuteExtension_FullMethodName, in, out, opts...) 61 if err != nil { 62 return nil, err 63 } 64 return out, nil 65 } 66 67 func (c *extensionExecutionServiceClient) QueryExtension(ctx context.Context, in *QueryExtensionRequest, opts ...grpc.CallOption) (*QueryExtensionResponse, error) { 68 out := new(QueryExtensionResponse) 69 err := c.cc.Invoke(ctx, ExtensionExecutionService_QueryExtension_FullMethodName, in, out, opts...) 70 if err != nil { 71 return nil, err 72 } 73 return out, nil 74 } 75 76 // ExtensionExecutionServiceServer is the server API for ExtensionExecutionService service. 77 // All implementations should embed UnimplementedExtensionExecutionServiceServer 78 // for forward compatibility 79 type ExtensionExecutionServiceServer interface { 80 // Executes the request against a given extension. 81 ExecuteExtension(context.Context, *ExecuteExtensionRequest) (*ExecuteExtensionResponse, error) 82 // Queries an extension with a default controller. 83 QueryExtension(context.Context, *QueryExtensionRequest) (*QueryExtensionResponse, error) 84 } 85 86 // UnimplementedExtensionExecutionServiceServer should be embedded to have forward compatible implementations. 87 type UnimplementedExtensionExecutionServiceServer struct { 88 } 89 90 func (UnimplementedExtensionExecutionServiceServer) ExecuteExtension(context.Context, *ExecuteExtensionRequest) (*ExecuteExtensionResponse, error) { 91 return nil, status.Errorf(codes.Unimplemented, "method ExecuteExtension not implemented") 92 } 93 func (UnimplementedExtensionExecutionServiceServer) QueryExtension(context.Context, *QueryExtensionRequest) (*QueryExtensionResponse, error) { 94 return nil, status.Errorf(codes.Unimplemented, "method QueryExtension not implemented") 95 } 96 97 // UnsafeExtensionExecutionServiceServer may be embedded to opt out of forward compatibility for this service. 98 // Use of this interface is not recommended, as added methods to ExtensionExecutionServiceServer will 99 // result in compilation errors. 100 type UnsafeExtensionExecutionServiceServer interface { 101 mustEmbedUnimplementedExtensionExecutionServiceServer() 102 } 103 104 func RegisterExtensionExecutionServiceServer(s grpc.ServiceRegistrar, srv ExtensionExecutionServiceServer) { 105 s.RegisterService(&ExtensionExecutionService_ServiceDesc, srv) 106 } 107 108 func _ExtensionExecutionService_ExecuteExtension_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 109 in := new(ExecuteExtensionRequest) 110 if err := dec(in); err != nil { 111 return nil, err 112 } 113 if interceptor == nil { 114 return srv.(ExtensionExecutionServiceServer).ExecuteExtension(ctx, in) 115 } 116 info := &grpc.UnaryServerInfo{ 117 Server: srv, 118 FullMethod: ExtensionExecutionService_ExecuteExtension_FullMethodName, 119 } 120 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 121 return srv.(ExtensionExecutionServiceServer).ExecuteExtension(ctx, req.(*ExecuteExtensionRequest)) 122 } 123 return interceptor(ctx, in, info, handler) 124 } 125 126 func _ExtensionExecutionService_QueryExtension_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 127 in := new(QueryExtensionRequest) 128 if err := dec(in); err != nil { 129 return nil, err 130 } 131 if interceptor == nil { 132 return srv.(ExtensionExecutionServiceServer).QueryExtension(ctx, in) 133 } 134 info := &grpc.UnaryServerInfo{ 135 Server: srv, 136 FullMethod: ExtensionExecutionService_QueryExtension_FullMethodName, 137 } 138 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 139 return srv.(ExtensionExecutionServiceServer).QueryExtension(ctx, req.(*QueryExtensionRequest)) 140 } 141 return interceptor(ctx, in, info, handler) 142 } 143 144 // ExtensionExecutionService_ServiceDesc is the grpc.ServiceDesc for ExtensionExecutionService 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 ExtensionExecutionService_ServiceDesc = grpc.ServiceDesc{ 148 ServiceName: "google.cloud.aiplatform.v1beta1.ExtensionExecutionService", 149 HandlerType: (*ExtensionExecutionServiceServer)(nil), 150 Methods: []grpc.MethodDesc{ 151 { 152 MethodName: "ExecuteExtension", 153 Handler: _ExtensionExecutionService_ExecuteExtension_Handler, 154 }, 155 { 156 MethodName: "QueryExtension", 157 Handler: _ExtensionExecutionService_QueryExtension_Handler, 158 }, 159 }, 160 Streams: []grpc.StreamDesc{}, 161 Metadata: "google/cloud/aiplatform/v1beta1/extension_execution_service.proto", 162 }