// 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/linting_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 ( LintingService_GetStyleGuide_FullMethodName = "/google.cloud.apihub.v1.LintingService/GetStyleGuide" LintingService_UpdateStyleGuide_FullMethodName = "/google.cloud.apihub.v1.LintingService/UpdateStyleGuide" LintingService_GetStyleGuideContents_FullMethodName = "/google.cloud.apihub.v1.LintingService/GetStyleGuideContents" LintingService_LintSpec_FullMethodName = "/google.cloud.apihub.v1.LintingService/LintSpec" ) // LintingServiceClient is the client API for LintingService 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 LintingServiceClient interface { // Get the style guide being used for linting. GetStyleGuide(ctx context.Context, in *GetStyleGuideRequest, opts ...grpc.CallOption) (*StyleGuide, error) // Update the styleGuide to be used for liniting in by API hub. UpdateStyleGuide(ctx context.Context, in *UpdateStyleGuideRequest, opts ...grpc.CallOption) (*StyleGuide, error) // Get the contents of the style guide. GetStyleGuideContents(ctx context.Context, in *GetStyleGuideContentsRequest, opts ...grpc.CallOption) (*StyleGuideContents, error) // Lints the requested spec and updates the corresponding API Spec with the // lint response. This lint response will be available in all subsequent // Get and List Spec calls to Core service. LintSpec(ctx context.Context, in *LintSpecRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) } type lintingServiceClient struct { cc grpc.ClientConnInterface } func NewLintingServiceClient(cc grpc.ClientConnInterface) LintingServiceClient { return &lintingServiceClient{cc} } func (c *lintingServiceClient) GetStyleGuide(ctx context.Context, in *GetStyleGuideRequest, opts ...grpc.CallOption) (*StyleGuide, error) { out := new(StyleGuide) err := c.cc.Invoke(ctx, LintingService_GetStyleGuide_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *lintingServiceClient) UpdateStyleGuide(ctx context.Context, in *UpdateStyleGuideRequest, opts ...grpc.CallOption) (*StyleGuide, error) { out := new(StyleGuide) err := c.cc.Invoke(ctx, LintingService_UpdateStyleGuide_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *lintingServiceClient) GetStyleGuideContents(ctx context.Context, in *GetStyleGuideContentsRequest, opts ...grpc.CallOption) (*StyleGuideContents, error) { out := new(StyleGuideContents) err := c.cc.Invoke(ctx, LintingService_GetStyleGuideContents_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *lintingServiceClient) LintSpec(ctx context.Context, in *LintSpecRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, LintingService_LintSpec_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // LintingServiceServer is the server API for LintingService service. // All implementations should embed UnimplementedLintingServiceServer // for forward compatibility type LintingServiceServer interface { // Get the style guide being used for linting. GetStyleGuide(context.Context, *GetStyleGuideRequest) (*StyleGuide, error) // Update the styleGuide to be used for liniting in by API hub. UpdateStyleGuide(context.Context, *UpdateStyleGuideRequest) (*StyleGuide, error) // Get the contents of the style guide. GetStyleGuideContents(context.Context, *GetStyleGuideContentsRequest) (*StyleGuideContents, error) // Lints the requested spec and updates the corresponding API Spec with the // lint response. This lint response will be available in all subsequent // Get and List Spec calls to Core service. LintSpec(context.Context, *LintSpecRequest) (*emptypb.Empty, error) } // UnimplementedLintingServiceServer should be embedded to have forward compatible implementations. type UnimplementedLintingServiceServer struct { } func (UnimplementedLintingServiceServer) GetStyleGuide(context.Context, *GetStyleGuideRequest) (*StyleGuide, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStyleGuide not implemented") } func (UnimplementedLintingServiceServer) UpdateStyleGuide(context.Context, *UpdateStyleGuideRequest) (*StyleGuide, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateStyleGuide not implemented") } func (UnimplementedLintingServiceServer) GetStyleGuideContents(context.Context, *GetStyleGuideContentsRequest) (*StyleGuideContents, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStyleGuideContents not implemented") } func (UnimplementedLintingServiceServer) LintSpec(context.Context, *LintSpecRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method LintSpec not implemented") } // UnsafeLintingServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to LintingServiceServer will // result in compilation errors. type UnsafeLintingServiceServer interface { mustEmbedUnimplementedLintingServiceServer() } func RegisterLintingServiceServer(s grpc.ServiceRegistrar, srv LintingServiceServer) { s.RegisterService(&LintingService_ServiceDesc, srv) } func _LintingService_GetStyleGuide_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetStyleGuideRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LintingServiceServer).GetStyleGuide(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LintingService_GetStyleGuide_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LintingServiceServer).GetStyleGuide(ctx, req.(*GetStyleGuideRequest)) } return interceptor(ctx, in, info, handler) } func _LintingService_UpdateStyleGuide_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateStyleGuideRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LintingServiceServer).UpdateStyleGuide(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LintingService_UpdateStyleGuide_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LintingServiceServer).UpdateStyleGuide(ctx, req.(*UpdateStyleGuideRequest)) } return interceptor(ctx, in, info, handler) } func _LintingService_GetStyleGuideContents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetStyleGuideContentsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LintingServiceServer).GetStyleGuideContents(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LintingService_GetStyleGuideContents_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LintingServiceServer).GetStyleGuideContents(ctx, req.(*GetStyleGuideContentsRequest)) } return interceptor(ctx, in, info, handler) } func _LintingService_LintSpec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LintSpecRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LintingServiceServer).LintSpec(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LintingService_LintSpec_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LintingServiceServer).LintSpec(ctx, req.(*LintSpecRequest)) } return interceptor(ctx, in, info, handler) } // LintingService_ServiceDesc is the grpc.ServiceDesc for LintingService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var LintingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.cloud.apihub.v1.LintingService", HandlerType: (*LintingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetStyleGuide", Handler: _LintingService_GetStyleGuide_Handler, }, { MethodName: "UpdateStyleGuide", Handler: _LintingService_UpdateStyleGuide_Handler, }, { MethodName: "GetStyleGuideContents", Handler: _LintingService_GetStyleGuideContents_Handler, }, { MethodName: "LintSpec", Handler: _LintingService_LintSpec_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/cloud/apihub/v1/linting_service.proto", }