// 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/asset/v1p2beta1/asset_service.proto package assetpb 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 ( AssetService_CreateFeed_FullMethodName = "/google.cloud.asset.v1p2beta1.AssetService/CreateFeed" AssetService_GetFeed_FullMethodName = "/google.cloud.asset.v1p2beta1.AssetService/GetFeed" AssetService_ListFeeds_FullMethodName = "/google.cloud.asset.v1p2beta1.AssetService/ListFeeds" AssetService_UpdateFeed_FullMethodName = "/google.cloud.asset.v1p2beta1.AssetService/UpdateFeed" AssetService_DeleteFeed_FullMethodName = "/google.cloud.asset.v1p2beta1.AssetService/DeleteFeed" ) // AssetServiceClient is the client API for AssetService 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 AssetServiceClient interface { // Creates a feed in a parent project/folder/organization to listen to its // asset updates. CreateFeed(ctx context.Context, in *CreateFeedRequest, opts ...grpc.CallOption) (*Feed, error) // Gets details about an asset feed. GetFeed(ctx context.Context, in *GetFeedRequest, opts ...grpc.CallOption) (*Feed, error) // Lists all asset feeds in a parent project/folder/organization. ListFeeds(ctx context.Context, in *ListFeedsRequest, opts ...grpc.CallOption) (*ListFeedsResponse, error) // Updates an asset feed configuration. UpdateFeed(ctx context.Context, in *UpdateFeedRequest, opts ...grpc.CallOption) (*Feed, error) // Deletes an asset feed. DeleteFeed(ctx context.Context, in *DeleteFeedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) } type assetServiceClient struct { cc grpc.ClientConnInterface } func NewAssetServiceClient(cc grpc.ClientConnInterface) AssetServiceClient { return &assetServiceClient{cc} } func (c *assetServiceClient) CreateFeed(ctx context.Context, in *CreateFeedRequest, opts ...grpc.CallOption) (*Feed, error) { out := new(Feed) err := c.cc.Invoke(ctx, AssetService_CreateFeed_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *assetServiceClient) GetFeed(ctx context.Context, in *GetFeedRequest, opts ...grpc.CallOption) (*Feed, error) { out := new(Feed) err := c.cc.Invoke(ctx, AssetService_GetFeed_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *assetServiceClient) ListFeeds(ctx context.Context, in *ListFeedsRequest, opts ...grpc.CallOption) (*ListFeedsResponse, error) { out := new(ListFeedsResponse) err := c.cc.Invoke(ctx, AssetService_ListFeeds_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *assetServiceClient) UpdateFeed(ctx context.Context, in *UpdateFeedRequest, opts ...grpc.CallOption) (*Feed, error) { out := new(Feed) err := c.cc.Invoke(ctx, AssetService_UpdateFeed_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *assetServiceClient) DeleteFeed(ctx context.Context, in *DeleteFeedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, AssetService_DeleteFeed_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // AssetServiceServer is the server API for AssetService service. // All implementations should embed UnimplementedAssetServiceServer // for forward compatibility type AssetServiceServer interface { // Creates a feed in a parent project/folder/organization to listen to its // asset updates. CreateFeed(context.Context, *CreateFeedRequest) (*Feed, error) // Gets details about an asset feed. GetFeed(context.Context, *GetFeedRequest) (*Feed, error) // Lists all asset feeds in a parent project/folder/organization. ListFeeds(context.Context, *ListFeedsRequest) (*ListFeedsResponse, error) // Updates an asset feed configuration. UpdateFeed(context.Context, *UpdateFeedRequest) (*Feed, error) // Deletes an asset feed. DeleteFeed(context.Context, *DeleteFeedRequest) (*emptypb.Empty, error) } // UnimplementedAssetServiceServer should be embedded to have forward compatible implementations. type UnimplementedAssetServiceServer struct { } func (UnimplementedAssetServiceServer) CreateFeed(context.Context, *CreateFeedRequest) (*Feed, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateFeed not implemented") } func (UnimplementedAssetServiceServer) GetFeed(context.Context, *GetFeedRequest) (*Feed, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFeed not implemented") } func (UnimplementedAssetServiceServer) ListFeeds(context.Context, *ListFeedsRequest) (*ListFeedsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListFeeds not implemented") } func (UnimplementedAssetServiceServer) UpdateFeed(context.Context, *UpdateFeedRequest) (*Feed, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateFeed not implemented") } func (UnimplementedAssetServiceServer) DeleteFeed(context.Context, *DeleteFeedRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteFeed not implemented") } // UnsafeAssetServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AssetServiceServer will // result in compilation errors. type UnsafeAssetServiceServer interface { mustEmbedUnimplementedAssetServiceServer() } func RegisterAssetServiceServer(s grpc.ServiceRegistrar, srv AssetServiceServer) { s.RegisterService(&AssetService_ServiceDesc, srv) } func _AssetService_CreateFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateFeedRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AssetServiceServer).CreateFeed(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AssetService_CreateFeed_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AssetServiceServer).CreateFeed(ctx, req.(*CreateFeedRequest)) } return interceptor(ctx, in, info, handler) } func _AssetService_GetFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetFeedRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AssetServiceServer).GetFeed(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AssetService_GetFeed_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AssetServiceServer).GetFeed(ctx, req.(*GetFeedRequest)) } return interceptor(ctx, in, info, handler) } func _AssetService_ListFeeds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListFeedsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AssetServiceServer).ListFeeds(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AssetService_ListFeeds_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AssetServiceServer).ListFeeds(ctx, req.(*ListFeedsRequest)) } return interceptor(ctx, in, info, handler) } func _AssetService_UpdateFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateFeedRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AssetServiceServer).UpdateFeed(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AssetService_UpdateFeed_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AssetServiceServer).UpdateFeed(ctx, req.(*UpdateFeedRequest)) } return interceptor(ctx, in, info, handler) } func _AssetService_DeleteFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteFeedRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AssetServiceServer).DeleteFeed(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AssetService_DeleteFeed_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AssetServiceServer).DeleteFeed(ctx, req.(*DeleteFeedRequest)) } return interceptor(ctx, in, info, handler) } // AssetService_ServiceDesc is the grpc.ServiceDesc for AssetService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var AssetService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.cloud.asset.v1p2beta1.AssetService", HandlerType: (*AssetServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateFeed", Handler: _AssetService_CreateFeed_Handler, }, { MethodName: "GetFeed", Handler: _AssetService_GetFeed_Handler, }, { MethodName: "ListFeeds", Handler: _AssetService_ListFeeds_Handler, }, { MethodName: "UpdateFeed", Handler: _AssetService_UpdateFeed_Handler, }, { MethodName: "DeleteFeed", Handler: _AssetService_DeleteFeed_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/cloud/asset/v1p2beta1/asset_service.proto", }