| 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/asset/v1p5beta1/asset_service.proto |
| 20 |
|
| 21 |
package assetpb |
| 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 |
AssetService_ListAssets_FullMethodName = "/google.cloud.asset.v1p5beta1.AssetService/ListAssets" |
| 37 |
) |
| 38 |
|
| 39 |
// AssetServiceClient is the client API for AssetService service. |
| 40 |
// |
| 41 |
// 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. |
| 42 |
type AssetServiceClient interface { |
| 43 |
// Lists assets with time and resource types and returns paged results in |
| 44 |
// response. |
| 45 |
ListAssets(ctx context.Context, in *ListAssetsRequest, opts ...grpc.CallOption) (*ListAssetsResponse, error) |
| 46 |
} |
| 47 |
|
| 48 |
type assetServiceClient struct { |
| 49 |
cc grpc.ClientConnInterface |
| 50 |
} |
| 51 |
|
| 52 |
func NewAssetServiceClient(cc grpc.ClientConnInterface) AssetServiceClient { |
| 53 |
return &assetServiceClient{cc} |
| 54 |
} |
| 55 |
|
| 56 |
func (c *assetServiceClient) ListAssets(ctx context.Context, in *ListAssetsRequest, opts ...grpc.CallOption) (*ListAssetsResponse, error) { |
| 57 |
out := new(ListAssetsResponse) |
| 58 |
err := c.cc.Invoke(ctx, AssetService_ListAssets_FullMethodName, in, out, opts...) |
| 59 |
if err != nil { |
| 60 |
return nil, err |
| 61 |
} |
| 62 |
return out, nil |
| 63 |
} |
| 64 |
|
| 65 |
// AssetServiceServer is the server API for AssetService service. |
| 66 |
// All implementations should embed UnimplementedAssetServiceServer |
| 67 |
// for forward compatibility |
| 68 |
type AssetServiceServer interface { |
| 69 |
// Lists assets with time and resource types and returns paged results in |
| 70 |
// response. |
| 71 |
ListAssets(context.Context, *ListAssetsRequest) (*ListAssetsResponse, error) |
| 72 |
} |
| 73 |
|
| 74 |
// UnimplementedAssetServiceServer should be embedded to have forward compatible implementations. |
| 75 |
type UnimplementedAssetServiceServer struct { |
| 76 |
} |
| 77 |
|
| 78 |
func (UnimplementedAssetServiceServer) ListAssets(context.Context, *ListAssetsRequest) (*ListAssetsResponse, error) { |
| 79 |
return nil, status.Errorf(codes.Unimplemented, "method ListAssets not implemented") |
| 80 |
} |
| 81 |
|
| 82 |
// UnsafeAssetServiceServer may be embedded to opt out of forward compatibility for this service. |
| 83 |
// Use of this interface is not recommended, as added methods to AssetServiceServer will |
| 84 |
// result in compilation errors. |
| 85 |
type UnsafeAssetServiceServer interface { |
| 86 |
mustEmbedUnimplementedAssetServiceServer() |
| 87 |
} |
| 88 |
|
| 89 |
func RegisterAssetServiceServer(s grpc.ServiceRegistrar, srv AssetServiceServer) { |
| 90 |
s.RegisterService(&AssetService_ServiceDesc, srv) |
| 91 |
} |
| 92 |
|
| 93 |
func _AssetService_ListAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 94 |
in := new(ListAssetsRequest) |
| 95 |
if err := dec(in); err != nil { |
| 96 |
return nil, err |
| 97 |
} |
| 98 |
if interceptor == nil { |
| 99 |
return srv.(AssetServiceServer).ListAssets(ctx, in) |
| 100 |
} |
| 101 |
info := &grpc.UnaryServerInfo{ |
| 102 |
Server: srv, |
| 103 |
FullMethod: AssetService_ListAssets_FullMethodName, |
| 104 |
} |
| 105 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 106 |
return srv.(AssetServiceServer).ListAssets(ctx, req.(*ListAssetsRequest)) |
| 107 |
} |
| 108 |
return interceptor(ctx, in, info, handler) |
| 109 |
} |
| 110 |
|
| 111 |
// AssetService_ServiceDesc is the grpc.ServiceDesc for AssetService service. |
| 112 |
// It's only intended for direct use with grpc.RegisterService, |
| 113 |
// and not to be introspected or modified (even as a copy) |
| 114 |
var AssetService_ServiceDesc = grpc.ServiceDesc{ |
| 115 |
ServiceName: "google.cloud.asset.v1p5beta1.AssetService", |
| 116 |
HandlerType: (*AssetServiceServer)(nil), |
| 117 |
Methods: []grpc.MethodDesc{ |
| 118 |
{ |
| 119 |
MethodName: "ListAssets", |
| 120 |
Handler: _AssetService_ListAssets_Handler, |
| 121 |
}, |
| 122 |
}, |
| 123 |
Streams: []grpc.StreamDesc{}, |
| 124 |
Metadata: "google/cloud/asset/v1p5beta1/asset_service.proto", |
| 125 |
} |