diff --git a/java-asset/README.md b/java-asset/README.md
index 89e9a433686b..c20c5ea40beb 100644
--- a/java-asset/README.md
+++ b/java-asset/README.md
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
+ * Asset service definition. + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/asset/v1/asset_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class AssetServiceGrpc { + + private AssetServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.asset.v1.AssetService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.ExportAssetsRequest, com.google.longrunning.Operation> + getExportAssetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportAssets", + requestType = com.google.cloud.asset.v1.ExportAssetsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.ExportAssetsRequest, com.google.longrunning.Operation> + getExportAssetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.ExportAssetsRequest, com.google.longrunning.Operation> + getExportAssetsMethod; + if ((getExportAssetsMethod = AssetServiceGrpc.getExportAssetsMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getExportAssetsMethod = AssetServiceGrpc.getExportAssetsMethod) == null) { + AssetServiceGrpc.getExportAssetsMethod = + getExportAssetsMethod = + io.grpc.MethodDescriptor + .
+ * Asset service definition. + *+ */ + public interface AsyncService { + + /** + * + * + *
+ * Exports assets with time and resource types to a given Cloud Storage + * location/BigQuery table. For Cloud Storage location destinations, the + * output format is newline-delimited JSON. Each line represents a + * [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON + * format; for BigQuery table destinations, the output table stores the fields + * in asset Protobuf as columns. This API implements the + * [google.longrunning.Operation][google.longrunning.Operation] API, which + * allows you to keep track of the export. We recommend intervals of at least + * 2 seconds with exponential retry to poll the export operation result. For + * regular-size resource parent, the export operation usually finishes within + * 5 minutes. + *+ */ + default void exportAssets( + com.google.cloud.asset.v1.ExportAssetsRequest request, + io.grpc.stub.StreamObserver
+ * Lists assets with time and resource types and returns paged results in + * response. + *+ */ + default void listAssets( + com.google.cloud.asset.v1.ListAssetsRequest request, + io.grpc.stub.StreamObserver
+ * Batch gets the update history of assets that overlap a time window. + * For IAM_POLICY content, this API outputs history when the asset and its + * attached IAM POLICY both exist. This can create gaps in the output history. + * Otherwise, this API outputs history with asset in both non-delete or + * deleted status. + * If a specified asset does not exist, this API returns an INVALID_ARGUMENT + * error. + *+ */ + default void batchGetAssetsHistory( + com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest request, + io.grpc.stub.StreamObserver
+ * Creates a feed in a parent project/folder/organization to listen to its + * asset updates. + *+ */ + default void createFeed( + com.google.cloud.asset.v1.CreateFeedRequest request, + io.grpc.stub.StreamObserver
+ * Gets details about an asset feed. + *+ */ + default void getFeed( + com.google.cloud.asset.v1.GetFeedRequest request, + io.grpc.stub.StreamObserver
+ * Lists all asset feeds in a parent project/folder/organization. + *+ */ + default void listFeeds( + com.google.cloud.asset.v1.ListFeedsRequest request, + io.grpc.stub.StreamObserver
+ * Updates an asset feed configuration. + *+ */ + default void updateFeed( + com.google.cloud.asset.v1.UpdateFeedRequest request, + io.grpc.stub.StreamObserver
+ * Deletes an asset feed. + *+ */ + default void deleteFeed( + com.google.cloud.asset.v1.DeleteFeedRequest request, + io.grpc.stub.StreamObserver
+ * Searches all Google Cloud resources within the specified scope, such as a + * project, folder, or organization. The caller must be granted the + * `cloudasset.assets.searchAllResources` permission on the desired scope, + * otherwise the request will be rejected. + *+ */ + default void searchAllResources( + com.google.cloud.asset.v1.SearchAllResourcesRequest request, + io.grpc.stub.StreamObserver
+ * Searches all IAM policies within the specified scope, such as a project, + * folder, or organization. The caller must be granted the + * `cloudasset.assets.searchAllIamPolicies` permission on the desired scope, + * otherwise the request will be rejected. + *+ */ + default void searchAllIamPolicies( + com.google.cloud.asset.v1.SearchAllIamPoliciesRequest request, + io.grpc.stub.StreamObserver
+ * Analyzes IAM policies to answer which identities have what accesses on + * which resources. + *+ */ + default void analyzeIamPolicy( + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest request, + io.grpc.stub.StreamObserver
+ * Analyzes IAM policies asynchronously to answer which identities have what + * accesses on which resources, and writes the analysis results to a Google + * Cloud Storage or a BigQuery destination. For Cloud Storage destination, the + * output format is the JSON format that represents a + * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. + * This method implements the + * [google.longrunning.Operation][google.longrunning.Operation], which allows + * you to track the operation status. We recommend intervals of at least 2 + * seconds with exponential backoff retry to poll the operation result. The + * metadata contains the metadata for the long-running operation. + *+ */ + default void analyzeIamPolicyLongrunning( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest request, + io.grpc.stub.StreamObserver
+ * Analyze moving a resource to a specified destination without kicking off + * the actual move. The analysis is best effort depending on the user's + * permissions of viewing different hierarchical policies and configurations. + * The policies and configuration are subject to change before the actual + * resource migration takes place. + *+ */ + default void analyzeMove( + com.google.cloud.asset.v1.AnalyzeMoveRequest request, + io.grpc.stub.StreamObserver
+ * Issue a job that queries assets using a SQL statement compatible with + * [BigQuery SQL](https://cloud.google.com/bigquery/docs/introduction-sql). + * If the query execution finishes within timeout and there's no pagination, + * the full query results will be returned in the `QueryAssetsResponse`. + * Otherwise, full query results can be obtained by issuing extra requests + * with the `job_reference` from the a previous `QueryAssets` call. + * Note, the query result has approximately 10 GB limitation enforced by + * [BigQuery](https://cloud.google.com/bigquery/docs/best-practices-performance-output). + * Queries return larger results will result in errors. + *+ */ + default void queryAssets( + com.google.cloud.asset.v1.QueryAssetsRequest request, + io.grpc.stub.StreamObserver
+ * Creates a saved query in a parent project/folder/organization. + *+ */ + default void createSavedQuery( + com.google.cloud.asset.v1.CreateSavedQueryRequest request, + io.grpc.stub.StreamObserver
+ * Gets details about a saved query. + *+ */ + default void getSavedQuery( + com.google.cloud.asset.v1.GetSavedQueryRequest request, + io.grpc.stub.StreamObserver
+ * Lists all saved queries in a parent project/folder/organization. + *+ */ + default void listSavedQueries( + com.google.cloud.asset.v1.ListSavedQueriesRequest request, + io.grpc.stub.StreamObserver
+ * Updates a saved query. + *+ */ + default void updateSavedQuery( + com.google.cloud.asset.v1.UpdateSavedQueryRequest request, + io.grpc.stub.StreamObserver
+ * Deletes a saved query. + *+ */ + default void deleteSavedQuery( + com.google.cloud.asset.v1.DeleteSavedQueryRequest request, + io.grpc.stub.StreamObserver
+ * Gets effective IAM policies for a batch of resources. + *+ */ + default void batchGetEffectiveIamPolicies( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest request, + io.grpc.stub.StreamObserver
+ * Analyzes organization policies under a scope. + *+ */ + default void analyzeOrgPolicies( + com.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest request, + io.grpc.stub.StreamObserver
+ * Analyzes organization policies governed containers (projects, folders or + * organization) under a scope. + *+ */ + default void analyzeOrgPolicyGovernedContainers( + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAnalyzeOrgPolicyGovernedContainersMethod(), responseObserver); + } + + /** + * + * + *
+ * Analyzes organization policies governed assets (Google Cloud resources or + * policies) under a scope. This RPC supports custom constraints and the + * following 10 canned constraints: + * * storage.uniformBucketLevelAccess + * * iam.disableServiceAccountKeyCreation + * * iam.allowedPolicyMemberDomains + * * compute.vmExternalIpAccess + * * appengine.enforceServiceAccountActAsCheck + * * gcp.resourceLocations + * * compute.trustedImageProjects + * * compute.skipDefaultNetworkCreation + * * compute.requireOsLogin + * * compute.disableNestedVirtualization + * This RPC only returns either resources of types supported by [searchable + * asset + * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types), + * or IAM policies. + *+ */ + default void analyzeOrgPolicyGovernedAssets( + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAnalyzeOrgPolicyGovernedAssetsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service AssetService. + * + *
+ * Asset service definition. + *+ */ + public abstract static class AssetServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return AssetServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service AssetService. + * + *
+ * Asset service definition. + *+ */ + public static final class AssetServiceStub + extends io.grpc.stub.AbstractAsyncStub
+ * Exports assets with time and resource types to a given Cloud Storage + * location/BigQuery table. For Cloud Storage location destinations, the + * output format is newline-delimited JSON. Each line represents a + * [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON + * format; for BigQuery table destinations, the output table stores the fields + * in asset Protobuf as columns. This API implements the + * [google.longrunning.Operation][google.longrunning.Operation] API, which + * allows you to keep track of the export. We recommend intervals of at least + * 2 seconds with exponential retry to poll the export operation result. For + * regular-size resource parent, the export operation usually finishes within + * 5 minutes. + *+ */ + public void exportAssets( + com.google.cloud.asset.v1.ExportAssetsRequest request, + io.grpc.stub.StreamObserver
+ * Lists assets with time and resource types and returns paged results in + * response. + *+ */ + public void listAssets( + com.google.cloud.asset.v1.ListAssetsRequest request, + io.grpc.stub.StreamObserver
+ * Batch gets the update history of assets that overlap a time window. + * For IAM_POLICY content, this API outputs history when the asset and its + * attached IAM POLICY both exist. This can create gaps in the output history. + * Otherwise, this API outputs history with asset in both non-delete or + * deleted status. + * If a specified asset does not exist, this API returns an INVALID_ARGUMENT + * error. + *+ */ + public void batchGetAssetsHistory( + com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest request, + io.grpc.stub.StreamObserver
+ * Creates a feed in a parent project/folder/organization to listen to its + * asset updates. + *+ */ + public void createFeed( + com.google.cloud.asset.v1.CreateFeedRequest request, + io.grpc.stub.StreamObserver
+ * Gets details about an asset feed. + *+ */ + public void getFeed( + com.google.cloud.asset.v1.GetFeedRequest request, + io.grpc.stub.StreamObserver
+ * Lists all asset feeds in a parent project/folder/organization. + *+ */ + public void listFeeds( + com.google.cloud.asset.v1.ListFeedsRequest request, + io.grpc.stub.StreamObserver
+ * Updates an asset feed configuration. + *+ */ + public void updateFeed( + com.google.cloud.asset.v1.UpdateFeedRequest request, + io.grpc.stub.StreamObserver
+ * Deletes an asset feed. + *+ */ + public void deleteFeed( + com.google.cloud.asset.v1.DeleteFeedRequest request, + io.grpc.stub.StreamObserver
+ * Searches all Google Cloud resources within the specified scope, such as a + * project, folder, or organization. The caller must be granted the + * `cloudasset.assets.searchAllResources` permission on the desired scope, + * otherwise the request will be rejected. + *+ */ + public void searchAllResources( + com.google.cloud.asset.v1.SearchAllResourcesRequest request, + io.grpc.stub.StreamObserver
+ * Searches all IAM policies within the specified scope, such as a project, + * folder, or organization. The caller must be granted the + * `cloudasset.assets.searchAllIamPolicies` permission on the desired scope, + * otherwise the request will be rejected. + *+ */ + public void searchAllIamPolicies( + com.google.cloud.asset.v1.SearchAllIamPoliciesRequest request, + io.grpc.stub.StreamObserver
+ * Analyzes IAM policies to answer which identities have what accesses on + * which resources. + *+ */ + public void analyzeIamPolicy( + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest request, + io.grpc.stub.StreamObserver
+ * Analyzes IAM policies asynchronously to answer which identities have what + * accesses on which resources, and writes the analysis results to a Google + * Cloud Storage or a BigQuery destination. For Cloud Storage destination, the + * output format is the JSON format that represents a + * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. + * This method implements the + * [google.longrunning.Operation][google.longrunning.Operation], which allows + * you to track the operation status. We recommend intervals of at least 2 + * seconds with exponential backoff retry to poll the operation result. The + * metadata contains the metadata for the long-running operation. + *+ */ + public void analyzeIamPolicyLongrunning( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest request, + io.grpc.stub.StreamObserver
+ * Analyze moving a resource to a specified destination without kicking off + * the actual move. The analysis is best effort depending on the user's + * permissions of viewing different hierarchical policies and configurations. + * The policies and configuration are subject to change before the actual + * resource migration takes place. + *+ */ + public void analyzeMove( + com.google.cloud.asset.v1.AnalyzeMoveRequest request, + io.grpc.stub.StreamObserver
+ * Issue a job that queries assets using a SQL statement compatible with + * [BigQuery SQL](https://cloud.google.com/bigquery/docs/introduction-sql). + * If the query execution finishes within timeout and there's no pagination, + * the full query results will be returned in the `QueryAssetsResponse`. + * Otherwise, full query results can be obtained by issuing extra requests + * with the `job_reference` from the a previous `QueryAssets` call. + * Note, the query result has approximately 10 GB limitation enforced by + * [BigQuery](https://cloud.google.com/bigquery/docs/best-practices-performance-output). + * Queries return larger results will result in errors. + *+ */ + public void queryAssets( + com.google.cloud.asset.v1.QueryAssetsRequest request, + io.grpc.stub.StreamObserver
+ * Creates a saved query in a parent project/folder/organization. + *+ */ + public void createSavedQuery( + com.google.cloud.asset.v1.CreateSavedQueryRequest request, + io.grpc.stub.StreamObserver
+ * Gets details about a saved query. + *+ */ + public void getSavedQuery( + com.google.cloud.asset.v1.GetSavedQueryRequest request, + io.grpc.stub.StreamObserver
+ * Lists all saved queries in a parent project/folder/organization. + *+ */ + public void listSavedQueries( + com.google.cloud.asset.v1.ListSavedQueriesRequest request, + io.grpc.stub.StreamObserver
+ * Updates a saved query. + *+ */ + public void updateSavedQuery( + com.google.cloud.asset.v1.UpdateSavedQueryRequest request, + io.grpc.stub.StreamObserver
+ * Deletes a saved query. + *+ */ + public void deleteSavedQuery( + com.google.cloud.asset.v1.DeleteSavedQueryRequest request, + io.grpc.stub.StreamObserver
+ * Gets effective IAM policies for a batch of resources. + *+ */ + public void batchGetEffectiveIamPolicies( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest request, + io.grpc.stub.StreamObserver
+ * Analyzes organization policies under a scope. + *+ */ + public void analyzeOrgPolicies( + com.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest request, + io.grpc.stub.StreamObserver
+ * Analyzes organization policies governed containers (projects, folders or + * organization) under a scope. + *+ */ + public void analyzeOrgPolicyGovernedContainers( + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAnalyzeOrgPolicyGovernedContainersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+ * Analyzes organization policies governed assets (Google Cloud resources or + * policies) under a scope. This RPC supports custom constraints and the + * following 10 canned constraints: + * * storage.uniformBucketLevelAccess + * * iam.disableServiceAccountKeyCreation + * * iam.allowedPolicyMemberDomains + * * compute.vmExternalIpAccess + * * appengine.enforceServiceAccountActAsCheck + * * gcp.resourceLocations + * * compute.trustedImageProjects + * * compute.skipDefaultNetworkCreation + * * compute.requireOsLogin + * * compute.disableNestedVirtualization + * This RPC only returns either resources of types supported by [searchable + * asset + * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types), + * or IAM policies. + *+ */ + public void analyzeOrgPolicyGovernedAssets( + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAnalyzeOrgPolicyGovernedAssetsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service AssetService. + * + *
+ * Asset service definition. + *+ */ + public static final class AssetServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub
+ * Exports assets with time and resource types to a given Cloud Storage + * location/BigQuery table. For Cloud Storage location destinations, the + * output format is newline-delimited JSON. Each line represents a + * [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON + * format; for BigQuery table destinations, the output table stores the fields + * in asset Protobuf as columns. This API implements the + * [google.longrunning.Operation][google.longrunning.Operation] API, which + * allows you to keep track of the export. We recommend intervals of at least + * 2 seconds with exponential retry to poll the export operation result. For + * regular-size resource parent, the export operation usually finishes within + * 5 minutes. + *+ */ + public com.google.longrunning.Operation exportAssets( + com.google.cloud.asset.v1.ExportAssetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportAssetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Lists assets with time and resource types and returns paged results in + * response. + *+ */ + public com.google.cloud.asset.v1.ListAssetsResponse listAssets( + com.google.cloud.asset.v1.ListAssetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAssetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Batch gets the update history of assets that overlap a time window. + * For IAM_POLICY content, this API outputs history when the asset and its + * attached IAM POLICY both exist. This can create gaps in the output history. + * Otherwise, this API outputs history with asset in both non-delete or + * deleted status. + * If a specified asset does not exist, this API returns an INVALID_ARGUMENT + * error. + *+ */ + public com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse batchGetAssetsHistory( + com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchGetAssetsHistoryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Creates a feed in a parent project/folder/organization to listen to its + * asset updates. + *+ */ + public com.google.cloud.asset.v1.Feed createFeed( + com.google.cloud.asset.v1.CreateFeedRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateFeedMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Gets details about an asset feed. + *+ */ + public com.google.cloud.asset.v1.Feed getFeed( + com.google.cloud.asset.v1.GetFeedRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFeedMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Lists all asset feeds in a parent project/folder/organization. + *+ */ + public com.google.cloud.asset.v1.ListFeedsResponse listFeeds( + com.google.cloud.asset.v1.ListFeedsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFeedsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Updates an asset feed configuration. + *+ */ + public com.google.cloud.asset.v1.Feed updateFeed( + com.google.cloud.asset.v1.UpdateFeedRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateFeedMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Deletes an asset feed. + *+ */ + public com.google.protobuf.Empty deleteFeed( + com.google.cloud.asset.v1.DeleteFeedRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteFeedMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Searches all Google Cloud resources within the specified scope, such as a + * project, folder, or organization. The caller must be granted the + * `cloudasset.assets.searchAllResources` permission on the desired scope, + * otherwise the request will be rejected. + *+ */ + public com.google.cloud.asset.v1.SearchAllResourcesResponse searchAllResources( + com.google.cloud.asset.v1.SearchAllResourcesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchAllResourcesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Searches all IAM policies within the specified scope, such as a project, + * folder, or organization. The caller must be granted the + * `cloudasset.assets.searchAllIamPolicies` permission on the desired scope, + * otherwise the request will be rejected. + *+ */ + public com.google.cloud.asset.v1.SearchAllIamPoliciesResponse searchAllIamPolicies( + com.google.cloud.asset.v1.SearchAllIamPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchAllIamPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Analyzes IAM policies to answer which identities have what accesses on + * which resources. + *+ */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse analyzeIamPolicy( + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAnalyzeIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Analyzes IAM policies asynchronously to answer which identities have what + * accesses on which resources, and writes the analysis results to a Google + * Cloud Storage or a BigQuery destination. For Cloud Storage destination, the + * output format is the JSON format that represents a + * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. + * This method implements the + * [google.longrunning.Operation][google.longrunning.Operation], which allows + * you to track the operation status. We recommend intervals of at least 2 + * seconds with exponential backoff retry to poll the operation result. The + * metadata contains the metadata for the long-running operation. + *+ */ + public com.google.longrunning.Operation analyzeIamPolicyLongrunning( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAnalyzeIamPolicyLongrunningMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Analyze moving a resource to a specified destination without kicking off + * the actual move. The analysis is best effort depending on the user's + * permissions of viewing different hierarchical policies and configurations. + * The policies and configuration are subject to change before the actual + * resource migration takes place. + *+ */ + public com.google.cloud.asset.v1.AnalyzeMoveResponse analyzeMove( + com.google.cloud.asset.v1.AnalyzeMoveRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAnalyzeMoveMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Issue a job that queries assets using a SQL statement compatible with + * [BigQuery SQL](https://cloud.google.com/bigquery/docs/introduction-sql). + * If the query execution finishes within timeout and there's no pagination, + * the full query results will be returned in the `QueryAssetsResponse`. + * Otherwise, full query results can be obtained by issuing extra requests + * with the `job_reference` from the a previous `QueryAssets` call. + * Note, the query result has approximately 10 GB limitation enforced by + * [BigQuery](https://cloud.google.com/bigquery/docs/best-practices-performance-output). + * Queries return larger results will result in errors. + *+ */ + public com.google.cloud.asset.v1.QueryAssetsResponse queryAssets( + com.google.cloud.asset.v1.QueryAssetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getQueryAssetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Creates a saved query in a parent project/folder/organization. + *+ */ + public com.google.cloud.asset.v1.SavedQuery createSavedQuery( + com.google.cloud.asset.v1.CreateSavedQueryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSavedQueryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Gets details about a saved query. + *+ */ + public com.google.cloud.asset.v1.SavedQuery getSavedQuery( + com.google.cloud.asset.v1.GetSavedQueryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSavedQueryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Lists all saved queries in a parent project/folder/organization. + *+ */ + public com.google.cloud.asset.v1.ListSavedQueriesResponse listSavedQueries( + com.google.cloud.asset.v1.ListSavedQueriesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSavedQueriesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Updates a saved query. + *+ */ + public com.google.cloud.asset.v1.SavedQuery updateSavedQuery( + com.google.cloud.asset.v1.UpdateSavedQueryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSavedQueryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Deletes a saved query. + *+ */ + public com.google.protobuf.Empty deleteSavedQuery( + com.google.cloud.asset.v1.DeleteSavedQueryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSavedQueryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Gets effective IAM policies for a batch of resources. + *+ */ + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse + batchGetEffectiveIamPolicies( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchGetEffectiveIamPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Analyzes organization policies under a scope. + *+ */ + public com.google.cloud.asset.v1.AnalyzeOrgPoliciesResponse analyzeOrgPolicies( + com.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAnalyzeOrgPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Analyzes organization policies governed containers (projects, folders or + * organization) under a scope. + *+ */ + public com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse + analyzeOrgPolicyGovernedContainers( + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAnalyzeOrgPolicyGovernedContainersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Analyzes organization policies governed assets (Google Cloud resources or + * policies) under a scope. This RPC supports custom constraints and the + * following 10 canned constraints: + * * storage.uniformBucketLevelAccess + * * iam.disableServiceAccountKeyCreation + * * iam.allowedPolicyMemberDomains + * * compute.vmExternalIpAccess + * * appengine.enforceServiceAccountActAsCheck + * * gcp.resourceLocations + * * compute.trustedImageProjects + * * compute.skipDefaultNetworkCreation + * * compute.requireOsLogin + * * compute.disableNestedVirtualization + * This RPC only returns either resources of types supported by [searchable + * asset + * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types), + * or IAM policies. + *+ */ + public com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse + analyzeOrgPolicyGovernedAssets( + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAnalyzeOrgPolicyGovernedAssetsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service AssetService. + * + *
+ * Asset service definition. + *+ */ + public static final class AssetServiceFutureStub + extends io.grpc.stub.AbstractFutureStub
+ * Exports assets with time and resource types to a given Cloud Storage + * location/BigQuery table. For Cloud Storage location destinations, the + * output format is newline-delimited JSON. Each line represents a + * [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON + * format; for BigQuery table destinations, the output table stores the fields + * in asset Protobuf as columns. This API implements the + * [google.longrunning.Operation][google.longrunning.Operation] API, which + * allows you to keep track of the export. We recommend intervals of at least + * 2 seconds with exponential retry to poll the export operation result. For + * regular-size resource parent, the export operation usually finishes within + * 5 minutes. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Lists assets with time and resource types and returns paged results in + * response. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.ListAssetsResponse> + listAssets(com.google.cloud.asset.v1.ListAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAssetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Batch gets the update history of assets that overlap a time window. + * For IAM_POLICY content, this API outputs history when the asset and its + * attached IAM POLICY both exist. This can create gaps in the output history. + * Otherwise, this API outputs history with asset in both non-delete or + * deleted status. + * If a specified asset does not exist, this API returns an INVALID_ARGUMENT + * error. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse> + batchGetAssetsHistory(com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchGetAssetsHistoryMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Creates a feed in a parent project/folder/organization to listen to its + * asset updates. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Gets details about an asset feed. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Lists all asset feeds in a parent project/folder/organization. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.ListFeedsResponse> + listFeeds(com.google.cloud.asset.v1.ListFeedsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFeedsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Updates an asset feed configuration. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Deletes an asset feed. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Searches all Google Cloud resources within the specified scope, such as a + * project, folder, or organization. The caller must be granted the + * `cloudasset.assets.searchAllResources` permission on the desired scope, + * otherwise the request will be rejected. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.SearchAllResourcesResponse> + searchAllResources(com.google.cloud.asset.v1.SearchAllResourcesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchAllResourcesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Searches all IAM policies within the specified scope, such as a project, + * folder, or organization. The caller must be granted the + * `cloudasset.assets.searchAllIamPolicies` permission on the desired scope, + * otherwise the request will be rejected. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.SearchAllIamPoliciesResponse> + searchAllIamPolicies(com.google.cloud.asset.v1.SearchAllIamPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchAllIamPoliciesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Analyzes IAM policies to answer which identities have what accesses on + * which resources. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse> + analyzeIamPolicy(com.google.cloud.asset.v1.AnalyzeIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAnalyzeIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Analyzes IAM policies asynchronously to answer which identities have what + * accesses on which resources, and writes the analysis results to a Google + * Cloud Storage or a BigQuery destination. For Cloud Storage destination, the + * output format is the JSON format that represents a + * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. + * This method implements the + * [google.longrunning.Operation][google.longrunning.Operation], which allows + * you to track the operation status. We recommend intervals of at least 2 + * seconds with exponential backoff retry to poll the operation result. The + * metadata contains the metadata for the long-running operation. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Analyze moving a resource to a specified destination without kicking off + * the actual move. The analysis is best effort depending on the user's + * permissions of viewing different hierarchical policies and configurations. + * The policies and configuration are subject to change before the actual + * resource migration takes place. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.AnalyzeMoveResponse> + analyzeMove(com.google.cloud.asset.v1.AnalyzeMoveRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAnalyzeMoveMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Issue a job that queries assets using a SQL statement compatible with + * [BigQuery SQL](https://cloud.google.com/bigquery/docs/introduction-sql). + * If the query execution finishes within timeout and there's no pagination, + * the full query results will be returned in the `QueryAssetsResponse`. + * Otherwise, full query results can be obtained by issuing extra requests + * with the `job_reference` from the a previous `QueryAssets` call. + * Note, the query result has approximately 10 GB limitation enforced by + * [BigQuery](https://cloud.google.com/bigquery/docs/best-practices-performance-output). + * Queries return larger results will result in errors. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.QueryAssetsResponse> + queryAssets(com.google.cloud.asset.v1.QueryAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getQueryAssetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Creates a saved query in a parent project/folder/organization. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Gets details about a saved query. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Lists all saved queries in a parent project/folder/organization. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.ListSavedQueriesResponse> + listSavedQueries(com.google.cloud.asset.v1.ListSavedQueriesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSavedQueriesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Updates a saved query. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Deletes a saved query. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Gets effective IAM policies for a batch of resources. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse> + batchGetEffectiveIamPolicies( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchGetEffectiveIamPoliciesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Analyzes organization policies under a scope. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.AnalyzeOrgPoliciesResponse> + analyzeOrgPolicies(com.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAnalyzeOrgPoliciesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Analyzes organization policies governed containers (projects, folders or + * organization) under a scope. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse> + analyzeOrgPolicyGovernedContainers( + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAnalyzeOrgPolicyGovernedContainersMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+ * Analyzes organization policies governed assets (Google Cloud resources or + * policies) under a scope. This RPC supports custom constraints and the + * following 10 canned constraints: + * * storage.uniformBucketLevelAccess + * * iam.disableServiceAccountKeyCreation + * * iam.allowedPolicyMemberDomains + * * compute.vmExternalIpAccess + * * appengine.enforceServiceAccountActAsCheck + * * gcp.resourceLocations + * * compute.trustedImageProjects + * * compute.skipDefaultNetworkCreation + * * compute.requireOsLogin + * * compute.disableNestedVirtualization + * This RPC only returns either resources of types supported by [searchable + * asset + * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types), + * or IAM policies. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse> + analyzeOrgPolicyGovernedAssets( + com.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAnalyzeOrgPolicyGovernedAssetsMethod(), getCallOptions()), + request); + } + } + + private static final int METHODID_EXPORT_ASSETS = 0; + private static final int METHODID_LIST_ASSETS = 1; + private static final int METHODID_BATCH_GET_ASSETS_HISTORY = 2; + private static final int METHODID_CREATE_FEED = 3; + private static final int METHODID_GET_FEED = 4; + private static final int METHODID_LIST_FEEDS = 5; + private static final int METHODID_UPDATE_FEED = 6; + private static final int METHODID_DELETE_FEED = 7; + private static final int METHODID_SEARCH_ALL_RESOURCES = 8; + private static final int METHODID_SEARCH_ALL_IAM_POLICIES = 9; + private static final int METHODID_ANALYZE_IAM_POLICY = 10; + private static final int METHODID_ANALYZE_IAM_POLICY_LONGRUNNING = 11; + private static final int METHODID_ANALYZE_MOVE = 12; + private static final int METHODID_QUERY_ASSETS = 13; + private static final int METHODID_CREATE_SAVED_QUERY = 14; + private static final int METHODID_GET_SAVED_QUERY = 15; + private static final int METHODID_LIST_SAVED_QUERIES = 16; + private static final int METHODID_UPDATE_SAVED_QUERY = 17; + private static final int METHODID_DELETE_SAVED_QUERY = 18; + private static final int METHODID_BATCH_GET_EFFECTIVE_IAM_POLICIES = 19; + private static final int METHODID_ANALYZE_ORG_POLICIES = 20; + private static final int METHODID_ANALYZE_ORG_POLICY_GOVERNED_CONTAINERS = 21; + private static final int METHODID_ANALYZE_ORG_POLICY_GOVERNED_ASSETS = 22; + + private static final class MethodHandlers
* Asset service definition. *@@ -18,113 +35,146 @@ private AssetServiceGrpc() {} public static final java.lang.String SERVICE_NAME = "google.cloud.asset.v1p1beta1.AssetService"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor
* Asset service definition. *@@ -132,6 +182,8 @@ public AssetServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptio public interface AsyncService { /** + * + * *
* Searches all the resources within a given accessible Resource Manager scope * (project/folder/organization). This RPC gives callers especially @@ -141,12 +193,17 @@ public interface AsyncService { * otherwise the request will be rejected. **/ - default void searchAllResources(com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest request, - io.grpc.stub.StreamObserver
* Searches all the IAM policies within a given accessible Resource Manager * scope (project/folder/organization). This RPC gives callers especially @@ -156,46 +213,52 @@ default void searchAllResources(com.google.cloud.asset.v1p1beta1.SearchAllResour * requested scope, otherwise the request will be rejected. **/ - default void searchAllIamPolicies(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest request, - io.grpc.stub.StreamObserver
* Asset service definition. **/ - public static abstract class AssetServiceImplBase + public abstract static class AssetServiceImplBase implements io.grpc.BindableService, AsyncService { - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { return AssetServiceGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service AssetService. + * *
* Asset service definition. **/ public static final class AssetServiceStub extends io.grpc.stub.AbstractAsyncStub
* Searches all the resources within a given accessible Resource Manager scope * (project/folder/organization). This RPC gives callers especially @@ -205,13 +268,19 @@ protected AssetServiceStub build( * otherwise the request will be rejected. **/ - public void searchAllResources(com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest request, - io.grpc.stub.StreamObserver
* Searches all the IAM policies within a given accessible Resource Manager * scope (project/folder/organization). This RPC gives callers especially @@ -221,23 +290,27 @@ public void searchAllResources(com.google.cloud.asset.v1p1beta1.SearchAllResourc * requested scope, otherwise the request will be rejected. **/ - public void searchAllIamPolicies(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest request, - io.grpc.stub.StreamObserver
* Asset service definition. **/ public static final class AssetServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub
* Searches all the resources within a given accessible Resource Manager scope * (project/folder/organization). This RPC gives callers especially @@ -257,12 +332,15 @@ protected AssetServiceBlockingStub build( * otherwise the request will be rejected. **/ - public com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse searchAllResources(com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest request) { + public com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse searchAllResources( + com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getSearchAllResourcesMethod(), getCallOptions(), request); } /** + * + * *
* Searches all the IAM policies within a given accessible Resource Manager * scope (project/folder/organization). This RPC gives callers especially @@ -272,7 +350,8 @@ public com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse searchAllReso * requested scope, otherwise the request will be rejected. **/ - public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse searchAllIamPolicies(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest request) { + public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse searchAllIamPolicies( + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getSearchAllIamPoliciesMethod(), getCallOptions(), request); } @@ -280,14 +359,14 @@ public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse searchAllIa /** * A stub to allow clients to do ListenableFuture-style rpc calls to service AssetService. + * *
* Asset service definition. **/ public static final class AssetServiceFutureStub extends io.grpc.stub.AbstractFutureStub
* Searches all the resources within a given accessible Resource Manager scope * (project/folder/organization). This RPC gives callers especially @@ -307,13 +388,16 @@ protected AssetServiceFutureStub build( * otherwise the request will be rejected. **/ - public com.google.common.util.concurrent.ListenableFuture
* Searches all the IAM policies within a given accessible Resource Manager * scope (project/folder/organization). This RPC gives callers especially @@ -323,8 +407,9 @@ public com.google.common.util.concurrent.ListenableFuture*/ - public com.google.common.util.concurrent.ListenableFuture searchAllIamPolicies( - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse> + searchAllIamPolicies(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getSearchAllIamPoliciesMethod(), getCallOptions()), request); } @@ -333,11 +418,11 @@ public com.google.common.util.concurrent.ListenableFuture implements - io.grpc.stub.ServerCalls.UnaryMethod , - io.grpc.stub.ServerCalls.ServerStreamingMethod , - io.grpc.stub.ServerCalls.ClientStreamingMethod , - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod , + io.grpc.stub.ServerCalls.ServerStreamingMethod , + io.grpc.stub.ServerCalls.ClientStreamingMethod , + io.grpc.stub.ServerCalls.BidiStreamingMethod { private final AsyncService serviceImpl; private final int methodId; @@ -351,12 +436,18 @@ private static final class MethodHandlers implements public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_SEARCH_ALL_RESOURCES: - serviceImpl.searchAllResources((com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) request, - (io.grpc.stub.StreamObserver ) responseObserver); + serviceImpl.searchAllResources( + (com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse>) + responseObserver); break; case METHODID_SEARCH_ALL_IAM_POLICIES: - serviceImpl.searchAllIamPolicies((com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) request, - (io.grpc.stub.StreamObserver ) responseObserver); + serviceImpl.searchAllIamPolicies( + (com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse>) + responseObserver); break; default: throw new AssertionError(); @@ -377,24 +468,25 @@ public io.grpc.stub.StreamObserver invoke( public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getSearchAllResourcesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest, - com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse>( - service, METHODID_SEARCH_ALL_RESOURCES))) + getSearchAllResourcesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest, + com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse>( + service, METHODID_SEARCH_ALL_RESOURCES))) .addMethod( - getSearchAllIamPoliciesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest, - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse>( - service, METHODID_SEARCH_ALL_IAM_POLICIES))) + getSearchAllIamPoliciesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest, + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse>( + service, METHODID_SEARCH_ALL_IAM_POLICIES))) .build(); } - private static abstract class AssetServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + private abstract static class AssetServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { AssetServiceBaseDescriptorSupplier() {} @java.lang.Override @@ -436,11 +528,13 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { synchronized (AssetServiceGrpc.class) { result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new AssetServiceFileDescriptorSupplier()) - .addMethod(getSearchAllResourcesMethod()) - .addMethod(getSearchAllIamPoliciesMethod()) - .build(); + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AssetServiceFileDescriptorSupplier()) + .addMethod(getSearchAllResourcesMethod()) + .addMethod(getSearchAllIamPoliciesMethod()) + .build(); } } } diff --git a/java-asset/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java b/java-asset/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java new file mode 100644 index 000000000000..eeb65aa30cbf --- /dev/null +++ b/java-asset/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java @@ -0,0 +1,814 @@ +/* + * Copyright 2023 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 + * + * https://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. + */ +package com.google.cloud.asset.v1p2beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + * + * Asset service definition. + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/asset/v1p2beta1/asset_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class AssetServiceGrpc { + + private AssetServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.asset.v1p2beta1.AssetService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.CreateFeedRequest, com.google.cloud.asset.v1p2beta1.Feed> + getCreateFeedMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateFeed", + requestType = com.google.cloud.asset.v1p2beta1.CreateFeedRequest.class, + responseType = com.google.cloud.asset.v1p2beta1.Feed.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.CreateFeedRequest, com.google.cloud.asset.v1p2beta1.Feed> + getCreateFeedMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.CreateFeedRequest, + com.google.cloud.asset.v1p2beta1.Feed> + getCreateFeedMethod; + if ((getCreateFeedMethod = AssetServiceGrpc.getCreateFeedMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getCreateFeedMethod = AssetServiceGrpc.getCreateFeedMethod) == null) { + AssetServiceGrpc.getCreateFeedMethod = + getCreateFeedMethod = + io.grpc.MethodDescriptor + .+ newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateFeed")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p2beta1.CreateFeedRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("CreateFeed")) + .build(); + } + } + } + return getCreateFeedMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.GetFeedRequest, com.google.cloud.asset.v1p2beta1.Feed> + getGetFeedMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFeed", + requestType = com.google.cloud.asset.v1p2beta1.GetFeedRequest.class, + responseType = com.google.cloud.asset.v1p2beta1.Feed.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.GetFeedRequest, com.google.cloud.asset.v1p2beta1.Feed> + getGetFeedMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.GetFeedRequest, com.google.cloud.asset.v1p2beta1.Feed> + getGetFeedMethod; + if ((getGetFeedMethod = AssetServiceGrpc.getGetFeedMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getGetFeedMethod = AssetServiceGrpc.getGetFeedMethod) == null) { + AssetServiceGrpc.getGetFeedMethod = + getGetFeedMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFeed")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p2beta1.GetFeedRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("GetFeed")) + .build(); + } + } + } + return getGetFeedMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.ListFeedsRequest, + com.google.cloud.asset.v1p2beta1.ListFeedsResponse> + getListFeedsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFeeds", + requestType = com.google.cloud.asset.v1p2beta1.ListFeedsRequest.class, + responseType = com.google.cloud.asset.v1p2beta1.ListFeedsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.ListFeedsRequest, + com.google.cloud.asset.v1p2beta1.ListFeedsResponse> + getListFeedsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.ListFeedsRequest, + com.google.cloud.asset.v1p2beta1.ListFeedsResponse> + getListFeedsMethod; + if ((getListFeedsMethod = AssetServiceGrpc.getListFeedsMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getListFeedsMethod = AssetServiceGrpc.getListFeedsMethod) == null) { + AssetServiceGrpc.getListFeedsMethod = + getListFeedsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFeeds")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p2beta1.ListFeedsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p2beta1.ListFeedsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ListFeeds")) + .build(); + } + } + } + return getListFeedsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest, com.google.cloud.asset.v1p2beta1.Feed> + getUpdateFeedMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateFeed", + requestType = com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.class, + responseType = com.google.cloud.asset.v1p2beta1.Feed.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest, com.google.cloud.asset.v1p2beta1.Feed> + getUpdateFeedMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest, + com.google.cloud.asset.v1p2beta1.Feed> + getUpdateFeedMethod; + if ((getUpdateFeedMethod = AssetServiceGrpc.getUpdateFeedMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getUpdateFeedMethod = AssetServiceGrpc.getUpdateFeedMethod) == null) { + AssetServiceGrpc.getUpdateFeedMethod = + getUpdateFeedMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateFeed")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("UpdateFeed")) + .build(); + } + } + } + return getUpdateFeedMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest, com.google.protobuf.Empty> + getDeleteFeedMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteFeed", + requestType = com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest, com.google.protobuf.Empty> + getDeleteFeedMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest, com.google.protobuf.Empty> + getDeleteFeedMethod; + if ((getDeleteFeedMethod = AssetServiceGrpc.getDeleteFeedMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getDeleteFeedMethod = AssetServiceGrpc.getDeleteFeedMethod) == null) { + AssetServiceGrpc.getDeleteFeedMethod = + getDeleteFeedMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteFeed")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("DeleteFeed")) + .build(); + } + } + } + return getDeleteFeedMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AssetServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public AssetServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceStub(channel, callOptions); + } + }; + return AssetServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AssetServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public AssetServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceBlockingStub(channel, callOptions); + } + }; + return AssetServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AssetServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public AssetServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceFutureStub(channel, callOptions); + } + }; + return AssetServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + * + * Asset service definition. + *+ */ + public interface AsyncService { + + /** + * + * + *+ * Creates a feed in a parent project/folder/organization to listen to its + * asset updates. + *+ */ + default void createFeed( + com.google.cloud.asset.v1p2beta1.CreateFeedRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateFeedMethod(), responseObserver); + } + + /** + * + * + * + * Gets details about an asset feed. + *+ */ + default void getFeed( + com.google.cloud.asset.v1p2beta1.GetFeedRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFeedMethod(), responseObserver); + } + + /** + * + * + * + * Lists all asset feeds in a parent project/folder/organization. + *+ */ + default void listFeeds( + com.google.cloud.asset.v1p2beta1.ListFeedsRequest request, + io.grpc.stub.StreamObserver+ responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListFeedsMethod(), responseObserver); + } + + /** + * + * + * + * Updates an asset feed configuration. + *+ */ + default void updateFeed( + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateFeedMethod(), responseObserver); + } + + /** + * + * + * + * Deletes an asset feed. + *+ */ + default void deleteFeed( + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteFeedMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service AssetService. + * + * + * Asset service definition. + *+ */ + public abstract static class AssetServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return AssetServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service AssetService. + * + *+ * Asset service definition. + *+ */ + public static final class AssetServiceStub + extends io.grpc.stub.AbstractAsyncStub{ + private AssetServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AssetServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceStub(channel, callOptions); + } + + /** + * + * + * + * Creates a feed in a parent project/folder/organization to listen to its + * asset updates. + *+ */ + public void createFeed( + com.google.cloud.asset.v1p2beta1.CreateFeedRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateFeedMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + * + * Gets details about an asset feed. + *+ */ + public void getFeed( + com.google.cloud.asset.v1p2beta1.GetFeedRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetFeedMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + * + * Lists all asset feeds in a parent project/folder/organization. + *+ */ + public void listFeeds( + com.google.cloud.asset.v1p2beta1.ListFeedsRequest request, + io.grpc.stub.StreamObserver+ responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFeedsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + * + * Updates an asset feed configuration. + *+ */ + public void updateFeed( + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateFeedMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + * + * Deletes an asset feed. + *+ */ + public void deleteFeed( + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest request, + io.grpc.stub.StreamObserverresponseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFeedMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service AssetService. + * + * + * Asset service definition. + *+ */ + public static final class AssetServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub{ + private AssetServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AssetServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceBlockingStub(channel, callOptions); + } + + /** + * + * + * + * Creates a feed in a parent project/folder/organization to listen to its + * asset updates. + *+ */ + public com.google.cloud.asset.v1p2beta1.Feed createFeed( + com.google.cloud.asset.v1p2beta1.CreateFeedRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateFeedMethod(), getCallOptions(), request); + } + + /** + * + * + *+ * Gets details about an asset feed. + *+ */ + public com.google.cloud.asset.v1p2beta1.Feed getFeed( + com.google.cloud.asset.v1p2beta1.GetFeedRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFeedMethod(), getCallOptions(), request); + } + + /** + * + * + *+ * Lists all asset feeds in a parent project/folder/organization. + *+ */ + public com.google.cloud.asset.v1p2beta1.ListFeedsResponse listFeeds( + com.google.cloud.asset.v1p2beta1.ListFeedsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFeedsMethod(), getCallOptions(), request); + } + + /** + * + * + *+ * Updates an asset feed configuration. + *+ */ + public com.google.cloud.asset.v1p2beta1.Feed updateFeed( + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateFeedMethod(), getCallOptions(), request); + } + + /** + * + * + *+ * Deletes an asset feed. + *+ */ + public com.google.protobuf.Empty deleteFeed( + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteFeedMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service AssetService. + * + *+ * Asset service definition. + *+ */ + public static final class AssetServiceFutureStub + extends io.grpc.stub.AbstractFutureStub{ + private AssetServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AssetServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceFutureStub(channel, callOptions); + } + + /** + * + * + * + * Creates a feed in a parent project/folder/organization to listen to its + * asset updates. + *+ */ + public com.google.common.util.concurrent.ListenableFuture+ createFeed(com.google.cloud.asset.v1p2beta1.CreateFeedRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateFeedMethod(), getCallOptions()), request); + } + + /** + * + * + * + * Gets details about an asset feed. + *+ */ + public com.google.common.util.concurrent.ListenableFuture+ getFeed(com.google.cloud.asset.v1p2beta1.GetFeedRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetFeedMethod(), getCallOptions()), request); + } + + /** + * + * + * + * Lists all asset feeds in a parent project/folder/organization. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1p2beta1.ListFeedsResponse> + listFeeds(com.google.cloud.asset.v1p2beta1.ListFeedsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFeedsMethod(), getCallOptions()), request); + } + + /** + * + * + *+ * Updates an asset feed configuration. + *+ */ + public com.google.common.util.concurrent.ListenableFuture+ updateFeed(com.google.cloud.asset.v1p2beta1.UpdateFeedRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateFeedMethod(), getCallOptions()), request); + } + + /** + * + * + * + * Deletes an asset feed. + *+ */ + public com.google.common.util.concurrent.ListenableFuturedeleteFeed( + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteFeedMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_FEED = 0; + private static final int METHODID_GET_FEED = 1; + private static final int METHODID_LIST_FEEDS = 2; + private static final int METHODID_UPDATE_FEED = 3; + private static final int METHODID_DELETE_FEED = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod , + io.grpc.stub.ServerCalls.ServerStreamingMethod , + io.grpc.stub.ServerCalls.ClientStreamingMethod , + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_FEED: + serviceImpl.createFeed( + (com.google.cloud.asset.v1p2beta1.CreateFeedRequest) request, + (io.grpc.stub.StreamObserver ) + responseObserver); + break; + case METHODID_GET_FEED: + serviceImpl.getFeed( + (com.google.cloud.asset.v1p2beta1.GetFeedRequest) request, + (io.grpc.stub.StreamObserver ) + responseObserver); + break; + case METHODID_LIST_FEEDS: + serviceImpl.listFeeds( + (com.google.cloud.asset.v1p2beta1.ListFeedsRequest) request, + (io.grpc.stub.StreamObserver ) + responseObserver); + break; + case METHODID_UPDATE_FEED: + serviceImpl.updateFeed( + (com.google.cloud.asset.v1p2beta1.UpdateFeedRequest) request, + (io.grpc.stub.StreamObserver ) + responseObserver); + break; + case METHODID_DELETE_FEED: + serviceImpl.deleteFeed( + (com.google.cloud.asset.v1p2beta1.DeleteFeedRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateFeedMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p2beta1.CreateFeedRequest, + com.google.cloud.asset.v1p2beta1.Feed>(service, METHODID_CREATE_FEED))) + .addMethod( + getGetFeedMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p2beta1.GetFeedRequest, + com.google.cloud.asset.v1p2beta1.Feed>(service, METHODID_GET_FEED))) + .addMethod( + getListFeedsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p2beta1.ListFeedsRequest, + com.google.cloud.asset.v1p2beta1.ListFeedsResponse>( + service, METHODID_LIST_FEEDS))) + .addMethod( + getUpdateFeedMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest, + com.google.cloud.asset.v1p2beta1.Feed>(service, METHODID_UPDATE_FEED))) + .addMethod( + getDeleteFeedMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest, com.google.protobuf.Empty>( + service, METHODID_DELETE_FEED))) + .build(); + } + + private abstract static class AssetServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AssetServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AssetService"); + } + } + + private static final class AssetServiceFileDescriptorSupplier + extends AssetServiceBaseDescriptorSupplier { + AssetServiceFileDescriptorSupplier() {} + } + + private static final class AssetServiceMethodDescriptorSupplier + extends AssetServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + AssetServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (AssetServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AssetServiceFileDescriptorSupplier()) + .addMethod(getCreateFeedMethod()) + .addMethod(getGetFeedMethod()) + .addMethod(getListFeedsMethod()) + .addMethod(getUpdateFeedMethod()) + .addMethod(getDeleteFeedMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/grpc-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceGrpc.java b/java-asset/grpc-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceGrpc.java similarity index 55% rename from owl-bot-staging/java-asset/v1p5beta1/grpc-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceGrpc.java rename to java-asset/grpc-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceGrpc.java index 53da7fca5c3c..a7885405d4c0 100644 --- a/owl-bot-staging/java-asset/v1p5beta1/grpc-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceGrpc.java +++ b/java-asset/grpc-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceGrpc.java @@ -1,8 +1,25 @@ +/* + * Copyright 2023 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 + * + * https://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. + */ package com.google.cloud.asset.v1p5beta1; import static io.grpc.MethodDescriptor.generateFullMethodName; /** + * + * * * Asset service definition. *@@ -18,82 +35,96 @@ private AssetServiceGrpc() {} public static final java.lang.String SERVICE_NAME = "google.cloud.asset.v1p5beta1.AssetService"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptorgetListAssetsMethod; + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p5beta1.ListAssetsRequest, + com.google.cloud.asset.v1p5beta1.ListAssetsResponse> + getListAssetsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ListAssets", requestType = com.google.cloud.asset.v1p5beta1.ListAssetsRequest.class, responseType = com.google.cloud.asset.v1p5beta1.ListAssetsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListAssetsMethod() { - io.grpc.MethodDescriptor getListAssetsMethod; + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p5beta1.ListAssetsRequest, + com.google.cloud.asset.v1p5beta1.ListAssetsResponse> + getListAssetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p5beta1.ListAssetsRequest, + com.google.cloud.asset.v1p5beta1.ListAssetsResponse> + getListAssetsMethod; if ((getListAssetsMethod = AssetServiceGrpc.getListAssetsMethod) == null) { synchronized (AssetServiceGrpc.class) { if ((getListAssetsMethod = AssetServiceGrpc.getListAssetsMethod) == null) { - AssetServiceGrpc.getListAssetsMethod = getListAssetsMethod = - io.grpc.MethodDescriptor. newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAssets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p5beta1.ListAssetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p5beta1.ListAssetsResponse.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ListAssets")) - .build(); + AssetServiceGrpc.getListAssetsMethod = + getListAssetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAssets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p5beta1.ListAssetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p5beta1.ListAssetsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ListAssets")) + .build(); } } } return getListAssetsMethod; } - /** - * Creates a new async stub that supports all call types for the service - */ + /** Creates a new async stub that supports all call types for the service */ public static AssetServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public AssetServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AssetServiceStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public AssetServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceStub(channel, callOptions); + } + }; return AssetServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public static AssetServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { + public static AssetServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public AssetServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AssetServiceBlockingStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public AssetServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceBlockingStub(channel, callOptions); + } + }; return AssetServiceBlockingStub.newStub(factory, channel); } - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static AssetServiceFutureStub newFutureStub( - io.grpc.Channel channel) { + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AssetServiceFutureStub newFutureStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public AssetServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AssetServiceFutureStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public AssetServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceFutureStub(channel, callOptions); + } + }; return AssetServiceFutureStub.newStub(factory, channel); } /** + * + * * * Asset service definition. *@@ -101,58 +132,67 @@ public AssetServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptio public interface AsyncService { /** + * + * ** Lists assets with time and resource types and returns paged results in * response. **/ - default void listAssets(com.google.cloud.asset.v1p5beta1.ListAssetsRequest request, - io.grpc.stub.StreamObserverresponseObserver) { + default void listAssets( + com.google.cloud.asset.v1p5beta1.ListAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAssetsMethod(), responseObserver); } } /** * Base class for the server implementation of the service AssetService. + * * * Asset service definition. **/ - public static abstract class AssetServiceImplBase + public abstract static class AssetServiceImplBase implements io.grpc.BindableService, AsyncService { - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { return AssetServiceGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service AssetService. + * ** Asset service definition. **/ public static final class AssetServiceStub extends io.grpc.stub.AbstractAsyncStub{ - private AssetServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + private AssetServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override - protected AssetServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + protected AssetServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AssetServiceStub(channel, callOptions); } /** + * + * * * Lists assets with time and resource types and returns paged results in * response. **/ - public void listAssets(com.google.cloud.asset.v1p5beta1.ListAssetsRequest request, - io.grpc.stub.StreamObserverresponseObserver) { + public void listAssets( + com.google.cloud.asset.v1p5beta1.ListAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getListAssetsMethod(), getCallOptions()), request, responseObserver); } @@ -160,14 +200,14 @@ public void listAssets(com.google.cloud.asset.v1p5beta1.ListAssetsRequest reques /** * A stub to allow clients to do synchronous rpc calls to service AssetService. + * * * Asset service definition. **/ public static final class AssetServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub{ - private AssetServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + private AssetServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -178,12 +218,15 @@ protected AssetServiceBlockingStub build( } /** + * + * * * Lists assets with time and resource types and returns paged results in * response. **/ - public com.google.cloud.asset.v1p5beta1.ListAssetsResponse listAssets(com.google.cloud.asset.v1p5beta1.ListAssetsRequest request) { + public com.google.cloud.asset.v1p5beta1.ListAssetsResponse listAssets( + com.google.cloud.asset.v1p5beta1.ListAssetsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListAssetsMethod(), getCallOptions(), request); } @@ -191,14 +234,14 @@ public com.google.cloud.asset.v1p5beta1.ListAssetsResponse listAssets(com.google /** * A stub to allow clients to do ListenableFuture-style rpc calls to service AssetService. + * ** Asset service definition. **/ public static final class AssetServiceFutureStub extends io.grpc.stub.AbstractFutureStub{ - private AssetServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + private AssetServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -209,13 +252,16 @@ protected AssetServiceFutureStub build( } /** + * + * * * Lists assets with time and resource types and returns paged results in * response. **/ - public com.google.common.util.concurrent.ListenableFuturelistAssets( - com.google.cloud.asset.v1p5beta1.ListAssetsRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1p5beta1.ListAssetsResponse> + listAssets(com.google.cloud.asset.v1p5beta1.ListAssetsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListAssetsMethod(), getCallOptions()), request); } @@ -223,11 +269,11 @@ public com.google.common.util.concurrent.ListenableFuture implements - io.grpc.stub.ServerCalls.UnaryMethod , - io.grpc.stub.ServerCalls.ServerStreamingMethod , - io.grpc.stub.ServerCalls.ClientStreamingMethod , - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod , + io.grpc.stub.ServerCalls.ServerStreamingMethod , + io.grpc.stub.ServerCalls.ClientStreamingMethod , + io.grpc.stub.ServerCalls.BidiStreamingMethod { private final AsyncService serviceImpl; private final int methodId; @@ -241,8 +287,10 @@ private static final class MethodHandlers implements public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_LIST_ASSETS: - serviceImpl.listAssets((com.google.cloud.asset.v1p5beta1.ListAssetsRequest) request, - (io.grpc.stub.StreamObserver ) responseObserver); + serviceImpl.listAssets( + (com.google.cloud.asset.v1p5beta1.ListAssetsRequest) request, + (io.grpc.stub.StreamObserver ) + responseObserver); break; default: throw new AssertionError(); @@ -263,17 +311,18 @@ public io.grpc.stub.StreamObserver invoke( public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getListAssetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1p5beta1.ListAssetsRequest, - com.google.cloud.asset.v1p5beta1.ListAssetsResponse>( - service, METHODID_LIST_ASSETS))) + getListAssetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p5beta1.ListAssetsRequest, + com.google.cloud.asset.v1p5beta1.ListAssetsResponse>( + service, METHODID_LIST_ASSETS))) .build(); } - private static abstract class AssetServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + private abstract static class AssetServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { AssetServiceBaseDescriptorSupplier() {} @java.lang.Override @@ -315,10 +364,12 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { synchronized (AssetServiceGrpc.class) { result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new AssetServiceFileDescriptorSupplier()) - .addMethod(getListAssetsMethod()) - .build(); + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AssetServiceFileDescriptorSupplier()) + .addMethod(getListAssetsMethod()) + .build(); } } } diff --git a/owl-bot-staging/java-asset/v1p7beta1/grpc-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceGrpc.java b/java-asset/grpc-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceGrpc.java similarity index 64% rename from owl-bot-staging/java-asset/v1p7beta1/grpc-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceGrpc.java rename to java-asset/grpc-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceGrpc.java index 6075f4096c78..adee7a69053e 100644 --- a/owl-bot-staging/java-asset/v1p7beta1/grpc-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceGrpc.java +++ b/java-asset/grpc-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceGrpc.java @@ -1,8 +1,25 @@ +/* + * Copyright 2023 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 + * + * https://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. + */ package com.google.cloud.asset.v1p7beta1; import static io.grpc.MethodDescriptor.generateFullMethodName; /** + * + * * * Asset service definition. *@@ -18,82 +35,92 @@ private AssetServiceGrpc() {} public static final java.lang.String SERVICE_NAME = "google.cloud.asset.v1p7beta1.AssetService"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptorgetExportAssetsMethod; + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p7beta1.ExportAssetsRequest, com.google.longrunning.Operation> + getExportAssetsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ExportAssets", requestType = com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.class, responseType = com.google.longrunning.Operation.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getExportAssetsMethod() { - io.grpc.MethodDescriptor getExportAssetsMethod; + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p7beta1.ExportAssetsRequest, com.google.longrunning.Operation> + getExportAssetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p7beta1.ExportAssetsRequest, com.google.longrunning.Operation> + getExportAssetsMethod; if ((getExportAssetsMethod = AssetServiceGrpc.getExportAssetsMethod) == null) { synchronized (AssetServiceGrpc.class) { if ((getExportAssetsMethod = AssetServiceGrpc.getExportAssetsMethod) == null) { - AssetServiceGrpc.getExportAssetsMethod = getExportAssetsMethod = - io.grpc.MethodDescriptor. newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportAssets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ExportAssets")) - .build(); + AssetServiceGrpc.getExportAssetsMethod = + getExportAssetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportAssets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p7beta1.ExportAssetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ExportAssets")) + .build(); } } } return getExportAssetsMethod; } - /** - * Creates a new async stub that supports all call types for the service - */ + /** Creates a new async stub that supports all call types for the service */ public static AssetServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public AssetServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AssetServiceStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public AssetServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceStub(channel, callOptions); + } + }; return AssetServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public static AssetServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { + public static AssetServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public AssetServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AssetServiceBlockingStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public AssetServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceBlockingStub(channel, callOptions); + } + }; return AssetServiceBlockingStub.newStub(factory, channel); } - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static AssetServiceFutureStub newFutureStub( - io.grpc.Channel channel) { + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AssetServiceFutureStub newFutureStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public AssetServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AssetServiceFutureStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public AssetServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceFutureStub(channel, callOptions); + } + }; return AssetServiceFutureStub.newStub(factory, channel); } /** + * + * * * Asset service definition. *@@ -101,6 +128,8 @@ public AssetServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptio public interface AsyncService { /** + * + * ** Exports assets with time and resource types to a given Cloud Storage * location/BigQuery table. For Cloud Storage location destinations, the @@ -115,46 +144,51 @@ public interface AsyncService { * 5 minutes. **/ - default void exportAssets(com.google.cloud.asset.v1p7beta1.ExportAssetsRequest request, + default void exportAssets( + com.google.cloud.asset.v1p7beta1.ExportAssetsRequest request, io.grpc.stub.StreamObserverresponseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExportAssetsMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExportAssetsMethod(), responseObserver); } } /** * Base class for the server implementation of the service AssetService. + * *