Debian Codegraph @

asset/apiv1/assetpb/asset_service_grpc.pb.go

raw
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/v1/asset_service.proto
20
21 package assetpb
22
23 import (
24 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
25 context "context"
26 grpc "google.golang.org/grpc"
27 codes "google.golang.org/grpc/codes"
28 status "google.golang.org/grpc/status"
29 emptypb "google.golang.org/protobuf/types/known/emptypb"
30 )
31
32 // This is a compile-time assertion to ensure that this generated file
33 // is compatible with the grpc package it is being compiled against.
34 // Requires gRPC-Go v1.32.0 or later.
35 const _ = grpc.SupportPackageIsVersion7
36
37 const (
38 AssetService_ExportAssets_FullMethodName = "/google.cloud.asset.v1.AssetService/ExportAssets"
39 AssetService_ListAssets_FullMethodName = "/google.cloud.asset.v1.AssetService/ListAssets"
40 AssetService_BatchGetAssetsHistory_FullMethodName = "/google.cloud.asset.v1.AssetService/BatchGetAssetsHistory"
41 AssetService_CreateFeed_FullMethodName = "/google.cloud.asset.v1.AssetService/CreateFeed"
42 AssetService_GetFeed_FullMethodName = "/google.cloud.asset.v1.AssetService/GetFeed"
43 AssetService_ListFeeds_FullMethodName = "/google.cloud.asset.v1.AssetService/ListFeeds"
44 AssetService_UpdateFeed_FullMethodName = "/google.cloud.asset.v1.AssetService/UpdateFeed"
45 AssetService_DeleteFeed_FullMethodName = "/google.cloud.asset.v1.AssetService/DeleteFeed"
46 AssetService_SearchAllResources_FullMethodName = "/google.cloud.asset.v1.AssetService/SearchAllResources"
47 AssetService_SearchAllIamPolicies_FullMethodName = "/google.cloud.asset.v1.AssetService/SearchAllIamPolicies"
48 AssetService_AnalyzeIamPolicy_FullMethodName = "/google.cloud.asset.v1.AssetService/AnalyzeIamPolicy"
49 AssetService_AnalyzeIamPolicyLongrunning_FullMethodName = "/google.cloud.asset.v1.AssetService/AnalyzeIamPolicyLongrunning"
50 AssetService_AnalyzeMove_FullMethodName = "/google.cloud.asset.v1.AssetService/AnalyzeMove"
51 AssetService_QueryAssets_FullMethodName = "/google.cloud.asset.v1.AssetService/QueryAssets"
52 AssetService_CreateSavedQuery_FullMethodName = "/google.cloud.asset.v1.AssetService/CreateSavedQuery"
53 AssetService_GetSavedQuery_FullMethodName = "/google.cloud.asset.v1.AssetService/GetSavedQuery"
54 AssetService_ListSavedQueries_FullMethodName = "/google.cloud.asset.v1.AssetService/ListSavedQueries"
55 AssetService_UpdateSavedQuery_FullMethodName = "/google.cloud.asset.v1.AssetService/UpdateSavedQuery"
56 AssetService_DeleteSavedQuery_FullMethodName = "/google.cloud.asset.v1.AssetService/DeleteSavedQuery"
57 AssetService_BatchGetEffectiveIamPolicies_FullMethodName = "/google.cloud.asset.v1.AssetService/BatchGetEffectiveIamPolicies"
58 AssetService_AnalyzeOrgPolicies_FullMethodName = "/google.cloud.asset.v1.AssetService/AnalyzeOrgPolicies"
59 AssetService_AnalyzeOrgPolicyGovernedContainers_FullMethodName = "/google.cloud.asset.v1.AssetService/AnalyzeOrgPolicyGovernedContainers"
60 AssetService_AnalyzeOrgPolicyGovernedAssets_FullMethodName = "/google.cloud.asset.v1.AssetService/AnalyzeOrgPolicyGovernedAssets"
61 )
62
63 // AssetServiceClient is the client API for AssetService service.
64 //
65 // 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.
66 type AssetServiceClient interface {
67 // Exports assets with time and resource types to a given Cloud Storage
68 // location/BigQuery table. For Cloud Storage location destinations, the
69 // output format is newline-delimited JSON. Each line represents a
70 // [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON
71 // format; for BigQuery table destinations, the output table stores the fields
72 // in asset Protobuf as columns. This API implements the
73 // [google.longrunning.Operation][google.longrunning.Operation] API, which
74 // allows you to keep track of the export. We recommend intervals of at least
75 // 2 seconds with exponential retry to poll the export operation result. For
76 // regular-size resource parent, the export operation usually finishes within
77 // 5 minutes.
78 ExportAssets(ctx context.Context, in *ExportAssetsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
79 // Lists assets with time and resource types and returns paged results in
80 // response.
81 ListAssets(ctx context.Context, in *ListAssetsRequest, opts ...grpc.CallOption) (*ListAssetsResponse, error)
82 // Batch gets the update history of assets that overlap a time window.
83 // For IAM_POLICY content, this API outputs history when the asset and its
84 // attached IAM POLICY both exist. This can create gaps in the output history.
85 // Otherwise, this API outputs history with asset in both non-delete or
86 // deleted status.
87 // If a specified asset does not exist, this API returns an INVALID_ARGUMENT
88 // error.
89 BatchGetAssetsHistory(ctx context.Context, in *BatchGetAssetsHistoryRequest, opts ...grpc.CallOption) (*BatchGetAssetsHistoryResponse, error)
90 // Creates a feed in a parent project/folder/organization to listen to its
91 // asset updates.
92 CreateFeed(ctx context.Context, in *CreateFeedRequest, opts ...grpc.CallOption) (*Feed, error)
93 // Gets details about an asset feed.
94 GetFeed(ctx context.Context, in *GetFeedRequest, opts ...grpc.CallOption) (*Feed, error)
95 // Lists all asset feeds in a parent project/folder/organization.
96 ListFeeds(ctx context.Context, in *ListFeedsRequest, opts ...grpc.CallOption) (*ListFeedsResponse, error)
97 // Updates an asset feed configuration.
98 UpdateFeed(ctx context.Context, in *UpdateFeedRequest, opts ...grpc.CallOption) (*Feed, error)
99 // Deletes an asset feed.
100 DeleteFeed(ctx context.Context, in *DeleteFeedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
101 // Searches all Google Cloud resources within the specified scope, such as a
102 // project, folder, or organization. The caller must be granted the
103 // `cloudasset.assets.searchAllResources` permission on the desired scope,
104 // otherwise the request will be rejected.
105 SearchAllResources(ctx context.Context, in *SearchAllResourcesRequest, opts ...grpc.CallOption) (*SearchAllResourcesResponse, error)
106 // Searches all IAM policies within the specified scope, such as a project,
107 // folder, or organization. The caller must be granted the
108 // `cloudasset.assets.searchAllIamPolicies` permission on the desired scope,
109 // otherwise the request will be rejected.
110 SearchAllIamPolicies(ctx context.Context, in *SearchAllIamPoliciesRequest, opts ...grpc.CallOption) (*SearchAllIamPoliciesResponse, error)
111 // Analyzes IAM policies to answer which identities have what accesses on
112 // which resources.
113 AnalyzeIamPolicy(ctx context.Context, in *AnalyzeIamPolicyRequest, opts ...grpc.CallOption) (*AnalyzeIamPolicyResponse, error)
114 // Analyzes IAM policies asynchronously to answer which identities have what
115 // accesses on which resources, and writes the analysis results to a Google
116 // Cloud Storage or a BigQuery destination. For Cloud Storage destination, the
117 // output format is the JSON format that represents a
118 // [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse].
119 // This method implements the
120 // [google.longrunning.Operation][google.longrunning.Operation], which allows
121 // you to track the operation status. We recommend intervals of at least 2
122 // seconds with exponential backoff retry to poll the operation result. The
123 // metadata contains the metadata for the long-running operation.
124 AnalyzeIamPolicyLongrunning(ctx context.Context, in *AnalyzeIamPolicyLongrunningRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
125 // Analyze moving a resource to a specified destination without kicking off
126 // the actual move. The analysis is best effort depending on the user's
127 // permissions of viewing different hierarchical policies and configurations.
128 // The policies and configuration are subject to change before the actual
129 // resource migration takes place.
130 AnalyzeMove(ctx context.Context, in *AnalyzeMoveRequest, opts ...grpc.CallOption) (*AnalyzeMoveResponse, error)
131 // Issue a job that queries assets using a SQL statement compatible with
132 // [BigQuery SQL](https://cloud.google.com/bigquery/docs/introduction-sql).
133 //
134 // If the query execution finishes within timeout and there's no pagination,
135 // the full query results will be returned in the `QueryAssetsResponse`.
136 //
137 // Otherwise, full query results can be obtained by issuing extra requests
138 // with the `job_reference` from the a previous `QueryAssets` call.
139 //
140 // Note, the query result has approximately 10 GB limitation enforced by
141 // [BigQuery](https://cloud.google.com/bigquery/docs/best-practices-performance-output).
142 // Queries return larger results will result in errors.
143 QueryAssets(ctx context.Context, in *QueryAssetsRequest, opts ...grpc.CallOption) (*QueryAssetsResponse, error)
144 // Creates a saved query in a parent project/folder/organization.
145 CreateSavedQuery(ctx context.Context, in *CreateSavedQueryRequest, opts ...grpc.CallOption) (*SavedQuery, error)
146 // Gets details about a saved query.
147 GetSavedQuery(ctx context.Context, in *GetSavedQueryRequest, opts ...grpc.CallOption) (*SavedQuery, error)
148 // Lists all saved queries in a parent project/folder/organization.
149 ListSavedQueries(ctx context.Context, in *ListSavedQueriesRequest, opts ...grpc.CallOption) (*ListSavedQueriesResponse, error)
150 // Updates a saved query.
151 UpdateSavedQuery(ctx context.Context, in *UpdateSavedQueryRequest, opts ...grpc.CallOption) (*SavedQuery, error)
152 // Deletes a saved query.
153 DeleteSavedQuery(ctx context.Context, in *DeleteSavedQueryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
154 // Gets effective IAM policies for a batch of resources.
155 BatchGetEffectiveIamPolicies(ctx context.Context, in *BatchGetEffectiveIamPoliciesRequest, opts ...grpc.CallOption) (*BatchGetEffectiveIamPoliciesResponse, error)
156 // Analyzes organization policies under a scope.
157 AnalyzeOrgPolicies(ctx context.Context, in *AnalyzeOrgPoliciesRequest, opts ...grpc.CallOption) (*AnalyzeOrgPoliciesResponse, error)
158 // Analyzes organization policies governed containers (projects, folders or
159 // organization) under a scope.
160 AnalyzeOrgPolicyGovernedContainers(ctx context.Context, in *AnalyzeOrgPolicyGovernedContainersRequest, opts ...grpc.CallOption) (*AnalyzeOrgPolicyGovernedContainersResponse, error)
161 // Analyzes organization policies governed assets (Google Cloud resources or
162 // policies) under a scope. This RPC supports custom constraints and the
163 // following canned constraints:
164 //
165 // * constraints/ainotebooks.accessMode
166 // * constraints/ainotebooks.disableFileDownloads
167 // * constraints/ainotebooks.disableRootAccess
168 // * constraints/ainotebooks.disableTerminal
169 // * constraints/ainotebooks.environmentOptions
170 // * constraints/ainotebooks.requireAutoUpgradeSchedule
171 // * constraints/ainotebooks.restrictVpcNetworks
172 // * constraints/compute.disableGuestAttributesAccess
173 // * constraints/compute.disableInstanceDataAccessApis
174 // * constraints/compute.disableNestedVirtualization
175 // * constraints/compute.disableSerialPortAccess
176 // * constraints/compute.disableSerialPortLogging
177 // * constraints/compute.disableVpcExternalIpv6
178 // * constraints/compute.requireOsLogin
179 // * constraints/compute.requireShieldedVm
180 // * constraints/compute.restrictLoadBalancerCreationForTypes
181 // * constraints/compute.restrictProtocolForwardingCreationForTypes
182 // * constraints/compute.restrictXpnProjectLienRemoval
183 // * constraints/compute.setNewProjectDefaultToZonalDNSOnly
184 // * constraints/compute.skipDefaultNetworkCreation
185 // * constraints/compute.trustedImageProjects
186 // * constraints/compute.vmCanIpForward
187 // * constraints/compute.vmExternalIpAccess
188 // * constraints/gcp.detailedAuditLoggingMode
189 // * constraints/gcp.resourceLocations
190 // * constraints/iam.allowedPolicyMemberDomains
191 // * constraints/iam.automaticIamGrantsForDefaultServiceAccounts
192 // * constraints/iam.disableServiceAccountCreation
193 // * constraints/iam.disableServiceAccountKeyCreation
194 // * constraints/iam.disableServiceAccountKeyUpload
195 // * constraints/iam.restrictCrossProjectServiceAccountLienRemoval
196 // * constraints/iam.serviceAccountKeyExpiryHours
197 // * constraints/resourcemanager.accessBoundaries
198 // * constraints/resourcemanager.allowedExportDestinations
199 // * constraints/sql.restrictAuthorizedNetworks
200 // * constraints/sql.restrictNoncompliantDiagnosticDataAccess
201 // * constraints/sql.restrictNoncompliantResourceCreation
202 // * constraints/sql.restrictPublicIp
203 // * constraints/storage.publicAccessPrevention
204 // * constraints/storage.restrictAuthTypes
205 // * constraints/storage.uniformBucketLevelAccess
206 //
207 // This RPC only returns either resources of types [supported by search
208 // APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
209 // or IAM policies.
210 AnalyzeOrgPolicyGovernedAssets(ctx context.Context, in *AnalyzeOrgPolicyGovernedAssetsRequest, opts ...grpc.CallOption) (*AnalyzeOrgPolicyGovernedAssetsResponse, error)
211 }
212
213 type assetServiceClient struct {
214 cc grpc.ClientConnInterface
215 }
216
217 func NewAssetServiceClient(cc grpc.ClientConnInterface) AssetServiceClient {
218 return &assetServiceClient{cc}
219 }
220
221 func (c *assetServiceClient) ExportAssets(ctx context.Context, in *ExportAssetsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
222 out := new(longrunningpb.Operation)
223 err := c.cc.Invoke(ctx, AssetService_ExportAssets_FullMethodName, in, out, opts...)
224 if err != nil {
225 return nil, err
226 }
227 return out, nil
228 }
229
230 func (c *assetServiceClient) ListAssets(ctx context.Context, in *ListAssetsRequest, opts ...grpc.CallOption) (*ListAssetsResponse, error) {
231 out := new(ListAssetsResponse)
232 err := c.cc.Invoke(ctx, AssetService_ListAssets_FullMethodName, in, out, opts...)
233 if err != nil {
234 return nil, err
235 }
236 return out, nil
237 }
238
239 func (c *assetServiceClient) BatchGetAssetsHistory(ctx context.Context, in *BatchGetAssetsHistoryRequest, opts ...grpc.CallOption) (*BatchGetAssetsHistoryResponse, error) {
240 out := new(BatchGetAssetsHistoryResponse)
241 err := c.cc.Invoke(ctx, AssetService_BatchGetAssetsHistory_FullMethodName, in, out, opts...)
242 if err != nil {
243 return nil, err
244 }
245 return out, nil
246 }
247
248 func (c *assetServiceClient) CreateFeed(ctx context.Context, in *CreateFeedRequest, opts ...grpc.CallOption) (*Feed, error) {
249 out := new(Feed)
250 err := c.cc.Invoke(ctx, AssetService_CreateFeed_FullMethodName, in, out, opts...)
251 if err != nil {
252 return nil, err
253 }
254 return out, nil
255 }
256
257 func (c *assetServiceClient) GetFeed(ctx context.Context, in *GetFeedRequest, opts ...grpc.CallOption) (*Feed, error) {
258 out := new(Feed)
259 err := c.cc.Invoke(ctx, AssetService_GetFeed_FullMethodName, in, out, opts...)
260 if err != nil {
261 return nil, err
262 }
263 return out, nil
264 }
265
266 func (c *assetServiceClient) ListFeeds(ctx context.Context, in *ListFeedsRequest, opts ...grpc.CallOption) (*ListFeedsResponse, error) {
267 out := new(ListFeedsResponse)
268 err := c.cc.Invoke(ctx, AssetService_ListFeeds_FullMethodName, in, out, opts...)
269 if err != nil {
270 return nil, err
271 }
272 return out, nil
273 }
274
275 func (c *assetServiceClient) UpdateFeed(ctx context.Context, in *UpdateFeedRequest, opts ...grpc.CallOption) (*Feed, error) {
276 out := new(Feed)
277 err := c.cc.Invoke(ctx, AssetService_UpdateFeed_FullMethodName, in, out, opts...)
278 if err != nil {
279 return nil, err
280 }
281 return out, nil
282 }
283
284 func (c *assetServiceClient) DeleteFeed(ctx context.Context, in *DeleteFeedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
285 out := new(emptypb.Empty)
286 err := c.cc.Invoke(ctx, AssetService_DeleteFeed_FullMethodName, in, out, opts...)
287 if err != nil {
288 return nil, err
289 }
290 return out, nil
291 }
292
293 func (c *assetServiceClient) SearchAllResources(ctx context.Context, in *SearchAllResourcesRequest, opts ...grpc.CallOption) (*SearchAllResourcesResponse, error) {
294 out := new(SearchAllResourcesResponse)
295 err := c.cc.Invoke(ctx, AssetService_SearchAllResources_FullMethodName, in, out, opts...)
296 if err != nil {
297 return nil, err
298 }
299 return out, nil
300 }
301
302 func (c *assetServiceClient) SearchAllIamPolicies(ctx context.Context, in *SearchAllIamPoliciesRequest, opts ...grpc.CallOption) (*SearchAllIamPoliciesResponse, error) {
303 out := new(SearchAllIamPoliciesResponse)
304 err := c.cc.Invoke(ctx, AssetService_SearchAllIamPolicies_FullMethodName, in, out, opts...)
305 if err != nil {
306 return nil, err
307 }
308 return out, nil
309 }
310
311 func (c *assetServiceClient) AnalyzeIamPolicy(ctx context.Context, in *AnalyzeIamPolicyRequest, opts ...grpc.CallOption) (*AnalyzeIamPolicyResponse, error) {
312 out := new(AnalyzeIamPolicyResponse)
313 err := c.cc.Invoke(ctx, AssetService_AnalyzeIamPolicy_FullMethodName, in, out, opts...)
314 if err != nil {
315 return nil, err
316 }
317 return out, nil
318 }
319
320 func (c *assetServiceClient) AnalyzeIamPolicyLongrunning(ctx context.Context, in *AnalyzeIamPolicyLongrunningRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
321 out := new(longrunningpb.Operation)
322 err := c.cc.Invoke(ctx, AssetService_AnalyzeIamPolicyLongrunning_FullMethodName, in, out, opts...)
323 if err != nil {
324 return nil, err
325 }
326 return out, nil
327 }
328
329 func (c *assetServiceClient) AnalyzeMove(ctx context.Context, in *AnalyzeMoveRequest, opts ...grpc.CallOption) (*AnalyzeMoveResponse, error) {
330 out := new(AnalyzeMoveResponse)
331 err := c.cc.Invoke(ctx, AssetService_AnalyzeMove_FullMethodName, in, out, opts...)
332 if err != nil {
333 return nil, err
334 }
335 return out, nil
336 }
337
338 func (c *assetServiceClient) QueryAssets(ctx context.Context, in *QueryAssetsRequest, opts ...grpc.CallOption) (*QueryAssetsResponse, error) {
339 out := new(QueryAssetsResponse)
340 err := c.cc.Invoke(ctx, AssetService_QueryAssets_FullMethodName, in, out, opts...)
341 if err != nil {
342 return nil, err
343 }
344 return out, nil
345 }
346
347 func (c *assetServiceClient) CreateSavedQuery(ctx context.Context, in *CreateSavedQueryRequest, opts ...grpc.CallOption) (*SavedQuery, error) {
348 out := new(SavedQuery)
349 err := c.cc.Invoke(ctx, AssetService_CreateSavedQuery_FullMethodName, in, out, opts...)
350 if err != nil {
351 return nil, err
352 }
353 return out, nil
354 }
355
356 func (c *assetServiceClient) GetSavedQuery(ctx context.Context, in *GetSavedQueryRequest, opts ...grpc.CallOption) (*SavedQuery, error) {
357 out := new(SavedQuery)
358 err := c.cc.Invoke(ctx, AssetService_GetSavedQuery_FullMethodName, in, out, opts...)
359 if err != nil {
360 return nil, err
361 }
362 return out, nil
363 }
364
365 func (c *assetServiceClient) ListSavedQueries(ctx context.Context, in *ListSavedQueriesRequest, opts ...grpc.CallOption) (*ListSavedQueriesResponse, error) {
366 out := new(ListSavedQueriesResponse)
367 err := c.cc.Invoke(ctx, AssetService_ListSavedQueries_FullMethodName, in, out, opts...)
368 if err != nil {
369 return nil, err
370 }
371 return out, nil
372 }
373
374 func (c *assetServiceClient) UpdateSavedQuery(ctx context.Context, in *UpdateSavedQueryRequest, opts ...grpc.CallOption) (*SavedQuery, error) {
375 out := new(SavedQuery)
376 err := c.cc.Invoke(ctx, AssetService_UpdateSavedQuery_FullMethodName, in, out, opts...)
377 if err != nil {
378 return nil, err
379 }
380 return out, nil
381 }
382
383 func (c *assetServiceClient) DeleteSavedQuery(ctx context.Context, in *DeleteSavedQueryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
384 out := new(emptypb.Empty)
385 err := c.cc.Invoke(ctx, AssetService_DeleteSavedQuery_FullMethodName, in, out, opts...)
386 if err != nil {
387 return nil, err
388 }
389 return out, nil
390 }
391
392 func (c *assetServiceClient) BatchGetEffectiveIamPolicies(ctx context.Context, in *BatchGetEffectiveIamPoliciesRequest, opts ...grpc.CallOption) (*BatchGetEffectiveIamPoliciesResponse, error) {
393 out := new(BatchGetEffectiveIamPoliciesResponse)
394 err := c.cc.Invoke(ctx, AssetService_BatchGetEffectiveIamPolicies_FullMethodName, in, out, opts...)
395 if err != nil {
396 return nil, err
397 }
398 return out, nil
399 }
400
401 func (c *assetServiceClient) AnalyzeOrgPolicies(ctx context.Context, in *AnalyzeOrgPoliciesRequest, opts ...grpc.CallOption) (*AnalyzeOrgPoliciesResponse, error) {
402 out := new(AnalyzeOrgPoliciesResponse)
403 err := c.cc.Invoke(ctx, AssetService_AnalyzeOrgPolicies_FullMethodName, in, out, opts...)
404 if err != nil {
405 return nil, err
406 }
407 return out, nil
408 }
409
410 func (c *assetServiceClient) AnalyzeOrgPolicyGovernedContainers(ctx context.Context, in *AnalyzeOrgPolicyGovernedContainersRequest, opts ...grpc.CallOption) (*AnalyzeOrgPolicyGovernedContainersResponse, error) {
411 out := new(AnalyzeOrgPolicyGovernedContainersResponse)
412 err := c.cc.Invoke(ctx, AssetService_AnalyzeOrgPolicyGovernedContainers_FullMethodName, in, out, opts...)
413 if err != nil {
414 return nil, err
415 }
416 return out, nil
417 }
418
419 func (c *assetServiceClient) AnalyzeOrgPolicyGovernedAssets(ctx context.Context, in *AnalyzeOrgPolicyGovernedAssetsRequest, opts ...grpc.CallOption) (*AnalyzeOrgPolicyGovernedAssetsResponse, error) {
420 out := new(AnalyzeOrgPolicyGovernedAssetsResponse)
421 err := c.cc.Invoke(ctx, AssetService_AnalyzeOrgPolicyGovernedAssets_FullMethodName, in, out, opts...)
422 if err != nil {
423 return nil, err
424 }
425 return out, nil
426 }
427
428 // AssetServiceServer is the server API for AssetService service.
429 // All implementations should embed UnimplementedAssetServiceServer
430 // for forward compatibility
431 type AssetServiceServer interface {
432 // Exports assets with time and resource types to a given Cloud Storage
433 // location/BigQuery table. For Cloud Storage location destinations, the
434 // output format is newline-delimited JSON. Each line represents a
435 // [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON
436 // format; for BigQuery table destinations, the output table stores the fields
437 // in asset Protobuf as columns. This API implements the
438 // [google.longrunning.Operation][google.longrunning.Operation] API, which
439 // allows you to keep track of the export. We recommend intervals of at least
440 // 2 seconds with exponential retry to poll the export operation result. For
441 // regular-size resource parent, the export operation usually finishes within
442 // 5 minutes.
443 ExportAssets(context.Context, *ExportAssetsRequest) (*longrunningpb.Operation, error)
444 // Lists assets with time and resource types and returns paged results in
445 // response.
446 ListAssets(context.Context, *ListAssetsRequest) (*ListAssetsResponse, error)
447 // Batch gets the update history of assets that overlap a time window.
448 // For IAM_POLICY content, this API outputs history when the asset and its
449 // attached IAM POLICY both exist. This can create gaps in the output history.
450 // Otherwise, this API outputs history with asset in both non-delete or
451 // deleted status.
452 // If a specified asset does not exist, this API returns an INVALID_ARGUMENT
453 // error.
454 BatchGetAssetsHistory(context.Context, *BatchGetAssetsHistoryRequest) (*BatchGetAssetsHistoryResponse, error)
455 // Creates a feed in a parent project/folder/organization to listen to its
456 // asset updates.
457 CreateFeed(context.Context, *CreateFeedRequest) (*Feed, error)
458 // Gets details about an asset feed.
459 GetFeed(context.Context, *GetFeedRequest) (*Feed, error)
460 // Lists all asset feeds in a parent project/folder/organization.
461 ListFeeds(context.Context, *ListFeedsRequest) (*ListFeedsResponse, error)
462 // Updates an asset feed configuration.
463 UpdateFeed(context.Context, *UpdateFeedRequest) (*Feed, error)
464 // Deletes an asset feed.
465 DeleteFeed(context.Context, *DeleteFeedRequest) (*emptypb.Empty, error)
466 // Searches all Google Cloud resources within the specified scope, such as a
467 // project, folder, or organization. The caller must be granted the
468 // `cloudasset.assets.searchAllResources` permission on the desired scope,
469 // otherwise the request will be rejected.
470 SearchAllResources(context.Context, *SearchAllResourcesRequest) (*SearchAllResourcesResponse, error)
471 // Searches all IAM policies within the specified scope, such as a project,
472 // folder, or organization. The caller must be granted the
473 // `cloudasset.assets.searchAllIamPolicies` permission on the desired scope,
474 // otherwise the request will be rejected.
475 SearchAllIamPolicies(context.Context, *SearchAllIamPoliciesRequest) (*SearchAllIamPoliciesResponse, error)
476 // Analyzes IAM policies to answer which identities have what accesses on
477 // which resources.
478 AnalyzeIamPolicy(context.Context, *AnalyzeIamPolicyRequest) (*AnalyzeIamPolicyResponse, error)
479 // Analyzes IAM policies asynchronously to answer which identities have what
480 // accesses on which resources, and writes the analysis results to a Google
481 // Cloud Storage or a BigQuery destination. For Cloud Storage destination, the
482 // output format is the JSON format that represents a
483 // [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse].
484 // This method implements the
485 // [google.longrunning.Operation][google.longrunning.Operation], which allows
486 // you to track the operation status. We recommend intervals of at least 2
487 // seconds with exponential backoff retry to poll the operation result. The
488 // metadata contains the metadata for the long-running operation.
489 AnalyzeIamPolicyLongrunning(context.Context, *AnalyzeIamPolicyLongrunningRequest) (*longrunningpb.Operation, error)
490 // Analyze moving a resource to a specified destination without kicking off
491 // the actual move. The analysis is best effort depending on the user's
492 // permissions of viewing different hierarchical policies and configurations.
493 // The policies and configuration are subject to change before the actual
494 // resource migration takes place.
495 AnalyzeMove(context.Context, *AnalyzeMoveRequest) (*AnalyzeMoveResponse, error)
496 // Issue a job that queries assets using a SQL statement compatible with
497 // [BigQuery SQL](https://cloud.google.com/bigquery/docs/introduction-sql).
498 //
499 // If the query execution finishes within timeout and there's no pagination,
500 // the full query results will be returned in the `QueryAssetsResponse`.
501 //
502 // Otherwise, full query results can be obtained by issuing extra requests
503 // with the `job_reference` from the a previous `QueryAssets` call.
504 //
505 // Note, the query result has approximately 10 GB limitation enforced by
506 // [BigQuery](https://cloud.google.com/bigquery/docs/best-practices-performance-output).
507 // Queries return larger results will result in errors.
508 QueryAssets(context.Context, *QueryAssetsRequest) (*QueryAssetsResponse, error)
509 // Creates a saved query in a parent project/folder/organization.
510 CreateSavedQuery(context.Context, *CreateSavedQueryRequest) (*SavedQuery, error)
511 // Gets details about a saved query.
512 GetSavedQuery(context.Context, *GetSavedQueryRequest) (*SavedQuery, error)
513 // Lists all saved queries in a parent project/folder/organization.
514 ListSavedQueries(context.Context, *ListSavedQueriesRequest) (*ListSavedQueriesResponse, error)
515 // Updates a saved query.
516 UpdateSavedQuery(context.Context, *UpdateSavedQueryRequest) (*SavedQuery, error)
517 // Deletes a saved query.
518 DeleteSavedQuery(context.Context, *DeleteSavedQueryRequest) (*emptypb.Empty, error)
519 // Gets effective IAM policies for a batch of resources.
520 BatchGetEffectiveIamPolicies(context.Context, *BatchGetEffectiveIamPoliciesRequest) (*BatchGetEffectiveIamPoliciesResponse, error)
521 // Analyzes organization policies under a scope.
522 AnalyzeOrgPolicies(context.Context, *AnalyzeOrgPoliciesRequest) (*AnalyzeOrgPoliciesResponse, error)
523 // Analyzes organization policies governed containers (projects, folders or
524 // organization) under a scope.
525 AnalyzeOrgPolicyGovernedContainers(context.Context, *AnalyzeOrgPolicyGovernedContainersRequest) (*AnalyzeOrgPolicyGovernedContainersResponse, error)
526 // Analyzes organization policies governed assets (Google Cloud resources or
527 // policies) under a scope. This RPC supports custom constraints and the
528 // following canned constraints:
529 //
530 // * constraints/ainotebooks.accessMode
531 // * constraints/ainotebooks.disableFileDownloads
532 // * constraints/ainotebooks.disableRootAccess
533 // * constraints/ainotebooks.disableTerminal
534 // * constraints/ainotebooks.environmentOptions
535 // * constraints/ainotebooks.requireAutoUpgradeSchedule
536 // * constraints/ainotebooks.restrictVpcNetworks
537 // * constraints/compute.disableGuestAttributesAccess
538 // * constraints/compute.disableInstanceDataAccessApis
539 // * constraints/compute.disableNestedVirtualization
540 // * constraints/compute.disableSerialPortAccess
541 // * constraints/compute.disableSerialPortLogging
542 // * constraints/compute.disableVpcExternalIpv6
543 // * constraints/compute.requireOsLogin
544 // * constraints/compute.requireShieldedVm
545 // * constraints/compute.restrictLoadBalancerCreationForTypes
546 // * constraints/compute.restrictProtocolForwardingCreationForTypes
547 // * constraints/compute.restrictXpnProjectLienRemoval
548 // * constraints/compute.setNewProjectDefaultToZonalDNSOnly
549 // * constraints/compute.skipDefaultNetworkCreation
550 // * constraints/compute.trustedImageProjects
551 // * constraints/compute.vmCanIpForward
552 // * constraints/compute.vmExternalIpAccess
553 // * constraints/gcp.detailedAuditLoggingMode
554 // * constraints/gcp.resourceLocations
555 // * constraints/iam.allowedPolicyMemberDomains
556 // * constraints/iam.automaticIamGrantsForDefaultServiceAccounts
557 // * constraints/iam.disableServiceAccountCreation
558 // * constraints/iam.disableServiceAccountKeyCreation
559 // * constraints/iam.disableServiceAccountKeyUpload
560 // * constraints/iam.restrictCrossProjectServiceAccountLienRemoval
561 // * constraints/iam.serviceAccountKeyExpiryHours
562 // * constraints/resourcemanager.accessBoundaries
563 // * constraints/resourcemanager.allowedExportDestinations
564 // * constraints/sql.restrictAuthorizedNetworks
565 // * constraints/sql.restrictNoncompliantDiagnosticDataAccess
566 // * constraints/sql.restrictNoncompliantResourceCreation
567 // * constraints/sql.restrictPublicIp
568 // * constraints/storage.publicAccessPrevention
569 // * constraints/storage.restrictAuthTypes
570 // * constraints/storage.uniformBucketLevelAccess
571 //
572 // This RPC only returns either resources of types [supported by search
573 // APIs](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
574 // or IAM policies.
575 AnalyzeOrgPolicyGovernedAssets(context.Context, *AnalyzeOrgPolicyGovernedAssetsRequest) (*AnalyzeOrgPolicyGovernedAssetsResponse, error)
576 }
577
578 // UnimplementedAssetServiceServer should be embedded to have forward compatible implementations.
579 type UnimplementedAssetServiceServer struct {
580 }
581
582 func (UnimplementedAssetServiceServer) ExportAssets(context.Context, *ExportAssetsRequest) (*longrunningpb.Operation, error) {
583 return nil, status.Errorf(codes.Unimplemented, "method ExportAssets not implemented")
584 }
585 func (UnimplementedAssetServiceServer) ListAssets(context.Context, *ListAssetsRequest) (*ListAssetsResponse, error) {
586 return nil, status.Errorf(codes.Unimplemented, "method ListAssets not implemented")
587 }
588 func (UnimplementedAssetServiceServer) BatchGetAssetsHistory(context.Context, *BatchGetAssetsHistoryRequest) (*BatchGetAssetsHistoryResponse, error) {
589 return nil, status.Errorf(codes.Unimplemented, "method BatchGetAssetsHistory not implemented")
590 }
591 func (UnimplementedAssetServiceServer) CreateFeed(context.Context, *CreateFeedRequest) (*Feed, error) {
592 return nil, status.Errorf(codes.Unimplemented, "method CreateFeed not implemented")
593 }
594 func (UnimplementedAssetServiceServer) GetFeed(context.Context, *GetFeedRequest) (*Feed, error) {
595 return nil, status.Errorf(codes.Unimplemented, "method GetFeed not implemented")
596 }
597 func (UnimplementedAssetServiceServer) ListFeeds(context.Context, *ListFeedsRequest) (*ListFeedsResponse, error) {
598 return nil, status.Errorf(codes.Unimplemented, "method ListFeeds not implemented")
599 }
600 func (UnimplementedAssetServiceServer) UpdateFeed(context.Context, *UpdateFeedRequest) (*Feed, error) {
601 return nil, status.Errorf(codes.Unimplemented, "method UpdateFeed not implemented")
602 }
603 func (UnimplementedAssetServiceServer) DeleteFeed(context.Context, *DeleteFeedRequest) (*emptypb.Empty, error) {
604 return nil, status.Errorf(codes.Unimplemented, "method DeleteFeed not implemented")
605 }
606 func (UnimplementedAssetServiceServer) SearchAllResources(context.Context, *SearchAllResourcesRequest) (*SearchAllResourcesResponse, error) {
607 return nil, status.Errorf(codes.Unimplemented, "method SearchAllResources not implemented")
608 }
609 func (UnimplementedAssetServiceServer) SearchAllIamPolicies(context.Context, *SearchAllIamPoliciesRequest) (*SearchAllIamPoliciesResponse, error) {
610 return nil, status.Errorf(codes.Unimplemented, "method SearchAllIamPolicies not implemented")
611 }
612 func (UnimplementedAssetServiceServer) AnalyzeIamPolicy(context.Context, *AnalyzeIamPolicyRequest) (*AnalyzeIamPolicyResponse, error) {
613 return nil, status.Errorf(codes.Unimplemented, "method AnalyzeIamPolicy not implemented")
614 }
615 func (UnimplementedAssetServiceServer) AnalyzeIamPolicyLongrunning(context.Context, *AnalyzeIamPolicyLongrunningRequest) (*longrunningpb.Operation, error) {
616 return nil, status.Errorf(codes.Unimplemented, "method AnalyzeIamPolicyLongrunning not implemented")
617 }
618 func (UnimplementedAssetServiceServer) AnalyzeMove(context.Context, *AnalyzeMoveRequest) (*AnalyzeMoveResponse, error) {
619 return nil, status.Errorf(codes.Unimplemented, "method AnalyzeMove not implemented")
620 }
621 func (UnimplementedAssetServiceServer) QueryAssets(context.Context, *QueryAssetsRequest) (*QueryAssetsResponse, error) {
622 return nil, status.Errorf(codes.Unimplemented, "method QueryAssets not implemented")
623 }
624 func (UnimplementedAssetServiceServer) CreateSavedQuery(context.Context, *CreateSavedQueryRequest) (*SavedQuery, error) {
625 return nil, status.Errorf(codes.Unimplemented, "method CreateSavedQuery not implemented")
626 }
627 func (UnimplementedAssetServiceServer) GetSavedQuery(context.Context, *GetSavedQueryRequest) (*SavedQuery, error) {
628 return nil, status.Errorf(codes.Unimplemented, "method GetSavedQuery not implemented")
629 }
630 func (UnimplementedAssetServiceServer) ListSavedQueries(context.Context, *ListSavedQueriesRequest) (*ListSavedQueriesResponse, error) {
631 return nil, status.Errorf(codes.Unimplemented, "method ListSavedQueries not implemented")
632 }
633 func (UnimplementedAssetServiceServer) UpdateSavedQuery(context.Context, *UpdateSavedQueryRequest) (*SavedQuery, error) {
634 return nil, status.Errorf(codes.Unimplemented, "method UpdateSavedQuery not implemented")
635 }
636 func (UnimplementedAssetServiceServer) DeleteSavedQuery(context.Context, *DeleteSavedQueryRequest) (*emptypb.Empty, error) {
637 return nil, status.Errorf(codes.Unimplemented, "method DeleteSavedQuery not implemented")
638 }
639 func (UnimplementedAssetServiceServer) BatchGetEffectiveIamPolicies(context.Context, *BatchGetEffectiveIamPoliciesRequest) (*BatchGetEffectiveIamPoliciesResponse, error) {
640 return nil, status.Errorf(codes.Unimplemented, "method BatchGetEffectiveIamPolicies not implemented")
641 }
642 func (UnimplementedAssetServiceServer) AnalyzeOrgPolicies(context.Context, *AnalyzeOrgPoliciesRequest) (*AnalyzeOrgPoliciesResponse, error) {
643 return nil, status.Errorf(codes.Unimplemented, "method AnalyzeOrgPolicies not implemented")
644 }
645 func (UnimplementedAssetServiceServer) AnalyzeOrgPolicyGovernedContainers(context.Context, *AnalyzeOrgPolicyGovernedContainersRequest) (*AnalyzeOrgPolicyGovernedContainersResponse, error) {
646 return nil, status.Errorf(codes.Unimplemented, "method AnalyzeOrgPolicyGovernedContainers not implemented")
647 }
648 func (UnimplementedAssetServiceServer) AnalyzeOrgPolicyGovernedAssets(context.Context, *AnalyzeOrgPolicyGovernedAssetsRequest) (*AnalyzeOrgPolicyGovernedAssetsResponse, error) {
649 return nil, status.Errorf(codes.Unimplemented, "method AnalyzeOrgPolicyGovernedAssets not implemented")
650 }
651
652 // UnsafeAssetServiceServer may be embedded to opt out of forward compatibility for this service.
653 // Use of this interface is not recommended, as added methods to AssetServiceServer will
654 // result in compilation errors.
655 type UnsafeAssetServiceServer interface {
656 mustEmbedUnimplementedAssetServiceServer()
657 }
658
659 func RegisterAssetServiceServer(s grpc.ServiceRegistrar, srv AssetServiceServer) {
660 s.RegisterService(&AssetService_ServiceDesc, srv)
661 }
662
663 func _AssetService_ExportAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
664 in := new(ExportAssetsRequest)
665 if err := dec(in); err != nil {
666 return nil, err
667 }
668 if interceptor == nil {
669 return srv.(AssetServiceServer).ExportAssets(ctx, in)
670 }
671 info := &grpc.UnaryServerInfo{
672 Server: srv,
673 FullMethod: AssetService_ExportAssets_FullMethodName,
674 }
675 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
676 return srv.(AssetServiceServer).ExportAssets(ctx, req.(*ExportAssetsRequest))
677 }
678 return interceptor(ctx, in, info, handler)
679 }
680
681 func _AssetService_ListAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
682 in := new(ListAssetsRequest)
683 if err := dec(in); err != nil {
684 return nil, err
685 }
686 if interceptor == nil {
687 return srv.(AssetServiceServer).ListAssets(ctx, in)
688 }
689 info := &grpc.UnaryServerInfo{
690 Server: srv,
691 FullMethod: AssetService_ListAssets_FullMethodName,
692 }
693 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
694 return srv.(AssetServiceServer).ListAssets(ctx, req.(*ListAssetsRequest))
695 }
696 return interceptor(ctx, in, info, handler)
697 }
698
699 func _AssetService_BatchGetAssetsHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
700 in := new(BatchGetAssetsHistoryRequest)
701 if err := dec(in); err != nil {
702 return nil, err
703 }
704 if interceptor == nil {
705 return srv.(AssetServiceServer).BatchGetAssetsHistory(ctx, in)
706 }
707 info := &grpc.UnaryServerInfo{
708 Server: srv,
709 FullMethod: AssetService_BatchGetAssetsHistory_FullMethodName,
710 }
711 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
712 return srv.(AssetServiceServer).BatchGetAssetsHistory(ctx, req.(*BatchGetAssetsHistoryRequest))
713 }
714 return interceptor(ctx, in, info, handler)
715 }
716
717 func _AssetService_CreateFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
718 in := new(CreateFeedRequest)
719 if err := dec(in); err != nil {
720 return nil, err
721 }
722 if interceptor == nil {
723 return srv.(AssetServiceServer).CreateFeed(ctx, in)
724 }
725 info := &grpc.UnaryServerInfo{
726 Server: srv,
727 FullMethod: AssetService_CreateFeed_FullMethodName,
728 }
729 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
730 return srv.(AssetServiceServer).CreateFeed(ctx, req.(*CreateFeedRequest))
731 }
732 return interceptor(ctx, in, info, handler)
733 }
734
735 func _AssetService_GetFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
736 in := new(GetFeedRequest)
737 if err := dec(in); err != nil {
738 return nil, err
739 }
740 if interceptor == nil {
741 return srv.(AssetServiceServer).GetFeed(ctx, in)
742 }
743 info := &grpc.UnaryServerInfo{
744 Server: srv,
745 FullMethod: AssetService_GetFeed_FullMethodName,
746 }
747 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
748 return srv.(AssetServiceServer).GetFeed(ctx, req.(*GetFeedRequest))
749 }
750 return interceptor(ctx, in, info, handler)
751 }
752
753 func _AssetService_ListFeeds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
754 in := new(ListFeedsRequest)
755 if err := dec(in); err != nil {
756 return nil, err
757 }
758 if interceptor == nil {
759 return srv.(AssetServiceServer).ListFeeds(ctx, in)
760 }
761 info := &grpc.UnaryServerInfo{
762 Server: srv,
763 FullMethod: AssetService_ListFeeds_FullMethodName,
764 }
765 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
766 return srv.(AssetServiceServer).ListFeeds(ctx, req.(*ListFeedsRequest))
767 }
768 return interceptor(ctx, in, info, handler)
769 }
770
771 func _AssetService_UpdateFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
772 in := new(UpdateFeedRequest)
773 if err := dec(in); err != nil {
774 return nil, err
775 }
776 if interceptor == nil {
777 return srv.(AssetServiceServer).UpdateFeed(ctx, in)
778 }
779 info := &grpc.UnaryServerInfo{
780 Server: srv,
781 FullMethod: AssetService_UpdateFeed_FullMethodName,
782 }
783 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
784 return srv.(AssetServiceServer).UpdateFeed(ctx, req.(*UpdateFeedRequest))
785 }
786 return interceptor(ctx, in, info, handler)
787 }
788
789 func _AssetService_DeleteFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
790 in := new(DeleteFeedRequest)
791 if err := dec(in); err != nil {
792 return nil, err
793 }
794 if interceptor == nil {
795 return srv.(AssetServiceServer).DeleteFeed(ctx, in)
796 }
797 info := &grpc.UnaryServerInfo{
798 Server: srv,
799 FullMethod: AssetService_DeleteFeed_FullMethodName,
800 }
801 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
802 return srv.(AssetServiceServer).DeleteFeed(ctx, req.(*DeleteFeedRequest))
803 }
804 return interceptor(ctx, in, info, handler)
805 }
806
807 func _AssetService_SearchAllResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
808 in := new(SearchAllResourcesRequest)
809 if err := dec(in); err != nil {
810 return nil, err
811 }
812 if interceptor == nil {
813 return srv.(AssetServiceServer).SearchAllResources(ctx, in)
814 }
815 info := &grpc.UnaryServerInfo{
816 Server: srv,
817 FullMethod: AssetService_SearchAllResources_FullMethodName,
818 }
819 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
820 return srv.(AssetServiceServer).SearchAllResources(ctx, req.(*SearchAllResourcesRequest))
821 }
822 return interceptor(ctx, in, info, handler)
823 }
824
825 func _AssetService_SearchAllIamPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
826 in := new(SearchAllIamPoliciesRequest)
827 if err := dec(in); err != nil {
828 return nil, err
829 }
830 if interceptor == nil {
831 return srv.(AssetServiceServer).SearchAllIamPolicies(ctx, in)
832 }
833 info := &grpc.UnaryServerInfo{
834 Server: srv,
835 FullMethod: AssetService_SearchAllIamPolicies_FullMethodName,
836 }
837 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
838 return srv.(AssetServiceServer).SearchAllIamPolicies(ctx, req.(*SearchAllIamPoliciesRequest))
839 }
840 return interceptor(ctx, in, info, handler)
841 }
842
843 func _AssetService_AnalyzeIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
844 in := new(AnalyzeIamPolicyRequest)
845 if err := dec(in); err != nil {
846 return nil, err
847 }
848 if interceptor == nil {
849 return srv.(AssetServiceServer).AnalyzeIamPolicy(ctx, in)
850 }
851 info := &grpc.UnaryServerInfo{
852 Server: srv,
853 FullMethod: AssetService_AnalyzeIamPolicy_FullMethodName,
854 }
855 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
856 return srv.(AssetServiceServer).AnalyzeIamPolicy(ctx, req.(*AnalyzeIamPolicyRequest))
857 }
858 return interceptor(ctx, in, info, handler)
859 }
860
861 func _AssetService_AnalyzeIamPolicyLongrunning_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
862 in := new(AnalyzeIamPolicyLongrunningRequest)
863 if err := dec(in); err != nil {
864 return nil, err
865 }
866 if interceptor == nil {
867 return srv.(AssetServiceServer).AnalyzeIamPolicyLongrunning(ctx, in)
868 }
869 info := &grpc.UnaryServerInfo{
870 Server: srv,
871 FullMethod: AssetService_AnalyzeIamPolicyLongrunning_FullMethodName,
872 }
873 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
874 return srv.(AssetServiceServer).AnalyzeIamPolicyLongrunning(ctx, req.(*AnalyzeIamPolicyLongrunningRequest))
875 }
876 return interceptor(ctx, in, info, handler)
877 }
878
879 func _AssetService_AnalyzeMove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
880 in := new(AnalyzeMoveRequest)
881 if err := dec(in); err != nil {
882 return nil, err
883 }
884 if interceptor == nil {
885 return srv.(AssetServiceServer).AnalyzeMove(ctx, in)
886 }
887 info := &grpc.UnaryServerInfo{
888 Server: srv,
889 FullMethod: AssetService_AnalyzeMove_FullMethodName,
890 }
891 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
892 return srv.(AssetServiceServer).AnalyzeMove(ctx, req.(*AnalyzeMoveRequest))
893 }
894 return interceptor(ctx, in, info, handler)
895 }
896
897 func _AssetService_QueryAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
898 in := new(QueryAssetsRequest)
899 if err := dec(in); err != nil {
900 return nil, err
901 }
902 if interceptor == nil {
903 return srv.(AssetServiceServer).QueryAssets(ctx, in)
904 }
905 info := &grpc.UnaryServerInfo{
906 Server: srv,
907 FullMethod: AssetService_QueryAssets_FullMethodName,
908 }
909 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
910 return srv.(AssetServiceServer).QueryAssets(ctx, req.(*QueryAssetsRequest))
911 }
912 return interceptor(ctx, in, info, handler)
913 }
914
915 func _AssetService_CreateSavedQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
916 in := new(CreateSavedQueryRequest)
917 if err := dec(in); err != nil {
918 return nil, err
919 }
920 if interceptor == nil {
921 return srv.(AssetServiceServer).CreateSavedQuery(ctx, in)
922 }
923 info := &grpc.UnaryServerInfo{
924 Server: srv,
925 FullMethod: AssetService_CreateSavedQuery_FullMethodName,
926 }
927 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
928 return srv.(AssetServiceServer).CreateSavedQuery(ctx, req.(*CreateSavedQueryRequest))
929 }
930 return interceptor(ctx, in, info, handler)
931 }
932
933 func _AssetService_GetSavedQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
934 in := new(GetSavedQueryRequest)
935 if err := dec(in); err != nil {
936 return nil, err
937 }
938 if interceptor == nil {
939 return srv.(AssetServiceServer).GetSavedQuery(ctx, in)
940 }
941 info := &grpc.UnaryServerInfo{
942 Server: srv,
943 FullMethod: AssetService_GetSavedQuery_FullMethodName,
944 }
945 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
946 return srv.(AssetServiceServer).GetSavedQuery(ctx, req.(*GetSavedQueryRequest))
947 }
948 return interceptor(ctx, in, info, handler)
949 }
950
951 func _AssetService_ListSavedQueries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
952 in := new(ListSavedQueriesRequest)
953 if err := dec(in); err != nil {
954 return nil, err
955 }
956 if interceptor == nil {
957 return srv.(AssetServiceServer).ListSavedQueries(ctx, in)
958 }
959 info := &grpc.UnaryServerInfo{
960 Server: srv,
961 FullMethod: AssetService_ListSavedQueries_FullMethodName,
962 }
963 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
964 return srv.(AssetServiceServer).ListSavedQueries(ctx, req.(*ListSavedQueriesRequest))
965 }
966 return interceptor(ctx, in, info, handler)
967 }
968
969 func _AssetService_UpdateSavedQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
970 in := new(UpdateSavedQueryRequest)
971 if err := dec(in); err != nil {
972 return nil, err
973 }
974 if interceptor == nil {
975 return srv.(AssetServiceServer).UpdateSavedQuery(ctx, in)
976 }
977 info := &grpc.UnaryServerInfo{
978 Server: srv,
979 FullMethod: AssetService_UpdateSavedQuery_FullMethodName,
980 }
981 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
982 return srv.(AssetServiceServer).UpdateSavedQuery(ctx, req.(*UpdateSavedQueryRequest))
983 }
984 return interceptor(ctx, in, info, handler)
985 }
986
987 func _AssetService_DeleteSavedQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
988 in := new(DeleteSavedQueryRequest)
989 if err := dec(in); err != nil {
990 return nil, err
991 }
992 if interceptor == nil {
993 return srv.(AssetServiceServer).DeleteSavedQuery(ctx, in)
994 }
995 info := &grpc.UnaryServerInfo{
996 Server: srv,
997 FullMethod: AssetService_DeleteSavedQuery_FullMethodName,
998 }
999 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1000 return srv.(AssetServiceServer).DeleteSavedQuery(ctx, req.(*DeleteSavedQueryRequest))
1001 }
1002 return interceptor(ctx, in, info, handler)
1003 }
1004
1005 func _AssetService_BatchGetEffectiveIamPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1006 in := new(BatchGetEffectiveIamPoliciesRequest)
1007 if err := dec(in); err != nil {
1008 return nil, err
1009 }
1010 if interceptor == nil {
1011 return srv.(AssetServiceServer).BatchGetEffectiveIamPolicies(ctx, in)
1012 }
1013 info := &grpc.UnaryServerInfo{
1014 Server: srv,
1015 FullMethod: AssetService_BatchGetEffectiveIamPolicies_FullMethodName,
1016 }
1017 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1018 return srv.(AssetServiceServer).BatchGetEffectiveIamPolicies(ctx, req.(*BatchGetEffectiveIamPoliciesRequest))
1019 }
1020 return interceptor(ctx, in, info, handler)
1021 }
1022
1023 func _AssetService_AnalyzeOrgPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1024 in := new(AnalyzeOrgPoliciesRequest)
1025 if err := dec(in); err != nil {
1026 return nil, err
1027 }
1028 if interceptor == nil {
1029 return srv.(AssetServiceServer).AnalyzeOrgPolicies(ctx, in)
1030 }
1031 info := &grpc.UnaryServerInfo{
1032 Server: srv,
1033 FullMethod: AssetService_AnalyzeOrgPolicies_FullMethodName,
1034 }
1035 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1036 return srv.(AssetServiceServer).AnalyzeOrgPolicies(ctx, req.(*AnalyzeOrgPoliciesRequest))
1037 }
1038 return interceptor(ctx, in, info, handler)
1039 }
1040
1041 func _AssetService_AnalyzeOrgPolicyGovernedContainers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1042 in := new(AnalyzeOrgPolicyGovernedContainersRequest)
1043 if err := dec(in); err != nil {
1044 return nil, err
1045 }
1046 if interceptor == nil {
1047 return srv.(AssetServiceServer).AnalyzeOrgPolicyGovernedContainers(ctx, in)
1048 }
1049 info := &grpc.UnaryServerInfo{
1050 Server: srv,
1051 FullMethod: AssetService_AnalyzeOrgPolicyGovernedContainers_FullMethodName,
1052 }
1053 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1054 return srv.(AssetServiceServer).AnalyzeOrgPolicyGovernedContainers(ctx, req.(*AnalyzeOrgPolicyGovernedContainersRequest))
1055 }
1056 return interceptor(ctx, in, info, handler)
1057 }
1058
1059 func _AssetService_AnalyzeOrgPolicyGovernedAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1060 in := new(AnalyzeOrgPolicyGovernedAssetsRequest)
1061 if err := dec(in); err != nil {
1062 return nil, err
1063 }
1064 if interceptor == nil {
1065 return srv.(AssetServiceServer).AnalyzeOrgPolicyGovernedAssets(ctx, in)
1066 }
1067 info := &grpc.UnaryServerInfo{
1068 Server: srv,
1069 FullMethod: AssetService_AnalyzeOrgPolicyGovernedAssets_FullMethodName,
1070 }
1071 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1072 return srv.(AssetServiceServer).AnalyzeOrgPolicyGovernedAssets(ctx, req.(*AnalyzeOrgPolicyGovernedAssetsRequest))
1073 }
1074 return interceptor(ctx, in, info, handler)
1075 }
1076
1077 // AssetService_ServiceDesc is the grpc.ServiceDesc for AssetService service.
1078 // It's only intended for direct use with grpc.RegisterService,
1079 // and not to be introspected or modified (even as a copy)
1080 var AssetService_ServiceDesc = grpc.ServiceDesc{
1081 ServiceName: "google.cloud.asset.v1.AssetService",
1082 HandlerType: (*AssetServiceServer)(nil),
1083 Methods: []grpc.MethodDesc{
1084 {
1085 MethodName: "ExportAssets",
1086 Handler: _AssetService_ExportAssets_Handler,
1087 },
1088 {
1089 MethodName: "ListAssets",
1090 Handler: _AssetService_ListAssets_Handler,
1091 },
1092 {
1093 MethodName: "BatchGetAssetsHistory",
1094 Handler: _AssetService_BatchGetAssetsHistory_Handler,
1095 },
1096 {
1097 MethodName: "CreateFeed",
1098 Handler: _AssetService_CreateFeed_Handler,
1099 },
1100 {
1101 MethodName: "GetFeed",
1102 Handler: _AssetService_GetFeed_Handler,
1103 },
1104 {
1105 MethodName: "ListFeeds",
1106 Handler: _AssetService_ListFeeds_Handler,
1107 },
1108 {
1109 MethodName: "UpdateFeed",
1110 Handler: _AssetService_UpdateFeed_Handler,
1111 },
1112 {
1113 MethodName: "DeleteFeed",
1114 Handler: _AssetService_DeleteFeed_Handler,
1115 },
1116 {
1117 MethodName: "SearchAllResources",
1118 Handler: _AssetService_SearchAllResources_Handler,
1119 },
1120 {
1121 MethodName: "SearchAllIamPolicies",
1122 Handler: _AssetService_SearchAllIamPolicies_Handler,
1123 },
1124 {
1125 MethodName: "AnalyzeIamPolicy",
1126 Handler: _AssetService_AnalyzeIamPolicy_Handler,
1127 },
1128 {
1129 MethodName: "AnalyzeIamPolicyLongrunning",
1130 Handler: _AssetService_AnalyzeIamPolicyLongrunning_Handler,
1131 },
1132 {
1133 MethodName: "AnalyzeMove",
1134 Handler: _AssetService_AnalyzeMove_Handler,
1135 },
1136 {
1137 MethodName: "QueryAssets",
1138 Handler: _AssetService_QueryAssets_Handler,
1139 },
1140 {
1141 MethodName: "CreateSavedQuery",
1142 Handler: _AssetService_CreateSavedQuery_Handler,
1143 },
1144 {
1145 MethodName: "GetSavedQuery",
1146 Handler: _AssetService_GetSavedQuery_Handler,
1147 },
1148 {
1149 MethodName: "ListSavedQueries",
1150 Handler: _AssetService_ListSavedQueries_Handler,
1151 },
1152 {
1153 MethodName: "UpdateSavedQuery",
1154 Handler: _AssetService_UpdateSavedQuery_Handler,
1155 },
1156 {
1157 MethodName: "DeleteSavedQuery",
1158 Handler: _AssetService_DeleteSavedQuery_Handler,
1159 },
1160 {
1161 MethodName: "BatchGetEffectiveIamPolicies",
1162 Handler: _AssetService_BatchGetEffectiveIamPolicies_Handler,
1163 },
1164 {
1165 MethodName: "AnalyzeOrgPolicies",
1166 Handler: _AssetService_AnalyzeOrgPolicies_Handler,
1167 },
1168 {
1169 MethodName: "AnalyzeOrgPolicyGovernedContainers",
1170 Handler: _AssetService_AnalyzeOrgPolicyGovernedContainers_Handler,
1171 },
1172 {
1173 MethodName: "AnalyzeOrgPolicyGovernedAssets",
1174 Handler: _AssetService_AnalyzeOrgPolicyGovernedAssets_Handler,
1175 },
1176 },
1177 Streams: []grpc.StreamDesc{},
1178 Metadata: "google/cloud/asset/v1/asset_service.proto",
1179 }