// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.25.7 // source: google/cloud/apihub/v1/curate_service.proto package apihubpb import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( ApiHubCurate_CreateCuration_FullMethodName = "/google.cloud.apihub.v1.ApiHubCurate/CreateCuration" ApiHubCurate_GetCuration_FullMethodName = "/google.cloud.apihub.v1.ApiHubCurate/GetCuration" ApiHubCurate_ListCurations_FullMethodName = "/google.cloud.apihub.v1.ApiHubCurate/ListCurations" ApiHubCurate_UpdateCuration_FullMethodName = "/google.cloud.apihub.v1.ApiHubCurate/UpdateCuration" ApiHubCurate_DeleteCuration_FullMethodName = "/google.cloud.apihub.v1.ApiHubCurate/DeleteCuration" ) // ApiHubCurateClient is the client API for ApiHubCurate service. // // 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. type ApiHubCurateClient interface { // Create a curation resource in the API hub. // Once a curation resource is created, plugin instances can start using it. CreateCuration(ctx context.Context, in *CreateCurationRequest, opts ...grpc.CallOption) (*Curation, error) // Get curation resource details. GetCuration(ctx context.Context, in *GetCurationRequest, opts ...grpc.CallOption) (*Curation, error) // List curation resources in the API hub. ListCurations(ctx context.Context, in *ListCurationsRequest, opts ...grpc.CallOption) (*ListCurationsResponse, error) // Update a curation resource in the API hub. The following fields in the // [curation][google.cloud.apihub.v1.Curation] can be updated: // // * [display_name][google.cloud.apihub.v1.Curation.display_name] // * [description][google.cloud.apihub.v1.Curation.description] // // The // [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask] // should be used to specify the fields being updated. UpdateCuration(ctx context.Context, in *UpdateCurationRequest, opts ...grpc.CallOption) (*Curation, error) // Delete a curation resource in the API hub. A curation can only be deleted // if it's not being used by any plugin instance. DeleteCuration(ctx context.Context, in *DeleteCurationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) } type apiHubCurateClient struct { cc grpc.ClientConnInterface } func NewApiHubCurateClient(cc grpc.ClientConnInterface) ApiHubCurateClient { return &apiHubCurateClient{cc} } func (c *apiHubCurateClient) CreateCuration(ctx context.Context, in *CreateCurationRequest, opts ...grpc.CallOption) (*Curation, error) { out := new(Curation) err := c.cc.Invoke(ctx, ApiHubCurate_CreateCuration_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubCurateClient) GetCuration(ctx context.Context, in *GetCurationRequest, opts ...grpc.CallOption) (*Curation, error) { out := new(Curation) err := c.cc.Invoke(ctx, ApiHubCurate_GetCuration_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubCurateClient) ListCurations(ctx context.Context, in *ListCurationsRequest, opts ...grpc.CallOption) (*ListCurationsResponse, error) { out := new(ListCurationsResponse) err := c.cc.Invoke(ctx, ApiHubCurate_ListCurations_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubCurateClient) UpdateCuration(ctx context.Context, in *UpdateCurationRequest, opts ...grpc.CallOption) (*Curation, error) { out := new(Curation) err := c.cc.Invoke(ctx, ApiHubCurate_UpdateCuration_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubCurateClient) DeleteCuration(ctx context.Context, in *DeleteCurationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, ApiHubCurate_DeleteCuration_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // ApiHubCurateServer is the server API for ApiHubCurate service. // All implementations should embed UnimplementedApiHubCurateServer // for forward compatibility type ApiHubCurateServer interface { // Create a curation resource in the API hub. // Once a curation resource is created, plugin instances can start using it. CreateCuration(context.Context, *CreateCurationRequest) (*Curation, error) // Get curation resource details. GetCuration(context.Context, *GetCurationRequest) (*Curation, error) // List curation resources in the API hub. ListCurations(context.Context, *ListCurationsRequest) (*ListCurationsResponse, error) // Update a curation resource in the API hub. The following fields in the // [curation][google.cloud.apihub.v1.Curation] can be updated: // // * [display_name][google.cloud.apihub.v1.Curation.display_name] // * [description][google.cloud.apihub.v1.Curation.description] // // The // [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask] // should be used to specify the fields being updated. UpdateCuration(context.Context, *UpdateCurationRequest) (*Curation, error) // Delete a curation resource in the API hub. A curation can only be deleted // if it's not being used by any plugin instance. DeleteCuration(context.Context, *DeleteCurationRequest) (*emptypb.Empty, error) } // UnimplementedApiHubCurateServer should be embedded to have forward compatible implementations. type UnimplementedApiHubCurateServer struct { } func (UnimplementedApiHubCurateServer) CreateCuration(context.Context, *CreateCurationRequest) (*Curation, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateCuration not implemented") } func (UnimplementedApiHubCurateServer) GetCuration(context.Context, *GetCurationRequest) (*Curation, error) { return nil, status.Errorf(codes.Unimplemented, "method GetCuration not implemented") } func (UnimplementedApiHubCurateServer) ListCurations(context.Context, *ListCurationsRequest) (*ListCurationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListCurations not implemented") } func (UnimplementedApiHubCurateServer) UpdateCuration(context.Context, *UpdateCurationRequest) (*Curation, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateCuration not implemented") } func (UnimplementedApiHubCurateServer) DeleteCuration(context.Context, *DeleteCurationRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteCuration not implemented") } // UnsafeApiHubCurateServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ApiHubCurateServer will // result in compilation errors. type UnsafeApiHubCurateServer interface { mustEmbedUnimplementedApiHubCurateServer() } func RegisterApiHubCurateServer(s grpc.ServiceRegistrar, srv ApiHubCurateServer) { s.RegisterService(&ApiHubCurate_ServiceDesc, srv) } func _ApiHubCurate_CreateCuration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateCurationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubCurateServer).CreateCuration(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHubCurate_CreateCuration_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubCurateServer).CreateCuration(ctx, req.(*CreateCurationRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHubCurate_GetCuration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetCurationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubCurateServer).GetCuration(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHubCurate_GetCuration_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubCurateServer).GetCuration(ctx, req.(*GetCurationRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHubCurate_ListCurations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListCurationsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubCurateServer).ListCurations(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHubCurate_ListCurations_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubCurateServer).ListCurations(ctx, req.(*ListCurationsRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHubCurate_UpdateCuration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateCurationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubCurateServer).UpdateCuration(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHubCurate_UpdateCuration_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubCurateServer).UpdateCuration(ctx, req.(*UpdateCurationRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHubCurate_DeleteCuration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteCurationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubCurateServer).DeleteCuration(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHubCurate_DeleteCuration_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubCurateServer).DeleteCuration(ctx, req.(*DeleteCurationRequest)) } return interceptor(ctx, in, info, handler) } // ApiHubCurate_ServiceDesc is the grpc.ServiceDesc for ApiHubCurate service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ApiHubCurate_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.cloud.apihub.v1.ApiHubCurate", HandlerType: (*ApiHubCurateServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateCuration", Handler: _ApiHubCurate_CreateCuration_Handler, }, { MethodName: "GetCuration", Handler: _ApiHubCurate_GetCuration_Handler, }, { MethodName: "ListCurations", Handler: _ApiHubCurate_ListCurations_Handler, }, { MethodName: "UpdateCuration", Handler: _ApiHubCurate_UpdateCuration_Handler, }, { MethodName: "DeleteCuration", Handler: _ApiHubCurate_DeleteCuration_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/cloud/apihub/v1/curate_service.proto", }